import { TransportClientClass } from 'src/clients'; import { Response, AppDBCollection, AppDBCollectionDefinition } from 'src/models'; /** * SDK for interacting with collections in AppDB. * * ### Example Usage * * ```js * import { AppDBClient } from '@domoinc/toolkit'; * * const collections = await (new AppDBClient.CollectionsClient()).getCollections(); * // do something with the collections * console.table(collections); * ``` */ export declare class CollectionsClient { transportClient: TransportClientClass; private reCaptchaHeader; constructor(reCaptchaToken?: string); /** * A helper method for retrieving a full list of collections. */ getCollections(): Promise>; /** * A helper method for creating a new collection. * * @param newCollection Properties for new collection * * ### Example Usage * * ```js * collectionsClient.createCollection({ * name: 'newCollection', * schema: [ * { * name: 'name', * type: 'STRING' * }, * { * name: 'age', * type: 'LONG' * }, * ], * syncEnabled: true, * }); * ``` */ createCollection(newCollection: AppDBCollectionDefinition): Promise>; /** * A helper method for updating a collection. * * @param collectionId ID of target collection to update * @param updatedConfig Partial object representing the new values of the collection * * ### Example Usage * * ```js * collectionsClient.updateCollection( * '753e53a0-f054-11e9-81b4-2a2ae2dbcce4', * { * schema: [ * { * name: 'name', * type: 'STRING' * }, * { * name: 'created', * type: 'DATETIME' * }, * ], * } * ); * ``` */ updateCollection(collectionId: string, updatedConfig: Partial): Promise>; /** * A helper method for deleting a collection. * * @param collectionId ID of target collection to delete * * ### Example Usage * * ```js * collectionsClient.deleteCollection('753e53a0-f054-11e9-81b4-2a2ae2dbcce4'); * ``` */ deleteCollection(collectionId: string): Promise>; /** * A helper method for forcing the collections to be sync'd with their respective * datasets in Domo. */ syncWithDomo(): Promise; }