// This file is auto-generated by @hey-api/openapi-ts

import { z } from "zod";

/**
 * BarcodeTemplateAttributeSchema
 */
export const zBarcodeTemplateAttributeSchema = z.object({
    id: z.int(),
    key: z.string(),
    name: z.string(),
});

/**
 * BarcodeTemplateSizeSchema
 */
export const zBarcodeTemplateSizeSchema = z.object({
    id: z.int(),
    name: z.string(),
    width: z.int(),
    height: z.int(),
});

/**
 * BarcodeTemplateSchema
 */
export const zBarcodeTemplateSchema = z.object({
    name: z.string(),
    attributes: z.array(zBarcodeTemplateAttributeSchema),
    isDefault: z.boolean(),
    size: zBarcodeTemplateSizeSchema,
    id: z.int(),
});

/**
 * BoardSchema
 */
export const zBoardSchema = z.object({
    id: z.int(),
    name: z.string(),
    lexorank: z.string(),
    projectId: z.int(),
});

/**
 * BuiltInModuleTabSchema
 */
export const zBuiltInModuleTabSchema = z.object({
    id: z.int(),
    key: z.string(),
    label: z.string(),
    iconName: z.string(),
    device: z.string(),
});

/**
 * BuiltInModuleSchema
 */
export const zBuiltInModuleSchemaInput = z.object({
    id: z.int(),
    key: z.string(),
    label: z.string(),
    description: z.string(),
    get dependsOn() {
        return z.array(
            z.lazy((): any => {
                return zBuiltInModuleSchemaInput;
            })
        );
    },
    tabs: z.array(zBuiltInModuleTabSchema),
});

/**
 * BuiltInModuleSchema
 */
export const zBuiltInModuleSchemaOutput = z.object({
    id: z.int(),
    key: z.string(),
    label: z.string(),
    description: z.string(),
    get dependsOn() {
        return z.array(
            z.lazy((): any => {
                return zBuiltInModuleSchemaOutput;
            })
        );
    },
    tabs: z.array(zBuiltInModuleTabSchema),
});

/**
 * ClientDetailsSchema
 */
export const zClientDetailsSchema = z.object({
    telegram: z.string(),
    phoneNumber: z.string(),
    inn: z.string(),
    email: z.string(),
});

/**
 * ClientSchema
 */
export const zClientSchema = z.object({
    name: z.string(),
    companyName: z.string(),
    comment: z.optional(z.union([z.string(), z.null()])),
    details: zClientDetailsSchema,
    id: z.int(),
});

/**
 * CreateBarcodeTemplateSchema
 */
export const zCreateBarcodeTemplateSchema = z.object({
    name: z.string(),
    attributes: z.array(zBarcodeTemplateAttributeSchema),
    isDefault: z.boolean(),
    size: zBarcodeTemplateSizeSchema,
});

/**
 * CreateBarcodeTemplateRequest
 */
export const zCreateBarcodeTemplateRequest = z.object({
    entity: zCreateBarcodeTemplateSchema,
});

/**
 * CreateBarcodeTemplateResponse
 */
export const zCreateBarcodeTemplateResponse = z.object({
    message: z.string(),
    entity: zBarcodeTemplateSchema,
});

/**
 * CreateBoardSchema
 */
export const zCreateBoardSchema = z.object({
    name: z.string(),
    projectId: z.int(),
    lexorank: z.string(),
});

/**
 * CreateBoardRequest
 */
export const zCreateBoardRequest = z.object({
    entity: zCreateBoardSchema,
});

/**
 * CreateBoardResponse
 */
export const zCreateBoardResponse = z.object({
    message: z.string(),
    entity: zBoardSchema,
});

/**
 * CreateClientSchema
 */
export const zCreateClientSchema = z.object({
    name: z.string(),
    companyName: z.string(),
    comment: z.optional(z.union([z.string(), z.null()])),
    details: zClientDetailsSchema,
});

/**
 * CreateClientRequest
 */
export const zCreateClientRequest = z.object({
    entity: zCreateClientSchema,
});

/**
 * CreateClientResponse
 */
export const zCreateClientResponse = z.object({
    message: z.string(),
});

/**
 * CreateDealProductSchema
 */
export const zCreateDealProductSchema = z.object({
    dealId: z.int(),
    productId: z.int(),
    quantity: z.int(),
    comment: z.string(),
});

/**
 * CreateDealProductRequest
 */
export const zCreateDealProductRequest = z.object({
    entity: zCreateDealProductSchema,
});

/**
 * ProductSchema
 */
export const zProductSchema = z.object({
    name: z.string(),
    article: z.string(),
    factoryArticle: z.string(),
    brand: z.union([z.string(), z.null()]),
    color: z.union([z.string(), z.null()]),
    composition: z.union([z.string(), z.null()]),
    size: z.union([z.string(), z.null()]),
    additionalInfo: z.union([z.string(), z.null()]),
    id: z.int(),
});

/**
 * ServiceCategorySchema
 */
export const zServiceCategorySchema = z.object({
    name: z.string(),
    dealServiceRank: z.string(),
    productServiceRank: z.string(),
    id: z.int(),
});

/**
 * ServicePriceRangeSchema
 */
export const zServicePriceRangeSchema = z.object({
    id: z.union([z.int(), z.null()]),
    fromQuantity: z.int(),
    toQuantity: z.int(),
    price: z.number(),
});

/**
 * ServiceSchema
 */
export const zServiceSchema = z.object({
    name: z.string(),
    category: zServiceCategorySchema,
    categoryId: z.optional(z.union([z.int(), z.null()])),
    price: z.number(),
    serviceType: z.int(),
    priceRanges: z.array(zServicePriceRangeSchema),
    cost: z.union([z.number(), z.null()]),
    lexorank: z.string(),
    id: z.int(),
});

/**
 * ProductServiceSchema
 */
export const zProductServiceSchema = z.object({
    dealId: z.int(),
    productId: z.int(),
    serviceId: z.int(),
    service: zServiceSchema,
    price: z.number(),
    isFixedPrice: z.boolean(),
});

/**
 * DealProductSchema
 */
export const zDealProductSchema = z.object({
    dealId: z.int(),
    productId: z.int(),
    product: zProductSchema,
    quantity: z.int(),
    comment: z.string(),
    productServices: z.array(zProductServiceSchema),
});

/**
 * CreateDealProductResponse
 */
export const zCreateDealProductResponse = z.object({
    message: z.string(),
    entity: zDealProductSchema,
});

/**
 * CreateDealSchema
 */
export const zCreateDealSchema = z.object({
    name: z.string(),
    boardId: z.int(),
    lexorank: z.string(),
    statusId: z.int(),
});

/**
 * CreateDealRequest
 */
export const zCreateDealRequest = z.object({
    entity: zCreateDealSchema,
});

/**
 * StatusSchema
 */
export const zStatusSchema = z.object({
    id: z.int(),
    name: z.string(),
    lexorank: z.string(),
});

/**
 * DealSchema
 */
export const zDealSchema = z.object({
    id: z.int(),
    name: z.string(),
    lexorank: z.string(),
    status: zStatusSchema,
    board: zBoardSchema,
    createdAt: z.iso.datetime({
        offset: true,
    }),
});

/**
 * CreateDealResponse
 */
export const zCreateDealResponse = z.object({
    message: z.string(),
    entity: zDealSchema,
});

/**
 * CreateDealServiceSchema
 */
export const zCreateDealServiceSchema = z.object({
    dealId: z.int(),
    serviceId: z.int(),
    quantity: z.int(),
    price: z.number(),
});

/**
 * CreateDealServiceRequest
 */
export const zCreateDealServiceRequest = z.object({
    entity: zCreateDealServiceSchema,
});

/**
 * DealServiceSchema
 */
export const zDealServiceSchema = z.object({
    dealId: z.int(),
    serviceId: z.int(),
    service: zServiceSchema,
    quantity: z.int(),
    price: z.number(),
    isFixedPrice: z.boolean(),
});

/**
 * CreateDealServiceResponse
 */
export const zCreateDealServiceResponse = z.object({
    message: z.string(),
    entity: zDealServiceSchema,
});

/**
 * CreateProductSchema
 */
export const zCreateProductSchema = z.object({
    name: z.string(),
    article: z.string(),
    factoryArticle: z.string(),
    brand: z.union([z.string(), z.null()]),
    color: z.union([z.string(), z.null()]),
    composition: z.union([z.string(), z.null()]),
    size: z.union([z.string(), z.null()]),
    additionalInfo: z.union([z.string(), z.null()]),
});

/**
 * CreateProductRequest
 */
export const zCreateProductRequest = z.object({
    entity: zCreateProductSchema,
});

/**
 * CreateProductResponse
 */
export const zCreateProductResponse = z.object({
    message: z.string(),
    entity: zProductSchema,
});

/**
 * CreateProductServiceSchema
 */
export const zCreateProductServiceSchema = z.object({
    dealId: z.int(),
    productId: z.int(),
    serviceId: z.int(),
    price: z.number(),
});

/**
 * CreateProductServiceRequest
 */
export const zCreateProductServiceRequest = z.object({
    entity: zCreateProductServiceSchema,
});

/**
 * CreateProductServiceResponse
 */
export const zCreateProductServiceResponse = z.object({
    message: z.string(),
    entity: zProductServiceSchema,
});

/**
 * CreateProjectSchema
 */
export const zCreateProjectSchema = z.object({
    name: z.string(),
});

/**
 * CreateProjectRequest
 */
export const zCreateProjectRequest = z.object({
    entity: zCreateProjectSchema,
});

/**
 * ProjectSchema
 */
export const zProjectSchema = z.object({
    id: z.int(),
    name: z.string(),
    builtInModules: z.array(zBuiltInModuleSchemaOutput),
});

/**
 * CreateProjectResponse
 */
export const zCreateProjectResponse = z.object({
    message: z.string(),
    entity: zProjectSchema,
});

/**
 * CreateServiceCategorySchema
 */
export const zCreateServiceCategorySchema = z.object({
    name: z.string(),
    dealServiceRank: z.string(),
    productServiceRank: z.string(),
});

/**
 * CreateServiceCategoryRequest
 */
export const zCreateServiceCategoryRequest = z.object({
    entity: zCreateServiceCategorySchema,
});

/**
 * CreateServiceCategoryResponse
 */
export const zCreateServiceCategoryResponse = z.object({
    message: z.string(),
    entity: zServiceCategorySchema,
});

/**
 * CreateServiceSchema
 */
export const zCreateServiceSchema = z.object({
    name: z.string(),
    category: zServiceCategorySchema,
    categoryId: z.optional(z.union([z.int(), z.null()])),
    price: z.number(),
    serviceType: z.int(),
    priceRanges: z.array(zServicePriceRangeSchema),
    cost: z.union([z.number(), z.null()]),
    lexorank: z.string(),
});

/**
 * CreateServiceRequest
 */
export const zCreateServiceRequest = z.object({
    entity: zCreateServiceSchema,
});

/**
 * CreateServiceResponse
 */
export const zCreateServiceResponse = z.object({
    message: z.string(),
    entity: zServiceSchema,
});

/**
 * CreateServicesKitSchema
 */
export const zCreateServicesKitSchema = z.object({
    name: z.string(),
    serviceType: z.int(),
    services: z.array(zServiceSchema),
});

/**
 * CreateServicesKitRequest
 */
export const zCreateServicesKitRequest = z.object({
    entity: zCreateServicesKitSchema,
});

/**
 * ServicesKitSchema
 */
export const zServicesKitSchema = z.object({
    name: z.string(),
    serviceType: z.int(),
    id: z.int(),
    services: z.array(zServiceSchema),
});

/**
 * CreateServicesKitResponse
 */
export const zCreateServicesKitResponse = z.object({
    message: z.string(),
    entity: zServicesKitSchema,
});

/**
 * CreateStatusSchema
 */
export const zCreateStatusSchema = z.object({
    name: z.string(),
    boardId: z.int(),
    lexorank: z.string(),
});

/**
 * CreateStatusRequest
 */
export const zCreateStatusRequest = z.object({
    entity: zCreateStatusSchema,
});

/**
 * CreateStatusResponse
 */
export const zCreateStatusResponse = z.object({
    message: z.string(),
    entity: zStatusSchema,
});

/**
 * DealAddKitRequest
 */
export const zDealAddKitRequest = z.object({
    dealId: z.int(),
    kitId: z.int(),
});

/**
 * DealAddKitResponse
 */
export const zDealAddKitResponse = z.object({
    message: z.string(),
});

/**
 * DealProductAddKitRequest
 */
export const zDealProductAddKitRequest = z.object({
    dealId: z.int(),
    productId: z.int(),
    kitId: z.int(),
});

/**
 * DealProductAddKitResponse
 */
export const zDealProductAddKitResponse = z.object({
    message: z.string(),
});

/**
 * DeleteBarcodeTemplateResponse
 */
export const zDeleteBarcodeTemplateResponse = z.object({
    message: z.string(),
});

/**
 * DeleteBoardResponse
 */
export const zDeleteBoardResponse = z.object({
    message: z.string(),
});

/**
 * DeleteClientResponse
 */
export const zDeleteClientResponse = z.object({
    message: z.string(),
});

/**
 * DeleteDealProductResponse
 */
export const zDeleteDealProductResponse = z.object({
    message: z.string(),
});

/**
 * DeleteDealResponse
 */
export const zDeleteDealResponse = z.object({
    message: z.string(),
});

/**
 * DeleteDealServiceResponse
 */
export const zDeleteDealServiceResponse = z.object({
    message: z.string(),
});

/**
 * DeleteProductResponse
 */
export const zDeleteProductResponse = z.object({
    message: z.string(),
});

/**
 * DeleteProductServiceResponse
 */
export const zDeleteProductServiceResponse = z.object({
    message: z.string(),
});

/**
 * DeleteProjectResponse
 */
export const zDeleteProjectResponse = z.object({
    message: z.string(),
});

/**
 * DeleteServiceCategoryResponse
 */
export const zDeleteServiceCategoryResponse = z.object({
    message: z.string(),
});

/**
 * DeleteServiceResponse
 */
export const zDeleteServiceResponse = z.object({
    message: z.string(),
});

/**
 * DeleteServicesKitResponse
 */
export const zDeleteServicesKitResponse = z.object({
    message: z.string(),
});

/**
 * DeleteStatusResponse
 */
export const zDeleteStatusResponse = z.object({
    message: z.string(),
});

/**
 * GetAllBuiltInModulesResponse
 */
export const zGetAllBuiltInModulesResponse = z.object({
    items: z.array(zBuiltInModuleSchemaOutput),
});

/**
 * GetBarcodeAttributesResponse
 */
export const zGetBarcodeAttributesResponse = z.object({
    items: z.array(zBarcodeTemplateAttributeSchema),
});

/**
 * GetBarcodeTemplateSizesResponse
 */
export const zGetBarcodeTemplateSizesResponse = z.object({
    items: z.array(zBarcodeTemplateSizeSchema),
});

/**
 * GetBarcodeTemplatesResponse
 */
export const zGetBarcodeTemplatesResponse = z.object({
    items: z.array(zBarcodeTemplateSchema),
});

/**
 * GetBoardsResponse
 */
export const zGetBoardsResponse = z.object({
    items: z.array(zBoardSchema),
});

/**
 * GetClientsResponse
 */
export const zGetClientsResponse = z.object({
    items: z.array(zClientSchema),
});

/**
 * GetDealProductsResponse
 */
export const zGetDealProductsResponse = z.object({
    items: z.array(zDealProductSchema),
});

/**
 * GetDealServicesResponse
 */
export const zGetDealServicesResponse = z.object({
    items: z.array(zDealServiceSchema),
});

/**
 * PaginationInfoSchema
 */
export const zPaginationInfoSchema = z.object({
    totalPages: z.int(),
    totalItems: z.int(),
});

/**
 * GetDealsResponse
 */
export const zGetDealsResponse = z.object({
    items: z.array(zDealSchema),
    paginationInfo: zPaginationInfoSchema,
});

/**
 * GetProductsResponse
 */
export const zGetProductsResponse = z.object({
    items: z.array(zProductSchema),
});

/**
 * GetProjectsResponse
 */
export const zGetProjectsResponse = z.object({
    items: z.array(zProjectSchema),
});

/**
 * GetServiceCategoriesResponse
 */
export const zGetServiceCategoriesResponse = z.object({
    items: z.array(zServiceCategorySchema),
});

/**
 * GetServicesKitResponse
 */
export const zGetServicesKitResponse = z.object({
    items: z.array(zServicesKitSchema),
});

/**
 * GetServicesResponse
 */
export const zGetServicesResponse = z.object({
    items: z.array(zServiceSchema),
});

/**
 * StatusHistorySchema
 */
export const zStatusHistorySchema = z.object({
    id: z.int(),
    createdAt: z.iso.datetime({
        offset: true,
    }),
    fromStatus: zStatusSchema,
    toStatus: zStatusSchema,
    dealId: z.int(),
});

/**
 * GetStatusHistoryResponse
 */
export const zGetStatusHistoryResponse = z.object({
    items: z.array(zStatusHistorySchema),
});

/**
 * GetStatusesResponse
 */
export const zGetStatusesResponse = z.object({
    items: z.array(zStatusSchema),
});

/**
 * ValidationError
 */
export const zValidationError = z.object({
    loc: z.array(z.union([z.string(), z.int()])),
    msg: z.string(),
    type: z.string(),
});

/**
 * HTTPValidationError
 */
export const zHttpValidationError = z.object({
    detail: z.optional(z.array(zValidationError)),
});

/**
 * ProductImageSchema
 */
export const zProductImageSchema = z.object({
    id: z.int(),
    productId: z.int(),
    imageUrl: z.string(),
});

/**
 * ProductServicesDuplicateRequest
 */
export const zProductServicesDuplicateRequest = z.object({
    dealId: z.int(),
    sourceDealProductId: z.int(),
    targetDealProductIds: z.array(z.int()),
});

/**
 * ProductServicesDuplicateResponse
 */
export const zProductServicesDuplicateResponse = z.object({
    message: z.string(),
});

export const zSortDir = z.enum(["asc", "desc"]);

/**
 * UpdateBarcodeTemplateSchema
 */
export const zUpdateBarcodeTemplateSchema = z.object({
    name: z.optional(z.union([z.string(), z.null()])),
    attributes: z.optional(
        z.union([z.array(zBarcodeTemplateAttributeSchema), z.null()])
    ),
    isDefault: z.optional(z.union([z.boolean(), z.null()])),
    size: z.optional(z.union([zBarcodeTemplateSizeSchema, z.null()])),
});

/**
 * UpdateBarcodeTemplateRequest
 */
export const zUpdateBarcodeTemplateRequest = z.object({
    entity: zUpdateBarcodeTemplateSchema,
});

/**
 * UpdateBarcodeTemplateResponse
 */
export const zUpdateBarcodeTemplateResponse = z.object({
    message: z.string(),
});

/**
 * UpdateBoardSchema
 */
export const zUpdateBoardSchema = z.object({
    name: z.optional(z.union([z.string(), z.null()])),
    lexorank: z.optional(z.union([z.string(), z.null()])),
});

/**
 * UpdateBoardRequest
 */
export const zUpdateBoardRequest = z.object({
    entity: zUpdateBoardSchema,
});

/**
 * UpdateBoardResponse
 */
export const zUpdateBoardResponse = z.object({
    message: z.string(),
});

/**
 * UpdateClientSchema
 */
export const zUpdateClientSchema = z.object({
    name: z.optional(z.union([z.string(), z.null()])),
    companyName: z.optional(z.union([z.string(), z.null()])),
    comment: z.optional(z.union([z.string(), z.null()])),
    details: z.optional(z.union([zClientDetailsSchema, z.null()])),
});

/**
 * UpdateClientRequest
 */
export const zUpdateClientRequest = z.object({
    entity: zUpdateClientSchema,
});

/**
 * UpdateClientResponse
 */
export const zUpdateClientResponse = z.object({
    message: z.string(),
});

/**
 * UpdateDealProductSchema
 */
export const zUpdateDealProductSchema = z.object({
    quantity: z.int(),
    comment: z.string(),
});

/**
 * UpdateDealProductRequest
 */
export const zUpdateDealProductRequest = z.object({
    entity: zUpdateDealProductSchema,
});

/**
 * UpdateDealProductResponse
 */
export const zUpdateDealProductResponse = z.object({
    message: z.string(),
});

/**
 * UpdateDealSchema
 */
export const zUpdateDealSchema = z.object({
    name: z.optional(z.union([z.string(), z.null()])),
    lexorank: z.optional(z.union([z.string(), z.null()])),
    boardId: z.optional(z.union([z.int(), z.null()])),
    statusId: z.optional(z.union([z.int(), z.null()])),
});

/**
 * UpdateDealRequest
 */
export const zUpdateDealRequest = z.object({
    entity: zUpdateDealSchema,
});

/**
 * UpdateDealResponse
 */
export const zUpdateDealResponse = z.object({
    message: z.string(),
});

/**
 * UpdateDealServiceSchema
 */
export const zUpdateDealServiceSchema = z.object({
    quantity: z.int(),
    price: z.number(),
    isFixedPrice: z.boolean(),
});

/**
 * UpdateDealServiceRequest
 */
export const zUpdateDealServiceRequest = z.object({
    entity: zUpdateDealServiceSchema,
});

/**
 * UpdateDealServiceResponse
 */
export const zUpdateDealServiceResponse = z.object({
    message: z.string(),
});

/**
 * UpdateProductSchema
 */
export const zUpdateProductSchema = z.object({
    name: z.optional(z.union([z.string(), z.null()])),
    article: z.optional(z.union([z.string(), z.null()])),
    factoryArticle: z.optional(z.union([z.string(), z.null()])),
    brand: z.optional(z.union([z.string(), z.null()])),
    color: z.optional(z.union([z.string(), z.null()])),
    composition: z.optional(z.union([z.string(), z.null()])),
    size: z.optional(z.union([z.string(), z.null()])),
    additionalInfo: z.optional(z.union([z.string(), z.null()])),
    images: z.optional(z.union([z.array(zProductImageSchema), z.null()])),
});

/**
 * UpdateProductRequest
 */
export const zUpdateProductRequest = z.object({
    entity: zUpdateProductSchema,
});

/**
 * UpdateProductResponse
 */
export const zUpdateProductResponse = z.object({
    message: z.string(),
});

/**
 * UpdateProductServiceSchema
 */
export const zUpdateProductServiceSchema = z.object({
    price: z.number(),
    isFixedPrice: z.boolean(),
});

/**
 * UpdateProductServiceRequest
 */
export const zUpdateProductServiceRequest = z.object({
    entity: zUpdateProductServiceSchema,
});

/**
 * UpdateProductServiceResponse
 */
export const zUpdateProductServiceResponse = z.object({
    message: z.string(),
});

/**
 * UpdateProjectSchema
 */
export const zUpdateProjectSchema = z.object({
    name: z.optional(z.union([z.string(), z.null()])),
    builtInModules: z.optional(z.array(zBuiltInModuleSchemaInput)),
});

/**
 * UpdateProjectRequest
 */
export const zUpdateProjectRequest = z.object({
    entity: zUpdateProjectSchema,
});

/**
 * UpdateProjectResponse
 */
export const zUpdateProjectResponse = z.object({
    message: z.string(),
});

/**
 * UpdateServiceCategorySchema
 */
export const zUpdateServiceCategorySchema = z.object({
    name: z.optional(z.union([z.string(), z.null()])),
    dealServiceRank: z.optional(z.union([z.string(), z.null()])),
    productServiceRank: z.optional(z.union([z.string(), z.null()])),
});

/**
 * UpdateServiceCategoryRequest
 */
export const zUpdateServiceCategoryRequest = z.object({
    entity: zUpdateServiceCategorySchema,
});

/**
 * UpdateServiceCategoryResponse
 */
export const zUpdateServiceCategoryResponse = z.object({
    message: z.string(),
});

/**
 * UpdateServiceSchema
 */
export const zUpdateServiceSchema = z.object({
    name: z.optional(z.union([z.string(), z.null()])),
    category: z.optional(z.union([zServiceCategorySchema, z.null()])),
    categoryId: z.optional(z.union([z.int(), z.null()])),
    price: z.optional(z.union([z.number(), z.null()])),
    serviceType: z.optional(z.union([z.int(), z.null()])),
    priceRanges: z.optional(
        z.union([z.array(zServicePriceRangeSchema), z.null()])
    ),
    cost: z.optional(z.union([z.number(), z.null()])),
    lexorank: z.optional(z.union([z.string(), z.null()])),
});

/**
 * UpdateServiceRequest
 */
export const zUpdateServiceRequest = z.object({
    entity: zUpdateServiceSchema,
});

/**
 * UpdateServiceResponse
 */
export const zUpdateServiceResponse = z.object({
    message: z.string(),
});

/**
 * UpdateServicesKitSchema
 */
export const zUpdateServicesKitSchema = z.object({
    name: z.string(),
    serviceType: z.int(),
    services: z.array(zServiceSchema),
});

/**
 * UpdateServicesKitRequest
 */
export const zUpdateServicesKitRequest = z.object({
    entity: zUpdateServicesKitSchema,
});

/**
 * UpdateServicesKitResponse
 */
export const zUpdateServicesKitResponse = z.object({
    message: z.string(),
});

/**
 * UpdateStatusSchema
 */
export const zUpdateStatusSchema = z.object({
    name: z.optional(z.union([z.string(), z.null()])),
    lexorank: z.optional(z.union([z.string(), z.null()])),
});

/**
 * UpdateStatusRequest
 */
export const zUpdateStatusRequest = z.object({
    entity: zUpdateStatusSchema,
});

/**
 * UpdateStatusResponse
 */
export const zUpdateStatusResponse = z.object({
    message: z.string(),
});

export const zGetBoardsData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        projectId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetBoardsResponse2 = zGetBoardsResponse;

export const zCreateBoardData = z.object({
    body: zCreateBoardRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateBoardResponse2 = zCreateBoardResponse;

export const zDeleteBoardData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteBoardResponse2 = zDeleteBoardResponse;

export const zUpdateBoardData = z.object({
    body: zUpdateBoardRequest,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateBoardResponse2 = zUpdateBoardResponse;

export const zGetDealsData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(
        z.object({
            projectId: z.optional(z.union([z.int(), z.null()])),
            boardId: z.optional(z.union([z.int(), z.null()])),
            statusId: z.optional(z.union([z.int(), z.null()])),
            id: z.optional(z.union([z.int(), z.null()])),
            name: z.optional(z.union([z.string(), z.null()])),
            page: z.optional(z.union([z.int(), z.null()])),
            itemsPerPage: z.optional(z.union([z.int(), z.null()])),
            sortingField: z.optional(z.union([z.string(), z.null()])),
            sortingDirection: z.optional(z.union([zSortDir, z.null()])),
        })
    ),
});

/**
 * Successful Response
 */
export const zGetDealsResponse2 = zGetDealsResponse;

export const zCreateDealData = z.object({
    body: zCreateDealRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateDealResponse2 = zCreateDealResponse;

export const zDeleteDealData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteDealResponse2 = zDeleteDealResponse;

export const zUpdateDealData = z.object({
    body: zUpdateDealRequest,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateDealResponse2 = zUpdateDealResponse;

export const zGetBuiltInModulesData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetBuiltInModulesResponse = zGetAllBuiltInModulesResponse;

export const zGetProjectsData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetProjectsResponse2 = zGetProjectsResponse;

export const zCreateProjectData = z.object({
    body: zCreateProjectRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateProjectResponse2 = zCreateProjectResponse;

export const zDeleteProjectData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteProjectResponse2 = zDeleteProjectResponse;

export const zUpdateProjectData = z.object({
    body: zUpdateProjectRequest,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateProjectResponse2 = zUpdateProjectResponse;

export const zGetStatusesData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        boardId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetStatusesResponse2 = zGetStatusesResponse;

export const zCreateStatusData = z.object({
    body: zCreateStatusRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateStatusResponse2 = zCreateStatusResponse;

export const zDeleteStatusData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteStatusResponse2 = zDeleteStatusResponse;

export const zUpdateStatusData = z.object({
    body: zUpdateStatusRequest,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateStatusResponse2 = zUpdateStatusResponse;

export const zGetStatusHistoryData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        dealId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetStatusHistoryResponse2 = zGetStatusHistoryResponse;

export const zGetClientsData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetClientsResponse2 = zGetClientsResponse;

export const zCreateClientData = z.object({
    body: zCreateClientRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateClientResponse2 = zCreateClientResponse;

export const zDeleteClientData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteClientResponse2 = zDeleteClientResponse;

export const zUpdateClientData = z.object({
    body: zUpdateClientRequest,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateClientResponse2 = zUpdateClientResponse;

export const zGetBarcodeTemplatesData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetBarcodeTemplatesResponse2 = zGetBarcodeTemplatesResponse;

export const zCreateBarcodeTemplateData = z.object({
    body: zCreateBarcodeTemplateRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateBarcodeTemplateResponse2 = zCreateBarcodeTemplateResponse;

export const zDeleteBarcodeTemplateData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteBarcodeTemplateResponse2 = zDeleteBarcodeTemplateResponse;

export const zUpdateBarcodeTemplateData = z.object({
    body: zUpdateBarcodeTemplateRequest,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateBarcodeTemplateResponse2 = zUpdateBarcodeTemplateResponse;

export const zGetBarcodeTemplateAttributesData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetBarcodeTemplateAttributesResponse =
    zGetBarcodeAttributesResponse;

export const zGetBarcodeTemplateSizesData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetBarcodeTemplateSizesResponse2 =
    zGetBarcodeTemplateSizesResponse;

export const zGetDealProductsData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        dealId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetDealProductsResponse2 = zGetDealProductsResponse;

export const zCreateDealProductData = z.object({
    body: zCreateDealProductRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateDealProductResponse2 = zCreateDealProductResponse;

export const zDeleteDealProductData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        dealId: z.int(),
        productId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteDealProductResponse2 = zDeleteDealProductResponse;

export const zUpdateDealProductData = z.object({
    body: zUpdateDealProductRequest,
    path: z.object({
        dealId: z.int(),
        productId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateDealProductResponse2 = zUpdateDealProductResponse;

export const zCreateDealProductServiceData = z.object({
    body: zCreateProductServiceRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateDealProductServiceResponse = zCreateProductServiceResponse;

export const zDeleteDealProductServiceData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        dealId: z.int(),
        productId: z.int(),
        serviceId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteDealProductServiceResponse = zDeleteProductServiceResponse;

export const zUpdateDealProductServiceData = z.object({
    body: zUpdateProductServiceRequest,
    path: z.object({
        dealId: z.int(),
        productId: z.int(),
        serviceId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateDealProductServiceResponse = zUpdateProductServiceResponse;

export const zDuplicateProductServicesData = z.object({
    body: zProductServicesDuplicateRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDuplicateProductServicesResponse =
    zProductServicesDuplicateResponse;

export const zAddKitToDealProductData = z.object({
    body: zDealProductAddKitRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zAddKitToDealProductResponse = zDealProductAddKitResponse;

export const zGetDealServicesData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        dealId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetDealServicesResponse2 = zGetDealServicesResponse;

export const zCreateDealServiceData = z.object({
    body: zCreateDealServiceRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateDealServiceResponse2 = zCreateDealServiceResponse;

export const zDeleteDealServiceData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        dealId: z.int(),
        serviceId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteDealServiceResponse2 = zDeleteDealServiceResponse;

export const zUpdateDealServiceData = z.object({
    body: zUpdateDealServiceRequest,
    path: z.object({
        dealId: z.int(),
        serviceId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateDealServiceResponse2 = zUpdateDealServiceResponse;

export const zAddKitToDealData = z.object({
    body: zDealAddKitRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zAddKitToDealResponse = zDealAddKitResponse;

export const zGetProductsData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(
        z.object({
            searchInput: z.optional(z.union([z.string(), z.null()])),
            page: z.optional(z.union([z.int(), z.null()])),
            itemsPerPage: z.optional(z.union([z.int(), z.null()])),
        })
    ),
});

/**
 * Successful Response
 */
export const zGetProductsResponse2 = zGetProductsResponse;

export const zCreateProductData = z.object({
    body: zCreateProductRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateProductResponse2 = zCreateProductResponse;

export const zDeleteProductData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteProductResponse2 = zDeleteProductResponse;

export const zUpdateProductData = z.object({
    body: zUpdateProductRequest,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateProductResponse2 = zUpdateProductResponse;

export const zGetServicesData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetServicesResponse2 = zGetServicesResponse;

export const zCreateServiceData = z.object({
    body: zCreateServiceRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateServiceResponse2 = zCreateServiceResponse;

export const zDeleteServiceData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteServiceResponse2 = zDeleteServiceResponse;

export const zUpdateServiceData = z.object({
    body: zUpdateServiceRequest,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateServiceResponse2 = zUpdateServiceResponse;

export const zGetServiceCategoriesData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetServiceCategoriesResponse2 = zGetServiceCategoriesResponse;

export const zCreateServiceCategoryData = z.object({
    body: zCreateServiceCategoryRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateServiceCategoryResponse2 = zCreateServiceCategoryResponse;

export const zDeleteServiceCategoryData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteServiceCategoryResponse2 = zDeleteServiceCategoryResponse;

export const zUpdateServiceCategoryData = z.object({
    body: zUpdateServiceCategoryRequest,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateServiceCategoryResponse2 = zUpdateServiceCategoryResponse;

export const zGetServicesKitsData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetServicesKitsResponse = zGetServicesKitResponse;

export const zCreateServicesKitData = z.object({
    body: zCreateServicesKitRequest,
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zCreateServicesKitResponse2 = zCreateServicesKitResponse;

export const zDeleteServicesKitData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteServicesKitResponse2 = zDeleteServicesKitResponse;

export const zUpdateServicesKitData = z.object({
    body: zUpdateServicesKitRequest,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUpdateServicesKitResponse2 = zUpdateServicesKitResponse;
