/** * 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 { ListCallExportsParams, ListScreenrecordingExportsParams, WebitelMediaExporterDeleteExportResponse, WebitelMediaExporterExportTask, WebitelMediaExporterListExportsResponse, WebitelMediaExporterPdfServiceCreateCallExportBody, WebitelMediaExporterPdfServiceCreateScreenrecordingExportBody, } from '../_models'; // --- header start // export const // --- title start getPdfService = // --- title end (axiosInstance: AxiosInstance = axios) => { // --- header end /** * @summary Lists the history of PDF exports for a specific agent. */ const listScreenrecordingExports = ( agentId: string, params?: ListScreenrecordingExportsParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get( `/agents/${agentId}/exports/pdf/screenrecordings`, { ...options, params: { ...params, ...options?.params, }, }, ); }; /** * @summary Creates a new task to generate a PDF export for an agent's screen recordings. This operation is asynchronous and returns a task metadata. */ const createScreenrecordingExport = ( agentId: string, webitelMediaExporterPdfServiceCreateScreenrecordingExportBody: WebitelMediaExporterPdfServiceCreateScreenrecordingExportBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/agents/${agentId}/exports/pdf/screenrecordings`, webitelMediaExporterPdfServiceCreateScreenrecordingExportBody, options, ); }; /** * @summary Lists the history of PDF exports for a specific call ID. */ const listCallExports = ( callId: string, params?: ListCallExportsParams, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.get(`/calls/${callId}/exports/pdf`, { ...options, params: { ...params, ...options?.params, }, }); }; /** * @summary Creates a new task to generate a PDF export for a specific call. Useful for documenting call transcripts or associated media. */ const createCallExport = ( callId: string, webitelMediaExporterPdfServiceCreateCallExportBody: WebitelMediaExporterPdfServiceCreateCallExportBody, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.post( `/calls/${callId}/exports/pdf`, webitelMediaExporterPdfServiceCreateCallExportBody, options, ); }; /** * @summary Deletes a specific export record from the history. */ const deleteExport = ( id: string, options?: AxiosRequestConfig, ): Promise> => { return axiosInstance.delete(`/exports/pdf/history/${id}`, options); }; // --- footer start return { listScreenrecordingExports, createScreenrecordingExport, listCallExports, createCallExport, deleteExport, }; }; export type ListScreenrecordingExportsResult = AxiosResponse; export type CreateScreenrecordingExportResult = AxiosResponse; export type ListCallExportsResult = AxiosResponse; export type CreateCallExportResult = AxiosResponse; export type DeleteExportResult = AxiosResponse; // --- footer end