/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * Webitel API * OpenAPI spec version: 24.04.0 */ import * as zod from 'zod'; /** * @summary Update an existing related case */ export const UpdateRelatedCase2Params = zod.object({ 'input.primary_case.id': zod.string(), etag: zod.string().describe('Identifier of the related case to update.'), }); export const UpdateRelatedCase2QueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to include in the response.'), }); export const updateRelatedCase2BodyRelationTypeDefault = `RELATION_TYPE_UNSPECIFIED`; export const UpdateRelatedCase2Body = zod.object({ primaryCase: zod .object({ name: zod.string().optional(), }) .optional() .describe('Primary case details.'), relatedCase: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('Related case details.'), relationType: zod .enum([ 'RELATION_TYPE_UNSPECIFIED', 'DUPLICATES', 'IS_DUPLICATED_BY', 'BLOCKS', 'IS_BLOCKED_BY', 'CAUSES', 'IS_CAUSED_BY', 'IS_CHILD_OF', 'IS_PARENT_OF', 'RELATES_TO', ]) .default(updateRelatedCase2BodyRelationTypeDefault) .describe('Relation type.'), userId: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe( 'Optional creator / updater ID. Use this to explicitly set the case creator / updater instead of deriving it from the auth token.', ), }); export const updateRelatedCase2ResponseRelationTypeDefault = `RELATION_TYPE_UNSPECIFIED`; export const UpdateRelatedCase2Response = zod .object({ createdAt: zod .string() .optional() .describe( 'Timestamp (in milliseconds) of when the relation was created.', ), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who created the relation.'), etag: zod.string().optional().describe('Etag for the related case entity.'), id: zod .string() .optional() .describe('Unique identifier for the related case.'), primaryCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Primary case details.'), relatedCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Related case details.'), relationType: zod .enum([ 'RELATION_TYPE_UNSPECIFIED', 'DUPLICATES', 'IS_DUPLICATED_BY', 'BLOCKS', 'IS_BLOCKED_BY', 'CAUSES', 'IS_CAUSED_BY', 'IS_CHILD_OF', 'IS_PARENT_OF', 'RELATES_TO', ]) .default(updateRelatedCase2ResponseRelationTypeDefault) .describe('Relation type between cases.'), updatedAt: zod .string() .optional() .describe('Timestamp (in milliseconds) of the last update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who last updated the relation.'), ver: zod .number() .optional() .describe( 'Version number of the related case, used for concurrency control.', ), }) .describe('Represents a related case with its relationship details.'); /** * @summary Update an existing related case */ export const UpdateRelatedCaseParams = zod.object({ 'input.primary_case.id': zod.string(), etag: zod.string().describe('Identifier of the related case to update.'), }); export const UpdateRelatedCaseQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to include in the response.'), }); export const updateRelatedCaseBodyRelationTypeDefault = `RELATION_TYPE_UNSPECIFIED`; export const UpdateRelatedCaseBody = zod.object({ primaryCase: zod .object({ name: zod.string().optional(), }) .optional() .describe('Primary case details.'), relatedCase: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('Related case details.'), relationType: zod .enum([ 'RELATION_TYPE_UNSPECIFIED', 'DUPLICATES', 'IS_DUPLICATED_BY', 'BLOCKS', 'IS_BLOCKED_BY', 'CAUSES', 'IS_CAUSED_BY', 'IS_CHILD_OF', 'IS_PARENT_OF', 'RELATES_TO', ]) .default(updateRelatedCaseBodyRelationTypeDefault) .describe('Relation type.'), userId: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe( 'Optional creator / updater ID. Use this to explicitly set the case creator / updater instead of deriving it from the auth token.', ), }); export const updateRelatedCaseResponseRelationTypeDefault = `RELATION_TYPE_UNSPECIFIED`; export const UpdateRelatedCaseResponse = zod .object({ createdAt: zod .string() .optional() .describe( 'Timestamp (in milliseconds) of when the relation was created.', ), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who created the relation.'), etag: zod.string().optional().describe('Etag for the related case entity.'), id: zod .string() .optional() .describe('Unique identifier for the related case.'), primaryCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Primary case details.'), relatedCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Related case details.'), relationType: zod .enum([ 'RELATION_TYPE_UNSPECIFIED', 'DUPLICATES', 'IS_DUPLICATED_BY', 'BLOCKS', 'IS_BLOCKED_BY', 'CAUSES', 'IS_CAUSED_BY', 'IS_CHILD_OF', 'IS_PARENT_OF', 'RELATES_TO', ]) .default(updateRelatedCaseResponseRelationTypeDefault) .describe('Relation type between cases.'), updatedAt: zod .string() .optional() .describe('Timestamp (in milliseconds) of the last update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who last updated the relation.'), ver: zod .number() .optional() .describe( 'Version number of the related case, used for concurrency control.', ), }) .describe('Represents a related case with its relationship details.'); /** * @summary List all related cases for a specific case */ export const ListRelatedCasesParams = zod.object({ primary_case_etag: zod .string() .describe('Primary Case ID for which related cases are requested.'), }); export const ListRelatedCasesQueryParams = zod.object({ page: zod.number().optional().describe('Page number for pagination.'), size: zod.number().optional().describe('Number of related cases per page.'), q: zod.string().optional().describe('Query string for search.'), sort: zod.string().optional().describe('Sorting order.'), fields: zod .array(zod.string()) .optional() .describe('Fields to return for each related case.'), ids: zod.array(zod.string()).optional().describe('Filter by ids'), }); export const listRelatedCasesResponseDataItemRelationTypeDefault = `RELATION_TYPE_UNSPECIFIED`; export const ListRelatedCasesResponse = zod .object({ data: zod .array( zod .object({ createdAt: zod .string() .optional() .describe( 'Timestamp (in milliseconds) of when the relation was created.', ), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who created the relation.'), etag: zod .string() .optional() .describe('Etag for the related case entity.'), id: zod .string() .optional() .describe('Unique identifier for the related case.'), primaryCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Primary case details.'), relatedCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Related case details.'), relationType: zod .enum([ 'RELATION_TYPE_UNSPECIFIED', 'DUPLICATES', 'IS_DUPLICATED_BY', 'BLOCKS', 'IS_BLOCKED_BY', 'CAUSES', 'IS_CAUSED_BY', 'IS_CHILD_OF', 'IS_PARENT_OF', 'RELATES_TO', ]) .default(listRelatedCasesResponseDataItemRelationTypeDefault) .describe('Relation type between cases.'), updatedAt: zod .string() .optional() .describe('Timestamp (in milliseconds) of the last update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who last updated the relation.'), ver: zod .number() .optional() .describe( 'Version number of the related case, used for concurrency control.', ), }) .describe('Represents a related case with its relationship details.'), ) .optional() .describe('List of related cases on the current page.'), next: zod .boolean() .optional() .describe('Flag to indicate if more pages are available.'), page: zod.string().optional().describe('Current page number.'), }) .describe('Paginated list of related cases.'); /** * @summary Create a new related case */ export const CreateRelatedCaseParams = zod.object({ primary_case_etag: zod.string().describe('Primary case details.'), }); export const CreateRelatedCaseQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to include in the response.'), }); export const createRelatedCaseBodyRelationTypeDefault = `RELATION_TYPE_UNSPECIFIED`; export const CreateRelatedCaseBody = zod .object({ relatedCase: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('Related case details.'), relationType: zod .enum([ 'RELATION_TYPE_UNSPECIFIED', 'DUPLICATES', 'IS_DUPLICATED_BY', 'BLOCKS', 'IS_BLOCKED_BY', 'CAUSES', 'IS_CAUSED_BY', 'IS_CHILD_OF', 'IS_PARENT_OF', 'RELATES_TO', ]) .default(createRelatedCaseBodyRelationTypeDefault) .describe('Relation type between the cases.'), userId: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe( 'Optional creator / updater ID. Use this to explicitly set the case creator / updater instead of deriving it from the auth token.', ), }) .describe('Input for creating a related case.'); export const createRelatedCaseResponseRelationTypeDefault = `RELATION_TYPE_UNSPECIFIED`; export const CreateRelatedCaseResponse = zod .object({ createdAt: zod .string() .optional() .describe( 'Timestamp (in milliseconds) of when the relation was created.', ), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who created the relation.'), etag: zod.string().optional().describe('Etag for the related case entity.'), id: zod .string() .optional() .describe('Unique identifier for the related case.'), primaryCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Primary case details.'), relatedCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Related case details.'), relationType: zod .enum([ 'RELATION_TYPE_UNSPECIFIED', 'DUPLICATES', 'IS_DUPLICATED_BY', 'BLOCKS', 'IS_BLOCKED_BY', 'CAUSES', 'IS_CAUSED_BY', 'IS_CHILD_OF', 'IS_PARENT_OF', 'RELATES_TO', ]) .default(createRelatedCaseResponseRelationTypeDefault) .describe('Relation type between cases.'), updatedAt: zod .string() .optional() .describe('Timestamp (in milliseconds) of the last update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who last updated the relation.'), ver: zod .number() .optional() .describe( 'Version number of the related case, used for concurrency control.', ), }) .describe('Represents a related case with its relationship details.'); /** * @summary Delete a specific related case */ export const DeleteRelatedCaseParams = zod.object({ primary_case_etag: zod.string().describe('Etag or ID of the primary case'), etag: zod.string().describe('Identifier of the related case to delete.'), }); export const deleteRelatedCaseResponseRelationTypeDefault = `RELATION_TYPE_UNSPECIFIED`; export const DeleteRelatedCaseResponse = zod .object({ createdAt: zod .string() .optional() .describe( 'Timestamp (in milliseconds) of when the relation was created.', ), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who created the relation.'), etag: zod.string().optional().describe('Etag for the related case entity.'), id: zod .string() .optional() .describe('Unique identifier for the related case.'), primaryCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Primary case details.'), relatedCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Related case details.'), relationType: zod .enum([ 'RELATION_TYPE_UNSPECIFIED', 'DUPLICATES', 'IS_DUPLICATED_BY', 'BLOCKS', 'IS_BLOCKED_BY', 'CAUSES', 'IS_CAUSED_BY', 'IS_CHILD_OF', 'IS_PARENT_OF', 'RELATES_TO', ]) .default(deleteRelatedCaseResponseRelationTypeDefault) .describe('Relation type between cases.'), updatedAt: zod .string() .optional() .describe('Timestamp (in milliseconds) of the last update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who last updated the relation.'), ver: zod .number() .optional() .describe( 'Version number of the related case, used for concurrency control.', ), }) .describe('Represents a related case with its relationship details.'); /** * @summary Retrieve a specific related case by ID */ export const LocateRelatedCaseParams = zod.object({ primary_case_etag: zod.string().describe('Primary case identifier.'), etag: zod.string().describe('Identifier of the related case.'), }); export const LocateRelatedCaseQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to return in the response.'), }); export const locateRelatedCaseResponseRelationTypeDefault = `RELATION_TYPE_UNSPECIFIED`; export const LocateRelatedCaseResponse = zod .object({ createdAt: zod .string() .optional() .describe( 'Timestamp (in milliseconds) of when the relation was created.', ), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who created the relation.'), etag: zod.string().optional().describe('Etag for the related case entity.'), id: zod .string() .optional() .describe('Unique identifier for the related case.'), primaryCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Primary case details.'), relatedCase: zod .object({ color: zod.string().optional(), etag: zod.string().optional(), id: zod.string().optional(), name: zod.string().optional(), subject: zod.string().optional(), ver: zod.number().optional(), }) .optional() .describe('Related case details.'), relationType: zod .enum([ 'RELATION_TYPE_UNSPECIFIED', 'DUPLICATES', 'IS_DUPLICATED_BY', 'BLOCKS', 'IS_BLOCKED_BY', 'CAUSES', 'IS_CAUSED_BY', 'IS_CHILD_OF', 'IS_PARENT_OF', 'RELATES_TO', ]) .default(locateRelatedCaseResponseRelationTypeDefault) .describe('Relation type between cases.'), updatedAt: zod .string() .optional() .describe('Timestamp (in milliseconds) of the last update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .optional() .describe('User who last updated the relation.'), ver: zod .number() .optional() .describe( 'Version number of the related case, used for concurrency control.', ), }) .describe('Represents a related case with its relationship details.');