import { EnumerateAndSearchRequest, EnumerateRequest, EnumerateResponse, LabelMetadata, LabelMetadataCreateRequest } from '../types'; import SdkBase from './SdkBase'; import { SdkConfiguration } from './SdkConfiguration'; export declare class LabelSdk extends SdkBase { /** * Instantiate the SDK. * @param {SdkConfiguration} config - The SDK configuration. */ constructor(config: SdkConfiguration); /** * Read all labels. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} */ readAll(cancellationToken?: AbortController): Promise; /** * Read a label. * @param {string} guid - The GUID of the label. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ read(guid: string, cancellationToken?: AbortController): Promise; /** * Read multiple labels. * @param {string[]} labelGuids - The GUIDs of the labels. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The labels. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ readMany(labelGuids: string[], cancellationToken?: AbortController): Promise; /** * Label exists. * @param {string} guid - The GUID of the label. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ exists(guid: string, cancellationToken?: AbortController): Promise; /** * Create a label. * @param {LabelMetadataCreateRequest} label - The label to create. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} */ create(label: LabelMetadataCreateRequest, cancellationToken?: AbortController): Promise; /** * Create multiple labels * @param {LabelMetadata[]} labels - The labels to create. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ createBulk(labels: LabelMetadataCreateRequest[], cancellationToken?: AbortController): Promise; /** * Update a label. * @param {LabelMetadata} label - The label to update. * @param {string} guid - The GUID of the label. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ update(label: LabelMetadata, cancellationToken?: AbortController): Promise; /** * Delete a label. * @param {string} guid - The GUID of the label. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ delete(guid: string, cancellationToken?: AbortController): Promise; /** * Delete multiple labels * @param {string[]} guids - The GUIDs of the labels to delete. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ deleteBulk(guids: string[], cancellationToken?: AbortController): Promise; /** * Enumerate all labels. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise>} - An array of labels. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ enumerate(request?: EnumerateRequest, cancellationToken?: AbortController): Promise>; /** * Enumerate and Search * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise>} - An array of labels. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ enumerateAndSearch(request: EnumerateAndSearchRequest, cancellationToken?: AbortController): Promise>; }