/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * Webitel API * OpenAPI spec version: 24.04.0 */ import axios from '@aliasedDeps/api-services/axios'; import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'; import type { MessageHistorySearchLeftThreadsMessagesHistoryParams, MessageHistorySearchThreadMessagesHistoryParams, WebitelImApiGatewayV1SearchMessageHistoryResponse, } from '../_models'; // --- header start // export const // --- title start getWebitelImApiGatewayV1Messagehistory = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary Searches messages grouped by the user's closed membership periods within a thread. Active memberships are excluded — their messages are available via SearchThreadMessagesHistory. */ const messageHistorySearchLeftThreadsMessagesHistory = ( threadId: string, params?: MessageHistorySearchLeftThreadsMessagesHistoryParams, options?: AxiosRequestConfig, ): Promise< AxiosResponse > => { return axiosInstance.get( `/v1/threads/${threadId}/left_threads/messages`, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary Searches messages within a specific thread. Supports cursor-based pagination and field selection. */ const messageHistorySearchThreadMessagesHistory = ( threadId: string, params?: MessageHistorySearchThreadMessagesHistoryParams, options?: AxiosRequestConfig, ): Promise< AxiosResponse > => { return axiosInstance.get(`/v1/threads/${threadId}/messages`, { ...options, params: { ...params, ...options?.params, }, }); }; // --- footer start return { messageHistorySearchLeftThreadsMessagesHistory, messageHistorySearchThreadMessagesHistory, }; }; export type MessageHistorySearchLeftThreadsMessagesHistoryResult = AxiosResponse; export type MessageHistorySearchThreadMessagesHistoryResult = AxiosResponse; // --- footer end