/** * Bookings display settings — one row per (site × app × widget type). * Owned by Bookings. * * Shared/common settings for Wix-curated widgets live in typed proto fields * (widget_settings). App-specific settings (and all third-party widget settings) * live under extended_fields, each app registering its own JSON Schema in Dev * Center against this entity's FQDN. */ interface BookingsDisplaySettings extends BookingsDisplaySettingsWidgetSettingsOneOf { sidePanelView?: SidePanelView; /** * The BookingsDisplaySettings id. Opaque and server-assigned (derived deterministically * from the natural key app_id + widget_type [+ custom_widget_key]); clients treat it as * opaque and address rows by the natural key, never by id. * A default row that has never been saved carries no `id`. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, server-assigned, which increments by 1 each time the row is * updated. Read-only: clients never set it (Upsert ignores any supplied value). * A never-saved row returned by GetBookingsDisplaySettingsByWidget (synthesised * defaults) has no `revision`. * @readonly */ revision?: string | null; /** * Date and time the row was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the row was last updated. * @readonly */ _updatedDate?: Date | null; /** * ID of the app this settings row belongs to. Client-supplied; part of the * composite key. (The site is implicit via SDL tenancy.) * Required-ness enforced at the Upsert method level. * @format GUID */ appId?: string; /** * Widget type. Client-supplied; part of the composite key. * Wix-curated widgets use a typed enum value (e.g. SIDE_PANEL_VIEW). * Third-party widgets use CUSTOM + custom_widget_key. */ widgetType?: WidgetTypeWithLiterals; /** * Third-party widget identifier. Required only when `widget_type` is * `CUSTOM`; otherwise leave it empty. Together with `app_id` it * identifies a third-party widget's settings row. * @maxLength 90 */ customWidgetKey?: string; /** * Custom field data for the `BookingsDisplaySettings` row. * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) * must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; } /** @oneof */ interface BookingsDisplaySettingsWidgetSettingsOneOf { sidePanelView?: SidePanelView; } /** Identifies the widget a BookingsDisplaySettings row applies to. */ declare enum WidgetType { SIDE_PANEL_VIEW = "SIDE_PANEL_VIEW", /** Third-party widget; identifier carried in custom_widget_key. */ CUSTOM = "CUSTOM" } /** @enumType */ type WidgetTypeWithLiterals = WidgetType | 'SIDE_PANEL_VIEW' | 'CUSTOM'; /** * Display settings for the side panel's **view** mode — the read-only panel shown for a * booked item (an appointment or class session, or a course), openable from the calendar * and other surfaces. These settings govern the view mode only; the panel's edit mode is * unaffected. All sections are typed fields on the entity. Apps can still attach their own * custom fields via Data Extensions (`extended_fields`). */ interface SidePanelView { /** Notes section. */ notes?: NotesSection; /** Price section. */ price?: PriceSection; /** Location section. */ location?: LocationSection; /** Assigned staff member section. */ assignedStaffMember?: AssignedStaffMemberSection; /** Requested staff member method section. */ requestedStaffMemberMethod?: RequestedStaffMemberMethodSection; /** Resources section. */ resources?: ResourcesSection; /** Add-ons section. */ addOns?: AddOnsSection; } interface NotesSection { /** * Whether the notes section is visible. Defaults to `true` when not set. * On Upsert, omit to leave the stored value unchanged. */ visible?: boolean | null; /** How the notes content is rendered. Defaults to `TOOLTIP` when not set. */ displayMode?: NotesDisplayModeWithLiterals; } declare enum NotesDisplayMode { TOOLTIP = "TOOLTIP", INLINE = "INLINE" } /** @enumType */ type NotesDisplayModeWithLiterals = NotesDisplayMode | 'TOOLTIP' | 'INLINE'; interface PriceSection { /** * Whether the price section is visible. Defaults to `true` when not set. * On Upsert, omit to leave the stored value unchanged. */ visible?: boolean | null; } interface LocationSection { /** * Whether the location section is visible. Defaults to `true` when not set. * On Upsert, omit to leave the stored value unchanged. */ visible?: boolean | null; } interface AssignedStaffMemberSection { /** * Whether the assigned-staff-member section is visible. Defaults to `true` when not set. * On Upsert, omit to leave the stored value unchanged. */ visible?: boolean | null; } /** * How the staff member for a booking was requested — for example, a specific * member the customer chose, or automatic assignment when the customer had no * preference. This section shows that information in the side panel. */ interface RequestedStaffMemberMethodSection { /** * Whether the requested-staff-member-method section is visible. Defaults to `true` when not set. * On Upsert, omit to leave the stored value unchanged. */ visible?: boolean | null; } /** * Resources (such as rooms or equipment) assigned to the booking. This section * shows those resources in the side panel. */ interface ResourcesSection { /** * Whether the resources section is visible. Defaults to `true` when not set. * On Upsert, omit to leave the stored value unchanged. */ visible?: boolean | null; } /** * Optional add-ons (extra services or items) attached to the booking. This * section shows those add-ons in the side panel. */ interface AddOnsSection { /** * Whether the add-ons section is visible. Defaults to `true` when not set. * On Upsert, omit to leave the stored value unchanged. */ visible?: boolean | null; } interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface GetBookingsDisplaySettingsByWidgetRequest { /** * ID of the app whose widget settings to read. Part of the natural key. * (The site is implicit via SDL tenancy.) Required (enforced at the method level). * @format GUID */ appId: string; /** * Widget type to read. Part of the natural key. Wix-curated widgets use a typed * enum value (e.g. SIDE_PANEL_VIEW); third-party widgets use CUSTOM * together with `custom_widget_key`. Required (enforced at the method level). */ widgetType: WidgetTypeWithLiterals; /** * Third-party widget identifier. Required when `widget_type` is CUSTOM; must be * empty otherwise. Together with `app_id` it identifies a third-party widget's * settings row. Passed as a query parameter (not a path segment), so it may * contain any characters up to the length limit. * @maxLength 90 */ customWidgetKey?: string; } interface GetBookingsDisplaySettingsByWidgetResponse { /** * The widget's settings row, with defaults backfilled per field. Never empty: * a synthesised, fully defaulted row (with no `revision`) is returned when * nothing has been saved for the widget. */ bookingsDisplaySettings?: BookingsDisplaySettings; } interface UpsertBookingsDisplaySettingsRequest { /** * Entity payload. Required: `app_id`, `widget_type` (+ `custom_widget_key` * when `widget_type = CUSTOM`), and at least one of `widget_settings` / * `extended_fields`. `revision` is server-assigned and read-only; any value * set here is ignored. */ bookingsDisplaySettings: BookingsDisplaySettings; } interface UpsertBookingsDisplaySettingsResponse { /** The entity row after the write, defaults backfilled. revision >= 1. */ bookingsDisplaySettings?: BookingsDisplaySettings; } interface DeleteBookingsDisplaySettingsRequest { /** * ID of the BookingsDisplaySettings row to delete. Obtain it from a previous * UpsertBookingsDisplaySettings response, or from a * GetBookingsDisplaySettingsByWidget response for a saved row (a synthesised * default row carries no `id`). * @format GUID */ bookingsDisplaySettingsId: string; } interface DeleteBookingsDisplaySettingsResponse { } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ _id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For 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 | null; /** * 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 that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entity?: string; } interface RestoreInfo { deletedDate?: Date | null; } 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. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type UpsertBookingsDisplaySettingsApplicationErrors = { code?: 'INVALID_EXTENDED_FIELDS'; description?: string; data?: Record; }; interface GetBookingsDisplaySettingsByWidgetIdentifiers { /** * ID of the app whose widget settings to read. Part of the natural key. * (The site is implicit via SDL tenancy.) Required (enforced at the method level). * @format GUID */ appId: string; /** * Widget type to read. Part of the natural key. Wix-curated widgets use a typed * enum value (e.g. SIDE_PANEL_VIEW); third-party widgets use CUSTOM * together with `custom_widget_key`. Required (enforced at the method level). */ widgetType: WidgetTypeWithLiterals; } interface GetBookingsDisplaySettingsByWidgetOptions { /** * Third-party widget identifier. Required when `widget_type` is CUSTOM; must be * empty otherwise. Together with `app_id` it identifies a third-party widget's * settings row. Passed as a query parameter (not a path segment), so it may * contain any characters up to the length limit. * @maxLength 90 */ customWidgetKey?: string; } interface UpsertBookingsDisplaySettings { sidePanelView?: SidePanelView; /** * The BookingsDisplaySettings id. Opaque and server-assigned (derived deterministically * from the natural key app_id + widget_type [+ custom_widget_key]); clients treat it as * opaque and address rows by the natural key, never by id. * A default row that has never been saved carries no `id`. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, server-assigned, which increments by 1 each time the row is * updated. Read-only: clients never set it (Upsert ignores any supplied value). * A never-saved row returned by GetBookingsDisplaySettingsByWidget (synthesised * defaults) has no `revision`. * @readonly */ revision?: string | null; /** * Date and time the row was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the row was last updated. * @readonly */ _updatedDate?: Date | null; /** * Third-party widget identifier. Required only when `widget_type` is * `CUSTOM`; otherwise leave it empty. Together with `app_id` it * identifies a third-party widget's settings row. * @maxLength 90 */ customWidgetKey?: string; /** * Custom field data for the `BookingsDisplaySettings` row. * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) * must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; } interface UpsertBookingsDisplaySettingsIdentifiers { /** * ID of the app this settings row belongs to. Client-supplied; part of the * composite key. (The site is implicit via SDL tenancy.) * Required-ness enforced at the Upsert method level. * @format GUID */ bookingsDisplaySettingsAppId?: string; /** * Widget type. Client-supplied; part of the composite key. * Wix-curated widgets use a typed enum value (e.g. SIDE_PANEL_VIEW). * Third-party widgets use CUSTOM + custom_widget_key. */ bookingsDisplaySettingsWidgetType?: WidgetTypeWithLiterals; } export { type AccountInfo, type ActionEvent, type AddOnsSection, type AssignedStaffMemberSection, type BookingsDisplaySettings, type BookingsDisplaySettingsWidgetSettingsOneOf, type DeleteBookingsDisplaySettingsRequest, type DeleteBookingsDisplaySettingsResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type GetBookingsDisplaySettingsByWidgetIdentifiers, type GetBookingsDisplaySettingsByWidgetOptions, type GetBookingsDisplaySettingsByWidgetRequest, type GetBookingsDisplaySettingsByWidgetResponse, type IdentificationData, type IdentificationDataIdOneOf, type LocationSection, type MessageEnvelope, NotesDisplayMode, type NotesDisplayModeWithLiterals, type NotesSection, type PriceSection, type RequestedStaffMemberMethodSection, type ResourcesSection, type RestoreInfo, type SidePanelView, type UpsertBookingsDisplaySettings, type UpsertBookingsDisplaySettingsApplicationErrors, type UpsertBookingsDisplaySettingsIdentifiers, type UpsertBookingsDisplaySettingsRequest, type UpsertBookingsDisplaySettingsResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WidgetType, type WidgetTypeWithLiterals };