/** * This file was auto-generated by Fern from our API Definition. */ import * as core from '../../../../core'; import * as environments from '../../../../environments'; import * as Truvity from '../../../index'; export declare namespace ApiKeys { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey?: core.Supplier; /** Additional headers to include in requests. */ headers?: Record | undefined>; fetcher?: core.FetchFunction; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Additional query string parameters to include in the request. */ queryParams?: Record; /** Additional headers to include in the request. */ headers?: Record | undefined>; } } /** * The API to manage Truvity API's keys. */ export declare class ApiKeys { protected readonly _options: ApiKeys.Options; constructor(_options?: ApiKeys.Options); /** * Create a new API key resource. * * @param {Truvity.ApiKeyCreateRequest} request * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.UnsupportedMediaTypeError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.apiKeys.apiKeyCreate() */ apiKeyCreate(request?: Truvity.ApiKeyCreateRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise; private __apiKeyCreate; /** * Search for API Keys with extended filters capabilities. * * @param {Truvity.ApiKeySearchRequest} request * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.UnsupportedMediaTypeError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.apiKeys.apiKeySearch() */ apiKeySearch(request?: Truvity.ApiKeySearchRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise; private __apiKeySearch; /** * Get the latest version of API Key. * * @param {string} id - The ID of the resource. * @param {Truvity.ApiKeyLatestRequest} request * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.apiKeys.apiKeyLatest("id") */ apiKeyLatest(id: string, request?: Truvity.ApiKeyLatestRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise; private __apiKeyLatest; /** * Delete API Key's resource. * * @param {string} id - The primary and unique identifier of the resource (inside tenant) * according to [RFC 4122](https://www.rfc-editor.org/info/rfc4122). * @param {Truvity.ApiKeyDeleteRequest} request * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.MethodNotAllowedError} * @throws {@link Truvity.PreconditionFailedError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.apiKeys.apiKeyDelete("id", { * ifMatch: "If-Match" * }) */ apiKeyDelete(id: string, request: Truvity.ApiKeyDeleteRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise; private __apiKeyDelete; /** * Update annotations of API Key's resource. * * @param {string} id - The primary and unique identifier of the resource (inside tenant) * according to [RFC 4122](https://www.rfc-editor.org/info/rfc4122). * @param {Truvity.ApiKeyUpdateAnnotationsRequest} request * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.MethodNotAllowedError} * @throws {@link Truvity.PreconditionFailedError} * @throws {@link Truvity.UnsupportedMediaTypeError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.apiKeys.apiKeyUpdateAnnotations("id", { * ifMatch: "If-Match", * annotations: { * "key": "value" * } * }) */ apiKeyUpdateAnnotations(id: string, request: Truvity.ApiKeyUpdateAnnotationsRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise; private __apiKeyUpdateAnnotations; /** * Update labels of API Key's resource. * * @param {string} id - The primary and unique identifier of the resource (inside tenant) * according to [RFC 4122](https://www.rfc-editor.org/info/rfc4122). * @param {Truvity.ApiKeyUpdateLabelsRequest} request * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.MethodNotAllowedError} * @throws {@link Truvity.PreconditionFailedError} * @throws {@link Truvity.UnsupportedMediaTypeError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.apiKeys.apiKeyUpdateLabels("id", { * ifMatch: "If-Match", * labels: { * "key": "value" * } * }) */ apiKeyUpdateLabels(id: string, request: Truvity.ApiKeyUpdateLabelsRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise; private __apiKeyUpdateLabels; /** * Restore API Key's resource. * * @param {string} id - The primary and unique identifier of the resource (inside tenant) * according to [RFC 4122](https://www.rfc-editor.org/info/rfc4122). * @param {Truvity.ApiKeyRestoreRequest} request * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.MethodNotAllowedError} * @throws {@link Truvity.PreconditionFailedError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.apiKeys.apiKeyRestore("id", { * ifMatch: "If-Match" * }) */ apiKeyRestore(id: string, request: Truvity.ApiKeyRestoreRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise; private __apiKeyRestore; /** * History of the API Key's resources. * * @param {string} id - The ID of the resource. * @param {Truvity.ApiKeyHistoryRequest} request * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.apiKeys.apiKeyHistory("id") */ apiKeyHistory(id: string, request?: Truvity.ApiKeyHistoryRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise; private __apiKeyHistory; /** * Read the specific version of the API Key's resource. * * @param {string} id - The ID of the resource. * @param {number} revision - The revision of the resource. * @param {Truvity.ApiKeyRevisionRequest} request * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.apiKeys.apiKeyRevision("id", 1) */ apiKeyRevision(id: string, revision: number, request?: Truvity.ApiKeyRevisionRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise; private __apiKeyRevision; protected _getCustomAuthorizationHeaders(): Promise<{ 'X-API-KEY': string | undefined; }>; } //# sourceMappingURL=Client.d.ts.map