/** * Generated by orval v8.19.0 🍺 * Do not edit manually. * Webitel API * OpenAPI spec version: 24.04.0 */ import * as zod from 'zod'; /** * @summary Retrieve a list of sources or search sources */ export const ListSourcesQueryParams = zod.object({ page: zod .number() .optional() .describe( 'Page number of result dataset records. offset = (page * size)\nDefault: 0', ), size: zod .number() .optional() .describe( 'Size count of records on result page. limit = (size++)\nDefault: 25', ), fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved as a result.\nDefault: [] (all fields)'), sort: zod .string() .optional() .describe('Sort the result according to fields.\nDefault: "id:desc"'), id: zod.array(zod.string()).optional().describe('Filter by unique IDs.'), q: zod .string() .optional() .describe( 'Search query string for filtering by name. Supports:\n- Wildcards (*)\n- Placeholder (?)\n- Exact match', ), type: zod .array( zod.enum([ 'TYPE_UNSPECIFIED', 'CALL', 'CHAT', 'SOCIAL_MEDIA', 'EMAIL', 'API', 'MANUAL', ]), ) .optional() .describe( 'Filter by source type.\n\n - TYPE_UNSPECIFIED: Unspecified source type.\n - CALL: Phone call source type.\n - CHAT: Chat source type.\n - SOCIAL_MEDIA: Social media source type.\n - EMAIL: Email source type.\n - API: API source type.\n - MANUAL: Manual source type.', ), }); export const listSourcesResponseItemsItemDescriptionMax = 500; export const listSourcesResponseItemsItemNameMin = 3; export const listSourcesResponseItemsItemNameMax = 100; export const listSourcesResponseItemsItemTypeDefault = `TYPE_UNSPECIFIED`; export const ListSourcesResponse = zod .object({ items: zod .array( zod .object({ createdAt: zod .string() .describe( 'Unix timestamp representing when the source was created.', ), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe( 'Reference to the user who originally created this source.', ), description: zod .string() .max(listSourcesResponseItemsItemDescriptionMax) .optional() .describe( "An optional longer explanation of the source's purpose.", ), id: zod .string() .describe( 'Unique identifier for the source, generated automatically.', ), name: zod .string() .min(listSourcesResponseItemsItemNameMin) .max(listSourcesResponseItemsItemNameMax) .describe('A unique, descriptive name for the source.'), type: zod .enum([ 'TYPE_UNSPECIFIED', 'CALL', 'CHAT', 'SOCIAL_MEDIA', 'EMAIL', 'API', 'MANUAL', ]) .default(listSourcesResponseItemsItemTypeDefault) .describe('The type of data source represented by this entry.'), updatedAt: zod .string() .describe('Unix timestamp representing the most recent update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe( 'Reference to the user who most recently modified this source.', ), }) .describe( 'Represents a data source in the contact management system.', ), ) .optional() .describe('List of sources.'), next: zod.boolean().optional().describe('Have more records.'), page: zod .number() .optional() .describe('Page number of the partial result.'), }) .describe('A list of sources.'); /** * @summary Create a new source */ export const CreateSourceQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe( 'Optional list of specific fields to return after creation\n\nSpecific fields to include in response', ), }); export const createSourceBodyDescriptionMax = 500; export const createSourceBodyNameMin = 2; export const createSourceBodyNameMax = 100; export const createSourceBodyTypeDefault = `CALL`; export const CreateSourceBody = zod .object({ description: zod .string() .max(createSourceBodyDescriptionMax) .optional() .describe('A short description of the source'), name: zod .string() .min(createSourceBodyNameMin) .max(createSourceBodyNameMax) .describe('The name of the source'), type: zod .enum([ 'TYPE_UNSPECIFIED', 'CALL', 'CHAT', 'SOCIAL_MEDIA', 'EMAIL', 'API', 'MANUAL', ]) .default(createSourceBodyTypeDefault) .describe('The type of the source'), }) .describe('The data structure representing a source'); export const createSourceResponseDescriptionMax = 500; export const createSourceResponseNameMin = 3; export const createSourceResponseNameMax = 100; export const createSourceResponseTypeDefault = `TYPE_UNSPECIFIED`; export const CreateSourceResponse = zod .object({ createdAt: zod .string() .describe('Unix timestamp representing when the source was created.'), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe('Reference to the user who originally created this source.'), description: zod .string() .max(createSourceResponseDescriptionMax) .optional() .describe("An optional longer explanation of the source's purpose."), id: zod .string() .describe('Unique identifier for the source, generated automatically.'), name: zod .string() .min(createSourceResponseNameMin) .max(createSourceResponseNameMax) .describe('A unique, descriptive name for the source.'), type: zod .enum([ 'TYPE_UNSPECIFIED', 'CALL', 'CHAT', 'SOCIAL_MEDIA', 'EMAIL', 'API', 'MANUAL', ]) .default(createSourceResponseTypeDefault) .describe('The type of data source represented by this entry.'), updatedAt: zod .string() .describe('Unix timestamp representing the most recent update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe( 'Reference to the user who most recently modified this source.', ), }) .describe('Represents a data source in the contact management system.'); /** * @summary Delete a source */ export const DeleteSourceParams = zod.object({ id: zod.string().describe('The unique ID of the source to delete.'), }); export const deleteSourceResponseDescriptionMax = 500; export const deleteSourceResponseNameMin = 3; export const deleteSourceResponseNameMax = 100; export const deleteSourceResponseTypeDefault = `TYPE_UNSPECIFIED`; export const DeleteSourceResponse = zod .object({ createdAt: zod .string() .describe('Unix timestamp representing when the source was created.'), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe('Reference to the user who originally created this source.'), description: zod .string() .max(deleteSourceResponseDescriptionMax) .optional() .describe("An optional longer explanation of the source's purpose."), id: zod .string() .describe('Unique identifier for the source, generated automatically.'), name: zod .string() .min(deleteSourceResponseNameMin) .max(deleteSourceResponseNameMax) .describe('A unique, descriptive name for the source.'), type: zod .enum([ 'TYPE_UNSPECIFIED', 'CALL', 'CHAT', 'SOCIAL_MEDIA', 'EMAIL', 'API', 'MANUAL', ]) .default(deleteSourceResponseTypeDefault) .describe('The type of data source represented by this entry.'), updatedAt: zod .string() .describe('Unix timestamp representing the most recent update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe( 'Reference to the user who most recently modified this source.', ), }) .describe('Represents a data source in the contact management system.'); /** * @summary Locate a source by ID */ export const LocateSourceParams = zod.object({ id: zod.string().describe('The unique ID of the source to locate.'), }); export const LocateSourceQueryParams = zod.object({ fields: zod .array(zod.string()) .optional() .describe('Fields to be retrieved into result.'), }); export const locateSourceResponseSourceDescriptionMax = 500; export const locateSourceResponseSourceNameMin = 3; export const locateSourceResponseSourceNameMax = 100; export const locateSourceResponseSourceTypeDefault = `TYPE_UNSPECIFIED`; export const LocateSourceResponse = zod .object({ source: zod .object({ createdAt: zod .string() .describe('Unix timestamp representing when the source was created.'), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe( 'Reference to the user who originally created this source.', ), description: zod .string() .max(locateSourceResponseSourceDescriptionMax) .optional() .describe("An optional longer explanation of the source's purpose."), id: zod .string() .describe( 'Unique identifier for the source, generated automatically.', ), name: zod .string() .min(locateSourceResponseSourceNameMin) .max(locateSourceResponseSourceNameMax) .describe('A unique, descriptive name for the source.'), type: zod .enum([ 'TYPE_UNSPECIFIED', 'CALL', 'CHAT', 'SOCIAL_MEDIA', 'EMAIL', 'API', 'MANUAL', ]) .default(locateSourceResponseSourceTypeDefault) .describe('The type of data source represented by this entry.'), updatedAt: zod .string() .describe('Unix timestamp representing the most recent update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe( 'Reference to the user who most recently modified this source.', ), }) .optional() .describe('The located source.'), }) .describe('Response message for locating a source.'); /** * @summary Update an existing source */ export const UpdateSource2Params = zod.object({ id: zod.string(), }); export const UpdateSource2QueryParams = zod.object({ fields: zod.array(zod.string()).optional(), }); export const updateSource2BodyDescriptionMax = 500; export const updateSource2BodyNameMin = 2; export const updateSource2BodyNameMax = 100; export const updateSource2BodyTypeDefault = `CALL`; export const UpdateSource2Body = zod .object({ description: zod .string() .max(updateSource2BodyDescriptionMax) .optional() .describe('A short description of the source'), name: zod .string() .min(updateSource2BodyNameMin) .max(updateSource2BodyNameMax) .describe('The name of the source'), type: zod .enum([ 'TYPE_UNSPECIFIED', 'CALL', 'CHAT', 'SOCIAL_MEDIA', 'EMAIL', 'API', 'MANUAL', ]) .default(updateSource2BodyTypeDefault) .describe('The type of the source'), }) .describe('The data structure representing a source'); export const updateSource2ResponseDescriptionMax = 500; export const updateSource2ResponseNameMin = 3; export const updateSource2ResponseNameMax = 100; export const updateSource2ResponseTypeDefault = `TYPE_UNSPECIFIED`; export const UpdateSource2Response = zod .object({ createdAt: zod .string() .describe('Unix timestamp representing when the source was created.'), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe('Reference to the user who originally created this source.'), description: zod .string() .max(updateSource2ResponseDescriptionMax) .optional() .describe("An optional longer explanation of the source's purpose."), id: zod .string() .describe('Unique identifier for the source, generated automatically.'), name: zod .string() .min(updateSource2ResponseNameMin) .max(updateSource2ResponseNameMax) .describe('A unique, descriptive name for the source.'), type: zod .enum([ 'TYPE_UNSPECIFIED', 'CALL', 'CHAT', 'SOCIAL_MEDIA', 'EMAIL', 'API', 'MANUAL', ]) .default(updateSource2ResponseTypeDefault) .describe('The type of data source represented by this entry.'), updatedAt: zod .string() .describe('Unix timestamp representing the most recent update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe( 'Reference to the user who most recently modified this source.', ), }) .describe('Represents a data source in the contact management system.'); /** * @summary Update an existing source */ export const UpdateSourceParams = zod.object({ id: zod.string(), }); export const UpdateSourceQueryParams = zod.object({ fields: zod.array(zod.string()).optional(), }); export const updateSourceBodyDescriptionMax = 500; export const updateSourceBodyNameMin = 2; export const updateSourceBodyNameMax = 100; export const updateSourceBodyTypeDefault = `CALL`; export const UpdateSourceBody = zod .object({ description: zod .string() .max(updateSourceBodyDescriptionMax) .optional() .describe('A short description of the source'), name: zod .string() .min(updateSourceBodyNameMin) .max(updateSourceBodyNameMax) .describe('The name of the source'), type: zod .enum([ 'TYPE_UNSPECIFIED', 'CALL', 'CHAT', 'SOCIAL_MEDIA', 'EMAIL', 'API', 'MANUAL', ]) .default(updateSourceBodyTypeDefault) .describe('The type of the source'), }) .describe('The data structure representing a source'); export const updateSourceResponseDescriptionMax = 500; export const updateSourceResponseNameMin = 3; export const updateSourceResponseNameMax = 100; export const updateSourceResponseTypeDefault = `TYPE_UNSPECIFIED`; export const UpdateSourceResponse = zod .object({ createdAt: zod .string() .describe('Unix timestamp representing when the source was created.'), createdBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe('Reference to the user who originally created this source.'), description: zod .string() .max(updateSourceResponseDescriptionMax) .optional() .describe("An optional longer explanation of the source's purpose."), id: zod .string() .describe('Unique identifier for the source, generated automatically.'), name: zod .string() .min(updateSourceResponseNameMin) .max(updateSourceResponseNameMax) .describe('A unique, descriptive name for the source.'), type: zod .enum([ 'TYPE_UNSPECIFIED', 'CALL', 'CHAT', 'SOCIAL_MEDIA', 'EMAIL', 'API', 'MANUAL', ]) .default(updateSourceResponseTypeDefault) .describe('The type of data source represented by this entry.'), updatedAt: zod .string() .describe('Unix timestamp representing the most recent update.'), updatedBy: zod .object({ id: zod.string().optional(), name: zod.string().optional(), }) .describe( 'Reference to the user who most recently modified this source.', ), }) .describe('Represents a data source in the contact management system.');