import { V as ListMessagesRequest$1, a as ListMessagesResponse$1, $ as SendMessageRequest$1, c as SendMessageResponse$1 } from './crm-inbox-v2-message-messages.universal-DA62eESi.js'; interface Message { /** * Message ID. * @readonly */ id?: string | null; /** Structured message content. */ content?: MessageContent; /** * ID of the message sender. * * Defaults to the caller's ID * using the property that matches their identity type. * For 3rd-party apps, defaults to using the app's `appId`. * * You can override the default behavior when calling * [Send Message](https://dev.wix.com/api/rest/inbox/messages/send-message) * by using the `sendAs` parameter. * @readonly */ sender?: IdentificationData; /** * Optional icon and short text providing additional details about the message, * such as the app from which the message was sent, or whether the message was an automated response. * * Currently only 1 badge is supported. * @maxSize 1 */ badges?: Badge[]; /** * Communication channel to send the message to. * * Currently messages can be sent to 1 channel only. */ targetChannels?: ChannelTypeWithLiterals[]; /** Communication channel the message is sent from. */ sourceChannel?: ChannelTypeWithLiterals; /** * ID of the application that sent the message. * * Omitted if the message was sent with the Chat widget. * @format GUID * @readonly */ appId?: string | null; /** * __Required.__ * Controls who can see the message. */ visibility?: MessageVisibilityWithLiterals; /** * Sequential ordering of the message. * * Ensures more accurate sorting than `createdDate` * if two messages are sent at the same time. * @readonly */ sequence?: string | null; /** * __Required.__ * Message direction. */ direction?: MessageDirectionWithLiterals; /** Date and time the message was sent. */ createdDate?: Date | null; /** * Controls whether the unread count and conversation summary * are updated in the * [Message List](https://support.wix.com/en/article/wix-inbox-getting-started#view-your-messages). * * If `true`, unread count and conversation summary are not updated. * * Default: `false` */ silent?: boolean; } interface MessageContent extends MessageContentPayloadOneOf { /** Plain text, file, or image message. */ basic?: BasicMessagePayload; /** * Template containing an image, title, text, * and/or up to 10 call-to-action buttons. */ template?: TemplateMessagePayload; /** * Minimal message containing a single line of text * and an optional icon. * Often reports an activity that took place. */ minimal?: MinimalMessagePayload; /** * Message containing submitted form data. * Typically sent with a `direction` of `PARTICIPANT_TO_BUSINESS` * and message `visibility` of `BUSINESS`. */ form?: FormMessagePayload; /** * System message. * For internal use. */ system?: SystemMessagePayload; /** * Summary of message contents. * Displayed in Inbox in the * [Message List](https://support.wix.com/en/article/wix-inbox-getting-started#view-your-messages). * @maxLength 256 */ previewText?: string | null; /** Message title. */ title?: string | null; } /** @oneof */ interface MessageContentPayloadOneOf { /** Plain text, file, or image message. */ basic?: BasicMessagePayload; /** * Template containing an image, title, text, * and/or up to 10 call-to-action buttons. */ template?: TemplateMessagePayload; /** * Minimal message containing a single line of text * and an optional icon. * Often reports an activity that took place. */ minimal?: MinimalMessagePayload; /** * Message containing submitted form data. * Typically sent with a `direction` of `PARTICIPANT_TO_BUSINESS` * and message `visibility` of `BUSINESS`. */ form?: FormMessagePayload; /** * System message. * For internal use. */ system?: SystemMessagePayload; } interface BasicMessagePayload { /** * List of plain text messages, images, and/or files. * List items are displayed as separate messages * in Inbox and the site's chat widget. * @minSize 1 */ items?: BasicMessageData[]; } interface BasicMessageData extends BasicMessageDataDataOneOf { /** * Text message. * @minLength 1 * @maxLength 16384 */ text?: string; /** * Image message. * Can contain an image from Wix Media * or from an external provider. */ image?: ImageMessage; /** * File attachment. * Can contain a file from Wix Media or an external provider. */ file?: FileMessage; } /** @oneof */ interface BasicMessageDataDataOneOf { /** * Text message. * @minLength 1 * @maxLength 16384 */ text?: string; /** * Image message. * Can contain an image from Wix Media * or from an external provider. */ image?: ImageMessage; /** * File attachment. * Can contain a file from Wix Media or an external provider. */ file?: FileMessage; } interface ImageMessage { /** * Wix Media ID. * @maxLength 2000 */ id?: string | null; /** * URL where the image is hosted. * @format WEB_URL * @maxLength 2000 */ url?: string; /** * File name of the original file. * @maxLength 255 */ filename?: string | null; /** Original image width, in pixels. */ width?: number; /** Original image height, in pixels. */ height?: number; } interface FileMessage { /** * Wix Media ID. * @maxLength 2000 */ id?: string | null; /** * URL where the file is hosted. * @format WEB_URL * @maxLength 2000 */ url?: string; /** * File name of the original file. * @maxLength 255 */ filename?: string | null; /** * File [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types). * @maxLength 100 */ mimeType?: string | null; } interface TemplateMessagePayload { /** Title displayed in the message. */ title?: string | null; /** * List of buttons to display with the message. * Buttons can either open a URL or pass interaction details to the * [Button Interacted Webhook](https://dev.wix.com/api/rest/all-apis/inbox/button-interacted-webhook). * * Maximum: 10 buttons. * @maxSize 10 */ buttons?: Button[]; /** * Controls whether the message is displayed in portrait or landscape layout. * * Default: `PORTRAIT`. */ orientation?: OrientationWithLiterals; /** * List of lines of text. Each item in the array is displayed on a new line. * * Max: 10 lines (up to 512 characters per line). * @maxSize 10 */ textLines?: string[]; /** * URL where the icon is hosted. * @format WEB_URL * @maxLength 2000 */ imageUrl?: string | null; } interface Button { /** * Button label text. * @minLength 1 * @maxLength 16384 */ label?: string; /** * If included, the button launches the specified URL. * @format WEB_URL * @maxLength 16384 */ launchUrl?: string | null; /** * Properties to pass to the * [Button Interacted webhook](https://dev.wix.com/api/rest/inbox/messages/button-interacted-webhook) * when the button is clicked. */ postbackProperties?: PostbackProperties; } interface PostbackProperties { /** * [Your app's](https://dev.wix.com/dc3/my-apps) App ID. * @readonly * @format GUID */ appId?: string | null; /** * ID you define for the interaction, to be handled by your server. * @minLength 1 * @maxLength 256 */ interactionId?: string; } declare enum Orientation { /** Unknown orientation. */ UNKNOWN_ORIENTATION = "UNKNOWN_ORIENTATION", /** Portrait layout. */ PORTRAIT = "PORTRAIT", /** Landscape layout. */ LANDSCAPE = "LANDSCAPE" } /** @enumType */ type OrientationWithLiterals = Orientation | 'UNKNOWN_ORIENTATION' | 'PORTRAIT' | 'LANDSCAPE'; interface MinimalMessagePayload { /** * Message text. * @minLength 1 * @maxLength 16384 */ text?: string; /** * URL where the icon is hosted. * @format WEB_URL * @maxLength 2000 */ iconUrl?: string | null; /** * If included, URL the user is redirected to when clicking the message. * @format WEB_URL * @maxLength 2000 */ url?: string | null; } interface FormMessagePayload { /** * Form title displayed in the message. * @minLength 1 * @maxLength 256 */ title?: string | null; /** * Form description displayed below the title. * @minLength 1 * @maxLength 16384 */ description?: string | null; /** * List of form fields and values. * @minSize 1 * @maxSize 15 */ fields?: FormField[]; /** * List of files and/or images attached to the form. * * List items are displayed as separate messages * in Inbox and the site's chat widget. * @maxSize 15 */ media?: MediaItem[]; } interface FormField { /** * Form field display name. * @maxLength 8192 */ name?: string; /** * Submitted value. * @maxLength 8192 */ value?: string; } interface MediaItem extends MediaItemMediaOneOf { /** * Image message. * Can contain an image from Wix Media * or from an external provider. */ image?: ImageMessage; /** * File attachment. * Can contain a file from Wix Media or an external provider. */ file?: FileMessage; } /** @oneof */ interface MediaItemMediaOneOf { /** * Image message. * Can contain an image from Wix Media * or from an external provider. */ image?: ImageMessage; /** * File attachment. * Can contain a file from Wix Media or an external provider. */ file?: FileMessage; } interface SystemMessagePayload { /** * Text message. `\n` renders as a line break. * @maxLength 16384 */ text?: string; /** * List of buttons to display with the message. * Buttons can either open a URL or pass interaction details to the * [Button Interacted Webhook](https://dev.wix.com/api/rest/all-apis/inbox/button-interacted-webhook). * * Maximum: 10 buttons. * @maxSize 10 */ buttons?: Button[]; /** * URL where the icon is hosted. * @format WEB_URL * @maxLength 2000 */ imageUrl?: string | null; } interface IdentificationData extends IdentificationDataIdOneOf { /** * Anonymous site visitor ID. * @format GUID */ anonymousVisitorId?: string; /** * Site * [member](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fmember-permissions/members) * ID. * @format GUID */ memberId?: string; /** * User ID of the site owner or a site contributor. * @format GUID */ wixUserId?: string; /** * App ID. * @format GUID */ appId?: string; /** * Optional site * [contact](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fcontacts) ID. * @format GUID * @readonly */ contactId?: string | null; } /** @oneof */ interface IdentificationDataIdOneOf { /** * Anonymous site visitor ID. * @format GUID */ anonymousVisitorId?: string; /** * Site * [member](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fmember-permissions/members) * ID. * @format GUID */ memberId?: string; /** * User ID of the site owner or a site contributor. * @format GUID */ wixUserId?: string; /** * App ID. * @format GUID */ appId?: string; } interface Badge { /** Display text. */ text?: string; /** * URL where the icon is hosted. * @format WEB_URL */ iconUrl?: string | null; /** * Controls whether the badge is visible to the participant. * Currently not supported in the Chat widget. */ badgeVisibility?: BadgeVisibilityWithLiterals; } declare enum BadgeVisibility { /** Unkown visibility. */ UNKNOWN_BADGE_VISIBILITY = "UNKNOWN_BADGE_VISIBILITY", /** Visible to the participant and site collaborators. */ BUSINESS_AND_PARTICIPANT = "BUSINESS_AND_PARTICIPANT", /** Visible to site collaborators only. */ BUSINESS = "BUSINESS" } /** @enumType */ type BadgeVisibilityWithLiterals = BadgeVisibility | 'UNKNOWN_BADGE_VISIBILITY' | 'BUSINESS_AND_PARTICIPANT' | 'BUSINESS'; declare enum ChannelType { UNKNOWN_CHANNEL_TYPE = "UNKNOWN_CHANNEL_TYPE", CHAT = "CHAT", EMAIL = "EMAIL", SMS = "SMS", FACEBOOK = "FACEBOOK", INSTAGRAM = "INSTAGRAM", WHATSAPP = "WHATSAPP" } /** @enumType */ type ChannelTypeWithLiterals = ChannelType | 'UNKNOWN_CHANNEL_TYPE' | 'CHAT' | 'EMAIL' | 'SMS' | 'FACEBOOK' | 'INSTAGRAM' | 'WHATSAPP'; declare enum MessageVisibility { /** Unknown message visibility. */ UNKNOWN_VISIBILITY = "UNKNOWN_VISIBILITY", /** Visible to the participant and site collaborators. */ BUSINESS_AND_PARTICIPANT = "BUSINESS_AND_PARTICIPANT", /** Visible to site collaborators only. */ BUSINESS = "BUSINESS" } /** @enumType */ type MessageVisibilityWithLiterals = MessageVisibility | 'UNKNOWN_VISIBILITY' | 'BUSINESS_AND_PARTICIPANT' | 'BUSINESS'; declare enum MessageDirection { /** Unknown message direction. */ UNKNOWN_DIRECTION = "UNKNOWN_DIRECTION", /** The message was sent from the business to the participant. */ BUSINESS_TO_PARTICIPANT = "BUSINESS_TO_PARTICIPANT", /** The message was sent from the participant to the business. */ PARTICIPANT_TO_BUSINESS = "PARTICIPANT_TO_BUSINESS" } /** @enumType */ type MessageDirectionWithLiterals = MessageDirection | 'UNKNOWN_DIRECTION' | 'BUSINESS_TO_PARTICIPANT' | 'PARTICIPANT_TO_BUSINESS'; interface ListMessagesRequest { /** * ID of the conversation that contains the intended messages. * @format GUID */ conversationId: string; /** * __Required.__ * Filters for messages with the specified visibility setting. */ visibility?: MessageVisibilityWithLiterals; paging?: CursorPaging; /** only message_sequence is supported for field name */ sorting?: Sorting; } interface CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface ListMessagesResponse { /** List of messages between the specified visitor and the site. */ messages?: Message[]; /** Details on the paged set of results returned. */ pagingMetadata?: PagingMetadataV2; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface SendMessageRequest { /** * ID of the conversation to add the message to. * @format GUID */ conversationId: string; /** Message to send. */ message: Message; /** * Controls whether the message triggers notifications when it's received. * * Default: `false` */ sendNotifications?: boolean; /** * Controls whether the unread count and conversation summary * are updated in the * [Message List](https://support.wix.com/en/article/wix-inbox-getting-started#view-your-messages). * * If `true`, unread count and conversation summary are not updated. * Deprecated: Use `Message.silent` instead. * * Default: `false` * @deprecated Controls whether the unread count and conversation summary * are updated in the * [Message List](https://support.wix.com/en/article/wix-inbox-getting-started#view-your-messages). * * If `true`, unread count and conversation summary are not updated. * Deprecated: Use `Message.silent` instead. * * Default: `false` * @replacedBy Message.silent * @targetRemovalDate 2026-06-01 */ silent?: boolean; /** * Controls which identity to use in the message's `sender` property. * Default: `CALLER` * For 3rd-party apps, the app is the caller. */ sendAs?: OverrideSenderOptionsWithLiterals; } declare enum OverrideSenderOptions { /** Uses the identity included in the request header. */ CALLER = "CALLER", /** Uses the `anonymousVisitorId`, `contactId`, or `memberId` of the conversation's participant. */ PARTICIPANT = "PARTICIPANT", /** For internal use. Uses the `wixUserId` of the person sending messages on behalf of the business. */ BUSINESS_USER = "BUSINESS_USER" } /** @enumType */ type OverrideSenderOptionsWithLiterals = OverrideSenderOptions | 'CALLER' | 'PARTICIPANT' | 'BUSINESS_USER'; interface SendMessageResponse { /** Sent message. */ message?: Message; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function listMessages(): __PublicMethodMetaInfo<'GET', {}, ListMessagesRequest$1, ListMessagesRequest, ListMessagesResponse$1, ListMessagesResponse>; declare function sendMessage(): __PublicMethodMetaInfo<'POST', {}, SendMessageRequest$1, SendMessageRequest, SendMessageResponse$1, SendMessageResponse>; export { type __PublicMethodMetaInfo, listMessages, sendMessage };