@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
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Draft Order main entity.
|
|
4
|
+
* A temporary version of an order, allowing modifications before finalization.
|
|
5
|
+
*/
|
|
3
6
|
export interface DraftOrder {
|
|
4
7
|
/**
|
|
5
8
|
* Draft order ID.
|
|
@@ -40,12 +43,14 @@ export interface DraftOrder {
|
|
|
40
43
|
billingInfo?: AddressWithContact;
|
|
41
44
|
/**
|
|
42
45
|
* Additional fees.
|
|
46
|
+
*
|
|
43
47
|
* Includes details about the source, and whether the additional fee is applied to the order.
|
|
44
48
|
* @maxSize 100
|
|
45
49
|
*/
|
|
46
50
|
additionalFees?: AdditionalFeeDetails[];
|
|
47
51
|
/**
|
|
48
52
|
* Discounts.
|
|
53
|
+
*
|
|
49
54
|
* Includes details about the source, and whether the discount is applied to the order.
|
|
50
55
|
* @maxSize 320
|
|
51
56
|
*/
|
|
@@ -123,11 +128,13 @@ export interface DraftOrder {
|
|
|
123
128
|
taxInfo?: OrderTaxInfo;
|
|
124
129
|
/**
|
|
125
130
|
* Custom field data for the draft order object.
|
|
131
|
+
*
|
|
126
132
|
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls.
|
|
127
133
|
*/
|
|
128
134
|
extendedFields?: ExtendedFields;
|
|
129
135
|
/**
|
|
130
136
|
* Buyer information.
|
|
137
|
+
*
|
|
131
138
|
* Includes details about changes when relevant.
|
|
132
139
|
*/
|
|
133
140
|
buyerDetails?: BuyerDetails;
|
|
@@ -137,7 +144,8 @@ export interface DraftOrder {
|
|
|
137
144
|
*/
|
|
138
145
|
billingDetails?: BillingDetails;
|
|
139
146
|
/**
|
|
140
|
-
* Order business location
|
|
147
|
+
* Order business location.
|
|
148
|
+
*
|
|
141
149
|
* Includes details about changes when relevant.
|
|
142
150
|
*/
|
|
143
151
|
businessLocationDetails?: BusinessLocationDetails;
|
|
@@ -313,6 +321,13 @@ export interface OrderLineItem {
|
|
|
313
321
|
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
314
322
|
*/
|
|
315
323
|
extendedFields?: ExtendedFields;
|
|
324
|
+
/**
|
|
325
|
+
* Modifier groups that were added to the item.
|
|
326
|
+
* @internal
|
|
327
|
+
* @readonly
|
|
328
|
+
* @maxSize 10
|
|
329
|
+
*/
|
|
330
|
+
modifierGroups?: ModifierGroup[];
|
|
316
331
|
}
|
|
317
332
|
export interface ProductName {
|
|
318
333
|
/**
|
|
@@ -630,7 +645,6 @@ export interface SubscriptionInfo {
|
|
|
630
645
|
subscriptionSettings?: SubscriptionSettings;
|
|
631
646
|
/**
|
|
632
647
|
* Description of the charges that will be applied for subscription.
|
|
633
|
-
* @internal
|
|
634
648
|
* @maxLength 1000
|
|
635
649
|
*/
|
|
636
650
|
chargesDescription?: string | null;
|
|
@@ -791,6 +805,63 @@ export interface ExtendedFields {
|
|
|
791
805
|
*/
|
|
792
806
|
namespaces?: Record<string, Record<string, any>>;
|
|
793
807
|
}
|
|
808
|
+
export interface ModifierGroup {
|
|
809
|
+
/**
|
|
810
|
+
* Modifier group id.
|
|
811
|
+
* @minLength 1
|
|
812
|
+
* @maxLength 36
|
|
813
|
+
*/
|
|
814
|
+
_id?: string;
|
|
815
|
+
/** Modifier group name. */
|
|
816
|
+
name?: TranslatableString;
|
|
817
|
+
/**
|
|
818
|
+
* List of modifiers in this group.
|
|
819
|
+
* @minSize 1
|
|
820
|
+
* @maxSize 10
|
|
821
|
+
*/
|
|
822
|
+
modifiers?: ItemModifier[];
|
|
823
|
+
}
|
|
824
|
+
export interface TranslatableString {
|
|
825
|
+
/**
|
|
826
|
+
* __Required.__ String in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope).
|
|
827
|
+
*
|
|
828
|
+
* Min: 1 character.
|
|
829
|
+
* Max: 200 characters.
|
|
830
|
+
* @minLength 1
|
|
831
|
+
* @maxLength 200
|
|
832
|
+
*/
|
|
833
|
+
original?: string;
|
|
834
|
+
/**
|
|
835
|
+
* String translated into the buyer's language.
|
|
836
|
+
*
|
|
837
|
+
* Min: 1 character.
|
|
838
|
+
* Max: 400 characters.
|
|
839
|
+
* Default: Same as `original`.
|
|
840
|
+
* @minLength 1
|
|
841
|
+
* @maxLength 400
|
|
842
|
+
*/
|
|
843
|
+
translated?: string | null;
|
|
844
|
+
}
|
|
845
|
+
export interface ItemModifier {
|
|
846
|
+
/**
|
|
847
|
+
* Modifier ID.
|
|
848
|
+
* @minLength 1
|
|
849
|
+
* @maxLength 36
|
|
850
|
+
*/
|
|
851
|
+
_id?: string;
|
|
852
|
+
/**
|
|
853
|
+
* The quantity of this modifier.
|
|
854
|
+
* @min 1
|
|
855
|
+
* @max 100000
|
|
856
|
+
*/
|
|
857
|
+
quantity?: number | null;
|
|
858
|
+
/** Primary display label for the modifier. */
|
|
859
|
+
label?: TranslatableString;
|
|
860
|
+
/** Optional additional details or clarification for the modifier. */
|
|
861
|
+
details?: TranslatableString;
|
|
862
|
+
/** The price of the modifier. */
|
|
863
|
+
price?: Price;
|
|
864
|
+
}
|
|
794
865
|
export interface ItemChangedDetails {
|
|
795
866
|
/**
|
|
796
867
|
* Line item quantity before change.
|
|
@@ -1128,7 +1199,7 @@ export interface AdditionalFeeDetails {
|
|
|
1128
1199
|
* Supported values:
|
|
1129
1200
|
* + `ORIGINAL_ORDER`: This additional fee is part of the original order.
|
|
1130
1201
|
* + `AUTOMATIC`: User added a catalog item which is configured to have an additional fee.
|
|
1131
|
-
* + `CUSTOM`: This additional fee was created by the
|
|
1202
|
+
* + `CUSTOM`: This additional fee was created by the Create Custom Additional Fees method.
|
|
1132
1203
|
*/
|
|
1133
1204
|
source?: SourceType;
|
|
1134
1205
|
/** Whether this additional fee is applied to the order. */
|
|
@@ -1182,10 +1253,10 @@ export interface AdditionalFee {
|
|
|
1182
1253
|
subscriptionCycles?: number | null;
|
|
1183
1254
|
}
|
|
1184
1255
|
export interface TaxDetails {
|
|
1185
|
-
/**
|
|
1256
|
+
/** Whether the additional fee is taxable. */
|
|
1186
1257
|
taxable?: boolean;
|
|
1187
1258
|
/**
|
|
1188
|
-
* Optional tax group ID to use when calculating tax for this additional fee
|
|
1259
|
+
* Optional tax group ID to use when calculating tax for this additional fee.
|
|
1189
1260
|
* @format GUID
|
|
1190
1261
|
*/
|
|
1191
1262
|
taxGroupId?: string | null;
|
|
@@ -1206,7 +1277,7 @@ export interface DiscountDetails {
|
|
|
1206
1277
|
*
|
|
1207
1278
|
* Supported values:
|
|
1208
1279
|
* + `ORIGINAL_ORDER`: This discount is part of the original order.
|
|
1209
|
-
* + `CUSTOM`: This discount was created by the
|
|
1280
|
+
* + `CUSTOM`: This discount was created by the Create Custom Discounts method.
|
|
1210
1281
|
*/
|
|
1211
1282
|
source?: SourceType;
|
|
1212
1283
|
/** Whether this discount is applied to the order. */
|
|
@@ -1376,9 +1447,13 @@ export interface CreatedByStringOneOf {
|
|
|
1376
1447
|
appId?: string;
|
|
1377
1448
|
}
|
|
1378
1449
|
export declare enum EditingStatus {
|
|
1379
|
-
/** Draft order
|
|
1450
|
+
/** Draft order is being edited. */
|
|
1380
1451
|
DRAFT = "DRAFT",
|
|
1381
|
-
/**
|
|
1452
|
+
/**
|
|
1453
|
+
* Draft order has been committed - No further modifications allowed.
|
|
1454
|
+
*
|
|
1455
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
1456
|
+
*/
|
|
1382
1457
|
COMMITTED = "COMMITTED"
|
|
1383
1458
|
}
|
|
1384
1459
|
export declare enum WeightUnit {
|
|
@@ -1412,7 +1487,7 @@ export interface TaxSummary {
|
|
|
1412
1487
|
}
|
|
1413
1488
|
export interface BalanceSummary {
|
|
1414
1489
|
/**
|
|
1415
|
-
* Amount left to pay for order to be considered paid.
|
|
1490
|
+
* Amount left to pay for the order to be considered paid.
|
|
1416
1491
|
* @readonly
|
|
1417
1492
|
*/
|
|
1418
1493
|
balance?: Balance;
|
|
@@ -1652,31 +1727,33 @@ export interface BusinessLocationChangedDetails {
|
|
|
1652
1727
|
}
|
|
1653
1728
|
export interface CreateDraftOrderRequest {
|
|
1654
1729
|
/**
|
|
1655
|
-
*
|
|
1730
|
+
* ID of the order to create a draft for.
|
|
1656
1731
|
* @format GUID
|
|
1657
1732
|
*/
|
|
1658
1733
|
orderId: string | null;
|
|
1659
1734
|
}
|
|
1660
1735
|
export interface CreateDraftOrderResponse {
|
|
1661
|
-
/** Draft order
|
|
1736
|
+
/** Draft order calculated with the latest changes. */
|
|
1662
1737
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1663
1738
|
/**
|
|
1664
|
-
*
|
|
1665
|
-
*
|
|
1739
|
+
* Whether the response contains a draft order that existed before request.
|
|
1740
|
+
*
|
|
1741
|
+
* `true`: The draft order already exists and is updated.
|
|
1742
|
+
* `false`: A new draft order is created.
|
|
1666
1743
|
*/
|
|
1667
1744
|
preexistingDraftOrder?: boolean | null;
|
|
1668
1745
|
}
|
|
1669
1746
|
export interface CalculatedDraftOrder {
|
|
1670
|
-
/** Draft order
|
|
1747
|
+
/** Draft order. */
|
|
1671
1748
|
draftOrder?: DraftOrder;
|
|
1672
|
-
/**
|
|
1749
|
+
/** Shipping options. */
|
|
1673
1750
|
shippingOptions?: ShippingOption[];
|
|
1674
1751
|
/** Errors that occurred during calculation. */
|
|
1675
1752
|
calculationErrors?: CalculationErrors;
|
|
1676
1753
|
}
|
|
1677
1754
|
export interface ShippingOption {
|
|
1678
1755
|
/**
|
|
1679
|
-
*
|
|
1756
|
+
* Carrier ID.
|
|
1680
1757
|
* @format GUID
|
|
1681
1758
|
*/
|
|
1682
1759
|
carrierId?: string | null;
|
|
@@ -1692,37 +1769,41 @@ export interface ShippingOption {
|
|
|
1692
1769
|
export interface DeliveryLogistics {
|
|
1693
1770
|
/** When the item is expected to be delivered in free text, e.g "3-5 business days" */
|
|
1694
1771
|
deliveryTime?: string | null;
|
|
1695
|
-
/**
|
|
1772
|
+
/**
|
|
1773
|
+
* Instructions for delivery.
|
|
1774
|
+
*
|
|
1775
|
+
* For example, "Please arrive during business hours."
|
|
1776
|
+
*/
|
|
1696
1777
|
instructions?: string | null;
|
|
1697
|
-
/** Additional pickup details
|
|
1778
|
+
/** Additional pickup details. */
|
|
1698
1779
|
pickupDetails?: PickupDetails;
|
|
1699
|
-
/** Expected delivery time slot
|
|
1780
|
+
/** Expected delivery time slot. */
|
|
1700
1781
|
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1701
1782
|
}
|
|
1702
1783
|
export interface PickupDetails {
|
|
1703
|
-
/** Pickup address */
|
|
1784
|
+
/** Pickup address. */
|
|
1704
1785
|
address?: Address;
|
|
1705
1786
|
/** Pickup method. */
|
|
1706
1787
|
pickupMethod?: PickupMethod;
|
|
1707
1788
|
}
|
|
1708
1789
|
export declare enum PickupMethod {
|
|
1709
1790
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1710
|
-
/**
|
|
1791
|
+
/** Store pickup. */
|
|
1711
1792
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1712
|
-
/**
|
|
1793
|
+
/** Pickup point. */
|
|
1713
1794
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1714
1795
|
}
|
|
1715
1796
|
export interface DeliveryTimeSlot {
|
|
1716
|
-
/**
|
|
1797
|
+
/** Delivery time slot start time. */
|
|
1717
1798
|
from?: Date | null;
|
|
1718
|
-
/**
|
|
1799
|
+
/** Delivery time slot end time. */
|
|
1719
1800
|
to?: Date | null;
|
|
1720
1801
|
}
|
|
1721
1802
|
export interface ShippingPrice {
|
|
1722
|
-
/**
|
|
1803
|
+
/** Shipping price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
|
|
1723
1804
|
price?: Price;
|
|
1724
1805
|
/**
|
|
1725
|
-
* Currency of the shipping
|
|
1806
|
+
* Currency of the shipping price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the method.
|
|
1726
1807
|
* @format CURRENCY
|
|
1727
1808
|
*/
|
|
1728
1809
|
currency?: string;
|
|
@@ -1851,7 +1932,7 @@ export interface CarrierError {
|
|
|
1851
1932
|
export interface CreateEmptyDraftOrderRequest {
|
|
1852
1933
|
}
|
|
1853
1934
|
export interface CreateEmptyDraftOrderResponse {
|
|
1854
|
-
/** Draft order
|
|
1935
|
+
/** Draft order calculated with the latest changes. */
|
|
1855
1936
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1856
1937
|
}
|
|
1857
1938
|
export interface AddLineItemsToDraftOrderRequest {
|
|
@@ -1866,7 +1947,9 @@ export interface AddLineItemsToDraftOrderRequest {
|
|
|
1866
1947
|
*/
|
|
1867
1948
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
1868
1949
|
/**
|
|
1869
|
-
* Custom line items to add to draft order.
|
|
1950
|
+
* Custom line items to add to draft order.
|
|
1951
|
+
*
|
|
1952
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
1870
1953
|
* @maxSize 300
|
|
1871
1954
|
*/
|
|
1872
1955
|
customLineItems?: CustomLineItem[];
|
|
@@ -1915,7 +1998,9 @@ export interface CustomLineItem {
|
|
|
1915
1998
|
*/
|
|
1916
1999
|
quantity?: number;
|
|
1917
2000
|
/**
|
|
1918
|
-
* Catalog and item reference.
|
|
2001
|
+
* Catalog and item reference.
|
|
2002
|
+
*
|
|
2003
|
+
* Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1919
2004
|
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1920
2005
|
*/
|
|
1921
2006
|
catalogReference?: CatalogReference;
|
|
@@ -1984,7 +2069,7 @@ export declare enum FileType {
|
|
|
1984
2069
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
1985
2070
|
}
|
|
1986
2071
|
export interface AddLineItemsToDraftOrderResponse {
|
|
1987
|
-
/** Draft order
|
|
2072
|
+
/** Draft order calculated with the latest changes. */
|
|
1988
2073
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1989
2074
|
}
|
|
1990
2075
|
export interface UpdateLineItemsRequest {
|
|
@@ -2007,20 +2092,26 @@ export interface LineItemChangeDetails {
|
|
|
2007
2092
|
*/
|
|
2008
2093
|
lineItemId?: string;
|
|
2009
2094
|
/**
|
|
2010
|
-
* The
|
|
2095
|
+
* The line item's new quantity.
|
|
2096
|
+
*
|
|
2097
|
+
* > **Note:** Passing `0` will remove the line item.
|
|
2011
2098
|
* @max 1000000
|
|
2012
2099
|
*/
|
|
2013
2100
|
newQuantity?: number | null;
|
|
2014
2101
|
/**
|
|
2015
|
-
*
|
|
2102
|
+
* New price for 1 unit of the line item.
|
|
2016
2103
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
2017
2104
|
*/
|
|
2018
2105
|
newPrice?: string | null;
|
|
2019
|
-
/**
|
|
2106
|
+
/**
|
|
2107
|
+
* New description for the price.
|
|
2108
|
+
*
|
|
2109
|
+
* For example, when price is `0` but additional details about the actual price are needed - `"Starts at $67"`.
|
|
2110
|
+
*/
|
|
2020
2111
|
newPriceDescription?: PriceDescription;
|
|
2021
2112
|
}
|
|
2022
2113
|
export interface UpdateLineItemsResponse {
|
|
2023
|
-
/** Draft order
|
|
2114
|
+
/** Draft order calculated with the latest changes. */
|
|
2024
2115
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2025
2116
|
}
|
|
2026
2117
|
export interface SetDiscountsRequest {
|
|
@@ -2030,8 +2121,9 @@ export interface SetDiscountsRequest {
|
|
|
2030
2121
|
*/
|
|
2031
2122
|
draftOrderId: string;
|
|
2032
2123
|
/**
|
|
2033
|
-
*
|
|
2034
|
-
*
|
|
2124
|
+
* Discounts to set on the draft order.
|
|
2125
|
+
*
|
|
2126
|
+
* Any existing discounts that are not passed will not change.
|
|
2035
2127
|
* @minSize 1
|
|
2036
2128
|
* @maxSize 320
|
|
2037
2129
|
*/
|
|
@@ -2039,15 +2131,17 @@ export interface SetDiscountsRequest {
|
|
|
2039
2131
|
}
|
|
2040
2132
|
export interface IdAndApplied {
|
|
2041
2133
|
/**
|
|
2042
|
-
* Entity ID.
|
|
2134
|
+
* Entity ID.
|
|
2135
|
+
*
|
|
2136
|
+
* Depending on the context, the value is either a discount ID or an additional fee ID.
|
|
2043
2137
|
* @format GUID
|
|
2044
2138
|
*/
|
|
2045
2139
|
_id?: string;
|
|
2046
|
-
/**
|
|
2140
|
+
/** Whether the discount or additional fee should be applied to the draft order. */
|
|
2047
2141
|
applied?: boolean;
|
|
2048
2142
|
}
|
|
2049
2143
|
export interface SetDiscountsResponse {
|
|
2050
|
-
/** Draft order
|
|
2144
|
+
/** Draft order calculated with the latest changes. */
|
|
2051
2145
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2052
2146
|
}
|
|
2053
2147
|
export interface CreateCustomDiscountsRequest {
|
|
@@ -2057,17 +2151,19 @@ export interface CreateCustomDiscountsRequest {
|
|
|
2057
2151
|
*/
|
|
2058
2152
|
draftOrderId: string;
|
|
2059
2153
|
/**
|
|
2060
|
-
*
|
|
2154
|
+
* Custom discounts to create.
|
|
2155
|
+
*
|
|
2156
|
+
* Created discounts are not applied by default.
|
|
2061
2157
|
* @minSize 1
|
|
2062
2158
|
* @maxSize 100
|
|
2063
2159
|
*/
|
|
2064
2160
|
discounts?: DiscountOption[];
|
|
2065
2161
|
}
|
|
2066
2162
|
export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
2067
|
-
/**
|
|
2163
|
+
/** Amount to discount from the line item price. */
|
|
2068
2164
|
priceAmount?: Price;
|
|
2069
2165
|
/**
|
|
2070
|
-
*
|
|
2166
|
+
* Percentage to discount from the line item price.
|
|
2071
2167
|
* @format DECIMAL_VALUE
|
|
2072
2168
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2073
2169
|
*/
|
|
@@ -2095,8 +2191,9 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2095
2191
|
*/
|
|
2096
2192
|
description?: string | null;
|
|
2097
2193
|
/**
|
|
2098
|
-
*
|
|
2099
|
-
*
|
|
2194
|
+
* Whether to apply the discount to the draft order.
|
|
2195
|
+
*
|
|
2196
|
+
* Default: `false`
|
|
2100
2197
|
*/
|
|
2101
2198
|
applyToDraftOrder?: boolean | null;
|
|
2102
2199
|
/**
|
|
@@ -2107,10 +2204,10 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2107
2204
|
}
|
|
2108
2205
|
/** @oneof */
|
|
2109
2206
|
export interface DiscountOptionDiscountAmountOneOf {
|
|
2110
|
-
/**
|
|
2207
|
+
/** Amount to discount from the line item price. */
|
|
2111
2208
|
priceAmount?: Price;
|
|
2112
2209
|
/**
|
|
2113
|
-
*
|
|
2210
|
+
* Percentage to discount from the line item price.
|
|
2114
2211
|
* @format DECIMAL_VALUE
|
|
2115
2212
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2116
2213
|
*/
|
|
@@ -2118,15 +2215,15 @@ export interface DiscountOptionDiscountAmountOneOf {
|
|
|
2118
2215
|
}
|
|
2119
2216
|
export declare enum DiscountType {
|
|
2120
2217
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
2121
|
-
/** Discount applies to entire order. */
|
|
2218
|
+
/** Discount applies to the entire order. */
|
|
2122
2219
|
GLOBAL = "GLOBAL",
|
|
2123
|
-
/** Discount applies to specific
|
|
2220
|
+
/** Discount applies to a specific item. */
|
|
2124
2221
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2125
|
-
/** Discount applies to shipping
|
|
2222
|
+
/** Discount applies to shipping fee. */
|
|
2126
2223
|
SHIPPING = "SHIPPING"
|
|
2127
2224
|
}
|
|
2128
2225
|
export interface CreateCustomDiscountsResponse {
|
|
2129
|
-
/** Draft order
|
|
2226
|
+
/** Draft order calculated with the latest changes. */
|
|
2130
2227
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2131
2228
|
}
|
|
2132
2229
|
export interface DeleteCustomDiscountsRequest {
|
|
@@ -2136,7 +2233,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2136
2233
|
*/
|
|
2137
2234
|
draftOrderId: string;
|
|
2138
2235
|
/**
|
|
2139
|
-
*
|
|
2236
|
+
* IDs of the discounts to remove from the draft order.
|
|
2140
2237
|
* @format GUID
|
|
2141
2238
|
* @minSize 1
|
|
2142
2239
|
* @maxSize 100
|
|
@@ -2144,7 +2241,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2144
2241
|
discountIds: string[];
|
|
2145
2242
|
}
|
|
2146
2243
|
export interface DeleteCustomDiscountsResponse {
|
|
2147
|
-
/** Draft order
|
|
2244
|
+
/** Draft order calculated with the latest changes. */
|
|
2148
2245
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2149
2246
|
}
|
|
2150
2247
|
export interface SetAdditionalFeesRequest {
|
|
@@ -2154,15 +2251,16 @@ export interface SetAdditionalFeesRequest {
|
|
|
2154
2251
|
*/
|
|
2155
2252
|
draftOrderId: string;
|
|
2156
2253
|
/**
|
|
2157
|
-
* Additional
|
|
2158
|
-
*
|
|
2254
|
+
* Additional fees to set on the draft order.
|
|
2255
|
+
*
|
|
2256
|
+
* Any existing additional fees that are not passed will not change.
|
|
2159
2257
|
* @minSize 1
|
|
2160
2258
|
* @maxSize 100
|
|
2161
2259
|
*/
|
|
2162
2260
|
additionalFees: IdAndApplied[];
|
|
2163
2261
|
}
|
|
2164
2262
|
export interface SetAdditionalFeesResponse {
|
|
2165
|
-
/** Draft order
|
|
2263
|
+
/** Draft order calculated with the latest changes. */
|
|
2166
2264
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2167
2265
|
}
|
|
2168
2266
|
export interface CreateCustomAdditionalFeesRequest {
|
|
@@ -2172,7 +2270,9 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2172
2270
|
*/
|
|
2173
2271
|
draftOrderId: string;
|
|
2174
2272
|
/**
|
|
2175
|
-
*
|
|
2273
|
+
* Custom additional fees to create.
|
|
2274
|
+
*
|
|
2275
|
+
* Created additional fees are not applied by default.
|
|
2176
2276
|
* @minSize 1
|
|
2177
2277
|
* @maxSize 100
|
|
2178
2278
|
*/
|
|
@@ -2180,28 +2280,30 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2180
2280
|
}
|
|
2181
2281
|
export interface AdditionalFeeOption {
|
|
2182
2282
|
/**
|
|
2183
|
-
*
|
|
2283
|
+
* Name of the additional fee.
|
|
2184
2284
|
* @minLength 1
|
|
2185
2285
|
* @maxLength 50
|
|
2186
2286
|
*/
|
|
2187
2287
|
name?: string;
|
|
2188
|
-
/**
|
|
2288
|
+
/** Price of the additional fee. */
|
|
2189
2289
|
price?: Price;
|
|
2190
|
-
/** Tax calculation details */
|
|
2290
|
+
/** Tax calculation details. */
|
|
2191
2291
|
taxDetails?: TaxDetails;
|
|
2192
2292
|
/**
|
|
2193
|
-
*
|
|
2194
|
-
*
|
|
2293
|
+
* Whether to apply the additional fee to the draft order.
|
|
2294
|
+
*
|
|
2295
|
+
* Default: `false`
|
|
2195
2296
|
*/
|
|
2196
2297
|
applyToDraftOrder?: boolean | null;
|
|
2197
2298
|
/**
|
|
2198
|
-
* Additional fee
|
|
2299
|
+
* Additional fee unique code (or ID) for future processing.
|
|
2199
2300
|
* @minLength 1
|
|
2200
2301
|
* @maxLength 100
|
|
2201
2302
|
*/
|
|
2202
2303
|
code?: string | null;
|
|
2203
2304
|
/**
|
|
2204
|
-
*
|
|
2305
|
+
* IDs of the line items associated with this additional fee.
|
|
2306
|
+
*
|
|
2205
2307
|
* If no `lineItemIds` are provided, the fee will be associated with the whole order.
|
|
2206
2308
|
* @format GUID
|
|
2207
2309
|
* @maxSize 300
|
|
@@ -2209,7 +2311,7 @@ export interface AdditionalFeeOption {
|
|
|
2209
2311
|
lineItemIds?: string[];
|
|
2210
2312
|
}
|
|
2211
2313
|
export interface CreateCustomAdditionalFeesResponse {
|
|
2212
|
-
/** Draft order
|
|
2314
|
+
/** Draft order calculated with the latest changes. */
|
|
2213
2315
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2214
2316
|
}
|
|
2215
2317
|
export interface DeleteCustomAdditionalFeesRequest {
|
|
@@ -2219,7 +2321,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2219
2321
|
*/
|
|
2220
2322
|
draftOrderId: string;
|
|
2221
2323
|
/**
|
|
2222
|
-
*
|
|
2324
|
+
* IDs of the additional fees to remove from the draft order.
|
|
2223
2325
|
* @format GUID
|
|
2224
2326
|
* @minSize 1
|
|
2225
2327
|
* @maxSize 100
|
|
@@ -2227,7 +2329,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2227
2329
|
customAdditionalFees: string[];
|
|
2228
2330
|
}
|
|
2229
2331
|
export interface DeleteCustomAdditionalFeesResponse {
|
|
2230
|
-
/** Draft order
|
|
2332
|
+
/** Draft order calculated with the latest changes. */
|
|
2231
2333
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2232
2334
|
}
|
|
2233
2335
|
export interface SetShippingInfoRequest {
|
|
@@ -2236,11 +2338,15 @@ export interface SetShippingInfoRequest {
|
|
|
2236
2338
|
* @format GUID
|
|
2237
2339
|
*/
|
|
2238
2340
|
draftOrderId: string;
|
|
2239
|
-
/**
|
|
2341
|
+
/**
|
|
2342
|
+
* Shipping info to set on the draft order.
|
|
2343
|
+
*
|
|
2344
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2345
|
+
*/
|
|
2240
2346
|
shippingInfo?: V1ShippingInformation;
|
|
2241
2347
|
}
|
|
2242
2348
|
export interface SetShippingInfoResponse {
|
|
2243
|
-
/** Draft order
|
|
2349
|
+
/** Draft order calculated with the latest changes. */
|
|
2244
2350
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2245
2351
|
}
|
|
2246
2352
|
export interface SetBuyerInfoRequest {
|
|
@@ -2249,11 +2355,15 @@ export interface SetBuyerInfoRequest {
|
|
|
2249
2355
|
* @format GUID
|
|
2250
2356
|
*/
|
|
2251
2357
|
draftOrderId: string;
|
|
2252
|
-
/**
|
|
2358
|
+
/**
|
|
2359
|
+
* Shipping info to set on the draft order.
|
|
2360
|
+
*
|
|
2361
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2362
|
+
*/
|
|
2253
2363
|
buyerInfo?: BuyerInfo;
|
|
2254
2364
|
}
|
|
2255
2365
|
export interface SetBuyerInfoResponse {
|
|
2256
|
-
/** Draft order
|
|
2366
|
+
/** Draft order calculated with the latest changes. */
|
|
2257
2367
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2258
2368
|
}
|
|
2259
2369
|
export interface SetRecipientInfoRequest {
|
|
@@ -2262,11 +2372,15 @@ export interface SetRecipientInfoRequest {
|
|
|
2262
2372
|
* @format GUID
|
|
2263
2373
|
*/
|
|
2264
2374
|
draftOrderId: string;
|
|
2265
|
-
/**
|
|
2375
|
+
/**
|
|
2376
|
+
* Recipient address and contact details.
|
|
2377
|
+
*
|
|
2378
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
2379
|
+
*/
|
|
2266
2380
|
recipientInfo?: AddressWithContact;
|
|
2267
2381
|
}
|
|
2268
2382
|
export interface SetRecipientInfoResponse {
|
|
2269
|
-
/** Draft order
|
|
2383
|
+
/** Draft order calculated with the latest changes. */
|
|
2270
2384
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2271
2385
|
}
|
|
2272
2386
|
export interface SetBillingInfoRequest {
|
|
@@ -2275,11 +2389,15 @@ export interface SetBillingInfoRequest {
|
|
|
2275
2389
|
* @format GUID
|
|
2276
2390
|
*/
|
|
2277
2391
|
draftOrderId: string;
|
|
2278
|
-
/**
|
|
2392
|
+
/**
|
|
2393
|
+
* Billing address and contact details.
|
|
2394
|
+
*
|
|
2395
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
2396
|
+
*/
|
|
2279
2397
|
billingInfo?: AddressWithContact;
|
|
2280
2398
|
}
|
|
2281
2399
|
export interface SetBillingInfoResponse {
|
|
2282
|
-
/** Draft order
|
|
2400
|
+
/** Draft order calculated with the latest changes. */
|
|
2283
2401
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2284
2402
|
}
|
|
2285
2403
|
/** Deprecated */
|
|
@@ -2294,7 +2412,7 @@ export interface UpdateShippingInfoRequest {
|
|
|
2294
2412
|
}
|
|
2295
2413
|
/** Deprecated */
|
|
2296
2414
|
export interface UpdateShippingInfoResponse {
|
|
2297
|
-
/** Draft order
|
|
2415
|
+
/** Draft order calculated with the latest changes. */
|
|
2298
2416
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2299
2417
|
}
|
|
2300
2418
|
export interface GetDraftOrderRequest {
|
|
@@ -2305,26 +2423,30 @@ export interface GetDraftOrderRequest {
|
|
|
2305
2423
|
draftOrderId: string;
|
|
2306
2424
|
}
|
|
2307
2425
|
export interface GetDraftOrderResponse {
|
|
2308
|
-
/** Draft order
|
|
2426
|
+
/** Draft order calculated with the latest changes. */
|
|
2309
2427
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2310
2428
|
}
|
|
2311
2429
|
export interface GetOrderDraftabilityStatusRequest {
|
|
2312
2430
|
/**
|
|
2313
|
-
* Order
|
|
2431
|
+
* Order ID.
|
|
2314
2432
|
* @format GUID
|
|
2315
2433
|
*/
|
|
2316
2434
|
orderId: string;
|
|
2317
2435
|
}
|
|
2318
2436
|
export interface GetOrderDraftabilityStatusResponse {
|
|
2319
2437
|
/**
|
|
2320
|
-
* Order
|
|
2438
|
+
* Order ID.
|
|
2321
2439
|
* @format GUID
|
|
2322
2440
|
*/
|
|
2323
2441
|
orderId?: string;
|
|
2324
|
-
/**
|
|
2442
|
+
/**
|
|
2443
|
+
* Whether a draft can be created based on the order.
|
|
2444
|
+
*
|
|
2445
|
+
* Default: `false`
|
|
2446
|
+
*/
|
|
2325
2447
|
orderDraftable?: boolean;
|
|
2326
2448
|
/**
|
|
2327
|
-
* Reasons why
|
|
2449
|
+
* Reasons why a draft order cannot be created from the order.
|
|
2328
2450
|
* @maxSize 5
|
|
2329
2451
|
*/
|
|
2330
2452
|
nonDraftableReasons?: NonDraftableReason[];
|
|
@@ -2361,7 +2483,7 @@ export interface CommitDraftOrderRequest {
|
|
|
2361
2483
|
/** Optional side effects to trigger. */
|
|
2362
2484
|
commitSettings?: DraftOrderCommitSettings;
|
|
2363
2485
|
/**
|
|
2364
|
-
* Reason for edit,
|
|
2486
|
+
* Reason for edit, provided by user (optional).
|
|
2365
2487
|
* @maxLength 200
|
|
2366
2488
|
*/
|
|
2367
2489
|
reason?: string | null;
|
|
@@ -3552,7 +3674,7 @@ export interface CreateOrderFromDraftRequest {
|
|
|
3552
3674
|
/** Optional side effects to trigger. */
|
|
3553
3675
|
createSettings?: OrderCreateSettings;
|
|
3554
3676
|
/**
|
|
3555
|
-
* Reason for order creation,
|
|
3677
|
+
* Reason for order creation, provided by user (optional).
|
|
3556
3678
|
* @maxLength 200
|
|
3557
3679
|
*/
|
|
3558
3680
|
reason?: string | null;
|
|
@@ -3578,7 +3700,7 @@ export interface OrderCreateNotifications {
|
|
|
3578
3700
|
sendNotificationsToBusiness?: boolean | null;
|
|
3579
3701
|
}
|
|
3580
3702
|
export interface CreateOrderFromDraftResponse {
|
|
3581
|
-
/**
|
|
3703
|
+
/** Draft order after commit. */
|
|
3582
3704
|
committedDraftOrder?: DraftOrder;
|
|
3583
3705
|
/** Created order. */
|
|
3584
3706
|
createdOrder?: Order;
|
|
@@ -3704,14 +3826,14 @@ export interface SetTaxExemptionRequest {
|
|
|
3704
3826
|
*/
|
|
3705
3827
|
draftOrderId: string;
|
|
3706
3828
|
/**
|
|
3707
|
-
*
|
|
3829
|
+
* Whether the draft order is exempt from tax calculations.
|
|
3708
3830
|
*
|
|
3709
3831
|
* Default: `false`
|
|
3710
3832
|
*/
|
|
3711
3833
|
taxExempt: boolean | null;
|
|
3712
3834
|
}
|
|
3713
3835
|
export interface SetTaxExemptionResponse {
|
|
3714
|
-
/** Draft order
|
|
3836
|
+
/** Draft order calculated with the latest changes. */
|
|
3715
3837
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3716
3838
|
}
|
|
3717
3839
|
export interface SetBusinessLocationRequest {
|
|
@@ -3724,7 +3846,7 @@ export interface SetBusinessLocationRequest {
|
|
|
3724
3846
|
businessLocation?: Location;
|
|
3725
3847
|
}
|
|
3726
3848
|
export interface SetBusinessLocationResponse {
|
|
3727
|
-
/** Draft order
|
|
3849
|
+
/** Draft order calculated with the latest changes. */
|
|
3728
3850
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3729
3851
|
}
|
|
3730
3852
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -3867,13 +3989,127 @@ export declare enum WebhookIdentityType {
|
|
|
3867
3989
|
WIX_USER = "WIX_USER",
|
|
3868
3990
|
APP = "APP"
|
|
3869
3991
|
}
|
|
3992
|
+
export interface BaseEventMetadata {
|
|
3993
|
+
/**
|
|
3994
|
+
* App instance ID.
|
|
3995
|
+
* @format GUID
|
|
3996
|
+
*/
|
|
3997
|
+
instanceId?: string | null;
|
|
3998
|
+
/**
|
|
3999
|
+
* Event type.
|
|
4000
|
+
* @maxLength 150
|
|
4001
|
+
*/
|
|
4002
|
+
eventType?: string;
|
|
4003
|
+
/** The identification type and identity data. */
|
|
4004
|
+
identity?: IdentificationData;
|
|
4005
|
+
}
|
|
4006
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
4007
|
+
/**
|
|
4008
|
+
* Unique event ID.
|
|
4009
|
+
* Allows clients to ignore duplicate webhooks.
|
|
4010
|
+
*/
|
|
4011
|
+
_id?: string;
|
|
4012
|
+
/**
|
|
4013
|
+
* Assumes actions are also always typed to an entity_type
|
|
4014
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
4015
|
+
*/
|
|
4016
|
+
entityFqdn?: string;
|
|
4017
|
+
/**
|
|
4018
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
4019
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
4020
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
4021
|
+
*/
|
|
4022
|
+
slug?: string;
|
|
4023
|
+
/** ID of the entity associated with the event. */
|
|
4024
|
+
entityId?: string;
|
|
4025
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
4026
|
+
eventTime?: Date | null;
|
|
4027
|
+
/**
|
|
4028
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
4029
|
+
* (for example, GDPR).
|
|
4030
|
+
*/
|
|
4031
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
4032
|
+
/** If present, indicates the action that triggered the event. */
|
|
4033
|
+
originatedFrom?: string | null;
|
|
4034
|
+
/**
|
|
4035
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
4036
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
4037
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
4038
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
4039
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
4040
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
4041
|
+
*/
|
|
4042
|
+
entityEventSequence?: string | null;
|
|
4043
|
+
}
|
|
4044
|
+
export interface DraftOrderCreatedEnvelope {
|
|
4045
|
+
entity: DraftOrder;
|
|
4046
|
+
metadata: EventMetadata;
|
|
4047
|
+
}
|
|
4048
|
+
/**
|
|
4049
|
+
* Triggered when a draft order is created.
|
|
4050
|
+
* @permissionScope Manage Stores - all permissions
|
|
4051
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4052
|
+
* @permissionScope Manage Stores
|
|
4053
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4054
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4055
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4056
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4057
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4058
|
+
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
4059
|
+
* @webhook
|
|
4060
|
+
* @eventType wix.ecom.v1.draft_order_created
|
|
4061
|
+
* @slug created
|
|
4062
|
+
* @documentationMaturity preview
|
|
4063
|
+
*/
|
|
4064
|
+
export declare function onDraftOrderCreated(handler: (event: DraftOrderCreatedEnvelope) => void | Promise<void>): void;
|
|
4065
|
+
export interface DraftOrderDeletedEnvelope {
|
|
4066
|
+
metadata: EventMetadata;
|
|
4067
|
+
}
|
|
4068
|
+
/**
|
|
4069
|
+
* Triggered when a draft order is deleted.
|
|
4070
|
+
* @permissionScope Manage Stores - all permissions
|
|
4071
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4072
|
+
* @permissionScope Manage Stores
|
|
4073
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4074
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4075
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4076
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4077
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4078
|
+
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
4079
|
+
* @webhook
|
|
4080
|
+
* @eventType wix.ecom.v1.draft_order_deleted
|
|
4081
|
+
* @slug deleted
|
|
4082
|
+
* @documentationMaturity preview
|
|
4083
|
+
*/
|
|
4084
|
+
export declare function onDraftOrderDeleted(handler: (event: DraftOrderDeletedEnvelope) => void | Promise<void>): void;
|
|
4085
|
+
export interface DraftOrderUpdatedEnvelope {
|
|
4086
|
+
entity: DraftOrder;
|
|
4087
|
+
metadata: EventMetadata;
|
|
4088
|
+
}
|
|
4089
|
+
/**
|
|
4090
|
+
* Triggered when a draft order is updated.
|
|
4091
|
+
* @permissionScope Manage Stores - all permissions
|
|
4092
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4093
|
+
* @permissionScope Manage Stores
|
|
4094
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4095
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4096
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4097
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4098
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4099
|
+
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
4100
|
+
* @webhook
|
|
4101
|
+
* @eventType wix.ecom.v1.draft_order_updated
|
|
4102
|
+
* @slug updated
|
|
4103
|
+
* @documentationMaturity preview
|
|
4104
|
+
*/
|
|
4105
|
+
export declare function onDraftOrderUpdated(handler: (event: DraftOrderUpdatedEnvelope) => void | Promise<void>): void;
|
|
3870
4106
|
type DraftOrderNonNullablePaths = `lineItems` | `lineItems.${number}.added` | `lineItems.${number}.changedDetails.priceBeforeChange.amount` | `lineItems.${number}.changedDetails.priceBeforeChange.formattedAmount` | `lineItems.${number}.changedDetails.priceDescriptionBeforeChange.original` | `lineItems.${number}.removed` | `lineItems.${number}.lineItem._id` | `lineItems.${number}.lineItem.productName.original` | `lineItems.${number}.lineItem.catalogReference.catalogItemId` | `lineItems.${number}.lineItem.catalogReference.appId` | `lineItems.${number}.lineItem.quantity` | `lineItems.${number}.lineItem.physicalProperties.shippable` | `lineItems.${number}.lineItem.itemType.preset` | `lineItems.${number}.lineItem.itemType.custom` | `lineItems.${number}.lineItem.paymentOption` | `lineItems.${number}.lineItem.taxDetails.taxRate` | `lineItems.${number}.lineItem.taxInfo.taxIncludedInPrice` | `lineItems.${number}.lineItem.digitalFile.fileId` | `lineItems.${number}.lineItem.subscriptionInfo.cycleNumber` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionOptionTitle` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.lineItem.subscriptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.lineItem.taxableAddress.addressType` | `shippingInfo.added` | `shippingInfo.changedDetails.shippingInfoBeforeChange.title` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.number` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.name` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId._id` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId.type` | `shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.pickupMethod` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.price.amount` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.price.formattedAmount` | `shippingInfo.changedDetails.shippingInfoBeforeChange.cost.taxDetails.taxRate` | `shippingInfo.removed` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `additionalFees` | `additionalFees.${number}.additionalFee.name` | `additionalFees.${number}.additionalFee.price.amount` | `additionalFees.${number}.additionalFee.price.formattedAmount` | `additionalFees.${number}.additionalFee.taxDetails.taxRate` | `additionalFees.${number}.additionalFee._id` | `additionalFees.${number}.taxDetails.taxable` | `additionalFees.${number}.source` | `additionalFees.${number}.applied` | `discounts` | `discounts.${number}.discount.coupon._id` | `discounts.${number}.discount.coupon.code` | `discounts.${number}.discount.coupon.name` | `discounts.${number}.discount.coupon.amount.amount` | `discounts.${number}.discount.coupon.amount.formattedAmount` | `discounts.${number}.discount.merchantDiscount.discountReason` | `discounts.${number}.discount.discountRule._id` | `discounts.${number}.discount.discountRule.name.original` | `discounts.${number}.discount.discountType` | `discounts.${number}.source` | `discounts.${number}.applied` | `createdBy.userId` | `createdBy.appId` | `status` | `weightUnit` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.formattedAmount` | `taxSummary.totalTax.amount` | `taxSummary.totalTax.formattedAmount` | `balanceSummary.balance.amount` | `balanceSummary.balance.formattedAmount` | `balanceSummary.paid.amount` | `balanceSummary.paid.formattedAmount` | `commitSettings.updateInventory` | `commitSettings.updateInventory.${number}.lineItemId` | `recipientInfo.added` | `recipientInfo.changedDetails.recipientInfoBeforeChange.address.streetAddress.number` | `recipientInfo.changedDetails.recipientInfoBeforeChange.address.streetAddress.name` | `recipientInfo.changedDetails.recipientInfoBeforeChange.contactDetails.vatId._id` | `recipientInfo.changedDetails.recipientInfoBeforeChange.contactDetails.vatId.type` | `recipientInfo.removed` | `taxInfo.totalTax.amount` | `taxInfo.totalTax.formattedAmount` | `taxInfo.taxBreakdown` | `taxInfo.taxBreakdown.${number}.taxName` | `taxInfo.taxBreakdown.${number}.taxType` | `taxInfo.taxBreakdown.${number}.jurisdiction` | `taxInfo.taxBreakdown.${number}.jurisdictionType` | `taxInfo.taxBreakdown.${number}.rate` | `buyerDetails.added` | `buyerDetails.changedDetails.buyerInfoBeforeChange.visitorId` | `buyerDetails.changedDetails.buyerInfoBeforeChange.memberId` | `buyerDetails.removed` | `billingDetails.added` | `billingDetails.changedDetails.billingInfoBeforeChange.address.streetAddress.number` | `billingDetails.changedDetails.billingInfoBeforeChange.address.streetAddress.name` | `billingDetails.changedDetails.billingInfoBeforeChange.contactDetails.vatId._id` | `billingDetails.changedDetails.billingInfoBeforeChange.contactDetails.vatId.type` | `billingDetails.removed` | `businessLocationDetails.added` | `businessLocationDetails.changedDetails.businessLocationBeforeChange._id` | `businessLocationDetails.changedDetails.businessLocationBeforeChange.name` | `businessLocationDetails.removed`;
|
|
3871
4107
|
/**
|
|
3872
|
-
* Creates or
|
|
4108
|
+
* Creates or retrieves a draft order based on the specified order ID.
|
|
3873
4109
|
*
|
|
3874
|
-
* When passing the ID of an order that is already in draft, the existing draft order
|
|
3875
|
-
* To complete a draft and update the order, call Commit Draft Order
|
|
3876
|
-
* @param orderId -
|
|
4110
|
+
* When passing the ID of an order that is already in draft, the existing draft order is returned.
|
|
4111
|
+
* To complete a draft and update the original order, call Commit Draft Order.
|
|
4112
|
+
* @param orderId - ID of the order to create a draft for.
|
|
3877
4113
|
* @public
|
|
3878
4114
|
* @documentationMaturity preview
|
|
3879
4115
|
* @requiredField orderId
|
|
@@ -3882,6 +4118,8 @@ type DraftOrderNonNullablePaths = `lineItems` | `lineItems.${number}.added` | `l
|
|
|
3882
4118
|
* @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
3883
4119
|
* @permissionScope Manage Stores - all permissions
|
|
3884
4120
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4121
|
+
* @permissionScope Manage Stores
|
|
4122
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3885
4123
|
* @permissionScope Manage Restaurants - all permissions
|
|
3886
4124
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3887
4125
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3894,6 +4132,8 @@ export declare function createDraftOrder(orderId: string): Promise<NonNullablePa
|
|
|
3894
4132
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
3895
4133
|
/**
|
|
3896
4134
|
* Creates an empty draft order.
|
|
4135
|
+
*
|
|
4136
|
+
* After all relevant details are applied, call Create Order From Draft to convert the draft order to a regular order.
|
|
3897
4137
|
* @public
|
|
3898
4138
|
* @documentationMaturity preview
|
|
3899
4139
|
* @permissionId ECOM.DRAFT_ORDERS_CREATE
|
|
@@ -3901,6 +4141,8 @@ export declare function createDraftOrder(orderId: string): Promise<NonNullablePa
|
|
|
3901
4141
|
* @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
3902
4142
|
* @permissionScope Manage Stores - all permissions
|
|
3903
4143
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4144
|
+
* @permissionScope Manage Stores
|
|
4145
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3904
4146
|
* @permissionScope Manage Restaurants - all permissions
|
|
3905
4147
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3906
4148
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3912,7 +4154,7 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
3912
4154
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3913
4155
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
3914
4156
|
/**
|
|
3915
|
-
* Adds line items to a draft order.
|
|
4157
|
+
* Adds catalog or custom line items to a draft order.
|
|
3916
4158
|
* @param draftOrderId - Draft order ID.
|
|
3917
4159
|
* @public
|
|
3918
4160
|
* @documentationMaturity preview
|
|
@@ -3921,6 +4163,8 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
3921
4163
|
* @permissionId ECOM.DRAFT_ORDERS_ADD_LINE_ITEMS
|
|
3922
4164
|
* @permissionScope Manage Stores - all permissions
|
|
3923
4165
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4166
|
+
* @permissionScope Manage Stores
|
|
4167
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3924
4168
|
* @permissionScope Manage Restaurants - all permissions
|
|
3925
4169
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3926
4170
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3938,7 +4182,9 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3938
4182
|
*/
|
|
3939
4183
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
3940
4184
|
/**
|
|
3941
|
-
* Custom line items to add to draft order.
|
|
4185
|
+
* Custom line items to add to draft order.
|
|
4186
|
+
*
|
|
4187
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
3942
4188
|
* @maxSize 300
|
|
3943
4189
|
*/
|
|
3944
4190
|
customLineItems?: CustomLineItem[];
|
|
@@ -3946,11 +4192,11 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3946
4192
|
/**
|
|
3947
4193
|
* Updates a draft order's line items.
|
|
3948
4194
|
*
|
|
3949
|
-
*
|
|
4195
|
+
* You can update a line item's quantity, price, and description.
|
|
3950
4196
|
* > **Notes:**
|
|
3951
|
-
* > +
|
|
4197
|
+
* > + Specifying a quantity of `0` will remove the line item.
|
|
3952
4198
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
3953
|
-
* > + Quantity cannot be decreased fulfilled line items. To
|
|
4199
|
+
* > + 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)).
|
|
3954
4200
|
* @param draftOrderId - Draft order ID.
|
|
3955
4201
|
* @param lineItemChanges - Details of changes to apply per line item.
|
|
3956
4202
|
* @public
|
|
@@ -3961,6 +4207,8 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3961
4207
|
* @permissionId ECOM.DRAFT_ORDERS_MODIFY_ITEMS
|
|
3962
4208
|
* @permissionScope Manage Stores - all permissions
|
|
3963
4209
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4210
|
+
* @permissionScope Manage Stores
|
|
4211
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3964
4212
|
* @permissionScope Manage Restaurants - all permissions
|
|
3965
4213
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3966
4214
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3974,11 +4222,12 @@ export declare function updateLineItems(draftOrderId: string, lineItemChanges: N
|
|
|
3974
4222
|
/**
|
|
3975
4223
|
* Applies or unapplies discounts on a draft order.
|
|
3976
4224
|
*
|
|
3977
|
-
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
3978
|
-
* Existing discounts
|
|
4225
|
+
* Unapplied discounts are still part of the draft order, but do not affect balance.
|
|
4226
|
+
* Existing discounts that are not passed in the request will keep their current state.
|
|
3979
4227
|
* @param draftOrderId - Draft order ID.
|
|
3980
|
-
* @param discounts -
|
|
3981
|
-
*
|
|
4228
|
+
* @param discounts - Discounts to set on the draft order.
|
|
4229
|
+
*
|
|
4230
|
+
* Any existing discounts that are not passed will not change.
|
|
3982
4231
|
* @public
|
|
3983
4232
|
* @documentationMaturity preview
|
|
3984
4233
|
* @requiredField discounts
|
|
@@ -3988,6 +4237,8 @@ export declare function updateLineItems(draftOrderId: string, lineItemChanges: N
|
|
|
3988
4237
|
* @permissionId ECOM.DRAFT_ORDERS_SET_DISCOUNTS
|
|
3989
4238
|
* @permissionScope Manage Stores - all permissions
|
|
3990
4239
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4240
|
+
* @permissionScope Manage Stores
|
|
4241
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3991
4242
|
* @permissionScope Manage Restaurants - all permissions
|
|
3992
4243
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3993
4244
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3999,10 +4250,10 @@ export declare function setDiscounts(draftOrderId: string, discounts: NonNullabl
|
|
|
3999
4250
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4000
4251
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4001
4252
|
/**
|
|
4002
|
-
*
|
|
4253
|
+
* Creates custom discounts.
|
|
4003
4254
|
*
|
|
4004
|
-
* Newly
|
|
4005
|
-
* To apply them, use Set Discounts
|
|
4255
|
+
* Newly created discounts are unapplied by default.
|
|
4256
|
+
* To apply them, use Set Discounts.
|
|
4006
4257
|
* @param draftOrderId - Draft order ID.
|
|
4007
4258
|
* @public
|
|
4008
4259
|
* @documentationMaturity preview
|
|
@@ -4013,6 +4264,8 @@ export declare function setDiscounts(draftOrderId: string, discounts: NonNullabl
|
|
|
4013
4264
|
* @permissionId ECOM.DRAFT_ORDERS_ADD_DISCOUNTS
|
|
4014
4265
|
* @permissionScope Manage Stores - all permissions
|
|
4015
4266
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4267
|
+
* @permissionScope Manage Stores
|
|
4268
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4016
4269
|
* @permissionScope Manage Restaurants - all permissions
|
|
4017
4270
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4018
4271
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4025,16 +4278,18 @@ export declare function createCustomDiscounts(draftOrderId: string, options?: No
|
|
|
4025
4278
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4026
4279
|
export interface CreateCustomDiscountsOptions {
|
|
4027
4280
|
/**
|
|
4028
|
-
*
|
|
4281
|
+
* Custom discounts to create.
|
|
4282
|
+
*
|
|
4283
|
+
* Created discounts are not applied by default.
|
|
4029
4284
|
* @minSize 1
|
|
4030
4285
|
* @maxSize 100
|
|
4031
4286
|
*/
|
|
4032
4287
|
discounts?: DiscountOption[];
|
|
4033
4288
|
}
|
|
4034
4289
|
/**
|
|
4035
|
-
*
|
|
4290
|
+
* Removes custom discounts from a draft order.
|
|
4036
4291
|
* @param draftOrderId - Draft order ID.
|
|
4037
|
-
* @param discountIds -
|
|
4292
|
+
* @param discountIds - IDs of the discounts to remove from the draft order.
|
|
4038
4293
|
* @public
|
|
4039
4294
|
* @documentationMaturity preview
|
|
4040
4295
|
* @requiredField discountIds
|
|
@@ -4042,6 +4297,8 @@ export interface CreateCustomDiscountsOptions {
|
|
|
4042
4297
|
* @permissionId ECOM.DRAFT_ORDERS_DELETE_DISCOUNTS
|
|
4043
4298
|
* @permissionScope Manage Stores - all permissions
|
|
4044
4299
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4300
|
+
* @permissionScope Manage Stores
|
|
4301
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4045
4302
|
* @permissionScope Manage Restaurants - all permissions
|
|
4046
4303
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4047
4304
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4055,11 +4312,12 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
4055
4312
|
/**
|
|
4056
4313
|
* Applies or unapplies additional fees on a draft order.
|
|
4057
4314
|
*
|
|
4058
|
-
*
|
|
4059
|
-
* Existing additional fees
|
|
4315
|
+
* Additional fees that are not applied are still part of the draft order, but do not affect balance.
|
|
4316
|
+
* Existing additional fees that are not passed in the request will keep their current state.
|
|
4060
4317
|
* @param draftOrderId - Draft order ID.
|
|
4061
|
-
* @param additionalFees - Additional
|
|
4062
|
-
*
|
|
4318
|
+
* @param additionalFees - Additional fees to set on the draft order.
|
|
4319
|
+
*
|
|
4320
|
+
* Any existing additional fees that are not passed will not change.
|
|
4063
4321
|
* @public
|
|
4064
4322
|
* @documentationMaturity preview
|
|
4065
4323
|
* @requiredField additionalFees
|
|
@@ -4069,6 +4327,8 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
4069
4327
|
* @permissionId ECOM.DRAFT_ORDERS_SET_ADDITIONAL_FEES
|
|
4070
4328
|
* @permissionScope Manage Stores - all permissions
|
|
4071
4329
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4330
|
+
* @permissionScope Manage Stores
|
|
4331
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4072
4332
|
* @permissionScope Manage Restaurants - all permissions
|
|
4073
4333
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4074
4334
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4082,8 +4342,8 @@ export declare function setAdditionalFees(draftOrderId: string, additionalFees:
|
|
|
4082
4342
|
/**
|
|
4083
4343
|
* Creates custom additional fees on a draft order.
|
|
4084
4344
|
*
|
|
4085
|
-
* Newly
|
|
4086
|
-
* To apply them, use Set Additional Fees
|
|
4345
|
+
* Newly created additional fees are not applied by default.
|
|
4346
|
+
* To apply them, use Set Additional Fees.
|
|
4087
4347
|
* @param draftOrderId - Draft order ID.
|
|
4088
4348
|
* @public
|
|
4089
4349
|
* @documentationMaturity preview
|
|
@@ -4094,6 +4354,8 @@ export declare function setAdditionalFees(draftOrderId: string, additionalFees:
|
|
|
4094
4354
|
* @permissionId ECOM.DRAFT_ORDERS_CREATE_ADDITIONAL_FEES
|
|
4095
4355
|
* @permissionScope Manage Stores - all permissions
|
|
4096
4356
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4357
|
+
* @permissionScope Manage Stores
|
|
4358
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4097
4359
|
* @permissionScope Manage Restaurants - all permissions
|
|
4098
4360
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4099
4361
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4106,16 +4368,18 @@ export declare function createCustomAdditionalFees(draftOrderId: string, options
|
|
|
4106
4368
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4107
4369
|
export interface CreateCustomAdditionalFeesOptions {
|
|
4108
4370
|
/**
|
|
4109
|
-
*
|
|
4371
|
+
* Custom additional fees to create.
|
|
4372
|
+
*
|
|
4373
|
+
* Created additional fees are not applied by default.
|
|
4110
4374
|
* @minSize 1
|
|
4111
4375
|
* @maxSize 100
|
|
4112
4376
|
*/
|
|
4113
4377
|
customAdditionalFees?: AdditionalFeeOption[];
|
|
4114
4378
|
}
|
|
4115
4379
|
/**
|
|
4116
|
-
*
|
|
4380
|
+
* Removes custom additional fees from a draft order.
|
|
4117
4381
|
* @param draftOrderId - Draft order ID.
|
|
4118
|
-
* @param customAdditionalFees -
|
|
4382
|
+
* @param customAdditionalFees - IDs of the additional fees to remove from the draft order.
|
|
4119
4383
|
* @public
|
|
4120
4384
|
* @documentationMaturity preview
|
|
4121
4385
|
* @requiredField customAdditionalFees
|
|
@@ -4123,6 +4387,8 @@ export interface CreateCustomAdditionalFeesOptions {
|
|
|
4123
4387
|
* @permissionId ECOM.DRAFT_ORDERS_DELETE_ADDITIONAL_FEES
|
|
4124
4388
|
* @permissionScope Manage Stores - all permissions
|
|
4125
4389
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4390
|
+
* @permissionScope Manage Stores
|
|
4391
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4126
4392
|
* @permissionScope Manage Restaurants - all permissions
|
|
4127
4393
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4128
4394
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4142,6 +4408,8 @@ export declare function deleteCustomAdditionalFees(draftOrderId: string, customA
|
|
|
4142
4408
|
* @permissionId ECOM.DRAFT_ORDERS_SET_SHIPPING_INFO
|
|
4143
4409
|
* @permissionScope Manage Stores - all permissions
|
|
4144
4410
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4411
|
+
* @permissionScope Manage Stores
|
|
4412
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4145
4413
|
* @permissionScope Manage Restaurants - all permissions
|
|
4146
4414
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4147
4415
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4153,7 +4421,11 @@ export declare function setShippingInfo(draftOrderId: string, options?: SetShipp
|
|
|
4153
4421
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4154
4422
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4155
4423
|
export interface SetShippingInfoOptions {
|
|
4156
|
-
/**
|
|
4424
|
+
/**
|
|
4425
|
+
* Shipping info to set on the draft order.
|
|
4426
|
+
*
|
|
4427
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4428
|
+
*/
|
|
4157
4429
|
shippingInfo?: V1ShippingInformation;
|
|
4158
4430
|
}
|
|
4159
4431
|
/**
|
|
@@ -4165,6 +4437,8 @@ export interface SetShippingInfoOptions {
|
|
|
4165
4437
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUYER_INFO
|
|
4166
4438
|
* @permissionScope Manage Stores - all permissions
|
|
4167
4439
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4440
|
+
* @permissionScope Manage Stores
|
|
4441
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4168
4442
|
* @permissionScope Manage Restaurants - all permissions
|
|
4169
4443
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4170
4444
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4176,7 +4450,11 @@ export declare function setBuyerInfo(draftOrderId: string, options?: SetBuyerInf
|
|
|
4176
4450
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4177
4451
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4178
4452
|
export interface SetBuyerInfoOptions {
|
|
4179
|
-
/**
|
|
4453
|
+
/**
|
|
4454
|
+
* Shipping info to set on the draft order.
|
|
4455
|
+
*
|
|
4456
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4457
|
+
*/
|
|
4180
4458
|
buyerInfo?: BuyerInfo;
|
|
4181
4459
|
}
|
|
4182
4460
|
/**
|
|
@@ -4188,6 +4466,8 @@ export interface SetBuyerInfoOptions {
|
|
|
4188
4466
|
* @permissionId ECOM.DRAFT_ORDER_SET_RECIPIENT_INFO
|
|
4189
4467
|
* @permissionScope Manage Stores - all permissions
|
|
4190
4468
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4469
|
+
* @permissionScope Manage Stores
|
|
4470
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4191
4471
|
* @permissionScope Manage Restaurants - all permissions
|
|
4192
4472
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4193
4473
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4199,7 +4479,11 @@ export declare function setRecipientInfo(draftOrderId: string, options?: SetReci
|
|
|
4199
4479
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4200
4480
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4201
4481
|
export interface SetRecipientInfoOptions {
|
|
4202
|
-
/**
|
|
4482
|
+
/**
|
|
4483
|
+
* Recipient address and contact details.
|
|
4484
|
+
*
|
|
4485
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
4486
|
+
*/
|
|
4203
4487
|
recipientInfo?: AddressWithContact;
|
|
4204
4488
|
}
|
|
4205
4489
|
/**
|
|
@@ -4211,6 +4495,8 @@ export interface SetRecipientInfoOptions {
|
|
|
4211
4495
|
* @permissionId ECOM.DRAFT_ORDER_SET_BILLING_INFO
|
|
4212
4496
|
* @permissionScope Manage Stores - all permissions
|
|
4213
4497
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4498
|
+
* @permissionScope Manage Stores
|
|
4499
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4214
4500
|
* @permissionScope Manage Restaurants - all permissions
|
|
4215
4501
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4216
4502
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4222,16 +4508,22 @@ export declare function setBillingInfo(draftOrderId: string, options?: SetBillin
|
|
|
4222
4508
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4223
4509
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4224
4510
|
export interface SetBillingInfoOptions {
|
|
4225
|
-
/**
|
|
4511
|
+
/**
|
|
4512
|
+
* Billing address and contact details.
|
|
4513
|
+
*
|
|
4514
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
4515
|
+
*/
|
|
4226
4516
|
billingInfo?: AddressWithContact;
|
|
4227
4517
|
}
|
|
4228
4518
|
/**
|
|
4229
|
-
*
|
|
4519
|
+
* Retrieves a draft order.
|
|
4520
|
+
*
|
|
4521
|
+
* The retrieved draft order contains the latest calculations:
|
|
4522
|
+
* + Line items, shipping details, and buyer information.
|
|
4523
|
+
* + Tax details and price totals.
|
|
4524
|
+
* + Automatic discounts and automatic additional fees, along with updated eligibility.
|
|
4230
4525
|
*
|
|
4231
|
-
*
|
|
4232
|
-
* Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
|
|
4233
|
-
* Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
|
|
4234
|
-
* When retrieving an already committed draft, it's not recalculated and contains data calculated during commit.
|
|
4526
|
+
* > **Note:** When retrieving a committed draft order, it **is not recalculated**.
|
|
4235
4527
|
* @param draftOrderId - Draft order ID.
|
|
4236
4528
|
* @public
|
|
4237
4529
|
* @documentationMaturity preview
|
|
@@ -4240,6 +4532,8 @@ export interface SetBillingInfoOptions {
|
|
|
4240
4532
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
4241
4533
|
* @permissionScope Manage Stores - all permissions
|
|
4242
4534
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4535
|
+
* @permissionScope Manage Stores
|
|
4536
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4243
4537
|
* @permissionScope Manage Restaurants - all permissions
|
|
4244
4538
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4245
4539
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4251,14 +4545,16 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4251
4545
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4252
4546
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4253
4547
|
/**
|
|
4254
|
-
* Checks whether a draft can be created for
|
|
4255
|
-
* @param orderId - Order
|
|
4548
|
+
* Checks whether a draft can be created for an order.
|
|
4549
|
+
* @param orderId - Order ID.
|
|
4256
4550
|
* @public
|
|
4257
4551
|
* @documentationMaturity preview
|
|
4258
4552
|
* @requiredField orderId
|
|
4259
4553
|
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
4260
4554
|
* @permissionScope Manage Stores - all permissions
|
|
4261
4555
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4556
|
+
* @permissionScope Manage Stores
|
|
4557
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4262
4558
|
* @permissionScope Manage Restaurants - all permissions
|
|
4263
4559
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4264
4560
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4268,10 +4564,13 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4268
4564
|
*/
|
|
4269
4565
|
export declare function getOrderDraftabilityStatus(orderId: string): Promise<NonNullablePaths<GetOrderDraftabilityStatusResponse, `orderId` | `orderDraftable` | `nonDraftableReasons`>>;
|
|
4270
4566
|
/**
|
|
4271
|
-
*
|
|
4567
|
+
* Finalizes a draft order and applies its modifications to the associated order.
|
|
4568
|
+
* You can also control which side-effects are executed on commit.
|
|
4272
4569
|
*
|
|
4273
|
-
*
|
|
4274
|
-
*
|
|
4570
|
+
* > **Notes:**
|
|
4571
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4572
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4573
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4275
4574
|
* @param draftOrderId - Draft order ID.
|
|
4276
4575
|
* @public
|
|
4277
4576
|
* @documentationMaturity preview
|
|
@@ -4280,6 +4579,8 @@ export declare function getOrderDraftabilityStatus(orderId: string): Promise<Non
|
|
|
4280
4579
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
4281
4580
|
* @permissionScope Manage Stores - all permissions
|
|
4282
4581
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4582
|
+
* @permissionScope Manage Stores
|
|
4583
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4283
4584
|
* @permissionScope Manage Restaurants - all permissions
|
|
4284
4585
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4285
4586
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4294,16 +4595,18 @@ export interface CommitDraftOrderOptions {
|
|
|
4294
4595
|
/** Optional side effects to trigger. */
|
|
4295
4596
|
commitSettings?: DraftOrderCommitSettings;
|
|
4296
4597
|
/**
|
|
4297
|
-
* Reason for edit,
|
|
4598
|
+
* Reason for edit, provided by user (optional).
|
|
4298
4599
|
* @maxLength 200
|
|
4299
4600
|
*/
|
|
4300
4601
|
reason?: string | null;
|
|
4301
4602
|
}
|
|
4302
4603
|
/**
|
|
4303
|
-
* Creates a new order while specifying which side-effects are executed.
|
|
4604
|
+
* Creates a new order from a draft, while specifying which side-effects are executed.
|
|
4304
4605
|
*
|
|
4305
|
-
*
|
|
4306
|
-
*
|
|
4606
|
+
* > **Notes:**
|
|
4607
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4608
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4609
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4307
4610
|
* @param draftOrderId - Draft order ID.
|
|
4308
4611
|
* @public
|
|
4309
4612
|
* @documentationMaturity preview
|
|
@@ -4312,6 +4615,8 @@ export interface CommitDraftOrderOptions {
|
|
|
4312
4615
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
4313
4616
|
* @permissionScope Manage Stores - all permissions
|
|
4314
4617
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4618
|
+
* @permissionScope Manage Stores
|
|
4619
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4315
4620
|
* @permissionScope Manage Restaurants - all permissions
|
|
4316
4621
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4317
4622
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4326,7 +4631,7 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4326
4631
|
/** Optional side effects to trigger. */
|
|
4327
4632
|
createSettings?: OrderCreateSettings;
|
|
4328
4633
|
/**
|
|
4329
|
-
* Reason for order creation,
|
|
4634
|
+
* Reason for order creation, provided by user (optional).
|
|
4330
4635
|
* @maxLength 200
|
|
4331
4636
|
*/
|
|
4332
4637
|
reason?: string | null;
|
|
@@ -4336,7 +4641,7 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4336
4641
|
/**
|
|
4337
4642
|
* Deletes a draft order along with all its pending changes.
|
|
4338
4643
|
*
|
|
4339
|
-
* Draft orders
|
|
4644
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
4340
4645
|
* @param draftOrderId - Draft order ID.
|
|
4341
4646
|
* @public
|
|
4342
4647
|
* @documentationMaturity preview
|
|
@@ -4345,6 +4650,8 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4345
4650
|
* @permissionId ECOM.DRAFT_ORDERS_ADMIN_DELETE
|
|
4346
4651
|
* @permissionScope Manage Stores - all permissions
|
|
4347
4652
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4653
|
+
* @permissionScope Manage Stores
|
|
4654
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4348
4655
|
* @permissionScope Manage Restaurants - all permissions
|
|
4349
4656
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4350
4657
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4363,11 +4670,14 @@ export declare function deleteDraftOrder(draftOrderId: string): Promise<void>;
|
|
|
4363
4670
|
* | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
|
|
4364
4671
|
* | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
|
|
4365
4672
|
* | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
|
|
4673
|
+
*
|
|
4366
4674
|
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
4367
4675
|
* @public
|
|
4368
4676
|
* @documentationMaturity preview
|
|
4369
4677
|
* @permissionScope Manage Stores - all permissions
|
|
4370
4678
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4679
|
+
* @permissionScope Manage Stores
|
|
4680
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4371
4681
|
* @permissionScope Manage Restaurants - all permissions
|
|
4372
4682
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4373
4683
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4468,12 +4778,16 @@ export interface DraftOrdersQueryBuilder {
|
|
|
4468
4778
|
* @permissionId ECOM.DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
4469
4779
|
* @permissionScope Manage Stores - all permissions
|
|
4470
4780
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4781
|
+
* @permissionScope Manage Stores
|
|
4782
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4471
4783
|
* @permissionScope Manage Restaurants - all permissions
|
|
4472
4784
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4473
4785
|
* @permissionScope Manage eCommerce - all permissions
|
|
4474
4786
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4475
4787
|
* @permissionScope Manage Stores - all permissions
|
|
4476
4788
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4789
|
+
* @permissionScope Manage Stores
|
|
4790
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4477
4791
|
* @permissionScope Manage Restaurants - all permissions
|
|
4478
4792
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4479
4793
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4491,7 +4805,9 @@ export interface UpdateExtendedFieldsOptions {
|
|
|
4491
4805
|
namespaceData: Record<string, any> | null;
|
|
4492
4806
|
}
|
|
4493
4807
|
/**
|
|
4494
|
-
* Sets
|
|
4808
|
+
* Sets whether a draft order is tax-exempt.
|
|
4809
|
+
*
|
|
4810
|
+
* A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
|
|
4495
4811
|
* @param draftOrderId - Draft order ID.
|
|
4496
4812
|
* @public
|
|
4497
4813
|
* @documentationMaturity preview
|
|
@@ -4501,6 +4817,8 @@ export interface UpdateExtendedFieldsOptions {
|
|
|
4501
4817
|
* @permissionId ECOM.DRAFT_ORDER_SET_TAX_EXEMPTION
|
|
4502
4818
|
* @permissionScope Manage Stores - all permissions
|
|
4503
4819
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4820
|
+
* @permissionScope Manage Stores
|
|
4821
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4504
4822
|
* @permissionScope Manage Restaurants - all permissions
|
|
4505
4823
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4506
4824
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4513,7 +4831,7 @@ export declare function setTaxExemption(draftOrderId: string, options: NonNullab
|
|
|
4513
4831
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4514
4832
|
export interface SetTaxExemptionOptions {
|
|
4515
4833
|
/**
|
|
4516
|
-
*
|
|
4834
|
+
* Whether the draft order is exempt from tax calculations.
|
|
4517
4835
|
*
|
|
4518
4836
|
* Default: `false`
|
|
4519
4837
|
*/
|
|
@@ -4521,6 +4839,8 @@ export interface SetTaxExemptionOptions {
|
|
|
4521
4839
|
}
|
|
4522
4840
|
/**
|
|
4523
4841
|
* Sets business location on a draft order.
|
|
4842
|
+
*
|
|
4843
|
+
* 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.
|
|
4524
4844
|
* @param draftOrderId - Draft order ID.
|
|
4525
4845
|
* @public
|
|
4526
4846
|
* @documentationMaturity preview
|
|
@@ -4529,6 +4849,8 @@ export interface SetTaxExemptionOptions {
|
|
|
4529
4849
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUSINESS_LOCATION
|
|
4530
4850
|
* @permissionScope Manage Stores - all permissions
|
|
4531
4851
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4852
|
+
* @permissionScope Manage Stores
|
|
4853
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4532
4854
|
* @permissionScope Manage Restaurants - all permissions
|
|
4533
4855
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4534
4856
|
* @permissionScope Manage eCommerce - all permissions
|