import { CredentialMetadata, CredentialMetadataCreateRequest, EnumerateAndSearchRequest, EnumerateRequest, EnumerateResponse } from '../types'; import SdkBase from './SdkBase'; import { SdkConfiguration } from './SdkConfiguration'; export declare class CredentialSdk extends SdkBase { /** * Instantiate the SDK. * @param {SdkConfiguration} config - The SDK configuration . */ constructor(config: SdkConfiguration); /** * Read all credentials. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of credentials. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ readAll(cancellationToken?: AbortController): Promise; /** * Read a credential. * @param {string} guid - The GUID of the credential. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The credential. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ read(guid: string, cancellationToken?: AbortController): Promise; /** * Read multiple credentials. * @param {string[]} credentialGuids - The GUIDs of the credentials. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The credentials. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ readMany(credentialGuids: string[], cancellationToken?: AbortController): Promise; /** * Create a credential. * @param {CredentialMetadataCreateRequest} credential - The credential to create. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The created credential. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ create(credential: CredentialMetadataCreateRequest, cancellationToken?: AbortController): Promise; /** * Update a credential. * @param {CredentialMetadata} credential - The credential to update. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The updated credential. */ update(credential: CredentialMetadata, cancellationToken?: AbortController): Promise; /** * Delete a credential. * @param {string} guid - The GUID of the credential. * @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; /** * Credential exists. * @param {string} guid - The GUID of the credential. * @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; /** * Enumerate all credentials. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of credentials. * @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 credentials. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ enumerateAndSearch(request: EnumerateAndSearchRequest, cancellationToken?: AbortController): Promise>; }