aivilife-contracts 5.0.0 → 5.2.0
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/README.md +35 -3
- package/dist/cart/index.d.mts +87 -0
- package/dist/cart/index.d.ts +87 -0
- package/dist/cart/index.js +77 -0
- package/dist/cart/index.js.map +1 -0
- package/dist/cart/index.mjs +70 -0
- package/dist/cart/index.mjs.map +1 -0
- package/dist/cart.enums-Q3FbqDWC.d.mts +7 -0
- package/dist/cart.enums-Q3FbqDWC.d.ts +7 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +378 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +344 -30
- package/dist/index.mjs.map +1 -1
- package/dist/order/index.d.mts +542 -0
- package/dist/order/index.d.ts +542 -0
- package/dist/order/index.js +720 -0
- package/dist/order/index.js.map +1 -0
- package/dist/order/index.mjs +690 -0
- package/dist/order/index.mjs.map +1 -0
- package/package.json +11 -1
|
@@ -0,0 +1,720 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var zod = require('zod');
|
|
4
|
+
|
|
5
|
+
// src/order/order.enums.ts
|
|
6
|
+
var OrderDeliveryMethod = /* @__PURE__ */ ((OrderDeliveryMethod2) => {
|
|
7
|
+
OrderDeliveryMethod2["PICKUP"] = "PICKUP";
|
|
8
|
+
return OrderDeliveryMethod2;
|
|
9
|
+
})(OrderDeliveryMethod || {});
|
|
10
|
+
var OrderPaymentMethod = /* @__PURE__ */ ((OrderPaymentMethod2) => {
|
|
11
|
+
OrderPaymentMethod2["CASH"] = "CASH";
|
|
12
|
+
OrderPaymentMethod2["MAIN_WALLET"] = "MAIN_WALLET";
|
|
13
|
+
return OrderPaymentMethod2;
|
|
14
|
+
})(OrderPaymentMethod || {});
|
|
15
|
+
var OrderStatus = /* @__PURE__ */ ((OrderStatus2) => {
|
|
16
|
+
OrderStatus2["PENDING_PAYMENT"] = "PENDING_PAYMENT";
|
|
17
|
+
OrderStatus2["PROCESSING"] = "PROCESSING";
|
|
18
|
+
OrderStatus2["READY_FOR_PICKUP"] = "READY_FOR_PICKUP";
|
|
19
|
+
OrderStatus2["COMPLETED"] = "COMPLETED";
|
|
20
|
+
OrderStatus2["CANCELLED"] = "CANCELLED";
|
|
21
|
+
return OrderStatus2;
|
|
22
|
+
})(OrderStatus || {});
|
|
23
|
+
var OrderPaymentStatus = /* @__PURE__ */ ((OrderPaymentStatus2) => {
|
|
24
|
+
OrderPaymentStatus2["AWAITING_RECEIPT"] = "AWAITING_RECEIPT";
|
|
25
|
+
OrderPaymentStatus2["UNDER_REVIEW"] = "UNDER_REVIEW";
|
|
26
|
+
OrderPaymentStatus2["REJECTED"] = "REJECTED";
|
|
27
|
+
OrderPaymentStatus2["PAID"] = "PAID";
|
|
28
|
+
OrderPaymentStatus2["CANCELLED"] = "CANCELLED";
|
|
29
|
+
return OrderPaymentStatus2;
|
|
30
|
+
})(OrderPaymentStatus || {});
|
|
31
|
+
var OrderReceiptStatus = /* @__PURE__ */ ((OrderReceiptStatus2) => {
|
|
32
|
+
OrderReceiptStatus2["UNDER_REVIEW"] = "UNDER_REVIEW";
|
|
33
|
+
OrderReceiptStatus2["APPROVED"] = "APPROVED";
|
|
34
|
+
OrderReceiptStatus2["REJECTED"] = "REJECTED";
|
|
35
|
+
return OrderReceiptStatus2;
|
|
36
|
+
})(OrderReceiptStatus || {});
|
|
37
|
+
var OrderReceiptDecision = /* @__PURE__ */ ((OrderReceiptDecision2) => {
|
|
38
|
+
OrderReceiptDecision2["APPROVE"] = "APPROVE";
|
|
39
|
+
OrderReceiptDecision2["REJECT"] = "REJECT";
|
|
40
|
+
return OrderReceiptDecision2;
|
|
41
|
+
})(OrderReceiptDecision || {});
|
|
42
|
+
var OrderStockAvailability = /* @__PURE__ */ ((OrderStockAvailability2) => {
|
|
43
|
+
OrderStockAvailability2["AVAILABLE"] = "AVAILABLE";
|
|
44
|
+
OrderStockAvailability2["OUT_OF_STOCK"] = "OUT_OF_STOCK";
|
|
45
|
+
OrderStockAvailability2["INSUFFICIENT_STOCK"] = "INSUFFICIENT_STOCK";
|
|
46
|
+
return OrderStockAvailability2;
|
|
47
|
+
})(OrderStockAvailability || {});
|
|
48
|
+
var OrderEventType = /* @__PURE__ */ ((OrderEventType2) => {
|
|
49
|
+
OrderEventType2["CREATED"] = "CREATED";
|
|
50
|
+
OrderEventType2["WALLET_DEBITED"] = "WALLET_DEBITED";
|
|
51
|
+
OrderEventType2["RECEIPT_UPLOADED"] = "RECEIPT_UPLOADED";
|
|
52
|
+
OrderEventType2["PAYMENT_APPROVED"] = "PAYMENT_APPROVED";
|
|
53
|
+
OrderEventType2["PAYMENT_REJECTED"] = "PAYMENT_REJECTED";
|
|
54
|
+
OrderEventType2["CANCELLED_TIMEOUT"] = "CANCELLED_TIMEOUT";
|
|
55
|
+
OrderEventType2["WALLET_REFUNDED"] = "WALLET_REFUNDED";
|
|
56
|
+
return OrderEventType2;
|
|
57
|
+
})(OrderEventType || {});
|
|
58
|
+
var OrderNotificationType = /* @__PURE__ */ ((OrderNotificationType2) => {
|
|
59
|
+
OrderNotificationType2["ORDER_CREATED"] = "ORDER_CREATED";
|
|
60
|
+
OrderNotificationType2["RECEIPT_RECEIVED"] = "RECEIPT_RECEIVED";
|
|
61
|
+
OrderNotificationType2["PAYMENT_APPROVED"] = "PAYMENT_APPROVED";
|
|
62
|
+
OrderNotificationType2["PAYMENT_REJECTED"] = "PAYMENT_REJECTED";
|
|
63
|
+
OrderNotificationType2["ORDER_CANCELLED"] = "ORDER_CANCELLED";
|
|
64
|
+
return OrderNotificationType2;
|
|
65
|
+
})(OrderNotificationType || {});
|
|
66
|
+
|
|
67
|
+
// src/catalog/catalog.enums.ts
|
|
68
|
+
var ProductUnit = {
|
|
69
|
+
CAPSULE: "CAPSULE",
|
|
70
|
+
GRAM: "GRAM",
|
|
71
|
+
MILLILITER: "MILLILITER",
|
|
72
|
+
PIECE: "PIECE"
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// src/cart/cart.enums.ts
|
|
76
|
+
var CartItemAvailability = /* @__PURE__ */ ((CartItemAvailability2) => {
|
|
77
|
+
CartItemAvailability2["AVAILABLE"] = "AVAILABLE";
|
|
78
|
+
CartItemAvailability2["PRODUCT_UNAVAILABLE"] = "PRODUCT_UNAVAILABLE";
|
|
79
|
+
CartItemAvailability2["VARIANT_UNAVAILABLE"] = "VARIANT_UNAVAILABLE";
|
|
80
|
+
return CartItemAvailability2;
|
|
81
|
+
})(CartItemAvailability || {});
|
|
82
|
+
|
|
83
|
+
// src/cart/cart.schemas.ts
|
|
84
|
+
var PublicIdSchema = zod.z.uuid();
|
|
85
|
+
var QuantitySchema = zod.z.number().int().min(1).max(999);
|
|
86
|
+
var DecimalSchema = zod.z.string().regex(/^\d{1,16}(?:\.\d{1,2})?$/);
|
|
87
|
+
zod.z.object({
|
|
88
|
+
variantPublicId: PublicIdSchema,
|
|
89
|
+
quantity: QuantitySchema.default(1)
|
|
90
|
+
});
|
|
91
|
+
zod.z.object({
|
|
92
|
+
quantity: QuantitySchema,
|
|
93
|
+
version: zod.z.number().int().positive()
|
|
94
|
+
});
|
|
95
|
+
zod.z.object({
|
|
96
|
+
itemPublicId: PublicIdSchema
|
|
97
|
+
});
|
|
98
|
+
var CartItemSchema = zod.z.object({
|
|
99
|
+
publicId: PublicIdSchema,
|
|
100
|
+
quantity: QuantitySchema,
|
|
101
|
+
version: zod.z.number().int().positive(),
|
|
102
|
+
availability: zod.z.enum(CartItemAvailability),
|
|
103
|
+
product: zod.z.object({
|
|
104
|
+
publicId: PublicIdSchema,
|
|
105
|
+
slug: zod.z.string(),
|
|
106
|
+
name: zod.z.string(),
|
|
107
|
+
coverContentUrl: zod.z.string().nullable()
|
|
108
|
+
}),
|
|
109
|
+
variant: zod.z.object({
|
|
110
|
+
publicId: PublicIdSchema,
|
|
111
|
+
sku: zod.z.string(),
|
|
112
|
+
quantity: zod.z.string(),
|
|
113
|
+
unit: zod.z.enum(ProductUnit),
|
|
114
|
+
priceUsd: DecimalSchema,
|
|
115
|
+
pv: DecimalSchema
|
|
116
|
+
}),
|
|
117
|
+
lineTotalUsd: DecimalSchema,
|
|
118
|
+
lineTotalPv: DecimalSchema,
|
|
119
|
+
createdAt: zod.z.string().datetime(),
|
|
120
|
+
updatedAt: zod.z.string().datetime()
|
|
121
|
+
});
|
|
122
|
+
var CartSchema = zod.z.object({
|
|
123
|
+
publicId: PublicIdSchema.nullable(),
|
|
124
|
+
items: zod.z.array(CartItemSchema),
|
|
125
|
+
totalQuantity: zod.z.number().int().nonnegative(),
|
|
126
|
+
subtotalUsd: DecimalSchema,
|
|
127
|
+
totalPv: DecimalSchema,
|
|
128
|
+
hasUnavailableItems: zod.z.boolean(),
|
|
129
|
+
updatedAt: zod.z.string().datetime().nullable()
|
|
130
|
+
});
|
|
131
|
+
var PageSchema = zod.z.coerce.number().int().min(1).default(1);
|
|
132
|
+
var LimitSchema = zod.z.coerce.number().int().min(1).max(100).default(20);
|
|
133
|
+
var SortOrderSchema = zod.z.enum(["asc", "desc"]).default("desc");
|
|
134
|
+
zod.z.object({
|
|
135
|
+
page: PageSchema.optional(),
|
|
136
|
+
limit: LimitSchema.optional()
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// src/common/list-query.schemas.ts
|
|
140
|
+
var DateFromSchema = zod.z.string().datetime().optional();
|
|
141
|
+
var DateToSchema = zod.z.string().datetime().optional();
|
|
142
|
+
var SearchSchema = zod.z.string().trim().min(1).max(255).optional();
|
|
143
|
+
var BaseListQuerySchema = zod.z.object({
|
|
144
|
+
page: PageSchema.optional(),
|
|
145
|
+
limit: LimitSchema.optional(),
|
|
146
|
+
search: SearchSchema,
|
|
147
|
+
dateFrom: DateFromSchema,
|
|
148
|
+
dateTo: DateToSchema,
|
|
149
|
+
sortOrder: SortOrderSchema.optional()
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// src/warehouse/warehouse.enums.ts
|
|
153
|
+
var WarehouseStatus = {
|
|
154
|
+
DRAFT: "DRAFT",
|
|
155
|
+
ACTIVE: "ACTIVE",
|
|
156
|
+
SUSPENDED: "SUSPENDED",
|
|
157
|
+
ARCHIVED: "ARCHIVED"
|
|
158
|
+
};
|
|
159
|
+
var WarehouseAssignmentType = {
|
|
160
|
+
STAFF: "STAFF"
|
|
161
|
+
};
|
|
162
|
+
var WarehouseRequestType = {
|
|
163
|
+
REPLENISHMENT: "REPLENISHMENT",
|
|
164
|
+
WRITE_OFF: "WRITE_OFF",
|
|
165
|
+
TRANSFER: "TRANSFER"
|
|
166
|
+
};
|
|
167
|
+
var WarehouseRequestStatus = {
|
|
168
|
+
DRAFT: "DRAFT",
|
|
169
|
+
PENDING_REVIEW: "PENDING_REVIEW",
|
|
170
|
+
APPROVED: "APPROVED",
|
|
171
|
+
READY_TO_SHIP: "READY_TO_SHIP",
|
|
172
|
+
IN_TRANSIT: "IN_TRANSIT",
|
|
173
|
+
COMPLETED: "COMPLETED",
|
|
174
|
+
REJECTED: "REJECTED",
|
|
175
|
+
CANCELLED: "CANCELLED",
|
|
176
|
+
DISCREPANCY_REPORTED: "DISCREPANCY_REPORTED",
|
|
177
|
+
FAILED: "FAILED"
|
|
178
|
+
};
|
|
179
|
+
var WarehouseMovementType = {
|
|
180
|
+
REPLENISHMENT: "REPLENISHMENT",
|
|
181
|
+
WRITE_OFF: "WRITE_OFF",
|
|
182
|
+
TRANSFER_OUT: "TRANSFER_OUT",
|
|
183
|
+
TRANSFER_IN: "TRANSFER_IN",
|
|
184
|
+
ORDER_ISSUE: "ORDER_ISSUE"
|
|
185
|
+
};
|
|
186
|
+
var WarehouseWriteOffReason = {
|
|
187
|
+
DEFECT: "DEFECT",
|
|
188
|
+
DAMAGED: "DAMAGED",
|
|
189
|
+
EXPIRED: "EXPIRED",
|
|
190
|
+
LOST: "LOST",
|
|
191
|
+
INVENTORY_SHORTAGE: "INVENTORY_SHORTAGE",
|
|
192
|
+
OTHER: "OTHER"
|
|
193
|
+
};
|
|
194
|
+
var WarehouseWeekday = {
|
|
195
|
+
MONDAY: "MONDAY",
|
|
196
|
+
TUESDAY: "TUESDAY",
|
|
197
|
+
WEDNESDAY: "WEDNESDAY",
|
|
198
|
+
THURSDAY: "THURSDAY",
|
|
199
|
+
FRIDAY: "FRIDAY",
|
|
200
|
+
SATURDAY: "SATURDAY",
|
|
201
|
+
SUNDAY: "SUNDAY"
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
// src/warehouse/warehouse.schemas.ts
|
|
205
|
+
var PublicIdSchema2 = zod.z.uuid();
|
|
206
|
+
var CodeSchema = zod.z.string().trim().toUpperCase().regex(/^[A-Z0-9][A-Z0-9_-]{1,63}$/);
|
|
207
|
+
var DateSchema = zod.z.iso.date();
|
|
208
|
+
var DateTimeSchema = zod.z.iso.datetime();
|
|
209
|
+
var TimeSchema = zod.z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/);
|
|
210
|
+
var NullableTrimmedSchema = (max) => zod.z.string().trim().min(1).max(max).nullable().optional();
|
|
211
|
+
var WarehouseDayScheduleSchema = zod.z.object({
|
|
212
|
+
isOpen: zod.z.boolean(),
|
|
213
|
+
opensAt: TimeSchema.nullable(),
|
|
214
|
+
closesAt: TimeSchema.nullable()
|
|
215
|
+
}).superRefine((value, context) => {
|
|
216
|
+
if (value.isOpen && (!value.opensAt || !value.closesAt)) {
|
|
217
|
+
context.addIssue({
|
|
218
|
+
code: "custom",
|
|
219
|
+
message: "\u0414\u043B\u044F \u0440\u0430\u0431\u043E\u0447\u0435\u0433\u043E \u0434\u043D\u044F \u0443\u043A\u0430\u0436\u0438\u0442\u0435 \u0432\u0440\u0435\u043C\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u044F"
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
if (!value.isOpen && (value.opensAt || value.closesAt)) {
|
|
223
|
+
context.addIssue({
|
|
224
|
+
code: "custom",
|
|
225
|
+
message: "\u0414\u043B\u044F \u0432\u044B\u0445\u043E\u0434\u043D\u043E\u0433\u043E \u0434\u043D\u044F \u0432\u0440\u0435\u043C\u044F \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C"
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
if (value.isOpen && value.opensAt && value.closesAt && value.opensAt >= value.closesAt) {
|
|
229
|
+
context.addIssue({
|
|
230
|
+
code: "custom",
|
|
231
|
+
message: "\u0412\u0440\u0435\u043C\u044F \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u044F \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043F\u043E\u0437\u0436\u0435 \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F"
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
var WarehouseWeeklyScheduleSchema = zod.z.record(
|
|
236
|
+
zod.z.enum(WarehouseWeekday),
|
|
237
|
+
WarehouseDayScheduleSchema
|
|
238
|
+
);
|
|
239
|
+
var WarehouseFieldsSchema = zod.z.object({
|
|
240
|
+
name: zod.z.string().trim().min(2).max(160),
|
|
241
|
+
countryCode: zod.z.string().trim().toUpperCase().length(2),
|
|
242
|
+
country: zod.z.string().trim().min(2).max(120),
|
|
243
|
+
city: zod.z.string().trim().min(1).max(160),
|
|
244
|
+
address: zod.z.string().trim().min(3).max(500),
|
|
245
|
+
phoneNumber: zod.z.string().trim().min(7).max(32),
|
|
246
|
+
mapUrl: zod.z.url().max(2e3).refine((value) => new URL(value).protocol === "https:", {
|
|
247
|
+
message: "\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043A\u0430\u0440\u0442\u0443 \u0434\u043E\u043B\u0436\u043D\u0430 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C HTTPS"
|
|
248
|
+
}),
|
|
249
|
+
timezone: zod.z.string().trim().min(1).max(64),
|
|
250
|
+
schedule: WarehouseWeeklyScheduleSchema,
|
|
251
|
+
isPickupPoint: zod.z.boolean()
|
|
252
|
+
});
|
|
253
|
+
WarehouseFieldsSchema.extend({
|
|
254
|
+
code: CodeSchema,
|
|
255
|
+
isPickupPoint: WarehouseFieldsSchema.shape.isPickupPoint.default(true)
|
|
256
|
+
});
|
|
257
|
+
WarehouseFieldsSchema.partial().extend({ version: zod.z.number().int().positive() }).required({ version: true });
|
|
258
|
+
zod.z.object({
|
|
259
|
+
publicId: PublicIdSchema2
|
|
260
|
+
});
|
|
261
|
+
zod.z.object({
|
|
262
|
+
publicId: PublicIdSchema2,
|
|
263
|
+
assignmentPublicId: PublicIdSchema2
|
|
264
|
+
});
|
|
265
|
+
BaseListQuerySchema.extend({
|
|
266
|
+
status: zod.z.enum(WarehouseStatus).optional(),
|
|
267
|
+
countryCode: zod.z.string().trim().toUpperCase().length(2).optional(),
|
|
268
|
+
city: zod.z.string().trim().min(1).max(160).optional()
|
|
269
|
+
});
|
|
270
|
+
zod.z.object({
|
|
271
|
+
search: zod.z.string().trim().min(2).max(100),
|
|
272
|
+
page: zod.z.coerce.number().int().min(1).default(1),
|
|
273
|
+
limit: zod.z.coerce.number().int().min(1).max(20).default(20)
|
|
274
|
+
});
|
|
275
|
+
zod.z.object({
|
|
276
|
+
userUuid: zod.z.string().trim().min(3).max(32),
|
|
277
|
+
type: zod.z.enum(WarehouseAssignmentType)
|
|
278
|
+
});
|
|
279
|
+
var WarehouseRequestLineInputSchema = zod.z.object({
|
|
280
|
+
variantPublicId: PublicIdSchema2,
|
|
281
|
+
quantity: zod.z.number().int().positive().max(1e9),
|
|
282
|
+
expiresAt: DateSchema.nullable().optional(),
|
|
283
|
+
batchNumber: NullableTrimmedSchema(120),
|
|
284
|
+
comment: NullableTrimmedSchema(1e3)
|
|
285
|
+
});
|
|
286
|
+
zod.z.object({
|
|
287
|
+
type: zod.z.enum(WarehouseRequestType),
|
|
288
|
+
sourceWarehousePublicId: PublicIdSchema2.nullable().optional(),
|
|
289
|
+
destinationWarehousePublicId: PublicIdSchema2.nullable().optional(),
|
|
290
|
+
writeOffReason: zod.z.enum(WarehouseWriteOffReason).nullable().optional(),
|
|
291
|
+
comment: zod.z.string().trim().max(2e3).nullable().optional(),
|
|
292
|
+
lines: zod.z.array(WarehouseRequestLineInputSchema).min(1).max(500)
|
|
293
|
+
}).superRefine((value, context) => {
|
|
294
|
+
const source = value.sourceWarehousePublicId ?? null;
|
|
295
|
+
const destination = value.destinationWarehousePublicId ?? null;
|
|
296
|
+
if (value.type === WarehouseRequestType.REPLENISHMENT) {
|
|
297
|
+
if (!destination || source) {
|
|
298
|
+
context.addIssue({
|
|
299
|
+
code: "custom",
|
|
300
|
+
path: ["destinationWarehousePublicId"],
|
|
301
|
+
message: "\u0414\u043B\u044F \u043F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u043D\u0443\u0436\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0441\u043A\u043B\u0430\u0434 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F"
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
value.lines.forEach((line, index) => {
|
|
305
|
+
if (!line.expiresAt) {
|
|
306
|
+
context.addIssue({
|
|
307
|
+
code: "custom",
|
|
308
|
+
path: ["lines", index, "expiresAt"],
|
|
309
|
+
message: "\u0421\u0440\u043E\u043A \u0433\u043E\u0434\u043D\u043E\u0441\u0442\u0438 \u043F\u043E\u0441\u0442\u0443\u043F\u043B\u0435\u043D\u0438\u044F \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u0435\u043D"
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
if (value.type === WarehouseRequestType.WRITE_OFF) {
|
|
315
|
+
if (!source || destination) {
|
|
316
|
+
context.addIssue({
|
|
317
|
+
code: "custom",
|
|
318
|
+
path: ["sourceWarehousePublicId"],
|
|
319
|
+
message: "\u0414\u043B\u044F \u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u043D\u0443\u0436\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0441\u043A\u043B\u0430\u0434"
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
if (!value.writeOffReason) {
|
|
323
|
+
context.addIssue({
|
|
324
|
+
code: "custom",
|
|
325
|
+
path: ["writeOffReason"],
|
|
326
|
+
message: "\u041F\u0440\u0438\u0447\u0438\u043D\u0430 \u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u0430"
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
if (!value.comment?.trim()) {
|
|
330
|
+
context.addIssue({
|
|
331
|
+
code: "custom",
|
|
332
|
+
path: ["comment"],
|
|
333
|
+
message: "\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 \u043A \u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044E \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u0435\u043D"
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (value.type === WarehouseRequestType.TRANSFER) {
|
|
338
|
+
if (!source || !destination || source === destination) {
|
|
339
|
+
context.addIssue({
|
|
340
|
+
code: "custom",
|
|
341
|
+
path: ["destinationWarehousePublicId"],
|
|
342
|
+
message: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0440\u0430\u0437\u043D\u044B\u0435 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0439 \u0441\u043A\u043B\u0430\u0434 \u0438 \u0441\u043A\u043B\u0430\u0434 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F"
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
zod.z.object({
|
|
348
|
+
publicId: PublicIdSchema2
|
|
349
|
+
});
|
|
350
|
+
zod.z.object({
|
|
351
|
+
publicId: PublicIdSchema2,
|
|
352
|
+
attachmentPublicId: PublicIdSchema2
|
|
353
|
+
});
|
|
354
|
+
BaseListQuerySchema.extend({
|
|
355
|
+
type: zod.z.enum(WarehouseRequestType).optional(),
|
|
356
|
+
status: zod.z.enum(WarehouseRequestStatus).optional(),
|
|
357
|
+
warehousePublicId: PublicIdSchema2.optional(),
|
|
358
|
+
createdByUserId: zod.z.coerce.number().int().positive().optional()
|
|
359
|
+
});
|
|
360
|
+
zod.z.object({
|
|
361
|
+
comment: zod.z.string().trim().max(2e3).nullable().optional()
|
|
362
|
+
});
|
|
363
|
+
zod.z.object({
|
|
364
|
+
comment: zod.z.string().trim().min(1).max(2e3)
|
|
365
|
+
});
|
|
366
|
+
zod.z.object({
|
|
367
|
+
idempotencyKey: zod.z.uuid(),
|
|
368
|
+
comment: zod.z.string().trim().max(2e3).nullable().optional()
|
|
369
|
+
});
|
|
370
|
+
zod.z.object({
|
|
371
|
+
comment: zod.z.string().trim().min(1).max(2e3)
|
|
372
|
+
});
|
|
373
|
+
BaseListQuerySchema.extend({
|
|
374
|
+
warehousePublicId: PublicIdSchema2.optional(),
|
|
375
|
+
variantPublicId: PublicIdSchema2.optional(),
|
|
376
|
+
expired: zod.z.union([zod.z.boolean(), zod.z.enum(["true", "false"]).transform((v) => v === "true")]).optional(),
|
|
377
|
+
expiresBefore: DateSchema.optional()
|
|
378
|
+
});
|
|
379
|
+
var WarehouseSchema = zod.z.object({
|
|
380
|
+
publicId: PublicIdSchema2,
|
|
381
|
+
code: CodeSchema,
|
|
382
|
+
name: zod.z.string(),
|
|
383
|
+
status: zod.z.enum(WarehouseStatus),
|
|
384
|
+
countryCode: zod.z.string().length(2),
|
|
385
|
+
country: zod.z.string(),
|
|
386
|
+
city: zod.z.string(),
|
|
387
|
+
address: zod.z.string(),
|
|
388
|
+
phoneNumber: zod.z.string(),
|
|
389
|
+
mapUrl: zod.z.string(),
|
|
390
|
+
timezone: zod.z.string(),
|
|
391
|
+
schedule: WarehouseWeeklyScheduleSchema,
|
|
392
|
+
isPickupPoint: zod.z.boolean(),
|
|
393
|
+
version: zod.z.number().int().positive(),
|
|
394
|
+
createdAt: DateTimeSchema,
|
|
395
|
+
updatedAt: DateTimeSchema
|
|
396
|
+
});
|
|
397
|
+
var WarehouseUserLookupSchema = zod.z.object({
|
|
398
|
+
id: zod.z.number().int().positive(),
|
|
399
|
+
uuid: zod.z.string(),
|
|
400
|
+
login: zod.z.string(),
|
|
401
|
+
firstName: zod.z.string(),
|
|
402
|
+
lastName: zod.z.string(),
|
|
403
|
+
email: zod.z.email(),
|
|
404
|
+
role: zod.z.string()
|
|
405
|
+
});
|
|
406
|
+
zod.z.object({
|
|
407
|
+
publicId: PublicIdSchema2,
|
|
408
|
+
warehousePublicId: PublicIdSchema2,
|
|
409
|
+
type: zod.z.enum(WarehouseAssignmentType),
|
|
410
|
+
user: WarehouseUserLookupSchema,
|
|
411
|
+
assignedByLogin: zod.z.string(),
|
|
412
|
+
assignedAt: DateTimeSchema
|
|
413
|
+
});
|
|
414
|
+
var WarehouseOperationLineSchema = zod.z.object({
|
|
415
|
+
publicId: PublicIdSchema2,
|
|
416
|
+
variantPublicId: PublicIdSchema2,
|
|
417
|
+
sku: zod.z.string(),
|
|
418
|
+
quantity: zod.z.number().int().positive(),
|
|
419
|
+
expiresAt: DateSchema.nullable(),
|
|
420
|
+
batchNumber: zod.z.string().nullable(),
|
|
421
|
+
comment: zod.z.string().nullable()
|
|
422
|
+
});
|
|
423
|
+
var WarehouseOperationEventSchema = zod.z.object({
|
|
424
|
+
publicId: PublicIdSchema2,
|
|
425
|
+
fromStatus: zod.z.enum(WarehouseRequestStatus).nullable(),
|
|
426
|
+
toStatus: zod.z.enum(WarehouseRequestStatus),
|
|
427
|
+
actorUserId: zod.z.number().int().positive(),
|
|
428
|
+
actorLogin: zod.z.string(),
|
|
429
|
+
comment: zod.z.string().nullable(),
|
|
430
|
+
createdAt: DateTimeSchema
|
|
431
|
+
});
|
|
432
|
+
var WarehouseOperationAttachmentSchema = zod.z.object({
|
|
433
|
+
publicId: PublicIdSchema2,
|
|
434
|
+
mimeType: zod.z.string(),
|
|
435
|
+
sizeBytes: zod.z.number().int().positive(),
|
|
436
|
+
originalName: zod.z.string().nullable(),
|
|
437
|
+
uploadedByLogin: zod.z.string(),
|
|
438
|
+
contentUrl: zod.z.string(),
|
|
439
|
+
createdAt: DateTimeSchema
|
|
440
|
+
});
|
|
441
|
+
zod.z.object({
|
|
442
|
+
publicId: PublicIdSchema2,
|
|
443
|
+
type: zod.z.enum(WarehouseRequestType),
|
|
444
|
+
status: zod.z.enum(WarehouseRequestStatus),
|
|
445
|
+
sourceWarehouse: WarehouseSchema.nullable(),
|
|
446
|
+
destinationWarehouse: WarehouseSchema.nullable(),
|
|
447
|
+
writeOffReason: zod.z.enum(WarehouseWriteOffReason).nullable(),
|
|
448
|
+
comment: zod.z.string().nullable(),
|
|
449
|
+
rejectionComment: zod.z.string().nullable(),
|
|
450
|
+
createdByUserId: zod.z.number().int().positive(),
|
|
451
|
+
createdByLogin: zod.z.string(),
|
|
452
|
+
approvedByUserId: zod.z.number().int().positive().nullable(),
|
|
453
|
+
approvedByLogin: zod.z.string().nullable(),
|
|
454
|
+
approvedAt: DateTimeSchema.nullable(),
|
|
455
|
+
completedByUserId: zod.z.number().int().positive().nullable(),
|
|
456
|
+
completedByLogin: zod.z.string().nullable(),
|
|
457
|
+
completedAt: DateTimeSchema.nullable(),
|
|
458
|
+
version: zod.z.number().int().positive(),
|
|
459
|
+
lines: zod.z.array(WarehouseOperationLineSchema),
|
|
460
|
+
events: zod.z.array(WarehouseOperationEventSchema),
|
|
461
|
+
attachments: zod.z.array(WarehouseOperationAttachmentSchema),
|
|
462
|
+
createdAt: DateTimeSchema,
|
|
463
|
+
updatedAt: DateTimeSchema
|
|
464
|
+
});
|
|
465
|
+
zod.z.object({
|
|
466
|
+
publicId: PublicIdSchema2,
|
|
467
|
+
warehouse: WarehouseSchema,
|
|
468
|
+
variantPublicId: PublicIdSchema2,
|
|
469
|
+
sku: zod.z.string(),
|
|
470
|
+
productPublicId: PublicIdSchema2,
|
|
471
|
+
productCode: zod.z.string(),
|
|
472
|
+
batchNumber: zod.z.string().nullable(),
|
|
473
|
+
expiresAt: DateSchema,
|
|
474
|
+
onHand: zod.z.number().int().nonnegative(),
|
|
475
|
+
reserved: zod.z.number().int().nonnegative(),
|
|
476
|
+
available: zod.z.number().int().nonnegative(),
|
|
477
|
+
expired: zod.z.boolean(),
|
|
478
|
+
version: zod.z.number().int().positive(),
|
|
479
|
+
updatedAt: DateTimeSchema
|
|
480
|
+
});
|
|
481
|
+
zod.z.object({
|
|
482
|
+
publicId: PublicIdSchema2,
|
|
483
|
+
warehousePublicId: PublicIdSchema2,
|
|
484
|
+
operationPublicId: PublicIdSchema2,
|
|
485
|
+
variantPublicId: PublicIdSchema2,
|
|
486
|
+
inventoryBatchPublicId: PublicIdSchema2.nullable(),
|
|
487
|
+
type: zod.z.enum(WarehouseMovementType),
|
|
488
|
+
quantityDelta: zod.z.number().int(),
|
|
489
|
+
balanceAfter: zod.z.number().int().nonnegative(),
|
|
490
|
+
actorUserId: zod.z.number().int().positive(),
|
|
491
|
+
actorLogin: zod.z.string(),
|
|
492
|
+
createdAt: DateTimeSchema
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
// src/order/order.schemas.ts
|
|
496
|
+
var PublicIdSchema3 = zod.z.uuid();
|
|
497
|
+
var DateTimeSchema2 = zod.z.iso.datetime();
|
|
498
|
+
var MoneySchema = zod.z.string().regex(/^\d{1,16}\.\d{2}$/);
|
|
499
|
+
var DecimalSchema2 = zod.z.string().regex(/^\d{1,16}(?:\.\d{1,3})?$/);
|
|
500
|
+
var OrderNumberSchema = zod.z.string().regex(/^AV-\d{8}-[A-Z0-9]{6}$/);
|
|
501
|
+
var CheckoutWarehouseQuerySchema = zod.z.object({
|
|
502
|
+
countryCode: zod.z.string().trim().toUpperCase().length(2),
|
|
503
|
+
city: zod.z.string().trim().min(1).max(160)
|
|
504
|
+
});
|
|
505
|
+
var CheckoutLocationSchema = zod.z.object({
|
|
506
|
+
countryCode: zod.z.string().length(2),
|
|
507
|
+
country: zod.z.string(),
|
|
508
|
+
cities: zod.z.array(zod.z.string()).min(1)
|
|
509
|
+
});
|
|
510
|
+
var CheckoutSnapshotSchema = zod.z.object({
|
|
511
|
+
cart: CartSchema,
|
|
512
|
+
locations: zod.z.array(CheckoutLocationSchema),
|
|
513
|
+
mainWallet: zod.z.object({
|
|
514
|
+
balanceUsd: MoneySchema,
|
|
515
|
+
availableBalanceUsd: MoneySchema
|
|
516
|
+
}),
|
|
517
|
+
paymentMethods: zod.z.array(zod.z.enum(OrderPaymentMethod)),
|
|
518
|
+
reserveDurationHours: zod.z.literal(24)
|
|
519
|
+
});
|
|
520
|
+
var CheckoutWarehouseAvailabilitySchema = zod.z.object({
|
|
521
|
+
variantPublicId: PublicIdSchema3,
|
|
522
|
+
requestedQuantity: zod.z.number().int().positive(),
|
|
523
|
+
availableQuantity: zod.z.number().int().nonnegative(),
|
|
524
|
+
availability: zod.z.enum(OrderStockAvailability)
|
|
525
|
+
});
|
|
526
|
+
var CheckoutWarehouseSchema = zod.z.object({
|
|
527
|
+
publicId: PublicIdSchema3,
|
|
528
|
+
code: zod.z.string(),
|
|
529
|
+
name: zod.z.string(),
|
|
530
|
+
countryCode: zod.z.string().length(2),
|
|
531
|
+
country: zod.z.string(),
|
|
532
|
+
city: zod.z.string(),
|
|
533
|
+
address: zod.z.string(),
|
|
534
|
+
phoneNumber: zod.z.string(),
|
|
535
|
+
mapUrl: zod.z.url(),
|
|
536
|
+
timezone: zod.z.string(),
|
|
537
|
+
schedule: WarehouseWeeklyScheduleSchema,
|
|
538
|
+
canFulfill: zod.z.boolean(),
|
|
539
|
+
items: zod.z.array(CheckoutWarehouseAvailabilitySchema)
|
|
540
|
+
});
|
|
541
|
+
var CheckoutWarehouseListSchema = zod.z.array(CheckoutWarehouseSchema);
|
|
542
|
+
var CreateOrderRequestSchema = zod.z.object({
|
|
543
|
+
warehousePublicId: PublicIdSchema3,
|
|
544
|
+
deliveryMethod: zod.z.literal("PICKUP" /* PICKUP */),
|
|
545
|
+
paymentMethod: zod.z.enum(OrderPaymentMethod),
|
|
546
|
+
walletAmountUsd: MoneySchema.optional(),
|
|
547
|
+
idempotencyKey: PublicIdSchema3
|
|
548
|
+
}).superRefine((value, context) => {
|
|
549
|
+
if (value.paymentMethod === "CASH" /* CASH */ && value.walletAmountUsd) {
|
|
550
|
+
context.addIssue({
|
|
551
|
+
code: "custom",
|
|
552
|
+
path: ["walletAmountUsd"],
|
|
553
|
+
message: "\u0414\u043B\u044F \u043E\u043F\u043B\u0430\u0442\u044B \u043D\u0430\u043B\u0438\u0447\u043D\u044B\u043C\u0438 \u0441\u0443\u043C\u043C\u0430 \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430 \u043D\u0435 \u043F\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044F"
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
if (value.paymentMethod === "MAIN_WALLET" /* MAIN_WALLET */ && (!value.walletAmountUsd || value.walletAmountUsd === "0.00")) {
|
|
557
|
+
context.addIssue({
|
|
558
|
+
code: "custom",
|
|
559
|
+
path: ["walletAmountUsd"],
|
|
560
|
+
message: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0441\u0443\u043C\u043C\u0443 \u043E\u043F\u043B\u0430\u0442\u044B \u0441 \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0433\u043E \u043A\u043E\u0448\u0435\u043B\u044C\u043A\u0430"
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
var OrderPublicIdParamSchema = zod.z.object({ publicId: PublicIdSchema3 });
|
|
565
|
+
var OrderReceiptParamSchema = zod.z.object({
|
|
566
|
+
publicId: PublicIdSchema3,
|
|
567
|
+
receiptPublicId: PublicIdSchema3
|
|
568
|
+
});
|
|
569
|
+
var OrderWarehouseSchema = zod.z.object({
|
|
570
|
+
publicId: PublicIdSchema3,
|
|
571
|
+
code: zod.z.string(),
|
|
572
|
+
name: zod.z.string(),
|
|
573
|
+
countryCode: zod.z.string().length(2),
|
|
574
|
+
country: zod.z.string(),
|
|
575
|
+
city: zod.z.string(),
|
|
576
|
+
address: zod.z.string(),
|
|
577
|
+
phoneNumber: zod.z.string(),
|
|
578
|
+
mapUrl: zod.z.url(),
|
|
579
|
+
timezone: zod.z.string(),
|
|
580
|
+
schedule: WarehouseWeeklyScheduleSchema
|
|
581
|
+
});
|
|
582
|
+
var OrderItemSchema = zod.z.object({
|
|
583
|
+
publicId: PublicIdSchema3,
|
|
584
|
+
productPublicId: PublicIdSchema3,
|
|
585
|
+
variantPublicId: PublicIdSchema3,
|
|
586
|
+
productName: zod.z.string(),
|
|
587
|
+
sku: zod.z.string(),
|
|
588
|
+
variantQuantity: DecimalSchema2,
|
|
589
|
+
unit: zod.z.enum(ProductUnit),
|
|
590
|
+
quantity: zod.z.number().int().positive(),
|
|
591
|
+
unitPriceUsd: MoneySchema,
|
|
592
|
+
lineTotalUsd: MoneySchema,
|
|
593
|
+
unitPv: MoneySchema,
|
|
594
|
+
lineTotalPv: MoneySchema,
|
|
595
|
+
coverContentUrl: zod.z.string().nullable()
|
|
596
|
+
});
|
|
597
|
+
var OrderReceiptSchema = zod.z.object({
|
|
598
|
+
publicId: PublicIdSchema3,
|
|
599
|
+
status: zod.z.enum(OrderReceiptStatus),
|
|
600
|
+
originalName: zod.z.string().nullable(),
|
|
601
|
+
mimeType: zod.z.string(),
|
|
602
|
+
sizeBytes: zod.z.number().int().positive(),
|
|
603
|
+
version: zod.z.number().int().positive(),
|
|
604
|
+
rejectionReason: zod.z.string().nullable(),
|
|
605
|
+
reviewedAt: DateTimeSchema2.nullable(),
|
|
606
|
+
createdAt: DateTimeSchema2,
|
|
607
|
+
contentUrl: zod.z.string()
|
|
608
|
+
});
|
|
609
|
+
var OrderEventSchema = zod.z.object({
|
|
610
|
+
publicId: PublicIdSchema3,
|
|
611
|
+
type: zod.z.enum(OrderEventType),
|
|
612
|
+
actorLogin: zod.z.string().nullable(),
|
|
613
|
+
comment: zod.z.string().nullable(),
|
|
614
|
+
createdAt: DateTimeSchema2
|
|
615
|
+
});
|
|
616
|
+
var OrderSchema = zod.z.object({
|
|
617
|
+
publicId: PublicIdSchema3,
|
|
618
|
+
number: OrderNumberSchema,
|
|
619
|
+
status: zod.z.enum(OrderStatus),
|
|
620
|
+
paymentStatus: zod.z.enum(OrderPaymentStatus),
|
|
621
|
+
deliveryMethod: zod.z.enum(OrderDeliveryMethod),
|
|
622
|
+
paymentMethod: zod.z.enum(OrderPaymentMethod),
|
|
623
|
+
locale: zod.z.string().length(2),
|
|
624
|
+
baseCurrencyCode: zod.z.string().length(3),
|
|
625
|
+
displayCurrencyCode: zod.z.string().length(3),
|
|
626
|
+
displayRate: zod.z.string(),
|
|
627
|
+
subtotalUsd: MoneySchema,
|
|
628
|
+
totalPv: MoneySchema,
|
|
629
|
+
walletPaidUsd: MoneySchema,
|
|
630
|
+
walletRefundedUsd: MoneySchema,
|
|
631
|
+
cashDueUsd: MoneySchema,
|
|
632
|
+
reserveExpiresAt: DateTimeSchema2.nullable(),
|
|
633
|
+
paidAt: DateTimeSchema2.nullable(),
|
|
634
|
+
cancelledAt: DateTimeSchema2.nullable(),
|
|
635
|
+
cancellationReason: zod.z.string().nullable(),
|
|
636
|
+
warehouse: OrderWarehouseSchema,
|
|
637
|
+
items: zod.z.array(OrderItemSchema).min(1),
|
|
638
|
+
receipts: zod.z.array(OrderReceiptSchema),
|
|
639
|
+
events: zod.z.array(OrderEventSchema),
|
|
640
|
+
createdAt: DateTimeSchema2,
|
|
641
|
+
updatedAt: DateTimeSchema2
|
|
642
|
+
});
|
|
643
|
+
var OrderListItemSchema = OrderSchema.omit({
|
|
644
|
+
receipts: true,
|
|
645
|
+
events: true
|
|
646
|
+
});
|
|
647
|
+
var OrderListQuerySchema = BaseListQuerySchema.extend({
|
|
648
|
+
status: zod.z.enum(OrderStatus).optional(),
|
|
649
|
+
paymentStatus: zod.z.enum(OrderPaymentStatus).optional()
|
|
650
|
+
});
|
|
651
|
+
var OrderListResponseSchema = zod.z.object({
|
|
652
|
+
items: zod.z.array(OrderListItemSchema),
|
|
653
|
+
meta: zod.z.object({
|
|
654
|
+
page: zod.z.number().int().positive(),
|
|
655
|
+
limit: zod.z.number().int().positive(),
|
|
656
|
+
total: zod.z.number().int().nonnegative(),
|
|
657
|
+
pageCount: zod.z.number().int().nonnegative()
|
|
658
|
+
})
|
|
659
|
+
});
|
|
660
|
+
var ReviewOrderReceiptRequestSchema = zod.z.object({
|
|
661
|
+
decision: zod.z.enum(OrderReceiptDecision),
|
|
662
|
+
version: zod.z.number().int().positive(),
|
|
663
|
+
rejectionReason: zod.z.string().trim().min(1).max(2e3).optional()
|
|
664
|
+
}).superRefine((value, context) => {
|
|
665
|
+
if (value.decision === "REJECT" /* REJECT */ && !value.rejectionReason) {
|
|
666
|
+
context.addIssue({
|
|
667
|
+
code: "custom",
|
|
668
|
+
path: ["rejectionReason"],
|
|
669
|
+
message: "\u041F\u0440\u0438\u0447\u0438\u043D\u0430 \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u0438\u044F \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u0430"
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
if (value.decision === "APPROVE" /* APPROVE */ && value.rejectionReason) {
|
|
673
|
+
context.addIssue({
|
|
674
|
+
code: "custom",
|
|
675
|
+
path: ["rejectionReason"],
|
|
676
|
+
message: "\u041F\u0440\u0438\u0447\u0438\u043D\u0430 \u043D\u0435 \u043F\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044F \u043F\u0440\u0438 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0438"
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
});
|
|
680
|
+
var OrderNotificationSchema = zod.z.object({
|
|
681
|
+
publicId: PublicIdSchema3,
|
|
682
|
+
orderPublicId: PublicIdSchema3,
|
|
683
|
+
orderNumber: OrderNumberSchema,
|
|
684
|
+
type: zod.z.enum(OrderNotificationType),
|
|
685
|
+
isRead: zod.z.boolean(),
|
|
686
|
+
createdAt: DateTimeSchema2
|
|
687
|
+
});
|
|
688
|
+
var OrderNotificationListSchema = zod.z.array(OrderNotificationSchema);
|
|
689
|
+
|
|
690
|
+
exports.CheckoutLocationSchema = CheckoutLocationSchema;
|
|
691
|
+
exports.CheckoutSnapshotSchema = CheckoutSnapshotSchema;
|
|
692
|
+
exports.CheckoutWarehouseAvailabilitySchema = CheckoutWarehouseAvailabilitySchema;
|
|
693
|
+
exports.CheckoutWarehouseListSchema = CheckoutWarehouseListSchema;
|
|
694
|
+
exports.CheckoutWarehouseQuerySchema = CheckoutWarehouseQuerySchema;
|
|
695
|
+
exports.CheckoutWarehouseSchema = CheckoutWarehouseSchema;
|
|
696
|
+
exports.CreateOrderRequestSchema = CreateOrderRequestSchema;
|
|
697
|
+
exports.OrderDeliveryMethod = OrderDeliveryMethod;
|
|
698
|
+
exports.OrderEventSchema = OrderEventSchema;
|
|
699
|
+
exports.OrderEventType = OrderEventType;
|
|
700
|
+
exports.OrderItemSchema = OrderItemSchema;
|
|
701
|
+
exports.OrderListItemSchema = OrderListItemSchema;
|
|
702
|
+
exports.OrderListQuerySchema = OrderListQuerySchema;
|
|
703
|
+
exports.OrderListResponseSchema = OrderListResponseSchema;
|
|
704
|
+
exports.OrderNotificationListSchema = OrderNotificationListSchema;
|
|
705
|
+
exports.OrderNotificationSchema = OrderNotificationSchema;
|
|
706
|
+
exports.OrderNotificationType = OrderNotificationType;
|
|
707
|
+
exports.OrderPaymentMethod = OrderPaymentMethod;
|
|
708
|
+
exports.OrderPaymentStatus = OrderPaymentStatus;
|
|
709
|
+
exports.OrderPublicIdParamSchema = OrderPublicIdParamSchema;
|
|
710
|
+
exports.OrderReceiptDecision = OrderReceiptDecision;
|
|
711
|
+
exports.OrderReceiptParamSchema = OrderReceiptParamSchema;
|
|
712
|
+
exports.OrderReceiptSchema = OrderReceiptSchema;
|
|
713
|
+
exports.OrderReceiptStatus = OrderReceiptStatus;
|
|
714
|
+
exports.OrderSchema = OrderSchema;
|
|
715
|
+
exports.OrderStatus = OrderStatus;
|
|
716
|
+
exports.OrderStockAvailability = OrderStockAvailability;
|
|
717
|
+
exports.OrderWarehouseSchema = OrderWarehouseSchema;
|
|
718
|
+
exports.ReviewOrderReceiptRequestSchema = ReviewOrderReceiptRequestSchema;
|
|
719
|
+
//# sourceMappingURL=index.js.map
|
|
720
|
+
//# sourceMappingURL=index.js.map
|