@zyacreatives/shared 2.2.99 → 2.3.0
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.
|
@@ -26,6 +26,7 @@ export declare const ProductDiscountEntitySchema: z.ZodObject<{
|
|
|
26
26
|
}>;
|
|
27
27
|
amount: z.ZodNumber;
|
|
28
28
|
discountCode: z.ZodOptional<z.ZodString>;
|
|
29
|
+
expiry: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
29
30
|
}, z.core.$strip>;
|
|
30
31
|
export declare const ProductLinkSchema: z.ZodObject<{
|
|
31
32
|
title: z.ZodNullable<z.ZodString>;
|
|
@@ -80,7 +81,7 @@ export declare const BaseProductSchema: z.ZodObject<{
|
|
|
80
81
|
}>;
|
|
81
82
|
amount: z.ZodNumber;
|
|
82
83
|
discountCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
83
|
-
expiry: z.ZodNullable<z.ZodOptional<z.
|
|
84
|
+
expiry: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
84
85
|
}, z.core.$strip>>>;
|
|
85
86
|
supportEmail: z.ZodNullable<z.ZodString>;
|
|
86
87
|
supportPhone: z.ZodNullable<z.ZodString>;
|
|
@@ -140,6 +141,7 @@ export declare const CreateProductInputSchema: z.ZodObject<{
|
|
|
140
141
|
}>;
|
|
141
142
|
amount: z.ZodNumber;
|
|
142
143
|
discountCode: z.ZodOptional<z.ZodString>;
|
|
144
|
+
expiry: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
143
145
|
}, z.core.$strip>>>;
|
|
144
146
|
}, z.core.$strip>;
|
|
145
147
|
export declare const ProductServiceAndComplianceInputSchema: z.ZodObject<{
|
|
@@ -205,6 +207,7 @@ export declare const UpdateProductInputSchema: z.ZodObject<{
|
|
|
205
207
|
}>;
|
|
206
208
|
amount: z.ZodNumber;
|
|
207
209
|
discountCode: z.ZodOptional<z.ZodString>;
|
|
210
|
+
expiry: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
208
211
|
}, z.core.$strip>>>>;
|
|
209
212
|
supportEmail: z.ZodOptional<z.ZodEmail>;
|
|
210
213
|
supportPhone: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -268,6 +271,7 @@ export declare const ProductEntitySchema: z.ZodObject<{
|
|
|
268
271
|
}>;
|
|
269
272
|
amount: z.ZodNumber;
|
|
270
273
|
discountCode: z.ZodOptional<z.ZodString>;
|
|
274
|
+
expiry: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
271
275
|
}, z.core.$strip>>>;
|
|
272
276
|
supportEmail: z.ZodNullable<z.ZodOptional<z.ZodEmail>>;
|
|
273
277
|
supportPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
package/dist/schemas/product.js
CHANGED
|
@@ -34,6 +34,7 @@ exports.ProductDiscountEntitySchema = zod_openapi_1.z.object({
|
|
|
34
34
|
.int("Amount must be a whole number")
|
|
35
35
|
.min(0, "Discount amount cannot be negative"),
|
|
36
36
|
discountCode: zod_openapi_1.z.string().optional(),
|
|
37
|
+
expiry: zod_openapi_1.z.coerce.date().optional().nullable(),
|
|
37
38
|
});
|
|
38
39
|
exports.ProductLinkSchema = zod_openapi_1.z.object({
|
|
39
40
|
title: zod_openapi_1.z.string().nullable(),
|
|
@@ -62,7 +63,7 @@ exports.BaseProductSchema = zod_openapi_1.z.object({
|
|
|
62
63
|
discountType: zod_openapi_1.z.enum(constants_1.DISCOUNT_TYPES),
|
|
63
64
|
amount: zod_openapi_1.z.number(),
|
|
64
65
|
discountCode: zod_openapi_1.z.string().optional().nullable(),
|
|
65
|
-
expiry: zod_openapi_1.z.
|
|
66
|
+
expiry: zod_openapi_1.z.coerce.date().optional().nullable(),
|
|
66
67
|
}))
|
|
67
68
|
.nullable(),
|
|
68
69
|
supportEmail: zod_openapi_1.z.string().nullable(),
|
package/package.json
CHANGED
package/src/schemas/product.ts
CHANGED
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
WAGES_CURRENCY,
|
|
7
7
|
} from "../constants";
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
export const CoverImageInputSchema = z.object({
|
|
11
10
|
key: z.string().openapi({ description: "Storage key of the uploaded file" }),
|
|
12
11
|
mimeType: z.string().openapi({ example: "image/jpeg" }),
|
|
@@ -20,7 +19,6 @@ export const DeliveryFileInputSchema = z.object({
|
|
|
20
19
|
order: z.number().int().default(0),
|
|
21
20
|
});
|
|
22
21
|
|
|
23
|
-
|
|
24
22
|
export const ProductCoverImageEntitySchema = z.object({
|
|
25
23
|
fileId: z
|
|
26
24
|
.cuid2()
|
|
@@ -43,6 +41,7 @@ export const ProductDiscountEntitySchema = z.object({
|
|
|
43
41
|
.int("Amount must be a whole number")
|
|
44
42
|
.min(0, "Discount amount cannot be negative"),
|
|
45
43
|
discountCode: z.string().optional(),
|
|
44
|
+
expiry: z.coerce.date().optional().nullable(),
|
|
46
45
|
});
|
|
47
46
|
|
|
48
47
|
export const ProductLinkSchema = z.object({
|
|
@@ -71,14 +70,13 @@ export const BaseProductSchema = z.object({
|
|
|
71
70
|
currency: z.enum(WAGES_CURRENCY),
|
|
72
71
|
price: z.number().nullable(),
|
|
73
72
|
suggestedPrice: z.number().nullable(),
|
|
74
|
-
|
|
75
73
|
discounts: z
|
|
76
74
|
.array(
|
|
77
75
|
z.object({
|
|
78
76
|
discountType: z.enum(DISCOUNT_TYPES),
|
|
79
77
|
amount: z.number(),
|
|
80
78
|
discountCode: z.string().optional().nullable(),
|
|
81
|
-
expiry: z.
|
|
79
|
+
expiry: z.coerce.date().optional().nullable(),
|
|
82
80
|
}),
|
|
83
81
|
)
|
|
84
82
|
.nullable(),
|
|
@@ -86,7 +84,6 @@ export const BaseProductSchema = z.object({
|
|
|
86
84
|
supportPhone: z.string().nullable(),
|
|
87
85
|
});
|
|
88
86
|
|
|
89
|
-
|
|
90
87
|
const ProductCoreInputSchema = z.object({
|
|
91
88
|
id: z.cuid2().openapi({ description: "Client-generated ID for the product" }),
|
|
92
89
|
|