@floristcloud/api-lib 1.2.76 → 1.2.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetProductListContractQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const enum_1 = require("../../enum");
|
|
5
6
|
const schemas_1 = require("../../schemas");
|
|
6
7
|
const GetProductListRequestSchema = zod_1.z.object({
|
|
7
8
|
page: zod_1.z.coerce.number().optional().default(1),
|
|
@@ -16,6 +17,7 @@ const GetProductListRequestSchema = zod_1.z.object({
|
|
|
16
17
|
color: zod_1.z.string().optional(),
|
|
17
18
|
size: zod_1.z.string().optional(),
|
|
18
19
|
deliveryDates: zod_1.z.array(zod_1.z.coerce.date()).optional(),
|
|
20
|
+
marks: zod_1.z.enum(enum_1.ProductMarkEnum).array().optional(),
|
|
19
21
|
});
|
|
20
22
|
const GetProductListResponseSchema = zod_1.z.object({
|
|
21
23
|
message: zod_1.z.string().optional(),
|
package/build/constant/error.js
CHANGED
|
@@ -292,6 +292,7 @@ exports.ERRORS = {
|
|
|
292
292
|
CATEGORY_TEMPLATE_NOT_UPDATED: { code: 'CT003', message: 'Failed to update category template', httpCode: 500 },
|
|
293
293
|
CATEGORY_TEMPLATE_NOT_FOUND: { code: 'CT004', message: 'Category template not found', httpCode: 404 },
|
|
294
294
|
CATEGORY_TEMPLATE_FETCH_FAILED: { code: 'CT005', message: 'Error when retrieving a category template', httpCode: 500 },
|
|
295
|
+
CATEGORY_TEMPLATE_ALREADY_EXIST: { code: 'CT007', message: 'Category template with this name already exist', httpCode: 409 },
|
|
295
296
|
CATEGORY_TEMPLATE_HAS_PRODUCT_IMAGE_TEMPLATES: {
|
|
296
297
|
code: 'CT006',
|
|
297
298
|
message: 'Cannot delete category template that has product image templates',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { ProductMarkEnum } from '../../enum';
|
|
2
3
|
import { ProductListSchema } from '../../schemas';
|
|
3
4
|
|
|
4
5
|
const GetProductListRequestSchema = z.object({
|
|
@@ -14,6 +15,7 @@ const GetProductListRequestSchema = z.object({
|
|
|
14
15
|
color: z.string().optional(),
|
|
15
16
|
size: z.string().optional(),
|
|
16
17
|
deliveryDates: z.array(z.coerce.date()).optional(),
|
|
18
|
+
marks: z.enum(ProductMarkEnum).array().optional(),
|
|
17
19
|
});
|
|
18
20
|
|
|
19
21
|
const GetProductListResponseSchema = z.object({
|
package/constant/error.ts
CHANGED
|
@@ -304,6 +304,7 @@ export const ERRORS = {
|
|
|
304
304
|
CATEGORY_TEMPLATE_NOT_UPDATED: { code: 'CT003', message: 'Failed to update category template', httpCode: 500 },
|
|
305
305
|
CATEGORY_TEMPLATE_NOT_FOUND: { code: 'CT004', message: 'Category template not found', httpCode: 404 },
|
|
306
306
|
CATEGORY_TEMPLATE_FETCH_FAILED: { code: 'CT005', message: 'Error when retrieving a category template', httpCode: 500 },
|
|
307
|
+
CATEGORY_TEMPLATE_ALREADY_EXIST: { code: 'CT007', message: 'Category template with this name already exist', httpCode: 409 },
|
|
307
308
|
CATEGORY_TEMPLATE_HAS_PRODUCT_IMAGE_TEMPLATES: {
|
|
308
309
|
code: 'CT006',
|
|
309
310
|
message: 'Cannot delete category template that has product image templates',
|