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

import { z } from "zod";

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

/**
 * AttrOptionSchema
 */
export const zAttrOptionSchema = z.object({
    id: z.int(),
    label: z.string(),
});

/**
 * AttrSelectSchema
 */
export const zAttrSelectSchema = z.object({
    id: z.int(),
    label: z.string(),
    isBuiltIn: z.boolean(),
});

/**
 * AttributeTypeSchema
 */
export const zAttributeTypeSchema = z.object({
    id: z.int(),
    type: z.string(),
    name: z.string(),
});

/**
 * AttributeSchema
 */
export const zAttributeSchema = z.object({
    label: z.string(),
    isApplicableToGroup: z.boolean(),
    isNullable: z.boolean(),
    defaultValue: z.union([z.unknown(), z.null()]),
    defaultOptionId: z.optional(z.union([z.int(), z.null()])),
    description: z.string(),
    typeId: z.int(),
    selectId: z.optional(z.union([z.int(), z.null()])),
    id: z.int(),
    isBuiltIn: z.boolean(),
    type: zAttributeTypeSchema,
    defaultOption: z.optional(z.union([zAttrOptionSchema, z.null()])),
    select: z.union([zAttrSelectSchema, z.null()]),
});

/**
 * 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(),
});

/**
 * BarcodeUploadImageResponse
 */
export const zBarcodeUploadImageResponse = z.object({
    message: z.string(),
    imageUrl: z.optional(z.union([z.string(), z.null()])),
});

/**
 * BaseMarketplaceSchema
 */
export const zBaseMarketplaceSchema = z.object({
    id: z.int(),
    name: z.string(),
    iconUrl: z.string(),
});

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

/**
 * Body_upload_product_barcode_image
 */
export const zBodyUploadProductBarcodeImage = z.object({
    upload_file: z.string(),
});

/**
 * Body_upload_product_image
 */
export const zBodyUploadProductImage = z.object({
    upload_file: z.string(),
});

/**
 * 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(),
    isDeleted: z.optional(z.boolean()).default(false),
});

/**
 * CreateAttributeSchema
 */
export const zCreateAttributeSchema = z.object({
    label: z.string(),
    isApplicableToGroup: z.boolean(),
    isNullable: z.boolean(),
    defaultValue: z.union([z.unknown(), z.null()]),
    defaultOptionId: z.optional(z.union([z.int(), z.null()])),
    description: z.string(),
    typeId: z.int(),
    selectId: z.optional(z.union([z.int(), z.null()])),
});

/**
 * CreateAttributeRequest
 */
export const zCreateAttributeRequest = z.object({
    entity: zCreateAttributeSchema,
});

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

/**
 * 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(),
});

/**
 * CreateDealGroupRequest
 */
export const zCreateDealGroupRequest = z.object({
    mainDealId: z.int(),
    otherDealIds: z.array(z.int()),
});

/**
 * DealGroupSchema
 */
export const zDealGroupSchema = z.object({
    id: z.int(),
    name: z.optional(z.union([z.string(), z.null()])),
    lexorank: z.string(),
});

/**
 * CreateDealGroupResponse
 */
export const zCreateDealGroupResponse = z.object({
    entity: zDealGroupSchema,
});

/**
 * 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,
});

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

/**
 * ProductBarcodeImageSchema
 */
export const zProductBarcodeImageSchema = z.object({
    productId: z.int(),
    imageUrl: z.string(),
});

/**
 * ProductSchema
 */
export const zProductSchema = z.object({
    name: z.string(),
    article: z.string(),
    factoryArticle: z.string(),
    clientId: z.int(),
    barcodeTemplateId: z.int(),
    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()]),
    barcodes: z.optional(z.array(z.string())).default([]),
    imageUrl: z.optional(z.union([z.string(), z.null()])),
    images: z.optional(z.union([z.array(zProductImageSchema), z.null()])),
    barcodeImageUrl: z.optional(z.union([z.string(), z.null()])),
    barcodeImage: z.optional(z.union([zProductBarcodeImageSchema, z.null()])),
    id: z.int(),
    barcodeTemplate: zBarcodeTemplateSchema,
});

/**
 * 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(),
    projectId: z.int(),
    boardId: z.int(),
    lexorank: z.string(),
    statusId: z.int(),
    clientId: z.optional(z.union([z.int(), z.null()])),
});

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

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

/**
 * DealTagColorSchema
 */
export const zDealTagColorSchema = z.object({
    id: z.int(),
    color: z.string(),
    backgroundColor: z.string(),
    label: z.string(),
});

/**
 * DealTagSchema
 */
export const zDealTagSchema = z.object({
    name: z.string(),
    projectId: z.int(),
    tagColorId: z.int(),
    id: z.int(),
    tagColor: zDealTagColorSchema,
});

/**
 * 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,
    }),
    group: z.union([zDealGroupSchema, z.null()]),
    tags: z.array(zDealTagSchema),
    productsQuantity: z.optional(z.int()).default(0),
    totalPrice: z.optional(z.number()).default(0),
    client: z.optional(z.union([zClientSchema, z.null()])),
});

/**
 * 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,
});

/**
 * CreateDealTagSchema
 */
export const zCreateDealTagSchema = z.object({
    name: z.string(),
    projectId: z.int(),
    tagColorId: z.int(),
});

/**
 * CreateDealTagRequest
 */
export const zCreateDealTagRequest = z.object({
    entity: zCreateDealTagSchema,
});

/**
 * CreateDealTagResponse
 */
export const zCreateDealTagResponse = z.object({
    message: z.string(),
    entity: zDealTagSchema,
});

/**
 * CreateMarketplaceSchema
 */
export const zCreateMarketplaceSchema = z.object({
    baseMarketplace: zBaseMarketplaceSchema,
    client: zClientSchema,
    name: z.string(),
    authData: z.object({}),
});

/**
 * CreateMarketplaceRequest
 */
export const zCreateMarketplaceRequest = z.object({
    entity: zCreateMarketplaceSchema,
});

/**
 * MarketplaceSchema
 */
export const zMarketplaceSchema = z.object({
    id: z.int(),
    baseMarketplaceId: z.int(),
    baseMarketplace: zBaseMarketplaceSchema,
    client: zClientSchema,
    name: z.string(),
    authData: z.object({}),
});

/**
 * CreateMarketplaceResponse
 */
export const zCreateMarketplaceResponse = z.object({
    message: z.string(),
    entity: zMarketplaceSchema,
});

/**
 * CreateModuleSchema
 */
export const zCreateModuleSchema = z.object({
    label: z.string(),
    description: z.union([z.string(), z.null()]),
});

/**
 * CreateModuleRequest
 */
export const zCreateModuleRequest = z.object({
    entity: zCreateModuleSchema,
});

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

/**
 * CreateProductSchema
 */
export const zCreateProductSchema = z.object({
    name: z.string(),
    article: z.string(),
    factoryArticle: z.string(),
    clientId: z.int(),
    barcodeTemplateId: z.int(),
    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()]),
    barcodes: z.optional(z.array(z.string())).default([]),
});

/**
 * 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,
});

/**
 * ModuleTabSchema
 */
export const zModuleTabSchema = z.object({
    id: z.int(),
    key: z.string(),
    label: z.string(),
    iconName: z.union([z.string(), z.null()]),
    device: z.string(),
});

/**
 * ModuleSchema
 */
export const zModuleSchemaOutput = z.object({
    id: z.int(),
    key: z.string(),
    label: z.string(),
    description: z.union([z.string(), z.null()]),
    isBuiltIn: z.boolean(),
    get dependsOn() {
        return z.array(
            z.lazy((): any => {
                return zModuleSchemaOutput;
            })
        );
    },
    tabs: z.array(zModuleTabSchema),
});

/**
 * ProjectSchema
 */
export const zProjectSchema = z.object({
    id: z.int(),
    name: z.string(),
    modules: z.array(zModuleSchemaOutput),
    tags: z.array(zDealTagSchema),
});

/**
 * 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(),
    color: 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(),
});

/**
 * DealModuleAttributeSchema
 */
export const zDealModuleAttributeSchema = z.object({
    attributeId: z.int(),
    label: z.string(),
    originalLabel: z.string(),
    value: z.union([z.unknown(), z.null()]),
    type: zAttributeTypeSchema,
    select: z.union([zAttrSelectSchema, z.null()]),
    defaultValue: z.unknown(),
    description: z.string(),
    isApplicableToGroup: z.boolean(),
    isNullable: z.boolean(),
});

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

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

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

/**
 * DeleteBarcodeImageResponse
 */
export const zDeleteBarcodeImageResponse = 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(),
});

/**
 * DeleteDealGroupResponse
 */
export const zDeleteDealGroupResponse = 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(),
});

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

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

/**
 * DeleteModuleResponse
 */
export const zDeleteModuleResponse = 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(),
});

/**
 * GetAllAttrSelectOptionsResponse
 */
export const zGetAllAttrSelectOptionsResponse = z.object({
    items: z.array(zAttrOptionSchema),
});

/**
 * GetAllAttrSelectsResponse
 */
export const zGetAllAttrSelectsResponse = z.object({
    items: z.array(zAttrSelectSchema),
});

/**
 * GetAllAttributeTypesResponse
 */
export const zGetAllAttributeTypesResponse = z.object({
    items: z.array(zAttributeTypeSchema),
});

/**
 * GetAllAttributesResponse
 */
export const zGetAllAttributesResponse = z.object({
    items: z.array(zAttributeSchema),
});

/**
 * GetAllModulesResponse
 */
export const zGetAllModulesResponse = z.object({
    items: z.array(zModuleSchemaOutput),
});

/**
 * ModuleAttributeSchema
 */
export const zModuleAttributeSchema = z.object({
    label: z.string(),
    isApplicableToGroup: z.boolean(),
    isNullable: z.boolean(),
    defaultValue: z.union([z.unknown(), z.null()]),
    defaultOptionId: z.optional(z.union([z.int(), z.null()])),
    description: z.string(),
    typeId: z.int(),
    selectId: z.optional(z.union([z.int(), z.null()])),
    id: z.int(),
    isBuiltIn: z.boolean(),
    type: zAttributeTypeSchema,
    defaultOption: z.optional(z.union([zAttrOptionSchema, z.null()])),
    select: z.union([zAttrSelectSchema, z.null()]),
    originalLabel: z.string(),
});

/**
 * ModuleWithAttributesSchema
 */
export const zModuleWithAttributesSchema = z.object({
    id: z.int(),
    key: z.string(),
    label: z.string(),
    description: z.union([z.string(), z.null()]),
    isBuiltIn: z.boolean(),
    dependsOn: z.array(zModuleSchemaOutput),
    tabs: z.array(zModuleTabSchema),
    attributes: z.array(zModuleAttributeSchema),
});

/**
 * GetAllWithAttributesResponse
 */
export const zGetAllWithAttributesResponse = z.object({
    items: z.array(zModuleWithAttributesSchema),
});

/**
 * 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),
});

/**
 * GetBaseMarketplacesResponse
 */
export const zGetBaseMarketplacesResponse = z.object({
    items: z.array(zBaseMarketplaceSchema),
});

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

/**
 * GetByIdWithAttributesResponse
 */
export const zGetByIdWithAttributesResponse = z.object({
    entity: zModuleWithAttributesSchema,
});

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

/**
 * GetDealBarcodesPdfRequest
 */
export const zGetDealBarcodesPdfRequest = z.object({
    dealId: z.int(),
});

/**
 * GetDealBarcodesPdfResponse
 */
export const zGetDealBarcodesPdfResponse = z.object({
    base64String: z.string(),
    filename: z.string(),
    mimeType: z.string(),
});

/**
 * GetDealModuleAttributesResponse
 */
export const zGetDealModuleAttributesResponse = z.object({
    attributes: z.array(zDealModuleAttributeSchema),
});

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

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

/**
 * GetDealTagsResponse
 */
export const zGetDealTagsResponse = z.object({
    items: z.array(zDealTagSchema),
});

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

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

/**
 * GetMarketplacesResponse
 */
export const zGetMarketplacesResponse = z.object({
    items: z.array(zMarketplaceSchema),
});

/**
 * GetProductBarcodePdfRequest
 */
export const zGetProductBarcodePdfRequest = z.object({
    quantity: z.int(),
    productId: z.int(),
    barcode: z.string(),
});

/**
 * GetProductBarcodePdfResponse
 */
export const zGetProductBarcodePdfResponse = z.object({
    base64String: z.string(),
    filename: z.string(),
    mimeType: z.string(),
});

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

/**
 * 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),
});

/**
 * GetTagColorsResponse
 */
export const zGetTagColorsResponse = z.object({
    items: z.array(zDealTagColorSchema),
});

/**
 * 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)),
});

/**
 * ModuleSchema
 */
export const zModuleSchemaInput = z.object({
    id: z.int(),
    key: z.string(),
    label: z.string(),
    description: z.union([z.string(), z.null()]),
    isBuiltIn: z.boolean(),
    get dependsOn() {
        return z.array(
            z.lazy((): any => {
                return zModuleSchemaInput;
            })
        );
    },
    tabs: z.array(zModuleTabSchema),
});

/**
 * 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(),
});

/**
 * ProductUploadImageResponse
 */
export const zProductUploadImageResponse = z.object({
    message: z.string(),
    imageUrl: z.optional(z.union([z.string(), z.null()])),
});

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

/**
 * SwitchDealTagRequest
 */
export const zSwitchDealTagRequest = z.object({
    tagId: z.int(),
    dealId: z.optional(z.union([z.int(), z.null()])),
    groupId: z.optional(z.union([z.int(), z.null()])),
});

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

/**
 * UpdateAttributeLabelRequest
 */
export const zUpdateAttributeLabelRequest = z.object({
    moduleId: z.int(),
    attributeId: z.int(),
    label: z.string(),
});

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

/**
 * UpdateAttributeSchema
 */
export const zUpdateAttributeSchema = z.object({
    label: z.optional(z.union([z.string(), z.null()])),
    isApplicableToGroup: z.optional(z.union([z.boolean(), z.null()])),
    isNullable: z.optional(z.union([z.boolean(), z.null()])),
    defaultValue: z.optional(z.union([z.unknown(), z.null()])),
    defaultOptionId: z.optional(z.union([z.int(), z.null()])),
    description: z.optional(z.union([z.string(), z.null()])),
});

/**
 * UpdateAttributeRequest
 */
export const zUpdateAttributeRequest = z.object({
    entity: zUpdateAttributeSchema,
});

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

/**
 * 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(),
});

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

/**
 * UpdateDealGroupRequest
 */
export const zUpdateDealGroupRequest = z.object({
    entity: zUpdateDealGroupSchema,
});

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

/**
 * UpdateDealModuleAttributeSchema
 */
export const zUpdateDealModuleAttributeSchema = z.object({
    attributeId: z.int(),
    isApplicableToGroup: z.boolean(),
    value: z.optional(z.union([z.unknown(), z.null()])),
});

/**
 * UpdateDealModuleAttributesRequest
 */
export const zUpdateDealModuleAttributesRequest = z.object({
    attributes: z.array(zUpdateDealModuleAttributeSchema),
});

/**
 * UpdateDealModuleAttributesResponse
 */
export const zUpdateDealModuleAttributesResponse = 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()])),
    client: z.optional(z.union([zClientSchema, 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(),
});

/**
 * UpdateDealTagSchema
 */
export const zUpdateDealTagSchema = z.object({
    name: z.optional(z.union([z.string(), z.null()])),
    tagColor: z.optional(z.union([zDealTagColorSchema, z.null()])),
});

/**
 * UpdateDealTagRequest
 */
export const zUpdateDealTagRequest = z.object({
    entity: zUpdateDealTagSchema,
});

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

/**
 * UpdateDealsInGroupRequest
 */
export const zUpdateDealsInGroupRequest = z.object({
    dealIds: z.array(z.int()),
});

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

/**
 * UpdateMarketplaceSchema
 */
export const zUpdateMarketplaceSchema = z.object({
    baseMarketplace: z.optional(z.union([zBaseMarketplaceSchema, z.null()])),
    client: z.optional(z.union([zClientSchema, z.null()])),
    name: z.optional(z.union([z.string(), z.null()])),
    authData: z.optional(z.union([z.object({}), z.null()])),
});

/**
 * UpdateMarketplaceRequest
 */
export const zUpdateMarketplaceRequest = z.object({
    entity: zUpdateMarketplaceSchema,
});

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

/**
 * UpdateModuleCommonInfoSchema
 */
export const zUpdateModuleCommonInfoSchema = z.object({
    label: z.string(),
    description: z.union([z.string(), z.null()]),
});

/**
 * UpdateModuleCommonInfoRequest
 */
export const zUpdateModuleCommonInfoRequest = z.object({
    entity: zUpdateModuleCommonInfoSchema,
});

/**
 * UpdateModuleCommonInfoResponse
 */
export const zUpdateModuleCommonInfoResponse = 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()])),
    barcodeTemplateId: z.optional(z.union([z.int(), 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()])),
    barcodes: z.optional(z.union([z.array(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()])),
    modules: z.optional(z.array(zModuleSchemaInput)),
});

/**
 * 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()])),
    color: 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 zGetAttrSelectsData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetAttrSelectsResponse = zGetAllAttrSelectsResponse;

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

/**
 * Successful Response
 */
export const zGetAttrSelectOptionsResponse = zGetAllAttrSelectOptionsResponse;

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

/**
 * Successful Response
 */
export const zGetAttributesResponse = zGetAllAttributesResponse;

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

/**
 * Successful Response
 */
export const zCreateAttributeResponse2 = zCreateAttributeResponse;

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

/**
 * Successful Response
 */
export const zDeleteAttributeResponse2 = zDeleteAttributeResponse;

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

/**
 * Successful Response
 */
export const zUpdateAttributeResponse2 = zUpdateAttributeResponse;

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

/**
 * Successful Response
 */
export const zUpdateAttributeLabelResponse2 = zUpdateAttributeLabelResponse;

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

/**
 * Successful Response
 */
export const zGetAttributeTypesResponse = zGetAllAttributeTypesResponse;

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

/**
 * Successful Response
 */
export const zGetDealModuleAttributesResponse2 =
    zGetDealModuleAttributesResponse;

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

/**
 * Successful Response
 */
export const zUpdateDealModuleAttributesResponse2 =
    zUpdateDealModuleAttributesResponse;

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 zDeleteDealGroupData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zDeleteDealGroupResponse2 = zDeleteDealGroupResponse;

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

/**
 * Successful Response
 */
export const zUpdateDealGroupResponse2 = zUpdateDealGroupResponse;

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

/**
 * Successful Response
 */
export const zCreateDealGroupResponse2 = zCreateDealGroupResponse;

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

/**
 * Successful Response
 */
export const zUpdateDealsInGroupResponse2 = zUpdateDealsInGroupResponse;

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

/**
 * Successful Response
 */
export const zGetDealTagsResponse2 = zGetDealTagsResponse;

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

/**
 * Successful Response
 */
export const zCreateDealTagResponse2 = zCreateDealTagResponse;

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

/**
 * Successful Response
 */
export const zDeleteDealTagResponse2 = zDeleteDealTagResponse;

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

/**
 * Successful Response
 */
export const zUpdateDealTagResponse2 = zUpdateDealTagResponse;

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

/**
 * Successful Response
 */
export const zSwitchDealTagResponse2 = zSwitchDealTagResponse;

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

/**
 * Successful Response
 */
export const zGetDealTagColorsResponse = zGetTagColorsResponse;

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

/**
 * Successful Response
 */
export const zGetModulesResponse = zGetAllModulesResponse;

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

/**
 * Successful Response
 */
export const zCreateModuleResponse2 = zCreateModuleResponse;

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

/**
 * Successful Response
 */
export const zGetModulesWithAttributesResponse = zGetAllWithAttributesResponse;

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

/**
 * Successful Response
 */
export const zGetModuleWithAttributesResponse = zGetByIdWithAttributesResponse;

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

/**
 * Successful Response
 */
export const zUpdateModuleResponse = zUpdateModuleCommonInfoResponse;

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

/**
 * Successful Response
 */
export const zDeleteModuleResponse2 = zDeleteModuleResponse;

export const zRemoveAttributeFromModuleData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        moduleId: z.int(),
        attributeId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zRemoveAttributeFromModuleResponse = zDeleteAttributeResponse;

export const zAddAttributeToModuleData = z.object({
    body: z.optional(z.never()),
    path: z.object({
        moduleId: z.int(),
        attributeId: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zAddAttributeToModuleResponse = zAddAttributeResponse;

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

/**
 * 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 zGetBaseMarketplacesData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zGetBaseMarketplacesResponse2 = zGetBaseMarketplacesResponse;

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

/**
 * Successful Response
 */
export const zGetMarketplacesResponse2 = zGetMarketplacesResponse;

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

/**
 * Successful Response
 */
export const zCreateMarketplaceResponse2 = zCreateMarketplaceResponse;

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

/**
 * Successful Response
 */
export const zDeleteMarketplaceResponse2 = zDeleteMarketplaceResponse;

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

/**
 * Successful Response
 */
export const zUpdateMarketplaceResponse2 = zUpdateMarketplaceResponse;

export const zGetProductsData = z.object({
    body: z.optional(z.never()),
    path: z.optional(z.never()),
    query: z.optional(
        z.object({
            clientId: z.optional(z.union([z.int(), z.null()])),
            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 zUploadProductImageData = z.object({
    body: zBodyUploadProductImage,
    path: z.object({
        pk: z.int(),
    }),
    query: z.optional(z.never()),
});

/**
 * Successful Response
 */
export const zUploadProductImageResponse = zProductUploadImageResponse;

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

/**
 * Successful Response
 */
export const zGetProductBarcodePdfResponse2 = zGetProductBarcodePdfResponse;

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

/**
 * Successful Response
 */
export const zGetDealBarcodesPdfResponse2 = zGetDealBarcodesPdfResponse;

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

/**
 * Successful Response
 */
export const zUploadProductBarcodeImageResponse = zBarcodeUploadImageResponse;

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

/**
 * Successful Response
 */
export const zDeleteProductBarcodeImageResponse = zDeleteBarcodeImageResponse;

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;

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;
