UNPKG

@prass/botpress-native

Version:

A simple and powerful SDK for integrating Botpress Chat API with React Native,

18 lines (17 loc) 1.05 kB
import { GetConversationResponse } from "../../types/botpress.response"; import { Botpress } from "../Botpress"; import { GetConversationParams } from "../../types/botpress"; /** * Handles the logic to retrieve a conversation by its ID. * * This function makes an API call to fetch the conversation details from the Botpress system * using the provided conversation ID and the `x-user-key` header for authentication. * * @param this - The Botpress class instance, providing access to class properties like `ChatApiBaseUrl` and `userKey`. * @param {GetConversationParams} params - The parameters containing the conversation ID. * @param {string} params.id - The unique identifier of the conversation to retrieve. * * @returns {Promise<GetConversationResponse>} The details of the retrieved conversation. * @throws {Exception} If the request fails, throws a custom exception containing the error details. */ export declare function handleGetConversation(this: Botpress, { id }: GetConversationParams): Promise<GetConversationResponse>;