@zyacreatives/shared 2.5.54 → 2.5.55

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.
Files changed (111) hide show
  1. package/dist/index.d.ts +0 -1
  2. package/dist/index.js +0 -1
  3. package/dist/schemas/activity.d.ts +1 -0
  4. package/dist/schemas/auth.d.ts +2 -0
  5. package/dist/schemas/bookmark.d.ts +62 -7
  6. package/dist/schemas/bookmark.js +32 -30
  7. package/dist/schemas/brand.d.ts +3 -3
  8. package/dist/schemas/chat.d.ts +96 -52
  9. package/dist/schemas/chat.js +44 -18
  10. package/dist/schemas/comment.d.ts +65 -21
  11. package/dist/schemas/comment.js +48 -54
  12. package/dist/schemas/common.d.ts +15 -11
  13. package/dist/schemas/creative.d.ts +3 -3
  14. package/dist/schemas/discipline.d.ts +63 -12
  15. package/dist/schemas/discipline.js +62 -65
  16. package/dist/schemas/entity-stats.d.ts +35 -3
  17. package/dist/schemas/entity-stats.js +24 -38
  18. package/dist/schemas/feed.d.ts +50 -3
  19. package/dist/schemas/feed.js +43 -13
  20. package/dist/schemas/file.d.ts +65 -24
  21. package/dist/schemas/file.js +60 -49
  22. package/dist/schemas/index.d.ts +1 -0
  23. package/dist/schemas/index.js +1 -0
  24. package/dist/schemas/investor-shortlist.d.ts +68 -11
  25. package/dist/schemas/investor-shortlist.js +46 -24
  26. package/dist/schemas/investor-signal.d.ts +52 -12
  27. package/dist/schemas/investor-signal.js +59 -39
  28. package/dist/schemas/investor.d.ts +3 -3
  29. package/dist/schemas/job-application.d.ts +291 -279
  30. package/dist/schemas/job-application.js +59 -95
  31. package/dist/schemas/job.d.ts +200 -659
  32. package/dist/schemas/job.js +98 -231
  33. package/dist/schemas/like.d.ts +3 -0
  34. package/dist/schemas/message.d.ts +125 -94
  35. package/dist/schemas/message.js +54 -55
  36. package/dist/schemas/notification.d.ts +99 -32
  37. package/dist/schemas/notification.js +46 -42
  38. package/dist/schemas/payout-method.d.ts +51 -31
  39. package/dist/schemas/payout-method.js +48 -58
  40. package/dist/schemas/post.d.ts +295 -204
  41. package/dist/schemas/post.js +148 -272
  42. package/dist/schemas/product.d.ts +308 -229
  43. package/dist/schemas/product.js +111 -94
  44. package/dist/schemas/project.d.ts +75 -107
  45. package/dist/schemas/project.js +1 -5
  46. package/dist/schemas/seller.d.ts +10 -10
  47. package/dist/schemas/user-strike.d.ts +3 -0
  48. package/dist/schemas/user.d.ts +114 -123
  49. package/dist/schemas/username.d.ts +1 -0
  50. package/dist/schemas/view.d.ts +1 -0
  51. package/dist/types/activity.d.ts +1 -3
  52. package/dist/types/auth.d.ts +1 -4
  53. package/dist/types/bookmark.d.ts +1 -3
  54. package/dist/types/chat.d.ts +1 -11
  55. package/dist/types/comment.d.ts +1 -5
  56. package/dist/types/common.d.ts +2 -8
  57. package/dist/types/discipline.d.ts +1 -11
  58. package/dist/types/entity-stats.d.ts +1 -3
  59. package/dist/types/feed.d.ts +1 -5
  60. package/dist/types/investor-shortlist.d.ts +1 -6
  61. package/dist/types/investor-signal.d.ts +1 -7
  62. package/dist/types/like.d.ts +1 -3
  63. package/dist/types/message.d.ts +1 -9
  64. package/dist/types/notification.d.ts +1 -9
  65. package/dist/types/user-strike.d.ts +1 -5
  66. package/dist/types/username.d.ts +1 -3
  67. package/package.json +1 -1
  68. package/src/index.ts +4 -5
  69. package/src/schemas/activity.ts +5 -4
  70. package/src/schemas/auth.ts +14 -10
  71. package/src/schemas/bookmark.ts +48 -29
  72. package/src/schemas/chat.ts +79 -18
  73. package/src/schemas/comment.ts +63 -49
  74. package/src/schemas/common.ts +8 -3
  75. package/src/schemas/discipline.ts +103 -71
  76. package/src/schemas/entity-stats.ts +32 -38
  77. package/src/schemas/feed.ts +62 -15
  78. package/src/schemas/file.ts +85 -58
  79. package/src/schemas/index.ts +1 -0
  80. package/src/schemas/investor-shortlist.ts +57 -8
  81. package/src/schemas/investor-signal.ts +79 -27
  82. package/src/schemas/job-application.ts +81 -115
  83. package/src/schemas/job.ts +160 -301
  84. package/src/schemas/like.ts +5 -1
  85. package/src/schemas/message.ts +71 -64
  86. package/src/schemas/notification.ts +63 -51
  87. package/src/schemas/payout-method.ts +47 -63
  88. package/src/schemas/post.ts +211 -272
  89. package/src/schemas/product.ts +202 -139
  90. package/src/schemas/project.ts +7 -10
  91. package/src/schemas/user-strike.ts +7 -1
  92. package/src/schemas/user.ts +2 -6
  93. package/src/schemas/username.ts +5 -3
  94. package/src/schemas/view.ts +0 -50
  95. package/src/types/activity.ts +0 -4
  96. package/src/types/auth.ts +0 -5
  97. package/src/types/bookmark.ts +0 -4
  98. package/src/types/chat.ts +0 -31
  99. package/src/types/comment.ts +0 -12
  100. package/src/types/common.ts +0 -14
  101. package/src/types/discipline.ts +0 -32
  102. package/src/types/entity-stats.ts +0 -4
  103. package/src/types/feed.ts +0 -10
  104. package/src/types/index.ts +0 -16
  105. package/src/types/investor-shortlist.ts +0 -18
  106. package/src/types/investor-signal.ts +0 -26
  107. package/src/types/like.ts +0 -4
  108. package/src/types/message.ts +0 -26
  109. package/src/types/notification.ts +0 -34
  110. package/src/types/user-strike.ts +0 -10
  111. package/src/types/username.ts +0 -4
@@ -1,15 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SellerDashboardStatsOutputSchema = exports.RevenueChartInputSchema = exports.ProductRevenueChartOutputSchema = exports.RevenueChartPointSchema = exports.ProductTransactionsOutputSchema = exports.ProductTransactionItemSchema = exports.ProductStatsOutputSchema = exports.ProductDiscountCheckOutputSchema = exports.ProductDiscountCheckInputSchema = exports.MarketplaceProductEntitySchema = exports.GetMarketplaceInfoOutputSchema = exports.MarketplaceCategorySchema = exports.SearchProductOutputSchema = exports.SearchProductInputSchema = exports.ProductSearchDocumentSchema = exports.ProductEntitySchema = exports.UpdateProductInputSchema = exports.ProductServiceAndComplianceInputSchema = exports.CreateProductInputSchema = exports.ProductLinkSchema = exports.ProductDiscountEntitySchema = void 0;
3
+ exports.SellerDashboardStatsOutputSchema = exports.ProductRevenueChartOutputSchema = exports.RevenueChartPointSchema = exports.ProductTransactionsOutputSchema = exports.ProductTransactionItemSchema = exports.ProductStatsOutputSchema = exports.ProductDiscountCheckOutputSchema = exports.GetMarketplaceInfoOutputSchema = exports.SearchProductOutputSchema = exports.MarketplaceCategorySchema = exports.MarketplaceProductEntitySchema = exports.ProductSearchDocumentSchema = exports.RevenueChartInputSchema = exports.ProductDiscountCheckInputSchema = exports.SearchProductInputSchema = exports.UpdateProductInputSchema = exports.ProductServiceAndComplianceInputSchema = exports.CreateProductInputSchema = exports.ProductEntitySchema = exports.ProductLinkSchema = exports.ProductDiscountEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const file_1 = require("./file");
7
+ /**
8
+ * --------------------------------
9
+ * SHARED
10
+ * --------------------------------
11
+ */
7
12
  exports.ProductDiscountEntitySchema = zod_openapi_1.z.object({
8
13
  discountType: zod_openapi_1.z.enum(constants_1.DISCOUNT_TYPES),
9
- amount: zod_openapi_1.z
10
- .number()
11
- .int("Amount must be a whole number")
12
- .min(0, "Discount amount cannot be negative"),
14
+ amount: zod_openapi_1.z.number().int().min(0),
13
15
  discountCode: zod_openapi_1.z.string().optional(),
14
16
  active: zod_openapi_1.z.boolean().default(true),
15
17
  });
@@ -17,23 +19,70 @@ exports.ProductLinkSchema = zod_openapi_1.z.object({
17
19
  title: zod_openapi_1.z.string().nullable(),
18
20
  url: zod_openapi_1.z.string(),
19
21
  });
20
- const ProductCoreInputSchema = zod_openapi_1.z.object({
21
- id: zod_openapi_1.z.cuid2().openapi({ description: "Client-generated ID for the product" }),
22
- title: zod_openapi_1.z.string().min(1, "Title is required").max(255),
23
- description: zod_openapi_1.z.string().min(1, "Description is required"),
22
+ /**
23
+ * --------------------------------
24
+ * SHAPE
25
+ * --------------------------------
26
+ */
27
+ const ProductShape = zod_openapi_1.z.object({
28
+ title: zod_openapi_1.z.string().min(1).max(255),
29
+ description: zod_openapi_1.z.string().min(1),
24
30
  keyFeatures: zod_openapi_1.z.string(),
25
31
  status: zod_openapi_1.z.enum(constants_1.PRODUCT_STATUS).default("DRAFT"),
26
- category: zod_openapi_1.z.string().min(1, "Category is required"),
32
+ category: zod_openapi_1.z.string().min(1),
27
33
  subcategory: zod_openapi_1.z.string().optional(),
28
- tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).max(10, "Keep tags to a maximum of 10").default([]),
29
- files: zod_openapi_1.z.array(file_1.CreateFileInputSchema).default([]),
30
- productLinks: zod_openapi_1.z.array(exports.ProductLinkSchema).default([]),
34
+ tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).max(10).default([]),
31
35
  currency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY),
32
36
  pricingModel: zod_openapi_1.z.enum(constants_1.PRICING_MODELS).default(constants_1.PRICING_MODELS.FIXED),
33
- price: zod_openapi_1.z.number().int("Must be a whole number").min(0).optional(),
34
- suggestedPrice: zod_openapi_1.z.number().int("Must be in cents").min(0).optional(),
37
+ price: zod_openapi_1.z.number().int().min(0).optional(),
38
+ suggestedPrice: zod_openapi_1.z.number().int().min(0).optional(),
35
39
  discounts: zod_openapi_1.z.array(exports.ProductDiscountEntitySchema).max(3).default([]),
36
40
  });
41
+ const ProductComplianceShape = zod_openapi_1.z.object({
42
+ supportEmail: zod_openapi_1.z.email(),
43
+ supportPhone: zod_openapi_1.z.string().optional(),
44
+ ownsRights: zod_openapi_1.z.literal(true),
45
+ noHarmfulContent: zod_openapi_1.z.literal(true),
46
+ providesSupport: zod_openapi_1.z.boolean(),
47
+ agreesToTerms: zod_openapi_1.z.literal(true),
48
+ });
49
+ /**
50
+ * --------------------------------
51
+ * BASE ENTITY
52
+ * --------------------------------
53
+ */
54
+ exports.ProductEntitySchema = zod_openapi_1.z
55
+ .object({
56
+ id: zod_openapi_1.z.cuid2(),
57
+ sellerId: zod_openapi_1.z.cuid2(),
58
+ sellerUsername: zod_openapi_1.z.string(),
59
+ sellerName: zod_openapi_1.z.string(),
60
+ sellerImageUrl: zod_openapi_1.z.url().nullable().optional(),
61
+ ...ProductShape.shape,
62
+ subcategory: zod_openapi_1.z.string().nullable().optional(),
63
+ files: zod_openapi_1.z.array(file_1.FileEntitySchema).default([]),
64
+ productLinks: zod_openapi_1.z.array(exports.ProductLinkSchema).default([]),
65
+ ownsRights: zod_openapi_1.z.boolean(),
66
+ noHarmfulContent: zod_openapi_1.z.boolean(),
67
+ providesSupport: zod_openapi_1.z.boolean(),
68
+ agreesToTerms: zod_openapi_1.z.boolean(),
69
+ supportEmail: zod_openapi_1.z.email().nullable().optional(),
70
+ supportPhone: zod_openapi_1.z.string().nullable().optional(),
71
+ createdAt: zod_openapi_1.z.iso.datetime(),
72
+ updatedAt: zod_openapi_1.z.iso.datetime(),
73
+ deletedAt: zod_openapi_1.z.iso.datetime().nullable().optional(),
74
+ })
75
+ .openapi("Product");
76
+ /**
77
+ * --------------------------------
78
+ * INPUTS
79
+ * --------------------------------
80
+ */
81
+ const ProductCoreInputSchema = ProductShape.extend({
82
+ id: zod_openapi_1.z.cuid2(),
83
+ files: zod_openapi_1.z.array(file_1.CreateFileInputSchema).default([]),
84
+ productLinks: zod_openapi_1.z.array(exports.ProductLinkSchema).default([]),
85
+ });
37
86
  exports.CreateProductInputSchema = ProductCoreInputSchema.superRefine((data, ctx) => {
38
87
  if (data.pricingModel === constants_1.PRICING_MODELS.FIXED &&
39
88
  (!data.price || data.price <= 0)) {
@@ -62,8 +111,8 @@ exports.CreateProductInputSchema = ProductCoreInputSchema.superRefine((data, ctx
62
111
  path: ["price"],
63
112
  });
64
113
  }
65
- const deliveryFiles = data.files.filter((f) => f.parentType === "PRODUCT_DELIVERY");
66
- const coverImages = data.files.filter((f) => f.parentType === "PRODUCT_COVER");
114
+ const deliveryFiles = data.files.filter((file) => file.parentType === "PRODUCT_DELIVERY");
115
+ const coverImages = data.files.filter((file) => file.parentType === "PRODUCT_COVER");
67
116
  if (deliveryFiles.length === 0 && data.productLinks.length === 0) {
68
117
  ctx.addIssue({
69
118
  code: "custom",
@@ -79,7 +128,7 @@ exports.CreateProductInputSchema = ProductCoreInputSchema.superRefine((data, ctx
79
128
  });
80
129
  }
81
130
  else {
82
- const thumbnails = coverImages.filter((img) => img.isThumbnail);
131
+ const thumbnails = coverImages.filter((image) => image.isThumbnail);
83
132
  if (thumbnails.length !== 1) {
84
133
  ctx.addIssue({
85
134
  code: "custom",
@@ -109,59 +158,43 @@ exports.CreateProductInputSchema = ProductCoreInputSchema.superRefine((data, ctx
109
158
  }
110
159
  });
111
160
  });
112
- exports.ProductServiceAndComplianceInputSchema = zod_openapi_1.z.object({
113
- id: zod_openapi_1.z.cuid2().openapi({ description: "ID of the product" }),
114
- supportEmail: zod_openapi_1.z.email("A valid support email is required"),
115
- supportPhone: zod_openapi_1.z.string().optional(),
116
- ownsRights: zod_openapi_1.z.literal(true, '"You must confirm you own the rights to this product."'),
117
- noHarmfulContent: zod_openapi_1.z.literal(true, "You must confirm no harmful content."),
118
- providesSupport: zod_openapi_1.z.boolean(),
119
- agreesToTerms: zod_openapi_1.z.literal(true, "You must agree to the Terms."),
120
- });
121
- exports.UpdateProductInputSchema = ProductCoreInputSchema.extend(exports.ProductServiceAndComplianceInputSchema.omit({ id: true }).shape)
161
+ exports.ProductServiceAndComplianceInputSchema = ProductComplianceShape.extend({
162
+ id: zod_openapi_1.z.cuid2(),
163
+ }).openapi("ProductServiceAndComplianceInput");
164
+ exports.UpdateProductInputSchema = ProductCoreInputSchema.extend(ProductComplianceShape.shape)
122
165
  .partial()
123
166
  .extend({
124
- id: zod_openapi_1.z.cuid2().openapi({ description: "ID of the product being updated" }),
125
- });
126
- exports.ProductEntitySchema = zod_openapi_1.z
127
- .object({
128
167
  id: zod_openapi_1.z.cuid2(),
129
- sellerId: zod_openapi_1.z.cuid2().openapi({ description: "ID of the creator/seller" }),
130
- sellerUsername: zod_openapi_1.z.string(),
131
- sellerName: zod_openapi_1.z.string(),
132
- sellerImageUrl: zod_openapi_1.z.url().optional().nullable(),
133
- title: zod_openapi_1.z.string(),
134
- description: zod_openapi_1.z.string(),
135
- keyFeatures: zod_openapi_1.z.string(),
136
- status: zod_openapi_1.z.enum(constants_1.PRODUCT_STATUS).default("DRAFT"),
137
- category: zod_openapi_1.z.string(),
138
- subcategory: zod_openapi_1.z.string().optional().nullable(),
139
- tags: zod_openapi_1.z.array(zod_openapi_1.z.string()),
140
- files: zod_openapi_1.z.array(file_1.FileEntitySchema).default([]),
141
- productLinks: zod_openapi_1.z.array(exports.ProductLinkSchema).default([]),
142
- pricingModel: zod_openapi_1.z.enum(constants_1.PRICING_MODELS),
143
- currency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY),
144
- price: zod_openapi_1.z.number().int().optional().nullable(),
145
- suggestedPrice: zod_openapi_1.z.number().int().optional().nullable(),
146
- discounts: zod_openapi_1.z.array(exports.ProductDiscountEntitySchema).default([]),
147
- ownsRights: zod_openapi_1.z.boolean(),
148
- noHarmfulContent: zod_openapi_1.z.boolean(),
149
- providesSupport: zod_openapi_1.z.boolean(),
150
- agreesToTerms: zod_openapi_1.z.boolean(),
151
- supportEmail: zod_openapi_1.z.email().optional().nullable(),
152
- supportPhone: zod_openapi_1.z.string().optional().nullable(),
153
- createdAt: zod_openapi_1.z.coerce.date(),
154
- updatedAt: zod_openapi_1.z.coerce.date(),
155
- deletedAt: zod_openapi_1.z.coerce.date().optional().nullable(),
156
- })
157
- .openapi({ title: "ProductEntity" });
168
+ });
169
+ exports.SearchProductInputSchema = zod_openapi_1.z.object({
170
+ queryString: zod_openapi_1.z.string().max(200).optional(),
171
+ cursor: zod_openapi_1.z.string().optional(),
172
+ limit: zod_openapi_1.z.coerce.number().int().min(1).max(100).default(30),
173
+ tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
174
+ filters: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
175
+ category: zod_openapi_1.z.string().optional(),
176
+ subcategory: zod_openapi_1.z.string().optional(),
177
+ });
178
+ exports.ProductDiscountCheckInputSchema = zod_openapi_1.z.object({
179
+ discountCode: zod_openapi_1.z.string(),
180
+ productId: zod_openapi_1.z.cuid2(),
181
+ });
182
+ exports.RevenueChartInputSchema = zod_openapi_1.z.object({
183
+ startDate: zod_openapi_1.z.string().optional(),
184
+ endDate: zod_openapi_1.z.string().optional(),
185
+ });
186
+ /**
187
+ * --------------------------------
188
+ * SEARCH / MARKETPLACE
189
+ * --------------------------------
190
+ */
158
191
  exports.ProductSearchDocumentSchema = zod_openapi_1.z.object({
159
192
  id: zod_openapi_1.z.cuid2(),
160
193
  sellerId: zod_openapi_1.z.cuid2(),
161
194
  sellerUsername: zod_openapi_1.z.string(),
162
195
  sellerName: zod_openapi_1.z.string(),
163
- status: zod_openapi_1.z.enum(constants_1.PRODUCT_STATUS),
164
196
  sellerImageUrl: zod_openapi_1.z.url().nullable(),
197
+ status: zod_openapi_1.z.enum(constants_1.PRODUCT_STATUS),
165
198
  title: zod_openapi_1.z.string(),
166
199
  category: zod_openapi_1.z.string(),
167
200
  subcategory: zod_openapi_1.z.string().nullable(),
@@ -170,44 +203,32 @@ exports.ProductSearchDocumentSchema = zod_openapi_1.z.object({
170
203
  currency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY),
171
204
  price: zod_openapi_1.z.number().nullable(),
172
205
  suggestedPrice: zod_openapi_1.z.number().nullable(),
173
- createdAt: zod_openapi_1.z.coerce.date(),
174
- updatedAt: zod_openapi_1.z.coerce.date(),
175
- deletedAt: zod_openapi_1.z.coerce.date().optional().nullable(),
176
- });
177
- exports.SearchProductInputSchema = zod_openapi_1.z.object({
178
- queryString: zod_openapi_1.z
179
- .string()
180
- .max(200, { message: "Search string cannot exceed 200 characters" })
181
- .optional()
182
- .openapi({ example: "typescript utility types" }),
183
- cursor: zod_openapi_1.z.string().optional().openapi({ example: "ckj1a2b3c0000cur" }),
184
- limit: zod_openapi_1.z.coerce.number().int().min(1).max(100).optional().default(30),
185
- tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
186
- filters: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
187
- category: zod_openapi_1.z.string().optional(),
188
- subcategory: zod_openapi_1.z.string().optional(),
206
+ createdAt: zod_openapi_1.z.iso.datetime(),
207
+ updatedAt: zod_openapi_1.z.iso.datetime(),
208
+ deletedAt: zod_openapi_1.z.iso.datetime().nullable().optional(),
189
209
  });
190
- exports.SearchProductOutputSchema = zod_openapi_1.z.object({
191
- products: zod_openapi_1.z.array(exports.ProductSearchDocumentSchema),
192
- nextCursor: zod_openapi_1.z.string().optional().nullable(),
210
+ exports.MarketplaceProductEntitySchema = exports.ProductEntitySchema.omit({
211
+ discounts: true,
193
212
  });
194
213
  exports.MarketplaceCategorySchema = zod_openapi_1.z.object({
195
214
  name: zod_openapi_1.z.string(),
196
215
  imgUrl: zod_openapi_1.z.url(),
197
216
  subcategories: zod_openapi_1.z.array(zod_openapi_1.z.string()),
198
217
  });
218
+ /**
219
+ * --------------------------------
220
+ * OUTPUTS
221
+ * --------------------------------
222
+ */
223
+ exports.SearchProductOutputSchema = zod_openapi_1.z.object({
224
+ products: zod_openapi_1.z.array(exports.ProductSearchDocumentSchema),
225
+ nextCursor: zod_openapi_1.z.string().optional(),
226
+ });
199
227
  exports.GetMarketplaceInfoOutputSchema = zod_openapi_1.z.object({
200
228
  categories: zod_openapi_1.z.array(exports.MarketplaceCategorySchema),
201
229
  whatsHot: zod_openapi_1.z.array(exports.ProductSearchDocumentSchema),
202
230
  communityFavourites: zod_openapi_1.z.array(exports.ProductSearchDocumentSchema),
203
231
  });
204
- exports.MarketplaceProductEntitySchema = exports.ProductEntitySchema.omit({
205
- discounts: true,
206
- });
207
- exports.ProductDiscountCheckInputSchema = zod_openapi_1.z.object({
208
- discountCode: zod_openapi_1.z.string(),
209
- productId: zod_openapi_1.z.cuid2(),
210
- });
211
232
  exports.ProductDiscountCheckOutputSchema = zod_openapi_1.z.object({
212
233
  exists: zod_openapi_1.z.boolean(),
213
234
  discount: exports.ProductDiscountEntitySchema.nullable(),
@@ -223,22 +244,18 @@ exports.ProductTransactionItemSchema = zod_openapi_1.z.object({
223
244
  orderId: zod_openapi_1.z.string().nullable(),
224
245
  price: zod_openapi_1.z.number().int(),
225
246
  status: zod_openapi_1.z.string(),
226
- date: zod_openapi_1.z.coerce.date(),
247
+ date: zod_openapi_1.z.iso.datetime(),
227
248
  });
228
249
  exports.ProductTransactionsOutputSchema = zod_openapi_1.z.object({
229
250
  transactions: zod_openapi_1.z.array(exports.ProductTransactionItemSchema),
230
251
  });
231
252
  exports.RevenueChartPointSchema = zod_openapi_1.z.object({
232
- date: zod_openapi_1.z.string().openapi({ example: "2023-11-25" }),
253
+ date: zod_openapi_1.z.string(),
233
254
  revenue: zod_openapi_1.z.number().int(),
234
255
  });
235
256
  exports.ProductRevenueChartOutputSchema = zod_openapi_1.z.object({
236
257
  chartData: zod_openapi_1.z.array(exports.RevenueChartPointSchema),
237
258
  });
238
- exports.RevenueChartInputSchema = zod_openapi_1.z.object({
239
- startDate: zod_openapi_1.z.string().optional().openapi({ description: "YYYY-MM-DD" }),
240
- endDate: zod_openapi_1.z.string().optional().openapi({ description: "YYYY-MM-DD" }),
241
- });
242
259
  exports.SellerDashboardStatsOutputSchema = zod_openapi_1.z.object({
243
260
  totalSales: zod_openapi_1.z.number().int(),
244
261
  totalViews: zod_openapi_1.z.number().int(),