/** * 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 CasesChatCatalogGetCaseChatHistoryParams = zod.object({ case_id: zod.string().describe('Contact identificator'), chat_id: zod.string().describe('Unique chat dialog'), }); export const CasesChatCatalogGetCaseChatHistoryQueryParams = zod.object({ 'offset.id': zod .string() .optional() .describe('Messages ONLY starting from the specified message ID'), 'offset.date': zod .string() .optional() .describe('Messages ONLY been sent before the specified epochtime(milli).'), size: zod.number().optional().describe('Number of messages to return.'), page: zod.number().optional(), q: zod.string().optional().describe('Search term: message.text'), fields: zod .array(zod.string()) .optional() .describe('Fields to return into result.'), groupString: zod .string() .optional() .describe( 'Includes the history of ONLY those dialogs\nwhose member channel(s) contain\na specified set of variables.', ), }); export const casesChatCatalogGetCaseChatHistoryResponseMessagesItemKeyboardButtonsItemRowItemShareDefault = `phone`; export const CasesChatCatalogGetCaseChatHistoryResponse = zod.object({ chats: zod .array( zod .object({ context: zod .record(zod.string(), zod.string()) .optional() .describe('Context. Variables.'), dc: zod .string() .optional() .describe('[D]omain[C]omponent primary ID.'), id: zod .string() .optional() .describe( 'Unique identifier for this chat.\n[FROM] Member / Channel ID.\n\n// [TO] Group. Conversation ID.\n string chat_id = 2;', ), invite: zod .object({ date: zod.string().optional(), from: zod.string().optional(), }) .optional() .describe('OPTIONAL. Invite[d] BY member info.'), join: zod .string() .optional() .describe( 'OPTIONAL. A non-zero value indicates that\nthe participant has joined the chat.', ), left: zod.string().optional(), peer: zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod .string() .optional() .describe('Contact display **name**.'), type: zod .string() .optional() .describe('Contact **type** provider.'), }) .optional() .describe('[FROM]: User identity. Seed.'), queue: zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod .string() .optional() .describe('Contact display **name**.'), type: zod .string() .optional() .describe('Contact **type** provider.'), }) .optional() .describe('Peer contact.'), title: zod.string().optional().describe('[TO]: Chat title.'), via: zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod .string() .optional() .describe('Contact display **name**.'), type: zod .string() .optional() .describe('Contact **type** provider.'), }) .optional() .describe('[FROM] VIA text gateway profile.'), }) .describe( 'The Chat info.\nAlias: participant, subscriber, member, peer, leg.', ), ) .optional(), messages: zod .array( zod .object({ chat: zod .object({ context: zod .record(zod.string(), zod.string()) .optional() .describe('Context. Variables.'), dc: zod .string() .optional() .describe('[D]omain[C]omponent primary ID.'), id: zod .string() .optional() .describe( 'Unique identifier for this chat.\n[FROM] Member / Channel ID.\n\n// [TO] Group. Conversation ID.\n string chat_id = 2;', ), invite: zod .object({ date: zod.string().optional(), from: zod.string().optional(), }) .optional() .describe('OPTIONAL. Invite[d] BY member info.'), join: zod .string() .optional() .describe( 'OPTIONAL. A non-zero value indicates that\nthe participant has joined the chat.', ), left: zod.string().optional(), peer: zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod .string() .optional() .describe('Contact display **name**.'), type: zod .string() .optional() .describe('Contact **type** provider.'), }) .optional() .describe('[FROM]: User identity. Seed.'), queue: zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod .string() .optional() .describe('Contact display **name**.'), type: zod .string() .optional() .describe('Contact **type** provider.'), }) .optional() .describe('Peer contact.'), title: zod.string().optional().describe('[TO]: Chat title.'), via: zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod .string() .optional() .describe('Contact display **name**.'), type: zod .string() .optional() .describe('Contact **type** provider.'), }) .optional() .describe('[FROM] VIA text gateway profile.'), }) .optional() .describe('Conversation the message belongs to ..'), context: zod .record(zod.string(), zod.string()) .optional() .describe('Context. Variables. Environment.'), date: zod .string() .optional() .describe('Timestamp when this message was sent (published).'), edit: zod .string() .optional() .describe('Timestamp when this message was last edited.'), file: zod .object({ id: zod.string().optional(), name: zod.string().optional(), size: zod.string().optional(), type: zod.string().optional(), url: zod.string().optional(), }) .optional() .describe('Message Media. Attachment.'), from: zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod .string() .optional() .describe('Contact display **name**.'), type: zod .string() .optional() .describe('Contact **type** provider.'), }) .optional() .describe('Sender of the message.'), id: zod .string() .optional() .describe('Unique message identifier inside this chat.'), keyboard: zod .object({ buttons: zod .array( zod.object({ row: zod .array( zod.object({ code: zod .string() .optional() .describe('Postback/Callback data.'), share: zod .enum([ 'phone', 'email', 'contact', 'location', ]) .default( casesChatCatalogGetCaseChatHistoryResponseMessagesItemKeyboardButtonsItemRowItemShareDefault, ) .describe('Request to share contact info.'), text: zod .string() .optional() .describe('Caption to display.'), url: zod .string() .optional() .describe('URL to navigate to ..'), }), ) .optional(), }), ) .optional(), noInput: zod .boolean() .optional() .describe( 'An option used to block input to force\nthe user to respond with one of the buttons.', ), }) .optional() .describe('Keyboard. Buttons. Quick Replies.'), kind: zod.string().optional(), postback: zod .object({ code: zod .string() .optional() .describe('Data associated with the Button.'), mid: zod .string() .optional() .describe('Message ID of the button.'), text: zod .string() .optional() .describe("Button's display caption."), }) .optional() .describe('Postback. Reply Button Click[ed].'), sender: zod .object({ context: zod .record(zod.string(), zod.string()) .optional() .describe('Context. Variables.'), dc: zod .string() .optional() .describe('[D]omain[C]omponent primary ID.'), id: zod .string() .optional() .describe( 'Unique identifier for this chat.\n[FROM] Member / Channel ID.\n\n// [TO] Group. Conversation ID.\n string chat_id = 2;', ), invite: zod .object({ date: zod.string().optional(), from: zod.string().optional(), }) .optional() .describe('OPTIONAL. Invite[d] BY member info.'), join: zod .string() .optional() .describe( 'OPTIONAL. A non-zero value indicates that\nthe participant has joined the chat.', ), left: zod.string().optional(), peer: zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod .string() .optional() .describe('Contact display **name**.'), type: zod .string() .optional() .describe('Contact **type** provider.'), }) .optional() .describe('[FROM]: User identity. Seed.'), queue: zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod .string() .optional() .describe('Contact display **name**.'), type: zod .string() .optional() .describe('Contact **type** provider.'), }) .optional() .describe('Peer contact.'), title: zod.string().optional().describe('[TO]: Chat title.'), via: zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod .string() .optional() .describe('Contact display **name**.'), type: zod .string() .optional() .describe('Contact **type** provider.'), }) .optional() .describe('[FROM] VIA text gateway profile.'), }) .optional() .describe( 'Chat Sender of the message, sent on behalf of a chat (member).', ), text: zod.string().optional().describe('Message Text.'), }) .describe('Chat Message.'), ) .optional() .describe('Dataset page of messages.'), next: zod.boolean().optional(), page: zod.number().optional().describe('Dataset page number.'), peers: zod .array( zod .object({ id: zod .string() .optional() .describe( 'Contact unique **ID**entifier.\nContact **type**-specific string.', ), name: zod.string().optional().describe('Contact display **name**.'), type: zod.string().optional().describe('Contact **type** provider.'), }) .describe('Peer contact.'), ) .optional(), });