feat: products page
This commit is contained in:
@ -208,12 +208,16 @@ 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.array(z.string()),
|
||||
id: z.int(),
|
||||
barcodeTemplate: zBarcodeTemplateSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
@ -377,11 +381,14 @@ 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.array(z.string()),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -765,6 +772,7 @@ export const zGetDealsResponse = z.object({
|
||||
*/
|
||||
export const zGetProductsResponse = z.object({
|
||||
items: z.array(zProductSchema),
|
||||
paginationInfo: zPaginationInfoSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
@ -1014,11 +1022,13 @@ 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()])),
|
||||
});
|
||||
|
||||
@ -1718,6 +1728,7 @@ export const zGetProductsData = z.object({
|
||||
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()])),
|
||||
|
||||
Reference in New Issue
Block a user