import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types'; import { M as MessageVisibilityWithLiterals, L as ListMessagesOptions, a as ListMessagesResponse, b as Message, S as SendMessageOptions, c as SendMessageResponse, d as MessageButtonInteractedEnvelope, e as MessageSentToBusinessEnvelope } from './crm-inbox-v2-message-messages.universal-DA62eESi.js'; export { a9 as ActionEvent, H as AddMessageIndicationsRequest, J as AddMessageIndicationsResponse, A as Badge, B as BadgeVisibility, ad as BaseEventMetadata, n as BasicMessageData, o as BasicMessageDataDataOneOf, m as BasicMessagePayload, q as Button, U as ButtonInteracted, f as ChannelType, C as ContentType, X as CursorPaging, _ as Cursors, N as CustomMessageData, a3 as DomainEvent, a4 as DomainEventBodyOneOf, a2 as Empty, a5 as EntityCreatedEvent, a8 as EntityDeletedEvent, a7 as EntityUpdatedEvent, ae as EventMetadata, F as FileMessage, u as FormField, t as FormMessagePayload, G as GetMessageIndicationsRequest, D as GetMessageIndicationsResponse, a0 as GetMessageRequest, a1 as GetMessageResponse, y as IdentificationData, z as IdentificationDataIdOneOf, p as ImageMessage, I as IndicationType, R as InteractionInfo, V as ListMessagesRequest, v as MediaItem, w as MediaItemMediaOneOf, k as MessageContent, l as MessageContentPayloadOneOf, h as MessageDirection, aa as MessageEnvelope, E as MessageIndication, Q as MessageSentToBusiness, K as MessageSentToParticipant, g as MessageVisibility, s as MinimalMessagePayload, O as Orientation, j as OverrideSenderOptions, Z as PagingMetadataV2, P as PerformedBy, r as PostbackProperties, a6 as RestoreInfo, $ as SendMessageRequest, i as SortOrder, Y as Sorting, x as SystemMessagePayload, T as TemplateMessagePayload, W as WebhookIdentityType, ab as WebhooksIdentificationData, ac as WebhooksIdentificationDataIdOneOf } from './crm-inbox-v2-message-messages.universal-DA62eESi.js'; declare function listMessages$1(httpClient: HttpClient): ListMessagesSignature; interface ListMessagesSignature { /** * Retrieves messages between the business and participant. * * * Up to 30 messages are returned per request. If the number of messages in a conversation is larger than 30, * `pagingMetadata.cursors` is returned in the response, indicating that another page of results is available. * To retrieve the next page of messages, pass the `next` cursor value * in the next request's `paging.cursor` parameter. * * To ensure you'll always retrieve the next record, * use the same visibility and sorting * in the first request and all subsequent requests. * * By default, * 30 messages are retrieved and sorted by `sequence` in descending order * (the most recent messages are first in the list). * @param - ID of the conversation that contains the intended messages. * @param - __Required.__ * Filters for messages with the specified visibility setting. * * - `"BUSINESS_AND_PARTICIPANT"`: Return messages visible to the business and the participant. * - `"BUSINESS"`: Return all messages. * @param - Additional options for listing messages. */ (conversationId: string, visibility: MessageVisibilityWithLiterals, options?: ListMessagesOptions | undefined): Promise; } declare function sendMessage$1(httpClient: HttpClient): SendMessageSignature; interface SendMessageSignature { /** * Sends a message to the business or participant. * * * Specify the message type in `message.content` * by including the appropriate object: `basic`, `template`, `minimal`, or `form`. * For more information on message types * and how each type renders in Inbox and the Chat widget, * see [Message Types](#message-types). * @param - ID of the conversation to add the message to. * @param - Message to send. * @param - Additional options for sending a message. */ (conversationId: string, message: Message, options?: SendMessageOptions | undefined): Promise; } declare const onMessageButtonInteracted$1: EventDefinition; declare const onMessageSentToBusiness$1: EventDefinition; declare const listMessages: MaybeContext & typeof listMessages$1>; declare const sendMessage: MaybeContext & typeof sendMessage$1>; /** * Triggered when a postback button is clicked. */ declare const onMessageButtonInteracted: BuildEventDefinition; /** * Triggered when a visitor, contact, or member * sends a message to the business. */ declare const onMessageSentToBusiness: BuildEventDefinition; export { ListMessagesOptions, ListMessagesResponse, Message, MessageButtonInteractedEnvelope, MessageSentToBusinessEnvelope, SendMessageOptions, SendMessageResponse, listMessages, onMessageButtonInteracted, onMessageSentToBusiness, sendMessage };