/** * 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 Schemas { 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 Credential schemas. */ export declare class Schemas { protected readonly _options: Schemas.Options; constructor(_options?: Schemas.Options); /** * Creates Schema's resource. * * @param {Truvity.SchemaCreateRequest} request * @param {Schemas.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.schemas.schemaCreate({ * data: {} * }) */ schemaCreate(request: Truvity.SchemaCreateRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaCreate; /** * Import a Credential Schema. * * This operation accepts a schema definition and checks if a published schema with this definition already exists. If it exists, the operation returns the published meta-schema resource. If not, it creates and publishes a new temporary schema, using the schema definition hash as its slug. * * @param {Truvity.SchemaImportRequest} request * @param {Schemas.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.PreconditionFailedError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.schemas.schemaImport({ * data: { * schema: { * fields: [{ * kind: "BOOLEAN", * name: "name" * }] * } * } * }) */ schemaImport(request: Truvity.SchemaImportRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaImport; /** * Search for Schemas with extended filters capabilities. * * @param {Truvity.SchemaSearchRequest} request * @param {Schemas.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.schemas.schemaSearch() */ schemaSearch(request?: Truvity.SchemaSearchRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaSearch; /** * Get the latest version of Schema. * * @param {string} id - The ID of the resource. * @param {Truvity.SchemaLatestRequest} request * @param {Schemas.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.schemas.schemaLatest("id") */ schemaLatest(id: string, request?: Truvity.SchemaLatestRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaLatest; /** * Delete Schema'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.SchemaDeleteRequest} request * @param {Schemas.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.schemas.schemaDelete("id", { * ifMatch: "If-Match" * }) */ schemaDelete(id: string, request: Truvity.SchemaDeleteRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaDelete; /** * Update Schema'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.SchemaUpdateRequest} request * @param {Schemas.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.schemas.schemaUpdate("id", { * ifMatch: "If-Match", * data: { * schema: {} * } * }) */ schemaUpdate(id: string, request: Truvity.SchemaUpdateRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaUpdate; /** * Update annotations of Schema'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.SchemaUpdateAnnotationsRequest} request * @param {Schemas.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.schemas.schemaUpdateAnnotations("id", { * ifMatch: "If-Match", * annotations: { * "key": "value" * } * }) */ schemaUpdateAnnotations(id: string, request: Truvity.SchemaUpdateAnnotationsRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaUpdateAnnotations; /** * Update labels of Schema'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.SchemaUpdateLabelsRequest} request * @param {Schemas.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.schemas.schemaUpdateLabels("id", { * ifMatch: "If-Match", * labels: { * "key": "value" * } * }) */ schemaUpdateLabels(id: string, request: Truvity.SchemaUpdateLabelsRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaUpdateLabels; /** * Publish a Credential Schema. * * This operation publishes a Credential Schema, making it available for use. * * If no slug is provided, the schema will be published as a temporary schema using the schema definition hash as its slug. * If version is not passed, a default version will be equal 1. * * @param {string} id - The ID of the resource. * @param {Truvity.SchemaPublishRequest} request * @param {Schemas.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Truvity.BadRequestError} * @throws {@link Truvity.UnauthorizedError} * @throws {@link Truvity.ForbiddenError} * @throws {@link Truvity.NotFoundError} * @throws {@link Truvity.PreconditionFailedError} * @throws {@link Truvity.TooManyRequestsError} * @throws {@link Truvity.InternalServerError} * * @example * await client.schemas.schemaPublish("id") */ schemaPublish(id: string, request?: Truvity.SchemaPublishRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaPublish; /** * Restore Schema'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.SchemaRestoreRequest} request * @param {Schemas.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.schemas.schemaRestore("id", { * ifMatch: "If-Match" * }) */ schemaRestore(id: string, request: Truvity.SchemaRestoreRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaRestore; /** * History of the Schema's resources. * * @param {string} id - The ID of the resource. * @param {Truvity.SchemaHistoryRequest} request * @param {Schemas.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.schemas.schemaHistory("id") */ schemaHistory(id: string, request?: Truvity.SchemaHistoryRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaHistory; /** * Read the specific version of the Schema's resource. * * @param {string} id - The ID of the resource. * @param {number} revision - The revision of the resource. * @param {Truvity.SchemaRevisionRequest} request * @param {Schemas.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.schemas.schemaRevision("id", 1) */ schemaRevision(id: string, revision: number, request?: Truvity.SchemaRevisionRequest, requestOptions?: Schemas.RequestOptions): core.HttpResponsePromise; private __schemaRevision; protected _getCustomAuthorizationHeaders(): Promise<{ 'X-API-KEY': string | undefined; }>; } //# sourceMappingURL=Client.d.ts.map