@zyacreatives/shared 2.2.91 → 2.2.92

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.
@@ -16,10 +16,6 @@ export declare const ProductDiscountEntitySchema: z.ZodObject<{
16
16
  amount: z.ZodNumber;
17
17
  discountCode: z.ZodOptional<z.ZodString>;
18
18
  }, z.core.$strip>;
19
- export declare const ProductAdditionalServiceSchema: z.ZodObject<{
20
- title: z.ZodString;
21
- price: z.ZodNumber;
22
- }, z.core.$strip>;
23
19
  export declare const CreateProductInputSchema: z.ZodObject<{
24
20
  title: z.ZodString;
25
21
  description: z.ZodString;
@@ -58,10 +54,6 @@ export declare const ProductServiceAndComplianceInputSchema: z.ZodObject<{
58
54
  id: z.ZodCUID2;
59
55
  supportEmail: z.ZodEmail;
60
56
  supportPhone: z.ZodOptional<z.ZodString>;
61
- additionalServices: z.ZodDefault<z.ZodArray<z.ZodObject<{
62
- title: z.ZodString;
63
- price: z.ZodNumber;
64
- }, z.core.$strip>>>;
65
57
  ownsRights: z.ZodLiteral<true>;
66
58
  noHarmfulContent: z.ZodLiteral<true>;
67
59
  providesSupport: z.ZodBoolean;
@@ -102,10 +94,6 @@ export declare const UpdateProductInputSchema: z.ZodObject<{
102
94
  }, z.core.$strip>>>>;
103
95
  supportEmail: z.ZodOptional<z.ZodEmail>;
104
96
  supportPhone: z.ZodOptional<z.ZodOptional<z.ZodString>>;
105
- additionalServices: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
106
- title: z.ZodString;
107
- price: z.ZodNumber;
108
- }, z.core.$strip>>>>;
109
97
  ownsRights: z.ZodOptional<z.ZodLiteral<true>>;
110
98
  noHarmfulContent: z.ZodOptional<z.ZodLiteral<true>>;
111
99
  providesSupport: z.ZodOptional<z.ZodBoolean>;
@@ -152,10 +140,6 @@ export declare const ProductEntitySchema: z.ZodObject<{
152
140
  }, z.core.$strip>>>;
153
141
  supportEmail: z.ZodNullable<z.ZodOptional<z.ZodEmail>>;
154
142
  supportPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
155
- additionalServices: z.ZodDefault<z.ZodArray<z.ZodObject<{
156
- title: z.ZodString;
157
- price: z.ZodNumber;
158
- }, z.core.$strip>>>;
159
143
  createdAt: z.ZodCoercedDate<unknown>;
160
144
  updatedAt: z.ZodCoercedDate<unknown>;
161
145
  deletedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
@@ -163,7 +147,6 @@ export declare const ProductEntitySchema: z.ZodObject<{
163
147
  export type ProductCoverImageEntity = z.infer<typeof ProductCoverImageEntitySchema>;
164
148
  export type ProductDeliveryFileEntity = z.infer<typeof ProductDeliveryFileEntitySchema>;
165
149
  export type ProductDiscountEntity = z.infer<typeof ProductDiscountEntitySchema>;
166
- export type ProductAdditionalService = z.infer<typeof ProductAdditionalServiceSchema>;
167
150
  export type CreateProductInputEntity = z.infer<typeof CreateProductInputSchema>;
168
151
  export type ProductServiceAndComplianceInputEntity = z.infer<typeof ProductServiceAndComplianceInputSchema>;
169
152
  export type UpdateProductInputEntity = z.infer<typeof UpdateProductInputSchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductEntitySchema = exports.UpdateProductInputSchema = exports.ProductServiceAndComplianceInputSchema = exports.CreateProductInputSchema = exports.ProductAdditionalServiceSchema = exports.ProductDiscountEntitySchema = exports.ProductDeliveryFileEntitySchema = exports.ProductCoverImageEntitySchema = void 0;
3
+ exports.ProductEntitySchema = exports.UpdateProductInputSchema = exports.ProductServiceAndComplianceInputSchema = exports.CreateProductInputSchema = exports.ProductDiscountEntitySchema = exports.ProductDeliveryFileEntitySchema = exports.ProductCoverImageEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  exports.ProductCoverImageEntitySchema = zod_openapi_1.z.object({
@@ -24,10 +24,6 @@ exports.ProductDiscountEntitySchema = zod_openapi_1.z.object({
24
24
  .min(0, "Discount amount cannot be negative"),
25
25
  discountCode: zod_openapi_1.z.string().optional(),
26
26
  });
27
- exports.ProductAdditionalServiceSchema = zod_openapi_1.z.object({
28
- title: zod_openapi_1.z.string().min(1, "Service title is required"),
29
- price: zod_openapi_1.z.number().int("Price must be in cents").min(0),
30
- });
31
27
  const ProductCoreInputSchema = zod_openapi_1.z.object({
32
28
  title: zod_openapi_1.z.string().min(1, "Title is required").max(255),
33
29
  description: zod_openapi_1.z.string().min(1, "Description is required"),
@@ -98,7 +94,6 @@ exports.ProductServiceAndComplianceInputSchema = zod_openapi_1.z.object({
98
94
  id: zod_openapi_1.z.cuid2().openapi({ description: "ID of the product" }),
99
95
  supportEmail: zod_openapi_1.z.email("A valid support email is required"),
100
96
  supportPhone: zod_openapi_1.z.string().optional(),
101
- additionalServices: zod_openapi_1.z.array(exports.ProductAdditionalServiceSchema).default([]),
102
97
  ownsRights: zod_openapi_1.z.literal(true, "You must confirm you own the rights to this product."),
103
98
  noHarmfulContent: zod_openapi_1.z.literal(true, "You must confirm no harmful content."),
104
99
  providesSupport: zod_openapi_1.z.boolean(),
@@ -132,7 +127,6 @@ exports.ProductEntitySchema = zod_openapi_1.z
132
127
  discounts: zod_openapi_1.z.array(exports.ProductDiscountEntitySchema).default([]),
133
128
  supportEmail: zod_openapi_1.z.email().optional().nullable(),
134
129
  supportPhone: zod_openapi_1.z.string().optional().nullable(),
135
- additionalServices: zod_openapi_1.z.array(exports.ProductAdditionalServiceSchema).default([]),
136
130
  createdAt: zod_openapi_1.z.coerce.date(),
137
131
  updatedAt: zod_openapi_1.z.coerce.date(),
138
132
  deletedAt: zod_openapi_1.z.coerce.date().optional().nullable(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.91",
3
+ "version": "2.2.92",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,10 +25,6 @@ export const ProductDiscountEntitySchema = z.object({
25
25
  discountCode: z.string().optional(),
26
26
  });
27
27
 
28
- export const ProductAdditionalServiceSchema = z.object({
29
- title: z.string().min(1, "Service title is required"),
30
- price: z.number().int("Price must be in cents").min(0),
31
- });
32
28
 
33
29
  const ProductCoreInputSchema = z.object({
34
30
  title: z.string().min(1, "Title is required").max(255),
@@ -121,8 +117,6 @@ export const ProductServiceAndComplianceInputSchema = z.object({
121
117
  supportEmail: z.email("A valid support email is required"),
122
118
  supportPhone: z.string().optional(),
123
119
 
124
- additionalServices: z.array(ProductAdditionalServiceSchema).default([]),
125
-
126
120
  ownsRights: z.literal(
127
121
  true,
128
122
  "You must confirm you own the rights to this product.",
@@ -172,8 +166,6 @@ export const ProductEntitySchema = z
172
166
 
173
167
  supportEmail: z.email().optional().nullable(),
174
168
  supportPhone: z.string().optional().nullable(),
175
- additionalServices: z.array(ProductAdditionalServiceSchema).default([]),
176
-
177
169
  createdAt: z.coerce.date(),
178
170
  updatedAt: z.coerce.date(),
179
171
  deletedAt: z.coerce.date().optional().nullable(),
@@ -187,9 +179,6 @@ export type ProductDeliveryFileEntity = z.infer<
187
179
  typeof ProductDeliveryFileEntitySchema
188
180
  >;
189
181
  export type ProductDiscountEntity = z.infer<typeof ProductDiscountEntitySchema>;
190
- export type ProductAdditionalService = z.infer<
191
- typeof ProductAdditionalServiceSchema
192
- >;
193
182
 
194
183
  export type CreateProductInputEntity = z.infer<typeof CreateProductInputSchema>;
195
184
  export type ProductServiceAndComplianceInputEntity = z.infer<