import { EnumerateAndSearchRequest, EnumerateRequest, EnumerateResponse, UserMetadata, UserMetadataCreateRequest } from '../types'; import SdkBase from './SdkBase'; import { SdkConfiguration } from './SdkConfiguration'; export declare class UserSdk extends SdkBase { /** * Instantiate the SDK. * @param {SdkConfiguration} config - The SDK configuration. */ constructor(config: SdkConfiguration); /** * Read all users. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - An array of users. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ readAll(cancellationToken?: AbortController): Promise; /** * Read a user. * @param {string} userGuid - The GUID of the user. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The user. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ read(userGuid: string, cancellationToken?: AbortController): Promise; /** * Read multiple users. * @param {string[]} userGuids - The GUIDs of the users. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The users. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ readMany(userGuids: string[], cancellationToken?: AbortController): Promise; /** * Create a user. * @param {UserMetadataCreateRequest} user - The user to create. * @param {String} user.FirstName - The first name of the user. * @param {String} user.LastName - The last name of the user. * @param {boolean} user.Active - Indicates if user is active. * @param {string} user.Email - The email of the user. * @param {string} user.Password - The password of the user. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The created user. */ create(user: UserMetadataCreateRequest, cancellationToken?: AbortController): Promise; /** * User exists. * @param {string} guid - The GUID of the user. * @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; /** * Update a user. * @param {UserMetadata} user - The user to update. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise} - The updated user. */ update(user: UserMetadata, cancellationToken?: AbortController): Promise; /** * Delete a user. * @param {string} guid - The GUID of the user. * @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; /** * Enumerate all users. * @param {AbortController} [cancellationToken] - Optional cancellation token for cancelling the request. * @returns {Promise>} - An array of users. * @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 users. * @throws {Error | ApiErrorResponse} Rejects if the URL is invalid or if the request fails. */ enumerateAndSearch(request: EnumerateAndSearchRequest, cancellationToken?: AbortController): Promise>; }