/** * 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 Credentials { 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 Verifiable Credentials. */ export declare class Credentials { protected readonly _options: Credentials.Options; constructor(_options?: Credentials.Options); /** * Import a Verifiable Credential's resource with a **blob_id**. * * To get **blob_id** call [Upload](#tag/credentials/operation/CredentialUpload) first. * * @param {Truvity.CredentialImportRequest} request * @param {Credentials.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.UnsupportedMediaTypeError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.credentials.credentialImport({ * blobId: "blob_id" * }) */ credentialImport(request: Truvity.CredentialImportRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialImport; /** * Search for Credentials with extended filters capabilities. * * @param {Truvity.CredentialSearchRequest} request * @param {Credentials.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.credentials.credentialSearch() */ credentialSearch(request?: Truvity.CredentialSearchRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialSearch; /** * Initiates a Credential blob upload, returning a pre-signed S3 URL. Response contains: * * - **blob_id** (required for Credential creation) * * - **upload_uri** (pre-signed URL for upload) * * - **timeout** (expiration in seconds). * * @param {Truvity.CredentialUploadRequest} request * @param {Credentials.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.credentials.credentialUpload() */ credentialUpload(request?: Truvity.CredentialUploadRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialUpload; /** * Get the latest version of Credential. * * @param {string} id - The ID of the resource. * @param {Truvity.CredentialLatestRequest} request * @param {Credentials.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.credentials.credentialLatest("id") */ credentialLatest(id: string, request?: Truvity.CredentialLatestRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialLatest; /** * Delete Credential'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.CredentialDeleteRequest} request * @param {Credentials.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.credentials.credentialDelete("id", { * ifMatch: "If-Match" * }) */ credentialDelete(id: string, request: Truvity.CredentialDeleteRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialDelete; /** * Update annotations of Credential'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.CredentialUpdateAnnotationsRequest} request * @param {Credentials.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.credentials.credentialUpdateAnnotations("id", { * ifMatch: "If-Match", * annotations: { * "key": "value" * } * }) */ credentialUpdateAnnotations(id: string, request: Truvity.CredentialUpdateAnnotationsRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialUpdateAnnotations; /** * Update labels of Credential'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.CredentialUpdateLabelsRequest} request * @param {Credentials.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.credentials.credentialUpdateLabels("id", { * ifMatch: "If-Match", * labels: { * "key": "value" * } * }) */ credentialUpdateLabels(id: string, request: Truvity.CredentialUpdateLabelsRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialUpdateLabels; /** * Restore Credential'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.CredentialRestoreRequest} request * @param {Credentials.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.credentials.credentialRestore("id", { * ifMatch: "If-Match" * }) */ credentialRestore(id: string, request: Truvity.CredentialRestoreRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialRestore; /** * History of the Credential's resources. * * @param {string} id - The ID of the resource. * @param {Truvity.CredentialHistoryRequest} request * @param {Credentials.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.credentials.credentialHistory("id") */ credentialHistory(id: string, request?: Truvity.CredentialHistoryRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialHistory; /** * Read the specific version of the Credential's resource. * * @param {string} id - The ID of the resource. * @param {number} revision - The revision of the resource. * @param {Truvity.CredentialRevisionRequest} request * @param {Credentials.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.credentials.credentialRevision("id", 1) */ credentialRevision(id: string, revision: number, request?: Truvity.CredentialRevisionRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialRevision; /** * Download of Credential's blob. * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} */ credentialDownload(id: string, revision: number, request?: Truvity.CredentialDownloadRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialDownload; /** * Retrieve the claim values of a Verifiable Credential. * * @param {string} id - The ID of the credential resource. * @param {Truvity.GetCredentialClaimValuesRequest} request * @param {Credentials.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.credentials.getCredentialClaimValues("id") */ getCredentialClaimValues(id: string, request?: Truvity.GetCredentialClaimValuesRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __getCredentialClaimValues; /** * Verify a Verifiable Credential. * * @param {string} id - The ID of the resource. * @param {Truvity.CredentialVerifyRequest} request * @param {Credentials.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.credentials.credentialVerify("id") */ credentialVerify(id: string, request?: Truvity.CredentialVerifyRequest, requestOptions?: Credentials.RequestOptions): core.HttpResponsePromise; private __credentialVerify; protected _getCustomAuthorizationHeaders(): Promise<{ 'X-API-KEY': string | undefined; }>; } //# sourceMappingURL=Client.d.ts.map