@zyacreatives/shared 2.2.97 → 2.2.98

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.
@@ -80,6 +80,7 @@ export declare const BaseProductSchema: z.ZodObject<{
80
80
  }>;
81
81
  amount: z.ZodNumber;
82
82
  discountCode: z.ZodNullable<z.ZodOptional<z.ZodString>>;
83
+ expiry: z.ZodNullable<z.ZodOptional<z.ZodISODateTime>>;
83
84
  }, z.core.$strip>>>;
84
85
  supportEmail: z.ZodNullable<z.ZodString>;
85
86
  supportPhone: z.ZodNullable<z.ZodString>;
@@ -64,6 +64,7 @@ exports.BaseProductSchema = zod_openapi_1.z.object({
64
64
  discountType: zod_openapi_1.z.enum(constants_1.DISCOUNT_TYPES),
65
65
  amount: zod_openapi_1.z.number(),
66
66
  discountCode: zod_openapi_1.z.string().optional().nullable(),
67
+ expiry: zod_openapi_1.z.iso.datetime().optional().nullable(),
67
68
  }))
68
69
  .nullable(),
69
70
  supportEmail: zod_openapi_1.z.string().nullable(),
@@ -82,14 +83,14 @@ const ProductCoreInputSchema = zod_openapi_1.z.object({
82
83
  coverImages: zod_openapi_1.z
83
84
  .array(exports.CoverImageInputSchema)
84
85
  .min(1, "At least one cover image is required")
85
- .max(3, "Maximum of 3 cover images allowed"),
86
+ .max(5, "Maximum of 5 cover images allowed"),
86
87
  currency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY),
87
88
  productFiles: zod_openapi_1.z.array(exports.DeliveryFileInputSchema).default([]),
88
89
  productLinks: zod_openapi_1.z.array(exports.ProductLinkSchema).default([]),
89
90
  pricingModel: zod_openapi_1.z.enum(constants_1.PRICING_MODELS).default(constants_1.PRICING_MODELS.FIXED),
90
91
  price: zod_openapi_1.z.number().int("Must be in cents").min(0).optional(),
91
92
  suggestedPrice: zod_openapi_1.z.number().int("Must be in cents").min(0).optional(),
92
- discounts: zod_openapi_1.z.array(exports.ProductDiscountEntitySchema).default([]),
93
+ discounts: zod_openapi_1.z.array(exports.ProductDiscountEntitySchema).max(3).default([]),
93
94
  });
94
95
  exports.CreateProductInputSchema = ProductCoreInputSchema.superRefine((data, ctx) => {
95
96
  if (data.pricingModel === constants_1.PRICING_MODELS.FIXED &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.97",
3
+ "version": "2.2.98",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -80,6 +80,7 @@ export const BaseProductSchema = z.object({
80
80
  discountType: z.enum(DISCOUNT_TYPES),
81
81
  amount: z.number(),
82
82
  discountCode: z.string().optional().nullable(),
83
+ expiry: z.iso.datetime().optional().nullable(),
83
84
  }),
84
85
  )
85
86
  .nullable(),
@@ -103,7 +104,7 @@ const ProductCoreInputSchema = z.object({
103
104
  coverImages: z
104
105
  .array(CoverImageInputSchema)
105
106
  .min(1, "At least one cover image is required")
106
- .max(3, "Maximum of 3 cover images allowed"),
107
+ .max(5, "Maximum of 5 cover images allowed"),
107
108
  currency: z.enum(WAGES_CURRENCY),
108
109
  productFiles: z.array(DeliveryFileInputSchema).default([]),
109
110
 
@@ -114,7 +115,7 @@ const ProductCoreInputSchema = z.object({
114
115
  price: z.number().int("Must be in cents").min(0).optional(),
115
116
  suggestedPrice: z.number().int("Must be in cents").min(0).optional(),
116
117
 
117
- discounts: z.array(ProductDiscountEntitySchema).default([]),
118
+ discounts: z.array(ProductDiscountEntitySchema).max(3).default([]),
118
119
  });
119
120
 
120
121
  export const CreateProductInputSchema = ProductCoreInputSchema.superRefine(