ce-storefront 0.14.2 → 0.15.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 +3 -3
- package/docs/sdks/auth/README.md +2 -0
- package/docs/sdks/orders/README.md +4 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/components/banktransfer.d.ts +2 -2
- package/esm/models/components/banktransfer.d.ts.map +1 -1
- package/esm/models/components/banktransfer.js +2 -2
- package/esm/models/components/banktransfer.js.map +1 -1
- package/esm/models/components/cardpayment.d.ts +2 -2
- package/esm/models/components/cardpayment.d.ts.map +1 -1
- package/esm/models/components/cardpayment.js +2 -2
- package/esm/models/components/cardpayment.js.map +1 -1
- package/esm/models/components/cart.d.ts +16 -4
- package/esm/models/components/cart.d.ts.map +1 -1
- package/esm/models/components/cart.js +16 -4
- package/esm/models/components/cart.js.map +1 -1
- package/esm/models/components/netbankingpayment.d.ts +2 -2
- package/esm/models/components/netbankingpayment.d.ts.map +1 -1
- package/esm/models/components/netbankingpayment.js +2 -2
- package/esm/models/components/netbankingpayment.js.map +1 -1
- package/esm/models/components/order.d.ts +33 -20
- package/esm/models/components/order.d.ts.map +1 -1
- package/esm/models/components/order.js +40 -33
- package/esm/models/components/order.js.map +1 -1
- package/esm/models/components/orderdetail.d.ts +25 -12
- package/esm/models/components/orderdetail.d.ts.map +1 -1
- package/esm/models/components/orderdetail.js +28 -22
- package/esm/models/components/orderdetail.js.map +1 -1
- package/esm/models/components/upipayment.d.ts +2 -2
- package/esm/models/components/upipayment.d.ts.map +1 -1
- package/esm/models/components/upipayment.js +2 -2
- package/esm/models/components/upipayment.js.map +1 -1
- package/esm/models/components/walletpayment.d.ts +2 -2
- package/esm/models/components/walletpayment.d.ts.map +1 -1
- package/esm/models/components/walletpayment.js +2 -2
- package/esm/models/components/walletpayment.js.map +1 -1
- package/esm/models/errors/badrequest.js +1 -1
- package/esm/models/errors/badrequest.js.map +1 -1
- package/esm/models/errors/ceerror.d.ts.map +1 -1
- package/esm/models/errors/ceerror.js +8 -2
- package/esm/models/errors/ceerror.js.map +1 -1
- package/esm/models/errors/notfound.js +1 -1
- package/esm/models/errors/notfound.js.map +1 -1
- package/esm/models/errors/unauthorized.js +1 -1
- package/esm/models/errors/unauthorized.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/banktransfer.ts +4 -4
- package/src/models/components/cardpayment.ts +4 -4
- package/src/models/components/cart.ts +32 -8
- package/src/models/components/netbankingpayment.ts +4 -4
- package/src/models/components/order.ts +65 -50
- package/src/models/components/orderdetail.ts +49 -34
- package/src/models/components/upipayment.ts +4 -4
- package/src/models/components/walletpayment.ts +4 -4
- package/src/models/errors/badrequest.ts +1 -1
- package/src/models/errors/ceerror.ts +8 -2
- package/src/models/errors/notfound.ts +1 -1
- package/src/models/errors/unauthorized.ts +1 -1
|
@@ -44,7 +44,7 @@ export type CardPayment = {
|
|
|
44
44
|
paymentStatus?: CardPaymentPaymentStatus | undefined;
|
|
45
45
|
paymentDate?: Date | undefined;
|
|
46
46
|
paymentReferenceNumber?: string | null | undefined;
|
|
47
|
-
paymentMethod?: string | undefined;
|
|
47
|
+
paymentMethod?: string | null | undefined;
|
|
48
48
|
iconUrl?: string | null | undefined;
|
|
49
49
|
/**
|
|
50
50
|
* masked card number
|
|
@@ -131,7 +131,7 @@ export const CardPayment$inboundSchema: z.ZodType<
|
|
|
131
131
|
new Date(v)
|
|
132
132
|
).optional(),
|
|
133
133
|
payment_reference_number: z.nullable(z.string()).optional(),
|
|
134
|
-
payment_method: z.string().optional(),
|
|
134
|
+
payment_method: z.nullable(z.string()).optional(),
|
|
135
135
|
icon_url: z.nullable(z.string()).optional(),
|
|
136
136
|
card_number: z.string().optional(),
|
|
137
137
|
card_type: CardType$inboundSchema.optional(),
|
|
@@ -157,7 +157,7 @@ export type CardPayment$Outbound = {
|
|
|
157
157
|
payment_status?: string | undefined;
|
|
158
158
|
payment_date?: string | undefined;
|
|
159
159
|
payment_reference_number?: string | null | undefined;
|
|
160
|
-
payment_method?: string | undefined;
|
|
160
|
+
payment_method?: string | null | undefined;
|
|
161
161
|
icon_url?: string | null | undefined;
|
|
162
162
|
card_number?: string | undefined;
|
|
163
163
|
card_type?: string | undefined;
|
|
@@ -175,7 +175,7 @@ export const CardPayment$outboundSchema: z.ZodType<
|
|
|
175
175
|
paymentStatus: CardPaymentPaymentStatus$outboundSchema.optional(),
|
|
176
176
|
paymentDate: z.date().transform(v => v.toISOString()).optional(),
|
|
177
177
|
paymentReferenceNumber: z.nullable(z.string()).optional(),
|
|
178
|
-
paymentMethod: z.string().optional(),
|
|
178
|
+
paymentMethod: z.nullable(z.string()).optional(),
|
|
179
179
|
iconUrl: z.nullable(z.string()).optional(),
|
|
180
180
|
cardNumber: z.string().optional(),
|
|
181
181
|
cardType: CardType$outboundSchema.optional(),
|
|
@@ -74,14 +74,22 @@ export type Cart = {
|
|
|
74
74
|
* Code of the applied coupon.
|
|
75
75
|
*/
|
|
76
76
|
couponCode: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* Discount amount due to the coupon.
|
|
79
|
+
*/
|
|
80
|
+
couponDiscountAmount: number;
|
|
81
|
+
/**
|
|
82
|
+
* Discount amount due to the coupon.
|
|
83
|
+
*/
|
|
84
|
+
couponDiscountPercent: number;
|
|
77
85
|
/**
|
|
78
86
|
* Discount amount due to promotions(If Applied).
|
|
79
87
|
*/
|
|
80
88
|
promotionDiscountAmount: number;
|
|
81
89
|
/**
|
|
82
|
-
* Discount amount due to
|
|
90
|
+
* Discount amount due to promotions(If Applied).
|
|
83
91
|
*/
|
|
84
|
-
|
|
92
|
+
promotionDiscountPercent?: number | undefined;
|
|
85
93
|
/**
|
|
86
94
|
* Subtotal amount for items in the cart.
|
|
87
95
|
*/
|
|
@@ -122,6 +130,7 @@ export type Cart = {
|
|
|
122
130
|
shippingProviderName: string | null;
|
|
123
131
|
courierCompanyId: string | null;
|
|
124
132
|
courierCompanyName: string | null;
|
|
133
|
+
estimatedDeliveryDays: number | null;
|
|
125
134
|
/**
|
|
126
135
|
* The additional charge applied to cover the costs associated with processing, packaging, and handling an order. This fee is separate from shipping charges and may include materials, or special handling requirements.
|
|
127
136
|
*/
|
|
@@ -164,7 +173,7 @@ export type Cart = {
|
|
|
164
173
|
shippingAddress: CustomerAddress | null;
|
|
165
174
|
currency: Currency;
|
|
166
175
|
/**
|
|
167
|
-
* Additional metadata associated with the cart.
|
|
176
|
+
* Additional metadata associated with the cart.
|
|
168
177
|
*/
|
|
169
178
|
metadata: { [k: string]: string } | null;
|
|
170
179
|
/**
|
|
@@ -198,8 +207,10 @@ export const Cart$inboundSchema: z.ZodType<Cart, z.ZodTypeDef, unknown> = z
|
|
|
198
207
|
is_promotion_applied: z.boolean(),
|
|
199
208
|
is_coupon_applied: z.boolean(),
|
|
200
209
|
coupon_code: z.nullable(z.string()),
|
|
201
|
-
promotion_discount_amount: z.number(),
|
|
202
210
|
coupon_discount_amount: z.number(),
|
|
211
|
+
coupon_discount_percent: z.number(),
|
|
212
|
+
promotion_discount_amount: z.number(),
|
|
213
|
+
promotion_discount_percent: z.number().optional(),
|
|
203
214
|
subtotal: z.number(),
|
|
204
215
|
items_tax_amount: z.number(),
|
|
205
216
|
subtotal_including_tax: z.number(),
|
|
@@ -213,6 +224,7 @@ export const Cart$inboundSchema: z.ZodType<Cart, z.ZodTypeDef, unknown> = z
|
|
|
213
224
|
shipping_provider_name: z.nullable(z.string()),
|
|
214
225
|
courier_company_id: z.nullable(z.string()),
|
|
215
226
|
courier_company_name: z.nullable(z.string()),
|
|
227
|
+
estimated_delivery_days: z.nullable(z.number().int()),
|
|
216
228
|
handling_charge_excluding_tax: z.number(),
|
|
217
229
|
handling_charge_tax_amount: z.number(),
|
|
218
230
|
handling_charge_including_tax: z.number(),
|
|
@@ -245,8 +257,10 @@ export const Cart$inboundSchema: z.ZodType<Cart, z.ZodTypeDef, unknown> = z
|
|
|
245
257
|
"is_promotion_applied": "isPromotionApplied",
|
|
246
258
|
"is_coupon_applied": "isCouponApplied",
|
|
247
259
|
"coupon_code": "couponCode",
|
|
248
|
-
"promotion_discount_amount": "promotionDiscountAmount",
|
|
249
260
|
"coupon_discount_amount": "couponDiscountAmount",
|
|
261
|
+
"coupon_discount_percent": "couponDiscountPercent",
|
|
262
|
+
"promotion_discount_amount": "promotionDiscountAmount",
|
|
263
|
+
"promotion_discount_percent": "promotionDiscountPercent",
|
|
250
264
|
"items_tax_amount": "itemsTaxAmount",
|
|
251
265
|
"subtotal_including_tax": "subtotalIncludingTax",
|
|
252
266
|
"shipping_estimated_cost": "shippingEstimatedCost",
|
|
@@ -259,6 +273,7 @@ export const Cart$inboundSchema: z.ZodType<Cart, z.ZodTypeDef, unknown> = z
|
|
|
259
273
|
"shipping_provider_name": "shippingProviderName",
|
|
260
274
|
"courier_company_id": "courierCompanyId",
|
|
261
275
|
"courier_company_name": "courierCompanyName",
|
|
276
|
+
"estimated_delivery_days": "estimatedDeliveryDays",
|
|
262
277
|
"handling_charge_excluding_tax": "handlingChargeExcludingTax",
|
|
263
278
|
"handling_charge_tax_amount": "handlingChargeTaxAmount",
|
|
264
279
|
"handling_charge_including_tax": "handlingChargeIncludingTax",
|
|
@@ -292,8 +307,10 @@ export type Cart$Outbound = {
|
|
|
292
307
|
is_promotion_applied: boolean;
|
|
293
308
|
is_coupon_applied: boolean;
|
|
294
309
|
coupon_code: string | null;
|
|
295
|
-
promotion_discount_amount: number;
|
|
296
310
|
coupon_discount_amount: number;
|
|
311
|
+
coupon_discount_percent: number;
|
|
312
|
+
promotion_discount_amount: number;
|
|
313
|
+
promotion_discount_percent?: number | undefined;
|
|
297
314
|
subtotal: number;
|
|
298
315
|
items_tax_amount: number;
|
|
299
316
|
subtotal_including_tax: number;
|
|
@@ -307,6 +324,7 @@ export type Cart$Outbound = {
|
|
|
307
324
|
shipping_provider_name: string | null;
|
|
308
325
|
courier_company_id: string | null;
|
|
309
326
|
courier_company_name: string | null;
|
|
327
|
+
estimated_delivery_days: number | null;
|
|
310
328
|
handling_charge_excluding_tax: number;
|
|
311
329
|
handling_charge_tax_amount: number;
|
|
312
330
|
handling_charge_including_tax: number;
|
|
@@ -342,8 +360,10 @@ export const Cart$outboundSchema: z.ZodType<Cart$Outbound, z.ZodTypeDef, Cart> =
|
|
|
342
360
|
isPromotionApplied: z.boolean(),
|
|
343
361
|
isCouponApplied: z.boolean(),
|
|
344
362
|
couponCode: z.nullable(z.string()),
|
|
345
|
-
promotionDiscountAmount: z.number(),
|
|
346
363
|
couponDiscountAmount: z.number(),
|
|
364
|
+
couponDiscountPercent: z.number(),
|
|
365
|
+
promotionDiscountAmount: z.number(),
|
|
366
|
+
promotionDiscountPercent: z.number().optional(),
|
|
347
367
|
subtotal: z.number(),
|
|
348
368
|
itemsTaxAmount: z.number(),
|
|
349
369
|
subtotalIncludingTax: z.number(),
|
|
@@ -357,6 +377,7 @@ export const Cart$outboundSchema: z.ZodType<Cart$Outbound, z.ZodTypeDef, Cart> =
|
|
|
357
377
|
shippingProviderName: z.nullable(z.string()),
|
|
358
378
|
courierCompanyId: z.nullable(z.string()),
|
|
359
379
|
courierCompanyName: z.nullable(z.string()),
|
|
380
|
+
estimatedDeliveryDays: z.nullable(z.number().int()),
|
|
360
381
|
handlingChargeExcludingTax: z.number(),
|
|
361
382
|
handlingChargeTaxAmount: z.number(),
|
|
362
383
|
handlingChargeIncludingTax: z.number(),
|
|
@@ -387,8 +408,10 @@ export const Cart$outboundSchema: z.ZodType<Cart$Outbound, z.ZodTypeDef, Cart> =
|
|
|
387
408
|
isPromotionApplied: "is_promotion_applied",
|
|
388
409
|
isCouponApplied: "is_coupon_applied",
|
|
389
410
|
couponCode: "coupon_code",
|
|
390
|
-
promotionDiscountAmount: "promotion_discount_amount",
|
|
391
411
|
couponDiscountAmount: "coupon_discount_amount",
|
|
412
|
+
couponDiscountPercent: "coupon_discount_percent",
|
|
413
|
+
promotionDiscountAmount: "promotion_discount_amount",
|
|
414
|
+
promotionDiscountPercent: "promotion_discount_percent",
|
|
392
415
|
itemsTaxAmount: "items_tax_amount",
|
|
393
416
|
subtotalIncludingTax: "subtotal_including_tax",
|
|
394
417
|
shippingEstimatedCost: "shipping_estimated_cost",
|
|
@@ -401,6 +424,7 @@ export const Cart$outboundSchema: z.ZodType<Cart$Outbound, z.ZodTypeDef, Cart> =
|
|
|
401
424
|
shippingProviderName: "shipping_provider_name",
|
|
402
425
|
courierCompanyId: "courier_company_id",
|
|
403
426
|
courierCompanyName: "courier_company_name",
|
|
427
|
+
estimatedDeliveryDays: "estimated_delivery_days",
|
|
404
428
|
handlingChargeExcludingTax: "handling_charge_excluding_tax",
|
|
405
429
|
handlingChargeTaxAmount: "handling_charge_tax_amount",
|
|
406
430
|
handlingChargeIncludingTax: "handling_charge_including_tax",
|
|
@@ -38,7 +38,7 @@ export type NetbankingPayment = {
|
|
|
38
38
|
paymentStatus?: NetbankingPaymentPaymentStatus | undefined;
|
|
39
39
|
paymentDate?: Date | undefined;
|
|
40
40
|
paymentReferenceNumber?: string | null | undefined;
|
|
41
|
-
paymentMethod?: string | undefined;
|
|
41
|
+
paymentMethod?: string | null | undefined;
|
|
42
42
|
iconUrl?: string | null | undefined;
|
|
43
43
|
bankName?: string | undefined;
|
|
44
44
|
};
|
|
@@ -99,7 +99,7 @@ export const NetbankingPayment$inboundSchema: z.ZodType<
|
|
|
99
99
|
new Date(v)
|
|
100
100
|
).optional(),
|
|
101
101
|
payment_reference_number: z.nullable(z.string()).optional(),
|
|
102
|
-
payment_method: z.string().optional(),
|
|
102
|
+
payment_method: z.nullable(z.string()).optional(),
|
|
103
103
|
icon_url: z.nullable(z.string()).optional(),
|
|
104
104
|
bank_name: z.string().optional(),
|
|
105
105
|
}).transform((v) => {
|
|
@@ -123,7 +123,7 @@ export type NetbankingPayment$Outbound = {
|
|
|
123
123
|
payment_status?: string | undefined;
|
|
124
124
|
payment_date?: string | undefined;
|
|
125
125
|
payment_reference_number?: string | null | undefined;
|
|
126
|
-
payment_method?: string | undefined;
|
|
126
|
+
payment_method?: string | null | undefined;
|
|
127
127
|
icon_url?: string | null | undefined;
|
|
128
128
|
bank_name?: string | undefined;
|
|
129
129
|
};
|
|
@@ -140,7 +140,7 @@ export const NetbankingPayment$outboundSchema: z.ZodType<
|
|
|
140
140
|
paymentStatus: NetbankingPaymentPaymentStatus$outboundSchema.optional(),
|
|
141
141
|
paymentDate: z.date().transform(v => v.toISOString()).optional(),
|
|
142
142
|
paymentReferenceNumber: z.nullable(z.string()).optional(),
|
|
143
|
-
paymentMethod: z.string().optional(),
|
|
143
|
+
paymentMethod: z.nullable(z.string()).optional(),
|
|
144
144
|
iconUrl: z.nullable(z.string()).optional(),
|
|
145
145
|
bankName: z.string().optional(),
|
|
146
146
|
}).transform((v) => {
|
|
@@ -69,14 +69,14 @@ export type OrderCurrency = {
|
|
|
69
69
|
/**
|
|
70
70
|
* payment mode for refund.
|
|
71
71
|
*/
|
|
72
|
-
export const
|
|
72
|
+
export const OrderPaymentMode = {
|
|
73
73
|
OriginalPaymentMode: "original-payment-mode",
|
|
74
74
|
BankTransfer: "bank-transfer",
|
|
75
75
|
} as const;
|
|
76
76
|
/**
|
|
77
77
|
* payment mode for refund.
|
|
78
78
|
*/
|
|
79
|
-
export type
|
|
79
|
+
export type OrderPaymentMode = ClosedEnum<typeof OrderPaymentMode>;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* to show refundable details in order cancellation ui.
|
|
@@ -101,7 +101,7 @@ export type CancellationRefundDetails = {
|
|
|
101
101
|
/**
|
|
102
102
|
* payment mode for refund.
|
|
103
103
|
*/
|
|
104
|
-
paymentMode?:
|
|
104
|
+
paymentMode?: OrderPaymentMode | undefined;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
export type Order = {
|
|
@@ -114,10 +114,12 @@ export type Order = {
|
|
|
114
114
|
customerPhone?: string | null | undefined;
|
|
115
115
|
customerNote?: string | null | undefined;
|
|
116
116
|
isPromotionApplied?: boolean | undefined;
|
|
117
|
-
promotionDiscountAmount?: number |
|
|
117
|
+
promotionDiscountAmount?: number | undefined;
|
|
118
|
+
promotionDiscountPercent?: number | undefined;
|
|
118
119
|
isCouponApplied?: boolean | undefined;
|
|
119
120
|
couponCode?: string | null | undefined;
|
|
120
|
-
couponDiscountAmount?: number |
|
|
121
|
+
couponDiscountAmount?: number | undefined;
|
|
122
|
+
couponDiscountPercent?: number | undefined;
|
|
121
123
|
/**
|
|
122
124
|
* Information about the promotional offers that have been applied to the cart.
|
|
123
125
|
*/
|
|
@@ -141,14 +143,15 @@ export type Order = {
|
|
|
141
143
|
shippingTaxAmount?: number | undefined;
|
|
142
144
|
shippingAmountIncludingTax?: number | undefined;
|
|
143
145
|
shippingProviderId?: string | null | undefined;
|
|
146
|
+
shippingProviderName?: string | null | undefined;
|
|
144
147
|
courierCompanyId?: string | null | undefined;
|
|
148
|
+
courierCompanyName?: string | null | undefined;
|
|
149
|
+
estimatedDeliveryDays?: number | null | undefined;
|
|
145
150
|
handlingChargeExcludingTax?: number | undefined;
|
|
146
151
|
handlingChargeTaxAmount?: number | undefined;
|
|
147
152
|
handlingChargeIncludingTax?: number | undefined;
|
|
148
153
|
totalTax?: number | undefined;
|
|
149
154
|
grandTotal?: number | undefined;
|
|
150
|
-
loyaltyPointRedeemed?: number | undefined;
|
|
151
|
-
loyaltyPointEarned?: number | undefined;
|
|
152
155
|
loyaltyPointsEarned?: number | undefined;
|
|
153
156
|
loyaltyPointsRedeemed?: number | undefined;
|
|
154
157
|
creditBalanceUsed?: number | undefined;
|
|
@@ -158,6 +161,10 @@ export type Order = {
|
|
|
158
161
|
billingAddress?: CustomerAddress | null | undefined;
|
|
159
162
|
shippingAddress?: CustomerAddress | null | undefined;
|
|
160
163
|
currency?: OrderCurrency | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* Additional metadata associated with the order.
|
|
166
|
+
*/
|
|
167
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
161
168
|
/**
|
|
162
169
|
* order cancellation option should be visible only if this flag is true.
|
|
163
170
|
*/
|
|
@@ -166,8 +173,7 @@ export type Order = {
|
|
|
166
173
|
* to show refundable details in order cancellation ui.
|
|
167
174
|
*/
|
|
168
175
|
cancellationRefundDetails?: CancellationRefundDetails | undefined;
|
|
169
|
-
|
|
170
|
-
modifiedAt?: Date | undefined;
|
|
176
|
+
feedback?: string | null | undefined;
|
|
171
177
|
};
|
|
172
178
|
|
|
173
179
|
/** @internal */
|
|
@@ -267,22 +273,24 @@ export function orderCurrencyFromJSON(
|
|
|
267
273
|
}
|
|
268
274
|
|
|
269
275
|
/** @internal */
|
|
270
|
-
export const
|
|
271
|
-
|
|
276
|
+
export const OrderPaymentMode$inboundSchema: z.ZodNativeEnum<
|
|
277
|
+
typeof OrderPaymentMode
|
|
278
|
+
> = z.nativeEnum(OrderPaymentMode);
|
|
272
279
|
|
|
273
280
|
/** @internal */
|
|
274
|
-
export const
|
|
275
|
-
|
|
281
|
+
export const OrderPaymentMode$outboundSchema: z.ZodNativeEnum<
|
|
282
|
+
typeof OrderPaymentMode
|
|
283
|
+
> = OrderPaymentMode$inboundSchema;
|
|
276
284
|
|
|
277
285
|
/**
|
|
278
286
|
* @internal
|
|
279
287
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
280
288
|
*/
|
|
281
|
-
export namespace
|
|
282
|
-
/** @deprecated use `
|
|
283
|
-
export const inboundSchema =
|
|
284
|
-
/** @deprecated use `
|
|
285
|
-
export const outboundSchema =
|
|
289
|
+
export namespace OrderPaymentMode$ {
|
|
290
|
+
/** @deprecated use `OrderPaymentMode$inboundSchema` instead. */
|
|
291
|
+
export const inboundSchema = OrderPaymentMode$inboundSchema;
|
|
292
|
+
/** @deprecated use `OrderPaymentMode$outboundSchema` instead. */
|
|
293
|
+
export const outboundSchema = OrderPaymentMode$outboundSchema;
|
|
286
294
|
}
|
|
287
295
|
|
|
288
296
|
/** @internal */
|
|
@@ -295,7 +303,7 @@ export const CancellationRefundDetails$inboundSchema: z.ZodType<
|
|
|
295
303
|
refundable_amount: z.number().optional(),
|
|
296
304
|
cancellation_charges: z.number().optional(),
|
|
297
305
|
cancellation_charges_reason: z.string().optional(),
|
|
298
|
-
payment_mode:
|
|
306
|
+
payment_mode: OrderPaymentMode$inboundSchema.optional(),
|
|
299
307
|
}).transform((v) => {
|
|
300
308
|
return remap$(v, {
|
|
301
309
|
"loyalty_point": "loyaltyPoint",
|
|
@@ -325,7 +333,7 @@ export const CancellationRefundDetails$outboundSchema: z.ZodType<
|
|
|
325
333
|
refundableAmount: z.number().optional(),
|
|
326
334
|
cancellationCharges: z.number().optional(),
|
|
327
335
|
cancellationChargesReason: z.string().optional(),
|
|
328
|
-
paymentMode:
|
|
336
|
+
paymentMode: OrderPaymentMode$outboundSchema.optional(),
|
|
329
337
|
}).transform((v) => {
|
|
330
338
|
return remap$(v, {
|
|
331
339
|
loyaltyPoint: "loyalty_point",
|
|
@@ -381,10 +389,12 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
381
389
|
customer_phone: z.nullable(z.string()).optional(),
|
|
382
390
|
customer_note: z.nullable(z.string()).optional(),
|
|
383
391
|
is_promotion_applied: z.boolean().optional(),
|
|
384
|
-
promotion_discount_amount: z.
|
|
392
|
+
promotion_discount_amount: z.number().optional(),
|
|
393
|
+
promotion_discount_percent: z.number().optional(),
|
|
385
394
|
is_coupon_applied: z.boolean().optional(),
|
|
386
395
|
coupon_code: z.nullable(z.string()).optional(),
|
|
387
|
-
coupon_discount_amount: z.
|
|
396
|
+
coupon_discount_amount: z.number().optional(),
|
|
397
|
+
coupon_discount_percent: z.number().optional(),
|
|
388
398
|
applied_promotions: z.array(AppliedPromotion$inboundSchema),
|
|
389
399
|
applied_coupons: z.array(AppliedCoupon$inboundSchema),
|
|
390
400
|
promotion_savings: z.number().optional(),
|
|
@@ -402,14 +412,15 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
402
412
|
shipping_tax_amount: z.number().optional(),
|
|
403
413
|
shipping_amount_including_tax: z.number().optional(),
|
|
404
414
|
shipping_provider_id: z.nullable(z.string()).optional(),
|
|
415
|
+
shipping_provider_name: z.nullable(z.string()).optional(),
|
|
405
416
|
courier_company_id: z.nullable(z.string()).optional(),
|
|
417
|
+
courier_company_name: z.nullable(z.string()).optional(),
|
|
418
|
+
estimated_delivery_days: z.nullable(z.number().int()).optional(),
|
|
406
419
|
handling_charge_excluding_tax: z.number().optional(),
|
|
407
420
|
handling_charge_tax_amount: z.number().optional(),
|
|
408
421
|
handling_charge_including_tax: z.number().optional(),
|
|
409
422
|
total_tax: z.number().optional(),
|
|
410
423
|
grand_total: z.number().optional(),
|
|
411
|
-
loyalty_point_redeemed: z.number().int().optional(),
|
|
412
|
-
loyalty_point_earned: z.number().int().optional(),
|
|
413
424
|
loyalty_points_earned: z.number().int().optional(),
|
|
414
425
|
loyalty_points_redeemed: z.number().int().optional(),
|
|
415
426
|
credit_balance_used: z.number().int().optional(),
|
|
@@ -419,16 +430,12 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
419
430
|
billing_address: z.nullable(CustomerAddress$inboundSchema).optional(),
|
|
420
431
|
shipping_address: z.nullable(CustomerAddress$inboundSchema).optional(),
|
|
421
432
|
currency: z.lazy(() => OrderCurrency$inboundSchema).optional(),
|
|
433
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
422
434
|
is_cancellation_allowed: z.boolean().optional(),
|
|
423
435
|
cancellation_refund_details: z.lazy(() =>
|
|
424
436
|
CancellationRefundDetails$inboundSchema
|
|
425
437
|
).optional(),
|
|
426
|
-
|
|
427
|
-
new Date(v)
|
|
428
|
-
).optional(),
|
|
429
|
-
modified_at: z.string().datetime({ offset: true }).transform(v =>
|
|
430
|
-
new Date(v)
|
|
431
|
-
).optional(),
|
|
438
|
+
feedback: z.nullable(z.string()).optional(),
|
|
432
439
|
}).transform((v) => {
|
|
433
440
|
return remap$(v, {
|
|
434
441
|
"order_number": "orderNumber",
|
|
@@ -440,9 +447,11 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
440
447
|
"customer_note": "customerNote",
|
|
441
448
|
"is_promotion_applied": "isPromotionApplied",
|
|
442
449
|
"promotion_discount_amount": "promotionDiscountAmount",
|
|
450
|
+
"promotion_discount_percent": "promotionDiscountPercent",
|
|
443
451
|
"is_coupon_applied": "isCouponApplied",
|
|
444
452
|
"coupon_code": "couponCode",
|
|
445
453
|
"coupon_discount_amount": "couponDiscountAmount",
|
|
454
|
+
"coupon_discount_percent": "couponDiscountPercent",
|
|
446
455
|
"applied_promotions": "appliedPromotions",
|
|
447
456
|
"applied_coupons": "appliedCoupons",
|
|
448
457
|
"promotion_savings": "promotionSavings",
|
|
@@ -459,14 +468,15 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
459
468
|
"shipping_tax_amount": "shippingTaxAmount",
|
|
460
469
|
"shipping_amount_including_tax": "shippingAmountIncludingTax",
|
|
461
470
|
"shipping_provider_id": "shippingProviderId",
|
|
471
|
+
"shipping_provider_name": "shippingProviderName",
|
|
462
472
|
"courier_company_id": "courierCompanyId",
|
|
473
|
+
"courier_company_name": "courierCompanyName",
|
|
474
|
+
"estimated_delivery_days": "estimatedDeliveryDays",
|
|
463
475
|
"handling_charge_excluding_tax": "handlingChargeExcludingTax",
|
|
464
476
|
"handling_charge_tax_amount": "handlingChargeTaxAmount",
|
|
465
477
|
"handling_charge_including_tax": "handlingChargeIncludingTax",
|
|
466
478
|
"total_tax": "totalTax",
|
|
467
479
|
"grand_total": "grandTotal",
|
|
468
|
-
"loyalty_point_redeemed": "loyaltyPointRedeemed",
|
|
469
|
-
"loyalty_point_earned": "loyaltyPointEarned",
|
|
470
480
|
"loyalty_points_earned": "loyaltyPointsEarned",
|
|
471
481
|
"loyalty_points_redeemed": "loyaltyPointsRedeemed",
|
|
472
482
|
"credit_balance_used": "creditBalanceUsed",
|
|
@@ -477,8 +487,6 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
477
487
|
"shipping_address": "shippingAddress",
|
|
478
488
|
"is_cancellation_allowed": "isCancellationAllowed",
|
|
479
489
|
"cancellation_refund_details": "cancellationRefundDetails",
|
|
480
|
-
"created_at": "createdAt",
|
|
481
|
-
"modified_at": "modifiedAt",
|
|
482
490
|
});
|
|
483
491
|
});
|
|
484
492
|
|
|
@@ -493,10 +501,12 @@ export type Order$Outbound = {
|
|
|
493
501
|
customer_phone?: string | null | undefined;
|
|
494
502
|
customer_note?: string | null | undefined;
|
|
495
503
|
is_promotion_applied?: boolean | undefined;
|
|
496
|
-
promotion_discount_amount?: number |
|
|
504
|
+
promotion_discount_amount?: number | undefined;
|
|
505
|
+
promotion_discount_percent?: number | undefined;
|
|
497
506
|
is_coupon_applied?: boolean | undefined;
|
|
498
507
|
coupon_code?: string | null | undefined;
|
|
499
|
-
coupon_discount_amount?: number |
|
|
508
|
+
coupon_discount_amount?: number | undefined;
|
|
509
|
+
coupon_discount_percent?: number | undefined;
|
|
500
510
|
applied_promotions: Array<AppliedPromotion$Outbound>;
|
|
501
511
|
applied_coupons: Array<AppliedCoupon$Outbound>;
|
|
502
512
|
promotion_savings?: number | undefined;
|
|
@@ -514,14 +524,15 @@ export type Order$Outbound = {
|
|
|
514
524
|
shipping_tax_amount?: number | undefined;
|
|
515
525
|
shipping_amount_including_tax?: number | undefined;
|
|
516
526
|
shipping_provider_id?: string | null | undefined;
|
|
527
|
+
shipping_provider_name?: string | null | undefined;
|
|
517
528
|
courier_company_id?: string | null | undefined;
|
|
529
|
+
courier_company_name?: string | null | undefined;
|
|
530
|
+
estimated_delivery_days?: number | null | undefined;
|
|
518
531
|
handling_charge_excluding_tax?: number | undefined;
|
|
519
532
|
handling_charge_tax_amount?: number | undefined;
|
|
520
533
|
handling_charge_including_tax?: number | undefined;
|
|
521
534
|
total_tax?: number | undefined;
|
|
522
535
|
grand_total?: number | undefined;
|
|
523
|
-
loyalty_point_redeemed?: number | undefined;
|
|
524
|
-
loyalty_point_earned?: number | undefined;
|
|
525
536
|
loyalty_points_earned?: number | undefined;
|
|
526
537
|
loyalty_points_redeemed?: number | undefined;
|
|
527
538
|
credit_balance_used?: number | undefined;
|
|
@@ -531,10 +542,10 @@ export type Order$Outbound = {
|
|
|
531
542
|
billing_address?: CustomerAddress$Outbound | null | undefined;
|
|
532
543
|
shipping_address?: CustomerAddress$Outbound | null | undefined;
|
|
533
544
|
currency?: OrderCurrency$Outbound | undefined;
|
|
545
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
534
546
|
is_cancellation_allowed?: boolean | undefined;
|
|
535
547
|
cancellation_refund_details?: CancellationRefundDetails$Outbound | undefined;
|
|
536
|
-
|
|
537
|
-
modified_at?: string | undefined;
|
|
548
|
+
feedback?: string | null | undefined;
|
|
538
549
|
};
|
|
539
550
|
|
|
540
551
|
/** @internal */
|
|
@@ -552,10 +563,12 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
552
563
|
customerPhone: z.nullable(z.string()).optional(),
|
|
553
564
|
customerNote: z.nullable(z.string()).optional(),
|
|
554
565
|
isPromotionApplied: z.boolean().optional(),
|
|
555
|
-
promotionDiscountAmount: z.
|
|
566
|
+
promotionDiscountAmount: z.number().optional(),
|
|
567
|
+
promotionDiscountPercent: z.number().optional(),
|
|
556
568
|
isCouponApplied: z.boolean().optional(),
|
|
557
569
|
couponCode: z.nullable(z.string()).optional(),
|
|
558
|
-
couponDiscountAmount: z.
|
|
570
|
+
couponDiscountAmount: z.number().optional(),
|
|
571
|
+
couponDiscountPercent: z.number().optional(),
|
|
559
572
|
appliedPromotions: z.array(AppliedPromotion$outboundSchema),
|
|
560
573
|
appliedCoupons: z.array(AppliedCoupon$outboundSchema),
|
|
561
574
|
promotionSavings: z.number().optional(),
|
|
@@ -573,14 +586,15 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
573
586
|
shippingTaxAmount: z.number().optional(),
|
|
574
587
|
shippingAmountIncludingTax: z.number().optional(),
|
|
575
588
|
shippingProviderId: z.nullable(z.string()).optional(),
|
|
589
|
+
shippingProviderName: z.nullable(z.string()).optional(),
|
|
576
590
|
courierCompanyId: z.nullable(z.string()).optional(),
|
|
591
|
+
courierCompanyName: z.nullable(z.string()).optional(),
|
|
592
|
+
estimatedDeliveryDays: z.nullable(z.number().int()).optional(),
|
|
577
593
|
handlingChargeExcludingTax: z.number().optional(),
|
|
578
594
|
handlingChargeTaxAmount: z.number().optional(),
|
|
579
595
|
handlingChargeIncludingTax: z.number().optional(),
|
|
580
596
|
totalTax: z.number().optional(),
|
|
581
597
|
grandTotal: z.number().optional(),
|
|
582
|
-
loyaltyPointRedeemed: z.number().int().optional(),
|
|
583
|
-
loyaltyPointEarned: z.number().int().optional(),
|
|
584
598
|
loyaltyPointsEarned: z.number().int().optional(),
|
|
585
599
|
loyaltyPointsRedeemed: z.number().int().optional(),
|
|
586
600
|
creditBalanceUsed: z.number().int().optional(),
|
|
@@ -590,12 +604,12 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
590
604
|
billingAddress: z.nullable(CustomerAddress$outboundSchema).optional(),
|
|
591
605
|
shippingAddress: z.nullable(CustomerAddress$outboundSchema).optional(),
|
|
592
606
|
currency: z.lazy(() => OrderCurrency$outboundSchema).optional(),
|
|
607
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
593
608
|
isCancellationAllowed: z.boolean().optional(),
|
|
594
609
|
cancellationRefundDetails: z.lazy(() =>
|
|
595
610
|
CancellationRefundDetails$outboundSchema
|
|
596
611
|
).optional(),
|
|
597
|
-
|
|
598
|
-
modifiedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
612
|
+
feedback: z.nullable(z.string()).optional(),
|
|
599
613
|
}).transform((v) => {
|
|
600
614
|
return remap$(v, {
|
|
601
615
|
orderNumber: "order_number",
|
|
@@ -607,9 +621,11 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
607
621
|
customerNote: "customer_note",
|
|
608
622
|
isPromotionApplied: "is_promotion_applied",
|
|
609
623
|
promotionDiscountAmount: "promotion_discount_amount",
|
|
624
|
+
promotionDiscountPercent: "promotion_discount_percent",
|
|
610
625
|
isCouponApplied: "is_coupon_applied",
|
|
611
626
|
couponCode: "coupon_code",
|
|
612
627
|
couponDiscountAmount: "coupon_discount_amount",
|
|
628
|
+
couponDiscountPercent: "coupon_discount_percent",
|
|
613
629
|
appliedPromotions: "applied_promotions",
|
|
614
630
|
appliedCoupons: "applied_coupons",
|
|
615
631
|
promotionSavings: "promotion_savings",
|
|
@@ -626,14 +642,15 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
626
642
|
shippingTaxAmount: "shipping_tax_amount",
|
|
627
643
|
shippingAmountIncludingTax: "shipping_amount_including_tax",
|
|
628
644
|
shippingProviderId: "shipping_provider_id",
|
|
645
|
+
shippingProviderName: "shipping_provider_name",
|
|
629
646
|
courierCompanyId: "courier_company_id",
|
|
647
|
+
courierCompanyName: "courier_company_name",
|
|
648
|
+
estimatedDeliveryDays: "estimated_delivery_days",
|
|
630
649
|
handlingChargeExcludingTax: "handling_charge_excluding_tax",
|
|
631
650
|
handlingChargeTaxAmount: "handling_charge_tax_amount",
|
|
632
651
|
handlingChargeIncludingTax: "handling_charge_including_tax",
|
|
633
652
|
totalTax: "total_tax",
|
|
634
653
|
grandTotal: "grand_total",
|
|
635
|
-
loyaltyPointRedeemed: "loyalty_point_redeemed",
|
|
636
|
-
loyaltyPointEarned: "loyalty_point_earned",
|
|
637
654
|
loyaltyPointsEarned: "loyalty_points_earned",
|
|
638
655
|
loyaltyPointsRedeemed: "loyalty_points_redeemed",
|
|
639
656
|
creditBalanceUsed: "credit_balance_used",
|
|
@@ -644,8 +661,6 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
644
661
|
shippingAddress: "shipping_address",
|
|
645
662
|
isCancellationAllowed: "is_cancellation_allowed",
|
|
646
663
|
cancellationRefundDetails: "cancellation_refund_details",
|
|
647
|
-
createdAt: "created_at",
|
|
648
|
-
modifiedAt: "modified_at",
|
|
649
664
|
});
|
|
650
665
|
});
|
|
651
666
|
|