/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * Webitel API * OpenAPI spec version: 24.04.0 */ import * as zod from 'zod'; /** * @summary Search for Contact Comment(s) ... */ export const SearchCommentsParams = zod.object({ contact_id: zod.string().describe('Contact ID associated with.'), }); export const searchCommentsQueryModeDefault = `READ`; export const SearchCommentsQueryParams = zod.object({ page: zod .number() .optional() .describe('Page number of result. offset = ((page-1)*size)'), size: zod .number() .optional() .describe('Size of result page. limit = (size++)'), q: zod .string() .optional() .describe( 'Search term: comment text;\n`?` - matches any character\n`*` - matches 0 or more characters\n\nterm-of-search: lookup[name|...]', ), sort: zod .array(zod.string()) .optional() .describe('Sort the result according to fields.'), fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved as a result.'), id: zod .array(zod.string()) .optional() .describe('Comment(s) with unique ID only.'), mode: zod .enum([ 'READ', 'WRITE', 'DELETE', ]) .default(searchCommentsQueryModeDefault) .describe( 'The requirement of [M]andatory [A]ccess [C]ontrol.\n\n - READ: Can `fetch` record. [GET]\n - WRITE: Can `update` record. [PUT|PATCH]\n - DELETE: Can `delete` record. [DELETE]', ), 'date.since': zod .string() .optional() .describe('Since timestamp(milli). Not before.'), 'date.until': zod .string() .optional() .describe('Until timestamp(milli). Not after.'), 'author.id': zod.string().optional().describe('Reference Object unique ID.'), 'author.type': zod .string() .optional() .describe('Reference Object well-known type.'), 'author.name': zod .string() .optional() .describe('Reference Object display name.'), 'editor.id': zod.string().optional().describe('Reference Object unique ID.'), 'editor.type': zod .string() .optional() .describe('Reference Object well-known type.'), 'editor.name': zod .string() .optional() .describe('Reference Object display name.'), }); export const SearchCommentsResponse = zod .object({ data: zod .array( zod.object({ createdAt: zod .string() .optional() .describe('The user who created this Field.'), createdBy: 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('Timestamp(milli) of the Field creation.'), etag: zod .string() .optional() .describe( 'Unique ID of the latest version of the update.\nThis ID changes after any update to the underlying value(s).', ), format: zod .array( zod.object({ bold: zod.looseObject({}).optional(), codeblock: zod .object({ language: zod.string().optional(), }) .optional(), italic: zod.looseObject({}).optional(), length: zod .number() .optional() .describe('Length text runes count.'), link: zod .object({ url: zod.string().optional(), }) .optional(), monospace: zod.looseObject({}).optional(), offset: zod .number() .optional() .describe('Offset text runes count.'), strikethrough: zod.looseObject({}).optional(), underline: zod.looseObject({}).optional(), }), ) .optional() .describe('Styles of the text components.'), id: zod .string() .optional() .describe('The unique ID of the Comment. Never changes.'), text: zod .string() .optional() .describe('Rich Text, multi-line[d] string value.'), updatedAt: zod .string() .optional() .describe( 'Timestamp(milli) of the last Field update.\nTake part in Etag generation.', ), updatedBy: 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('The user who performed last Update.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), }), ) .optional() .describe('Comment dataset page.'), next: zod.boolean().optional(), page: zod .number() .optional() .describe('The page number of the partial result.'), }) .describe('Comment dataset.'); /** * @summary Publish comment for a Contact. */ export const PublishCommentCommentsParams = zod.object({ contact_id: zod.string().describe('Link contact ID.'), }); export const PublishCommentCommentsQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved as a result.'), }); export const PublishCommentCommentsBody = zod.object({ etag: zod .string() .optional() .describe('Unique ID of the latest version of an existing resorce.'), format: zod .array( zod.object({ bold: zod.looseObject({}).optional(), codeblock: zod .object({ language: zod.string().optional(), }) .optional(), italic: zod.looseObject({}).optional(), length: zod.number().optional().describe('Length text runes count.'), link: zod .object({ url: zod.string().optional(), }) .optional(), monospace: zod.looseObject({}).optional(), offset: zod.number().optional().describe('Offset text runes count.'), strikethrough: zod.looseObject({}).optional(), underline: zod.looseObject({}).optional(), }), ) .optional() .describe('NEW Text components styling format.'), text: zod.string().describe('NEW Text of the comment.'), }); export const PublishCommentCommentsResponse = zod.object({ createdAt: zod .string() .optional() .describe('The user who created this Field.'), createdBy: 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('Timestamp(milli) of the Field creation.'), etag: zod .string() .optional() .describe( 'Unique ID of the latest version of the update.\nThis ID changes after any update to the underlying value(s).', ), format: zod .array( zod.object({ bold: zod.looseObject({}).optional(), codeblock: zod .object({ language: zod.string().optional(), }) .optional(), italic: zod.looseObject({}).optional(), length: zod.number().optional().describe('Length text runes count.'), link: zod .object({ url: zod.string().optional(), }) .optional(), monospace: zod.looseObject({}).optional(), offset: zod.number().optional().describe('Offset text runes count.'), strikethrough: zod.looseObject({}).optional(), underline: zod.looseObject({}).optional(), }), ) .optional() .describe('Styles of the text components.'), id: zod .string() .optional() .describe('The unique ID of the Comment. Never changes.'), text: zod .string() .optional() .describe('Rich Text, multi-line[d] string value.'), updatedAt: zod .string() .optional() .describe( 'Timestamp(milli) of the last Field update.\nTake part in Etag generation.', ), updatedBy: 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('The user who performed last Update.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), }); /** * @summary Delete Comment(s) for Contact ... */ export const DeleteCommentCommentsParams = zod.object({ contact_id: zod.string().describe('Contact ID associated with.'), etag: zod .array(zod.string()) .min(1) .describe('Set of unique ID(s) to remove.'), }); export const DeleteCommentCommentsQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved as a result.'), }); export const DeleteCommentCommentsResponseItem = zod.object({ createdAt: zod .string() .optional() .describe('The user who created this Field.'), createdBy: 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('Timestamp(milli) of the Field creation.'), etag: zod .string() .optional() .describe( 'Unique ID of the latest version of the update.\nThis ID changes after any update to the underlying value(s).', ), format: zod .array( zod.object({ bold: zod.looseObject({}).optional(), codeblock: zod .object({ language: zod.string().optional(), }) .optional(), italic: zod.looseObject({}).optional(), length: zod.number().optional().describe('Length text runes count.'), link: zod .object({ url: zod.string().optional(), }) .optional(), monospace: zod.looseObject({}).optional(), offset: zod.number().optional().describe('Offset text runes count.'), strikethrough: zod.looseObject({}).optional(), underline: zod.looseObject({}).optional(), }), ) .optional() .describe('Styles of the text components.'), id: zod .string() .optional() .describe('The unique ID of the Comment. Never changes.'), text: zod .string() .optional() .describe('Rich Text, multi-line[d] string value.'), updatedAt: zod .string() .optional() .describe( 'Timestamp(milli) of the last Field update.\nTake part in Etag generation.', ), updatedBy: 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('The user who performed last Update.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), }); export const DeleteCommentCommentsResponse = zod.array( DeleteCommentCommentsResponseItem, ); /** * @summary Update (edit) specific Comment text owned */ export const UpdateCommentCommentsParams = zod.object({ contact_id: zod.string().describe('Contact ID associated with.'), etag: zod .string() .describe('Unique ID of the latest version of an existing resorce.'), }); export const UpdateCommentCommentsQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved into result of changes.'), }); export const UpdateCommentCommentsBody = zod.object({ format: zod .array( zod.object({ bold: zod.looseObject({}).optional(), codeblock: zod .object({ language: zod.string().optional(), }) .optional(), italic: zod.looseObject({}).optional(), length: zod.number().optional().describe('Length text runes count.'), link: zod .object({ url: zod.string().optional(), }) .optional(), monospace: zod.looseObject({}).optional(), offset: zod.number().optional().describe('Offset text runes count.'), strikethrough: zod.looseObject({}).optional(), underline: zod.looseObject({}).optional(), }), ) .optional() .describe('NEW Text components styling format.'), text: zod.string().describe('NEW Text of the comment.'), }); export const UpdateCommentCommentsResponse = zod.object({ createdAt: zod .string() .optional() .describe('The user who created this Field.'), createdBy: 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('Timestamp(milli) of the Field creation.'), etag: zod .string() .optional() .describe( 'Unique ID of the latest version of the update.\nThis ID changes after any update to the underlying value(s).', ), format: zod .array( zod.object({ bold: zod.looseObject({}).optional(), codeblock: zod .object({ language: zod.string().optional(), }) .optional(), italic: zod.looseObject({}).optional(), length: zod.number().optional().describe('Length text runes count.'), link: zod .object({ url: zod.string().optional(), }) .optional(), monospace: zod.looseObject({}).optional(), offset: zod.number().optional().describe('Offset text runes count.'), strikethrough: zod.looseObject({}).optional(), underline: zod.looseObject({}).optional(), }), ) .optional() .describe('Styles of the text components.'), id: zod .string() .optional() .describe('The unique ID of the Comment. Never changes.'), text: zod .string() .optional() .describe('Rich Text, multi-line[d] string value.'), updatedAt: zod .string() .optional() .describe( 'Timestamp(milli) of the last Field update.\nTake part in Etag generation.', ), updatedBy: 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('The user who performed last Update.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), });