export interface TemplateSettings { /** * Auto generated ID. * @readonly */ id?: string | null; /** Wix app definition ID. */ appSlug?: string | null; /** The type of the template. */ templateType?: string | null; /** The id of the template. */ templateId?: string | null; /** * Template settings external ID. For example ticket definition ID. * Must be unique per tenant where tenant is taken from authorization (wix_app_id + meta_site_id) */ externalId?: string | null; /** * Date settings were created. * @readonly */ createdDate?: Date; /** * Date settings were updated. * @readonly */ updatedDate?: Date; settingGroups?: SettingsGroup[]; /** Paper size */ paperSize?: PaperSize; } export interface TextSetting { /** Font family class name */ fontFamily?: string | null; /** Font style class names */ fontStyle?: string[]; /** Text alignment class name */ textAlignment?: string | null; /** Text color hex code */ textColor?: string | null; /** Font size */ fontSize?: number | null; /** Text content setting */ textContent?: TextContent[]; } export interface TextContent { id?: string; value?: string | null; visible?: boolean; } export interface ImageSetting { /** Wix media Image */ image?: Image; /** Image resizing mode */ resize?: ResizeOption; } export interface Image { /** WixMedia image ID. */ id?: string; /** Image URL. */ url?: string; /** * Original image height. * @readonly */ height?: number; /** * Original image width. * @readonly */ width?: number; /** Image alt text. */ altText?: string | null; /** * Image filename. * @readonly */ filename?: string | null; } export declare enum ResizeOption { /** Automatically resizes full image to fit image field */ FIT = "FIT", /** Enables user to manually crop image to fit image field */ CROP = "CROP" } export interface SelectSetting { /** Selected value */ value?: string | null; /** Color hex code */ primaryColor?: string | null; /** Color hex code */ secondaryColor?: string | null; /** Size */ size?: number | null; } export interface BackgroundSetting { /** Color of the background hex code */ color?: string | null; /** Wix media Image */ image?: Image; } export interface SettingsGroup { /** Id of the control group */ groupId?: string; /** Display settings. */ display?: Record; /** Texts settings. */ texts?: Record; /** Images settings. */ images?: Record; /** Select option settings. */ selects?: Record; /** Backgrounds settings. */ backgrounds?: Record; } export declare enum PaperSize { A4_PORTRAIT = "A4_PORTRAIT", A4_LANDSCAPE = "A4_LANDSCAPE" } export interface CreateTemplateSettingsRequest { /** Settings to be created. */ settings?: TemplateSettings; } export interface CreateTemplateSettingsResponse { /** Created settings. */ settings?: TemplateSettings; } export interface BulkCreateTemplateSettingsRequest { /** Settings to be created. */ settings?: TemplateSettings[]; } export interface BulkCreateTemplateSettingsResponse { /** Created settings */ settings?: TemplateSettings[]; } export interface UpsertTemplateSettingsRequest { /** Settings to be upserted. */ settings?: TemplateSettings; } export interface UpsertTemplateSettingsResponse { /** Upserted settings. */ settings?: TemplateSettings; } export interface GetTemplateSettingsRequest { /** Settings ID. */ templateSettingsId?: string; } export interface GetTemplateSettingsResponse { /** Retrieved settings. */ settings?: TemplateSettings; } export interface UpdateTemplateSettingsRequest { /** Template Settings to be updated. */ settings?: TemplateSettings; } export interface UpdateTemplateSettingsResponse { /** Updated settings. */ settings?: TemplateSettings; } export interface DeleteTemplateSettingsRequest { /** Settings ID. */ templateSettingsId?: string; } export interface DeleteTemplateSettingsResponse { /** Deleted settings. */ settings?: TemplateSettings; } export interface QueryTemplateSettingsRequest { /** Generic query object. */ query: QueryV2; } export interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ export interface QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } export interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } 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 CursorPaging { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } export interface QueryTemplateSettingsResponse { /** Template settings results. */ settings?: TemplateSettings[]; /** Query result's metadata. */ metadata?: PagingMetadataV2; } export interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } export interface Cursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } export interface ResolveTemplateSettingsRequest { /** The id of the settings. */ templateSettingsId?: string | null; /** External ID. */ templateSettingsExternalId?: string | null; /** The type of the template. Used to resolve default settings. */ templateType: string | null; /** Wix app slug. */ appSlug: string | null; /** The id of template. */ templateId?: string | null; } export interface ResolveTemplateSettingsResponse { /** Retrieved settings. */ settings?: TemplateSettings; } export interface GetTemplateControlsRequest { } export interface GetTemplateControlsResponse { templateControls?: TemplateControls; } export interface TemplateControls { /** The name of the template */ templateName?: string; /** The controls groups configuration */ controlGroups?: ControlGroup[]; } /** Represents control groups on the left side of the UI */ export interface ControlGroup { groupId?: string; icon?: string; labelKey?: string; titleKey?: string; descriptionKey?: string; linkKey?: string | null; linkUrl?: string | null; tooltipKey?: string | null; /** Display controls */ display?: DisplayControl[]; /** Text controls */ texts?: TextControl[]; /** Image controls */ images?: ImageControl[]; /** Select controls */ selects?: SelectControl[]; /** Background controls */ backgrounds?: BackgroundControl[]; } export interface DisplayControl { /** The id of the setting */ id?: string; /** Optional label key for translations */ labelKey?: string | null; /** Default setting for this control */ default?: boolean; } export interface TextControl { /** The id of the setting */ id?: string; /** Optional label key for translations */ labelKey?: string | null; /** Default setting for this control */ default?: TextSetting; /** Text properties */ textProperties?: TextPropertyControl[]; textContent?: TextContentControl[]; } export interface TextPropertyControl { /** One of "fontFamily", "fontStyle", "fontSize", "textAlignment" */ type?: string; /** Optional label key for translations */ labelKey?: string | null; /** List of possible options. Used for "fontFamily", "fontStyle", "textAlignment" */ options?: ValueOption[]; /** Optional range of the value. Used for "fontSize" */ range?: Range; } export interface ValueOption { /** The label key for translations */ labelKey?: string; /** The value */ value?: string; } export interface Range { /** Minimum value. */ min?: number | null; /** Maximum value. */ max?: number | null; } export interface TextContentControl { id?: string; labelKey?: string | null; maxLength?: number | null; } export interface ImageControl { /** The id of the setting */ id?: string; /** Optional label key for translations */ labelKey?: string | null; /** Default setting for this control */ default?: ImageSetting; /** Optional description key for translations */ descriptionKey?: string | null; /** Enable logo builder support */ showLogoBuilder?: boolean; } export interface SelectControl { /** The id of the setting */ id?: string; /** Optional label key for translations */ labelKey?: string | null; /** Default setting for this control */ default?: SelectSetting; /** List of possible options */ options?: ValueOption[]; /** Allows to use primary colour setting from template designer */ showPrimaryColorPicker?: boolean; /** Allows to use secondary colour setting from template designer */ showSecondaryColorPicker?: boolean; /** Allows to use size setting from template designer. */ showSize?: boolean; /** Optional range of the size value. */ sizeRange?: Range; } export interface BackgroundControl { /** The id of the setting */ id?: string; /** Optional label key for translations */ labelKey?: string | null; /** Default setting for this control */ default?: BackgroundSetting; /** Allows to use colour setting from template designer */ showColorPicker?: boolean; /** Allows to use image setting from template designer */ showImagePicker?: boolean; /** Enables background opacity control */ opacityEnabled?: boolean | null; /** Enables background image opacity control */ imageOpacityEnabled?: boolean | null; /** Default media manager folder with background images */ mediaRootFolder?: string | null; } export interface GetTemplateRegistryRequest { } export interface GetTemplateRegistryResponse { templateRegistry?: TemplateRegistry; } export interface TemplateRegistry { /** Templates. */ templates?: WixAppTemplate[]; } /** Defines a template and it's styles. */ export interface WixAppTemplate { /** Wix App Id */ wixAppId?: string; /** App Slug */ appSlug?: string; /** Template type. */ templateType?: string; /** Templates */ templates?: TemplateStyle[]; } /** * Defines a template style. * * Path to TemplateControls json file: * papyrus-templates-lib/ * src/ * templates/ * {app_slug}/ * {template_type}/ * {id}/ * controls.json */ export interface TemplateStyle { /** The id of the template. */ id?: string; /** * Determines which template should be used if user did not choose it yet. * Only single template per wix_app_id can be default. */ default?: boolean; /** Determines if template cannot be selected for a new entity. */ inactive?: boolean; /** Paper size */ paperSize?: PaperSize; } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } export interface RestoreInfo { deletedDate?: Date; } export interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntityAsJson?: string | null; } export interface ActionEvent { bodyAsJson?: string; } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface SettingsGroupNonNullableFields { groupId: string; } interface TemplateSettingsNonNullableFields { settingGroups: SettingsGroupNonNullableFields[]; paperSize: PaperSize; } export interface UpsertTemplateSettingsResponseNonNullableFields { settings?: TemplateSettingsNonNullableFields; } export interface QueryTemplateSettingsResponseNonNullableFields { settings: TemplateSettingsNonNullableFields[]; } export interface ResolveTemplateSettingsResponseNonNullableFields { settings?: TemplateSettingsNonNullableFields; } export {};