ce-storefront 0.14.2 → 0.14.3
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/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- 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/order.d.ts +25 -12
- package/esm/models/components/order.d.ts.map +1 -1
- package/esm/models/components/order.js +28 -20
- 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/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/cart.ts +32 -8
- package/src/models/components/order.ts +49 -36
- package/src/models/components/orderdetail.ts +49 -34
|
@@ -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 */
|
|
@@ -381,10 +387,12 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
381
387
|
customer_phone: z.nullable(z.string()).optional(),
|
|
382
388
|
customer_note: z.nullable(z.string()).optional(),
|
|
383
389
|
is_promotion_applied: z.boolean().optional(),
|
|
384
|
-
promotion_discount_amount: z.
|
|
390
|
+
promotion_discount_amount: z.number().optional(),
|
|
391
|
+
promotion_discount_percent: z.number().optional(),
|
|
385
392
|
is_coupon_applied: z.boolean().optional(),
|
|
386
393
|
coupon_code: z.nullable(z.string()).optional(),
|
|
387
|
-
coupon_discount_amount: z.
|
|
394
|
+
coupon_discount_amount: z.number().optional(),
|
|
395
|
+
coupon_discount_percent: z.number().optional(),
|
|
388
396
|
applied_promotions: z.array(AppliedPromotion$inboundSchema),
|
|
389
397
|
applied_coupons: z.array(AppliedCoupon$inboundSchema),
|
|
390
398
|
promotion_savings: z.number().optional(),
|
|
@@ -402,14 +410,15 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
402
410
|
shipping_tax_amount: z.number().optional(),
|
|
403
411
|
shipping_amount_including_tax: z.number().optional(),
|
|
404
412
|
shipping_provider_id: z.nullable(z.string()).optional(),
|
|
413
|
+
shipping_provider_name: z.nullable(z.string()).optional(),
|
|
405
414
|
courier_company_id: z.nullable(z.string()).optional(),
|
|
415
|
+
courier_company_name: z.nullable(z.string()).optional(),
|
|
416
|
+
estimated_delivery_days: z.nullable(z.number().int()).optional(),
|
|
406
417
|
handling_charge_excluding_tax: z.number().optional(),
|
|
407
418
|
handling_charge_tax_amount: z.number().optional(),
|
|
408
419
|
handling_charge_including_tax: z.number().optional(),
|
|
409
420
|
total_tax: z.number().optional(),
|
|
410
421
|
grand_total: z.number().optional(),
|
|
411
|
-
loyalty_point_redeemed: z.number().int().optional(),
|
|
412
|
-
loyalty_point_earned: z.number().int().optional(),
|
|
413
422
|
loyalty_points_earned: z.number().int().optional(),
|
|
414
423
|
loyalty_points_redeemed: z.number().int().optional(),
|
|
415
424
|
credit_balance_used: z.number().int().optional(),
|
|
@@ -419,16 +428,12 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
419
428
|
billing_address: z.nullable(CustomerAddress$inboundSchema).optional(),
|
|
420
429
|
shipping_address: z.nullable(CustomerAddress$inboundSchema).optional(),
|
|
421
430
|
currency: z.lazy(() => OrderCurrency$inboundSchema).optional(),
|
|
431
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
422
432
|
is_cancellation_allowed: z.boolean().optional(),
|
|
423
433
|
cancellation_refund_details: z.lazy(() =>
|
|
424
434
|
CancellationRefundDetails$inboundSchema
|
|
425
435
|
).optional(),
|
|
426
|
-
|
|
427
|
-
new Date(v)
|
|
428
|
-
).optional(),
|
|
429
|
-
modified_at: z.string().datetime({ offset: true }).transform(v =>
|
|
430
|
-
new Date(v)
|
|
431
|
-
).optional(),
|
|
436
|
+
feedback: z.nullable(z.string()).optional(),
|
|
432
437
|
}).transform((v) => {
|
|
433
438
|
return remap$(v, {
|
|
434
439
|
"order_number": "orderNumber",
|
|
@@ -440,9 +445,11 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
440
445
|
"customer_note": "customerNote",
|
|
441
446
|
"is_promotion_applied": "isPromotionApplied",
|
|
442
447
|
"promotion_discount_amount": "promotionDiscountAmount",
|
|
448
|
+
"promotion_discount_percent": "promotionDiscountPercent",
|
|
443
449
|
"is_coupon_applied": "isCouponApplied",
|
|
444
450
|
"coupon_code": "couponCode",
|
|
445
451
|
"coupon_discount_amount": "couponDiscountAmount",
|
|
452
|
+
"coupon_discount_percent": "couponDiscountPercent",
|
|
446
453
|
"applied_promotions": "appliedPromotions",
|
|
447
454
|
"applied_coupons": "appliedCoupons",
|
|
448
455
|
"promotion_savings": "promotionSavings",
|
|
@@ -459,14 +466,15 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
459
466
|
"shipping_tax_amount": "shippingTaxAmount",
|
|
460
467
|
"shipping_amount_including_tax": "shippingAmountIncludingTax",
|
|
461
468
|
"shipping_provider_id": "shippingProviderId",
|
|
469
|
+
"shipping_provider_name": "shippingProviderName",
|
|
462
470
|
"courier_company_id": "courierCompanyId",
|
|
471
|
+
"courier_company_name": "courierCompanyName",
|
|
472
|
+
"estimated_delivery_days": "estimatedDeliveryDays",
|
|
463
473
|
"handling_charge_excluding_tax": "handlingChargeExcludingTax",
|
|
464
474
|
"handling_charge_tax_amount": "handlingChargeTaxAmount",
|
|
465
475
|
"handling_charge_including_tax": "handlingChargeIncludingTax",
|
|
466
476
|
"total_tax": "totalTax",
|
|
467
477
|
"grand_total": "grandTotal",
|
|
468
|
-
"loyalty_point_redeemed": "loyaltyPointRedeemed",
|
|
469
|
-
"loyalty_point_earned": "loyaltyPointEarned",
|
|
470
478
|
"loyalty_points_earned": "loyaltyPointsEarned",
|
|
471
479
|
"loyalty_points_redeemed": "loyaltyPointsRedeemed",
|
|
472
480
|
"credit_balance_used": "creditBalanceUsed",
|
|
@@ -477,8 +485,6 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
|
|
|
477
485
|
"shipping_address": "shippingAddress",
|
|
478
486
|
"is_cancellation_allowed": "isCancellationAllowed",
|
|
479
487
|
"cancellation_refund_details": "cancellationRefundDetails",
|
|
480
|
-
"created_at": "createdAt",
|
|
481
|
-
"modified_at": "modifiedAt",
|
|
482
488
|
});
|
|
483
489
|
});
|
|
484
490
|
|
|
@@ -493,10 +499,12 @@ export type Order$Outbound = {
|
|
|
493
499
|
customer_phone?: string | null | undefined;
|
|
494
500
|
customer_note?: string | null | undefined;
|
|
495
501
|
is_promotion_applied?: boolean | undefined;
|
|
496
|
-
promotion_discount_amount?: number |
|
|
502
|
+
promotion_discount_amount?: number | undefined;
|
|
503
|
+
promotion_discount_percent?: number | undefined;
|
|
497
504
|
is_coupon_applied?: boolean | undefined;
|
|
498
505
|
coupon_code?: string | null | undefined;
|
|
499
|
-
coupon_discount_amount?: number |
|
|
506
|
+
coupon_discount_amount?: number | undefined;
|
|
507
|
+
coupon_discount_percent?: number | undefined;
|
|
500
508
|
applied_promotions: Array<AppliedPromotion$Outbound>;
|
|
501
509
|
applied_coupons: Array<AppliedCoupon$Outbound>;
|
|
502
510
|
promotion_savings?: number | undefined;
|
|
@@ -514,14 +522,15 @@ export type Order$Outbound = {
|
|
|
514
522
|
shipping_tax_amount?: number | undefined;
|
|
515
523
|
shipping_amount_including_tax?: number | undefined;
|
|
516
524
|
shipping_provider_id?: string | null | undefined;
|
|
525
|
+
shipping_provider_name?: string | null | undefined;
|
|
517
526
|
courier_company_id?: string | null | undefined;
|
|
527
|
+
courier_company_name?: string | null | undefined;
|
|
528
|
+
estimated_delivery_days?: number | null | undefined;
|
|
518
529
|
handling_charge_excluding_tax?: number | undefined;
|
|
519
530
|
handling_charge_tax_amount?: number | undefined;
|
|
520
531
|
handling_charge_including_tax?: number | undefined;
|
|
521
532
|
total_tax?: number | undefined;
|
|
522
533
|
grand_total?: number | undefined;
|
|
523
|
-
loyalty_point_redeemed?: number | undefined;
|
|
524
|
-
loyalty_point_earned?: number | undefined;
|
|
525
534
|
loyalty_points_earned?: number | undefined;
|
|
526
535
|
loyalty_points_redeemed?: number | undefined;
|
|
527
536
|
credit_balance_used?: number | undefined;
|
|
@@ -531,10 +540,10 @@ export type Order$Outbound = {
|
|
|
531
540
|
billing_address?: CustomerAddress$Outbound | null | undefined;
|
|
532
541
|
shipping_address?: CustomerAddress$Outbound | null | undefined;
|
|
533
542
|
currency?: OrderCurrency$Outbound | undefined;
|
|
543
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
534
544
|
is_cancellation_allowed?: boolean | undefined;
|
|
535
545
|
cancellation_refund_details?: CancellationRefundDetails$Outbound | undefined;
|
|
536
|
-
|
|
537
|
-
modified_at?: string | undefined;
|
|
546
|
+
feedback?: string | null | undefined;
|
|
538
547
|
};
|
|
539
548
|
|
|
540
549
|
/** @internal */
|
|
@@ -552,10 +561,12 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
552
561
|
customerPhone: z.nullable(z.string()).optional(),
|
|
553
562
|
customerNote: z.nullable(z.string()).optional(),
|
|
554
563
|
isPromotionApplied: z.boolean().optional(),
|
|
555
|
-
promotionDiscountAmount: z.
|
|
564
|
+
promotionDiscountAmount: z.number().optional(),
|
|
565
|
+
promotionDiscountPercent: z.number().optional(),
|
|
556
566
|
isCouponApplied: z.boolean().optional(),
|
|
557
567
|
couponCode: z.nullable(z.string()).optional(),
|
|
558
|
-
couponDiscountAmount: z.
|
|
568
|
+
couponDiscountAmount: z.number().optional(),
|
|
569
|
+
couponDiscountPercent: z.number().optional(),
|
|
559
570
|
appliedPromotions: z.array(AppliedPromotion$outboundSchema),
|
|
560
571
|
appliedCoupons: z.array(AppliedCoupon$outboundSchema),
|
|
561
572
|
promotionSavings: z.number().optional(),
|
|
@@ -573,14 +584,15 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
573
584
|
shippingTaxAmount: z.number().optional(),
|
|
574
585
|
shippingAmountIncludingTax: z.number().optional(),
|
|
575
586
|
shippingProviderId: z.nullable(z.string()).optional(),
|
|
587
|
+
shippingProviderName: z.nullable(z.string()).optional(),
|
|
576
588
|
courierCompanyId: z.nullable(z.string()).optional(),
|
|
589
|
+
courierCompanyName: z.nullable(z.string()).optional(),
|
|
590
|
+
estimatedDeliveryDays: z.nullable(z.number().int()).optional(),
|
|
577
591
|
handlingChargeExcludingTax: z.number().optional(),
|
|
578
592
|
handlingChargeTaxAmount: z.number().optional(),
|
|
579
593
|
handlingChargeIncludingTax: z.number().optional(),
|
|
580
594
|
totalTax: z.number().optional(),
|
|
581
595
|
grandTotal: z.number().optional(),
|
|
582
|
-
loyaltyPointRedeemed: z.number().int().optional(),
|
|
583
|
-
loyaltyPointEarned: z.number().int().optional(),
|
|
584
596
|
loyaltyPointsEarned: z.number().int().optional(),
|
|
585
597
|
loyaltyPointsRedeemed: z.number().int().optional(),
|
|
586
598
|
creditBalanceUsed: z.number().int().optional(),
|
|
@@ -590,12 +602,12 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
590
602
|
billingAddress: z.nullable(CustomerAddress$outboundSchema).optional(),
|
|
591
603
|
shippingAddress: z.nullable(CustomerAddress$outboundSchema).optional(),
|
|
592
604
|
currency: z.lazy(() => OrderCurrency$outboundSchema).optional(),
|
|
605
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
593
606
|
isCancellationAllowed: z.boolean().optional(),
|
|
594
607
|
cancellationRefundDetails: z.lazy(() =>
|
|
595
608
|
CancellationRefundDetails$outboundSchema
|
|
596
609
|
).optional(),
|
|
597
|
-
|
|
598
|
-
modifiedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
610
|
+
feedback: z.nullable(z.string()).optional(),
|
|
599
611
|
}).transform((v) => {
|
|
600
612
|
return remap$(v, {
|
|
601
613
|
orderNumber: "order_number",
|
|
@@ -607,9 +619,11 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
607
619
|
customerNote: "customer_note",
|
|
608
620
|
isPromotionApplied: "is_promotion_applied",
|
|
609
621
|
promotionDiscountAmount: "promotion_discount_amount",
|
|
622
|
+
promotionDiscountPercent: "promotion_discount_percent",
|
|
610
623
|
isCouponApplied: "is_coupon_applied",
|
|
611
624
|
couponCode: "coupon_code",
|
|
612
625
|
couponDiscountAmount: "coupon_discount_amount",
|
|
626
|
+
couponDiscountPercent: "coupon_discount_percent",
|
|
613
627
|
appliedPromotions: "applied_promotions",
|
|
614
628
|
appliedCoupons: "applied_coupons",
|
|
615
629
|
promotionSavings: "promotion_savings",
|
|
@@ -626,14 +640,15 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
626
640
|
shippingTaxAmount: "shipping_tax_amount",
|
|
627
641
|
shippingAmountIncludingTax: "shipping_amount_including_tax",
|
|
628
642
|
shippingProviderId: "shipping_provider_id",
|
|
643
|
+
shippingProviderName: "shipping_provider_name",
|
|
629
644
|
courierCompanyId: "courier_company_id",
|
|
645
|
+
courierCompanyName: "courier_company_name",
|
|
646
|
+
estimatedDeliveryDays: "estimated_delivery_days",
|
|
630
647
|
handlingChargeExcludingTax: "handling_charge_excluding_tax",
|
|
631
648
|
handlingChargeTaxAmount: "handling_charge_tax_amount",
|
|
632
649
|
handlingChargeIncludingTax: "handling_charge_including_tax",
|
|
633
650
|
totalTax: "total_tax",
|
|
634
651
|
grandTotal: "grand_total",
|
|
635
|
-
loyaltyPointRedeemed: "loyalty_point_redeemed",
|
|
636
|
-
loyaltyPointEarned: "loyalty_point_earned",
|
|
637
652
|
loyaltyPointsEarned: "loyalty_points_earned",
|
|
638
653
|
loyaltyPointsRedeemed: "loyalty_points_redeemed",
|
|
639
654
|
creditBalanceUsed: "credit_balance_used",
|
|
@@ -644,8 +659,6 @@ export const Order$outboundSchema: z.ZodType<
|
|
|
644
659
|
shippingAddress: "shipping_address",
|
|
645
660
|
isCancellationAllowed: "is_cancellation_allowed",
|
|
646
661
|
cancellationRefundDetails: "cancellation_refund_details",
|
|
647
|
-
createdAt: "created_at",
|
|
648
|
-
modifiedAt: "modified_at",
|
|
649
662
|
});
|
|
650
663
|
});
|
|
651
664
|
|
|
@@ -122,10 +122,12 @@ export type OrderDetail = {
|
|
|
122
122
|
customerPhone?: string | null | undefined;
|
|
123
123
|
customerNote?: string | null | undefined;
|
|
124
124
|
isPromotionApplied?: boolean | undefined;
|
|
125
|
-
promotionDiscountAmount?: number |
|
|
125
|
+
promotionDiscountAmount?: number | undefined;
|
|
126
|
+
promotionDiscountPercent?: number | undefined;
|
|
126
127
|
isCouponApplied?: boolean | undefined;
|
|
127
128
|
couponCode?: string | null | undefined;
|
|
128
|
-
couponDiscountAmount?: number |
|
|
129
|
+
couponDiscountAmount?: number | undefined;
|
|
130
|
+
couponDiscountPercent?: number | undefined;
|
|
129
131
|
/**
|
|
130
132
|
* Information about the promotional offers that have been applied to the cart.
|
|
131
133
|
*/
|
|
@@ -149,14 +151,15 @@ export type OrderDetail = {
|
|
|
149
151
|
shippingTaxAmount?: number | undefined;
|
|
150
152
|
shippingAmountIncludingTax?: number | undefined;
|
|
151
153
|
shippingProviderId?: string | null | undefined;
|
|
154
|
+
shippingProviderName?: string | null | undefined;
|
|
152
155
|
courierCompanyId?: string | null | undefined;
|
|
156
|
+
courierCompanyName?: string | null | undefined;
|
|
157
|
+
estimatedDeliveryDays?: number | null | undefined;
|
|
153
158
|
handlingChargeExcludingTax?: number | undefined;
|
|
154
159
|
handlingChargeTaxAmount?: number | undefined;
|
|
155
160
|
handlingChargeIncludingTax?: number | undefined;
|
|
156
161
|
totalTax?: number | undefined;
|
|
157
162
|
grandTotal?: number | undefined;
|
|
158
|
-
loyaltyPointRedeemed?: number | undefined;
|
|
159
|
-
loyaltyPointEarned?: number | undefined;
|
|
160
163
|
loyaltyPointsEarned?: number | undefined;
|
|
161
164
|
loyaltyPointsRedeemed?: number | undefined;
|
|
162
165
|
creditBalanceUsed?: number | undefined;
|
|
@@ -166,6 +169,10 @@ export type OrderDetail = {
|
|
|
166
169
|
billingAddress?: CustomerAddress | null | undefined;
|
|
167
170
|
shippingAddress?: CustomerAddress | null | undefined;
|
|
168
171
|
currency?: OrderDetailCurrency | undefined;
|
|
172
|
+
/**
|
|
173
|
+
* Additional metadata associated with the order.
|
|
174
|
+
*/
|
|
175
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
169
176
|
/**
|
|
170
177
|
* order cancellation option should be visible only if this flag is true.
|
|
171
178
|
*/
|
|
@@ -174,8 +181,7 @@ export type OrderDetail = {
|
|
|
174
181
|
* to show refundable details in order cancellation ui.
|
|
175
182
|
*/
|
|
176
183
|
cancellationRefundDetails?: OrderDetailCancellationRefundDetails | undefined;
|
|
177
|
-
|
|
178
|
-
modifiedAt?: Date | undefined;
|
|
184
|
+
feedback?: string | null | undefined;
|
|
179
185
|
payments?: Array<OrderPayment> | undefined;
|
|
180
186
|
};
|
|
181
187
|
|
|
@@ -405,10 +411,12 @@ export const OrderDetail$inboundSchema: z.ZodType<
|
|
|
405
411
|
customer_phone: z.nullable(z.string()).optional(),
|
|
406
412
|
customer_note: z.nullable(z.string()).optional(),
|
|
407
413
|
is_promotion_applied: z.boolean().optional(),
|
|
408
|
-
promotion_discount_amount: z.
|
|
414
|
+
promotion_discount_amount: z.number().optional(),
|
|
415
|
+
promotion_discount_percent: z.number().optional(),
|
|
409
416
|
is_coupon_applied: z.boolean().optional(),
|
|
410
417
|
coupon_code: z.nullable(z.string()).optional(),
|
|
411
|
-
coupon_discount_amount: z.
|
|
418
|
+
coupon_discount_amount: z.number().optional(),
|
|
419
|
+
coupon_discount_percent: z.number().optional(),
|
|
412
420
|
applied_promotions: z.array(AppliedPromotion$inboundSchema),
|
|
413
421
|
applied_coupons: z.array(AppliedCoupon$inboundSchema),
|
|
414
422
|
promotion_savings: z.number().optional(),
|
|
@@ -426,14 +434,15 @@ export const OrderDetail$inboundSchema: z.ZodType<
|
|
|
426
434
|
shipping_tax_amount: z.number().optional(),
|
|
427
435
|
shipping_amount_including_tax: z.number().optional(),
|
|
428
436
|
shipping_provider_id: z.nullable(z.string()).optional(),
|
|
437
|
+
shipping_provider_name: z.nullable(z.string()).optional(),
|
|
429
438
|
courier_company_id: z.nullable(z.string()).optional(),
|
|
439
|
+
courier_company_name: z.nullable(z.string()).optional(),
|
|
440
|
+
estimated_delivery_days: z.nullable(z.number().int()).optional(),
|
|
430
441
|
handling_charge_excluding_tax: z.number().optional(),
|
|
431
442
|
handling_charge_tax_amount: z.number().optional(),
|
|
432
443
|
handling_charge_including_tax: z.number().optional(),
|
|
433
444
|
total_tax: z.number().optional(),
|
|
434
445
|
grand_total: z.number().optional(),
|
|
435
|
-
loyalty_point_redeemed: z.number().int().optional(),
|
|
436
|
-
loyalty_point_earned: z.number().int().optional(),
|
|
437
446
|
loyalty_points_earned: z.number().int().optional(),
|
|
438
447
|
loyalty_points_redeemed: z.number().int().optional(),
|
|
439
448
|
credit_balance_used: z.number().int().optional(),
|
|
@@ -443,14 +452,12 @@ export const OrderDetail$inboundSchema: z.ZodType<
|
|
|
443
452
|
billing_address: z.nullable(CustomerAddress$inboundSchema).optional(),
|
|
444
453
|
shipping_address: z.nullable(CustomerAddress$inboundSchema).optional(),
|
|
445
454
|
currency: z.lazy(() => OrderDetailCurrency$inboundSchema).optional(),
|
|
455
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
446
456
|
is_cancellation_allowed: z.boolean().optional(),
|
|
447
457
|
cancellation_refund_details: z.lazy(() =>
|
|
448
458
|
OrderDetailCancellationRefundDetails$inboundSchema
|
|
449
459
|
).optional(),
|
|
450
|
-
|
|
451
|
-
.optional(),
|
|
452
|
-
modified_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
453
|
-
.optional(),
|
|
460
|
+
feedback: z.nullable(z.string()).optional(),
|
|
454
461
|
payments: z.array(OrderPayment$inboundSchema).optional(),
|
|
455
462
|
}).transform((v) => {
|
|
456
463
|
return remap$(v, {
|
|
@@ -463,9 +470,11 @@ export const OrderDetail$inboundSchema: z.ZodType<
|
|
|
463
470
|
"customer_note": "customerNote",
|
|
464
471
|
"is_promotion_applied": "isPromotionApplied",
|
|
465
472
|
"promotion_discount_amount": "promotionDiscountAmount",
|
|
473
|
+
"promotion_discount_percent": "promotionDiscountPercent",
|
|
466
474
|
"is_coupon_applied": "isCouponApplied",
|
|
467
475
|
"coupon_code": "couponCode",
|
|
468
476
|
"coupon_discount_amount": "couponDiscountAmount",
|
|
477
|
+
"coupon_discount_percent": "couponDiscountPercent",
|
|
469
478
|
"applied_promotions": "appliedPromotions",
|
|
470
479
|
"applied_coupons": "appliedCoupons",
|
|
471
480
|
"promotion_savings": "promotionSavings",
|
|
@@ -482,14 +491,15 @@ export const OrderDetail$inboundSchema: z.ZodType<
|
|
|
482
491
|
"shipping_tax_amount": "shippingTaxAmount",
|
|
483
492
|
"shipping_amount_including_tax": "shippingAmountIncludingTax",
|
|
484
493
|
"shipping_provider_id": "shippingProviderId",
|
|
494
|
+
"shipping_provider_name": "shippingProviderName",
|
|
485
495
|
"courier_company_id": "courierCompanyId",
|
|
496
|
+
"courier_company_name": "courierCompanyName",
|
|
497
|
+
"estimated_delivery_days": "estimatedDeliveryDays",
|
|
486
498
|
"handling_charge_excluding_tax": "handlingChargeExcludingTax",
|
|
487
499
|
"handling_charge_tax_amount": "handlingChargeTaxAmount",
|
|
488
500
|
"handling_charge_including_tax": "handlingChargeIncludingTax",
|
|
489
501
|
"total_tax": "totalTax",
|
|
490
502
|
"grand_total": "grandTotal",
|
|
491
|
-
"loyalty_point_redeemed": "loyaltyPointRedeemed",
|
|
492
|
-
"loyalty_point_earned": "loyaltyPointEarned",
|
|
493
503
|
"loyalty_points_earned": "loyaltyPointsEarned",
|
|
494
504
|
"loyalty_points_redeemed": "loyaltyPointsRedeemed",
|
|
495
505
|
"credit_balance_used": "creditBalanceUsed",
|
|
@@ -500,8 +510,6 @@ export const OrderDetail$inboundSchema: z.ZodType<
|
|
|
500
510
|
"shipping_address": "shippingAddress",
|
|
501
511
|
"is_cancellation_allowed": "isCancellationAllowed",
|
|
502
512
|
"cancellation_refund_details": "cancellationRefundDetails",
|
|
503
|
-
"created_at": "createdAt",
|
|
504
|
-
"modified_at": "modifiedAt",
|
|
505
513
|
});
|
|
506
514
|
});
|
|
507
515
|
|
|
@@ -516,10 +524,12 @@ export type OrderDetail$Outbound = {
|
|
|
516
524
|
customer_phone?: string | null | undefined;
|
|
517
525
|
customer_note?: string | null | undefined;
|
|
518
526
|
is_promotion_applied?: boolean | undefined;
|
|
519
|
-
promotion_discount_amount?: number |
|
|
527
|
+
promotion_discount_amount?: number | undefined;
|
|
528
|
+
promotion_discount_percent?: number | undefined;
|
|
520
529
|
is_coupon_applied?: boolean | undefined;
|
|
521
530
|
coupon_code?: string | null | undefined;
|
|
522
|
-
coupon_discount_amount?: number |
|
|
531
|
+
coupon_discount_amount?: number | undefined;
|
|
532
|
+
coupon_discount_percent?: number | undefined;
|
|
523
533
|
applied_promotions: Array<AppliedPromotion$Outbound>;
|
|
524
534
|
applied_coupons: Array<AppliedCoupon$Outbound>;
|
|
525
535
|
promotion_savings?: number | undefined;
|
|
@@ -537,14 +547,15 @@ export type OrderDetail$Outbound = {
|
|
|
537
547
|
shipping_tax_amount?: number | undefined;
|
|
538
548
|
shipping_amount_including_tax?: number | undefined;
|
|
539
549
|
shipping_provider_id?: string | null | undefined;
|
|
550
|
+
shipping_provider_name?: string | null | undefined;
|
|
540
551
|
courier_company_id?: string | null | undefined;
|
|
552
|
+
courier_company_name?: string | null | undefined;
|
|
553
|
+
estimated_delivery_days?: number | null | undefined;
|
|
541
554
|
handling_charge_excluding_tax?: number | undefined;
|
|
542
555
|
handling_charge_tax_amount?: number | undefined;
|
|
543
556
|
handling_charge_including_tax?: number | undefined;
|
|
544
557
|
total_tax?: number | undefined;
|
|
545
558
|
grand_total?: number | undefined;
|
|
546
|
-
loyalty_point_redeemed?: number | undefined;
|
|
547
|
-
loyalty_point_earned?: number | undefined;
|
|
548
559
|
loyalty_points_earned?: number | undefined;
|
|
549
560
|
loyalty_points_redeemed?: number | undefined;
|
|
550
561
|
credit_balance_used?: number | undefined;
|
|
@@ -554,12 +565,12 @@ export type OrderDetail$Outbound = {
|
|
|
554
565
|
billing_address?: CustomerAddress$Outbound | null | undefined;
|
|
555
566
|
shipping_address?: CustomerAddress$Outbound | null | undefined;
|
|
556
567
|
currency?: OrderDetailCurrency$Outbound | undefined;
|
|
568
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
557
569
|
is_cancellation_allowed?: boolean | undefined;
|
|
558
570
|
cancellation_refund_details?:
|
|
559
571
|
| OrderDetailCancellationRefundDetails$Outbound
|
|
560
572
|
| undefined;
|
|
561
|
-
|
|
562
|
-
modified_at?: string | undefined;
|
|
573
|
+
feedback?: string | null | undefined;
|
|
563
574
|
payments?: Array<OrderPayment$Outbound> | undefined;
|
|
564
575
|
};
|
|
565
576
|
|
|
@@ -578,10 +589,12 @@ export const OrderDetail$outboundSchema: z.ZodType<
|
|
|
578
589
|
customerPhone: z.nullable(z.string()).optional(),
|
|
579
590
|
customerNote: z.nullable(z.string()).optional(),
|
|
580
591
|
isPromotionApplied: z.boolean().optional(),
|
|
581
|
-
promotionDiscountAmount: z.
|
|
592
|
+
promotionDiscountAmount: z.number().optional(),
|
|
593
|
+
promotionDiscountPercent: z.number().optional(),
|
|
582
594
|
isCouponApplied: z.boolean().optional(),
|
|
583
595
|
couponCode: z.nullable(z.string()).optional(),
|
|
584
|
-
couponDiscountAmount: z.
|
|
596
|
+
couponDiscountAmount: z.number().optional(),
|
|
597
|
+
couponDiscountPercent: z.number().optional(),
|
|
585
598
|
appliedPromotions: z.array(AppliedPromotion$outboundSchema),
|
|
586
599
|
appliedCoupons: z.array(AppliedCoupon$outboundSchema),
|
|
587
600
|
promotionSavings: z.number().optional(),
|
|
@@ -599,14 +612,15 @@ export const OrderDetail$outboundSchema: z.ZodType<
|
|
|
599
612
|
shippingTaxAmount: z.number().optional(),
|
|
600
613
|
shippingAmountIncludingTax: z.number().optional(),
|
|
601
614
|
shippingProviderId: z.nullable(z.string()).optional(),
|
|
615
|
+
shippingProviderName: z.nullable(z.string()).optional(),
|
|
602
616
|
courierCompanyId: z.nullable(z.string()).optional(),
|
|
617
|
+
courierCompanyName: z.nullable(z.string()).optional(),
|
|
618
|
+
estimatedDeliveryDays: z.nullable(z.number().int()).optional(),
|
|
603
619
|
handlingChargeExcludingTax: z.number().optional(),
|
|
604
620
|
handlingChargeTaxAmount: z.number().optional(),
|
|
605
621
|
handlingChargeIncludingTax: z.number().optional(),
|
|
606
622
|
totalTax: z.number().optional(),
|
|
607
623
|
grandTotal: z.number().optional(),
|
|
608
|
-
loyaltyPointRedeemed: z.number().int().optional(),
|
|
609
|
-
loyaltyPointEarned: z.number().int().optional(),
|
|
610
624
|
loyaltyPointsEarned: z.number().int().optional(),
|
|
611
625
|
loyaltyPointsRedeemed: z.number().int().optional(),
|
|
612
626
|
creditBalanceUsed: z.number().int().optional(),
|
|
@@ -616,12 +630,12 @@ export const OrderDetail$outboundSchema: z.ZodType<
|
|
|
616
630
|
billingAddress: z.nullable(CustomerAddress$outboundSchema).optional(),
|
|
617
631
|
shippingAddress: z.nullable(CustomerAddress$outboundSchema).optional(),
|
|
618
632
|
currency: z.lazy(() => OrderDetailCurrency$outboundSchema).optional(),
|
|
633
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
619
634
|
isCancellationAllowed: z.boolean().optional(),
|
|
620
635
|
cancellationRefundDetails: z.lazy(() =>
|
|
621
636
|
OrderDetailCancellationRefundDetails$outboundSchema
|
|
622
637
|
).optional(),
|
|
623
|
-
|
|
624
|
-
modifiedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
638
|
+
feedback: z.nullable(z.string()).optional(),
|
|
625
639
|
payments: z.array(OrderPayment$outboundSchema).optional(),
|
|
626
640
|
}).transform((v) => {
|
|
627
641
|
return remap$(v, {
|
|
@@ -634,9 +648,11 @@ export const OrderDetail$outboundSchema: z.ZodType<
|
|
|
634
648
|
customerNote: "customer_note",
|
|
635
649
|
isPromotionApplied: "is_promotion_applied",
|
|
636
650
|
promotionDiscountAmount: "promotion_discount_amount",
|
|
651
|
+
promotionDiscountPercent: "promotion_discount_percent",
|
|
637
652
|
isCouponApplied: "is_coupon_applied",
|
|
638
653
|
couponCode: "coupon_code",
|
|
639
654
|
couponDiscountAmount: "coupon_discount_amount",
|
|
655
|
+
couponDiscountPercent: "coupon_discount_percent",
|
|
640
656
|
appliedPromotions: "applied_promotions",
|
|
641
657
|
appliedCoupons: "applied_coupons",
|
|
642
658
|
promotionSavings: "promotion_savings",
|
|
@@ -653,14 +669,15 @@ export const OrderDetail$outboundSchema: z.ZodType<
|
|
|
653
669
|
shippingTaxAmount: "shipping_tax_amount",
|
|
654
670
|
shippingAmountIncludingTax: "shipping_amount_including_tax",
|
|
655
671
|
shippingProviderId: "shipping_provider_id",
|
|
672
|
+
shippingProviderName: "shipping_provider_name",
|
|
656
673
|
courierCompanyId: "courier_company_id",
|
|
674
|
+
courierCompanyName: "courier_company_name",
|
|
675
|
+
estimatedDeliveryDays: "estimated_delivery_days",
|
|
657
676
|
handlingChargeExcludingTax: "handling_charge_excluding_tax",
|
|
658
677
|
handlingChargeTaxAmount: "handling_charge_tax_amount",
|
|
659
678
|
handlingChargeIncludingTax: "handling_charge_including_tax",
|
|
660
679
|
totalTax: "total_tax",
|
|
661
680
|
grandTotal: "grand_total",
|
|
662
|
-
loyaltyPointRedeemed: "loyalty_point_redeemed",
|
|
663
|
-
loyaltyPointEarned: "loyalty_point_earned",
|
|
664
681
|
loyaltyPointsEarned: "loyalty_points_earned",
|
|
665
682
|
loyaltyPointsRedeemed: "loyalty_points_redeemed",
|
|
666
683
|
creditBalanceUsed: "credit_balance_used",
|
|
@@ -671,8 +688,6 @@ export const OrderDetail$outboundSchema: z.ZodType<
|
|
|
671
688
|
shippingAddress: "shipping_address",
|
|
672
689
|
isCancellationAllowed: "is_cancellation_allowed",
|
|
673
690
|
cancellationRefundDetails: "cancellation_refund_details",
|
|
674
|
-
createdAt: "created_at",
|
|
675
|
-
modifiedAt: "modified_at",
|
|
676
691
|
});
|
|
677
692
|
});
|
|
678
693
|
|