import type { SchemaObject } from '../models/SchemaObject'; import type { SchemaResponse } from '../models/SchemaResponse'; import type { SchemasResponse } from '../models/SchemasResponse'; import type { SchemaVersion } from '../models/SchemaVersion'; import type { SchemaVersionResponse } from '../models/SchemaVersionResponse'; import type { SchemaVersionsResponse } from '../models/SchemaVersionsResponse'; import type { StateChangeRequestResponse } from '../models/StateChangeRequestResponse'; import type { VersionedObjectStateChangeRequest } from '../models/VersionedObjectStateChangeRequest'; import type { CancelablePromise } from '../core/CancelablePromise'; export declare class SchemasService { /** * Get a list of schemas * Use this API to get a list of schemas that match the given parameters.

Token Permissions: [ `event_designer:access` ] * @returns SchemasResponse Get a list of schemas and the accompanying metadata. * @throws ApiError */ static getSchemas({ xContextId, pageSize, pageNumber, name, shared, applicationDomainId, schemaType, applicationDomainIds, ids, sort, customAttributes, }: { /** Optional context id the request is running. **/ xContextId?: string; /** The number of schemas to get per page. **/ pageSize?: number; /** The page number to get. **/ pageNumber?: number; /** Name of the schema to match on. **/ name?: string; /** Match only with shared or unshared schemas. **/ shared?: boolean; /** Match only schemas in the given application domain. **/ applicationDomainId?: string; /** Match only schemas with the given schema type **/ schemaType?: string; /** Match only schemas in the given application domain ids. **/ applicationDomainIds?: Array; /** Match only schemas with the given IDs separated by commas. **/ ids?: Array; /** Sort based on the provided parameters.
The value can be either a standalone field name (`?sort=`) or a field and direction, delimited by a colon (`?sort=:`). If the direction is not specified, the default is ascending. **/ sort?: string; /** Returns the entities that match the custom attribute filter.
To filter by custom attribute name and value, use the format: `customAttributes===`.
To filter by custom attribute name, use the format: `customAttributes=`.
The filter supports the `AND` operator for multiple custom attribute definitions (not multiple values for a given definition). Use `;` (`semicolon`) to separate multiple queries with `AND` operation.
Note: the filter supports custom attribute values containing only the characters `[a-zA-Z0-9_\-\. ]`. **/ customAttributes?: string; }): CancelablePromise; /** * Create a schema * To model your event-driven architecture, schemas are a fundamental building block for modelling the payloads of the events flowing through your system. Use this API to create schemas that can later be referenced by events.

Token Permissions: [ `schema:create:*` ] * @returns SchemaResponse Created a schema. The newly saved schema is returned in the response body. * @throws ApiError */ static createSchema({ requestBody, xContextId, }: { /** The schema requires a name, an application domain, a schema type and a content type. **/ requestBody: SchemaObject; /** Optional context id the request is running. **/ xContextId?: string; }): CancelablePromise; /** * Get a schema * Use this API to get a single schema by its ID.

Token Permissions: [ `schema:get:*` ] * @returns SchemaResponse The schema. * @throws ApiError */ static getSchema({ id, xContextId, }: { /** The ID of the schema. **/ id: string; /** Optional context id the request is running. **/ xContextId?: string; }): CancelablePromise; /** * Delete a schema * Use this API to delete a schema. The schema must not be in use by any events else it cannot be deleted.

Token Permissions: [ `schema:delete:*` ] * @returns void * @throws ApiError */ static deleteSchema({ id, xContextId, }: { /** The ID of the schema. **/ id: string; /** Optional context id the request is running. **/ xContextId?: string; }): CancelablePromise; /** * Update a schema * Update a schema.

Token Permissions: [ `schema:update:*` ] * @returns SchemaResponse Updated a schema. The newly saved schema is returned in the response body. * @throws ApiError */ static updateSchema({ id, requestBody, xContextId, }: { /** The ID of the schema. **/ id: string; /** The schema requires a name, an application domain, a schema type and a content type. **/ requestBody: SchemaObject; /** Optional context id the request is running. **/ xContextId?: string; }): CancelablePromise; /** * Get a list of schema versions * Use this API to get a list of schema versions that match the given parameters.

Token Permissions: [ `event_designer:access` ] * @returns SchemaVersionsResponse Get a list of schema versions and the accompanying metadata. * @throws ApiError */ static getSchemaVersions({ xContextId, pageSize, pageNumber, schemaIds, ids, customAttributes, }: { /** Optional context id the request is running. **/ xContextId?: string; /** The number of schema versions to get per page. **/ pageSize?: number; /** The page number to get. **/ pageNumber?: number; /** Match only schema versions of these schema IDs, separated by commas. **/ schemaIds?: Array; /** Match only schema versions with the given IDs, separated by commas. **/ ids?: Array; /** Returns the entities that match the custom attribute filter.
To filter by custom attribute name and value, use the format: `customAttributes===`.
To filter by custom attribute name, use the format: `customAttributes=`.
The filter supports the `AND` operator for multiple custom attribute definitions (not multiple values for a given definition). Use `;` (`semicolon`) to separate multiple queries with `AND` operation.
Note: the filter supports custom attribute values containing only the characters `[a-zA-Z0-9_\-\. ]`. **/ customAttributes?: string; }): CancelablePromise; /** * Create a schema version * Creates a schema version

Token Permissions: [ `schema:update:*` ] * @returns SchemaVersionResponse Created a schema version. The newly saved schema version is returned in the response body. * @throws ApiError */ static createSchemaVersion({ requestBody, xContextId, }: { /** schema version details **/ requestBody: SchemaVersion; /** Optional context id the request is running. **/ xContextId?: string; }): CancelablePromise; /** * Delete a schema version * Use this API to delete a schema version.

Token Permissions: [ `schema:update:*` ] * @returns void * @throws ApiError */ static deleteSchemaVersion({ id, xContextId, }: { /** The ID of the schema version. **/ id: string; /** Optional context id the request is running. **/ xContextId?: string; }): CancelablePromise; /** * Update a schema version * Use this API to update a schema version.

Token Permissions: [ `schema:update:*` ] * @returns SchemaVersionResponse The schema version. * @throws ApiError */ static updateSchemaVersion({ id, requestBody, xContextId, }: { /** The ID of the schema version. **/ id: string; requestBody: SchemaVersion; /** Optional context id the request is running. **/ xContextId?: string; }): CancelablePromise; /** * Update the state of a schema version * Use this API to update the state of a schema version.

Token Permissions: [ `schema:update_state:*` ] * @returns StateChangeRequestResponse The updated state of the schema version. * @throws ApiError */ static updateSchemaVersionState({ id, requestBody, xContextId, }: { /** The ID of the schema version. **/ id: string; /** The state change object. **/ requestBody: VersionedObjectStateChangeRequest; /** Optional context id the request is running. **/ xContextId?: string; }): CancelablePromise; /** * Get a schema version * Use this API to get a single schema version by its ID.

Token Permissions: [ `schema:get:*` ] * @returns SchemaVersionResponse The schema version. * @throws ApiError */ static getSchemaVersion({ versionId, xContextId, }: { /** The ID of the schema version. **/ versionId: string; /** Optional context id the request is running. **/ xContextId?: string; }): CancelablePromise; }