@prass/botpress-native
Version:
A simple and powerful SDK for integrating Botpress Chat API with React Native,
18 lines (17 loc) • 1.16 kB
TypeScript
import { ListConversationsParams } from "../../types/botpress";
import { Botpress } from "../Botpress";
import { ListConversationsResponse } from "../../types/botpress.response";
/**
* Handles the API request to retrieve a paginated list of conversations for the authenticated user.
*
* This function sends a GET request to the Botpress API and fetches the list of conversations.
* If a `nextToken` is provided, it will be included in the request to support pagination.
*
* @param this - The `Botpress` class instance, providing access to class properties like `ChatApiBaseUrl` and `userKey`.
* @param {ListConversationsParams} params - Parameters for listing conversations.
* @param {string} [params.nextToken] - Optional token for pagination to fetch the next set of conversations.
*
* @returns {Promise<ListConversationsResponse>} The retrieved list of conversations along with pagination metadata.
* @throws {Exception} If the request fails, throws a custom exception with relevant error details.
*/
export declare function handleListConversations(this: Botpress, { nextToken }: ListConversationsParams): Promise<ListConversationsResponse>;