import { ApiListPromise } from '@sinch/sdk-client'; import { Conversation, ConversationRecentMessage, CreateConversationRequestData, DeleteConversationRequestData, GetConversationRequestData, InjectEventRequestData, InjectEventResponse, InjectMessageRequestData, ListConversationsRequestData, ListRecentConversationsRequestData, StopActiveConversationRequestData, UpdateConversationRequestData } from '../../../models'; import { ConversationDomainApi } from '../conversation-domain-api'; import { LazyConversationApiClient } from '../conversation-service'; export declare class ConversationApi extends ConversationDomainApi { constructor(lazyApiClient: LazyConversationApiClient); /** * Create a conversation * Creates a new empty conversation. It is generally not needed to create a conversation explicitly since sending or receiving a message automatically creates a new conversation if it does not already exist between the given app and contact. Creating empty conversation is useful if the metadata of the conversation should be populated when the first message in the conversation is a contact message or the first message in the conversation comes out-of-band and needs to be injected with InjectMessage endpoint. * @param { CreateConversationRequestData } data - The data to provide to the API call. */ create(data: CreateConversationRequestData): Promise; /** * Delete a conversation * Deletes a conversation together with all the messages sent as part of the conversation. * @param { DeleteConversationRequestData } data - The data to provide to the API call. */ delete(data: DeleteConversationRequestData): Promise; /** * Get a conversation * Retrieves a conversation by id. A conversation has two participating entities, an app and a contact. * @param { GetConversationRequestData } data - The data to provide to the API call. */ get(data: GetConversationRequestData): Promise; /** * Inject an event * This operation injects a conversation event into a specific conversation. * @param { InjectEventRequestData } data - The data to provide to the API call. */ injectEvent(data: InjectEventRequestData): Promise; /** * Inject a message * This operation injects a conversation message into a specific conversation. * @param { InjectMessageRequestData } data - The data to provide to the API call. */ injectMessage(data: InjectMessageRequestData): Promise; /** * List conversations * This operation lists all conversations that are associated with an app and/or a contact. * @param { ListConversationsRequestData } data - The data to provide to the API call. * @return {ApiListPromise} */ list(data?: ListConversationsRequestData): ApiListPromise; /** * List recent conversations * This operation lists conversations and their most recent message, ordered by when the most recent message was sent for that conversation. * @param { ListRecentConversationsRequestData } data - The data to provide to the API call. * @return {ApiListPromise} */ listRecent(data: ListRecentConversationsRequestData): ApiListPromise; /** * Stop conversation * This operation stops the referenced conversation, if the conversation is still active. A new conversation will be created if a new message is exchanged between the app or contact that was part of the stopped conversation. * @param { StopActiveConversationRequestData } data - The data to provide to the API call. */ stopActive(data: StopActiveConversationRequestData): Promise; /** * Update a conversation * This operation updates a conversation which can, for instance, be used to update the metadata associated with a conversation. * @param { UpdateConversationRequestData } data - The data to provide to the API call. */ update(data: UpdateConversationRequestData): Promise; }