@wix/auto_sdk_ecom_draft-orders 1.0.23 → 1.0.25
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/build/cjs/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js +18 -2
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js +213 -2
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +457 -136
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js +16 -0
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js +211 -0
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +457 -136
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js +18 -2
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js +213 -2
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.d.ts +459 -137
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.d.ts +17 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js +16 -0
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.d.ts +54 -34
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js +54 -34
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +62 -43
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js +211 -0
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.d.ts +207 -86
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js +11 -7
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.d.ts +459 -137
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +115 -47
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/package.json +4 -4
|
@@ -139,9 +139,13 @@ var DiscountReason;
|
|
|
139
139
|
})(DiscountReason || (exports.DiscountReason = DiscountReason = {}));
|
|
140
140
|
var EditingStatus;
|
|
141
141
|
(function (EditingStatus) {
|
|
142
|
-
/** Draft order
|
|
142
|
+
/** Draft order is being edited. */
|
|
143
143
|
EditingStatus["DRAFT"] = "DRAFT";
|
|
144
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* Draft order has been committed - No further modifications allowed.
|
|
146
|
+
*
|
|
147
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
148
|
+
*/
|
|
145
149
|
EditingStatus["COMMITTED"] = "COMMITTED";
|
|
146
150
|
})(EditingStatus || (exports.EditingStatus = EditingStatus = {}));
|
|
147
151
|
var WeightUnit;
|
|
@@ -156,9 +160,9 @@ var WeightUnit;
|
|
|
156
160
|
var PickupMethod;
|
|
157
161
|
(function (PickupMethod) {
|
|
158
162
|
PickupMethod["UNKNOWN_METHOD"] = "UNKNOWN_METHOD";
|
|
159
|
-
/**
|
|
163
|
+
/** Store pickup. */
|
|
160
164
|
PickupMethod["STORE_PICKUP"] = "STORE_PICKUP";
|
|
161
|
-
/**
|
|
165
|
+
/** Pickup point. */
|
|
162
166
|
PickupMethod["PICKUP_POINT"] = "PICKUP_POINT";
|
|
163
167
|
})(PickupMethod || (exports.PickupMethod = PickupMethod = {}));
|
|
164
168
|
var RuleType;
|
|
@@ -197,11 +201,11 @@ var FileType;
|
|
|
197
201
|
var DiscountType;
|
|
198
202
|
(function (DiscountType) {
|
|
199
203
|
DiscountType["UNKNOWN_TYPE"] = "UNKNOWN_TYPE";
|
|
200
|
-
/** Discount applies to entire order. */
|
|
204
|
+
/** Discount applies to the entire order. */
|
|
201
205
|
DiscountType["GLOBAL"] = "GLOBAL";
|
|
202
|
-
/** Discount applies to specific
|
|
206
|
+
/** Discount applies to a specific item. */
|
|
203
207
|
DiscountType["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
|
|
204
|
-
/** Discount applies to shipping
|
|
208
|
+
/** Discount applies to shipping fee. */
|
|
205
209
|
DiscountType["SHIPPING"] = "SHIPPING";
|
|
206
210
|
})(DiscountType || (exports.DiscountType = DiscountType = {}));
|
|
207
211
|
var NonDraftableReason;
|
|
@@ -407,11 +411,11 @@ var WebhookIdentityType;
|
|
|
407
411
|
WebhookIdentityType["APP"] = "APP";
|
|
408
412
|
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
409
413
|
/**
|
|
410
|
-
* Creates or
|
|
414
|
+
* Creates or retrieves a draft order based on the specified order ID.
|
|
411
415
|
*
|
|
412
|
-
* When passing the ID of an order that is already in draft, the existing draft order
|
|
413
|
-
* To complete a draft and update the order, call Commit Draft Order
|
|
414
|
-
* @param orderId -
|
|
416
|
+
* When passing the ID of an order that is already in draft, the existing draft order is returned.
|
|
417
|
+
* To complete a draft and update the original order, call Commit Draft Order.
|
|
418
|
+
* @param orderId - ID of the order to create a draft for.
|
|
415
419
|
* @public
|
|
416
420
|
* @documentationMaturity preview
|
|
417
421
|
* @requiredField orderId
|
|
@@ -420,6 +424,8 @@ var WebhookIdentityType;
|
|
|
420
424
|
* @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
421
425
|
* @permissionScope Manage Stores - all permissions
|
|
422
426
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
427
|
+
* @permissionScope Manage Stores
|
|
428
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
423
429
|
* @permissionScope Manage Restaurants - all permissions
|
|
424
430
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
425
431
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -493,6 +499,8 @@ async function createDraftOrder(orderId) {
|
|
|
493
499
|
exports.createDraftOrder = createDraftOrder;
|
|
494
500
|
/**
|
|
495
501
|
* Creates an empty draft order.
|
|
502
|
+
*
|
|
503
|
+
* After all relevant details are applied, call Create Order From Draft to convert the draft order to a regular order.
|
|
496
504
|
* @public
|
|
497
505
|
* @documentationMaturity preview
|
|
498
506
|
* @permissionId ECOM.DRAFT_ORDERS_CREATE
|
|
@@ -500,6 +508,8 @@ exports.createDraftOrder = createDraftOrder;
|
|
|
500
508
|
* @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
501
509
|
* @permissionScope Manage Stores - all permissions
|
|
502
510
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
511
|
+
* @permissionScope Manage Stores
|
|
512
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
503
513
|
* @permissionScope Manage Restaurants - all permissions
|
|
504
514
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
505
515
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -572,7 +582,7 @@ async function createEmptyDraftOrder() {
|
|
|
572
582
|
}
|
|
573
583
|
exports.createEmptyDraftOrder = createEmptyDraftOrder;
|
|
574
584
|
/**
|
|
575
|
-
* Adds line items to a draft order.
|
|
585
|
+
* Adds catalog or custom line items to a draft order.
|
|
576
586
|
* @param draftOrderId - Draft order ID.
|
|
577
587
|
* @public
|
|
578
588
|
* @documentationMaturity preview
|
|
@@ -581,6 +591,8 @@ exports.createEmptyDraftOrder = createEmptyDraftOrder;
|
|
|
581
591
|
* @permissionId ECOM.DRAFT_ORDERS_ADD_LINE_ITEMS
|
|
582
592
|
* @permissionScope Manage Stores - all permissions
|
|
583
593
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
594
|
+
* @permissionScope Manage Stores
|
|
595
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
584
596
|
* @permissionScope Manage Restaurants - all permissions
|
|
585
597
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
586
598
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -672,11 +684,11 @@ exports.addLineItemsToDraftOrder = addLineItemsToDraftOrder;
|
|
|
672
684
|
/**
|
|
673
685
|
* Updates a draft order's line items.
|
|
674
686
|
*
|
|
675
|
-
*
|
|
687
|
+
* You can update a line item's quantity, price, and description.
|
|
676
688
|
* > **Notes:**
|
|
677
|
-
* > +
|
|
689
|
+
* > + Specifying a quantity of `0` will remove the line item.
|
|
678
690
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
679
|
-
* > + Quantity cannot be decreased fulfilled line items. To
|
|
691
|
+
* > + Quantity cannot be decreased for fulfilled line items. To retrieve fulfillment information, specify the order ID when calling List Fulfillments For Single Order ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/order-fulfillments/list-fulfillments-for-single-order) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/order-fulfillments/list-fulfillments-for-single-order)).
|
|
680
692
|
* @param draftOrderId - Draft order ID.
|
|
681
693
|
* @param lineItemChanges - Details of changes to apply per line item.
|
|
682
694
|
* @public
|
|
@@ -687,6 +699,8 @@ exports.addLineItemsToDraftOrder = addLineItemsToDraftOrder;
|
|
|
687
699
|
* @permissionId ECOM.DRAFT_ORDERS_MODIFY_ITEMS
|
|
688
700
|
* @permissionScope Manage Stores - all permissions
|
|
689
701
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
702
|
+
* @permissionScope Manage Stores
|
|
703
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
690
704
|
* @permissionScope Manage Restaurants - all permissions
|
|
691
705
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
692
706
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -767,11 +781,12 @@ exports.updateLineItems = updateLineItems;
|
|
|
767
781
|
/**
|
|
768
782
|
* Applies or unapplies discounts on a draft order.
|
|
769
783
|
*
|
|
770
|
-
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
771
|
-
* Existing discounts
|
|
784
|
+
* Unapplied discounts are still part of the draft order, but do not affect balance.
|
|
785
|
+
* Existing discounts that are not passed in the request will keep their current state.
|
|
772
786
|
* @param draftOrderId - Draft order ID.
|
|
773
|
-
* @param discounts -
|
|
774
|
-
*
|
|
787
|
+
* @param discounts - Discounts to set on the draft order.
|
|
788
|
+
*
|
|
789
|
+
* Any existing discounts that are not passed will not change.
|
|
775
790
|
* @public
|
|
776
791
|
* @documentationMaturity preview
|
|
777
792
|
* @requiredField discounts
|
|
@@ -781,6 +796,8 @@ exports.updateLineItems = updateLineItems;
|
|
|
781
796
|
* @permissionId ECOM.DRAFT_ORDERS_SET_DISCOUNTS
|
|
782
797
|
* @permissionScope Manage Stores - all permissions
|
|
783
798
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
799
|
+
* @permissionScope Manage Stores
|
|
800
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
784
801
|
* @permissionScope Manage Restaurants - all permissions
|
|
785
802
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
786
803
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -856,10 +873,10 @@ async function setDiscounts(draftOrderId, discounts) {
|
|
|
856
873
|
}
|
|
857
874
|
exports.setDiscounts = setDiscounts;
|
|
858
875
|
/**
|
|
859
|
-
*
|
|
876
|
+
* Creates custom discounts.
|
|
860
877
|
*
|
|
861
|
-
* Newly
|
|
862
|
-
* To apply them, use Set Discounts
|
|
878
|
+
* Newly created discounts are unapplied by default.
|
|
879
|
+
* To apply them, use Set Discounts.
|
|
863
880
|
* @param draftOrderId - Draft order ID.
|
|
864
881
|
* @public
|
|
865
882
|
* @documentationMaturity preview
|
|
@@ -870,6 +887,8 @@ exports.setDiscounts = setDiscounts;
|
|
|
870
887
|
* @permissionId ECOM.DRAFT_ORDERS_ADD_DISCOUNTS
|
|
871
888
|
* @permissionScope Manage Stores - all permissions
|
|
872
889
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
890
|
+
* @permissionScope Manage Stores
|
|
891
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
873
892
|
* @permissionScope Manage Restaurants - all permissions
|
|
874
893
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
875
894
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -948,9 +967,9 @@ async function createCustomDiscounts(draftOrderId, options) {
|
|
|
948
967
|
}
|
|
949
968
|
exports.createCustomDiscounts = createCustomDiscounts;
|
|
950
969
|
/**
|
|
951
|
-
*
|
|
970
|
+
* Removes custom discounts from a draft order.
|
|
952
971
|
* @param draftOrderId - Draft order ID.
|
|
953
|
-
* @param discountIds -
|
|
972
|
+
* @param discountIds - IDs of the discounts to remove from the draft order.
|
|
954
973
|
* @public
|
|
955
974
|
* @documentationMaturity preview
|
|
956
975
|
* @requiredField discountIds
|
|
@@ -958,6 +977,8 @@ exports.createCustomDiscounts = createCustomDiscounts;
|
|
|
958
977
|
* @permissionId ECOM.DRAFT_ORDERS_DELETE_DISCOUNTS
|
|
959
978
|
* @permissionScope Manage Stores - all permissions
|
|
960
979
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
980
|
+
* @permissionScope Manage Stores
|
|
981
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
961
982
|
* @permissionScope Manage Restaurants - all permissions
|
|
962
983
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
963
984
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1035,11 +1056,12 @@ exports.deleteCustomDiscounts = deleteCustomDiscounts;
|
|
|
1035
1056
|
/**
|
|
1036
1057
|
* Applies or unapplies additional fees on a draft order.
|
|
1037
1058
|
*
|
|
1038
|
-
*
|
|
1039
|
-
* Existing additional fees
|
|
1059
|
+
* Additional fees that are not applied are still part of the draft order, but do not affect balance.
|
|
1060
|
+
* Existing additional fees that are not passed in the request will keep their current state.
|
|
1040
1061
|
* @param draftOrderId - Draft order ID.
|
|
1041
|
-
* @param additionalFees - Additional
|
|
1042
|
-
*
|
|
1062
|
+
* @param additionalFees - Additional fees to set on the draft order.
|
|
1063
|
+
*
|
|
1064
|
+
* Any existing additional fees that are not passed will not change.
|
|
1043
1065
|
* @public
|
|
1044
1066
|
* @documentationMaturity preview
|
|
1045
1067
|
* @requiredField additionalFees
|
|
@@ -1049,6 +1071,8 @@ exports.deleteCustomDiscounts = deleteCustomDiscounts;
|
|
|
1049
1071
|
* @permissionId ECOM.DRAFT_ORDERS_SET_ADDITIONAL_FEES
|
|
1050
1072
|
* @permissionScope Manage Stores - all permissions
|
|
1051
1073
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1074
|
+
* @permissionScope Manage Stores
|
|
1075
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1052
1076
|
* @permissionScope Manage Restaurants - all permissions
|
|
1053
1077
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1054
1078
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1129,8 +1153,8 @@ exports.setAdditionalFees = setAdditionalFees;
|
|
|
1129
1153
|
/**
|
|
1130
1154
|
* Creates custom additional fees on a draft order.
|
|
1131
1155
|
*
|
|
1132
|
-
* Newly
|
|
1133
|
-
* To apply them, use Set Additional Fees
|
|
1156
|
+
* Newly created additional fees are not applied by default.
|
|
1157
|
+
* To apply them, use Set Additional Fees.
|
|
1134
1158
|
* @param draftOrderId - Draft order ID.
|
|
1135
1159
|
* @public
|
|
1136
1160
|
* @documentationMaturity preview
|
|
@@ -1141,6 +1165,8 @@ exports.setAdditionalFees = setAdditionalFees;
|
|
|
1141
1165
|
* @permissionId ECOM.DRAFT_ORDERS_CREATE_ADDITIONAL_FEES
|
|
1142
1166
|
* @permissionScope Manage Stores - all permissions
|
|
1143
1167
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1168
|
+
* @permissionScope Manage Stores
|
|
1169
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1144
1170
|
* @permissionScope Manage Restaurants - all permissions
|
|
1145
1171
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1146
1172
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1219,9 +1245,9 @@ async function createCustomAdditionalFees(draftOrderId, options) {
|
|
|
1219
1245
|
}
|
|
1220
1246
|
exports.createCustomAdditionalFees = createCustomAdditionalFees;
|
|
1221
1247
|
/**
|
|
1222
|
-
*
|
|
1248
|
+
* Removes custom additional fees from a draft order.
|
|
1223
1249
|
* @param draftOrderId - Draft order ID.
|
|
1224
|
-
* @param customAdditionalFees -
|
|
1250
|
+
* @param customAdditionalFees - IDs of the additional fees to remove from the draft order.
|
|
1225
1251
|
* @public
|
|
1226
1252
|
* @documentationMaturity preview
|
|
1227
1253
|
* @requiredField customAdditionalFees
|
|
@@ -1229,6 +1255,8 @@ exports.createCustomAdditionalFees = createCustomAdditionalFees;
|
|
|
1229
1255
|
* @permissionId ECOM.DRAFT_ORDERS_DELETE_ADDITIONAL_FEES
|
|
1230
1256
|
* @permissionScope Manage Stores - all permissions
|
|
1231
1257
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1258
|
+
* @permissionScope Manage Stores
|
|
1259
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1232
1260
|
* @permissionScope Manage Restaurants - all permissions
|
|
1233
1261
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1234
1262
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1315,6 +1343,8 @@ exports.deleteCustomAdditionalFees = deleteCustomAdditionalFees;
|
|
|
1315
1343
|
* @permissionId ECOM.DRAFT_ORDERS_SET_SHIPPING_INFO
|
|
1316
1344
|
* @permissionScope Manage Stores - all permissions
|
|
1317
1345
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1346
|
+
* @permissionScope Manage Stores
|
|
1347
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1318
1348
|
* @permissionScope Manage Restaurants - all permissions
|
|
1319
1349
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1320
1350
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1409,6 +1439,8 @@ exports.setShippingInfo = setShippingInfo;
|
|
|
1409
1439
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUYER_INFO
|
|
1410
1440
|
* @permissionScope Manage Stores - all permissions
|
|
1411
1441
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1442
|
+
* @permissionScope Manage Stores
|
|
1443
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1412
1444
|
* @permissionScope Manage Restaurants - all permissions
|
|
1413
1445
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1414
1446
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1495,6 +1527,8 @@ exports.setBuyerInfo = setBuyerInfo;
|
|
|
1495
1527
|
* @permissionId ECOM.DRAFT_ORDER_SET_RECIPIENT_INFO
|
|
1496
1528
|
* @permissionScope Manage Stores - all permissions
|
|
1497
1529
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1530
|
+
* @permissionScope Manage Stores
|
|
1531
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1498
1532
|
* @permissionScope Manage Restaurants - all permissions
|
|
1499
1533
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1500
1534
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1586,6 +1620,8 @@ exports.setRecipientInfo = setRecipientInfo;
|
|
|
1586
1620
|
* @permissionId ECOM.DRAFT_ORDER_SET_BILLING_INFO
|
|
1587
1621
|
* @permissionScope Manage Stores - all permissions
|
|
1588
1622
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1623
|
+
* @permissionScope Manage Stores
|
|
1624
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1589
1625
|
* @permissionScope Manage Restaurants - all permissions
|
|
1590
1626
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1591
1627
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1669,12 +1705,14 @@ async function setBillingInfo(draftOrderId, options) {
|
|
|
1669
1705
|
}
|
|
1670
1706
|
exports.setBillingInfo = setBillingInfo;
|
|
1671
1707
|
/**
|
|
1672
|
-
*
|
|
1708
|
+
* Retrieves a draft order.
|
|
1673
1709
|
*
|
|
1674
|
-
*
|
|
1675
|
-
*
|
|
1676
|
-
*
|
|
1677
|
-
*
|
|
1710
|
+
* The retrieved draft order contains the latest calculations:
|
|
1711
|
+
* + Line items, shipping details, and buyer information.
|
|
1712
|
+
* + Tax details and price totals.
|
|
1713
|
+
* + Automatic discounts and automatic additional fees, along with updated eligibility.
|
|
1714
|
+
*
|
|
1715
|
+
* > **Note:** When retrieving a committed draft order, it **is not recalculated**.
|
|
1678
1716
|
* @param draftOrderId - Draft order ID.
|
|
1679
1717
|
* @public
|
|
1680
1718
|
* @documentationMaturity preview
|
|
@@ -1683,6 +1721,8 @@ exports.setBillingInfo = setBillingInfo;
|
|
|
1683
1721
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
1684
1722
|
* @permissionScope Manage Stores - all permissions
|
|
1685
1723
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1724
|
+
* @permissionScope Manage Stores
|
|
1725
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1686
1726
|
* @permissionScope Manage Restaurants - all permissions
|
|
1687
1727
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1688
1728
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1757,14 +1797,16 @@ async function getDraftOrder(draftOrderId) {
|
|
|
1757
1797
|
}
|
|
1758
1798
|
exports.getDraftOrder = getDraftOrder;
|
|
1759
1799
|
/**
|
|
1760
|
-
* Checks whether a draft can be created for
|
|
1761
|
-
* @param orderId - Order
|
|
1800
|
+
* Checks whether a draft can be created for an order.
|
|
1801
|
+
* @param orderId - Order ID.
|
|
1762
1802
|
* @public
|
|
1763
1803
|
* @documentationMaturity preview
|
|
1764
1804
|
* @requiredField orderId
|
|
1765
1805
|
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
1766
1806
|
* @permissionScope Manage Stores - all permissions
|
|
1767
1807
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1808
|
+
* @permissionScope Manage Stores
|
|
1809
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1768
1810
|
* @permissionScope Manage Restaurants - all permissions
|
|
1769
1811
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1770
1812
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1795,10 +1837,13 @@ async function getOrderDraftabilityStatus(orderId) {
|
|
|
1795
1837
|
}
|
|
1796
1838
|
exports.getOrderDraftabilityStatus = getOrderDraftabilityStatus;
|
|
1797
1839
|
/**
|
|
1798
|
-
*
|
|
1840
|
+
* Finalizes a draft order and applies its modifications to the associated order.
|
|
1841
|
+
* You can also control which side-effects are executed on commit.
|
|
1799
1842
|
*
|
|
1800
|
-
*
|
|
1801
|
-
*
|
|
1843
|
+
* > **Notes:**
|
|
1844
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
1845
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
1846
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
1802
1847
|
* @param draftOrderId - Draft order ID.
|
|
1803
1848
|
* @public
|
|
1804
1849
|
* @documentationMaturity preview
|
|
@@ -1807,6 +1852,8 @@ exports.getOrderDraftabilityStatus = getOrderDraftabilityStatus;
|
|
|
1807
1852
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
1808
1853
|
* @permissionScope Manage Stores - all permissions
|
|
1809
1854
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1855
|
+
* @permissionScope Manage Stores
|
|
1856
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1810
1857
|
* @permissionScope Manage Restaurants - all permissions
|
|
1811
1858
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1812
1859
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1887,10 +1934,12 @@ async function commitDraftOrder(draftOrderId, options) {
|
|
|
1887
1934
|
}
|
|
1888
1935
|
exports.commitDraftOrder = commitDraftOrder;
|
|
1889
1936
|
/**
|
|
1890
|
-
* Creates a new order while specifying which side-effects are executed.
|
|
1937
|
+
* Creates a new order from a draft, while specifying which side-effects are executed.
|
|
1891
1938
|
*
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1939
|
+
* > **Notes:**
|
|
1940
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
1941
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
1942
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
1894
1943
|
* @param draftOrderId - Draft order ID.
|
|
1895
1944
|
* @public
|
|
1896
1945
|
* @documentationMaturity preview
|
|
@@ -1899,6 +1948,8 @@ exports.commitDraftOrder = commitDraftOrder;
|
|
|
1899
1948
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
1900
1949
|
* @permissionScope Manage Stores - all permissions
|
|
1901
1950
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1951
|
+
* @permissionScope Manage Stores
|
|
1952
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1902
1953
|
* @permissionScope Manage Restaurants - all permissions
|
|
1903
1954
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1904
1955
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -1983,7 +2034,7 @@ exports.createOrderFromDraft = createOrderFromDraft;
|
|
|
1983
2034
|
/**
|
|
1984
2035
|
* Deletes a draft order along with all its pending changes.
|
|
1985
2036
|
*
|
|
1986
|
-
* Draft orders
|
|
2037
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
1987
2038
|
* @param draftOrderId - Draft order ID.
|
|
1988
2039
|
* @public
|
|
1989
2040
|
* @documentationMaturity preview
|
|
@@ -1992,6 +2043,8 @@ exports.createOrderFromDraft = createOrderFromDraft;
|
|
|
1992
2043
|
* @permissionId ECOM.DRAFT_ORDERS_ADMIN_DELETE
|
|
1993
2044
|
* @permissionScope Manage Stores - all permissions
|
|
1994
2045
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2046
|
+
* @permissionScope Manage Stores
|
|
2047
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1995
2048
|
* @permissionScope Manage Restaurants - all permissions
|
|
1996
2049
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1997
2050
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -2032,11 +2085,14 @@ exports.deleteDraftOrder = deleteDraftOrder;
|
|
|
2032
2085
|
* | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
|
|
2033
2086
|
* | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
|
|
2034
2087
|
* | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
|
|
2088
|
+
*
|
|
2035
2089
|
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
2036
2090
|
* @public
|
|
2037
2091
|
* @documentationMaturity preview
|
|
2038
2092
|
* @permissionScope Manage Stores - all permissions
|
|
2039
2093
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2094
|
+
* @permissionScope Manage Stores
|
|
2095
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2040
2096
|
* @permissionScope Manage Restaurants - all permissions
|
|
2041
2097
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2042
2098
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -2134,12 +2190,16 @@ exports.queryDraftOrders = queryDraftOrders;
|
|
|
2134
2190
|
* @permissionId ECOM.DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
2135
2191
|
* @permissionScope Manage Stores - all permissions
|
|
2136
2192
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2193
|
+
* @permissionScope Manage Stores
|
|
2194
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2137
2195
|
* @permissionScope Manage Restaurants - all permissions
|
|
2138
2196
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2139
2197
|
* @permissionScope Manage eCommerce - all permissions
|
|
2140
2198
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
2141
2199
|
* @permissionScope Manage Stores - all permissions
|
|
2142
2200
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2201
|
+
* @permissionScope Manage Stores
|
|
2202
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2143
2203
|
* @permissionScope Manage Restaurants - all permissions
|
|
2144
2204
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2145
2205
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -2211,7 +2271,9 @@ async function updateExtendedFields(_id, namespace, options) {
|
|
|
2211
2271
|
}
|
|
2212
2272
|
exports.updateExtendedFields = updateExtendedFields;
|
|
2213
2273
|
/**
|
|
2214
|
-
* Sets
|
|
2274
|
+
* Sets whether a draft order is tax-exempt.
|
|
2275
|
+
*
|
|
2276
|
+
* A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
|
|
2215
2277
|
* @param draftOrderId - Draft order ID.
|
|
2216
2278
|
* @public
|
|
2217
2279
|
* @documentationMaturity preview
|
|
@@ -2221,6 +2283,8 @@ exports.updateExtendedFields = updateExtendedFields;
|
|
|
2221
2283
|
* @permissionId ECOM.DRAFT_ORDER_SET_TAX_EXEMPTION
|
|
2222
2284
|
* @permissionScope Manage Stores - all permissions
|
|
2223
2285
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2286
|
+
* @permissionScope Manage Stores
|
|
2287
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2224
2288
|
* @permissionScope Manage Restaurants - all permissions
|
|
2225
2289
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2226
2290
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -2300,6 +2364,8 @@ async function setTaxExemption(draftOrderId, options) {
|
|
|
2300
2364
|
exports.setTaxExemption = setTaxExemption;
|
|
2301
2365
|
/**
|
|
2302
2366
|
* Sets business location on a draft order.
|
|
2367
|
+
*
|
|
2368
|
+
* When committed, the order will become associated to a specific business location. This affects who can see and manage this order, and how it is calculated in reports.
|
|
2303
2369
|
* @param draftOrderId - Draft order ID.
|
|
2304
2370
|
* @public
|
|
2305
2371
|
* @documentationMaturity preview
|
|
@@ -2308,6 +2374,8 @@ exports.setTaxExemption = setTaxExemption;
|
|
|
2308
2374
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUSINESS_LOCATION
|
|
2309
2375
|
* @permissionScope Manage Stores - all permissions
|
|
2310
2376
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
2377
|
+
* @permissionScope Manage Stores
|
|
2378
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
2311
2379
|
* @permissionScope Manage Restaurants - all permissions
|
|
2312
2380
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
2313
2381
|
* @permissionScope Manage eCommerce - all permissions
|