{"version":3,"sources":["../../src/bookings-display-settings-v1-bookings-display-settings-display-settings.universal.ts","../../src/bookings-display-settings-v1-bookings-display-settings-display-settings.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n  renameKeysFromSDKRequestToRESTRequest,\n  renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixBookingsDisplaySettingsV1BookingsDisplaySettings from './bookings-display-settings-v1-bookings-display-settings-display-settings.http.js';\n\n/**\n * Bookings display settings — one row per (site × app × widget type).\n * Owned by Bookings.\n *\n * Shared/common settings for Wix-curated widgets live in typed proto fields\n * (widget_settings). App-specific settings (and all third-party widget settings)\n * live under extended_fields, each app registering its own JSON Schema in Dev\n * Center against this entity's FQDN.\n */\nexport interface BookingsDisplaySettings\n  extends BookingsDisplaySettingsWidgetSettingsOneOf {\n  sidePanelView?: SidePanelView;\n  /**\n   * The BookingsDisplaySettings id. Opaque and server-assigned (derived deterministically\n   * from the natural key app_id + widget_type [+ custom_widget_key]); clients treat it as\n   * opaque and address rows by the natural key, never by id.\n   * A default row that has never been saved carries no `id`.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Revision number, server-assigned, which increments by 1 each time the row is\n   * updated. Read-only: clients never set it (Upsert ignores any supplied value).\n   * A never-saved row returned by GetBookingsDisplaySettingsByWidget (synthesised\n   * defaults) has no `revision`.\n   * @readonly\n   */\n  revision?: string | null;\n  /**\n   * Date and time the row was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the row was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * ID of the app this settings row belongs to. Client-supplied; part of the\n   * composite key. (The site is implicit via SDL tenancy.)\n   * Required-ness enforced at the Upsert method level.\n   * @format GUID\n   */\n  appId?: string;\n  /**\n   * Widget type. Client-supplied; part of the composite key.\n   * Wix-curated widgets use a typed enum value (e.g. SIDE_PANEL_VIEW).\n   * Third-party widgets use CUSTOM + custom_widget_key.\n   */\n  widgetType?: WidgetTypeWithLiterals;\n  /**\n   * Third-party widget identifier. Required only when `widget_type` is\n   * `CUSTOM`; otherwise leave it empty. Together with `app_id` it\n   * identifies a third-party widget's settings row.\n   * @maxLength 90\n   */\n  customWidgetKey?: string;\n  /**\n   * Custom field data for the `BookingsDisplaySettings` row.\n   * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)\n   * must be configured in the app dashboard before they can be accessed with API calls.\n   */\n  extendedFields?: ExtendedFields;\n}\n\n/** @oneof */\nexport interface BookingsDisplaySettingsWidgetSettingsOneOf {\n  sidePanelView?: SidePanelView;\n}\n\n/** Identifies the widget a BookingsDisplaySettings row applies to. */\nexport enum WidgetType {\n  SIDE_PANEL_VIEW = 'SIDE_PANEL_VIEW',\n  /** Third-party widget; identifier carried in custom_widget_key. */\n  CUSTOM = 'CUSTOM',\n}\n\n/** @enumType */\nexport type WidgetTypeWithLiterals = WidgetType | 'SIDE_PANEL_VIEW' | 'CUSTOM';\n\n/**\n * Display settings for the side panel's **view** mode — the read-only panel shown for a\n * booked item (an appointment or class session, or a course), openable from the calendar\n * and other surfaces. These settings govern the view mode only; the panel's edit mode is\n * unaffected. All sections are typed fields on the entity. Apps can still attach their own\n * custom fields via Data Extensions (`extended_fields`).\n */\nexport interface SidePanelView {\n  /** Notes section. */\n  notes?: NotesSection;\n  /** Price section. */\n  price?: PriceSection;\n  /** Location section. */\n  location?: LocationSection;\n  /** Assigned staff member section. */\n  assignedStaffMember?: AssignedStaffMemberSection;\n  /** Requested staff member method section. */\n  requestedStaffMemberMethod?: RequestedStaffMemberMethodSection;\n  /** Resources section. */\n  resources?: ResourcesSection;\n  /** Add-ons section. */\n  addOns?: AddOnsSection;\n}\n\nexport interface NotesSection {\n  /**\n   * Whether the notes section is visible. Defaults to `true` when not set.\n   * On Upsert, omit to leave the stored value unchanged.\n   */\n  visible?: boolean | null;\n  /** How the notes content is rendered. Defaults to `TOOLTIP` when not set. */\n  displayMode?: NotesDisplayModeWithLiterals;\n}\n\nexport enum NotesDisplayMode {\n  TOOLTIP = 'TOOLTIP',\n  INLINE = 'INLINE',\n}\n\n/** @enumType */\nexport type NotesDisplayModeWithLiterals =\n  | NotesDisplayMode\n  | 'TOOLTIP'\n  | 'INLINE';\n\nexport interface PriceSection {\n  /**\n   * Whether the price section is visible. Defaults to `true` when not set.\n   * On Upsert, omit to leave the stored value unchanged.\n   */\n  visible?: boolean | null;\n}\n\nexport interface LocationSection {\n  /**\n   * Whether the location section is visible. Defaults to `true` when not set.\n   * On Upsert, omit to leave the stored value unchanged.\n   */\n  visible?: boolean | null;\n}\n\nexport interface AssignedStaffMemberSection {\n  /**\n   * Whether the assigned-staff-member section is visible. Defaults to `true` when not set.\n   * On Upsert, omit to leave the stored value unchanged.\n   */\n  visible?: boolean | null;\n}\n\n/**\n * How the staff member for a booking was requested — for example, a specific\n * member the customer chose, or automatic assignment when the customer had no\n * preference. This section shows that information in the side panel.\n */\nexport interface RequestedStaffMemberMethodSection {\n  /**\n   * Whether the requested-staff-member-method section is visible. Defaults to `true` when not set.\n   * On Upsert, omit to leave the stored value unchanged.\n   */\n  visible?: boolean | null;\n}\n\n/**\n * Resources (such as rooms or equipment) assigned to the booking. This section\n * shows those resources in the side panel.\n */\nexport interface ResourcesSection {\n  /**\n   * Whether the resources section is visible. Defaults to `true` when not set.\n   * On Upsert, omit to leave the stored value unchanged.\n   */\n  visible?: boolean | null;\n}\n\n/**\n * Optional add-ons (extra services or items) attached to the booking. This\n * section shows those add-ons in the side panel.\n */\nexport interface AddOnsSection {\n  /**\n   * Whether the add-ons section is visible. Defaults to `true` when not set.\n   * On Upsert, omit to leave the stored value unchanged.\n   */\n  visible?: boolean | null;\n}\n\nexport interface ExtendedFields {\n  /**\n   * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n   * The value of each key is structured according to the schema defined when the extended fields were configured.\n   *\n   * You can only access fields for which you have the appropriate permissions.\n   *\n   * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n   */\n  namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface GetBookingsDisplaySettingsByWidgetRequest {\n  /**\n   * ID of the app whose widget settings to read. Part of the natural key.\n   * (The site is implicit via SDL tenancy.) Required (enforced at the method level).\n   * @format GUID\n   */\n  appId: string;\n  /**\n   * Widget type to read. Part of the natural key. Wix-curated widgets use a typed\n   * enum value (e.g. SIDE_PANEL_VIEW); third-party widgets use CUSTOM\n   * together with `custom_widget_key`. Required (enforced at the method level).\n   */\n  widgetType: WidgetTypeWithLiterals;\n  /**\n   * Third-party widget identifier. Required when `widget_type` is CUSTOM; must be\n   * empty otherwise. Together with `app_id` it identifies a third-party widget's\n   * settings row. Passed as a query parameter (not a path segment), so it may\n   * contain any characters up to the length limit.\n   * @maxLength 90\n   */\n  customWidgetKey?: string;\n}\n\nexport interface GetBookingsDisplaySettingsByWidgetResponse {\n  /**\n   * The widget's settings row, with defaults backfilled per field. Never empty:\n   * a synthesised, fully defaulted row (with no `revision`) is returned when\n   * nothing has been saved for the widget.\n   */\n  bookingsDisplaySettings?: BookingsDisplaySettings;\n}\n\nexport interface UpsertBookingsDisplaySettingsRequest {\n  /**\n   * Entity payload. Required: `app_id`, `widget_type` (+ `custom_widget_key`\n   * when `widget_type = CUSTOM`), and at least one of `widget_settings` /\n   * `extended_fields`. `revision` is server-assigned and read-only; any value\n   * set here is ignored.\n   */\n  bookingsDisplaySettings: BookingsDisplaySettings;\n}\n\nexport interface UpsertBookingsDisplaySettingsResponse {\n  /** The entity row after the write, defaults backfilled. revision >= 1. */\n  bookingsDisplaySettings?: BookingsDisplaySettings;\n}\n\nexport interface DeleteBookingsDisplaySettingsRequest {\n  /**\n   * ID of the BookingsDisplaySettings row to delete. Obtain it from a previous\n   * UpsertBookingsDisplaySettings response, or from a\n   * GetBookingsDisplaySettingsByWidget response for a saved row (a synthesised\n   * default row carries no `id`).\n   * @format GUID\n   */\n  bookingsDisplaySettingsId: string;\n}\n\nexport interface DeleteBookingsDisplaySettingsResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n  /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n  _id?: string;\n  /**\n   * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n   * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n   */\n  entityFqdn?: string;\n  /**\n   * Event action name, placed at the top level to make it easier for users to dispatch messages.\n   * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n   */\n  slug?: string;\n  /** ID of the entity associated with the event. */\n  entityId?: string;\n  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n  eventTime?: Date | null;\n  /**\n   * Whether the event was triggered as a result of a privacy regulation application\n   * (for example, GDPR).\n   */\n  triggeredByAnonymizeRequest?: boolean | null;\n  /** If present, indicates the action that triggered the event. */\n  originatedFrom?: string | null;\n  /**\n   * 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.\n   * 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.\n   */\n  entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n  createdEvent?: EntityCreatedEvent;\n  updatedEvent?: EntityUpdatedEvent;\n  deletedEvent?: EntityDeletedEvent;\n  actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n  entity?: string;\n}\n\nexport interface RestoreInfo {\n  deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n  /**\n   * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n   * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n   * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n   */\n  currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n  /** Entity that was deleted. */\n  deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n  body?: string;\n}\n\nexport interface MessageEnvelope {\n  /**\n   * App instance ID.\n   * @format GUID\n   */\n  instanceId?: string | null;\n  /**\n   * Event type.\n   * @maxLength 150\n   */\n  eventType?: string;\n  /** The identification type and identity data. */\n  identity?: IdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n  /** @readonly */\n  identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * ID of a site visitor that has not logged in to the site.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * ID of a site visitor that has logged in to the site.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of a Wix user (site owner, contributor, etc.).\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * ID of an app.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport enum WebhookIdentityType {\n  UNKNOWN = 'UNKNOWN',\n  ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n  MEMBER = 'MEMBER',\n  WIX_USER = 'WIX_USER',\n  APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n  | WebhookIdentityType\n  | 'UNKNOWN'\n  | 'ANONYMOUS_VISITOR'\n  | 'MEMBER'\n  | 'WIX_USER'\n  | 'APP';\n\nexport interface AccountInfo {\n  /**\n   * ID of the Wix account associated with the event.\n   * @format GUID\n   */\n  accountId?: string | null;\n  /**\n   * ID of the parent Wix account. Only included when accountId belongs to a child account.\n   * @format GUID\n   */\n  parentAccountId?: string | null;\n  /**\n   * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n   * @format GUID\n   */\n  siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type UpsertBookingsDisplaySettingsApplicationErrors = {\n  code?: 'INVALID_EXTENDED_FIELDS';\n  description?: string;\n  data?: Record<string, any>;\n};\n\n/**\n * A single-item getter addressed by the natural key (app_id + widget_type\n * [+ custom_widget_key]); annotated as the GET_ITEM CRUD flavor. The standard\n * id-path Get is intentionally not exposed — `id` is server-derived (see\n * TECH_DESIGN D5/D7).\n * @internal\n * @documentationMaturity preview\n * @requiredField identifiers\n * @requiredField identifiers.appId\n * @requiredField identifiers.widgetType\n * @permissionId bookings:display_settings:v1:bookings_display_settings:get_bookings_display_settings_by_widget\n * @applicableIdentity APP\n * @returns The widget's settings row, with defaults backfilled per field. Never empty:\n * a synthesised, fully defaulted row (with no `revision`) is returned when\n * nothing has been saved for the widget.\n * @fqn wix.bookings.display_settings.v1.BookingsDisplaySettingsService.GetBookingsDisplaySettingsByWidget\n */\nexport async function getBookingsDisplaySettingsByWidget(\n  identifiers: NonNullablePaths<\n    GetBookingsDisplaySettingsByWidgetIdentifiers,\n    `appId` | `widgetType`,\n    2\n  >,\n  options?: GetBookingsDisplaySettingsByWidgetOptions\n): Promise<\n  NonNullablePaths<\n    BookingsDisplaySettings,\n    | `sidePanelView.notes.displayMode`\n    | `appId`\n    | `widgetType`\n    | `customWidgetKey`,\n    4\n  >\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    appId: identifiers?.appId,\n    widgetType: identifiers?.widgetType,\n    customWidgetKey: options?.customWidgetKey,\n  });\n\n  const reqOpts =\n    ambassadorWixBookingsDisplaySettingsV1BookingsDisplaySettings.getBookingsDisplaySettingsByWidget(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)\n      ?.bookingsDisplaySettings!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: {\n          appId: '$[0].appId',\n          widgetType: '$[0].widgetType',\n          customWidgetKey: '$[1].customWidgetKey',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['identifiers', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface GetBookingsDisplaySettingsByWidgetIdentifiers {\n  /**\n   * ID of the app whose widget settings to read. Part of the natural key.\n   * (The site is implicit via SDL tenancy.) Required (enforced at the method level).\n   * @format GUID\n   */\n  appId: string;\n  /**\n   * Widget type to read. Part of the natural key. Wix-curated widgets use a typed\n   * enum value (e.g. SIDE_PANEL_VIEW); third-party widgets use CUSTOM\n   * together with `custom_widget_key`. Required (enforced at the method level).\n   */\n  widgetType: WidgetTypeWithLiterals;\n}\n\nexport interface GetBookingsDisplaySettingsByWidgetOptions {\n  /**\n   * Third-party widget identifier. Required when `widget_type` is CUSTOM; must be\n   * empty otherwise. Together with `app_id` it identifies a third-party widget's\n   * settings row. Passed as a query parameter (not a path segment), so it may\n   * contain any characters up to the length limit.\n   * @maxLength 90\n   */\n  customWidgetKey?: string;\n}\n\n/**\n * Atomic insert-or-update of the BookingsDisplaySettings row identified by\n * (app_id, widget_type [+ custom_widget_key for CUSTOM]); the site is implicit.\n * Single Save action on the client.\n *\n * Keyed by the natural key: if no row matches it is created, otherwise it is\n * updated in place (partial update via `field_mask`). `revision` is\n * server-assigned and read-only — Upsert does not use optimistic-concurrency\n * control (that belongs to Update / AIP-4006), so concurrent writes to the same\n * row are last-write-wins.\n *\n * `extended_fields` are validated at write time against the JSON Schema the app\n * registered for this entity in Dev Center; a payload that violates that schema\n * is rejected with `INVALID_EXTENDED_FIELDS`.\n * @internal\n * @documentationMaturity preview\n * @requiredField bookingsDisplaySettings\n * @requiredField identifiers\n * @requiredField identifiers.bookingsDisplaySettingsAppId\n * @requiredField identifiers.bookingsDisplaySettingsWidgetType\n * @permissionId bookings:display_settings:v1:bookings_display_settings:upsert_bookings_display_settings\n * @fqn wix.bookings.display_settings.v1.BookingsDisplaySettingsService.UpsertBookingsDisplaySettings\n */\nexport async function upsertBookingsDisplaySettings(\n  identifiers: NonNullablePaths<\n    UpsertBookingsDisplaySettingsIdentifiers,\n    `bookingsDisplaySettingsAppId` | `bookingsDisplaySettingsWidgetType`,\n    2\n  >,\n  bookingsDisplaySettings: UpsertBookingsDisplaySettings\n): Promise<\n  NonNullablePaths<\n    UpsertBookingsDisplaySettingsResponse,\n    | `bookingsDisplaySettings.sidePanelView.notes.displayMode`\n    | `bookingsDisplaySettings.appId`\n    | `bookingsDisplaySettings.widgetType`\n    | `bookingsDisplaySettings.customWidgetKey`,\n    5\n  > & {\n    __applicationErrorsType?: UpsertBookingsDisplaySettingsApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[2] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    bookingsDisplaySettings: {\n      ...bookingsDisplaySettings,\n      appId: identifiers?.bookingsDisplaySettingsAppId,\n      widgetType: identifiers?.bookingsDisplaySettingsWidgetType,\n    },\n  });\n\n  const reqOpts =\n    ambassadorWixBookingsDisplaySettingsV1BookingsDisplaySettings.upsertBookingsDisplaySettings(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n\n    return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: { bookingsDisplaySettings: '$[1]' },\n        explicitPathsToArguments: {\n          'bookingsDisplaySettings.appId': '$[0].bookingsDisplaySettingsAppId',\n          'bookingsDisplaySettings.widgetType':\n            '$[0].bookingsDisplaySettingsWidgetType',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['identifiers', 'bookingsDisplaySettings']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface UpsertBookingsDisplaySettings {\n  sidePanelView?: SidePanelView;\n  /**\n   * The BookingsDisplaySettings id. Opaque and server-assigned (derived deterministically\n   * from the natural key app_id + widget_type [+ custom_widget_key]); clients treat it as\n   * opaque and address rows by the natural key, never by id.\n   * A default row that has never been saved carries no `id`.\n   * @format GUID\n   * @readonly\n   */\n  _id?: string | null;\n  /**\n   * Revision number, server-assigned, which increments by 1 each time the row is\n   * updated. Read-only: clients never set it (Upsert ignores any supplied value).\n   * A never-saved row returned by GetBookingsDisplaySettingsByWidget (synthesised\n   * defaults) has no `revision`.\n   * @readonly\n   */\n  revision?: string | null;\n  /**\n   * Date and time the row was created.\n   * @readonly\n   */\n  _createdDate?: Date | null;\n  /**\n   * Date and time the row was last updated.\n   * @readonly\n   */\n  _updatedDate?: Date | null;\n  /**\n   * Third-party widget identifier. Required only when `widget_type` is\n   * `CUSTOM`; otherwise leave it empty. Together with `app_id` it\n   * identifies a third-party widget's settings row.\n   * @maxLength 90\n   */\n  customWidgetKey?: string;\n  /**\n   * Custom field data for the `BookingsDisplaySettings` row.\n   * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)\n   * must be configured in the app dashboard before they can be accessed with API calls.\n   */\n  extendedFields?: ExtendedFields;\n}\n\nexport interface UpsertBookingsDisplaySettingsIdentifiers {\n  /**\n   * ID of the app this settings row belongs to. Client-supplied; part of the\n   * composite key. (The site is implicit via SDL tenancy.)\n   * Required-ness enforced at the Upsert method level.\n   * @format GUID\n   */\n  bookingsDisplaySettingsAppId?: string;\n  /**\n   * Widget type. Client-supplied; part of the composite key.\n   * Wix-curated widgets use a typed enum value (e.g. SIDE_PANEL_VIEW).\n   * Third-party widgets use CUSTOM + custom_widget_key.\n   */\n  bookingsDisplaySettingsWidgetType?: WidgetTypeWithLiterals;\n}\n\n/**\n * Deletes the BookingsDisplaySettings row with the given ID, resetting that\n * widget to its server defaults: a subsequent GetBookingsDisplaySettingsByWidget\n * returns a freshly synthesised default row (with no `revision`).\n *\n * Use the `id` from a previous Upsert response, or from a\n * GetBookingsDisplaySettingsByWidget response for a saved row (a synthesised\n * default row carries no `id`). Idempotent: deleting a row that isn't stored is\n * a no-op success — the widget is already at its defaults.\n * @param bookingsDisplaySettingsId - ID of the BookingsDisplaySettings row to delete. Obtain it from a previous\n * UpsertBookingsDisplaySettings response, or from a\n * GetBookingsDisplaySettingsByWidget response for a saved row (a synthesised\n * default row carries no `id`).\n * @internal\n * @documentationMaturity preview\n * @requiredField bookingsDisplaySettingsId\n * @permissionId bookings:display_settings:v1:bookings_display_settings:delete_bookings_display_settings\n * @fqn wix.bookings.display_settings.v1.BookingsDisplaySettingsService.DeleteBookingsDisplaySettings\n */\nexport async function deleteBookingsDisplaySettings(\n  bookingsDisplaySettingsId: string\n): Promise<void> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[1] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    bookingsDisplaySettingsId: bookingsDisplaySettingsId,\n  });\n\n  const reqOpts =\n    ambassadorWixBookingsDisplaySettingsV1BookingsDisplaySettings.deleteBookingsDisplaySettings(\n      payload\n    );\n\n  sideEffects?.onSiteCall?.();\n  try {\n    const result = await httpClient.request(reqOpts);\n    sideEffects?.onSuccess?.(result);\n  } catch (err: any) {\n    const transformedError = sdkTransformError(\n      err,\n      {\n        spreadPathsToArguments: {},\n        explicitPathsToArguments: { bookingsDisplaySettingsId: '$[0]' },\n        singleArgumentUnchanged: false,\n      },\n      ['bookingsDisplaySettingsId']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBookingsDisplaySettingsV1BookingsDisplaySettingsServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/display-settings',\n        destPath: '',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_bookings_display-settings';\n\n/**\n * A single-item getter addressed by the natural key (app_id + widget_type\n * [+ custom_widget_key]); annotated as the GET_ITEM CRUD flavor. The standard\n * id-path Get is intentionally not exposed — `id` is server-derived (see\n * TECH_DESIGN D5/D7).\n */\nexport function getBookingsDisplaySettingsByWidget(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __getBookingsDisplaySettingsByWidget({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.bookings.display_settings.v1.bookings_display_settings',\n      method: 'GET' as any,\n      methodFqn:\n        'wix.bookings.display_settings.v1.BookingsDisplaySettingsService.GetBookingsDisplaySettingsByWidget',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixBookingsDisplaySettingsV1BookingsDisplaySettingsServiceUrl(\n        {\n          protoPath:\n            '/v1/bookings-display-settings/app/{appId}/widget-type/{widgetType}',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'bookingsDisplaySettings.createdDate' },\n              { path: 'bookingsDisplaySettings.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __getBookingsDisplaySettingsByWidget;\n}\n\n/**\n * Atomic insert-or-update of the BookingsDisplaySettings row identified by\n * (app_id, widget_type [+ custom_widget_key for CUSTOM]); the site is implicit.\n * Single Save action on the client.\n *\n * Keyed by the natural key: if no row matches it is created, otherwise it is\n * updated in place (partial update via `field_mask`). `revision` is\n * server-assigned and read-only — Upsert does not use optimistic-concurrency\n * control (that belongs to Update / AIP-4006), so concurrent writes to the same\n * row are last-write-wins.\n *\n * `extended_fields` are validated at write time against the JSON Schema the app\n * registered for this entity in Dev Center; a payload that violates that schema\n * is rejected with `INVALID_EXTENDED_FIELDS`.\n */\nexport function upsertBookingsDisplaySettings(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __upsertBookingsDisplaySettings({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFieldMaskToRESTFieldMask,\n        paths: [{ path: 'fieldMask' }],\n      },\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'bookingsDisplaySettings.createdDate' },\n          { path: 'bookingsDisplaySettings.updatedDate' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.bookings.display_settings.v1.bookings_display_settings',\n      method: 'POST' as any,\n      methodFqn:\n        'wix.bookings.display_settings.v1.BookingsDisplaySettingsService.UpsertBookingsDisplaySettings',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixBookingsDisplaySettingsV1BookingsDisplaySettingsServiceUrl(\n        {\n          protoPath:\n            '/v1/bookings-display-settings/upsert/app/{bookingsDisplaySettings.appId}/widget-type/{bookingsDisplaySettings.widgetType}',\n          data: serializedData,\n          host,\n        }\n      ),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'bookingsDisplaySettings.createdDate' },\n              { path: 'bookingsDisplaySettings.updatedDate' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __upsertBookingsDisplaySettings;\n}\n\n/**\n * Deletes the BookingsDisplaySettings row with the given ID, resetting that\n * widget to its server defaults: a subsequent GetBookingsDisplaySettingsByWidget\n * returns a freshly synthesised default row (with no `revision`).\n *\n * Use the `id` from a previous Upsert response, or from a\n * GetBookingsDisplaySettingsByWidget response for a saved row (a synthesised\n * default row carries no `id`). Idempotent: deleting a row that isn't stored is\n * a no-op success — the widget is already at its defaults.\n */\nexport function deleteBookingsDisplaySettings(\n  payload: object\n): RequestOptionsFactory<any> {\n  function __deleteBookingsDisplaySettings({ host }: any) {\n    const metadata = {\n      entityFqdn: 'wix.bookings.display_settings.v1.bookings_display_settings',\n      method: 'DELETE' as any,\n      methodFqn:\n        'wix.bookings.display_settings.v1.BookingsDisplaySettingsService.DeleteBookingsDisplaySettings',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveWixBookingsDisplaySettingsV1BookingsDisplaySettingsServiceUrl(\n        {\n          protoPath:\n            '/v1/bookings-display-settings/{bookingsDisplaySettingsId}',\n          data: payload,\n          host,\n        }\n      ),\n      params: toURLSearchParams(payload),\n    };\n\n    return metadata;\n  }\n\n  return __deleteBookingsDisplaySettings;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBA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OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,EAAE,yBAAyB,OAAO;AAAA,QAC1D,0BAA0B;AAAA,UACxB,iCAAiC;AAAA,UACjC,sCACE;AAAA,QACJ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,eAAe,yBAAyB;AAAA,IAC3C;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAiFA,eAAsBC,+BACpB,2BACe;AAEf,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAC0D;AAAA,IAC5D;AAAA,EACF;AAEF,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAAA,EACjC,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,2BAA2B,OAAO;AAAA,QAC9D,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,2BAA2B;AAAA,IAC9B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","WidgetType","NotesDisplayMode","WebhookIdentityType","getBookingsDisplaySettingsByWidget","upsertBookingsDisplaySettings","deleteBookingsDisplaySettings"]}