@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;
|
|
@@ -612,6 +620,11 @@ export interface SubscriptionInfo {
|
|
|
612
620
|
* @immutable
|
|
613
621
|
*/
|
|
614
622
|
subscriptionSettings?: SubscriptionSettings;
|
|
623
|
+
/**
|
|
624
|
+
* Description of the charges that will be applied for subscription.
|
|
625
|
+
* @maxLength 1000
|
|
626
|
+
*/
|
|
627
|
+
chargesDescription?: string | null;
|
|
615
628
|
}
|
|
616
629
|
export interface SubscriptionTitle {
|
|
617
630
|
/**
|
|
@@ -749,6 +762,63 @@ export interface ExtendedFields {
|
|
|
749
762
|
*/
|
|
750
763
|
namespaces?: Record<string, Record<string, any>>;
|
|
751
764
|
}
|
|
765
|
+
export interface ModifierGroup {
|
|
766
|
+
/**
|
|
767
|
+
* Modifier group id.
|
|
768
|
+
* @minLength 1
|
|
769
|
+
* @maxLength 36
|
|
770
|
+
*/
|
|
771
|
+
_id?: string;
|
|
772
|
+
/** Modifier group name. */
|
|
773
|
+
name?: TranslatableString;
|
|
774
|
+
/**
|
|
775
|
+
* List of modifiers in this group.
|
|
776
|
+
* @minSize 1
|
|
777
|
+
* @maxSize 10
|
|
778
|
+
*/
|
|
779
|
+
modifiers?: ItemModifier[];
|
|
780
|
+
}
|
|
781
|
+
export interface TranslatableString {
|
|
782
|
+
/**
|
|
783
|
+
* __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).
|
|
784
|
+
*
|
|
785
|
+
* Min: 1 character.
|
|
786
|
+
* Max: 200 characters.
|
|
787
|
+
* @minLength 1
|
|
788
|
+
* @maxLength 200
|
|
789
|
+
*/
|
|
790
|
+
original?: string;
|
|
791
|
+
/**
|
|
792
|
+
* String translated into the buyer's language.
|
|
793
|
+
*
|
|
794
|
+
* Min: 1 character.
|
|
795
|
+
* Max: 400 characters.
|
|
796
|
+
* Default: Same as `original`.
|
|
797
|
+
* @minLength 1
|
|
798
|
+
* @maxLength 400
|
|
799
|
+
*/
|
|
800
|
+
translated?: string | null;
|
|
801
|
+
}
|
|
802
|
+
export interface ItemModifier {
|
|
803
|
+
/**
|
|
804
|
+
* Modifier ID.
|
|
805
|
+
* @minLength 1
|
|
806
|
+
* @maxLength 36
|
|
807
|
+
*/
|
|
808
|
+
_id?: string;
|
|
809
|
+
/**
|
|
810
|
+
* The quantity of this modifier.
|
|
811
|
+
* @min 1
|
|
812
|
+
* @max 100000
|
|
813
|
+
*/
|
|
814
|
+
quantity?: number | null;
|
|
815
|
+
/** Primary display label for the modifier. */
|
|
816
|
+
label?: TranslatableString;
|
|
817
|
+
/** Optional additional details or clarification for the modifier. */
|
|
818
|
+
details?: TranslatableString;
|
|
819
|
+
/** The price of the modifier. */
|
|
820
|
+
price?: Price;
|
|
821
|
+
}
|
|
752
822
|
export interface ItemChangedDetails {
|
|
753
823
|
/**
|
|
754
824
|
* Line item quantity before change.
|
|
@@ -1086,7 +1156,7 @@ export interface AdditionalFeeDetails {
|
|
|
1086
1156
|
* Supported values:
|
|
1087
1157
|
* + `ORIGINAL_ORDER`: This additional fee is part of the original order.
|
|
1088
1158
|
* + `AUTOMATIC`: User added a catalog item which is configured to have an additional fee.
|
|
1089
|
-
* + `CUSTOM`: This additional fee was created by the
|
|
1159
|
+
* + `CUSTOM`: This additional fee was created by the Create Custom Additional Fees method.
|
|
1090
1160
|
*/
|
|
1091
1161
|
source?: SourceType;
|
|
1092
1162
|
/** Whether this additional fee is applied to the order. */
|
|
@@ -1132,10 +1202,10 @@ export interface AdditionalFee {
|
|
|
1132
1202
|
lineItemIds?: string[];
|
|
1133
1203
|
}
|
|
1134
1204
|
export interface TaxDetails {
|
|
1135
|
-
/**
|
|
1205
|
+
/** Whether the additional fee is taxable. */
|
|
1136
1206
|
taxable?: boolean;
|
|
1137
1207
|
/**
|
|
1138
|
-
* Optional tax group ID to use when calculating tax for this additional fee
|
|
1208
|
+
* Optional tax group ID to use when calculating tax for this additional fee.
|
|
1139
1209
|
* @format GUID
|
|
1140
1210
|
*/
|
|
1141
1211
|
taxGroupId?: string | null;
|
|
@@ -1156,7 +1226,7 @@ export interface DiscountDetails {
|
|
|
1156
1226
|
*
|
|
1157
1227
|
* Supported values:
|
|
1158
1228
|
* + `ORIGINAL_ORDER`: This discount is part of the original order.
|
|
1159
|
-
* + `CUSTOM`: This discount was created by the
|
|
1229
|
+
* + `CUSTOM`: This discount was created by the Create Custom Discounts method.
|
|
1160
1230
|
*/
|
|
1161
1231
|
source?: SourceType;
|
|
1162
1232
|
/** Whether this discount is applied to the order. */
|
|
@@ -1311,9 +1381,13 @@ export interface CreatedByStringOneOf {
|
|
|
1311
1381
|
appId?: string;
|
|
1312
1382
|
}
|
|
1313
1383
|
export declare enum EditingStatus {
|
|
1314
|
-
/** Draft order
|
|
1384
|
+
/** Draft order is being edited. */
|
|
1315
1385
|
DRAFT = "DRAFT",
|
|
1316
|
-
/**
|
|
1386
|
+
/**
|
|
1387
|
+
* Draft order has been committed - No further modifications allowed.
|
|
1388
|
+
*
|
|
1389
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
1390
|
+
*/
|
|
1317
1391
|
COMMITTED = "COMMITTED"
|
|
1318
1392
|
}
|
|
1319
1393
|
export declare enum WeightUnit {
|
|
@@ -1347,7 +1421,7 @@ export interface TaxSummary {
|
|
|
1347
1421
|
}
|
|
1348
1422
|
export interface BalanceSummary {
|
|
1349
1423
|
/**
|
|
1350
|
-
* Amount left to pay for order to be considered paid.
|
|
1424
|
+
* Amount left to pay for the order to be considered paid.
|
|
1351
1425
|
* @readonly
|
|
1352
1426
|
*/
|
|
1353
1427
|
balance?: Balance;
|
|
@@ -1587,31 +1661,33 @@ export interface BusinessLocationChangedDetails {
|
|
|
1587
1661
|
}
|
|
1588
1662
|
export interface CreateDraftOrderRequest {
|
|
1589
1663
|
/**
|
|
1590
|
-
*
|
|
1664
|
+
* ID of the order to create a draft for.
|
|
1591
1665
|
* @format GUID
|
|
1592
1666
|
*/
|
|
1593
1667
|
orderId: string | null;
|
|
1594
1668
|
}
|
|
1595
1669
|
export interface CreateDraftOrderResponse {
|
|
1596
|
-
/** Draft order
|
|
1670
|
+
/** Draft order calculated with the latest changes. */
|
|
1597
1671
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1598
1672
|
/**
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1673
|
+
* Whether the response contains a draft order that existed before request.
|
|
1674
|
+
*
|
|
1675
|
+
* `true`: The draft order already exists and is updated.
|
|
1676
|
+
* `false`: A new draft order is created.
|
|
1601
1677
|
*/
|
|
1602
1678
|
preexistingDraftOrder?: boolean | null;
|
|
1603
1679
|
}
|
|
1604
1680
|
export interface CalculatedDraftOrder {
|
|
1605
|
-
/** Draft order
|
|
1681
|
+
/** Draft order. */
|
|
1606
1682
|
draftOrder?: DraftOrder;
|
|
1607
|
-
/**
|
|
1683
|
+
/** Shipping options. */
|
|
1608
1684
|
shippingOptions?: ShippingOption[];
|
|
1609
1685
|
/** Errors that occurred during calculation. */
|
|
1610
1686
|
calculationErrors?: CalculationErrors;
|
|
1611
1687
|
}
|
|
1612
1688
|
export interface ShippingOption {
|
|
1613
1689
|
/**
|
|
1614
|
-
*
|
|
1690
|
+
* Carrier ID.
|
|
1615
1691
|
* @format GUID
|
|
1616
1692
|
*/
|
|
1617
1693
|
carrierId?: string | null;
|
|
@@ -1627,37 +1703,41 @@ export interface ShippingOption {
|
|
|
1627
1703
|
export interface DeliveryLogistics {
|
|
1628
1704
|
/** When the item is expected to be delivered in free text, e.g "3-5 business days" */
|
|
1629
1705
|
deliveryTime?: string | null;
|
|
1630
|
-
/**
|
|
1706
|
+
/**
|
|
1707
|
+
* Instructions for delivery.
|
|
1708
|
+
*
|
|
1709
|
+
* For example, "Please arrive during business hours."
|
|
1710
|
+
*/
|
|
1631
1711
|
instructions?: string | null;
|
|
1632
|
-
/** Additional pickup details
|
|
1712
|
+
/** Additional pickup details. */
|
|
1633
1713
|
pickupDetails?: PickupDetails;
|
|
1634
|
-
/** Expected delivery time slot
|
|
1714
|
+
/** Expected delivery time slot. */
|
|
1635
1715
|
deliveryTimeSlot?: DeliveryTimeSlot;
|
|
1636
1716
|
}
|
|
1637
1717
|
export interface PickupDetails {
|
|
1638
|
-
/** Pickup address */
|
|
1718
|
+
/** Pickup address. */
|
|
1639
1719
|
address?: Address;
|
|
1640
1720
|
/** Pickup method. */
|
|
1641
1721
|
pickupMethod?: PickupMethod;
|
|
1642
1722
|
}
|
|
1643
1723
|
export declare enum PickupMethod {
|
|
1644
1724
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1645
|
-
/**
|
|
1725
|
+
/** Store pickup. */
|
|
1646
1726
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1647
|
-
/**
|
|
1727
|
+
/** Pickup point. */
|
|
1648
1728
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1649
1729
|
}
|
|
1650
1730
|
export interface DeliveryTimeSlot {
|
|
1651
|
-
/**
|
|
1731
|
+
/** Delivery time slot start time. */
|
|
1652
1732
|
from?: Date | null;
|
|
1653
|
-
/**
|
|
1733
|
+
/** Delivery time slot end time. */
|
|
1654
1734
|
to?: Date | null;
|
|
1655
1735
|
}
|
|
1656
1736
|
export interface ShippingPrice {
|
|
1657
|
-
/**
|
|
1737
|
+
/** Shipping price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */
|
|
1658
1738
|
price?: Price;
|
|
1659
1739
|
/**
|
|
1660
|
-
* Currency of the shipping
|
|
1740
|
+
* 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.
|
|
1661
1741
|
* @format CURRENCY
|
|
1662
1742
|
*/
|
|
1663
1743
|
currency?: string;
|
|
@@ -1786,7 +1866,7 @@ export interface CarrierError {
|
|
|
1786
1866
|
export interface CreateEmptyDraftOrderRequest {
|
|
1787
1867
|
}
|
|
1788
1868
|
export interface CreateEmptyDraftOrderResponse {
|
|
1789
|
-
/** Draft order
|
|
1869
|
+
/** Draft order calculated with the latest changes. */
|
|
1790
1870
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1791
1871
|
}
|
|
1792
1872
|
export interface AddLineItemsToDraftOrderRequest {
|
|
@@ -1801,7 +1881,9 @@ export interface AddLineItemsToDraftOrderRequest {
|
|
|
1801
1881
|
*/
|
|
1802
1882
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
1803
1883
|
/**
|
|
1804
|
-
* Custom line items to add to draft order.
|
|
1884
|
+
* Custom line items to add to draft order.
|
|
1885
|
+
*
|
|
1886
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
1805
1887
|
* @maxSize 300
|
|
1806
1888
|
*/
|
|
1807
1889
|
customLineItems?: CustomLineItem[];
|
|
@@ -1850,7 +1932,9 @@ export interface CustomLineItem {
|
|
|
1850
1932
|
*/
|
|
1851
1933
|
quantity?: number;
|
|
1852
1934
|
/**
|
|
1853
|
-
* Catalog and item reference.
|
|
1935
|
+
* Catalog and item reference.
|
|
1936
|
+
*
|
|
1937
|
+
* Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1854
1938
|
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1855
1939
|
*/
|
|
1856
1940
|
catalogReference?: CatalogReference;
|
|
@@ -1919,7 +2003,7 @@ export declare enum FileType {
|
|
|
1919
2003
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
1920
2004
|
}
|
|
1921
2005
|
export interface AddLineItemsToDraftOrderResponse {
|
|
1922
|
-
/** Draft order
|
|
2006
|
+
/** Draft order calculated with the latest changes. */
|
|
1923
2007
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1924
2008
|
}
|
|
1925
2009
|
export interface UpdateLineItemsRequest {
|
|
@@ -1942,20 +2026,26 @@ export interface LineItemChangeDetails {
|
|
|
1942
2026
|
*/
|
|
1943
2027
|
lineItemId?: string;
|
|
1944
2028
|
/**
|
|
1945
|
-
* The
|
|
2029
|
+
* The line item's new quantity.
|
|
2030
|
+
*
|
|
2031
|
+
* > **Note:** Passing `0` will remove the line item.
|
|
1946
2032
|
* @max 1000000
|
|
1947
2033
|
*/
|
|
1948
2034
|
newQuantity?: number | null;
|
|
1949
2035
|
/**
|
|
1950
|
-
*
|
|
2036
|
+
* New price for 1 unit of the line item.
|
|
1951
2037
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
1952
2038
|
*/
|
|
1953
2039
|
newPrice?: string | null;
|
|
1954
|
-
/**
|
|
2040
|
+
/**
|
|
2041
|
+
* New description for the price.
|
|
2042
|
+
*
|
|
2043
|
+
* For example, when price is `0` but additional details about the actual price are needed - `"Starts at $67"`.
|
|
2044
|
+
*/
|
|
1955
2045
|
newPriceDescription?: PriceDescription;
|
|
1956
2046
|
}
|
|
1957
2047
|
export interface UpdateLineItemsResponse {
|
|
1958
|
-
/** Draft order
|
|
2048
|
+
/** Draft order calculated with the latest changes. */
|
|
1959
2049
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1960
2050
|
}
|
|
1961
2051
|
export interface SetDiscountsRequest {
|
|
@@ -1965,8 +2055,9 @@ export interface SetDiscountsRequest {
|
|
|
1965
2055
|
*/
|
|
1966
2056
|
draftOrderId: string;
|
|
1967
2057
|
/**
|
|
1968
|
-
*
|
|
1969
|
-
*
|
|
2058
|
+
* Discounts to set on the draft order.
|
|
2059
|
+
*
|
|
2060
|
+
* Any existing discounts that are not passed will not change.
|
|
1970
2061
|
* @minSize 1
|
|
1971
2062
|
* @maxSize 320
|
|
1972
2063
|
*/
|
|
@@ -1974,15 +2065,17 @@ export interface SetDiscountsRequest {
|
|
|
1974
2065
|
}
|
|
1975
2066
|
export interface IdAndApplied {
|
|
1976
2067
|
/**
|
|
1977
|
-
* Entity ID.
|
|
2068
|
+
* Entity ID.
|
|
2069
|
+
*
|
|
2070
|
+
* Depending on the context, the value is either a discount ID or an additional fee ID.
|
|
1978
2071
|
* @format GUID
|
|
1979
2072
|
*/
|
|
1980
2073
|
_id?: string;
|
|
1981
|
-
/**
|
|
2074
|
+
/** Whether the discount or additional fee should be applied to the draft order. */
|
|
1982
2075
|
applied?: boolean;
|
|
1983
2076
|
}
|
|
1984
2077
|
export interface SetDiscountsResponse {
|
|
1985
|
-
/** Draft order
|
|
2078
|
+
/** Draft order calculated with the latest changes. */
|
|
1986
2079
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1987
2080
|
}
|
|
1988
2081
|
export interface CreateCustomDiscountsRequest {
|
|
@@ -1992,17 +2085,19 @@ export interface CreateCustomDiscountsRequest {
|
|
|
1992
2085
|
*/
|
|
1993
2086
|
draftOrderId: string;
|
|
1994
2087
|
/**
|
|
1995
|
-
*
|
|
2088
|
+
* Custom discounts to create.
|
|
2089
|
+
*
|
|
2090
|
+
* Created discounts are not applied by default.
|
|
1996
2091
|
* @minSize 1
|
|
1997
2092
|
* @maxSize 100
|
|
1998
2093
|
*/
|
|
1999
2094
|
discounts?: DiscountOption[];
|
|
2000
2095
|
}
|
|
2001
2096
|
export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
2002
|
-
/**
|
|
2097
|
+
/** Amount to discount from the line item price. */
|
|
2003
2098
|
priceAmount?: Price;
|
|
2004
2099
|
/**
|
|
2005
|
-
*
|
|
2100
|
+
* Percentage to discount from the line item price.
|
|
2006
2101
|
* @format DECIMAL_VALUE
|
|
2007
2102
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2008
2103
|
*/
|
|
@@ -2030,8 +2125,9 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2030
2125
|
*/
|
|
2031
2126
|
description?: string | null;
|
|
2032
2127
|
/**
|
|
2033
|
-
*
|
|
2034
|
-
*
|
|
2128
|
+
* Whether to apply the discount to the draft order.
|
|
2129
|
+
*
|
|
2130
|
+
* Default: `false`
|
|
2035
2131
|
*/
|
|
2036
2132
|
applyToDraftOrder?: boolean | null;
|
|
2037
2133
|
/**
|
|
@@ -2042,10 +2138,10 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2042
2138
|
}
|
|
2043
2139
|
/** @oneof */
|
|
2044
2140
|
export interface DiscountOptionDiscountAmountOneOf {
|
|
2045
|
-
/**
|
|
2141
|
+
/** Amount to discount from the line item price. */
|
|
2046
2142
|
priceAmount?: Price;
|
|
2047
2143
|
/**
|
|
2048
|
-
*
|
|
2144
|
+
* Percentage to discount from the line item price.
|
|
2049
2145
|
* @format DECIMAL_VALUE
|
|
2050
2146
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2051
2147
|
*/
|
|
@@ -2053,15 +2149,15 @@ export interface DiscountOptionDiscountAmountOneOf {
|
|
|
2053
2149
|
}
|
|
2054
2150
|
export declare enum DiscountType {
|
|
2055
2151
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
2056
|
-
/** Discount applies to entire order. */
|
|
2152
|
+
/** Discount applies to the entire order. */
|
|
2057
2153
|
GLOBAL = "GLOBAL",
|
|
2058
|
-
/** Discount applies to specific
|
|
2154
|
+
/** Discount applies to a specific item. */
|
|
2059
2155
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2060
|
-
/** Discount applies to shipping
|
|
2156
|
+
/** Discount applies to shipping fee. */
|
|
2061
2157
|
SHIPPING = "SHIPPING"
|
|
2062
2158
|
}
|
|
2063
2159
|
export interface CreateCustomDiscountsResponse {
|
|
2064
|
-
/** Draft order
|
|
2160
|
+
/** Draft order calculated with the latest changes. */
|
|
2065
2161
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2066
2162
|
}
|
|
2067
2163
|
export interface DeleteCustomDiscountsRequest {
|
|
@@ -2071,7 +2167,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2071
2167
|
*/
|
|
2072
2168
|
draftOrderId: string;
|
|
2073
2169
|
/**
|
|
2074
|
-
*
|
|
2170
|
+
* IDs of the discounts to remove from the draft order.
|
|
2075
2171
|
* @format GUID
|
|
2076
2172
|
* @minSize 1
|
|
2077
2173
|
* @maxSize 100
|
|
@@ -2079,7 +2175,7 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2079
2175
|
discountIds: string[];
|
|
2080
2176
|
}
|
|
2081
2177
|
export interface DeleteCustomDiscountsResponse {
|
|
2082
|
-
/** Draft order
|
|
2178
|
+
/** Draft order calculated with the latest changes. */
|
|
2083
2179
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2084
2180
|
}
|
|
2085
2181
|
export interface SetAdditionalFeesRequest {
|
|
@@ -2089,15 +2185,16 @@ export interface SetAdditionalFeesRequest {
|
|
|
2089
2185
|
*/
|
|
2090
2186
|
draftOrderId: string;
|
|
2091
2187
|
/**
|
|
2092
|
-
* Additional
|
|
2093
|
-
*
|
|
2188
|
+
* Additional fees to set on the draft order.
|
|
2189
|
+
*
|
|
2190
|
+
* Any existing additional fees that are not passed will not change.
|
|
2094
2191
|
* @minSize 1
|
|
2095
2192
|
* @maxSize 100
|
|
2096
2193
|
*/
|
|
2097
2194
|
additionalFees: IdAndApplied[];
|
|
2098
2195
|
}
|
|
2099
2196
|
export interface SetAdditionalFeesResponse {
|
|
2100
|
-
/** Draft order
|
|
2197
|
+
/** Draft order calculated with the latest changes. */
|
|
2101
2198
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2102
2199
|
}
|
|
2103
2200
|
export interface CreateCustomAdditionalFeesRequest {
|
|
@@ -2107,7 +2204,9 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2107
2204
|
*/
|
|
2108
2205
|
draftOrderId: string;
|
|
2109
2206
|
/**
|
|
2110
|
-
*
|
|
2207
|
+
* Custom additional fees to create.
|
|
2208
|
+
*
|
|
2209
|
+
* Created additional fees are not applied by default.
|
|
2111
2210
|
* @minSize 1
|
|
2112
2211
|
* @maxSize 100
|
|
2113
2212
|
*/
|
|
@@ -2115,28 +2214,30 @@ export interface CreateCustomAdditionalFeesRequest {
|
|
|
2115
2214
|
}
|
|
2116
2215
|
export interface AdditionalFeeOption {
|
|
2117
2216
|
/**
|
|
2118
|
-
*
|
|
2217
|
+
* Name of the additional fee.
|
|
2119
2218
|
* @minLength 1
|
|
2120
2219
|
* @maxLength 50
|
|
2121
2220
|
*/
|
|
2122
2221
|
name?: string;
|
|
2123
|
-
/**
|
|
2222
|
+
/** Price of the additional fee. */
|
|
2124
2223
|
price?: Price;
|
|
2125
|
-
/** Tax calculation details */
|
|
2224
|
+
/** Tax calculation details. */
|
|
2126
2225
|
taxDetails?: TaxDetails;
|
|
2127
2226
|
/**
|
|
2128
|
-
*
|
|
2129
|
-
*
|
|
2227
|
+
* Whether to apply the additional fee to the draft order.
|
|
2228
|
+
*
|
|
2229
|
+
* Default: `false`
|
|
2130
2230
|
*/
|
|
2131
2231
|
applyToDraftOrder?: boolean | null;
|
|
2132
2232
|
/**
|
|
2133
|
-
* Additional fee
|
|
2233
|
+
* Additional fee unique code (or ID) for future processing.
|
|
2134
2234
|
* @minLength 1
|
|
2135
2235
|
* @maxLength 100
|
|
2136
2236
|
*/
|
|
2137
2237
|
code?: string | null;
|
|
2138
2238
|
/**
|
|
2139
|
-
*
|
|
2239
|
+
* IDs of the line items associated with this additional fee.
|
|
2240
|
+
*
|
|
2140
2241
|
* If no `lineItemIds` are provided, the fee will be associated with the whole order.
|
|
2141
2242
|
* @format GUID
|
|
2142
2243
|
* @maxSize 300
|
|
@@ -2144,7 +2245,7 @@ export interface AdditionalFeeOption {
|
|
|
2144
2245
|
lineItemIds?: string[];
|
|
2145
2246
|
}
|
|
2146
2247
|
export interface CreateCustomAdditionalFeesResponse {
|
|
2147
|
-
/** Draft order
|
|
2248
|
+
/** Draft order calculated with the latest changes. */
|
|
2148
2249
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2149
2250
|
}
|
|
2150
2251
|
export interface DeleteCustomAdditionalFeesRequest {
|
|
@@ -2154,7 +2255,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2154
2255
|
*/
|
|
2155
2256
|
draftOrderId: string;
|
|
2156
2257
|
/**
|
|
2157
|
-
*
|
|
2258
|
+
* IDs of the additional fees to remove from the draft order.
|
|
2158
2259
|
* @format GUID
|
|
2159
2260
|
* @minSize 1
|
|
2160
2261
|
* @maxSize 100
|
|
@@ -2162,7 +2263,7 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2162
2263
|
customAdditionalFees: string[];
|
|
2163
2264
|
}
|
|
2164
2265
|
export interface DeleteCustomAdditionalFeesResponse {
|
|
2165
|
-
/** Draft order
|
|
2266
|
+
/** Draft order calculated with the latest changes. */
|
|
2166
2267
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2167
2268
|
}
|
|
2168
2269
|
export interface SetShippingInfoRequest {
|
|
@@ -2171,11 +2272,15 @@ export interface SetShippingInfoRequest {
|
|
|
2171
2272
|
* @format GUID
|
|
2172
2273
|
*/
|
|
2173
2274
|
draftOrderId: string;
|
|
2174
|
-
/**
|
|
2275
|
+
/**
|
|
2276
|
+
* Shipping info to set on the draft order.
|
|
2277
|
+
*
|
|
2278
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2279
|
+
*/
|
|
2175
2280
|
shippingInfo?: V1ShippingInformation;
|
|
2176
2281
|
}
|
|
2177
2282
|
export interface SetShippingInfoResponse {
|
|
2178
|
-
/** Draft order
|
|
2283
|
+
/** Draft order calculated with the latest changes. */
|
|
2179
2284
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2180
2285
|
}
|
|
2181
2286
|
export interface SetBuyerInfoRequest {
|
|
@@ -2184,11 +2289,15 @@ export interface SetBuyerInfoRequest {
|
|
|
2184
2289
|
* @format GUID
|
|
2185
2290
|
*/
|
|
2186
2291
|
draftOrderId: string;
|
|
2187
|
-
/**
|
|
2292
|
+
/**
|
|
2293
|
+
* Shipping info to set on the draft order.
|
|
2294
|
+
*
|
|
2295
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
2296
|
+
*/
|
|
2188
2297
|
buyerInfo?: BuyerInfo;
|
|
2189
2298
|
}
|
|
2190
2299
|
export interface SetBuyerInfoResponse {
|
|
2191
|
-
/** Draft order
|
|
2300
|
+
/** Draft order calculated with the latest changes. */
|
|
2192
2301
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2193
2302
|
}
|
|
2194
2303
|
export interface SetRecipientInfoRequest {
|
|
@@ -2197,11 +2306,15 @@ export interface SetRecipientInfoRequest {
|
|
|
2197
2306
|
* @format GUID
|
|
2198
2307
|
*/
|
|
2199
2308
|
draftOrderId: string;
|
|
2200
|
-
/**
|
|
2309
|
+
/**
|
|
2310
|
+
* Recipient address and contact details.
|
|
2311
|
+
*
|
|
2312
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
2313
|
+
*/
|
|
2201
2314
|
recipientInfo?: AddressWithContact;
|
|
2202
2315
|
}
|
|
2203
2316
|
export interface SetRecipientInfoResponse {
|
|
2204
|
-
/** Draft order
|
|
2317
|
+
/** Draft order calculated with the latest changes. */
|
|
2205
2318
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2206
2319
|
}
|
|
2207
2320
|
export interface SetBillingInfoRequest {
|
|
@@ -2210,11 +2323,15 @@ export interface SetBillingInfoRequest {
|
|
|
2210
2323
|
* @format GUID
|
|
2211
2324
|
*/
|
|
2212
2325
|
draftOrderId: string;
|
|
2213
|
-
/**
|
|
2326
|
+
/**
|
|
2327
|
+
* Billing address and contact details.
|
|
2328
|
+
*
|
|
2329
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
2330
|
+
*/
|
|
2214
2331
|
billingInfo?: AddressWithContact;
|
|
2215
2332
|
}
|
|
2216
2333
|
export interface SetBillingInfoResponse {
|
|
2217
|
-
/** Draft order
|
|
2334
|
+
/** Draft order calculated with the latest changes. */
|
|
2218
2335
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2219
2336
|
}
|
|
2220
2337
|
/** Deprecated */
|
|
@@ -2229,7 +2346,7 @@ export interface UpdateShippingInfoRequest {
|
|
|
2229
2346
|
}
|
|
2230
2347
|
/** Deprecated */
|
|
2231
2348
|
export interface UpdateShippingInfoResponse {
|
|
2232
|
-
/** Draft order
|
|
2349
|
+
/** Draft order calculated with the latest changes. */
|
|
2233
2350
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2234
2351
|
}
|
|
2235
2352
|
export interface GetDraftOrderRequest {
|
|
@@ -2240,26 +2357,30 @@ export interface GetDraftOrderRequest {
|
|
|
2240
2357
|
draftOrderId: string;
|
|
2241
2358
|
}
|
|
2242
2359
|
export interface GetDraftOrderResponse {
|
|
2243
|
-
/** Draft order
|
|
2360
|
+
/** Draft order calculated with the latest changes. */
|
|
2244
2361
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2245
2362
|
}
|
|
2246
2363
|
export interface GetOrderDraftabilityStatusRequest {
|
|
2247
2364
|
/**
|
|
2248
|
-
* Order
|
|
2365
|
+
* Order ID.
|
|
2249
2366
|
* @format GUID
|
|
2250
2367
|
*/
|
|
2251
2368
|
orderId: string;
|
|
2252
2369
|
}
|
|
2253
2370
|
export interface GetOrderDraftabilityStatusResponse {
|
|
2254
2371
|
/**
|
|
2255
|
-
* Order
|
|
2372
|
+
* Order ID.
|
|
2256
2373
|
* @format GUID
|
|
2257
2374
|
*/
|
|
2258
2375
|
orderId?: string;
|
|
2259
|
-
/**
|
|
2376
|
+
/**
|
|
2377
|
+
* Whether a draft can be created based on the order.
|
|
2378
|
+
*
|
|
2379
|
+
* Default: `false`
|
|
2380
|
+
*/
|
|
2260
2381
|
orderDraftable?: boolean;
|
|
2261
2382
|
/**
|
|
2262
|
-
* Reasons why
|
|
2383
|
+
* Reasons why a draft order cannot be created from the order.
|
|
2263
2384
|
* @maxSize 5
|
|
2264
2385
|
*/
|
|
2265
2386
|
nonDraftableReasons?: NonDraftableReason[];
|
|
@@ -2296,7 +2417,7 @@ export interface CommitDraftOrderRequest {
|
|
|
2296
2417
|
/** Optional side effects to trigger. */
|
|
2297
2418
|
commitSettings?: DraftOrderCommitSettings;
|
|
2298
2419
|
/**
|
|
2299
|
-
* Reason for edit,
|
|
2420
|
+
* Reason for edit, provided by user (optional).
|
|
2300
2421
|
* @maxLength 200
|
|
2301
2422
|
*/
|
|
2302
2423
|
reason?: string | null;
|
|
@@ -3367,7 +3488,7 @@ export interface CreateOrderFromDraftRequest {
|
|
|
3367
3488
|
/** Optional side effects to trigger. */
|
|
3368
3489
|
createSettings?: OrderCreateSettings;
|
|
3369
3490
|
/**
|
|
3370
|
-
* Reason for order creation,
|
|
3491
|
+
* Reason for order creation, provided by user (optional).
|
|
3371
3492
|
* @maxLength 200
|
|
3372
3493
|
*/
|
|
3373
3494
|
reason?: string | null;
|
|
@@ -3393,7 +3514,7 @@ export interface OrderCreateNotifications {
|
|
|
3393
3514
|
sendNotificationsToBusiness?: boolean | null;
|
|
3394
3515
|
}
|
|
3395
3516
|
export interface CreateOrderFromDraftResponse {
|
|
3396
|
-
/**
|
|
3517
|
+
/** Draft order after commit. */
|
|
3397
3518
|
committedDraftOrder?: DraftOrder;
|
|
3398
3519
|
/** Created order. */
|
|
3399
3520
|
createdOrder?: Order;
|
|
@@ -3519,14 +3640,14 @@ export interface SetTaxExemptionRequest {
|
|
|
3519
3640
|
*/
|
|
3520
3641
|
draftOrderId: string;
|
|
3521
3642
|
/**
|
|
3522
|
-
*
|
|
3643
|
+
* Whether the draft order is exempt from tax calculations.
|
|
3523
3644
|
*
|
|
3524
3645
|
* Default: `false`
|
|
3525
3646
|
*/
|
|
3526
3647
|
taxExempt: boolean | null;
|
|
3527
3648
|
}
|
|
3528
3649
|
export interface SetTaxExemptionResponse {
|
|
3529
|
-
/** Draft order
|
|
3650
|
+
/** Draft order calculated with the latest changes. */
|
|
3530
3651
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3531
3652
|
}
|
|
3532
3653
|
export interface SetBusinessLocationRequest {
|
|
@@ -3539,7 +3660,7 @@ export interface SetBusinessLocationRequest {
|
|
|
3539
3660
|
businessLocation?: Location;
|
|
3540
3661
|
}
|
|
3541
3662
|
export interface SetBusinessLocationResponse {
|
|
3542
|
-
/** Draft order
|
|
3663
|
+
/** Draft order calculated with the latest changes. */
|
|
3543
3664
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3544
3665
|
}
|
|
3545
3666
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -3682,13 +3803,127 @@ export declare enum WebhookIdentityType {
|
|
|
3682
3803
|
WIX_USER = "WIX_USER",
|
|
3683
3804
|
APP = "APP"
|
|
3684
3805
|
}
|
|
3806
|
+
export interface BaseEventMetadata {
|
|
3807
|
+
/**
|
|
3808
|
+
* App instance ID.
|
|
3809
|
+
* @format GUID
|
|
3810
|
+
*/
|
|
3811
|
+
instanceId?: string | null;
|
|
3812
|
+
/**
|
|
3813
|
+
* Event type.
|
|
3814
|
+
* @maxLength 150
|
|
3815
|
+
*/
|
|
3816
|
+
eventType?: string;
|
|
3817
|
+
/** The identification type and identity data. */
|
|
3818
|
+
identity?: IdentificationData;
|
|
3819
|
+
}
|
|
3820
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
3821
|
+
/**
|
|
3822
|
+
* Unique event ID.
|
|
3823
|
+
* Allows clients to ignore duplicate webhooks.
|
|
3824
|
+
*/
|
|
3825
|
+
_id?: string;
|
|
3826
|
+
/**
|
|
3827
|
+
* Assumes actions are also always typed to an entity_type
|
|
3828
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
3829
|
+
*/
|
|
3830
|
+
entityFqdn?: string;
|
|
3831
|
+
/**
|
|
3832
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
3833
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
3834
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
3835
|
+
*/
|
|
3836
|
+
slug?: string;
|
|
3837
|
+
/** ID of the entity associated with the event. */
|
|
3838
|
+
entityId?: string;
|
|
3839
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
3840
|
+
eventTime?: Date | null;
|
|
3841
|
+
/**
|
|
3842
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
3843
|
+
* (for example, GDPR).
|
|
3844
|
+
*/
|
|
3845
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
3846
|
+
/** If present, indicates the action that triggered the event. */
|
|
3847
|
+
originatedFrom?: string | null;
|
|
3848
|
+
/**
|
|
3849
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
3850
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
3851
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
3852
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
3853
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
3854
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
3855
|
+
*/
|
|
3856
|
+
entityEventSequence?: string | null;
|
|
3857
|
+
}
|
|
3858
|
+
export interface DraftOrderCreatedEnvelope {
|
|
3859
|
+
entity: DraftOrder;
|
|
3860
|
+
metadata: EventMetadata;
|
|
3861
|
+
}
|
|
3862
|
+
/**
|
|
3863
|
+
* Triggered when a draft order is created.
|
|
3864
|
+
* @permissionScope Manage Stores - all permissions
|
|
3865
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3866
|
+
* @permissionScope Manage Stores
|
|
3867
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3868
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3869
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3870
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3871
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3872
|
+
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
3873
|
+
* @webhook
|
|
3874
|
+
* @eventType wix.ecom.v1.draft_order_created
|
|
3875
|
+
* @slug created
|
|
3876
|
+
* @documentationMaturity preview
|
|
3877
|
+
*/
|
|
3878
|
+
export declare function onDraftOrderCreated(handler: (event: DraftOrderCreatedEnvelope) => void | Promise<void>): void;
|
|
3879
|
+
export interface DraftOrderDeletedEnvelope {
|
|
3880
|
+
metadata: EventMetadata;
|
|
3881
|
+
}
|
|
3882
|
+
/**
|
|
3883
|
+
* Triggered when a draft order is deleted.
|
|
3884
|
+
* @permissionScope Manage Stores - all permissions
|
|
3885
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3886
|
+
* @permissionScope Manage Stores
|
|
3887
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3888
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3889
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3890
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3891
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3892
|
+
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
3893
|
+
* @webhook
|
|
3894
|
+
* @eventType wix.ecom.v1.draft_order_deleted
|
|
3895
|
+
* @slug deleted
|
|
3896
|
+
* @documentationMaturity preview
|
|
3897
|
+
*/
|
|
3898
|
+
export declare function onDraftOrderDeleted(handler: (event: DraftOrderDeletedEnvelope) => void | Promise<void>): void;
|
|
3899
|
+
export interface DraftOrderUpdatedEnvelope {
|
|
3900
|
+
entity: DraftOrder;
|
|
3901
|
+
metadata: EventMetadata;
|
|
3902
|
+
}
|
|
3903
|
+
/**
|
|
3904
|
+
* Triggered when a draft order is updated.
|
|
3905
|
+
* @permissionScope Manage Stores - all permissions
|
|
3906
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3907
|
+
* @permissionScope Manage Stores
|
|
3908
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3909
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
3910
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3911
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
3912
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3913
|
+
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
3914
|
+
* @webhook
|
|
3915
|
+
* @eventType wix.ecom.v1.draft_order_updated
|
|
3916
|
+
* @slug updated
|
|
3917
|
+
* @documentationMaturity preview
|
|
3918
|
+
*/
|
|
3919
|
+
export declare function onDraftOrderUpdated(handler: (event: DraftOrderUpdatedEnvelope) => void | Promise<void>): void;
|
|
3685
3920
|
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`;
|
|
3686
3921
|
/**
|
|
3687
|
-
* Creates or
|
|
3922
|
+
* Creates or retrieves a draft order based on the specified order ID.
|
|
3688
3923
|
*
|
|
3689
|
-
* When passing the ID of an order that is already in draft, the existing draft order
|
|
3690
|
-
* To complete a draft and update the order, call Commit Draft Order
|
|
3691
|
-
* @param orderId -
|
|
3924
|
+
* When passing the ID of an order that is already in draft, the existing draft order is returned.
|
|
3925
|
+
* To complete a draft and update the original order, call Commit Draft Order.
|
|
3926
|
+
* @param orderId - ID of the order to create a draft for.
|
|
3692
3927
|
* @public
|
|
3693
3928
|
* @documentationMaturity preview
|
|
3694
3929
|
* @requiredField orderId
|
|
@@ -3697,6 +3932,8 @@ type DraftOrderNonNullablePaths = `lineItems` | `lineItems.${number}.added` | `l
|
|
|
3697
3932
|
* @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
3698
3933
|
* @permissionScope Manage Stores - all permissions
|
|
3699
3934
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3935
|
+
* @permissionScope Manage Stores
|
|
3936
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3700
3937
|
* @permissionScope Manage Restaurants - all permissions
|
|
3701
3938
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3702
3939
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3709,6 +3946,8 @@ export declare function createDraftOrder(orderId: string): Promise<NonNullablePa
|
|
|
3709
3946
|
}[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`>>;
|
|
3710
3947
|
/**
|
|
3711
3948
|
* Creates an empty draft order.
|
|
3949
|
+
*
|
|
3950
|
+
* After all relevant details are applied, call Create Order From Draft to convert the draft order to a regular order.
|
|
3712
3951
|
* @public
|
|
3713
3952
|
* @documentationMaturity preview
|
|
3714
3953
|
* @permissionId ECOM.DRAFT_ORDERS_CREATE
|
|
@@ -3716,6 +3955,8 @@ export declare function createDraftOrder(orderId: string): Promise<NonNullablePa
|
|
|
3716
3955
|
* @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
3717
3956
|
* @permissionScope Manage Stores - all permissions
|
|
3718
3957
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3958
|
+
* @permissionScope Manage Stores
|
|
3959
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3719
3960
|
* @permissionScope Manage Restaurants - all permissions
|
|
3720
3961
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3721
3962
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3727,7 +3968,7 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
3727
3968
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3728
3969
|
}[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`>>;
|
|
3729
3970
|
/**
|
|
3730
|
-
* Adds line items to a draft order.
|
|
3971
|
+
* Adds catalog or custom line items to a draft order.
|
|
3731
3972
|
* @param draftOrderId - Draft order ID.
|
|
3732
3973
|
* @public
|
|
3733
3974
|
* @documentationMaturity preview
|
|
@@ -3736,6 +3977,8 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
3736
3977
|
* @permissionId ECOM.DRAFT_ORDERS_ADD_LINE_ITEMS
|
|
3737
3978
|
* @permissionScope Manage Stores - all permissions
|
|
3738
3979
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
3980
|
+
* @permissionScope Manage Stores
|
|
3981
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3739
3982
|
* @permissionScope Manage Restaurants - all permissions
|
|
3740
3983
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3741
3984
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3753,7 +3996,9 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3753
3996
|
*/
|
|
3754
3997
|
catalogLineItems?: CatalogReferenceLineItem[];
|
|
3755
3998
|
/**
|
|
3756
|
-
* Custom line items to add to draft order.
|
|
3999
|
+
* Custom line items to add to draft order.
|
|
4000
|
+
*
|
|
4001
|
+
* Custom line items do not trigger the Catalog Service Plugin.
|
|
3757
4002
|
* @maxSize 300
|
|
3758
4003
|
*/
|
|
3759
4004
|
customLineItems?: CustomLineItem[];
|
|
@@ -3761,11 +4006,11 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3761
4006
|
/**
|
|
3762
4007
|
* Updates a draft order's line items.
|
|
3763
4008
|
*
|
|
3764
|
-
*
|
|
4009
|
+
* You can update a line item's quantity, price, and description.
|
|
3765
4010
|
* > **Notes:**
|
|
3766
|
-
* > +
|
|
4011
|
+
* > + Specifying a quantity of `0` will remove the line item.
|
|
3767
4012
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
3768
|
-
* > + Quantity cannot be decreased fulfilled line items. To
|
|
4013
|
+
* > + 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)).
|
|
3769
4014
|
* @param draftOrderId - Draft order ID.
|
|
3770
4015
|
* @param lineItemChanges - Details of changes to apply per line item.
|
|
3771
4016
|
* @public
|
|
@@ -3776,6 +4021,8 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3776
4021
|
* @permissionId ECOM.DRAFT_ORDERS_MODIFY_ITEMS
|
|
3777
4022
|
* @permissionScope Manage Stores - all permissions
|
|
3778
4023
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4024
|
+
* @permissionScope Manage Stores
|
|
4025
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3779
4026
|
* @permissionScope Manage Restaurants - all permissions
|
|
3780
4027
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3781
4028
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3789,11 +4036,12 @@ export declare function updateLineItems(draftOrderId: string, lineItemChanges: N
|
|
|
3789
4036
|
/**
|
|
3790
4037
|
* Applies or unapplies discounts on a draft order.
|
|
3791
4038
|
*
|
|
3792
|
-
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
3793
|
-
* Existing discounts
|
|
4039
|
+
* Unapplied discounts are still part of the draft order, but do not affect balance.
|
|
4040
|
+
* Existing discounts that are not passed in the request will keep their current state.
|
|
3794
4041
|
* @param draftOrderId - Draft order ID.
|
|
3795
|
-
* @param discounts -
|
|
3796
|
-
*
|
|
4042
|
+
* @param discounts - Discounts to set on the draft order.
|
|
4043
|
+
*
|
|
4044
|
+
* Any existing discounts that are not passed will not change.
|
|
3797
4045
|
* @public
|
|
3798
4046
|
* @documentationMaturity preview
|
|
3799
4047
|
* @requiredField discounts
|
|
@@ -3803,6 +4051,8 @@ export declare function updateLineItems(draftOrderId: string, lineItemChanges: N
|
|
|
3803
4051
|
* @permissionId ECOM.DRAFT_ORDERS_SET_DISCOUNTS
|
|
3804
4052
|
* @permissionScope Manage Stores - all permissions
|
|
3805
4053
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4054
|
+
* @permissionScope Manage Stores
|
|
4055
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3806
4056
|
* @permissionScope Manage Restaurants - all permissions
|
|
3807
4057
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3808
4058
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3814,10 +4064,10 @@ export declare function setDiscounts(draftOrderId: string, discounts: NonNullabl
|
|
|
3814
4064
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3815
4065
|
}[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`>>;
|
|
3816
4066
|
/**
|
|
3817
|
-
*
|
|
4067
|
+
* Creates custom discounts.
|
|
3818
4068
|
*
|
|
3819
|
-
* Newly
|
|
3820
|
-
* To apply them, use Set Discounts
|
|
4069
|
+
* Newly created discounts are unapplied by default.
|
|
4070
|
+
* To apply them, use Set Discounts.
|
|
3821
4071
|
* @param draftOrderId - Draft order ID.
|
|
3822
4072
|
* @public
|
|
3823
4073
|
* @documentationMaturity preview
|
|
@@ -3828,6 +4078,8 @@ export declare function setDiscounts(draftOrderId: string, discounts: NonNullabl
|
|
|
3828
4078
|
* @permissionId ECOM.DRAFT_ORDERS_ADD_DISCOUNTS
|
|
3829
4079
|
* @permissionScope Manage Stores - all permissions
|
|
3830
4080
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4081
|
+
* @permissionScope Manage Stores
|
|
4082
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3831
4083
|
* @permissionScope Manage Restaurants - all permissions
|
|
3832
4084
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3833
4085
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3840,16 +4092,18 @@ export declare function createCustomDiscounts(draftOrderId: string, options?: No
|
|
|
3840
4092
|
}[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`>>;
|
|
3841
4093
|
export interface CreateCustomDiscountsOptions {
|
|
3842
4094
|
/**
|
|
3843
|
-
*
|
|
4095
|
+
* Custom discounts to create.
|
|
4096
|
+
*
|
|
4097
|
+
* Created discounts are not applied by default.
|
|
3844
4098
|
* @minSize 1
|
|
3845
4099
|
* @maxSize 100
|
|
3846
4100
|
*/
|
|
3847
4101
|
discounts?: DiscountOption[];
|
|
3848
4102
|
}
|
|
3849
4103
|
/**
|
|
3850
|
-
*
|
|
4104
|
+
* Removes custom discounts from a draft order.
|
|
3851
4105
|
* @param draftOrderId - Draft order ID.
|
|
3852
|
-
* @param discountIds -
|
|
4106
|
+
* @param discountIds - IDs of the discounts to remove from the draft order.
|
|
3853
4107
|
* @public
|
|
3854
4108
|
* @documentationMaturity preview
|
|
3855
4109
|
* @requiredField discountIds
|
|
@@ -3857,6 +4111,8 @@ export interface CreateCustomDiscountsOptions {
|
|
|
3857
4111
|
* @permissionId ECOM.DRAFT_ORDERS_DELETE_DISCOUNTS
|
|
3858
4112
|
* @permissionScope Manage Stores - all permissions
|
|
3859
4113
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4114
|
+
* @permissionScope Manage Stores
|
|
4115
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3860
4116
|
* @permissionScope Manage Restaurants - all permissions
|
|
3861
4117
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3862
4118
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3870,11 +4126,12 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
3870
4126
|
/**
|
|
3871
4127
|
* Applies or unapplies additional fees on a draft order.
|
|
3872
4128
|
*
|
|
3873
|
-
*
|
|
3874
|
-
* Existing additional fees
|
|
4129
|
+
* Additional fees that are not applied are still part of the draft order, but do not affect balance.
|
|
4130
|
+
* Existing additional fees that are not passed in the request will keep their current state.
|
|
3875
4131
|
* @param draftOrderId - Draft order ID.
|
|
3876
|
-
* @param additionalFees - Additional
|
|
3877
|
-
*
|
|
4132
|
+
* @param additionalFees - Additional fees to set on the draft order.
|
|
4133
|
+
*
|
|
4134
|
+
* Any existing additional fees that are not passed will not change.
|
|
3878
4135
|
* @public
|
|
3879
4136
|
* @documentationMaturity preview
|
|
3880
4137
|
* @requiredField additionalFees
|
|
@@ -3884,6 +4141,8 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
3884
4141
|
* @permissionId ECOM.DRAFT_ORDERS_SET_ADDITIONAL_FEES
|
|
3885
4142
|
* @permissionScope Manage Stores - all permissions
|
|
3886
4143
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4144
|
+
* @permissionScope Manage Stores
|
|
4145
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3887
4146
|
* @permissionScope Manage Restaurants - all permissions
|
|
3888
4147
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3889
4148
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3897,8 +4156,8 @@ export declare function setAdditionalFees(draftOrderId: string, additionalFees:
|
|
|
3897
4156
|
/**
|
|
3898
4157
|
* Creates custom additional fees on a draft order.
|
|
3899
4158
|
*
|
|
3900
|
-
* Newly
|
|
3901
|
-
* To apply them, use Set Additional Fees
|
|
4159
|
+
* Newly created additional fees are not applied by default.
|
|
4160
|
+
* To apply them, use Set Additional Fees.
|
|
3902
4161
|
* @param draftOrderId - Draft order ID.
|
|
3903
4162
|
* @public
|
|
3904
4163
|
* @documentationMaturity preview
|
|
@@ -3909,6 +4168,8 @@ export declare function setAdditionalFees(draftOrderId: string, additionalFees:
|
|
|
3909
4168
|
* @permissionId ECOM.DRAFT_ORDERS_CREATE_ADDITIONAL_FEES
|
|
3910
4169
|
* @permissionScope Manage Stores - all permissions
|
|
3911
4170
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4171
|
+
* @permissionScope Manage Stores
|
|
4172
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3912
4173
|
* @permissionScope Manage Restaurants - all permissions
|
|
3913
4174
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3914
4175
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3921,16 +4182,18 @@ export declare function createCustomAdditionalFees(draftOrderId: string, options
|
|
|
3921
4182
|
}[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`>>;
|
|
3922
4183
|
export interface CreateCustomAdditionalFeesOptions {
|
|
3923
4184
|
/**
|
|
3924
|
-
*
|
|
4185
|
+
* Custom additional fees to create.
|
|
4186
|
+
*
|
|
4187
|
+
* Created additional fees are not applied by default.
|
|
3925
4188
|
* @minSize 1
|
|
3926
4189
|
* @maxSize 100
|
|
3927
4190
|
*/
|
|
3928
4191
|
customAdditionalFees?: AdditionalFeeOption[];
|
|
3929
4192
|
}
|
|
3930
4193
|
/**
|
|
3931
|
-
*
|
|
4194
|
+
* Removes custom additional fees from a draft order.
|
|
3932
4195
|
* @param draftOrderId - Draft order ID.
|
|
3933
|
-
* @param customAdditionalFees -
|
|
4196
|
+
* @param customAdditionalFees - IDs of the additional fees to remove from the draft order.
|
|
3934
4197
|
* @public
|
|
3935
4198
|
* @documentationMaturity preview
|
|
3936
4199
|
* @requiredField customAdditionalFees
|
|
@@ -3938,6 +4201,8 @@ export interface CreateCustomAdditionalFeesOptions {
|
|
|
3938
4201
|
* @permissionId ECOM.DRAFT_ORDERS_DELETE_ADDITIONAL_FEES
|
|
3939
4202
|
* @permissionScope Manage Stores - all permissions
|
|
3940
4203
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4204
|
+
* @permissionScope Manage Stores
|
|
4205
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3941
4206
|
* @permissionScope Manage Restaurants - all permissions
|
|
3942
4207
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3943
4208
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3957,6 +4222,8 @@ export declare function deleteCustomAdditionalFees(draftOrderId: string, customA
|
|
|
3957
4222
|
* @permissionId ECOM.DRAFT_ORDERS_SET_SHIPPING_INFO
|
|
3958
4223
|
* @permissionScope Manage Stores - all permissions
|
|
3959
4224
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4225
|
+
* @permissionScope Manage Stores
|
|
4226
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3960
4227
|
* @permissionScope Manage Restaurants - all permissions
|
|
3961
4228
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3962
4229
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3968,7 +4235,11 @@ export declare function setShippingInfo(draftOrderId: string, options?: SetShipp
|
|
|
3968
4235
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3969
4236
|
}[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`>>;
|
|
3970
4237
|
export interface SetShippingInfoOptions {
|
|
3971
|
-
/**
|
|
4238
|
+
/**
|
|
4239
|
+
* Shipping info to set on the draft order.
|
|
4240
|
+
*
|
|
4241
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4242
|
+
*/
|
|
3972
4243
|
shippingInfo?: V1ShippingInformation;
|
|
3973
4244
|
}
|
|
3974
4245
|
/**
|
|
@@ -3980,6 +4251,8 @@ export interface SetShippingInfoOptions {
|
|
|
3980
4251
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUYER_INFO
|
|
3981
4252
|
* @permissionScope Manage Stores - all permissions
|
|
3982
4253
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4254
|
+
* @permissionScope Manage Stores
|
|
4255
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
3983
4256
|
* @permissionScope Manage Restaurants - all permissions
|
|
3984
4257
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3985
4258
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -3991,7 +4264,11 @@ export declare function setBuyerInfo(draftOrderId: string, options?: SetBuyerInf
|
|
|
3991
4264
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3992
4265
|
}[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`>>;
|
|
3993
4266
|
export interface SetBuyerInfoOptions {
|
|
3994
|
-
/**
|
|
4267
|
+
/**
|
|
4268
|
+
* Shipping info to set on the draft order.
|
|
4269
|
+
*
|
|
4270
|
+
* > **Note:** Passing an empty object will remove the existing shipping info.
|
|
4271
|
+
*/
|
|
3995
4272
|
buyerInfo?: BuyerInfo;
|
|
3996
4273
|
}
|
|
3997
4274
|
/**
|
|
@@ -4003,6 +4280,8 @@ export interface SetBuyerInfoOptions {
|
|
|
4003
4280
|
* @permissionId ECOM.DRAFT_ORDER_SET_RECIPIENT_INFO
|
|
4004
4281
|
* @permissionScope Manage Stores - all permissions
|
|
4005
4282
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4283
|
+
* @permissionScope Manage Stores
|
|
4284
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4006
4285
|
* @permissionScope Manage Restaurants - all permissions
|
|
4007
4286
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4008
4287
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4014,7 +4293,11 @@ export declare function setRecipientInfo(draftOrderId: string, options?: SetReci
|
|
|
4014
4293
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4015
4294
|
}[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`>>;
|
|
4016
4295
|
export interface SetRecipientInfoOptions {
|
|
4017
|
-
/**
|
|
4296
|
+
/**
|
|
4297
|
+
* Recipient address and contact details.
|
|
4298
|
+
*
|
|
4299
|
+
* > **Note:** Passing an empty object will remove the existing recipient info.
|
|
4300
|
+
*/
|
|
4018
4301
|
recipientInfo?: AddressWithContact;
|
|
4019
4302
|
}
|
|
4020
4303
|
/**
|
|
@@ -4026,6 +4309,8 @@ export interface SetRecipientInfoOptions {
|
|
|
4026
4309
|
* @permissionId ECOM.DRAFT_ORDER_SET_BILLING_INFO
|
|
4027
4310
|
* @permissionScope Manage Stores - all permissions
|
|
4028
4311
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4312
|
+
* @permissionScope Manage Stores
|
|
4313
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4029
4314
|
* @permissionScope Manage Restaurants - all permissions
|
|
4030
4315
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4031
4316
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4037,16 +4322,22 @@ export declare function setBillingInfo(draftOrderId: string, options?: SetBillin
|
|
|
4037
4322
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4038
4323
|
}[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`>>;
|
|
4039
4324
|
export interface SetBillingInfoOptions {
|
|
4040
|
-
/**
|
|
4325
|
+
/**
|
|
4326
|
+
* Billing address and contact details.
|
|
4327
|
+
*
|
|
4328
|
+
* > **Note:** Passing an empty object will remove the existing billing info.
|
|
4329
|
+
*/
|
|
4041
4330
|
billingInfo?: AddressWithContact;
|
|
4042
4331
|
}
|
|
4043
4332
|
/**
|
|
4044
|
-
*
|
|
4333
|
+
* Retrieves a draft order.
|
|
4334
|
+
*
|
|
4335
|
+
* The retrieved draft order contains the latest calculations:
|
|
4336
|
+
* + Line items, shipping details, and buyer information.
|
|
4337
|
+
* + Tax details and price totals.
|
|
4338
|
+
* + Automatic discounts and automatic additional fees, along with updated eligibility.
|
|
4045
4339
|
*
|
|
4046
|
-
*
|
|
4047
|
-
* Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
|
|
4048
|
-
* Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
|
|
4049
|
-
* When retrieving an already committed draft, it's not recalculated and contains data calculated during commit.
|
|
4340
|
+
* > **Note:** When retrieving a committed draft order, it **is not recalculated**.
|
|
4050
4341
|
* @param draftOrderId - Draft order ID.
|
|
4051
4342
|
* @public
|
|
4052
4343
|
* @documentationMaturity preview
|
|
@@ -4055,6 +4346,8 @@ export interface SetBillingInfoOptions {
|
|
|
4055
4346
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
4056
4347
|
* @permissionScope Manage Stores - all permissions
|
|
4057
4348
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4349
|
+
* @permissionScope Manage Stores
|
|
4350
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4058
4351
|
* @permissionScope Manage Restaurants - all permissions
|
|
4059
4352
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4060
4353
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4066,14 +4359,16 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4066
4359
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4067
4360
|
}[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`>>;
|
|
4068
4361
|
/**
|
|
4069
|
-
* Checks whether a draft can be created for
|
|
4070
|
-
* @param orderId - Order
|
|
4362
|
+
* Checks whether a draft can be created for an order.
|
|
4363
|
+
* @param orderId - Order ID.
|
|
4071
4364
|
* @public
|
|
4072
4365
|
* @documentationMaturity preview
|
|
4073
4366
|
* @requiredField orderId
|
|
4074
4367
|
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
4075
4368
|
* @permissionScope Manage Stores - all permissions
|
|
4076
4369
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4370
|
+
* @permissionScope Manage Stores
|
|
4371
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4077
4372
|
* @permissionScope Manage Restaurants - all permissions
|
|
4078
4373
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4079
4374
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4083,10 +4378,13 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4083
4378
|
*/
|
|
4084
4379
|
export declare function getOrderDraftabilityStatus(orderId: string): Promise<NonNullablePaths<GetOrderDraftabilityStatusResponse, `orderId` | `orderDraftable` | `nonDraftableReasons`>>;
|
|
4085
4380
|
/**
|
|
4086
|
-
*
|
|
4381
|
+
* Finalizes a draft order and applies its modifications to the associated order.
|
|
4382
|
+
* You can also control which side-effects are executed on commit.
|
|
4087
4383
|
*
|
|
4088
|
-
*
|
|
4089
|
-
*
|
|
4384
|
+
* > **Notes:**
|
|
4385
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4386
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4387
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4090
4388
|
* @param draftOrderId - Draft order ID.
|
|
4091
4389
|
* @public
|
|
4092
4390
|
* @documentationMaturity preview
|
|
@@ -4095,6 +4393,8 @@ export declare function getOrderDraftabilityStatus(orderId: string): Promise<Non
|
|
|
4095
4393
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
4096
4394
|
* @permissionScope Manage Stores - all permissions
|
|
4097
4395
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4396
|
+
* @permissionScope Manage Stores
|
|
4397
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4098
4398
|
* @permissionScope Manage Restaurants - all permissions
|
|
4099
4399
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4100
4400
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4109,16 +4409,18 @@ export interface CommitDraftOrderOptions {
|
|
|
4109
4409
|
/** Optional side effects to trigger. */
|
|
4110
4410
|
commitSettings?: DraftOrderCommitSettings;
|
|
4111
4411
|
/**
|
|
4112
|
-
* Reason for edit,
|
|
4412
|
+
* Reason for edit, provided by user (optional).
|
|
4113
4413
|
* @maxLength 200
|
|
4114
4414
|
*/
|
|
4115
4415
|
reason?: string | null;
|
|
4116
4416
|
}
|
|
4117
4417
|
/**
|
|
4118
|
-
* Creates a new order while specifying which side-effects are executed.
|
|
4418
|
+
* Creates a new order from a draft, while specifying which side-effects are executed.
|
|
4119
4419
|
*
|
|
4120
|
-
*
|
|
4121
|
-
*
|
|
4420
|
+
* > **Notes:**
|
|
4421
|
+
* > + The draft order's status is set to `COMMITTED`.
|
|
4422
|
+
* > + Commiting a draft order cannot be undone or reverted.
|
|
4423
|
+
* > + A committed draft order does not allow for further modifications. However, it is kept for reference and can be retrieved.
|
|
4122
4424
|
* @param draftOrderId - Draft order ID.
|
|
4123
4425
|
* @public
|
|
4124
4426
|
* @documentationMaturity preview
|
|
@@ -4127,6 +4429,8 @@ export interface CommitDraftOrderOptions {
|
|
|
4127
4429
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
4128
4430
|
* @permissionScope Manage Stores - all permissions
|
|
4129
4431
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4432
|
+
* @permissionScope Manage Stores
|
|
4433
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4130
4434
|
* @permissionScope Manage Restaurants - all permissions
|
|
4131
4435
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4132
4436
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4141,7 +4445,7 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4141
4445
|
/** Optional side effects to trigger. */
|
|
4142
4446
|
createSettings?: OrderCreateSettings;
|
|
4143
4447
|
/**
|
|
4144
|
-
* Reason for order creation,
|
|
4448
|
+
* Reason for order creation, provided by user (optional).
|
|
4145
4449
|
* @maxLength 200
|
|
4146
4450
|
*/
|
|
4147
4451
|
reason?: string | null;
|
|
@@ -4151,7 +4455,7 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4151
4455
|
/**
|
|
4152
4456
|
* Deletes a draft order along with all its pending changes.
|
|
4153
4457
|
*
|
|
4154
|
-
* Draft orders
|
|
4458
|
+
* Draft orders with status 'COMMITTED' cannot be deleted.
|
|
4155
4459
|
* @param draftOrderId - Draft order ID.
|
|
4156
4460
|
* @public
|
|
4157
4461
|
* @documentationMaturity preview
|
|
@@ -4160,6 +4464,8 @@ export interface CreateOrderFromDraftOptions {
|
|
|
4160
4464
|
* @permissionId ECOM.DRAFT_ORDERS_ADMIN_DELETE
|
|
4161
4465
|
* @permissionScope Manage Stores - all permissions
|
|
4162
4466
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4467
|
+
* @permissionScope Manage Stores
|
|
4468
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4163
4469
|
* @permissionScope Manage Restaurants - all permissions
|
|
4164
4470
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4165
4471
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4178,11 +4484,14 @@ export declare function deleteDraftOrder(draftOrderId: string): Promise<void>;
|
|
|
4178
4484
|
* | `_updatedDate` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `lt()`, `le()`, `gt()`, `ge()` | Sortable |
|
|
4179
4485
|
* | `status` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()` | Sortable |
|
|
4180
4486
|
* | `orderId` | `eq()`, `ne()`, `exists()`, `in()`, `hasSome()`, `startsWith()` | |
|
|
4487
|
+
*
|
|
4181
4488
|
* To learn how to query draft orders, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
|
|
4182
4489
|
* @public
|
|
4183
4490
|
* @documentationMaturity preview
|
|
4184
4491
|
* @permissionScope Manage Stores - all permissions
|
|
4185
4492
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4493
|
+
* @permissionScope Manage Stores
|
|
4494
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4186
4495
|
* @permissionScope Manage Restaurants - all permissions
|
|
4187
4496
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4188
4497
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4283,12 +4592,16 @@ export interface DraftOrdersQueryBuilder {
|
|
|
4283
4592
|
* @permissionId ECOM.DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
4284
4593
|
* @permissionScope Manage Stores - all permissions
|
|
4285
4594
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4595
|
+
* @permissionScope Manage Stores
|
|
4596
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4286
4597
|
* @permissionScope Manage Restaurants - all permissions
|
|
4287
4598
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4288
4599
|
* @permissionScope Manage eCommerce - all permissions
|
|
4289
4600
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4290
4601
|
* @permissionScope Manage Stores - all permissions
|
|
4291
4602
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4603
|
+
* @permissionScope Manage Stores
|
|
4604
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4292
4605
|
* @permissionScope Manage Restaurants - all permissions
|
|
4293
4606
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4294
4607
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4306,7 +4619,9 @@ export interface UpdateExtendedFieldsOptions {
|
|
|
4306
4619
|
namespaceData: Record<string, any> | null;
|
|
4307
4620
|
}
|
|
4308
4621
|
/**
|
|
4309
|
-
* Sets
|
|
4622
|
+
* Sets whether a draft order is tax-exempt.
|
|
4623
|
+
*
|
|
4624
|
+
* A tax exempted draft order ignores taxes during calculation. Tax information will return empty.
|
|
4310
4625
|
* @param draftOrderId - Draft order ID.
|
|
4311
4626
|
* @public
|
|
4312
4627
|
* @documentationMaturity preview
|
|
@@ -4316,6 +4631,8 @@ export interface UpdateExtendedFieldsOptions {
|
|
|
4316
4631
|
* @permissionId ECOM.DRAFT_ORDER_SET_TAX_EXEMPTION
|
|
4317
4632
|
* @permissionScope Manage Stores - all permissions
|
|
4318
4633
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4634
|
+
* @permissionScope Manage Stores
|
|
4635
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4319
4636
|
* @permissionScope Manage Restaurants - all permissions
|
|
4320
4637
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4321
4638
|
* @permissionScope Manage eCommerce - all permissions
|
|
@@ -4328,7 +4645,7 @@ export declare function setTaxExemption(draftOrderId: string, options: NonNullab
|
|
|
4328
4645
|
}[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`>>;
|
|
4329
4646
|
export interface SetTaxExemptionOptions {
|
|
4330
4647
|
/**
|
|
4331
|
-
*
|
|
4648
|
+
* Whether the draft order is exempt from tax calculations.
|
|
4332
4649
|
*
|
|
4333
4650
|
* Default: `false`
|
|
4334
4651
|
*/
|
|
@@ -4336,6 +4653,8 @@ export interface SetTaxExemptionOptions {
|
|
|
4336
4653
|
}
|
|
4337
4654
|
/**
|
|
4338
4655
|
* Sets business location on a draft order.
|
|
4656
|
+
*
|
|
4657
|
+
* 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.
|
|
4339
4658
|
* @param draftOrderId - Draft order ID.
|
|
4340
4659
|
* @public
|
|
4341
4660
|
* @documentationMaturity preview
|
|
@@ -4344,6 +4663,8 @@ export interface SetTaxExemptionOptions {
|
|
|
4344
4663
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUSINESS_LOCATION
|
|
4345
4664
|
* @permissionScope Manage Stores - all permissions
|
|
4346
4665
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4666
|
+
* @permissionScope Manage Stores
|
|
4667
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4347
4668
|
* @permissionScope Manage Restaurants - all permissions
|
|
4348
4669
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4349
4670
|
* @permissionScope Manage eCommerce - all permissions
|