export interface Schema { /** Schema ID. */ id?: string; /** Schema key. */ key?: SchemaKey; /** Schema Data. */ body?: SchemaBody; /** Higher level schema, group_by_name will point to an entity of this schema. */ referencedSchemaKey?: SchemaKey; /** The name of the schema */ schemaName?: string | null; } export interface SchemaKey { /** ID of app that created the schema. */ appId?: string; /** Unique name defined by the creator app, used to distinguish between different entities in the the app domain. */ entityType?: string; /** Scope schema is defined in (Global/Site) */ scope?: SchemaScope; } export declare enum SchemaScope { /** Global schema, relevant to all sites */ GLOBAL = "GLOBAL", /** Site schema, relevant to specific site only */ SITE = "SITE" } export interface SchemaBody { /** Groupings of meaningful content categories. Optional. */ groups?: SchemaFieldsGroup[]; /** Fields that will be displayed in content previews (e.g., product name for products). */ previewFields?: PreviewFields; /** Whether the schema is hidden from the site. */ hidden?: boolean; /** Translation strategy for the schema */ translationStrategy?: TranslationStrategy; } export interface SchemaFieldsGroup { /** Group descriptive name. */ displayName?: string; /** Group fields that contain the actual meta data */ fields?: SchemaField[]; } export interface SchemaField { /** Field ID. */ id?: string; /** Field descriptive name. */ displayName?: string; /** Field type. */ type?: FieldType; /** Field minimum length (in case of text field) */ minLength?: number | null; /** Field maximum length (in case text field) */ maxLength?: number | null; /** Field format. If set - must be one of the values of wix.api.format as string (case insensitive) */ format?: string | null; /** In case field is accessible in schema via sequences, this array represents the name of the sequences by their order */ sequencePath?: string[]; /** Whether the field is hidden from the site. Hidden field constraints (type, min/max length) are still active! */ hidden?: boolean; /** Whether the field is for display only and should not allowed to be translated */ displayOnly?: boolean; } export declare enum FieldType { /** Undefined field type */ UNDEFINED_TYPE = "UNDEFINED_TYPE", /** Short text TEXT */ SHORT_TEXT = "SHORT_TEXT", /** Long Plain Text TEXT */ LONG_TEXT = "LONG_TEXT", /** Long text including styles, images, links and more... HTML */ RICH_TEXT = "RICH_TEXT", /** Wix Rich-Content-Editor format RICO */ RICH_CONTENT_EDITOR = "RICH_CONTENT_EDITOR", /** Choose one from many options CSV TEXT */ SELECTION = "SELECTION", /** Choose multi items from many options */ MULTI_SELECTION = "MULTI_SELECTION", /** Wix document media item */ DOCUMENT = "DOCUMENT", /** Wix Image media item */ IMAGE = "IMAGE", /** Wix Video media item */ VIDEO = "VIDEO", /** Image URL without metadata */ IMAGE_LINK = "IMAGE_LINK", /** contain an XML representation of an entity or part of it */ XML = "XML" } export interface PreviewFields { /** ID of field representing the schema's title. */ titleFieldId?: string | null; /** ID of field representing the schema's image. */ imageFieldId?: string | null; /** ID of field representing the schema's video. */ videoFieldId?: string | null; } export declare enum TranslationStrategy { /** Standard translation strategy */ STANDARD = "STANDARD", /** Compound entity translation strategy */ COMPOUND = "COMPOUND" } export interface CreateOrUpdateContentSchemaByKeyRequest { /** Schema to add/update. */ schema?: SchemaByKey; } export interface SchemaByKey { /** Schema key. */ key?: SchemaKey; /** Schema data. */ body?: SchemaBody; /** Higher level schema, group_by_name will point to an entity of this schema. */ referencedSchemaKey?: SchemaKey; /** The name of the schema */ schemaName?: string | null; } export interface CreateOrUpdateContentSchemaResponse { /** Created/updated schema. */ schema?: Schema; } export interface UpdateContentSchemaRequest { /** Schema to add/update. */ schema?: SchemaById; } export interface SchemaById { /** Schema ID. */ id?: string; /** Schema data. */ body?: SchemaBody; /** Higher level schema, group_by_name will point to an entity of this schema. */ referencedSchemaKey?: SchemaKey; /** The name of the schema */ schemaName?: string | null; } export interface ListContentSchemasRequest { /** Filter object */ filter?: SchemaFilter; /** Paging options. */ paging?: Paging; } export interface SchemaFilter { /** Schema IDs. */ schemaIds?: string[]; /** App ID. */ appId?: string | null; /** Entity types */ entityType?: string | null; /** Search for schemas that are applicable to all sites or for this specific site. */ scope?: SchemaScope; } export interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } export interface ListContentSchemasResponse { /** Schemas that meet the request conditions. */ schemas?: Schema[]; } export interface GetSiteContentSchemasRequest { } export interface GetSiteContentSchemasResponse { /** Schemas that have content. */ schemas?: Schema[]; } export interface RemoveContentSchemaRequest { /** Schema ID to delete. */ schemaId?: string; } export interface RemoveContentSchemaResponse { } export interface RemoveContentSchemaByKeyRequest { /** Schema key to delete. */ schemaKey?: SchemaKey; } interface SchemaKeyNonNullableFields { appId: string; entityType: string; scope: SchemaScope; } interface SchemaFieldNonNullableFields { id: string; displayName: string; type: FieldType; sequencePath: string[]; hidden: boolean; displayOnly: boolean; } interface SchemaFieldsGroupNonNullableFields { displayName: string; fields: SchemaFieldNonNullableFields[]; } interface SchemaBodyNonNullableFields { groups: SchemaFieldsGroupNonNullableFields[]; hidden: boolean; translationStrategy: TranslationStrategy; } interface SchemaNonNullableFields { id: string; key?: SchemaKeyNonNullableFields; body?: SchemaBodyNonNullableFields; referencedSchemaKey?: SchemaKeyNonNullableFields; } export interface ListContentSchemasResponseNonNullableFields { schemas: SchemaNonNullableFields[]; } export interface GetSiteContentSchemasResponseNonNullableFields { schemas: SchemaNonNullableFields[]; } export {};