@zyacreatives/shared 2.4.6 → 2.4.8

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.
@@ -34,7 +34,7 @@ export declare const ProductLinkSchema: z.ZodObject<{
34
34
  }, z.core.$strip>;
35
35
  export type ProductLink = z.infer<typeof ProductLinkSchema>;
36
36
  export declare const BaseProductSchema: z.ZodObject<{
37
- id: z.ZodCUID2;
37
+ id: z.ZodString;
38
38
  createdAt: z.ZodDate;
39
39
  updatedAt: z.ZodDate;
40
40
  deletedAt: z.ZodNullable<z.ZodDate>;
@@ -45,7 +45,7 @@ export declare const BaseProductSchema: z.ZodObject<{
45
45
  readonly ARCHIVED: "ARCHIVED";
46
46
  readonly DELETED: "DELETED";
47
47
  }>>;
48
- sellerId: z.ZodCUID2;
48
+ sellerId: z.ZodString;
49
49
  title: z.ZodString;
50
50
  description: z.ZodString;
51
51
  keyFeatures: z.ZodString;
@@ -88,7 +88,7 @@ export declare const BaseProductSchema: z.ZodObject<{
88
88
  supportPhone: z.ZodNullable<z.ZodString>;
89
89
  }, z.core.$strip>;
90
90
  export declare const CreateProductInputSchema: z.ZodObject<{
91
- id: z.ZodCUID2;
91
+ id: z.ZodString;
92
92
  title: z.ZodString;
93
93
  description: z.ZodString;
94
94
  keyFeatures: z.ZodString;
@@ -147,7 +147,7 @@ export declare const CreateProductInputSchema: z.ZodObject<{
147
147
  }, z.core.$strip>>>;
148
148
  }, z.core.$strip>;
149
149
  export declare const ProductServiceAndComplianceInputSchema: z.ZodObject<{
150
- id: z.ZodCUID2;
150
+ id: z.ZodString;
151
151
  supportEmail: z.ZodEmail;
152
152
  supportPhone: z.ZodOptional<z.ZodString>;
153
153
  ownsRights: z.ZodLiteral<true>;
@@ -218,11 +218,11 @@ export declare const UpdateProductInputSchema: z.ZodObject<{
218
218
  noHarmfulContent: z.ZodOptional<z.ZodLiteral<true>>;
219
219
  providesSupport: z.ZodOptional<z.ZodBoolean>;
220
220
  agreesToTerms: z.ZodOptional<z.ZodLiteral<true>>;
221
- id: z.ZodCUID2;
221
+ id: z.ZodString;
222
222
  }, z.core.$strip>;
223
223
  export declare const ProductEntitySchema: z.ZodObject<{
224
- id: z.ZodCUID2;
225
- sellerId: z.ZodCUID2;
224
+ id: z.ZodString;
225
+ sellerId: z.ZodString;
226
226
  sellerUsername: z.ZodString;
227
227
  sellerName: z.ZodString;
228
228
  sellerImageUrl: z.ZodNullable<z.ZodOptional<z.ZodURL>>;
@@ -286,8 +286,8 @@ export declare const ProductEntitySchema: z.ZodObject<{
286
286
  deletedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
287
287
  }, z.core.$strip>;
288
288
  export declare const ProductSearchDocumentSchema: z.ZodObject<{
289
- id: z.ZodCUID2;
290
- sellerId: z.ZodCUID2;
289
+ id: z.ZodString;
290
+ sellerId: z.ZodString;
291
291
  sellerUsername: z.ZodString;
292
292
  sellerName: z.ZodString;
293
293
  sellerImageUrl: z.ZodNullable<z.ZodString>;
@@ -324,8 +324,8 @@ export declare const SearchProductInputSchema: z.ZodObject<{
324
324
  }, z.core.$strip>;
325
325
  export declare const SearchProductOutputSchema: z.ZodObject<{
326
326
  products: z.ZodArray<z.ZodObject<{
327
- id: z.ZodCUID2;
328
- sellerId: z.ZodCUID2;
327
+ id: z.ZodString;
328
+ sellerId: z.ZodString;
329
329
  sellerUsername: z.ZodString;
330
330
  sellerName: z.ZodString;
331
331
  sellerImageUrl: z.ZodNullable<z.ZodString>;
@@ -366,8 +366,8 @@ export declare const GetMarketplaceInfoOutputSchema: z.ZodObject<{
366
366
  subcategories: z.ZodArray<z.ZodString>;
367
367
  }, z.core.$strip>>;
368
368
  whatsHot: z.ZodArray<z.ZodObject<{
369
- id: z.ZodCUID2;
370
- sellerId: z.ZodCUID2;
369
+ id: z.ZodString;
370
+ sellerId: z.ZodString;
371
371
  sellerUsername: z.ZodString;
372
372
  sellerName: z.ZodString;
373
373
  sellerImageUrl: z.ZodNullable<z.ZodString>;
@@ -395,8 +395,8 @@ export declare const GetMarketplaceInfoOutputSchema: z.ZodObject<{
395
395
  deletedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
396
396
  }, z.core.$strip>>;
397
397
  communityFavourites: z.ZodArray<z.ZodObject<{
398
- id: z.ZodCUID2;
399
- sellerId: z.ZodCUID2;
398
+ id: z.ZodString;
399
+ sellerId: z.ZodString;
400
400
  sellerUsername: z.ZodString;
401
401
  sellerName: z.ZodString;
402
402
  sellerImageUrl: z.ZodNullable<z.ZodString>;
@@ -41,12 +41,12 @@ exports.ProductLinkSchema = zod_openapi_1.z.object({
41
41
  url: zod_openapi_1.z.string(),
42
42
  });
43
43
  exports.BaseProductSchema = zod_openapi_1.z.object({
44
- id: zod_openapi_1.z.cuid2(),
44
+ id: zod_openapi_1.z.string(),
45
45
  createdAt: zod_openapi_1.z.date(),
46
46
  updatedAt: zod_openapi_1.z.date(),
47
47
  deletedAt: zod_openapi_1.z.date().nullable(),
48
48
  status: zod_openapi_1.z.enum(constants_1.PRODUCT_STATUS).default("DRAFT"),
49
- sellerId: zod_openapi_1.z.cuid2(),
49
+ sellerId: zod_openapi_1.z.string(),
50
50
  title: zod_openapi_1.z.string(),
51
51
  description: zod_openapi_1.z.string(),
52
52
  keyFeatures: zod_openapi_1.z.string(),
@@ -70,7 +70,7 @@ exports.BaseProductSchema = zod_openapi_1.z.object({
70
70
  supportPhone: zod_openapi_1.z.string().nullable(),
71
71
  });
72
72
  const ProductCoreInputSchema = zod_openapi_1.z.object({
73
- id: zod_openapi_1.z.cuid2().openapi({ description: "Client-generated ID for the product" }),
73
+ id: zod_openapi_1.z.string().openapi({ description: "Client-generated ID for the product" }),
74
74
  title: zod_openapi_1.z.string().min(1, "Title is required").max(255),
75
75
  description: zod_openapi_1.z.string().min(1, "Description is required"),
76
76
  keyFeatures: zod_openapi_1.z.string(),
@@ -156,7 +156,7 @@ exports.CreateProductInputSchema = ProductCoreInputSchema.superRefine((data, ctx
156
156
  });
157
157
  });
158
158
  exports.ProductServiceAndComplianceInputSchema = zod_openapi_1.z.object({
159
- id: zod_openapi_1.z.cuid2().openapi({ description: "ID of the product" }),
159
+ id: zod_openapi_1.z.string().openapi({ description: "ID of the product" }),
160
160
  supportEmail: zod_openapi_1.z.email("A valid support email is required"),
161
161
  supportPhone: zod_openapi_1.z.string().optional(),
162
162
  ownsRights: zod_openapi_1.z.literal(true, "You must confirm you own the rights to this product."),
@@ -168,12 +168,12 @@ exports.ProductServiceAndComplianceInputSchema = zod_openapi_1.z.object({
168
168
  exports.UpdateProductInputSchema = ProductCoreInputSchema.extend(exports.ProductServiceAndComplianceInputSchema.omit({ id: true }).shape)
169
169
  .partial()
170
170
  .extend({
171
- id: zod_openapi_1.z.cuid2().openapi({ description: "ID of the product being updated" }),
171
+ id: zod_openapi_1.z.string().openapi({ description: "ID of the product being updated" }),
172
172
  });
173
173
  exports.ProductEntitySchema = zod_openapi_1.z
174
174
  .object({
175
- id: zod_openapi_1.z.cuid2(),
176
- sellerId: zod_openapi_1.z.cuid2().openapi({ description: "ID of the creator/seller" }),
175
+ id: zod_openapi_1.z.string(),
176
+ sellerId: zod_openapi_1.z.string().openapi({ description: "ID of the creator/seller" }),
177
177
  sellerUsername: zod_openapi_1.z.string(),
178
178
  sellerName: zod_openapi_1.z.string(),
179
179
  sellerImageUrl: zod_openapi_1.z.url().optional().nullable(),
@@ -204,8 +204,8 @@ exports.ProductEntitySchema = zod_openapi_1.z
204
204
  })
205
205
  .openapi({ title: "ProductEntity" });
206
206
  exports.ProductSearchDocumentSchema = zod_openapi_1.z.object({
207
- id: zod_openapi_1.z.cuid2(),
208
- sellerId: zod_openapi_1.z.cuid2(),
207
+ id: zod_openapi_1.z.string(),
208
+ sellerId: zod_openapi_1.z.string(),
209
209
  sellerUsername: zod_openapi_1.z.string(),
210
210
  sellerName: zod_openapi_1.z.string(),
211
211
  sellerImageUrl: zod_openapi_1.z.string().url().nullable(),
@@ -670,8 +670,8 @@ export declare const UserWithPostBookmarksEntitySchema: z.ZodObject<{
670
670
  export declare const UserWithProductsEntitySchema: z.ZodObject<{
671
671
  userId: z.ZodCUID2;
672
672
  products: z.ZodArray<z.ZodObject<{
673
- id: z.ZodCUID2;
674
- sellerId: z.ZodCUID2;
673
+ id: z.ZodString;
674
+ sellerId: z.ZodString;
675
675
  sellerUsername: z.ZodString;
676
676
  sellerName: z.ZodString;
677
677
  sellerImageUrl: z.ZodNullable<z.ZodOptional<z.ZodURL>>;
@@ -822,8 +822,8 @@ export declare const GetUserWithProductsOutputSchema: z.ZodObject<{
822
822
  products: z.ZodObject<{
823
823
  userId: z.ZodCUID2;
824
824
  products: z.ZodArray<z.ZodObject<{
825
- id: z.ZodCUID2;
826
- sellerId: z.ZodCUID2;
825
+ id: z.ZodString;
826
+ sellerId: z.ZodString;
827
827
  sellerUsername: z.ZodString;
828
828
  sellerName: z.ZodString;
829
829
  sellerImageUrl: z.ZodNullable<z.ZodOptional<z.ZodURL>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.4.6",
3
+ "version": "2.4.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -51,12 +51,12 @@ export const ProductLinkSchema = z.object({
51
51
  export type ProductLink = z.infer<typeof ProductLinkSchema>;
52
52
 
53
53
  export const BaseProductSchema = z.object({
54
- id: z.cuid2(),
54
+ id: z.string(),
55
55
  createdAt: z.date(),
56
56
  updatedAt: z.date(),
57
57
  deletedAt: z.date().nullable(),
58
58
  status: z.enum(PRODUCT_STATUS).default("DRAFT"),
59
- sellerId: z.cuid2(),
59
+ sellerId: z.string(),
60
60
  title: z.string(),
61
61
  description: z.string(),
62
62
  keyFeatures: z.string(),
@@ -85,7 +85,7 @@ export const BaseProductSchema = z.object({
85
85
  });
86
86
 
87
87
  const ProductCoreInputSchema = z.object({
88
- id: z.cuid2().openapi({ description: "Client-generated ID for the product" }),
88
+ id: z.string().openapi({ description: "Client-generated ID for the product" }),
89
89
 
90
90
  title: z.string().min(1, "Title is required").max(255),
91
91
  description: z.string().min(1, "Description is required"),
@@ -197,7 +197,7 @@ export const CreateProductInputSchema = ProductCoreInputSchema.superRefine(
197
197
  );
198
198
 
199
199
  export const ProductServiceAndComplianceInputSchema = z.object({
200
- id: z.cuid2().openapi({ description: "ID of the product" }),
200
+ id: z.string().openapi({ description: "ID of the product" }),
201
201
 
202
202
  supportEmail: z.email("A valid support email is required"),
203
203
  supportPhone: z.string().optional(),
@@ -219,14 +219,14 @@ export const UpdateProductInputSchema = ProductCoreInputSchema.extend(
219
219
  )
220
220
  .partial()
221
221
  .extend({
222
- id: z.cuid2().openapi({ description: "ID of the product being updated" }),
222
+ id: z.string().openapi({ description: "ID of the product being updated" }),
223
223
  });
224
224
 
225
225
  export const ProductEntitySchema = z
226
226
  .object({
227
- id: z.cuid2(),
227
+ id: z.string(),
228
228
 
229
- sellerId: z.cuid2().openapi({ description: "ID of the creator/seller" }),
229
+ sellerId: z.string().openapi({ description: "ID of the creator/seller" }),
230
230
  sellerUsername: z.string(),
231
231
  sellerName: z.string(),
232
232
  sellerImageUrl: z.url().optional().nullable(),
@@ -263,8 +263,8 @@ export const ProductEntitySchema = z
263
263
  .openapi({ title: "ProductEntity" });
264
264
 
265
265
  export const ProductSearchDocumentSchema = z.object({
266
- id: z.cuid2(),
267
- sellerId: z.cuid2(),
266
+ id: z.string(),
267
+ sellerId: z.string(),
268
268
  sellerUsername: z.string(),
269
269
  sellerName: z.string(),
270
270
  sellerImageUrl: z.string().url().nullable(),