import { TouchBaseSchema } from '@isa/common/data-access';
import { z } from 'zod';
import { SizeSchema } from './size.schema';
import { WeightSchema } from './weight.schema';

export const ProductSchema = z
  .object({
    additionalName: z.string().describe('Additional name').optional(),
    catalogProductNumber: z.string().describe('CatalogProduct number').optional(),
    contributors: z.string().describe('Contributors').optional(),
    ean: z.string().describe('European Article Number barcode').optional(),
    edition: z.string().describe('Edition').optional(),
    format: z.string().describe('Format').optional(),
    formatDetail: z.string().describe('Format detail').optional(),
    locale: z.string().describe('Locale').optional(),
    manufacturer: z.string().describe('Manufacturer information').optional(),
    name: z.string().describe('Name').optional(),
    productGroup: z.string().describe('Product group').optional(),
    productGroupDetails: z.string().describe('Product group details').optional(),
    publicationDate: z.string().describe('Publication date').optional(),
    serial: z.string().describe('Serial').optional(),
    size: SizeSchema.describe('Size').optional(),
    supplierProductNumber: z.string().describe('SupplierProduct number').optional(),
    volume: z.string().describe('Volume').optional(),
    weight: WeightSchema.describe('Weight').optional(),
  })
  .extend(TouchBaseSchema.shape);
