/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * Webitel API * OpenAPI spec version: 24.04.0 */ import * as zod from 'zod'; /** * @summary Delete a condition */ export const DeleteConditionParams = zod.object({ id: zod .string() .describe( 'The unique ID of the condition to delete.\n\nUnique ID of the condition.', ), }); export const DeleteConditionResponse = zod.object({ assignee: 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 ID of the assignee that should be assigned if the condition is met (optional).', ), createdAt: zod .string() .optional() .describe( 'The timestamp (in milliseconds) of when the condition was created.', ), 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('The user who created this condition.'), expression: zod .string() .optional() .describe('The query or condition expression used to evaluate the group.'), group: 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 ID of the static group that should be assigned if the condition is met.', ), id: zod.string().optional().describe('The unique ID of the condition.'), updatedAt: zod .string() .optional() .describe('The timestamp (in milliseconds) of the last update.'), 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 the last update.'), }); /** * @summary Locate a condition by ID */ export const LocateConditionParams = zod.object({ id: zod.string().describe('Unique ID of the condition.'), }); export const LocateConditionQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved as a result.'), }); export const LocateConditionResponse = zod .object({ condition: zod .object({ assignee: 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 ID of the assignee that should be assigned if the condition is met (optional).', ), createdAt: zod .string() .optional() .describe( 'The timestamp (in milliseconds) of when the condition was created.', ), 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('The user who created this condition.'), expression: zod .string() .optional() .describe( 'The query or condition expression used to evaluate the group.', ), group: 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 ID of the static group that should be assigned if the condition is met.', ), id: zod.string().optional().describe('The unique ID of the condition.'), updatedAt: zod .string() .optional() .describe('The timestamp (in milliseconds) of the last update.'), 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 the last update.'), }) .optional(), }) .describe('Response message for locating a condition by ID.'); /** * @summary Update an existing condition */ export const UpdateCondition2Params = zod.object({ id: zod.string().describe('The unique ID of the condition to update.'), }); export const UpdateCondition2Body = zod .object({ assignee: 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 ID of the assignee that should be assigned if the condition is met (optional).', ), expression: zod .string() .optional() .describe( 'The query or condition expression used to evaluate the group.', ), group: zod .string() .optional() .describe( 'The ID of the static group that should be assigned if the condition is met.', ), position: zod .object({ condDown: zod.string().optional(), condUp: zod.string().optional(), }) .optional() .describe('The position of the condition in the group.'), }) .describe('Input message for creating/updating a condition.'); export const UpdateCondition2Response = zod.object({ assignee: 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 ID of the assignee that should be assigned if the condition is met (optional).', ), createdAt: zod .string() .optional() .describe( 'The timestamp (in milliseconds) of when the condition was created.', ), 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('The user who created this condition.'), expression: zod .string() .optional() .describe('The query or condition expression used to evaluate the group.'), group: 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 ID of the static group that should be assigned if the condition is met.', ), id: zod.string().optional().describe('The unique ID of the condition.'), updatedAt: zod .string() .optional() .describe('The timestamp (in milliseconds) of the last update.'), 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 the last update.'), }); /** * @summary Update an existing condition */ export const UpdateConditionParams = zod.object({ id: zod.string().describe('The unique ID of the condition to update.'), }); export const UpdateConditionBody = zod .object({ assignee: 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 ID of the assignee that should be assigned if the condition is met (optional).', ), expression: zod .string() .optional() .describe( 'The query or condition expression used to evaluate the group.', ), group: zod .string() .optional() .describe( 'The ID of the static group that should be assigned if the condition is met.', ), position: zod .object({ condDown: zod.string().optional(), condUp: zod.string().optional(), }) .optional() .describe('The position of the condition in the group.'), }) .describe('Input message for creating/updating a condition.'); export const UpdateConditionResponse = zod.object({ assignee: 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 ID of the assignee that should be assigned if the condition is met (optional).', ), createdAt: zod .string() .optional() .describe( 'The timestamp (in milliseconds) of when the condition was created.', ), 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('The user who created this condition.'), expression: zod .string() .optional() .describe('The query or condition expression used to evaluate the group.'), group: 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 ID of the static group that should be assigned if the condition is met.', ), id: zod.string().optional().describe('The unique ID of the condition.'), updatedAt: zod .string() .optional() .describe('The timestamp (in milliseconds) of the last update.'), 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 the last update.'), }); /** * @summary Retrieve a list of conditions */ export const ListConditionsParams = zod.object({ group_id: zod .string() .describe('The ID of the group to which the conditions belong.'), }); export const ListConditionsQueryParams = zod.object({ page: zod .number() .optional() .describe('Page number of result dataset records. offset = (page*size)'), size: zod .number() .optional() .describe('Size count of records on result page. limit = (size++)'), fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved as a result.'), sort: zod .array(zod.string()) .optional() .describe('Sort the result according to fields.'), q: zod.string().optional().describe('Search term for conditions.'), id: zod.array(zod.string()).optional().describe('Filter by unique IDs.'), }); export const ListConditionsResponse = zod .object({ items: zod .array( zod.object({ assignee: 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 ID of the assignee that should be assigned if the condition is met (optional).', ), createdAt: zod .string() .optional() .describe( 'The timestamp (in milliseconds) of when the condition was created.', ), 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('The user who created this condition.'), expression: zod .string() .optional() .describe( 'The query or condition expression used to evaluate the group.', ), group: 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 ID of the static group that should be assigned if the condition is met.', ), id: zod .string() .optional() .describe('The unique ID of the condition.'), updatedAt: zod .string() .optional() .describe('The timestamp (in milliseconds) of the last update.'), 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 the last update.'), }), ) .optional() .describe('List of conditions.'), next: zod.boolean().optional().describe('Have more records.'), page: zod .number() .optional() .describe('Page number of the partial result.'), }) .describe('A list of Conditions.'); /** * @summary Create a new condition */ export const CreateConditionParams = zod.object({ group_id: zod .string() .describe('The ID of the group to which the condition belongs.'), }); export const CreateConditionBody = zod .object({ assignee: 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 ID of the assignee that should be assigned if the condition is met (optional).', ), expression: zod .string() .optional() .describe( 'The query or condition expression used to evaluate the group.', ), group: 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 ID of the static group that should be assigned if the condition is met.', ), }) .describe('Request message for creating a new condition.'); export const CreateConditionResponse = zod.object({ assignee: 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 ID of the assignee that should be assigned if the condition is met (optional).', ), createdAt: zod .string() .optional() .describe( 'The timestamp (in milliseconds) of when the condition was created.', ), 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('The user who created this condition.'), expression: zod .string() .optional() .describe('The query or condition expression used to evaluate the group.'), group: 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 ID of the static group that should be assigned if the condition is met.', ), id: zod.string().optional().describe('The unique ID of the condition.'), updatedAt: zod .string() .optional() .describe('The timestamp (in milliseconds) of the last update.'), 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 the last update.'), });