@prass/botpress-native
Version:
A simple and powerful SDK for integrating Botpress Chat API with React Native,
18 lines (17 loc) • 1.01 kB
TypeScript
import { DeleteConversationParams } from "../../types/botpress";
import { Botpress } from "../Botpress";
/**
/**
* Handles the logic to delete a conversation by its ID.
*
* This function makes an API request to Botpress to delete the conversation identified by the provided ID.
* It ensures that the user has been created (i.e., the user key is available) before proceeding with the request.
*
* @param this - The Botpress class instance, providing access to class properties like `ChatApiBaseUrl` and `userKey`.
* @param {DeleteConversationParams} params - The parameters containing the conversation ID.
* @param {string} params.id - The unique identifier of the conversation to delete.
*
* @returns {Promise<void>} Resolves when the conversation has been successfully deleted.
* @throws {Exception} If the request fails, throws a custom exception containing the error details.
*/
export declare function handleDeleteConversation(this: Botpress, { id }: DeleteConversationParams): Promise<void>;