/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * Webitel API * OpenAPI spec version: 24.04.0 */ import * as zod from 'zod'; /** * @summary Remove variable(s) of the contact */ export const DeleteVariablesParams = zod.object({ contact_id: zod.string().describe('Contact ID associated with.'), }); export const deleteVariablesQueryEtagItemRegExp = /^.+$/; export const DeleteVariablesQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved as a result.'), etag: zod .array(zod.string().regex(deleteVariablesQueryEtagItemRegExp)) .describe('Set of unique ID(s) to remove.'), }); export const DeleteVariablesResponse = 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).', ), id: zod .string() .optional() .describe('The unique ID of the association. Never changes.'), key: zod.string().optional().describe('Key name of the variable.'), 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.'), value: zod .unknown() .optional() .describe('JSON value of the variable.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), }) .describe( "The Contact's variable.\nArbitrary data that is populated by users or clients.\nDuplicate keys and values are allowed.", ), ) .optional() .describe('Variable dataset page.'), next: zod.boolean().optional(), page: zod .number() .optional() .describe('The page number of the partial result.'), }) .describe('Variable dataset.'); /** * @summary List variables of the contact */ export const ListVariablesParams = zod.object({ contact_id: zod.string().describe('Contact ID associated with.'), }); export const ListVariablesQueryParams = 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: variable key;\n`?` - matches any one character\n`*` - matches 0 or more characters', ), 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('Record(s) with unique ID only.'), }); export const ListVariablesResponse = 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).', ), id: zod .string() .optional() .describe('The unique ID of the association. Never changes.'), key: zod.string().optional().describe('Key name of the variable.'), 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.'), value: zod .unknown() .optional() .describe('JSON value of the variable.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), }) .describe( "The Contact's variable.\nArbitrary data that is populated by users or clients.\nDuplicate keys and values are allowed.", ), ) .optional() .describe('Variable dataset page.'), next: zod.boolean().optional(), page: zod .number() .optional() .describe('The page number of the partial result.'), }) .describe('Variable dataset.'); /** * @summary Update or append variables to the contact */ export const MergeVariablesParams = zod.object({ contact_id: zod.string().describe('Link contact ID.'), }); export const MergeVariablesQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved as a result.'), }); export const mergeVariablesBodyKeyRegExp = /^\w+$/; export const MergeVariablesBodyItem = zod .object({ etag: zod .string() .optional() .describe('Unique ID of the latest version of an existing resorce.'), key: zod.string().regex(mergeVariablesBodyKeyRegExp).describe('NEW Key.'), value: zod.unknown().optional().describe('NEW Value.'), }) .describe("Input of the Contact's variable."); export const MergeVariablesBody = zod.array(MergeVariablesBodyItem); export const MergeVariablesResponse = 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).', ), id: zod .string() .optional() .describe('The unique ID of the association. Never changes.'), key: zod.string().optional().describe('Key name of the variable.'), 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.'), value: zod .unknown() .optional() .describe('JSON value of the variable.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), }) .describe( "The Contact's variable.\nArbitrary data that is populated by users or clients.\nDuplicate keys and values are allowed.", ), ) .optional() .describe('Variable dataset page.'), next: zod.boolean().optional(), page: zod .number() .optional() .describe('The page number of the partial result.'), }) .describe('Variable dataset.'); /** * @summary Reset all variables of the contact */ export const ResetVariablesParams = zod.object({ contact_id: zod.string().describe('Contact ID associated with.'), }); export const ResetVariablesQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved into result of changes.'), }); export const resetVariablesBodyKeyRegExp = /^\w+$/; export const ResetVariablesBodyItem = zod .object({ etag: zod .string() .optional() .describe('Unique ID of the latest version of an existing resorce.'), key: zod.string().regex(resetVariablesBodyKeyRegExp).describe('NEW Key.'), value: zod.unknown().optional().describe('NEW Value.'), }) .describe("Input of the Contact's variable."); export const ResetVariablesBody = zod.array(ResetVariablesBodyItem); export const ResetVariablesResponse = 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).', ), id: zod .string() .optional() .describe('The unique ID of the association. Never changes.'), key: zod.string().optional().describe('Key name of the variable.'), 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.'), value: zod .unknown() .optional() .describe('JSON value of the variable.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), }) .describe( "The Contact's variable.\nArbitrary data that is populated by users or clients.\nDuplicate keys and values are allowed.", ), ) .optional() .describe('Variable dataset page.'), next: zod.boolean().optional(), page: zod .number() .optional() .describe('The page number of the partial result.'), }) .describe('Variable dataset.'); /** * @summary Remove the contact's variable by etag */ export const DeleteVariableParams = zod.object({ contact_id: zod.string().describe('Contact ID associated with.'), etag: zod.string().describe('Unique ID to remove.'), }); export const DeleteVariableQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved as a result.'), }); export const DeleteVariableResponse = 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).', ), id: zod .string() .optional() .describe('The unique ID of the association. Never changes.'), key: zod.string().optional().describe('Key name of the variable.'), 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.'), value: zod.unknown().optional().describe('JSON value of the variable.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), }) .describe( "The Contact's variable.\nArbitrary data that is populated by users or clients.\nDuplicate keys and values are allowed.", ); /** * @summary Update contact variable */ export const UpdateVariable2Params = 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 UpdateVariable2QueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved into result of changes.'), }); export const updateVariable2BodyKeyRegExp = /^\w+$/; export const UpdateVariable2Body = zod.object({ key: zod.string().regex(updateVariable2BodyKeyRegExp).describe('NEW Key.'), value: zod.unknown().optional().describe('NEW Value.'), }); export const UpdateVariable2Response = 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).', ), id: zod .string() .optional() .describe('The unique ID of the association. Never changes.'), key: zod.string().optional().describe('Key name of the variable.'), 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.'), value: zod .unknown() .optional() .describe('JSON value of the variable.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), }) .describe( "The Contact's variable.\nArbitrary data that is populated by users or clients.\nDuplicate keys and values are allowed.", ), ) .optional() .describe('Variable dataset page.'), next: zod.boolean().optional(), page: zod .number() .optional() .describe('The page number of the partial result.'), }) .describe('Variable dataset.'); /** * @summary Update contact variable */ export const UpdateVariableParams = 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 UpdateVariableQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved into result of changes.'), }); export const updateVariableBodyKeyRegExp = /^\w+$/; export const UpdateVariableBody = zod.object({ key: zod.string().regex(updateVariableBodyKeyRegExp).describe('NEW Key.'), value: zod.unknown().optional().describe('NEW Value.'), }); export const UpdateVariableResponse = 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).', ), id: zod .string() .optional() .describe('The unique ID of the association. Never changes.'), key: zod.string().optional().describe('Key name of the variable.'), 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.'), value: zod .unknown() .optional() .describe('JSON value of the variable.'), ver: zod .number() .optional() .describe('Version of the latest update. Numeric sequence.'), }) .describe( "The Contact's variable.\nArbitrary data that is populated by users or clients.\nDuplicate keys and values are allowed.", ), ) .optional() .describe('Variable dataset page.'), next: zod.boolean().optional(), page: zod .number() .optional() .describe('The page number of the partial result.'), }) .describe('Variable dataset.');