@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.
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/schemas/activity.d.ts +1 -0
- package/dist/schemas/auth.d.ts +2 -0
- package/dist/schemas/bookmark.d.ts +62 -7
- package/dist/schemas/bookmark.js +32 -30
- package/dist/schemas/brand.d.ts +3 -3
- package/dist/schemas/chat.d.ts +96 -52
- package/dist/schemas/chat.js +44 -18
- package/dist/schemas/comment.d.ts +65 -21
- package/dist/schemas/comment.js +48 -54
- package/dist/schemas/common.d.ts +15 -11
- package/dist/schemas/creative.d.ts +3 -3
- package/dist/schemas/discipline.d.ts +63 -12
- package/dist/schemas/discipline.js +62 -65
- package/dist/schemas/entity-stats.d.ts +35 -3
- package/dist/schemas/entity-stats.js +24 -38
- package/dist/schemas/feed.d.ts +50 -3
- package/dist/schemas/feed.js +43 -13
- package/dist/schemas/file.d.ts +65 -24
- package/dist/schemas/file.js +60 -49
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/investor-shortlist.d.ts +68 -11
- package/dist/schemas/investor-shortlist.js +46 -24
- package/dist/schemas/investor-signal.d.ts +52 -12
- package/dist/schemas/investor-signal.js +59 -39
- package/dist/schemas/investor.d.ts +3 -3
- package/dist/schemas/job-application.d.ts +291 -279
- package/dist/schemas/job-application.js +59 -95
- package/dist/schemas/job.d.ts +200 -659
- package/dist/schemas/job.js +98 -231
- package/dist/schemas/like.d.ts +3 -0
- package/dist/schemas/message.d.ts +125 -94
- package/dist/schemas/message.js +54 -55
- package/dist/schemas/notification.d.ts +99 -32
- package/dist/schemas/notification.js +46 -42
- package/dist/schemas/payout-method.d.ts +51 -31
- package/dist/schemas/payout-method.js +48 -58
- package/dist/schemas/post.d.ts +295 -204
- package/dist/schemas/post.js +148 -272
- package/dist/schemas/product.d.ts +308 -229
- package/dist/schemas/product.js +111 -94
- package/dist/schemas/project.d.ts +75 -107
- package/dist/schemas/project.js +1 -5
- package/dist/schemas/seller.d.ts +10 -10
- package/dist/schemas/user-strike.d.ts +3 -0
- package/dist/schemas/user.d.ts +114 -123
- package/dist/schemas/username.d.ts +1 -0
- package/dist/schemas/view.d.ts +1 -0
- package/dist/types/activity.d.ts +1 -3
- package/dist/types/auth.d.ts +1 -4
- package/dist/types/bookmark.d.ts +1 -3
- package/dist/types/chat.d.ts +1 -11
- package/dist/types/comment.d.ts +1 -5
- package/dist/types/common.d.ts +2 -8
- package/dist/types/discipline.d.ts +1 -11
- package/dist/types/entity-stats.d.ts +1 -3
- package/dist/types/feed.d.ts +1 -5
- package/dist/types/investor-shortlist.d.ts +1 -6
- package/dist/types/investor-signal.d.ts +1 -7
- package/dist/types/like.d.ts +1 -3
- package/dist/types/message.d.ts +1 -9
- package/dist/types/notification.d.ts +1 -9
- package/dist/types/user-strike.d.ts +1 -5
- package/dist/types/username.d.ts +1 -3
- package/package.json +1 -1
- package/src/index.ts +4 -5
- package/src/schemas/activity.ts +5 -4
- package/src/schemas/auth.ts +14 -10
- package/src/schemas/bookmark.ts +48 -29
- package/src/schemas/chat.ts +79 -18
- package/src/schemas/comment.ts +63 -49
- package/src/schemas/common.ts +8 -3
- package/src/schemas/discipline.ts +103 -71
- package/src/schemas/entity-stats.ts +32 -38
- package/src/schemas/feed.ts +62 -15
- package/src/schemas/file.ts +85 -58
- package/src/schemas/index.ts +1 -0
- package/src/schemas/investor-shortlist.ts +57 -8
- package/src/schemas/investor-signal.ts +79 -27
- package/src/schemas/job-application.ts +81 -115
- package/src/schemas/job.ts +160 -301
- package/src/schemas/like.ts +5 -1
- package/src/schemas/message.ts +71 -64
- package/src/schemas/notification.ts +63 -51
- package/src/schemas/payout-method.ts +47 -63
- package/src/schemas/post.ts +211 -272
- package/src/schemas/product.ts +202 -139
- package/src/schemas/project.ts +7 -10
- package/src/schemas/user-strike.ts +7 -1
- package/src/schemas/user.ts +2 -6
- package/src/schemas/username.ts +5 -3
- package/src/schemas/view.ts +0 -50
- package/src/types/activity.ts +0 -4
- package/src/types/auth.ts +0 -5
- package/src/types/bookmark.ts +0 -4
- package/src/types/chat.ts +0 -31
- package/src/types/comment.ts +0 -12
- package/src/types/common.ts +0 -14
- package/src/types/discipline.ts +0 -32
- package/src/types/entity-stats.ts +0 -4
- package/src/types/feed.ts +0 -10
- package/src/types/index.ts +0 -16
- package/src/types/investor-shortlist.ts +0 -18
- package/src/types/investor-signal.ts +0 -26
- package/src/types/like.ts +0 -4
- package/src/types/message.ts +0 -26
- package/src/types/notification.ts +0 -34
- package/src/types/user-strike.ts +0 -10
- package/src/types/username.ts +0 -4
package/dist/schemas/product.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SellerDashboardStatsOutputSchema = exports.
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
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
|
|
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(
|
|
34
|
-
suggestedPrice: zod_openapi_1.z.number().int(
|
|
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((
|
|
66
|
-
const coverImages = data.files.filter((
|
|
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((
|
|
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 =
|
|
113
|
-
id: zod_openapi_1.z.cuid2()
|
|
114
|
-
|
|
115
|
-
|
|
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
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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.
|
|
174
|
-
updatedAt: zod_openapi_1.z.
|
|
175
|
-
deletedAt: zod_openapi_1.z.
|
|
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.
|
|
191
|
-
|
|
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.
|
|
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()
|
|
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(),
|