/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * Webitel API * OpenAPI spec version: 24.04.0 */ import * as zod from 'zod'; /** * @summary Lists all communications linked to a specific case. Currently a feature for future development. */ export const ListCommunicationsParams = zod.object({ case_etag: zod.string().describe('Case identifier.'), }); export const ListCommunicationsQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('List of fields to include in the response.'), q: zod.string().optional().describe('Query string for filtering results.'), size: zod.number().optional().describe('Number of records per page.'), page: zod.number().optional().describe('Page number for pagination.'), sort: zod.string().optional().describe('Sorting order.'), }); export const ListCommunicationsResponse = zod .object({ data: zod .array( zod .object({ communicationId: zod .string() .optional() .describe('External communication ID.'), communicationType: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('Type of the communication (e.g., Chat, Call).'), etag: zod .string() .optional() .describe('Version of the communication record.'), id: zod .string() .optional() .describe('Database ID of the communication.'), ver: zod .number() .optional() .describe('Version of the communication record.'), }) .describe('Represents a single case communication.'), ) .optional() .describe('List of communications.'), next: zod.boolean().optional(), page: zod.number().optional().describe('Current page number.'), }) .describe('Response message for listing communications linked to a case.'); /** * @summary Links a communication to a specific case. */ export const LinkCommunicationParams = zod.object({ case_etag: zod.string().describe('Case identifier.'), }); export const LinkCommunicationQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('List of fields to include in the response.'), }); export const LinkCommunicationBody = zod .object({ communicationId: zod .string() .optional() .describe('External communication ID.'), communicationType: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('Type of the communication.'), }) .describe('Represents input data for creating or linking a communication.'); export const LinkCommunicationResponse = zod .object({ data: zod .array( zod .object({ communicationId: zod .string() .optional() .describe('External communication ID.'), communicationType: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('Type of the communication (e.g., Chat, Call).'), etag: zod .string() .optional() .describe('Version of the communication record.'), id: zod .string() .optional() .describe('Database ID of the communication.'), ver: zod .number() .optional() .describe('Version of the communication record.'), }) .describe('Represents a single case communication.'), ) .optional() .describe('List of linked communications.'), }) .describe('Response message after linking communications to a case.'); /** * @summary Unlinks a communication from a specific case. */ export const UnlinkCommunicationParams = zod.object({ case_etag: zod.string(), id: zod.string().describe('Communication identifier.'), }); export const UnlinkCommunicationQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('List of fields to include in the response.'), }); export const UnlinkCommunicationResponse = zod .object({ affected: zod.string().optional().describe('Affected rows.'), }) .describe('Response message after unlinking a communication from a case.');