{"version":3,"sources":["jsdelivr-header.js","/npm/@wix/auto_sdk_inbox_messages@1.0.50/index.ts","/npm/@wix/auto_sdk_inbox_messages@1.0.50/src/crm-inbox-v2-message-messages.public.ts","/npm/@wix/auto_sdk_inbox_messages@1.0.50/src/crm-inbox-v2-message-messages.universal.ts","/npm/@wix/auto_sdk_inbox_messages@1.0.50/src/crm-inbox-v2-message-messages.http.ts","/npm/@wix/auto_sdk_inbox_messages@1.0.50/src/crm-inbox-v2-message-messages.context.ts"],"names":[],"mappings":"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","file":"/npm/@wix/auto_sdk_inbox_messages@1.0.50/build/cjs/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/@wix/auto_sdk_inbox_messages@1.0.50/build/cjs/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","export * from './src/crm-inbox-v2-message-messages.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n  ListMessagesApplicationErrors,\n  ListMessagesOptions,\n  ListMessagesResponse,\n  Message,\n  MessageButtonInteractedEnvelope,\n  MessageSentToBusinessEnvelope,\n  MessageVisibilityWithLiterals,\n  SendMessageApplicationErrors,\n  SendMessageOptions,\n  SendMessageResponse,\n  listMessages as universalListMessages,\n  sendMessage as universalSendMessage,\n} from './crm-inbox-v2-message-messages.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/inbox' };\n\nexport function listMessages(httpClient: HttpClient): ListMessagesSignature {\n  return (\n    conversationId: string,\n    visibility: MessageVisibilityWithLiterals,\n    options?: ListMessagesOptions\n  ) =>\n    universalListMessages(\n      conversationId,\n      visibility,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface ListMessagesSignature {\n  /**\n   * Retrieves messages between the business and participant.\n   *\n   * Up to 30 messages are returned per request. If the number of messages in a conversation is larger than 30,\n   * `pagingMetadata.cursors` is returned in the response, indicating that another page of results is available.\n   * To retrieve the next page of messages, specify the `next` cursor value\n   * in the next request's `paging.cursor` parameter.\n   *\n   * To ensure you'll always retrieve the next record,\n   * use the same visibility and sorting\n   * in the first request and all subsequent requests.\n   *\n   * By default,\n   * 30 messages are retrieved and sorted by `sequence` in descending order\n   * (the most recent messages are first in the list).\n   * @param - ID of the conversation that contains the intended messages.\n   * @param - __Required.__\n   * Filters for messages with the specified visibility setting.\n   *\n   * - `\"BUSINESS_AND_PARTICIPANT\"`: Return messages visible to the business and the participant.\n   * - `\"BUSINESS\"`: Return all messages.\n   * @param - Additional options for listing messages.\n   */\n  (\n    conversationId: string,\n    visibility: MessageVisibilityWithLiterals,\n    options?: ListMessagesOptions\n  ): Promise<\n    NonNullablePaths<\n      ListMessagesResponse,\n      | `messages`\n      | `messages.${number}.content.template.orientation`\n      | `messages.${number}.content.minimal.text`\n      | `messages.${number}.content.system.text`\n      | `messages.${number}.sender.anonymousVisitorId`\n      | `messages.${number}.sender.memberId`\n      | `messages.${number}.sender.wixUserId`\n      | `messages.${number}.sender.appId`\n      | `messages.${number}.sourceChannel`\n      | `messages.${number}.visibility`\n      | `messages.${number}.direction`\n      | `messages.${number}.silent`\n      | `messages.${number}.edited`,\n      4\n    > & {\n      __applicationErrorsType?: ListMessagesApplicationErrors;\n    }\n  >;\n}\n\nexport function sendMessage(httpClient: HttpClient): SendMessageSignature {\n  return (\n    conversationId: string,\n    message: NonNullablePaths<Message, `content`, 0>,\n    options?: SendMessageOptions\n  ) =>\n    universalSendMessage(\n      conversationId,\n      message,\n      options,\n      // @ts-ignore\n      { httpClient }\n    );\n}\n\ninterface SendMessageSignature {\n  /**\n   * Sends a message to the business or participant.\n   *\n   * Specify the message type in `message.content`\n   * by including the appropriate object: `basic`, `template`, `minimal`, or `form`.\n   * For more information on message types\n   * and how each type renders in Inbox and the Chat widget,\n   * see [Message Types](#message-types).\n   * @param - ID of the conversation to add the message to.\n   * @param - Message to send.\n   * @param - Additional options for sending a message.\n   */\n  (\n    conversationId: string,\n    message: NonNullablePaths<Message, `content`, 0>,\n    options?: SendMessageOptions\n  ): Promise<\n    NonNullablePaths<\n      SendMessageResponse,\n      | `message.content.basic.items`\n      | `message.content.basic.items.${number}.text`\n      | `message.content.basic.items.${number}.image.url`\n      | `message.content.basic.items.${number}.image.width`\n      | `message.content.basic.items.${number}.image.height`\n      | `message.content.basic.items.${number}.file.url`\n      | `message.content.template.buttons`\n      | `message.content.template.buttons.${number}.label`\n      | `message.content.template.buttons.${number}.postbackProperties.interactionId`\n      | `message.content.template.orientation`\n      | `message.content.template.textLines`\n      | `message.content.minimal.text`\n      | `message.content.form.fields`\n      | `message.content.form.fields.${number}.name`\n      | `message.content.form.fields.${number}.value`\n      | `message.content.form.media`\n      | `message.content.system.text`\n      | `message.content.system.buttons`\n      | `message.sender.anonymousVisitorId`\n      | `message.sender.memberId`\n      | `message.sender.wixUserId`\n      | `message.sender.appId`\n      | `message.badges`\n      | `message.badges.${number}.text`\n      | `message.badges.${number}.badgeVisibility`\n      | `message.targetChannels`\n      | `message.sourceChannel`\n      | `message.visibility`\n      | `message.direction`\n      | `message.targetChannelIds`\n      | `message.silent`\n      | `message.edited`,\n      6\n    > & {\n      __applicationErrorsType?: SendMessageApplicationErrors;\n    }\n  >;\n}\n\nexport const onMessageButtonInteracted = /*#__PURE__*/ EventDefinition(\n  'wix.crm.inbox.v2.message_button_interacted',\n  true,\n  (event: MessageButtonInteractedEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [{ path: 'metadata.eventTime' }],\n        },\n      ])\n    )\n)<MessageButtonInteractedEnvelope>();\nexport const onMessageSentToBusiness = /*#__PURE__*/ EventDefinition(\n  'wix.crm.inbox.v2.message_message_sent_to_business',\n  true,\n  (event: MessageSentToBusinessEnvelope) =>\n    renameKeysFromRESTResponseToSDKResponse(\n      transformPaths(event, [\n        {\n          transformFn: transformRESTTimestampToSDKTimestamp,\n          paths: [\n            { path: 'data.message.createdDate' },\n            { path: 'data.message.editedDate' },\n            { path: 'data.message.content.basic.items.image.urlExpiration' },\n            { path: 'data.message.content.basic.items.file.urlExpiration' },\n            { path: 'data.message.content.form.media.image.urlExpiration' },\n            { path: 'data.message.content.form.media.file.urlExpiration' },\n            { path: 'metadata.eventTime' },\n          ],\n        },\n      ])\n    )\n)<MessageSentToBusinessEnvelope>();\n\nexport {\n  AccountInfo,\n  AccountInfoMetadata,\n  ActionEvent,\n  AddMessageIndicationsRequest,\n  AddMessageIndicationsResponse,\n  AddressLocation,\n  Badge,\n  BadgeVisibility,\n  BaseEventMetadata,\n  BasicMessageData,\n  BasicMessageDataDataOneOf,\n  BasicMessagePayload,\n  Button,\n  ButtonInteracted,\n  ChannelType,\n  ContentType,\n  CursorPaging,\n  Cursors,\n  CustomMessageData,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EditMessageRequest,\n  EditMessageResponse,\n  Empty,\n  EntityCreatedEvent,\n  EntityDeletedEvent,\n  EntityUpdatedEvent,\n  EventMetadata,\n  FileMessage,\n  FormField,\n  FormMessagePayload,\n  GetMessageIndicationsRequest,\n  GetMessageIndicationsResponse,\n  GetMessageRequest,\n  GetMessageResponse,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  ImageMessage,\n  IndicationType,\n  InteractionInfo,\n  ListMessagesOptions,\n  ListMessagesRequest,\n  ListMessagesResponse,\n  MediaItem,\n  MediaItemMediaOneOf,\n  Message,\n  MessageButtonInteractedEnvelope,\n  MessageContent,\n  MessageContentPayloadOneOf,\n  MessageDirection,\n  MessageEnvelope,\n  MessageIndication,\n  MessageReaction,\n  MessageReactionRemoved,\n  MessageReactionSet,\n  MessageSentToBusiness,\n  MessageSentToBusinessEnvelope,\n  MessageSentToParticipant,\n  MessageVisibility,\n  MinimalMessagePayload,\n  Orientation,\n  OverrideSenderOptions,\n  PagingMetadataV2,\n  PerformedBy,\n  PostbackProperties,\n  RemoveMessageReactionRequest,\n  RemoveMessageReactionResponse,\n  RestoreInfo,\n  RevokeMessageRequest,\n  RevokeMessageResponse,\n  SendMessageOptions,\n  SendMessageRequest,\n  SendMessageResponse,\n  SetMessageReactionRequest,\n  SetMessageReactionResponse,\n  SortOrder,\n  Sorting,\n  SystemMessagePayload,\n  TemplateMessagePayload,\n  WebhookIdentityType,\n  WebhooksIdentificationData,\n  WebhooksIdentificationDataIdOneOf,\n} from './crm-inbox-v2-message-messages.universal.js';\n","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 ambassadorWixCrmInboxV2Message from './crm-inbox-v2-message-messages.http.js';\n\nexport interface Message {\n  /**\n   * Message ID.\n   * @readonly\n   */\n  _id?: string | null;\n  /** Structured message content. */\n  content?: MessageContent;\n  /**\n   * ID of the message sender.\n   *\n   * Defaults to the caller's ID using the property that matches their identity type.\n   *\n   * You can override the default behavior when calling\n   * `sendMessage()` by using the `sendAs` field from the `options` object.\n   *\n   * @readonly\n   */\n  sender?: IdentificationData;\n  /**\n   * Optional icon and short text providing additional details about the message,\n   * such as the app from which the message was sent, or whether the message was an automated response.\n   *\n   * Currently only 1 badge is supported.\n   * @maxSize 1\n   */\n  badges?: Badge[];\n  /**\n   * Communication channel to send the message to.\n   *\n   * Currently messages can be sent to 1 channel only.\n   * @deprecated Communication channel to send the message to.\n   *\n   * Currently messages can be sent to 1 channel only.\n   * @replacedBy target_channel_ids\n   * @targetRemovalDate 2026-06-30\n   */\n  targetChannels?: ChannelTypeWithLiterals[];\n  /**\n   * Communication channel the message is sent from.\n   * @deprecated Communication channel the message is sent from.\n   * @replacedBy source_channel_id\n   * @targetRemovalDate 2026-06-30\n   */\n  sourceChannel?: ChannelTypeWithLiterals;\n  /**\n   * Reserved for internal use.\n   *\n   * ID of the application that sent the message.Omitted if the message was sent with the Chat widget.\n   * @format GUID\n   * @readonly\n   */\n  appId?: string | null;\n  /**\n   * __Required.__\n   * Controls who can see the message.\n   *\n   * - `\"BUSINESS_AND_PARTICIPANT\"`: Visible to the participant and site collaborators.\n   * - `\"BUSINESS\"`: Visible to site collaborators only.\n   */\n  visibility?: MessageVisibilityWithLiterals;\n  /**\n   * Sequential ordering of the message.\n   *\n   * Ensures more accurate sorting than `createdDate`\n   * if two messages are sent at the same time.\n   * @readonly\n   */\n  sequence?: string | null;\n  /**\n   * __Required.__\n   * Message direction.\n   *\n   * - `\"BUSINESS_TO_PARTICIPANT\"`: The message was sent from the business to the participant.\n   * - `\"PARTICIPANT_TO_BUSINESS\"`: The message was sent from the participant to the business.\n   */\n  direction?: MessageDirectionWithLiterals;\n  /** Date and time the message was sent. */\n  _createdDate?: Date | null;\n  /**\n   * Target channel IDs to send the message to.\n   * @maxSize 100\n   * @maxLength 100\n   */\n  targetChannelIds?: string[];\n  /**\n   * The channel ID from which the message was sent.\n   * @maxLength 100\n   */\n  sourceChannelId?: string | null;\n  /**\n   * Controls whether the unread count and conversation summary\n   * are updated in the\n   * [Message List](https://support.wix.com/en/article/wix-inbox-an-overview).\n   *\n   * If `true`, unread count and conversation summary are not updated.\n   *\n   * Default: `false`\n   */\n  silent?: boolean;\n  /**\n   * Whether the message was edited on the channel it came from.\n   * @readonly\n   */\n  edited?: boolean;\n  /**\n   * Date and time the message was last edited on the channel it came from. Omitted if it was never edited.\n   * @readonly\n   */\n  editedDate?: Date | null;\n}\n\nexport interface MessageContent extends MessageContentPayloadOneOf {\n  /** Plain text, file, or image message. */\n  basic?: BasicMessagePayload;\n  /**\n   * Template containing an image, title, text,\n   * and/or up to 10 call-to-action buttons.\n   */\n  template?: TemplateMessagePayload;\n  /**\n   * Minimal message containing a single line of text\n   * and an optional icon.\n   * Often reports an activity that took place.\n   */\n  minimal?: MinimalMessagePayload;\n  /**\n   * Message containing submitted form data.\n   * Typically sent with a `direction` of `\"PARTICIPANT_TO_BUSINESS\"`\n   * and message `visibility` of `\"BUSINESS\"`.\n   */\n  form?: FormMessagePayload;\n  /**\n   * Reserved for internal use.\n   *\n   * System message.\n   */\n  system?: SystemMessagePayload;\n  /**\n   * Summary of message contents.\n   * Displayed in Inbox in the\n   * [Message List](https://support.wix.com/en/article/wix-inbox-an-overview).\n   * @maxLength 256\n   */\n  previewText?: string | null;\n  /** Message title. */\n  title?: string | null;\n  /**\n   * An enum that says what the Content Type expected to be populated inside payload\n   * @internal\n   */\n  contentType?: ContentTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface MessageContentPayloadOneOf {\n  /** Plain text, file, or image message. */\n  basic?: BasicMessagePayload;\n  /**\n   * Template containing an image, title, text,\n   * and/or up to 10 call-to-action buttons.\n   */\n  template?: TemplateMessagePayload;\n  /**\n   * Minimal message containing a single line of text\n   * and an optional icon.\n   * Often reports an activity that took place.\n   */\n  minimal?: MinimalMessagePayload;\n  /**\n   * Message containing submitted form data.\n   * Typically sent with a `direction` of `PARTICIPANT_TO_BUSINESS`\n   * and message `visibility` of `BUSINESS`.\n   */\n  form?: FormMessagePayload;\n  /**\n   * System message.\n   * For internal use.\n   */\n  system?: SystemMessagePayload;\n}\n\nexport interface BasicMessagePayload {\n  /**\n   * List of plain text messages, images, and/or files.\n   * List items are displayed as separate messages\n   * in Inbox and the site's chat widget.\n   * @minSize 1\n   */\n  items?: BasicMessageData[];\n}\n\nexport interface BasicMessageData extends BasicMessageDataDataOneOf {\n  /**\n   * Text message.\n   * @minLength 1\n   * @maxLength 16384\n   */\n  text?: string;\n  /**\n   * Image message.\n   * Can contain an image from Wix Media\n   * or from an external provider.\n   */\n  image?: ImageMessage;\n  /**\n   * File attachment.\n   * Can contain a file from Wix Media or an external provider.\n   */\n  file?: FileMessage;\n}\n\n/** @oneof */\nexport interface BasicMessageDataDataOneOf {\n  /**\n   * Text message.\n   * @minLength 1\n   * @maxLength 16384\n   */\n  text?: string;\n  /**\n   * Image message.\n   * Can contain an image from Wix Media\n   * or from an external provider.\n   */\n  image?: ImageMessage;\n  /**\n   * File attachment.\n   * Can contain a file from Wix Media or an external provider.\n   */\n  file?: FileMessage;\n}\n\nexport interface ImageMessage {\n  /**\n   * Wix Media ID.\n   * @maxLength 2000\n   */\n  _id?: string | null;\n  /**\n   * URL where the image is hosted. This URL is valid for 10 hours from the time the message is sent.\n   * @maxLength 2000\n   */\n  url?: string;\n  /**\n   * File name of the original file.\n   * @maxLength 255\n   */\n  filename?: string | null;\n  /**\n   * File size, in bytes.\n   * @internal\n   */\n  fileSize?: string | null;\n  /** Original image width, in pixels. */\n  width?: number;\n  /** Original image height, in pixels. */\n  height?: number;\n  /**\n   * Expiration date and time of the URL in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n   * @readonly\n   */\n  urlExpiration?: Date | null;\n  /**\n   * Thumbnail URL.\n   * @internal\n   * @format WEB_URL\n   * @maxLength 2000\n   */\n  thumbnailUrl?: string | null;\n}\n\nexport interface FileMessage {\n  /**\n   * Wix Media ID.\n   * @maxLength 2000\n   */\n  _id?: string | null;\n  /**\n   * URL where the image is hosted. This URL is valid for 10 hours from the time the message is sent.\n   * @maxLength 2000\n   */\n  url?: string;\n  /**\n   * File name of the original file.\n   * @maxLength 255\n   */\n  filename?: string | null;\n  /**\n   * File size, in bytes.\n   * @internal\n   */\n  fileSize?: string | null;\n  /**\n   * File [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).\n   * @maxLength 100\n   */\n  mimeType?: string | null;\n  /**\n   * Expiration date and time of the URL in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n   * @readonly\n   */\n  urlExpiration?: Date | null;\n  /**\n   * Thumbnail URL.\n   * @internal\n   * @format WEB_URL\n   * @maxLength 2000\n   */\n  thumbnailUrl?: string | null;\n}\n\nexport interface TemplateMessagePayload {\n  /** Title displayed in the message. */\n  title?: string | null;\n  /**\n   * List of buttons to display with the message.\n   * Buttons can either open a URL or pass interaction details to the\n   * `onMessageButtonInteracted()` event.\n   *\n   * Max: 10 buttons.\n   * @maxSize 10\n   */\n  buttons?: Button[];\n  /** Controls whether the message is displayed in portrait or landscape layout. */\n  orientation?: OrientationWithLiterals;\n  /**\n   * an icon key\n   * @internal\n   */\n  icon?: string | null;\n  /**\n   * List of lines of text. Each item in the array is displayed on a new line.\n   *\n   * Max: 10 lines (up to 512 characters per line).\n   * @maxSize 10\n   */\n  textLines?: string[];\n  /**\n   * URL where the icon is hosted.\n   * @format WEB_URL\n   * @maxLength 2000\n   */\n  imageUrl?: string | null;\n}\n\nexport interface Button {\n  /**\n   * Button label text.\n   * @minLength 1\n   * @maxLength 16384\n   */\n  label?: string;\n  /**\n   * If included, the button launches the specified URL.\n   * @format WEB_URL\n   * @maxLength 16384\n   */\n  launchUrl?: string | null;\n  /** Properties to pass to the `onMessageButtonInteracted()` event when the button is clicked. */\n  postbackProperties?: PostbackProperties;\n}\n\nexport interface PostbackProperties {\n  /**\n   * For internal use.\n   *\n   * @readonly\n   * @format GUID\n   */\n  appId?: string | null;\n  /**\n   * ID you define for the interaction, to be handled by your server.\n   * @minLength 1\n   * @maxLength 256\n   */\n  interactionId?: string;\n}\n\nexport enum Orientation {\n  /** Unknown orientation. */\n  UNKNOWN_ORIENTATION = 'UNKNOWN_ORIENTATION',\n  /** Portrait layout. */\n  PORTRAIT = 'PORTRAIT',\n  /** Landscape layout. */\n  LANDSCAPE = 'LANDSCAPE',\n}\n\n/** @enumType */\nexport type OrientationWithLiterals =\n  | Orientation\n  | 'UNKNOWN_ORIENTATION'\n  | 'PORTRAIT'\n  | 'LANDSCAPE';\n\nexport interface MinimalMessagePayload {\n  /**\n   * Message text.\n   * @minLength 1\n   * @maxLength 16384\n   */\n  text?: string;\n  /**\n   * Icon.\n   * @internal\n   * @minLength 1\n   * @maxLength 256\n   */\n  icon?: string | null;\n  /**\n   * URL where the icon is hosted.\n   * @format WEB_URL\n   * @maxLength 2000\n   */\n  iconUrl?: string | null;\n  /**\n   * If included, URL the user is redirected to when clicking the message.\n   * @format WEB_URL\n   * @maxLength 2000\n   */\n  url?: string | null;\n}\n\nexport interface FormMessagePayload {\n  /**\n   * Form title displayed in the message.\n   * @minLength 1\n   * @maxLength 256\n   */\n  title?: string | null;\n  /**\n   * Form description displayed below the title.\n   * @minLength 1\n   * @maxLength 16384\n   */\n  description?: string | null;\n  /**\n   * List of form fields and values.\n   * @minSize 1\n   * @maxSize 30\n   */\n  fields?: FormField[];\n  /**\n   * List of files and/or images attached to the form.\n   *\n   * List items are displayed as separate messages\n   * in Inbox and the site's chat widget.\n   * @maxSize 15\n   */\n  media?: MediaItem[];\n}\n\nexport interface FormField {\n  /**\n   * Form field display name.\n   * @maxLength 8192\n   */\n  name?: string;\n  /**\n   * Submitted value.\n   * @maxLength 8192\n   */\n  value?: string;\n}\n\nexport interface MediaItem extends MediaItemMediaOneOf {\n  /**\n   * Image message.\n   * Can contain an image from Wix Media\n   * or from an external provider.\n   */\n  image?: ImageMessage;\n  /**\n   * File attachment.\n   * Can contain a file from Wix Media or an external provider.\n   */\n  file?: FileMessage;\n}\n\n/** @oneof */\nexport interface MediaItemMediaOneOf {\n  /**\n   * Image message.\n   * Can contain an image from Wix Media\n   * or from an external provider.\n   */\n  image?: ImageMessage;\n  /**\n   * File attachment.\n   * Can contain a file from Wix Media or an external provider.\n   */\n  file?: FileMessage;\n}\n\nexport interface SystemMessagePayload {\n  /**\n   * Text message. `\\n` renders as a line break.\n   * @maxLength 16384\n   */\n  text?: string;\n  /**\n   * List of buttons to display with the message.\n   * Buttons can either open a URL or pass interaction details to the\n   * `onMessageButtonInteracted()` event.\n   *\n   * Maximum: 10 buttons.\n   * @maxSize 10\n   */\n  buttons?: Button[];\n  /**\n   * URL where the icon is hosted.\n   * @format WEB_URL\n   * @maxLength 2000\n   */\n  imageUrl?: string | null;\n}\n\nexport enum ContentType {\n  UNKNOWN_CONTENT = 'UNKNOWN_CONTENT',\n  BASIC = 'BASIC',\n  TEMPLATE = 'TEMPLATE',\n  MINIMAL = 'MINIMAL',\n  FORM = 'FORM',\n  SYSTEM = 'SYSTEM',\n  UNSUPPORTED = 'UNSUPPORTED',\n}\n\n/** @enumType */\nexport type ContentTypeWithLiterals =\n  | ContentType\n  | 'UNKNOWN_CONTENT'\n  | 'BASIC'\n  | 'TEMPLATE'\n  | 'MINIMAL'\n  | 'FORM'\n  | 'SYSTEM'\n  | 'UNSUPPORTED';\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n  /**\n   * Anonymous site visitor ID.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * Member ID. See the Members API for more information.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of the Wix user.\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * App ID.\n   * @format GUID\n   */\n  appId?: string;\n  /**\n   * Contact ID. See the Contacts API for more information.\n   * @format GUID\n   * @readonly\n   */\n  contactId?: string | null;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n  /**\n   * Anonymous site visitor ID.\n   * @format GUID\n   */\n  anonymousVisitorId?: string;\n  /**\n   * Member ID. See the Members API for more information.\n   * @format GUID\n   */\n  memberId?: string;\n  /**\n   * ID of the Wix user.\n   * @format GUID\n   */\n  wixUserId?: string;\n  /**\n   * App ID.\n   * @format GUID\n   */\n  appId?: string;\n}\n\nexport interface Badge {\n  /** Display text. */\n  text?: string;\n  /**\n   * Badge icon.\n   * @internal\n   */\n  icon?: string | null;\n  /**\n   * URL where the icon is hosted.\n   * @format WEB_URL\n   */\n  iconUrl?: string | null;\n  /**\n   * Controls whether the badge is visible to the participant.\n   * Currently not supported in the Chat widget.\n   */\n  badgeVisibility?: BadgeVisibilityWithLiterals;\n}\n\nexport enum BadgeVisibility {\n  /** Unkown visibility. */\n  UNKNOWN_BADGE_VISIBILITY = 'UNKNOWN_BADGE_VISIBILITY',\n  /** Visible to the participant and site collaborators. */\n  BUSINESS_AND_PARTICIPANT = 'BUSINESS_AND_PARTICIPANT',\n  /** Visible to site collaborators only. */\n  BUSINESS = 'BUSINESS',\n}\n\n/** @enumType */\nexport type BadgeVisibilityWithLiterals =\n  | BadgeVisibility\n  | 'UNKNOWN_BADGE_VISIBILITY'\n  | 'BUSINESS_AND_PARTICIPANT'\n  | 'BUSINESS';\n\nexport enum ChannelType {\n  UNKNOWN_CHANNEL_TYPE = 'UNKNOWN_CHANNEL_TYPE',\n  CHAT = 'CHAT',\n  EMAIL = 'EMAIL',\n  SMS = 'SMS',\n  FACEBOOK = 'FACEBOOK',\n  INSTAGRAM = 'INSTAGRAM',\n  WHATSAPP = 'WHATSAPP',\n  /** @internal */\n  AI_ASSISTANT = 'AI_ASSISTANT',\n  /** @internal */\n  PHONE = 'PHONE',\n  /** @internal */\n  WIX_MEMBERS_MOBILE_APP = 'WIX_MEMBERS_MOBILE_APP',\n}\n\n/** @enumType */\nexport type ChannelTypeWithLiterals =\n  | ChannelType\n  | 'UNKNOWN_CHANNEL_TYPE'\n  | 'CHAT'\n  | 'EMAIL'\n  | 'SMS'\n  | 'FACEBOOK'\n  | 'INSTAGRAM'\n  | 'WHATSAPP';\n\nexport enum MessageVisibility {\n  /** Unknown message visibility. */\n  UNKNOWN_VISIBILITY = 'UNKNOWN_VISIBILITY',\n  /** Visible to the participant and site collaborators. */\n  BUSINESS_AND_PARTICIPANT = 'BUSINESS_AND_PARTICIPANT',\n  /** Visible to site collaborators only. */\n  BUSINESS = 'BUSINESS',\n}\n\n/** @enumType */\nexport type MessageVisibilityWithLiterals =\n  | MessageVisibility\n  | 'UNKNOWN_VISIBILITY'\n  | 'BUSINESS_AND_PARTICIPANT'\n  | 'BUSINESS';\n\nexport enum MessageDirection {\n  /** Unknown message direction. */\n  UNKNOWN_DIRECTION = 'UNKNOWN_DIRECTION',\n  /** The message was sent from the business to the participant. */\n  BUSINESS_TO_PARTICIPANT = 'BUSINESS_TO_PARTICIPANT',\n  /** The message was sent from the participant to the business. */\n  PARTICIPANT_TO_BUSINESS = 'PARTICIPANT_TO_BUSINESS',\n}\n\n/** @enumType */\nexport type MessageDirectionWithLiterals =\n  | MessageDirection\n  | 'UNKNOWN_DIRECTION'\n  | 'BUSINESS_TO_PARTICIPANT'\n  | 'PARTICIPANT_TO_BUSINESS';\n\n/**\n * ACTION event payload on the `Message` entity.\n * Triggered when a reaction is set on a message.\n */\nexport interface MessageReactionSet {\n  /**\n   * ID of the conversation the reacted-to message belongs to.\n   * @format GUID\n   */\n  conversationId?: string;\n  /**\n   * ID of the message being reacted to.\n   * @maxLength 19\n   */\n  messageId?: string;\n  /** Who set the reaction: the business or the conversation participant. */\n  performedBy?: PerformedByWithLiterals;\n  /**\n   * Emoji reaction.\n   * @minLength 1\n   * @maxLength 64\n   */\n  emoji?: string;\n  /**\n   * Opaque ID of the channel the reaction occurred on, for example `\"Whatsapp\"` or `\"appDefId:channelKey\"`.\n   * @maxLength 100\n   */\n  channelId?: string;\n}\n\nexport enum PerformedBy {\n  /** Unknown performer. */\n  UNKNOWN_PERFORMED_BY = 'UNKNOWN_PERFORMED_BY',\n  /** Business performed the action. */\n  BUSINESS = 'BUSINESS',\n  /** Participant performed the action. */\n  PARTICIPANT = 'PARTICIPANT',\n}\n\n/** @enumType */\nexport type PerformedByWithLiterals =\n  | PerformedBy\n  | 'UNKNOWN_PERFORMED_BY'\n  | 'BUSINESS'\n  | 'PARTICIPANT';\n\n/**\n * ACTION event payload on the `Message` entity.\n * Triggered when a reaction is removed from a message.\n */\nexport interface MessageReactionRemoved {\n  /**\n   * ID of the conversation the reacted-to message belongs to.\n   * @format GUID\n   */\n  conversationId?: string;\n  /**\n   * ID of the message the reaction was removed from.\n   * @maxLength 19\n   */\n  messageId?: string;\n  /** Who removed the reaction: the business or the conversation participant. */\n  performedBy?: PerformedByWithLiterals;\n  /**\n   * Opaque ID of the channel the reaction occurred on, for example `\"Whatsapp\"` or `\"appDefId:channelKey\"`.\n   * @maxLength 100\n   */\n  channelId?: string;\n}\n\nexport interface SetMessageReactionRequest {\n  /**\n   * ID of the conversation the reacted-to message belongs to.\n   * @format GUID\n   */\n  conversationId?: string;\n  /**\n   * ID of the message being reacted to.\n   * @maxLength 19\n   */\n  messageId?: string;\n  /** Who is setting the reaction: the business or the conversation participant. */\n  performedBy?: PerformedByWithLiterals;\n  /**\n   * Emoji reaction.\n   * @minLength 1\n   * @maxLength 64\n   */\n  emoji?: string;\n  /**\n   * Opaque ID of the channel the reaction occurred on, for example `\"Whatsapp\"` or `\"appDefId:channelKey\"`.\n   * @maxLength 100\n   */\n  channelId?: string;\n  /** The time the reaction occurred on the originating channel. Defaults to the time the request is received. */\n  reactionDate?: Date | null;\n}\n\nexport interface SetMessageReactionResponse {\n  /** The stored reaction. */\n  messageReaction?: MessageReaction;\n}\n\n/**\n * A reaction stored against a message. Not an entity of its own: reactions are satellite records of a\n * message, keyed by (conversation_id, message_id, performed_by), and their ACTION event rides the\n * `Message` entity — see MessageReactionUpdated in events/message_reaction_events.proto.\n */\nexport interface MessageReaction {\n  /**\n   * ID of the conversation the reacted-to message belongs to.\n   * @format GUID\n   */\n  conversationId?: string;\n  /** ID of the message being reacted to. */\n  messageId?: string;\n  /** Who set or removed the reaction: the business or the conversation participant. */\n  performedBy?: PerformedByWithLiterals;\n  /**\n   * Emoji reaction. Always present on a stored reaction.\n   * @minLength 1\n   * @maxLength 64\n   */\n  emoji?: string;\n  /**\n   * Opaque ID of the channel the reaction occurred on, for example `\"Whatsapp\"` or `\"appDefId:channelKey\"`.\n   * @maxLength 100\n   */\n  channelId?: string;\n  /** Date and time the reaction was last set or removed. */\n  _updatedDate?: Date | null;\n}\n\nexport interface RemoveMessageReactionRequest {\n  /**\n   * ID of the conversation the reacted-to message belongs to.\n   * @format GUID\n   */\n  conversationId?: string;\n  /**\n   * ID of the message the reaction is being removed from.\n   * @maxLength 19\n   */\n  messageId?: string;\n  /** Who is removing the reaction: the business or the conversation participant. */\n  performedBy?: PerformedByWithLiterals;\n  /**\n   * Opaque ID of the channel the reaction occurred on, for example `\"Whatsapp\"` or `\"appDefId:channelKey\"`.\n   * @maxLength 100\n   */\n  channelId?: string;\n  /** The time the removal occurred on the originating channel. Defaults to the time the request is received. */\n  reactionDate?: Date | null;\n}\n\nexport interface RemoveMessageReactionResponse {}\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?: WebhooksIdentificationData;\n  /** Stringify payload. */\n  data?: string;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface WebhooksIdentificationData\n  extends WebhooksIdentificationDataIdOneOf {\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 WebhooksIdentificationDataIdOneOf {\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\nexport interface GetMessageIndicationsRequest {\n  /** @format GUID */\n  conversationId?: string;\n  messageId?: string;\n}\n\nexport interface GetMessageIndicationsResponse {\n  messageIndications?: MessageIndication[];\n}\n\nexport interface MessageIndication {\n  /**\n   * @readonly\n   * @format GUID\n   */\n  conversationId?: string | null;\n  /**\n   * Message ID.\n   * @readonly\n   */\n  messageId?: string | null;\n  /** Type of indication. */\n  type?: IndicationTypeWithLiterals;\n  /** The channel to which this indication was added. */\n  channel?: ChannelTypeWithLiterals;\n  /**\n   * The error code when it is an `ERROR` indication.\n   * @internal\n   */\n  errorCode?: string | null;\n  /** Date and time when the action happened. */\n  timestamp?: Date | null;\n  /**\n   * The channel ID that the message was sent in.\n   * @internal\n   * @minLength 1\n   * @maxLength 100\n   */\n  channelId?: string | null;\n}\n\nexport enum IndicationType {\n  /** Unknown indication type. */\n  UNKNOWN_INDICATION_TYPE = 'UNKNOWN_INDICATION_TYPE',\n  /** Message was sent. */\n  SENT = 'SENT',\n  /** Message was seen. */\n  SEEN = 'SEEN',\n  /** There was an error. */\n  ERROR = 'ERROR',\n  /** Message was delivered. */\n  DELIVERED = 'DELIVERED',\n}\n\n/** @enumType */\nexport type IndicationTypeWithLiterals =\n  | IndicationType\n  | 'UNKNOWN_INDICATION_TYPE'\n  | 'SENT'\n  | 'SEEN'\n  | 'ERROR'\n  | 'DELIVERED';\n\nexport interface AddMessageIndicationsRequest {\n  /** @format GUID */\n  conversationId?: string;\n  /** @minSize 1 */\n  messageIds?: string[];\n  /** By whom this action was performed. Defaults to `PARTICIPANT` in case of `UNKNOWN_PERFORMED_BY`. */\n  performedBy?: PerformedByWithLiterals;\n  indication?: MessageIndication;\n}\n\nexport interface AddMessageIndicationsResponse {}\n\nexport interface MessageSentToParticipant {\n  /**\n   * Conversation ID.\n   * @format GUID\n   */\n  conversationId?: string;\n  /** Sent message. */\n  message?: Message;\n  /**\n   * Internal data about custom messages\n   * @internal\n   */\n  customMessageData?: CustomMessageData;\n}\n\nexport interface CustomMessageData {\n  /** Name of the app this message belongs to. */\n  appName?: string | null;\n  /** Data set by the sending application */\n  appData?: Record<string, string>;\n}\n\nexport interface MessageSentToBusiness {\n  /**\n   * Conversation ID.\n   * @format GUID\n   */\n  conversationId?: string;\n  /** Sent message. */\n  message?: Message;\n  /**\n   * Internal data about custom messages\n   * @internal\n   */\n  customMessageData?: CustomMessageData;\n  /** Optional info about interaction with app done by the user */\n  interactionInfo?: InteractionInfo;\n}\n\n/**\n * Source of interaction message. Available when the message triggers by an app interaction,\n * for example clicking a button.\n */\nexport interface InteractionInfo {\n  /** @format GUID */\n  appId?: string | null;\n  interactionId?: string | null;\n}\n\nexport interface ButtonInteracted {\n  /**\n   * Conversation ID.\n   * @format GUID\n   */\n  conversationId?: string;\n  /**\n   * App ID.\n   * @format GUID\n   */\n  appId?: string | null;\n  /**\n   * ID you define for the interaction,\n   * to be handled by your server.\n   */\n  interactionId?: string | null;\n  /** ID of the participant who pressed the button. */\n  interactedBy?: IdentificationData;\n}\n\nexport interface ListMessagesRequest {\n  /**\n   * ID of the conversation that contains the intended messages.\n   * @format GUID\n   */\n  conversationId: string;\n  /**\n   * __Required.__\n   * Filters for messages with the specified visibility setting.\n   *\n   * - `\"BUSINESS_AND_PARTICIPANT\"`: Return messages visible to the business and the participant.\n   * - `\"BUSINESS\"`: Return all messages.\n   */\n  visibility?: MessageVisibilityWithLiterals;\n  /** Paging options. */\n  paging?: CursorPaging;\n  /** Sorting options. */\n  sorting?: Sorting;\n}\n\nexport interface CursorPaging {\n  /**\n   * Maximum number of items to return in the results.\n   * @max 100\n   */\n  limit?: number | null;\n  /**\n   * Pointer to the next or previous page in the list of results.\n   *\n   * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n   * Not relevant for the first request.\n   * @maxLength 16000\n   */\n  cursor?: string | null;\n}\n\nexport interface Sorting {\n  /**\n   * Name of the field to sort by.\n   * @maxLength 512\n   */\n  fieldName?: string;\n  /** Sort order. */\n  order?: SortOrderWithLiterals;\n  /**\n   * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n   * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n   *\n   * If multiple filters are provided, they are combined with AND operator.\n   *\n   * Example:\n   * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n   * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n   * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n   * @internal\n   * @maxSize 10\n   */\n  selectItemsBy?: Record<string, any>[] | null;\n  /**\n   * Origin point for geo-distance sorting on a GEO field\n   * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).\n   */\n  origin?: AddressLocation;\n}\n\nexport enum SortOrder {\n  ASC = 'ASC',\n  DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface AddressLocation {\n  /** Address latitude. */\n  latitude?: number | null;\n  /** Address longitude. */\n  longitude?: number | null;\n}\n\nexport interface ListMessagesResponse {\n  /** List of messages between the specified visitor and the site. */\n  messages?: Message[];\n  /** Details on the paged set of results returned. */\n  pagingMetadata?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n  /** Number of items returned in the response. */\n  count?: number | null;\n  /** Offset that was requested. */\n  offset?: number | null;\n  /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n  total?: number | null;\n  /** Flag that indicates the server failed to calculate the `total` field. */\n  tooManyToCount?: boolean | null;\n  /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n  cursors?: Cursors;\n  /**\n   * Indicates if there are more results after the current page.\n   * If `true`, another page of results can be retrieved.\n   * If `false`, this is the last page.\n   * @internal\n   */\n  hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n  /**\n   * Cursor string pointing to the next page in the list of results.\n   * @maxLength 16000\n   */\n  next?: string | null;\n  /**\n   * Cursor pointing to the previous page in the list of results.\n   * @maxLength 16000\n   */\n  prev?: string | null;\n}\n\nexport interface SendMessageRequest {\n  /**\n   * ID of the conversation to add the message to.\n   * @format GUID\n   */\n  conversationId: string;\n  /** Message to send. */\n  message: Message;\n  /**\n   * Controls whether the message triggers notifications when it's received.\n   *\n   * Default: `false`\n   */\n  sendNotifications?: boolean;\n  /**\n   * Controls whether the unread count and conversation summary\n   * are updated in the\n   * [Message List](https://support.wix.com/en/article/wix-inbox-an-overview).\n   *\n   * If `true`, unread count and conversation summary are not updated.\n   * Deprecated: Use `Message.silent` instead.\n   *\n   * Default: `false`\n   * @deprecated Controls whether the unread count and conversation summary\n   * are updated in the\n   * [Message List](https://support.wix.com/en/article/wix-inbox-an-overview).\n   *\n   * If `true`, unread count and conversation summary are not updated.\n   * Deprecated: Use `Message.silent` instead.\n   *\n   * Default: `false`\n   * @replacedBy Message.silent\n   * @targetRemovalDate 2026-06-01\n   */\n  silent?: boolean;\n  /** @internal */\n  typingDelay?: number | null;\n  /**\n   * Controls which identity to use in the message's `sender` property.\n   * Default: `CALLER`\n   * For 3rd-party apps, the app is the caller.\n   */\n  sendAs?: OverrideSenderOptionsWithLiterals;\n  /**\n   * Wix user ID of the message sender.\n   *\n   * Required if `sendAs` is set to `BUSINESS_USER`.\n   * @internal\n   * @format GUID\n   */\n  businessUserId?: string | null;\n}\n\nexport enum OverrideSenderOptions {\n  /** Uses the identity included in the request header. */\n  CALLER = 'CALLER',\n  /** Uses the `anonymousVisitorId`, `contactId`, or `memberId` of the conversation's participant. */\n  PARTICIPANT = 'PARTICIPANT',\n  /** For internal use. Uses the `wixUserId` of the person sending messages on behalf of the business. */\n  BUSINESS_USER = 'BUSINESS_USER',\n}\n\n/** @enumType */\nexport type OverrideSenderOptionsWithLiterals =\n  | OverrideSenderOptions\n  | 'CALLER'\n  | 'PARTICIPANT'\n  | 'BUSINESS_USER';\n\nexport interface SendMessageResponse {\n  /** Sent message. */\n  message?: Message;\n}\n\nexport interface GetMessageRequest {\n  /**\n   * ID of the conversation the message belongs to\n   * @format GUID\n   */\n  conversationId?: string;\n  /**\n   * Id of the message to retrieve\n   * @maxLength 20\n   */\n  messageId?: string;\n}\n\nexport interface GetMessageResponse {\n  /** The request message */\n  message?: Message;\n}\n\nexport interface RevokeMessageRequest {\n  /**\n   * ID of the conversation the message belongs to.\n   * @format GUID\n   */\n  conversationId?: string;\n  /**\n   * ID of the message to revoke.\n   * @maxLength 20\n   */\n  messageId?: string;\n}\n\nexport interface RevokeMessageResponse {}\n\nexport interface EditMessageRequest {\n  /**\n   * ID of the conversation the message belongs to.\n   * @format GUID\n   */\n  conversationId?: string;\n  /**\n   * ID of the message to edit.\n   * @maxLength 20\n   */\n  messageId?: string;\n  /** Content that replaces the message's current content. */\n  content?: MessageContent;\n  /** Date and time the edit was made on the originating channel. Decides the ordering between edits. */\n  editedDate?: Date | null;\n  /**\n   * ID of the channel the edit came from, used to convert the replacement content like the original.\n   * @maxLength 100\n   */\n  sourceChannelId?: string | null;\n  /** Side of the conversation making the edit. Only the side that sent the message may edit it. */\n  performedBy?: PerformedByWithLiterals;\n}\n\nexport interface EditMessageResponse {}\n\nexport interface Empty {}\n\n/** @docsIgnore */\nexport type ListMessagesApplicationErrors =\n  | {\n      code?: 'NO_INBOX_INSTANCE';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'NOT_JOINED_CHATROOM';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'CONVERSATION_NOT_FOUND';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'INBOX_INSTANCE_NOT_FOUND';\n      description?: string;\n      data?: Record<string, any>;\n    };\n/** @docsIgnore */\nexport type SendMessageApplicationErrors =\n  | {\n      code?: 'IDENTITY_DOES_NOT_MATCH';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'INBOX_INSTANCE_NOT_FOUND';\n      description?: string;\n      data?: Record<string, any>;\n    }\n  | {\n      code?: 'INVALID_MEDIA_URL';\n      description?: string;\n      data?: Record<string, any>;\n    };\n\nexport interface BaseEventMetadata {\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?: WebhooksIdentificationData;\n  /** Details related to the account */\n  accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\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  accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n  /** ID of the Wix account associated with the event */\n  accountId: string;\n  /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n  siteId?: string;\n  /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n  parentAccountId?: string;\n}\n\nexport interface MessageButtonInteractedEnvelope {\n  data: ButtonInteracted;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a postback button is clicked.\n * @permissionScope Manage_Wix_Rentals_App_Forms_submissions\n * @permissionScopeId SCOPE.RENTALS.MANAGE\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Inbox Messages\n * @permissionScopeId SCOPE.DC-INBOX.MANAGE-MSGS\n * @permissionScope Read Inbox Messages\n * @permissionScopeId SCOPE.DC-INBOX.READ-MSGS\n * @permissionId INBOX.READ_MESSAGES\n * @webhook\n * @eventType wix.crm.inbox.v2.message_button_interacted\n * @serviceIdentifier com.wixpress.inbox.v2.MessagesService\n * @slug button_interacted\n */\nexport declare function onMessageButtonInteracted(\n  handler: (event: MessageButtonInteractedEnvelope) => void | Promise<void>\n): void;\n\nexport interface MessageSentToBusinessEnvelope {\n  data: MessageSentToBusiness;\n  metadata: EventMetadata;\n}\n\n/**\n * Triggered when a visitor, contact, or member\n * sends a message to the business.\n * @permissionScope Manage_Wix_Rentals_App_Forms_submissions\n * @permissionScopeId SCOPE.RENTALS.MANAGE\n * @permissionScope Manage Stores\n * @permissionScopeId SCOPE.STORES.MANAGE-STORES\n * @permissionScope Manage Events\n * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS\n * @permissionScope Manage Inbox Messages\n * @permissionScopeId SCOPE.DC-INBOX.MANAGE-MSGS\n * @permissionScope Read Inbox Messages\n * @permissionScopeId SCOPE.DC-INBOX.READ-MSGS\n * @permissionId INBOX.READ_MESSAGES\n * @webhook\n * @eventType wix.crm.inbox.v2.message_message_sent_to_business\n * @serviceIdentifier com.wixpress.inbox.v2.MessagesService\n * @slug message_sent_to_business\n */\nexport declare function onMessageSentToBusiness(\n  handler: (event: MessageSentToBusinessEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves messages between the business and participant.\n *\n * Up to 30 messages are returned per request. If the number of messages in a conversation is larger than 30,\n * `pagingMetadata.cursors` is returned in the response, indicating that another page of results is available.\n * To retrieve the next page of messages, specify the `next` cursor value\n * in the next request's `paging.cursor` parameter.\n *\n * To ensure you'll always retrieve the next record,\n * use the same visibility and sorting\n * in the first request and all subsequent requests.\n *\n * By default,\n * 30 messages are retrieved and sorted by `sequence` in descending order\n * (the most recent messages are first in the list).\n * @param conversationId - ID of the conversation that contains the intended messages.\n * @param visibility - __Required.__\n * Filters for messages with the specified visibility setting.\n *\n * - `\"BUSINESS_AND_PARTICIPANT\"`: Return messages visible to the business and the participant.\n * - `\"BUSINESS\"`: Return all messages.\n * @public\n * @requiredField conversationId\n * @requiredField visibility\n * @param options - Additional options for listing messages.\n * @permissionId INBOX.READ_MESSAGES\n * @applicableIdentity APP\n * @fqn com.wixpress.inbox.v2.MessagesService.ListMessages\n */\nexport async function listMessages(\n  conversationId: string,\n  visibility: MessageVisibilityWithLiterals,\n  options?: ListMessagesOptions\n): Promise<\n  NonNullablePaths<\n    ListMessagesResponse,\n    | `messages`\n    | `messages.${number}.content.template.orientation`\n    | `messages.${number}.content.minimal.text`\n    | `messages.${number}.content.system.text`\n    | `messages.${number}.sender.anonymousVisitorId`\n    | `messages.${number}.sender.memberId`\n    | `messages.${number}.sender.wixUserId`\n    | `messages.${number}.sender.appId`\n    | `messages.${number}.sourceChannel`\n    | `messages.${number}.visibility`\n    | `messages.${number}.direction`\n    | `messages.${number}.silent`\n    | `messages.${number}.edited`,\n    4\n  > & {\n    __applicationErrorsType?: ListMessagesApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[3] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    conversationId: conversationId,\n    visibility: visibility,\n    paging: options?.paging,\n    sorting: options?.sorting,\n  });\n\n  const reqOpts = ambassadorWixCrmInboxV2Message.listMessages(payload);\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: {},\n        explicitPathsToArguments: {\n          conversationId: '$[0]',\n          visibility: '$[1]',\n          paging: '$[2].paging',\n          sorting: '$[2].sorting',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['conversationId', 'visibility', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface ListMessagesOptions {\n  /** Paging options. */\n  paging?: CursorPaging;\n  /** Sorting options. */\n  sorting?: Sorting;\n}\n\n/**\n * Sends a message to the business or participant.\n *\n * Specify the message type in `message.content`\n * by including the appropriate object: `basic`, `template`, `minimal`, or `form`.\n * For more information on message types\n * and how each type renders in Inbox and the Chat widget,\n * see [Message Types](#message-types).\n * @param conversationId - ID of the conversation to add the message to.\n * @param message - Message to send.\n * @public\n * @requiredField conversationId\n * @requiredField message\n * @requiredField message.content\n * @param options - Additional options for sending a message.\n * @permissionId INBOX.SEND_MESSAGES\n * @applicableIdentity APP\n * @fqn com.wixpress.inbox.v2.MessagesService.SendMessage\n */\nexport async function sendMessage(\n  conversationId: string,\n  message: NonNullablePaths<Message, `content`, 0>,\n  options?: SendMessageOptions\n): Promise<\n  NonNullablePaths<\n    SendMessageResponse,\n    | `message.content.basic.items`\n    | `message.content.basic.items.${number}.text`\n    | `message.content.basic.items.${number}.image.url`\n    | `message.content.basic.items.${number}.image.width`\n    | `message.content.basic.items.${number}.image.height`\n    | `message.content.basic.items.${number}.file.url`\n    | `message.content.template.buttons`\n    | `message.content.template.buttons.${number}.label`\n    | `message.content.template.buttons.${number}.postbackProperties.interactionId`\n    | `message.content.template.orientation`\n    | `message.content.template.textLines`\n    | `message.content.minimal.text`\n    | `message.content.form.fields`\n    | `message.content.form.fields.${number}.name`\n    | `message.content.form.fields.${number}.value`\n    | `message.content.form.media`\n    | `message.content.system.text`\n    | `message.content.system.buttons`\n    | `message.sender.anonymousVisitorId`\n    | `message.sender.memberId`\n    | `message.sender.wixUserId`\n    | `message.sender.appId`\n    | `message.badges`\n    | `message.badges.${number}.text`\n    | `message.badges.${number}.badgeVisibility`\n    | `message.targetChannels`\n    | `message.sourceChannel`\n    | `message.visibility`\n    | `message.direction`\n    | `message.targetChannelIds`\n    | `message.silent`\n    | `message.edited`,\n    6\n  > & {\n    __applicationErrorsType?: SendMessageApplicationErrors;\n  }\n> {\n  // @ts-ignore\n  const { httpClient, sideEffects } = arguments[3] as {\n    httpClient: HttpClient;\n    sideEffects?: any;\n  };\n\n  const payload = renameKeysFromSDKRequestToRESTRequest({\n    conversationId: conversationId,\n    message: message,\n    sendNotifications: options?.sendNotifications,\n    silent: options?.silent,\n    sendAs: options?.sendAs,\n  });\n\n  const reqOpts = ambassadorWixCrmInboxV2Message.sendMessage(payload);\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: {},\n        explicitPathsToArguments: {\n          conversationId: '$[0]',\n          message: '$[1]',\n          sendNotifications: '$[2].sendNotifications',\n          silent: '$[2].silent',\n          sendAs: '$[2].sendAs',\n        },\n        singleArgumentUnchanged: false,\n      },\n      ['conversationId', 'message', 'options']\n    );\n    sideEffects?.onError?.(err);\n\n    throw transformedError;\n  }\n}\n\nexport interface SendMessageOptions {\n  /**\n   * Controls whether the message triggers notifications when it's received.\n   *\n   * Default: `false`\n   */\n  sendNotifications?: boolean;\n  /**\n   * Controls whether the unread count and conversation summary\n   * are updated in the\n   * [Message List](https://support.wix.com/en/article/wix-inbox-an-overview).\n   *\n   * If `true`, unread count and conversation summary are not updated.\n   * Deprecated: Use `Message.silent` instead.\n   *\n   * Default: `false`\n   * @deprecated Controls whether the unread count and conversation summary\n   * are updated in the\n   * [Message List](https://support.wix.com/en/article/wix-inbox-an-overview).\n   *\n   * If `true`, unread count and conversation summary are not updated.\n   * Deprecated: Use `Message.silent` instead.\n   *\n   * Default: `false`\n   * @replacedBy Message.silent\n   * @targetRemovalDate 2026-06-01\n   */\n  silent?: boolean;\n  /**\n   * Controls which identity to use in the message's `sender` property.\n   *\n   * - `\"CALLER\"`: Uses the identity of the initiator of the sent message.\n   * - `\"PARTICIPANT\"`: Uses the `anonymousVisitorId`, `contactId`, or `memberId` of the conversation's participant.\n   *\n   * Default: `\"CALLER\"`\n   *\n   */\n  sendAs?: OverrideSenderOptionsWithLiterals;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\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 resolveComWixpressInboxV2MessagesServiceUrl(\n  opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n  const domainToMappings = {\n    'www.wixapis.com': [\n      {\n        srcPath: '/inbox/v2/messages',\n        destPath: '/v2/messages',\n      },\n    ],\n    'manage._base_domain_': [\n      {\n        srcPath: '/_api/inbox-platform-messages',\n        destPath: '',\n      },\n    ],\n    '*.dev.wix-code.com': [\n      {\n        srcPath: '/crm/inbox/v2/messages',\n        destPath: '/v2/messages',\n      },\n    ],\n    _: [\n      {\n        srcPath: '/crm/inbox/v2/messages',\n        destPath: '/v2/messages',\n      },\n    ],\n  };\n\n  return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_inbox_messages';\n\n/**\n * Retrieves messages between the business and participant.\n *\n * Up to 30 messages are returned per request. If the number of messages in a conversation is larger than 30,\n * `pagingMetadata.cursors` is returned in the response, indicating that another page of results is available.\n * To retrieve the next page of messages, specify the `next` cursor value\n * in the next request's `paging.cursor` parameter.\n *\n * To ensure you'll always retrieve the next record,\n * use the same visibility and sorting\n * in the first request and all subsequent requests.\n *\n * By default,\n * 30 messages are retrieved and sorted by `sequence` in descending order\n * (the most recent messages are first in the list).\n */\nexport function listMessages(payload: object): RequestOptionsFactory<any> {\n  function __listMessages({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKFloatToRESTFloat,\n        paths: [\n          { path: 'sorting.origin.latitude' },\n          { path: 'sorting.origin.longitude' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.crm.inbox.v2.message',\n      method: 'GET' as any,\n      methodFqn: 'com.wixpress.inbox.v2.MessagesService.ListMessages',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressInboxV2MessagesServiceUrl({\n        protoPath: '/v2/messages',\n        data: serializedData,\n        host,\n      }),\n      params: toURLSearchParams(serializedData, true),\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'messages.createdDate' },\n              { path: 'messages.editedDate' },\n              { path: 'messages.content.basic.items.image.urlExpiration' },\n              { path: 'messages.content.basic.items.file.urlExpiration' },\n              { path: 'messages.content.form.media.image.urlExpiration' },\n              { path: 'messages.content.form.media.file.urlExpiration' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __listMessages;\n}\n\n/**\n * Sends a message to the business or participant.\n *\n * Specify the message type in `message.content`\n * by including the appropriate object: `basic`, `template`, `minimal`, or `form`.\n * For more information on message types\n * and how each type renders in Inbox and the Chat widget,\n * see [Message Types](#message-types).\n */\nexport function sendMessage(payload: object): RequestOptionsFactory<any> {\n  function __sendMessage({ host }: any) {\n    const serializedData = transformPaths(payload, [\n      {\n        transformFn: transformSDKTimestampToRESTTimestamp,\n        paths: [\n          { path: 'message.createdDate' },\n          { path: 'message.editedDate' },\n          { path: 'message.content.basic.items.image.urlExpiration' },\n          { path: 'message.content.basic.items.file.urlExpiration' },\n          { path: 'message.content.form.media.image.urlExpiration' },\n          { path: 'message.content.form.media.file.urlExpiration' },\n        ],\n      },\n    ]);\n    const metadata = {\n      entityFqdn: 'wix.crm.inbox.v2.message',\n      method: 'POST' as any,\n      methodFqn: 'com.wixpress.inbox.v2.MessagesService.SendMessage',\n      packageName: PACKAGE_NAME,\n      migrationOptions: {\n        optInTransformResponse: true,\n      },\n      url: resolveComWixpressInboxV2MessagesServiceUrl({\n        protoPath: '/v2/messages',\n        data: serializedData,\n        host,\n      }),\n      data: serializedData,\n      transformResponse: (payload: any) =>\n        transformPaths(payload, [\n          {\n            transformFn: transformRESTTimestampToSDKTimestamp,\n            paths: [\n              { path: 'message.createdDate' },\n              { path: 'message.editedDate' },\n              { path: 'message.content.basic.items.image.urlExpiration' },\n              { path: 'message.content.basic.items.file.urlExpiration' },\n              { path: 'message.content.form.media.image.urlExpiration' },\n              { path: 'message.content.form.media.file.urlExpiration' },\n            ],\n          },\n        ]),\n    };\n\n    return metadata;\n  }\n\n  return __sendMessage;\n}\n","import {\n  listMessages as publicListMessages,\n  sendMessage as publicSendMessage,\n} from './crm-inbox-v2-message-messages.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n  BuildRESTFunction,\n  MaybeContext,\n  BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onMessageButtonInteracted as publicOnMessageButtonInteracted } from './crm-inbox-v2-message-messages.public.js';\nimport { onMessageSentToBusiness as publicOnMessageSentToBusiness } from './crm-inbox-v2-message-messages.public.js';\n\nexport const listMessages: MaybeContext<\n  BuildRESTFunction<typeof publicListMessages> & typeof publicListMessages\n> = /*#__PURE__*/ createRESTModule(publicListMessages);\nexport const sendMessage: MaybeContext<\n  BuildRESTFunction<typeof publicSendMessage> & typeof publicSendMessage\n> = /*#__PURE__*/ createRESTModule(publicSendMessage);\n/**\n * Triggered when a postback button is clicked.\n */\nexport const onMessageButtonInteracted: BuildEventDefinition<\n  typeof publicOnMessageButtonInteracted\n> &\n  typeof publicOnMessageButtonInteracted = /*#__PURE__*/ createEventModule(\n  publicOnMessageButtonInteracted\n);\n/**\n * Triggered when a visitor, contact, or member\n * sends a message to the business.\n */\nexport const onMessageSentToBusiness: BuildEventDefinition<\n  typeof publicOnMessageSentToBusiness\n> &\n  typeof publicOnMessageSentToBusiness = /*#__PURE__*/ createEventModule(\n  publicOnMessageSentToBusiness\n);\n\nexport {\n  Orientation,\n  ContentType,\n  BadgeVisibility,\n  ChannelType,\n  MessageVisibility,\n  MessageDirection,\n  PerformedBy,\n  WebhookIdentityType,\n  IndicationType,\n  SortOrder,\n  OverrideSenderOptions,\n} from './crm-inbox-v2-message-messages.universal.js';\nexport {\n  Message,\n  MessageContent,\n  MessageContentPayloadOneOf,\n  BasicMessagePayload,\n  BasicMessageData,\n  BasicMessageDataDataOneOf,\n  ImageMessage,\n  FileMessage,\n  TemplateMessagePayload,\n  Button,\n  PostbackProperties,\n  MinimalMessagePayload,\n  FormMessagePayload,\n  FormField,\n  MediaItem,\n  MediaItemMediaOneOf,\n  SystemMessagePayload,\n  IdentificationData,\n  IdentificationDataIdOneOf,\n  Badge,\n  MessageReactionSet,\n  MessageReactionRemoved,\n  SetMessageReactionRequest,\n  SetMessageReactionResponse,\n  MessageReaction,\n  RemoveMessageReactionRequest,\n  RemoveMessageReactionResponse,\n  DomainEvent,\n  DomainEventBodyOneOf,\n  EntityCreatedEvent,\n  RestoreInfo,\n  EntityUpdatedEvent,\n  EntityDeletedEvent,\n  ActionEvent,\n  MessageEnvelope,\n  WebhooksIdentificationData,\n  WebhooksIdentificationDataIdOneOf,\n  AccountInfo,\n  GetMessageIndicationsRequest,\n  GetMessageIndicationsResponse,\n  MessageIndication,\n  AddMessageIndicationsRequest,\n  AddMessageIndicationsResponse,\n  MessageSentToParticipant,\n  CustomMessageData,\n  MessageSentToBusiness,\n  InteractionInfo,\n  ButtonInteracted,\n  ListMessagesRequest,\n  CursorPaging,\n  Sorting,\n  AddressLocation,\n  ListMessagesResponse,\n  PagingMetadataV2,\n  Cursors,\n  SendMessageRequest,\n  SendMessageResponse,\n  GetMessageRequest,\n  GetMessageResponse,\n  RevokeMessageRequest,\n  RevokeMessageResponse,\n  EditMessageRequest,\n  EditMessageResponse,\n  Empty,\n  BaseEventMetadata,\n  EventMetadata,\n  AccountInfoMetadata,\n  MessageButtonInteractedEnvelope,\n  MessageSentToBusinessEnvelope,\n  ListMessagesOptions,\n  SendMessageOptions,\n} from './crm-inbox-v2-message-messages.universal.js';\nexport {\n  OrientationWithLiterals,\n  ContentTypeWithLiterals,\n  BadgeVisibilityWithLiterals,\n  ChannelTypeWithLiterals,\n  MessageVisibilityWithLiterals,\n  MessageDirectionWithLiterals,\n  PerformedByWithLiterals,\n  WebhookIdentityTypeWithLiterals,\n  IndicationTypeWithLiterals,\n  SortOrderWithLiterals,\n  OverrideSenderOptionsWithLiterals,\n  ListMessagesApplicationErrors,\n  SendMessageApplicationErrors,\n} from './crm-inbox-v2-message-messages.universal.js';\n"]}