/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * Webitel API * OpenAPI spec version: 24.04.0 */ import * as zod from 'zod'; export const GetTimelineTimelineParams = zod.object({ contact_id: zod.string(), }); export const GetTimelineTimelineQueryParams = zod.object({ page: zod.string().optional(), size: zod.string().optional(), q: zod.string().optional(), sort: zod.string().optional(), fields: zod.array(zod.string()).optional(), ids: zod.array(zod.string()).optional(), dateFrom: zod.string().optional(), dateTo: zod.string().optional(), type: zod .array( zod.enum([ 'chat', 'call', 'email', ]), ) .optional(), }); export const getTimelineTimelineResponseDaysItemItemsItemTypeDefault = `chat`; export const GetTimelineTimelineResponse = zod.object({ days: zod .array( zod.object({ callsCount: zod.string().optional(), chatsCount: zod.string().optional(), dayTimestamp: zod.string().optional(), emailsCount: zod.string().optional(), items: zod .array( zod.object({ call: zod .object({ closedAt: zod.string().optional(), duration: zod.string().optional(), files: zod .array( zod.object({ id: zod.string().optional(), mimeType: zod.string().optional(), name: zod.string().optional(), size: zod.string().optional(), startAt: zod.string().optional(), stopAt: zod.string().optional(), }), ) .optional(), flowScheme: zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .optional() .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), gateway: zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .optional() .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), id: zod.string().optional(), isDetailed: zod.boolean().optional(), isInbound: zod.boolean().optional(), isMissed: zod.boolean().optional(), participants: zod .array( zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), ) .optional(), queue: zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .optional() .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), totalDuration: zod.string().optional(), transcripts: zod .array( zod.object({ file: zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .optional() .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), id: zod.string().optional(), locale: zod.string().optional(), }), ) .optional(), }) .optional(), chat: zod .object({ closedAt: zod.string().optional(), duration: zod.string().optional(), flowScheme: zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .optional() .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), gateway: zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .optional() .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), id: zod.string().optional(), isDetailed: zod.boolean().optional(), isInbound: zod.boolean().optional(), isMissed: zod.boolean().optional(), participants: zod .array( zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), ) .optional(), queue: zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .optional() .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), }) .optional(), createdAt: zod.string().optional(), email: zod .object({ attachments: zod .array( zod.object({ id: zod.string().optional(), mime: zod.string().optional(), name: zod.string().optional(), size: zod.string().optional(), url: zod.string().optional(), }), ) .optional(), body: zod.string().optional(), cc: zod.array(zod.string()).optional(), from: zod.array(zod.string()).optional(), html: zod.string().optional(), id: zod.string().optional(), isDetailed: zod.boolean().optional(), isInbound: zod.boolean().optional(), owner: zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .optional() .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), profile: zod .object({ id: zod .string() .optional() .describe('Reference Object unique ID.'), name: zod .string() .optional() .describe('Reference Object display name.'), type: zod .string() .optional() .describe('Reference Object well-known type.'), }) .optional() .describe( 'Lookup reference information.\nSimplified search filter to uniquely identify related object.', ), sender: zod.array(zod.string()).optional(), subject: zod.string().optional(), to: zod.array(zod.string()).optional(), }) .optional(), type: zod .enum([ 'chat', 'call', 'email', ]) .default( getTimelineTimelineResponseDaysItemItemsItemTypeDefault, ), }), ) .optional(), }), ) .optional(), next: zod.boolean().optional(), page: zod.string().optional(), }); export const GetTimelineCounterTimelineParams = zod.object({ contact_id: zod.string(), }); export const GetTimelineCounterTimelineResponse = zod.object({ callsCount: zod.string().optional(), chatsCount: zod.string().optional(), dateFrom: zod.string().optional(), dateTo: zod.string().optional(), emailsCount: zod.string().optional(), });