@wix/auto_sdk_ecom_draft-orders 1.0.21 → 1.0.23
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 +3 -2
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.context.js +3 -1
- 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 +40 -25
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.http.js +153 -26
- 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.meta.d.ts +3 -0
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.js +20 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.meta.js.map +1 -1
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +82 -52
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.public.js +16 -10
- 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 +290 -102
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.types.js +23 -9
- 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 +475 -169
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +581 -92
- 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 +3 -2
- package/build/es/src/ecom-v1-draft-order-draft-orders.context.js +2 -1
- 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 +40 -25
- package/build/es/src/ecom-v1-draft-order-draft-orders.http.js +151 -25
- 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.meta.d.ts +3 -0
- package/build/es/src/ecom-v1-draft-order-draft-orders.meta.js +18 -0
- package/build/es/src/ecom-v1-draft-order-draft-orders.meta.js.map +1 -1
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +82 -52
- package/build/es/src/ecom-v1-draft-order-draft-orders.public.js +14 -9
- 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 +290 -102
- package/build/es/src/ecom-v1-draft-order-draft-orders.types.js +23 -9
- 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 +475 -169
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +578 -91
- 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 +3 -2
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.context.js +3 -1
- 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 +40 -25
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.http.js +153 -26
- 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.meta.d.ts +3 -0
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.js +20 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.meta.js.map +1 -1
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.d.ts +82 -52
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.public.js +16 -10
- 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 +290 -102
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.types.js +23 -9
- 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 +370 -339
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +581 -92
- 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 +3 -2
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.context.js +2 -1
- 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 +40 -25
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.http.js +151 -25
- 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.meta.d.ts +3 -0
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.js +18 -0
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.meta.js.map +1 -1
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.d.ts +82 -52
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.public.js +14 -9
- 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 +290 -102
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.types.js +23 -9
- 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 +370 -339
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +578 -91
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -27,14 +27,14 @@ export interface DraftOrder {
|
|
|
27
27
|
/**
|
|
28
28
|
* Buyer information.
|
|
29
29
|
* @deprecated Buyer information.
|
|
30
|
-
* @replacedBy
|
|
30
|
+
* @replacedBy buyer_details
|
|
31
31
|
* @targetRemovalDate 2024-08-30
|
|
32
32
|
*/
|
|
33
33
|
buyerInfo?: BuyerInfo;
|
|
34
34
|
/**
|
|
35
35
|
* Billing address and contact details.
|
|
36
36
|
* @deprecated Billing address and contact details.
|
|
37
|
-
* @replacedBy
|
|
37
|
+
* @replacedBy billing_details
|
|
38
38
|
* @targetRemovalDate 2024-08-30
|
|
39
39
|
*/
|
|
40
40
|
billingInfo?: AddressWithContact;
|
|
@@ -111,7 +111,16 @@ export interface DraftOrder {
|
|
|
111
111
|
* @format GUID
|
|
112
112
|
*/
|
|
113
113
|
purchaseFlowId?: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Order recipient address and contact details.
|
|
116
|
+
*
|
|
117
|
+
* This field may differ from the address in `shippingInfo.logistics` when:
|
|
118
|
+
* + The chosen shipping option is pickup point or store pickup.
|
|
119
|
+
* + No shipping option is selected.
|
|
120
|
+
*/
|
|
114
121
|
recipientInfo?: RecipientInfoDetails;
|
|
122
|
+
/** Tax information. */
|
|
123
|
+
taxInfo?: OrderTaxInfo;
|
|
115
124
|
/**
|
|
116
125
|
* Custom field data for the draft order object.
|
|
117
126
|
* [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.
|
|
@@ -120,13 +129,11 @@ export interface DraftOrder {
|
|
|
120
129
|
/**
|
|
121
130
|
* Buyer information.
|
|
122
131
|
* Includes details about changes when relevant.
|
|
123
|
-
* @internal
|
|
124
132
|
*/
|
|
125
133
|
buyerDetails?: BuyerDetails;
|
|
126
134
|
/**
|
|
127
135
|
* Billing address and contact details.
|
|
128
136
|
* Includes details about changes when relevant.
|
|
129
|
-
* @internal
|
|
130
137
|
*/
|
|
131
138
|
billingDetails?: BillingDetails;
|
|
132
139
|
/**
|
|
@@ -292,10 +299,7 @@ export interface OrderLineItem {
|
|
|
292
299
|
* @maxSize 5
|
|
293
300
|
*/
|
|
294
301
|
locations?: LocationAndQuantity[];
|
|
295
|
-
/**
|
|
296
|
-
* Address used for tax calculation.
|
|
297
|
-
* @internal
|
|
298
|
-
*/
|
|
302
|
+
/** Address used for tax calculation. */
|
|
299
303
|
taxableAddress?: TaxableAddress;
|
|
300
304
|
/**
|
|
301
305
|
* ID of the app managing the inventory.
|
|
@@ -1123,6 +1127,7 @@ export interface AdditionalFeeDetails {
|
|
|
1123
1127
|
*
|
|
1124
1128
|
* Supported values:
|
|
1125
1129
|
* + `ORIGINAL_ORDER`: This additional fee is part of the original order.
|
|
1130
|
+
* + `AUTOMATIC`: User added a catalog item which is configured to have an additional fee.
|
|
1126
1131
|
* + `CUSTOM`: This additional fee was created by the [Create Custom Additional Fees](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/draft-orders/create-custom-additional-fees) API.
|
|
1127
1132
|
*/
|
|
1128
1133
|
source?: SourceType;
|
|
@@ -1186,11 +1191,11 @@ export interface TaxDetails {
|
|
|
1186
1191
|
taxGroupId?: string | null;
|
|
1187
1192
|
}
|
|
1188
1193
|
export declare enum SourceType {
|
|
1189
|
-
/** Part of the original order */
|
|
1194
|
+
/** Part of the original order. */
|
|
1190
1195
|
ORIGINAL_ORDER = "ORIGINAL_ORDER",
|
|
1191
|
-
/** Added by
|
|
1196
|
+
/** Added automatically, as the result of recalculation caused by changes in draft order. */
|
|
1192
1197
|
AUTOMATIC = "AUTOMATIC",
|
|
1193
|
-
/** Added manually to
|
|
1198
|
+
/** Added manually to draft order. */
|
|
1194
1199
|
CUSTOM = "CUSTOM"
|
|
1195
1200
|
}
|
|
1196
1201
|
export interface DiscountDetails {
|
|
@@ -1371,9 +1376,9 @@ export interface CreatedByStringOneOf {
|
|
|
1371
1376
|
appId?: string;
|
|
1372
1377
|
}
|
|
1373
1378
|
export declare enum EditingStatus {
|
|
1374
|
-
/**
|
|
1379
|
+
/** Draft order can be modified and committed. */
|
|
1375
1380
|
DRAFT = "DRAFT",
|
|
1376
|
-
/**
|
|
1381
|
+
/** Draft order is already committed. No further modifications allowed. */
|
|
1377
1382
|
COMMITTED = "COMMITTED"
|
|
1378
1383
|
}
|
|
1379
1384
|
export declare enum WeightUnit {
|
|
@@ -1411,6 +1416,18 @@ export interface BalanceSummary {
|
|
|
1411
1416
|
* @readonly
|
|
1412
1417
|
*/
|
|
1413
1418
|
balance?: Balance;
|
|
1419
|
+
/**
|
|
1420
|
+
* Sum of all approved and successful payments.
|
|
1421
|
+
*
|
|
1422
|
+
* The value includes payments that have subsequently been fully or partially refunded.
|
|
1423
|
+
* @readonly
|
|
1424
|
+
*/
|
|
1425
|
+
paid?: Price;
|
|
1426
|
+
/**
|
|
1427
|
+
* Sum of all successfully refunded payments.
|
|
1428
|
+
* @readonly
|
|
1429
|
+
*/
|
|
1430
|
+
refunded?: Price;
|
|
1414
1431
|
/**
|
|
1415
1432
|
* Sum of all authorized payments.
|
|
1416
1433
|
* @readonly
|
|
@@ -1550,97 +1567,49 @@ export interface OrderTaxBreakdown {
|
|
|
1550
1567
|
aggregatedTaxAmount?: Price;
|
|
1551
1568
|
}
|
|
1552
1569
|
export interface BuyerDetails extends BuyerDetailsChangeTypeOneOf {
|
|
1553
|
-
/**
|
|
1554
|
-
* Indicates that buyer information was added during draft.
|
|
1555
|
-
* @internal
|
|
1556
|
-
*/
|
|
1570
|
+
/** Indicates that buyer information was added during draft. */
|
|
1557
1571
|
added?: boolean;
|
|
1558
|
-
/**
|
|
1559
|
-
* Indicates that buyer information was changed. Contains billing information before draft.
|
|
1560
|
-
* @internal
|
|
1561
|
-
*/
|
|
1572
|
+
/** Indicates that buyer information was changed. Contains billing information before draft. */
|
|
1562
1573
|
changedDetails?: BuyerChangedDetails;
|
|
1563
|
-
/**
|
|
1564
|
-
* Indicates that buyer information was removed during draft.
|
|
1565
|
-
* @internal
|
|
1566
|
-
*/
|
|
1574
|
+
/** Indicates that buyer information was removed during draft. */
|
|
1567
1575
|
removed?: boolean;
|
|
1568
|
-
/**
|
|
1569
|
-
* Buyer information.
|
|
1570
|
-
* @internal
|
|
1571
|
-
*/
|
|
1576
|
+
/** Buyer information. */
|
|
1572
1577
|
buyerInfo?: BuyerInfo;
|
|
1573
1578
|
}
|
|
1574
1579
|
/** @oneof */
|
|
1575
1580
|
export interface BuyerDetailsChangeTypeOneOf {
|
|
1576
|
-
/**
|
|
1577
|
-
* Indicates that buyer information was added during draft.
|
|
1578
|
-
* @internal
|
|
1579
|
-
*/
|
|
1581
|
+
/** Indicates that buyer information was added during draft. */
|
|
1580
1582
|
added?: boolean;
|
|
1581
|
-
/**
|
|
1582
|
-
* Indicates that buyer information was changed. Contains billing information before draft.
|
|
1583
|
-
* @internal
|
|
1584
|
-
*/
|
|
1583
|
+
/** Indicates that buyer information was changed. Contains billing information before draft. */
|
|
1585
1584
|
changedDetails?: BuyerChangedDetails;
|
|
1586
|
-
/**
|
|
1587
|
-
* Indicates that buyer information was removed during draft.
|
|
1588
|
-
* @internal
|
|
1589
|
-
*/
|
|
1585
|
+
/** Indicates that buyer information was removed during draft. */
|
|
1590
1586
|
removed?: boolean;
|
|
1591
1587
|
}
|
|
1592
1588
|
export interface BuyerChangedDetails {
|
|
1593
|
-
/**
|
|
1594
|
-
* Buyer information before draft.
|
|
1595
|
-
* @internal
|
|
1596
|
-
*/
|
|
1589
|
+
/** Buyer information before draft. */
|
|
1597
1590
|
buyerInfoBeforeChange?: BuyerInfo;
|
|
1598
1591
|
}
|
|
1599
1592
|
export interface BillingDetails extends BillingDetailsChangeTypeOneOf {
|
|
1600
|
-
/**
|
|
1601
|
-
* Indicates that billing information was added during draft.
|
|
1602
|
-
* @internal
|
|
1603
|
-
*/
|
|
1593
|
+
/** Indicates that billing information was added during draft. */
|
|
1604
1594
|
added?: boolean;
|
|
1605
|
-
/**
|
|
1606
|
-
* Indicates that billing information was changed. Contains billing information before draft.
|
|
1607
|
-
* @internal
|
|
1608
|
-
*/
|
|
1595
|
+
/** Indicates that billing information was changed. Contains billing information before draft. */
|
|
1609
1596
|
changedDetails?: BillingChangedDetails;
|
|
1610
|
-
/**
|
|
1611
|
-
* Indicates that billing information was removed during draft.
|
|
1612
|
-
* @internal
|
|
1613
|
-
*/
|
|
1597
|
+
/** Indicates that billing information was removed during draft. */
|
|
1614
1598
|
removed?: boolean;
|
|
1615
|
-
/**
|
|
1616
|
-
* Billing address and contact details.
|
|
1617
|
-
* @internal
|
|
1618
|
-
*/
|
|
1599
|
+
/** Billing address and contact details. */
|
|
1619
1600
|
billingInfo?: AddressWithContact;
|
|
1620
1601
|
}
|
|
1621
1602
|
/** @oneof */
|
|
1622
1603
|
export interface BillingDetailsChangeTypeOneOf {
|
|
1623
|
-
/**
|
|
1624
|
-
* Indicates that billing information was added during draft.
|
|
1625
|
-
* @internal
|
|
1626
|
-
*/
|
|
1604
|
+
/** Indicates that billing information was added during draft. */
|
|
1627
1605
|
added?: boolean;
|
|
1628
|
-
/**
|
|
1629
|
-
* Indicates that billing information was changed. Contains billing information before draft.
|
|
1630
|
-
* @internal
|
|
1631
|
-
*/
|
|
1606
|
+
/** Indicates that billing information was changed. Contains billing information before draft. */
|
|
1632
1607
|
changedDetails?: BillingChangedDetails;
|
|
1633
|
-
/**
|
|
1634
|
-
* Indicates that billing information was removed during draft.
|
|
1635
|
-
* @internal
|
|
1636
|
-
*/
|
|
1608
|
+
/** Indicates that billing information was removed during draft. */
|
|
1637
1609
|
removed?: boolean;
|
|
1638
1610
|
}
|
|
1639
1611
|
export interface BillingChangedDetails {
|
|
1640
|
-
/**
|
|
1641
|
-
* Billing address and contact details before draft.
|
|
1642
|
-
* @internal
|
|
1643
|
-
*/
|
|
1612
|
+
/** Billing address and contact details before draft. */
|
|
1644
1613
|
billingInfoBeforeChange?: AddressWithContact;
|
|
1645
1614
|
}
|
|
1646
1615
|
export interface BusinessLocationDetails extends BusinessLocationDetailsChangeTypeOneOf {
|
|
@@ -1683,27 +1652,24 @@ export interface BusinessLocationChangedDetails {
|
|
|
1683
1652
|
}
|
|
1684
1653
|
export interface CreateDraftOrderRequest {
|
|
1685
1654
|
/**
|
|
1686
|
-
*
|
|
1655
|
+
* Existing order ID to create draft from.
|
|
1687
1656
|
* @format GUID
|
|
1688
1657
|
*/
|
|
1689
1658
|
orderId: string | null;
|
|
1690
1659
|
}
|
|
1691
1660
|
export interface CreateDraftOrderResponse {
|
|
1692
|
-
/**
|
|
1661
|
+
/** Draft order details calculated with latest content. */
|
|
1693
1662
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1694
1663
|
/**
|
|
1695
|
-
*
|
|
1696
|
-
*
|
|
1664
|
+
* Flag indicating whether response contains draft order that existed before request.
|
|
1665
|
+
* `False` - new draft order was created.
|
|
1697
1666
|
*/
|
|
1698
1667
|
preexistingDraftOrder?: boolean | null;
|
|
1699
1668
|
}
|
|
1700
1669
|
export interface CalculatedDraftOrder {
|
|
1701
|
-
/**
|
|
1702
|
-
* The draft order full details with calculations based on it's content.
|
|
1703
|
-
* Discount and additional fee options are also included.
|
|
1704
|
-
*/
|
|
1670
|
+
/** Draft order full details with calculations based on it's content. */
|
|
1705
1671
|
draftOrder?: DraftOrder;
|
|
1706
|
-
/**
|
|
1672
|
+
/** Order shipping options. */
|
|
1707
1673
|
shippingOptions?: ShippingOption[];
|
|
1708
1674
|
/** Errors that occurred during calculation. */
|
|
1709
1675
|
calculationErrors?: CalculationErrors;
|
|
@@ -1736,18 +1702,14 @@ export interface DeliveryLogistics {
|
|
|
1736
1702
|
export interface PickupDetails {
|
|
1737
1703
|
/** Pickup address */
|
|
1738
1704
|
address?: Address;
|
|
1739
|
-
/**
|
|
1740
|
-
* Pickup method.
|
|
1741
|
-
*
|
|
1742
|
-
* Supported values:
|
|
1743
|
-
* + `"STORE_PICKUP"`
|
|
1744
|
-
* + `"PICKUP_POINT"`
|
|
1745
|
-
*/
|
|
1705
|
+
/** Pickup method. */
|
|
1746
1706
|
pickupMethod?: PickupMethod;
|
|
1747
1707
|
}
|
|
1748
1708
|
export declare enum PickupMethod {
|
|
1749
1709
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1710
|
+
/** Pickup is from the merchant's brick and mortar store. */
|
|
1750
1711
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1712
|
+
/** Item is shipped to a specified pickup point. */
|
|
1751
1713
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1752
1714
|
}
|
|
1753
1715
|
export interface DeliveryTimeSlot {
|
|
@@ -1889,12 +1851,12 @@ export interface CarrierError {
|
|
|
1889
1851
|
export interface CreateEmptyDraftOrderRequest {
|
|
1890
1852
|
}
|
|
1891
1853
|
export interface CreateEmptyDraftOrderResponse {
|
|
1892
|
-
/**
|
|
1854
|
+
/** Draft order details calculated with latest content. */
|
|
1893
1855
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1894
1856
|
}
|
|
1895
1857
|
export interface AddLineItemsToDraftOrderRequest {
|
|
1896
1858
|
/**
|
|
1897
|
-
*
|
|
1859
|
+
* Draft order ID.
|
|
1898
1860
|
* @format GUID
|
|
1899
1861
|
*/
|
|
1900
1862
|
draftOrderId: string;
|
|
@@ -1910,7 +1872,10 @@ export interface AddLineItemsToDraftOrderRequest {
|
|
|
1910
1872
|
customLineItems?: CustomLineItem[];
|
|
1911
1873
|
}
|
|
1912
1874
|
export interface CatalogReferenceLineItem {
|
|
1913
|
-
/**
|
|
1875
|
+
/**
|
|
1876
|
+
* Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1877
|
+
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1878
|
+
*/
|
|
1914
1879
|
catalogReference?: CatalogReference;
|
|
1915
1880
|
/**
|
|
1916
1881
|
* Item quantity.
|
|
@@ -1920,6 +1885,12 @@ export interface CatalogReferenceLineItem {
|
|
|
1920
1885
|
quantity?: number;
|
|
1921
1886
|
/** Item price override. */
|
|
1922
1887
|
price?: Price;
|
|
1888
|
+
/**
|
|
1889
|
+
* Whether the price is not yet defined, and will be updated after the order is created.
|
|
1890
|
+
*
|
|
1891
|
+
* Default: `false`
|
|
1892
|
+
*/
|
|
1893
|
+
priceUndetermined?: boolean;
|
|
1923
1894
|
/**
|
|
1924
1895
|
* Line item locations.
|
|
1925
1896
|
*
|
|
@@ -1943,7 +1914,10 @@ export interface CustomLineItem {
|
|
|
1943
1914
|
* @max 100000
|
|
1944
1915
|
*/
|
|
1945
1916
|
quantity?: number;
|
|
1946
|
-
/**
|
|
1917
|
+
/**
|
|
1918
|
+
* Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1919
|
+
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1920
|
+
*/
|
|
1947
1921
|
catalogReference?: CatalogReference;
|
|
1948
1922
|
/**
|
|
1949
1923
|
* Item name.
|
|
@@ -2010,35 +1984,35 @@ export declare enum FileType {
|
|
|
2010
1984
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
2011
1985
|
}
|
|
2012
1986
|
export interface AddLineItemsToDraftOrderResponse {
|
|
2013
|
-
/**
|
|
1987
|
+
/** Draft order details calculated with latest content. */
|
|
2014
1988
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2015
1989
|
}
|
|
2016
1990
|
export interface UpdateLineItemsRequest {
|
|
2017
1991
|
/**
|
|
2018
|
-
*
|
|
1992
|
+
* Draft order ID.
|
|
2019
1993
|
* @format GUID
|
|
2020
1994
|
*/
|
|
2021
1995
|
draftOrderId: string;
|
|
2022
1996
|
/**
|
|
2023
|
-
* Details of changes to apply per line item
|
|
1997
|
+
* Details of changes to apply per line item.
|
|
2024
1998
|
* @minSize 1
|
|
2025
1999
|
* @maxSize 300
|
|
2026
2000
|
*/
|
|
2027
|
-
lineItemChanges
|
|
2001
|
+
lineItemChanges: LineItemChangeDetails[];
|
|
2028
2002
|
}
|
|
2029
2003
|
export interface LineItemChangeDetails {
|
|
2030
2004
|
/**
|
|
2031
|
-
*
|
|
2005
|
+
* Line item ID.
|
|
2032
2006
|
* @format GUID
|
|
2033
2007
|
*/
|
|
2034
2008
|
lineItemId?: string;
|
|
2035
2009
|
/**
|
|
2036
|
-
* The new quantity for the line item.
|
|
2010
|
+
* The new quantity for the line item. Quantity zero removes the line item.
|
|
2037
2011
|
* @max 1000000
|
|
2038
2012
|
*/
|
|
2039
2013
|
newQuantity?: number | null;
|
|
2040
2014
|
/**
|
|
2041
|
-
* The new price for 1 unit of the line item
|
|
2015
|
+
* The new price for 1 unit of the line item.
|
|
2042
2016
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
2043
2017
|
*/
|
|
2044
2018
|
newPrice?: string | null;
|
|
@@ -2046,63 +2020,59 @@ export interface LineItemChangeDetails {
|
|
|
2046
2020
|
newPriceDescription?: PriceDescription;
|
|
2047
2021
|
}
|
|
2048
2022
|
export interface UpdateLineItemsResponse {
|
|
2049
|
-
/**
|
|
2023
|
+
/** Draft order details calculated with latest content. */
|
|
2050
2024
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2051
2025
|
}
|
|
2052
2026
|
export interface SetDiscountsRequest {
|
|
2053
2027
|
/**
|
|
2054
|
-
*
|
|
2028
|
+
* Draft order ID.
|
|
2055
2029
|
* @format GUID
|
|
2056
2030
|
*/
|
|
2057
2031
|
draftOrderId: string;
|
|
2058
2032
|
/**
|
|
2059
|
-
*
|
|
2033
|
+
* Discount IDs to apply/unapply.
|
|
2034
|
+
* Existing discounts, not mentioned in request, will keep their current state.
|
|
2060
2035
|
* @minSize 1
|
|
2036
|
+
* @maxSize 320
|
|
2061
2037
|
*/
|
|
2062
2038
|
discounts: IdAndApplied[];
|
|
2063
2039
|
}
|
|
2064
2040
|
export interface IdAndApplied {
|
|
2065
|
-
/**
|
|
2041
|
+
/**
|
|
2042
|
+
* Entity ID. Depending on context, it's either discount or additional fee ID.
|
|
2043
|
+
* @format GUID
|
|
2044
|
+
*/
|
|
2066
2045
|
_id?: string;
|
|
2067
|
-
/**
|
|
2046
|
+
/** Flag indicating whether entity (discount/additional fee) should be applied to a draft order. */
|
|
2068
2047
|
applied?: boolean;
|
|
2069
2048
|
}
|
|
2070
2049
|
export interface SetDiscountsResponse {
|
|
2071
|
-
/**
|
|
2050
|
+
/** Draft order details calculated with latest content. */
|
|
2072
2051
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2073
2052
|
}
|
|
2074
2053
|
export interface CreateCustomDiscountsRequest {
|
|
2075
2054
|
/**
|
|
2076
|
-
*
|
|
2055
|
+
* Draft order ID.
|
|
2077
2056
|
* @format GUID
|
|
2078
2057
|
*/
|
|
2079
2058
|
draftOrderId: string;
|
|
2080
2059
|
/**
|
|
2081
|
-
*
|
|
2060
|
+
* Discounts to create. Created discounts are unapplied by default.
|
|
2082
2061
|
* @minSize 1
|
|
2083
2062
|
* @maxSize 100
|
|
2084
2063
|
*/
|
|
2085
2064
|
discounts?: DiscountOption[];
|
|
2086
2065
|
}
|
|
2087
2066
|
export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
2088
|
-
/**
|
|
2089
|
-
* Discount price amount.
|
|
2090
|
-
* @internal
|
|
2091
|
-
*/
|
|
2067
|
+
/** Discount price amount. */
|
|
2092
2068
|
priceAmount?: Price;
|
|
2093
2069
|
/**
|
|
2094
2070
|
* Discount percentage amount.
|
|
2095
|
-
* @internal
|
|
2096
2071
|
* @format DECIMAL_VALUE
|
|
2097
2072
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2098
2073
|
*/
|
|
2099
2074
|
percentage?: string | null;
|
|
2100
|
-
/**
|
|
2101
|
-
* Discount type.
|
|
2102
|
-
* * `"GLOBAL"` - discount applies to entire order.
|
|
2103
|
-
* * `"SPECIFIC-ITEMS"` - discount applies to a specific item.
|
|
2104
|
-
* * `"SHIPPING"` - discount applies to shipping. For example, free shipping.
|
|
2105
|
-
*/
|
|
2075
|
+
/** Discount type. */
|
|
2106
2076
|
discountType?: DiscountType;
|
|
2107
2077
|
/**
|
|
2108
2078
|
* ID of line item discount applies to.
|
|
@@ -2126,20 +2096,21 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
2126
2096
|
description?: string | null;
|
|
2127
2097
|
/**
|
|
2128
2098
|
* Should opt-in the added discount. default = false.
|
|
2129
|
-
* if not set or false, then to opt-in them, please call SetDiscounts with the added discounts
|
|
2099
|
+
* if not set or false, then to opt-in them, please call SetDiscounts with the added discounts IDs.
|
|
2130
2100
|
*/
|
|
2131
2101
|
applyToDraftOrder?: boolean | null;
|
|
2102
|
+
/**
|
|
2103
|
+
* Line items the discount applies to.
|
|
2104
|
+
* @maxSize 1
|
|
2105
|
+
*/
|
|
2106
|
+
lineItemDiscounts?: LineItemDiscount[];
|
|
2132
2107
|
}
|
|
2133
2108
|
/** @oneof */
|
|
2134
2109
|
export interface DiscountOptionDiscountAmountOneOf {
|
|
2135
|
-
/**
|
|
2136
|
-
* Discount price amount.
|
|
2137
|
-
* @internal
|
|
2138
|
-
*/
|
|
2110
|
+
/** Discount price amount. */
|
|
2139
2111
|
priceAmount?: Price;
|
|
2140
2112
|
/**
|
|
2141
2113
|
* Discount percentage amount.
|
|
2142
|
-
* @internal
|
|
2143
2114
|
* @format DECIMAL_VALUE
|
|
2144
2115
|
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2145
2116
|
*/
|
|
@@ -2147,22 +2118,25 @@ export interface DiscountOptionDiscountAmountOneOf {
|
|
|
2147
2118
|
}
|
|
2148
2119
|
export declare enum DiscountType {
|
|
2149
2120
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
2121
|
+
/** Discount applies to entire order. */
|
|
2150
2122
|
GLOBAL = "GLOBAL",
|
|
2123
|
+
/** Discount applies to specific items. */
|
|
2151
2124
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2125
|
+
/** Discount applies to shipping. For example, free shipping. */
|
|
2152
2126
|
SHIPPING = "SHIPPING"
|
|
2153
2127
|
}
|
|
2154
2128
|
export interface CreateCustomDiscountsResponse {
|
|
2155
|
-
/**
|
|
2129
|
+
/** Draft order details calculated with latest content. */
|
|
2156
2130
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2157
2131
|
}
|
|
2158
2132
|
export interface DeleteCustomDiscountsRequest {
|
|
2159
2133
|
/**
|
|
2160
|
-
*
|
|
2134
|
+
* Draft order ID.
|
|
2161
2135
|
* @format GUID
|
|
2162
2136
|
*/
|
|
2163
2137
|
draftOrderId: string;
|
|
2164
2138
|
/**
|
|
2165
|
-
*
|
|
2139
|
+
* Ids of discounts to remove.
|
|
2166
2140
|
* @format GUID
|
|
2167
2141
|
* @minSize 1
|
|
2168
2142
|
* @maxSize 100
|
|
@@ -2170,34 +2144,35 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
2170
2144
|
discountIds: string[];
|
|
2171
2145
|
}
|
|
2172
2146
|
export interface DeleteCustomDiscountsResponse {
|
|
2173
|
-
/**
|
|
2147
|
+
/** Draft order details calculated with latest content. */
|
|
2174
2148
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2175
2149
|
}
|
|
2176
2150
|
export interface SetAdditionalFeesRequest {
|
|
2177
2151
|
/**
|
|
2178
|
-
*
|
|
2152
|
+
* Draft order ID.
|
|
2179
2153
|
* @format GUID
|
|
2180
2154
|
*/
|
|
2181
2155
|
draftOrderId: string;
|
|
2182
2156
|
/**
|
|
2183
|
-
*
|
|
2157
|
+
* Additional fee IDs to apply/unapply.
|
|
2158
|
+
* Existing additional fees, not mentioned in this list, will keep their current state.
|
|
2184
2159
|
* @minSize 1
|
|
2185
2160
|
* @maxSize 100
|
|
2186
2161
|
*/
|
|
2187
2162
|
additionalFees: IdAndApplied[];
|
|
2188
2163
|
}
|
|
2189
2164
|
export interface SetAdditionalFeesResponse {
|
|
2190
|
-
/**
|
|
2165
|
+
/** Draft order details calculated with latest content. */
|
|
2191
2166
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2192
2167
|
}
|
|
2193
2168
|
export interface CreateCustomAdditionalFeesRequest {
|
|
2194
2169
|
/**
|
|
2195
|
-
*
|
|
2170
|
+
* Draft order ID.
|
|
2196
2171
|
* @format GUID
|
|
2197
2172
|
*/
|
|
2198
2173
|
draftOrderId: string;
|
|
2199
2174
|
/**
|
|
2200
|
-
* The additional fees to
|
|
2175
|
+
* The additional fees to create. Created fees are unapplied by default.
|
|
2201
2176
|
* @minSize 1
|
|
2202
2177
|
* @maxSize 100
|
|
2203
2178
|
*/
|
|
@@ -2216,7 +2191,7 @@ export interface AdditionalFeeOption {
|
|
|
2216
2191
|
taxDetails?: TaxDetails;
|
|
2217
2192
|
/**
|
|
2218
2193
|
* Should apply the additional fee. default = false.
|
|
2219
|
-
* if not set or false, then to apply them, please call ApplyAdditionalFees with the added additional fee
|
|
2194
|
+
* if not set or false, then to apply them, please call ApplyAdditionalFees with the added additional fee IDs.
|
|
2220
2195
|
*/
|
|
2221
2196
|
applyToDraftOrder?: boolean | null;
|
|
2222
2197
|
/**
|
|
@@ -2225,19 +2200,26 @@ export interface AdditionalFeeOption {
|
|
|
2225
2200
|
* @maxLength 100
|
|
2226
2201
|
*/
|
|
2227
2202
|
code?: string | null;
|
|
2203
|
+
/**
|
|
2204
|
+
* Optional - Line items associated with this additional fee.
|
|
2205
|
+
* If no `lineItemIds` are provided, the fee will be associated with the whole order.
|
|
2206
|
+
* @format GUID
|
|
2207
|
+
* @maxSize 300
|
|
2208
|
+
*/
|
|
2209
|
+
lineItemIds?: string[];
|
|
2228
2210
|
}
|
|
2229
2211
|
export interface CreateCustomAdditionalFeesResponse {
|
|
2230
|
-
/**
|
|
2212
|
+
/** Draft order details calculated with latest content. */
|
|
2231
2213
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2232
2214
|
}
|
|
2233
2215
|
export interface DeleteCustomAdditionalFeesRequest {
|
|
2234
2216
|
/**
|
|
2235
|
-
*
|
|
2217
|
+
* Draft order ID.
|
|
2236
2218
|
* @format GUID
|
|
2237
2219
|
*/
|
|
2238
2220
|
draftOrderId: string;
|
|
2239
2221
|
/**
|
|
2240
|
-
*
|
|
2222
|
+
* Ids of additional fees to remove.
|
|
2241
2223
|
* @format GUID
|
|
2242
2224
|
* @minSize 1
|
|
2243
2225
|
* @maxSize 100
|
|
@@ -2245,157 +2227,138 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2245
2227
|
customAdditionalFees: string[];
|
|
2246
2228
|
}
|
|
2247
2229
|
export interface DeleteCustomAdditionalFeesResponse {
|
|
2248
|
-
/**
|
|
2230
|
+
/** Draft order details calculated with latest content. */
|
|
2249
2231
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2250
2232
|
}
|
|
2251
2233
|
export interface SetShippingInfoRequest {
|
|
2252
2234
|
/**
|
|
2253
|
-
*
|
|
2254
|
-
* @internal
|
|
2235
|
+
* Draft order ID.
|
|
2255
2236
|
* @format GUID
|
|
2256
2237
|
*/
|
|
2257
2238
|
draftOrderId: string;
|
|
2258
|
-
/**
|
|
2259
|
-
* The shipping info to be set. If passed empty value - value will be reset
|
|
2260
|
-
* @internal
|
|
2261
|
-
*/
|
|
2239
|
+
/** Shipping information. Empty value removes shipping information from draft. */
|
|
2262
2240
|
shippingInfo?: V1ShippingInformation;
|
|
2263
2241
|
}
|
|
2264
2242
|
export interface SetShippingInfoResponse {
|
|
2265
|
-
/**
|
|
2266
|
-
* The draft order details calculated with updated shipping info
|
|
2267
|
-
* @internal
|
|
2268
|
-
*/
|
|
2243
|
+
/** Draft order details calculated with latest content. */
|
|
2269
2244
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2270
2245
|
}
|
|
2271
2246
|
export interface SetBuyerInfoRequest {
|
|
2272
2247
|
/**
|
|
2273
|
-
*
|
|
2274
|
-
* @internal
|
|
2248
|
+
* Draft order ID.
|
|
2275
2249
|
* @format GUID
|
|
2276
2250
|
*/
|
|
2277
2251
|
draftOrderId: string;
|
|
2278
|
-
/**
|
|
2279
|
-
* Buyer information. If passed empty value - value will be reset
|
|
2280
|
-
* @internal
|
|
2281
|
-
*/
|
|
2252
|
+
/** Buyer information. Empty value removes buyer information from draft. */
|
|
2282
2253
|
buyerInfo?: BuyerInfo;
|
|
2283
2254
|
}
|
|
2284
2255
|
export interface SetBuyerInfoResponse {
|
|
2285
|
-
/**
|
|
2286
|
-
* The draft order details calculated with updated buyer info
|
|
2287
|
-
* @internal
|
|
2288
|
-
*/
|
|
2256
|
+
/** Draft order details calculated with latest content. */
|
|
2289
2257
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2290
2258
|
}
|
|
2291
2259
|
export interface SetRecipientInfoRequest {
|
|
2292
2260
|
/**
|
|
2293
|
-
*
|
|
2294
|
-
* @internal
|
|
2261
|
+
* Draft order ID.
|
|
2295
2262
|
* @format GUID
|
|
2296
2263
|
*/
|
|
2297
2264
|
draftOrderId: string;
|
|
2298
|
-
/**
|
|
2299
|
-
* Order recipient address and contact details. If passed empty value - value will be reset
|
|
2300
|
-
* @internal
|
|
2301
|
-
*/
|
|
2265
|
+
/** Order recipient address and contact details. Empty value removes recipient information from draft. */
|
|
2302
2266
|
recipientInfo?: AddressWithContact;
|
|
2303
2267
|
}
|
|
2304
2268
|
export interface SetRecipientInfoResponse {
|
|
2305
|
-
/**
|
|
2306
|
-
* The draft order details calculated with updated recipient info
|
|
2307
|
-
* @internal
|
|
2308
|
-
*/
|
|
2269
|
+
/** Draft order details calculated with latest content. */
|
|
2309
2270
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2310
2271
|
}
|
|
2311
2272
|
export interface SetBillingInfoRequest {
|
|
2312
2273
|
/**
|
|
2313
|
-
*
|
|
2314
|
-
* @internal
|
|
2274
|
+
* Draft order ID.
|
|
2315
2275
|
* @format GUID
|
|
2316
2276
|
*/
|
|
2317
2277
|
draftOrderId: string;
|
|
2318
|
-
/**
|
|
2319
|
-
* Billing address and contact details. If passed empty value - value will be reset
|
|
2320
|
-
* @internal
|
|
2321
|
-
*/
|
|
2278
|
+
/** Billing address and contact details. Empty value removes billing information from draft. */
|
|
2322
2279
|
billingInfo?: AddressWithContact;
|
|
2323
2280
|
}
|
|
2324
2281
|
export interface SetBillingInfoResponse {
|
|
2325
|
-
/**
|
|
2326
|
-
* The draft order details calculated with updated billing info
|
|
2327
|
-
* @internal
|
|
2328
|
-
*/
|
|
2282
|
+
/** Draft order details calculated with latest content. */
|
|
2329
2283
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2330
2284
|
}
|
|
2285
|
+
/** Deprecated */
|
|
2331
2286
|
export interface UpdateShippingInfoRequest {
|
|
2332
2287
|
/**
|
|
2333
|
-
*
|
|
2288
|
+
* Draft order ID.
|
|
2334
2289
|
* @format GUID
|
|
2335
2290
|
*/
|
|
2336
2291
|
draftOrderId?: string;
|
|
2337
|
-
/**
|
|
2292
|
+
/** Update the shipping option on the order. If not set then the selected shipping is removed. */
|
|
2338
2293
|
shippingOption?: ShippingOption;
|
|
2339
2294
|
}
|
|
2295
|
+
/** Deprecated */
|
|
2340
2296
|
export interface UpdateShippingInfoResponse {
|
|
2341
|
-
/**
|
|
2297
|
+
/** Draft order details calculated with latest content. */
|
|
2342
2298
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2343
2299
|
}
|
|
2344
2300
|
export interface GetDraftOrderRequest {
|
|
2345
2301
|
/**
|
|
2346
|
-
*
|
|
2302
|
+
* Draft order ID.
|
|
2347
2303
|
* @format GUID
|
|
2348
2304
|
*/
|
|
2349
2305
|
draftOrderId: string;
|
|
2350
2306
|
}
|
|
2351
2307
|
export interface GetDraftOrderResponse {
|
|
2352
|
-
/**
|
|
2308
|
+
/** Draft order details calculated with latest content. */
|
|
2353
2309
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2354
2310
|
}
|
|
2355
2311
|
export interface GetOrderDraftabilityStatusRequest {
|
|
2356
2312
|
/**
|
|
2357
|
-
* Order
|
|
2358
|
-
* @
|
|
2359
|
-
* @maxLength 100
|
|
2313
|
+
* Order Id.
|
|
2314
|
+
* @format GUID
|
|
2360
2315
|
*/
|
|
2361
2316
|
orderId: string;
|
|
2362
2317
|
}
|
|
2363
2318
|
export interface GetOrderDraftabilityStatusResponse {
|
|
2364
2319
|
/**
|
|
2365
|
-
* Order
|
|
2366
|
-
* @
|
|
2367
|
-
* @maxLength 100
|
|
2320
|
+
* Order Id.
|
|
2321
|
+
* @format GUID
|
|
2368
2322
|
*/
|
|
2369
2323
|
orderId?: string;
|
|
2370
|
-
/**
|
|
2324
|
+
/** Flag, indicating whether a draft can be created from this order. */
|
|
2371
2325
|
orderDraftable?: boolean;
|
|
2372
2326
|
/**
|
|
2373
|
-
* Reasons why the order is not draftable
|
|
2327
|
+
* Reasons why the order is not draftable.
|
|
2374
2328
|
* @maxSize 5
|
|
2375
2329
|
*/
|
|
2376
2330
|
nonDraftableReasons?: NonDraftableReason[];
|
|
2377
2331
|
}
|
|
2378
2332
|
export declare enum NonDraftableReason {
|
|
2379
2333
|
UNSPECIFIED = "UNSPECIFIED",
|
|
2334
|
+
/** Modifications of refunded orders are not supported. */
|
|
2380
2335
|
PARTIALLY_OR_FULLY_REFUNDED = "PARTIALLY_OR_FULLY_REFUNDED",
|
|
2336
|
+
/**
|
|
2337
|
+
* Original order must be created via one of the following channel types:
|
|
2338
|
+
* + WEB
|
|
2339
|
+
* + POS
|
|
2340
|
+
* + BACKOFFICE_MERCHANT
|
|
2341
|
+
* + WIX_APP_STORE
|
|
2342
|
+
*/
|
|
2381
2343
|
UNSUPPORTED_CHANNEL_TYPE = "UNSUPPORTED_CHANNEL_TYPE",
|
|
2344
|
+
/** Order status is not APPROVED. */
|
|
2382
2345
|
ORDER_STATUS_IS_NOT_SUPPORTED = "ORDER_STATUS_IS_NOT_SUPPORTED",
|
|
2346
|
+
/** Site and order currencies are different. */
|
|
2383
2347
|
ORDER_AND_SITE_CURRENCIES_ARE_INCONSISTENT = "ORDER_AND_SITE_CURRENCIES_ARE_INCONSISTENT",
|
|
2348
|
+
/** Site and order weight units are different. */
|
|
2384
2349
|
ORDER_AND_SITE_WEIGHT_UNITS_ARE_INCONSISTENT = "ORDER_AND_SITE_WEIGHT_UNITS_ARE_INCONSISTENT",
|
|
2385
|
-
|
|
2386
|
-
/** remove - this is not a reason, it's an error */
|
|
2350
|
+
/** Order not found. */
|
|
2387
2351
|
ORDER_NOT_FOUND = "ORDER_NOT_FOUND",
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
TAXABLE_EXISTING_ADDITIONAL_FEE = "TAXABLE_EXISTING_ADDITIONAL_FEE"
|
|
2352
|
+
/** Modifications of orders with subscription items are not supported. */
|
|
2353
|
+
SUBSCRIPTION_LINE_ITEM_EXISTS = "SUBSCRIPTION_LINE_ITEM_EXISTS"
|
|
2391
2354
|
}
|
|
2392
2355
|
export interface CommitDraftOrderRequest {
|
|
2393
2356
|
/**
|
|
2394
|
-
*
|
|
2357
|
+
* Draft order ID.
|
|
2395
2358
|
* @format GUID
|
|
2396
2359
|
*/
|
|
2397
2360
|
draftOrderId: string;
|
|
2398
|
-
/** Optional side effects to trigger */
|
|
2361
|
+
/** Optional side effects to trigger. */
|
|
2399
2362
|
commitSettings?: DraftOrderCommitSettings;
|
|
2400
2363
|
/**
|
|
2401
2364
|
* Reason for edit, given by user (optional).
|
|
@@ -2404,9 +2367,9 @@ export interface CommitDraftOrderRequest {
|
|
|
2404
2367
|
reason?: string | null;
|
|
2405
2368
|
}
|
|
2406
2369
|
export interface CommitDraftOrderResponse {
|
|
2407
|
-
/**
|
|
2370
|
+
/** Draft order after commit. */
|
|
2408
2371
|
committedDraftOrder?: DraftOrder;
|
|
2409
|
-
/**
|
|
2372
|
+
/** Updated order after commit. */
|
|
2410
2373
|
orderAfterCommit?: Order;
|
|
2411
2374
|
}
|
|
2412
2375
|
export interface Order {
|
|
@@ -3582,33 +3545,22 @@ export interface TagList {
|
|
|
3582
3545
|
}
|
|
3583
3546
|
export interface CreateOrderFromDraftRequest {
|
|
3584
3547
|
/**
|
|
3585
|
-
*
|
|
3586
|
-
* @internal
|
|
3548
|
+
* Draft order ID.
|
|
3587
3549
|
* @format GUID
|
|
3588
3550
|
*/
|
|
3589
3551
|
draftOrderId: string;
|
|
3590
|
-
/**
|
|
3591
|
-
* Optional side effects to trigger
|
|
3592
|
-
* @internal
|
|
3593
|
-
*/
|
|
3552
|
+
/** Optional side effects to trigger. */
|
|
3594
3553
|
createSettings?: OrderCreateSettings;
|
|
3595
3554
|
/**
|
|
3596
3555
|
* Reason for order creation, given by user (optional).
|
|
3597
|
-
* @internal
|
|
3598
3556
|
* @maxLength 200
|
|
3599
3557
|
*/
|
|
3600
3558
|
reason?: string | null;
|
|
3601
|
-
/**
|
|
3602
|
-
* Information about the sales channel that submitted this order
|
|
3603
|
-
* @internal
|
|
3604
|
-
*/
|
|
3559
|
+
/** Information about the sales channel that submitted this order. */
|
|
3605
3560
|
channelInfo?: ChannelInfo;
|
|
3606
3561
|
}
|
|
3607
3562
|
export interface OrderCreateSettings {
|
|
3608
|
-
/**
|
|
3609
|
-
* Notification settings to be applied on order creation
|
|
3610
|
-
* @internal
|
|
3611
|
-
*/
|
|
3563
|
+
/** Notification settings to be applied on order creation */
|
|
3612
3564
|
notifications?: OrderCreateNotifications;
|
|
3613
3565
|
}
|
|
3614
3566
|
export interface OrderCreateNotifications {
|
|
@@ -3616,32 +3568,24 @@ export interface OrderCreateNotifications {
|
|
|
3616
3568
|
* Whether to send notification to the buyer.
|
|
3617
3569
|
*
|
|
3618
3570
|
* Default: `true`
|
|
3619
|
-
* @internal
|
|
3620
3571
|
*/
|
|
3621
3572
|
sendNotificationToBuyer?: boolean | null;
|
|
3622
3573
|
/**
|
|
3623
3574
|
* Whether to send notifications to the business.
|
|
3624
3575
|
*
|
|
3625
3576
|
* Default: `true`
|
|
3626
|
-
* @internal
|
|
3627
3577
|
*/
|
|
3628
3578
|
sendNotificationsToBusiness?: boolean | null;
|
|
3629
3579
|
}
|
|
3630
3580
|
export interface CreateOrderFromDraftResponse {
|
|
3631
|
-
/**
|
|
3632
|
-
* The draft order after commit.
|
|
3633
|
-
* @internal
|
|
3634
|
-
*/
|
|
3581
|
+
/** The draft order after commit. */
|
|
3635
3582
|
committedDraftOrder?: DraftOrder;
|
|
3636
|
-
/**
|
|
3637
|
-
* Created order
|
|
3638
|
-
* @internal
|
|
3639
|
-
*/
|
|
3583
|
+
/** Created order. */
|
|
3640
3584
|
createdOrder?: Order;
|
|
3641
3585
|
}
|
|
3642
3586
|
export interface DeleteDraftOrderRequest {
|
|
3643
3587
|
/**
|
|
3644
|
-
*
|
|
3588
|
+
* Draft order ID.
|
|
3645
3589
|
* @format GUID
|
|
3646
3590
|
*/
|
|
3647
3591
|
draftOrderId: string;
|
|
@@ -3649,7 +3593,7 @@ export interface DeleteDraftOrderRequest {
|
|
|
3649
3593
|
export interface DeleteDraftOrderResponse {
|
|
3650
3594
|
}
|
|
3651
3595
|
export interface QueryDraftOrdersRequest {
|
|
3652
|
-
/**
|
|
3596
|
+
/** Query options. */
|
|
3653
3597
|
query?: CursorQuery;
|
|
3654
3598
|
}
|
|
3655
3599
|
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
@@ -3711,7 +3655,7 @@ export interface CursorPaging {
|
|
|
3711
3655
|
cursor?: string | null;
|
|
3712
3656
|
}
|
|
3713
3657
|
export interface QueryDraftOrdersResponse {
|
|
3714
|
-
/**
|
|
3658
|
+
/** Draft orders, found by query. */
|
|
3715
3659
|
draftOrders?: DraftOrder[];
|
|
3716
3660
|
/** Paging metadata. */
|
|
3717
3661
|
pagingMetadata?: CursorPagingMetadata;
|
|
@@ -3743,75 +3687,44 @@ export interface Cursors {
|
|
|
3743
3687
|
}
|
|
3744
3688
|
export interface UpdateExtendedFieldsRequest {
|
|
3745
3689
|
/** ID of the entity to update. */
|
|
3746
|
-
_id
|
|
3690
|
+
_id: string;
|
|
3747
3691
|
/** Identifier for the app whose extended fields are being updated. */
|
|
3748
|
-
namespace
|
|
3692
|
+
namespace: string;
|
|
3749
3693
|
/** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
|
|
3750
|
-
namespaceData
|
|
3694
|
+
namespaceData: Record<string, any> | null;
|
|
3751
3695
|
}
|
|
3752
3696
|
export interface UpdateExtendedFieldsResponse {
|
|
3753
|
-
/** Updated
|
|
3697
|
+
/** Updated draft order. */
|
|
3754
3698
|
draftOrder?: DraftOrder;
|
|
3755
3699
|
}
|
|
3756
3700
|
export interface SetTaxExemptionRequest {
|
|
3757
3701
|
/**
|
|
3758
3702
|
* Draft order ID.
|
|
3759
|
-
* @internal
|
|
3760
3703
|
* @format GUID
|
|
3761
3704
|
*/
|
|
3762
3705
|
draftOrderId: string;
|
|
3763
3706
|
/**
|
|
3764
|
-
*
|
|
3707
|
+
* Flag, indicating whether the draft order is exempt from tax calculations.
|
|
3765
3708
|
*
|
|
3766
3709
|
* Default: `false`
|
|
3767
|
-
* @internal
|
|
3768
3710
|
*/
|
|
3769
3711
|
taxExempt: boolean | null;
|
|
3770
3712
|
}
|
|
3771
3713
|
export interface SetTaxExemptionResponse {
|
|
3772
|
-
/**
|
|
3773
|
-
* The draft order details calculated with updated tax exemption.
|
|
3774
|
-
* @internal
|
|
3775
|
-
*/
|
|
3714
|
+
/** Draft order details calculated with latest content. */
|
|
3776
3715
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3777
3716
|
}
|
|
3778
|
-
export interface GetDraftEditabilityStatusRequest {
|
|
3779
|
-
/**
|
|
3780
|
-
* Draft order ID.
|
|
3781
|
-
* @format GUID
|
|
3782
|
-
*/
|
|
3783
|
-
draftOrderId?: string | null;
|
|
3784
|
-
}
|
|
3785
|
-
export interface GetDraftEditabilityStatusResponse {
|
|
3786
|
-
/**
|
|
3787
|
-
* Draft order ID.
|
|
3788
|
-
* @format GUID
|
|
3789
|
-
*/
|
|
3790
|
-
draftOrderId?: string | null;
|
|
3791
|
-
/**
|
|
3792
|
-
* Draft order status.
|
|
3793
|
-
* @readonly
|
|
3794
|
-
*/
|
|
3795
|
-
status?: EditingStatus;
|
|
3796
|
-
}
|
|
3797
3717
|
export interface SetBusinessLocationRequest {
|
|
3798
3718
|
/**
|
|
3799
3719
|
* Draft order ID.
|
|
3800
|
-
* @internal
|
|
3801
3720
|
* @format GUID
|
|
3802
3721
|
*/
|
|
3803
3722
|
draftOrderId: string;
|
|
3804
|
-
/**
|
|
3805
|
-
* Business location.
|
|
3806
|
-
* @internal
|
|
3807
|
-
*/
|
|
3723
|
+
/** Business location. */
|
|
3808
3724
|
businessLocation?: Location;
|
|
3809
3725
|
}
|
|
3810
3726
|
export interface SetBusinessLocationResponse {
|
|
3811
|
-
/**
|
|
3812
|
-
* The draft order details calculated with updated business location.
|
|
3813
|
-
* @internal
|
|
3814
|
-
*/
|
|
3727
|
+
/** Draft order details calculated with latest content. */
|
|
3815
3728
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3816
3729
|
}
|
|
3817
3730
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -3954,13 +3867,13 @@ export declare enum WebhookIdentityType {
|
|
|
3954
3867
|
WIX_USER = "WIX_USER",
|
|
3955
3868
|
APP = "APP"
|
|
3956
3869
|
}
|
|
3957
|
-
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` | `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.
|
|
3870
|
+
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`;
|
|
3958
3871
|
/**
|
|
3959
3872
|
* Creates or gets a draft order.
|
|
3960
3873
|
*
|
|
3961
3874
|
* When passing the ID of an order that is already in draft, the existing draft order will be returned.
|
|
3962
|
-
* To complete a draft and update the order, call
|
|
3963
|
-
* @param orderId -
|
|
3875
|
+
* To complete a draft and update the order, call Commit Draft Order([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/draft-orders/commit-draft-order) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/draft-orders/commit-draft-order)).
|
|
3876
|
+
* @param orderId - Existing order ID to create draft from.
|
|
3964
3877
|
* @public
|
|
3965
3878
|
* @documentationMaturity preview
|
|
3966
3879
|
* @requiredField orderId
|
|
@@ -4000,7 +3913,7 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
4000
3913
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4001
3914
|
/**
|
|
4002
3915
|
* Adds line items to a draft order.
|
|
4003
|
-
* @param draftOrderId -
|
|
3916
|
+
* @param draftOrderId - Draft order ID.
|
|
4004
3917
|
* @public
|
|
4005
3918
|
* @documentationMaturity preview
|
|
4006
3919
|
* @requiredField draftOrderId
|
|
@@ -4038,10 +3951,13 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
4038
3951
|
* > + Passing a quantity of `0` will remove the line item.
|
|
4039
3952
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
4040
3953
|
* > + Quantity cannot be decreased fulfilled line items. To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order).
|
|
4041
|
-
* @param draftOrderId -
|
|
3954
|
+
* @param draftOrderId - Draft order ID.
|
|
3955
|
+
* @param lineItemChanges - Details of changes to apply per line item.
|
|
4042
3956
|
* @public
|
|
4043
3957
|
* @documentationMaturity preview
|
|
4044
3958
|
* @requiredField draftOrderId
|
|
3959
|
+
* @requiredField lineItemChanges
|
|
3960
|
+
* @requiredField lineItemChanges.lineItemId
|
|
4045
3961
|
* @permissionId ECOM.DRAFT_ORDERS_MODIFY_ITEMS
|
|
4046
3962
|
* @permissionScope Manage Stores - all permissions
|
|
4047
3963
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4052,26 +3968,22 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
4052
3968
|
* @applicableIdentity APP
|
|
4053
3969
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.UpdateLineItems
|
|
4054
3970
|
*/
|
|
4055
|
-
export declare function updateLineItems(draftOrderId: string,
|
|
3971
|
+
export declare function updateLineItems(draftOrderId: string, lineItemChanges: NonNullablePaths<LineItemChangeDetails, `lineItemId`>[]): Promise<NonNullablePaths<UpdateLineItemsResponse, {
|
|
4056
3972
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4057
3973
|
}[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`>>;
|
|
4058
|
-
export interface UpdateLineItemsOptions {
|
|
4059
|
-
/**
|
|
4060
|
-
* Details of changes to apply per line item
|
|
4061
|
-
* @minSize 1
|
|
4062
|
-
* @maxSize 300
|
|
4063
|
-
*/
|
|
4064
|
-
lineItemChanges?: LineItemChangeDetails[];
|
|
4065
|
-
}
|
|
4066
3974
|
/**
|
|
4067
|
-
*
|
|
3975
|
+
* Applies or unapplies discounts on a draft order.
|
|
4068
3976
|
*
|
|
4069
|
-
*
|
|
4070
|
-
*
|
|
4071
|
-
* @param
|
|
3977
|
+
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
3978
|
+
* Existing discounts, not mentioned in request, will keep their current state.
|
|
3979
|
+
* @param draftOrderId - Draft order ID.
|
|
3980
|
+
* @param discounts - Discount IDs to apply/unapply.
|
|
3981
|
+
* Existing discounts, not mentioned in request, will keep their current state.
|
|
4072
3982
|
* @public
|
|
4073
3983
|
* @documentationMaturity preview
|
|
4074
3984
|
* @requiredField discounts
|
|
3985
|
+
* @requiredField discounts._id
|
|
3986
|
+
* @requiredField discounts.applied
|
|
4075
3987
|
* @requiredField draftOrderId
|
|
4076
3988
|
* @permissionId ECOM.DRAFT_ORDERS_SET_DISCOUNTS
|
|
4077
3989
|
* @permissionScope Manage Stores - all permissions
|
|
@@ -4083,18 +3995,21 @@ export interface UpdateLineItemsOptions {
|
|
|
4083
3995
|
* @applicableIdentity APP
|
|
4084
3996
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetDiscounts
|
|
4085
3997
|
*/
|
|
4086
|
-
export declare function setDiscounts(draftOrderId: string, discounts: IdAndApplied[]): Promise<NonNullablePaths<SetDiscountsResponse, {
|
|
3998
|
+
export declare function setDiscounts(draftOrderId: string, discounts: NonNullablePaths<IdAndApplied, `_id` | `applied`>[]): Promise<NonNullablePaths<SetDiscountsResponse, {
|
|
4087
3999
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4088
4000
|
}[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`>>;
|
|
4089
4001
|
/**
|
|
4090
|
-
*
|
|
4091
|
-
*
|
|
4002
|
+
* Create custom discounts on a draft order.
|
|
4003
|
+
*
|
|
4004
|
+
* Newly added discounts are unapplied by default.
|
|
4005
|
+
* To apply them, use Set Discounts ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/draft-orders/set-discounts) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/draft-orders/set-discounts)).
|
|
4006
|
+
* @param draftOrderId - Draft order ID.
|
|
4092
4007
|
* @public
|
|
4093
4008
|
* @documentationMaturity preview
|
|
4094
4009
|
* @requiredField draftOrderId
|
|
4095
|
-
* @requiredField options.discounts.amount
|
|
4096
4010
|
* @requiredField options.discounts.amount.amount
|
|
4097
4011
|
* @requiredField options.discounts.discountType
|
|
4012
|
+
* @requiredField options.discounts.priceAmount.amount
|
|
4098
4013
|
* @permissionId ECOM.DRAFT_ORDERS_ADD_DISCOUNTS
|
|
4099
4014
|
* @permissionScope Manage Stores - all permissions
|
|
4100
4015
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4105,12 +4020,12 @@ export declare function setDiscounts(draftOrderId: string, discounts: IdAndAppli
|
|
|
4105
4020
|
* @applicableIdentity APP
|
|
4106
4021
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateCustomDiscounts
|
|
4107
4022
|
*/
|
|
4108
|
-
export declare function createCustomDiscounts(draftOrderId: string, options?: NonNullablePaths<CreateCustomDiscountsOptions, `discounts.${number}.amount` | `discounts.${number}.
|
|
4023
|
+
export declare function createCustomDiscounts(draftOrderId: string, options?: NonNullablePaths<CreateCustomDiscountsOptions, `discounts.${number}.amount.amount` | `discounts.${number}.discountType` | `discounts.${number}.priceAmount.amount`>): Promise<NonNullablePaths<CreateCustomDiscountsResponse, {
|
|
4109
4024
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4110
4025
|
}[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`>>;
|
|
4111
4026
|
export interface CreateCustomDiscountsOptions {
|
|
4112
4027
|
/**
|
|
4113
|
-
*
|
|
4028
|
+
* Discounts to create. Created discounts are unapplied by default.
|
|
4114
4029
|
* @minSize 1
|
|
4115
4030
|
* @maxSize 100
|
|
4116
4031
|
*/
|
|
@@ -4118,8 +4033,8 @@ export interface CreateCustomDiscountsOptions {
|
|
|
4118
4033
|
}
|
|
4119
4034
|
/**
|
|
4120
4035
|
* Remove custom discounts from the order.
|
|
4121
|
-
* @param draftOrderId -
|
|
4122
|
-
* @param discountIds -
|
|
4036
|
+
* @param draftOrderId - Draft order ID.
|
|
4037
|
+
* @param discountIds - Ids of discounts to remove.
|
|
4123
4038
|
* @public
|
|
4124
4039
|
* @documentationMaturity preview
|
|
4125
4040
|
* @requiredField discountIds
|
|
@@ -4138,13 +4053,18 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
4138
4053
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4139
4054
|
}[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`>>;
|
|
4140
4055
|
/**
|
|
4141
|
-
*
|
|
4142
|
-
*
|
|
4143
|
-
*
|
|
4144
|
-
*
|
|
4056
|
+
* Applies or unapplies additional fees on a draft order.
|
|
4057
|
+
*
|
|
4058
|
+
* Unapplied fees are still part of draft order, but do not affect balance.
|
|
4059
|
+
* Existing additional fees, not mentioned in request, will keep their current state.
|
|
4060
|
+
* @param draftOrderId - Draft order ID.
|
|
4061
|
+
* @param additionalFees - Additional fee IDs to apply/unapply.
|
|
4062
|
+
* Existing additional fees, not mentioned in this list, will keep their current state.
|
|
4145
4063
|
* @public
|
|
4146
4064
|
* @documentationMaturity preview
|
|
4147
4065
|
* @requiredField additionalFees
|
|
4066
|
+
* @requiredField additionalFees._id
|
|
4067
|
+
* @requiredField additionalFees.applied
|
|
4148
4068
|
* @requiredField draftOrderId
|
|
4149
4069
|
* @permissionId ECOM.DRAFT_ORDERS_SET_ADDITIONAL_FEES
|
|
4150
4070
|
* @permissionScope Manage Stores - all permissions
|
|
@@ -4156,14 +4076,15 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
4156
4076
|
* @applicableIdentity APP
|
|
4157
4077
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetAdditionalFees
|
|
4158
4078
|
*/
|
|
4159
|
-
export declare function setAdditionalFees(draftOrderId: string, additionalFees: IdAndApplied[]): Promise<NonNullablePaths<SetAdditionalFeesResponse, {
|
|
4079
|
+
export declare function setAdditionalFees(draftOrderId: string, additionalFees: NonNullablePaths<IdAndApplied, `_id` | `applied`>[]): Promise<NonNullablePaths<SetAdditionalFeesResponse, {
|
|
4160
4080
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4161
4081
|
}[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`>>;
|
|
4162
4082
|
/**
|
|
4163
|
-
*
|
|
4164
|
-
*
|
|
4165
|
-
*
|
|
4166
|
-
*
|
|
4083
|
+
* Creates custom additional fees on a draft order.
|
|
4084
|
+
*
|
|
4085
|
+
* Newly added additional fees are unapplied by default.
|
|
4086
|
+
* To apply them, use Set Additional Fees ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/draft-orders/set-additional-fees) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/draft-orders/set-additional-fees)).
|
|
4087
|
+
* @param draftOrderId - Draft order ID.
|
|
4167
4088
|
* @public
|
|
4168
4089
|
* @documentationMaturity preview
|
|
4169
4090
|
* @requiredField draftOrderId
|
|
@@ -4185,7 +4106,7 @@ export declare function createCustomAdditionalFees(draftOrderId: string, options
|
|
|
4185
4106
|
}[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`>>;
|
|
4186
4107
|
export interface CreateCustomAdditionalFeesOptions {
|
|
4187
4108
|
/**
|
|
4188
|
-
* The additional fees to
|
|
4109
|
+
* The additional fees to create. Created fees are unapplied by default.
|
|
4189
4110
|
* @minSize 1
|
|
4190
4111
|
* @maxSize 100
|
|
4191
4112
|
*/
|
|
@@ -4193,8 +4114,8 @@ export interface CreateCustomAdditionalFeesOptions {
|
|
|
4193
4114
|
}
|
|
4194
4115
|
/**
|
|
4195
4116
|
* Remove custom additional fees from the order.
|
|
4196
|
-
* @param draftOrderId -
|
|
4197
|
-
* @param customAdditionalFees -
|
|
4117
|
+
* @param draftOrderId - Draft order ID.
|
|
4118
|
+
* @param customAdditionalFees - Ids of additional fees to remove.
|
|
4198
4119
|
* @public
|
|
4199
4120
|
* @documentationMaturity preview
|
|
4200
4121
|
* @requiredField customAdditionalFees
|
|
@@ -4213,9 +4134,11 @@ export declare function deleteCustomAdditionalFees(draftOrderId: string, customA
|
|
|
4213
4134
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4214
4135
|
}[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`>>;
|
|
4215
4136
|
/**
|
|
4216
|
-
* Sets shipping
|
|
4137
|
+
* Sets shipping information on a draft order.
|
|
4138
|
+
* @param draftOrderId - Draft order ID.
|
|
4217
4139
|
* @public
|
|
4218
4140
|
* @documentationMaturity preview
|
|
4141
|
+
* @requiredField draftOrderId
|
|
4219
4142
|
* @permissionId ECOM.DRAFT_ORDERS_SET_SHIPPING_INFO
|
|
4220
4143
|
* @permissionScope Manage Stores - all permissions
|
|
4221
4144
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4226,11 +4149,19 @@ export declare function deleteCustomAdditionalFees(draftOrderId: string, customA
|
|
|
4226
4149
|
* @applicableIdentity APP
|
|
4227
4150
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetShippingInfo
|
|
4228
4151
|
*/
|
|
4229
|
-
export declare function setShippingInfo(): Promise<
|
|
4152
|
+
export declare function setShippingInfo(draftOrderId: string, options?: SetShippingInfoOptions): Promise<NonNullablePaths<SetShippingInfoResponse, {
|
|
4153
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4154
|
+
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4155
|
+
export interface SetShippingInfoOptions {
|
|
4156
|
+
/** Shipping information. Empty value removes shipping information from draft. */
|
|
4157
|
+
shippingInfo?: V1ShippingInformation;
|
|
4158
|
+
}
|
|
4230
4159
|
/**
|
|
4231
|
-
* Sets buyer info
|
|
4160
|
+
* Sets buyer info on a draft order.
|
|
4161
|
+
* @param draftOrderId - Draft order ID.
|
|
4232
4162
|
* @public
|
|
4233
4163
|
* @documentationMaturity preview
|
|
4164
|
+
* @requiredField draftOrderId
|
|
4234
4165
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUYER_INFO
|
|
4235
4166
|
* @permissionScope Manage Stores - all permissions
|
|
4236
4167
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4241,11 +4172,19 @@ export declare function setShippingInfo(): Promise<void>;
|
|
|
4241
4172
|
* @applicableIdentity APP
|
|
4242
4173
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetBuyerInfo
|
|
4243
4174
|
*/
|
|
4244
|
-
export declare function setBuyerInfo(): Promise<
|
|
4175
|
+
export declare function setBuyerInfo(draftOrderId: string, options?: SetBuyerInfoOptions): Promise<NonNullablePaths<SetBuyerInfoResponse, {
|
|
4176
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4177
|
+
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4178
|
+
export interface SetBuyerInfoOptions {
|
|
4179
|
+
/** Buyer information. Empty value removes buyer information from draft. */
|
|
4180
|
+
buyerInfo?: BuyerInfo;
|
|
4181
|
+
}
|
|
4245
4182
|
/**
|
|
4246
|
-
* Sets recipient info
|
|
4183
|
+
* Sets recipient info on a draft order.
|
|
4184
|
+
* @param draftOrderId - Draft order ID.
|
|
4247
4185
|
* @public
|
|
4248
4186
|
* @documentationMaturity preview
|
|
4187
|
+
* @requiredField draftOrderId
|
|
4249
4188
|
* @permissionId ECOM.DRAFT_ORDER_SET_RECIPIENT_INFO
|
|
4250
4189
|
* @permissionScope Manage Stores - all permissions
|
|
4251
4190
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4256,11 +4195,19 @@ export declare function setBuyerInfo(): Promise<void>;
|
|
|
4256
4195
|
* @applicableIdentity APP
|
|
4257
4196
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetRecipientInfo
|
|
4258
4197
|
*/
|
|
4259
|
-
export declare function setRecipientInfo(): Promise<
|
|
4198
|
+
export declare function setRecipientInfo(draftOrderId: string, options?: SetRecipientInfoOptions): Promise<NonNullablePaths<SetRecipientInfoResponse, {
|
|
4199
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4200
|
+
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4201
|
+
export interface SetRecipientInfoOptions {
|
|
4202
|
+
/** Order recipient address and contact details. Empty value removes recipient information from draft. */
|
|
4203
|
+
recipientInfo?: AddressWithContact;
|
|
4204
|
+
}
|
|
4260
4205
|
/**
|
|
4261
|
-
* Sets billing info
|
|
4206
|
+
* Sets billing info on a draft order.
|
|
4207
|
+
* @param draftOrderId - Draft order ID.
|
|
4262
4208
|
* @public
|
|
4263
4209
|
* @documentationMaturity preview
|
|
4210
|
+
* @requiredField draftOrderId
|
|
4264
4211
|
* @permissionId ECOM.DRAFT_ORDER_SET_BILLING_INFO
|
|
4265
4212
|
* @permissionScope Manage Stores - all permissions
|
|
4266
4213
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4271,14 +4218,21 @@ export declare function setRecipientInfo(): Promise<void>;
|
|
|
4271
4218
|
* @applicableIdentity APP
|
|
4272
4219
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetBillingInfo
|
|
4273
4220
|
*/
|
|
4274
|
-
export declare function setBillingInfo(): Promise<
|
|
4221
|
+
export declare function setBillingInfo(draftOrderId: string, options?: SetBillingInfoOptions): Promise<NonNullablePaths<SetBillingInfoResponse, {
|
|
4222
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4223
|
+
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4224
|
+
export interface SetBillingInfoOptions {
|
|
4225
|
+
/** Billing address and contact details. Empty value removes billing information from draft. */
|
|
4226
|
+
billingInfo?: AddressWithContact;
|
|
4227
|
+
}
|
|
4275
4228
|
/**
|
|
4276
|
-
*
|
|
4277
|
-
*
|
|
4229
|
+
* Gets a draft order.
|
|
4230
|
+
*
|
|
4231
|
+
* Draft order is recalculated and contains latest tax and totals (unless already committed).
|
|
4278
4232
|
* Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
|
|
4279
4233
|
* Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
|
|
4280
|
-
* When
|
|
4281
|
-
* @param draftOrderId -
|
|
4234
|
+
* When retrieving an already committed draft, it's not recalculated and contains data calculated during commit.
|
|
4235
|
+
* @param draftOrderId - Draft order ID.
|
|
4282
4236
|
* @public
|
|
4283
4237
|
* @documentationMaturity preview
|
|
4284
4238
|
* @requiredField draftOrderId
|
|
@@ -4297,8 +4251,8 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4297
4251
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4298
4252
|
}[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`>>;
|
|
4299
4253
|
/**
|
|
4300
|
-
* Checks whether a draft can be created for this order
|
|
4301
|
-
* @param orderId - Order
|
|
4254
|
+
* Checks whether a draft can be created for this order.
|
|
4255
|
+
* @param orderId - Order Id.
|
|
4302
4256
|
* @public
|
|
4303
4257
|
* @documentationMaturity preview
|
|
4304
4258
|
* @requiredField orderId
|
|
@@ -4314,10 +4268,11 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
4314
4268
|
*/
|
|
4315
4269
|
export declare function getOrderDraftabilityStatus(orderId: string): Promise<NonNullablePaths<GetOrderDraftabilityStatusResponse, `orderId` | `orderDraftable` | `nonDraftableReasons`>>;
|
|
4316
4270
|
/**
|
|
4317
|
-
* Commit latest changes to the baseline order and control
|
|
4271
|
+
* Commit latest changes to the baseline order and control which side-effects are executed.
|
|
4272
|
+
*
|
|
4318
4273
|
* Commit cannot be undone or reverted.
|
|
4319
|
-
*
|
|
4320
|
-
* @param draftOrderId -
|
|
4274
|
+
* Committed draft will become closed for further modifications, however it's kept for reference and can be retrieved.
|
|
4275
|
+
* @param draftOrderId - Draft order ID.
|
|
4321
4276
|
* @public
|
|
4322
4277
|
* @documentationMaturity preview
|
|
4323
4278
|
* @requiredField draftOrderId
|
|
@@ -4334,9 +4289,9 @@ export declare function getOrderDraftabilityStatus(orderId: string): Promise<Non
|
|
|
4334
4289
|
*/
|
|
4335
4290
|
export declare function commitDraftOrder(draftOrderId: string, options?: CommitDraftOrderOptions): Promise<NonNullablePaths<CommitDraftOrderResponse, {
|
|
4336
4291
|
[P in DraftOrderNonNullablePaths]: `committedDraftOrder.${P}`;
|
|
4337
|
-
}[DraftOrderNonNullablePaths] | `orderAfterCommit.number` | `orderAfterCommit.lineItems` | `orderAfterCommit.lineItems.${number}._id` | `orderAfterCommit.lineItems.${number}.productName.original` | `orderAfterCommit.lineItems.${number}.catalogReference.catalogItemId` | `orderAfterCommit.lineItems.${number}.catalogReference.appId` | `orderAfterCommit.lineItems.${number}.quantity` | `orderAfterCommit.lineItems.${number}.totalDiscount.amount` | `orderAfterCommit.lineItems.${number}.totalDiscount.formattedAmount` | `orderAfterCommit.lineItems.${number}.physicalProperties.shippable` | `orderAfterCommit.lineItems.${number}.itemType.preset` | `orderAfterCommit.lineItems.${number}.itemType.custom` | `orderAfterCommit.lineItems.${number}.paymentOption` | `orderAfterCommit.lineItems.${number}.taxDetails.taxRate` | `orderAfterCommit.lineItems.${number}.taxInfo.taxIncludedInPrice` | `orderAfterCommit.lineItems.${number}.digitalFile.fileId` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.cycleNumber` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `orderAfterCommit.lineItems.${number}.priceDescription.original` | `orderAfterCommit.buyerInfo.visitorId` | `orderAfterCommit.buyerInfo.memberId` | `orderAfterCommit.paymentStatus` | `orderAfterCommit.fulfillmentStatus` | `orderAfterCommit.weightUnit` | `orderAfterCommit.taxIncludedInPrices` | `orderAfterCommit.billingInfo.address.streetAddress.number` | `orderAfterCommit.billingInfo.address.streetAddress.name` | `orderAfterCommit.billingInfo.contactDetails.vatId._id` | `orderAfterCommit.billingInfo.contactDetails.vatId.type` | `orderAfterCommit.shippingInfo.title` | `orderAfterCommit.shippingInfo.logistics.pickupDetails.pickupMethod` | `orderAfterCommit.status` | `orderAfterCommit.taxInfo.taxBreakdown` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.taxName` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.taxType` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.jurisdiction` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.jurisdictionType` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.rate` | `orderAfterCommit.appliedDiscounts` | `orderAfterCommit.appliedDiscounts.${number}.coupon._id` | `orderAfterCommit.appliedDiscounts.${number}.coupon.code` | `orderAfterCommit.appliedDiscounts.${number}.coupon.name` | `orderAfterCommit.appliedDiscounts.${number}.merchantDiscount.discountReason` | `orderAfterCommit.appliedDiscounts.${number}.discountRule._id` | `orderAfterCommit.appliedDiscounts.${number}.discountRule.name.original` | `orderAfterCommit.appliedDiscounts.${number}.discountType` | `orderAfterCommit.activities` | `orderAfterCommit.activities.${number}.customActivity.appId` | `orderAfterCommit.activities.${number}.customActivity.type` | `orderAfterCommit.activities.${number}.merchantComment.message` | `orderAfterCommit.activities.${number}.orderRefunded.manual` | `orderAfterCommit.activities.${number}.orderRefunded.reason` | `orderAfterCommit.activities.${number}.type` | `orderAfterCommit.attributionSource` | `orderAfterCommit.createdBy.userId` | `orderAfterCommit.createdBy.memberId` | `orderAfterCommit.createdBy.visitorId` | `orderAfterCommit.createdBy.appId` | `orderAfterCommit.channelInfo.type` | `orderAfterCommit.customFields` | `orderAfterCommit.customFields.${number}.title` | `orderAfterCommit.balanceSummary.balance.amount` | `orderAfterCommit.balanceSummary.balance.formattedAmount` | `orderAfterCommit.additionalFees` | `orderAfterCommit.additionalFees.${number}.name` | `orderAfterCommit.additionalFees.${number}._id` | `orderAfterCommit.tags.privateTags.tagIds` | `orderAfterCommit.businessLocation._id` | `orderAfterCommit.businessLocation.name`>>;
|
|
4292
|
+
}[DraftOrderNonNullablePaths] | `orderAfterCommit.number` | `orderAfterCommit.lineItems` | `orderAfterCommit.lineItems.${number}._id` | `orderAfterCommit.lineItems.${number}.productName.original` | `orderAfterCommit.lineItems.${number}.catalogReference.catalogItemId` | `orderAfterCommit.lineItems.${number}.catalogReference.appId` | `orderAfterCommit.lineItems.${number}.quantity` | `orderAfterCommit.lineItems.${number}.totalDiscount.amount` | `orderAfterCommit.lineItems.${number}.totalDiscount.formattedAmount` | `orderAfterCommit.lineItems.${number}.physicalProperties.shippable` | `orderAfterCommit.lineItems.${number}.itemType.preset` | `orderAfterCommit.lineItems.${number}.itemType.custom` | `orderAfterCommit.lineItems.${number}.paymentOption` | `orderAfterCommit.lineItems.${number}.taxDetails.taxRate` | `orderAfterCommit.lineItems.${number}.taxInfo.taxIncludedInPrice` | `orderAfterCommit.lineItems.${number}.digitalFile.fileId` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.cycleNumber` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `orderAfterCommit.lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `orderAfterCommit.lineItems.${number}.priceDescription.original` | `orderAfterCommit.lineItems.${number}.taxableAddress.addressType` | `orderAfterCommit.buyerInfo.visitorId` | `orderAfterCommit.buyerInfo.memberId` | `orderAfterCommit.paymentStatus` | `orderAfterCommit.fulfillmentStatus` | `orderAfterCommit.weightUnit` | `orderAfterCommit.taxIncludedInPrices` | `orderAfterCommit.billingInfo.address.streetAddress.number` | `orderAfterCommit.billingInfo.address.streetAddress.name` | `orderAfterCommit.billingInfo.contactDetails.vatId._id` | `orderAfterCommit.billingInfo.contactDetails.vatId.type` | `orderAfterCommit.shippingInfo.title` | `orderAfterCommit.shippingInfo.logistics.pickupDetails.pickupMethod` | `orderAfterCommit.status` | `orderAfterCommit.taxInfo.taxBreakdown` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.taxName` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.taxType` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.jurisdiction` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.jurisdictionType` | `orderAfterCommit.taxInfo.taxBreakdown.${number}.rate` | `orderAfterCommit.appliedDiscounts` | `orderAfterCommit.appliedDiscounts.${number}.coupon._id` | `orderAfterCommit.appliedDiscounts.${number}.coupon.code` | `orderAfterCommit.appliedDiscounts.${number}.coupon.name` | `orderAfterCommit.appliedDiscounts.${number}.merchantDiscount.discountReason` | `orderAfterCommit.appliedDiscounts.${number}.discountRule._id` | `orderAfterCommit.appliedDiscounts.${number}.discountRule.name.original` | `orderAfterCommit.appliedDiscounts.${number}.discountType` | `orderAfterCommit.activities` | `orderAfterCommit.activities.${number}.customActivity.appId` | `orderAfterCommit.activities.${number}.customActivity.type` | `orderAfterCommit.activities.${number}.merchantComment.message` | `orderAfterCommit.activities.${number}.orderRefunded.manual` | `orderAfterCommit.activities.${number}.orderRefunded.reason` | `orderAfterCommit.activities.${number}.type` | `orderAfterCommit.attributionSource` | `orderAfterCommit.createdBy.userId` | `orderAfterCommit.createdBy.memberId` | `orderAfterCommit.createdBy.visitorId` | `orderAfterCommit.createdBy.appId` | `orderAfterCommit.channelInfo.type` | `orderAfterCommit.customFields` | `orderAfterCommit.customFields.${number}.title` | `orderAfterCommit.balanceSummary.balance.amount` | `orderAfterCommit.balanceSummary.balance.formattedAmount` | `orderAfterCommit.additionalFees` | `orderAfterCommit.additionalFees.${number}.name` | `orderAfterCommit.additionalFees.${number}._id` | `orderAfterCommit.tags.privateTags.tagIds` | `orderAfterCommit.businessLocation._id` | `orderAfterCommit.businessLocation.name`>>;
|
|
4338
4293
|
export interface CommitDraftOrderOptions {
|
|
4339
|
-
/** Optional side effects to trigger */
|
|
4294
|
+
/** Optional side effects to trigger. */
|
|
4340
4295
|
commitSettings?: DraftOrderCommitSettings;
|
|
4341
4296
|
/**
|
|
4342
4297
|
* Reason for edit, given by user (optional).
|
|
@@ -4345,11 +4300,14 @@ export interface CommitDraftOrderOptions {
|
|
|
4345
4300
|
reason?: string | null;
|
|
4346
4301
|
}
|
|
4347
4302
|
/**
|
|
4348
|
-
*
|
|
4303
|
+
* Creates a new order while specifying which side-effects are executed.
|
|
4304
|
+
*
|
|
4349
4305
|
* Commit cannot be undone or reverted.
|
|
4350
|
-
*
|
|
4306
|
+
* Committed draft will become closed for further modifications, however it's kept for reference and can be retrieved.
|
|
4307
|
+
* @param draftOrderId - Draft order ID.
|
|
4351
4308
|
* @public
|
|
4352
4309
|
* @documentationMaturity preview
|
|
4310
|
+
* @requiredField draftOrderId
|
|
4353
4311
|
* @permissionId ECOM.DRAFT_ORDER_CREATE_ORDER_FROM_DRAFT
|
|
4354
4312
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
4355
4313
|
* @permissionScope Manage Stores - all permissions
|
|
@@ -4361,11 +4319,25 @@ export interface CommitDraftOrderOptions {
|
|
|
4361
4319
|
* @applicableIdentity APP
|
|
4362
4320
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateOrderFromDraft
|
|
4363
4321
|
*/
|
|
4364
|
-
export declare function createOrderFromDraft(): Promise<
|
|
4322
|
+
export declare function createOrderFromDraft(draftOrderId: string, options?: CreateOrderFromDraftOptions): Promise<NonNullablePaths<CreateOrderFromDraftResponse, {
|
|
4323
|
+
[P in DraftOrderNonNullablePaths]: `committedDraftOrder.${P}`;
|
|
4324
|
+
}[DraftOrderNonNullablePaths] | `createdOrder.number` | `createdOrder.lineItems` | `createdOrder.lineItems.${number}._id` | `createdOrder.lineItems.${number}.productName.original` | `createdOrder.lineItems.${number}.catalogReference.catalogItemId` | `createdOrder.lineItems.${number}.catalogReference.appId` | `createdOrder.lineItems.${number}.quantity` | `createdOrder.lineItems.${number}.totalDiscount.amount` | `createdOrder.lineItems.${number}.totalDiscount.formattedAmount` | `createdOrder.lineItems.${number}.physicalProperties.shippable` | `createdOrder.lineItems.${number}.itemType.preset` | `createdOrder.lineItems.${number}.itemType.custom` | `createdOrder.lineItems.${number}.paymentOption` | `createdOrder.lineItems.${number}.taxDetails.taxRate` | `createdOrder.lineItems.${number}.taxInfo.taxIncludedInPrice` | `createdOrder.lineItems.${number}.digitalFile.fileId` | `createdOrder.lineItems.${number}.subscriptionInfo.cycleNumber` | `createdOrder.lineItems.${number}.subscriptionInfo.subscriptionOptionTitle` | `createdOrder.lineItems.${number}.subscriptionInfo.subscriptionSettings.frequency` | `createdOrder.lineItems.${number}.subscriptionInfo.subscriptionSettings.autoRenewal` | `createdOrder.lineItems.${number}.priceDescription.original` | `createdOrder.lineItems.${number}.taxableAddress.addressType` | `createdOrder.buyerInfo.visitorId` | `createdOrder.buyerInfo.memberId` | `createdOrder.paymentStatus` | `createdOrder.fulfillmentStatus` | `createdOrder.weightUnit` | `createdOrder.taxIncludedInPrices` | `createdOrder.billingInfo.address.streetAddress.number` | `createdOrder.billingInfo.address.streetAddress.name` | `createdOrder.billingInfo.contactDetails.vatId._id` | `createdOrder.billingInfo.contactDetails.vatId.type` | `createdOrder.shippingInfo.title` | `createdOrder.shippingInfo.logistics.pickupDetails.pickupMethod` | `createdOrder.status` | `createdOrder.taxInfo.taxBreakdown` | `createdOrder.taxInfo.taxBreakdown.${number}.taxName` | `createdOrder.taxInfo.taxBreakdown.${number}.taxType` | `createdOrder.taxInfo.taxBreakdown.${number}.jurisdiction` | `createdOrder.taxInfo.taxBreakdown.${number}.jurisdictionType` | `createdOrder.taxInfo.taxBreakdown.${number}.rate` | `createdOrder.appliedDiscounts` | `createdOrder.appliedDiscounts.${number}.coupon._id` | `createdOrder.appliedDiscounts.${number}.coupon.code` | `createdOrder.appliedDiscounts.${number}.coupon.name` | `createdOrder.appliedDiscounts.${number}.merchantDiscount.discountReason` | `createdOrder.appliedDiscounts.${number}.discountRule._id` | `createdOrder.appliedDiscounts.${number}.discountRule.name.original` | `createdOrder.appliedDiscounts.${number}.discountType` | `createdOrder.activities` | `createdOrder.activities.${number}.customActivity.appId` | `createdOrder.activities.${number}.customActivity.type` | `createdOrder.activities.${number}.merchantComment.message` | `createdOrder.activities.${number}.orderRefunded.manual` | `createdOrder.activities.${number}.orderRefunded.reason` | `createdOrder.activities.${number}.type` | `createdOrder.attributionSource` | `createdOrder.createdBy.userId` | `createdOrder.createdBy.memberId` | `createdOrder.createdBy.visitorId` | `createdOrder.createdBy.appId` | `createdOrder.channelInfo.type` | `createdOrder.customFields` | `createdOrder.customFields.${number}.title` | `createdOrder.balanceSummary.balance.amount` | `createdOrder.balanceSummary.balance.formattedAmount` | `createdOrder.additionalFees` | `createdOrder.additionalFees.${number}.name` | `createdOrder.additionalFees.${number}._id` | `createdOrder.tags.privateTags.tagIds` | `createdOrder.businessLocation._id` | `createdOrder.businessLocation.name`>>;
|
|
4325
|
+
export interface CreateOrderFromDraftOptions {
|
|
4326
|
+
/** Optional side effects to trigger. */
|
|
4327
|
+
createSettings?: OrderCreateSettings;
|
|
4328
|
+
/**
|
|
4329
|
+
* Reason for order creation, given by user (optional).
|
|
4330
|
+
* @maxLength 200
|
|
4331
|
+
*/
|
|
4332
|
+
reason?: string | null;
|
|
4333
|
+
/** Information about the sales channel that submitted this order. */
|
|
4334
|
+
channelInfo?: ChannelInfo;
|
|
4335
|
+
}
|
|
4365
4336
|
/**
|
|
4366
|
-
*
|
|
4367
|
-
*
|
|
4368
|
-
*
|
|
4337
|
+
* Deletes a draft order along with all its pending changes.
|
|
4338
|
+
*
|
|
4339
|
+
* Draft orders in status 'COMMITTED' cannot be deleted.
|
|
4340
|
+
* @param draftOrderId - Draft order ID.
|
|
4369
4341
|
* @public
|
|
4370
4342
|
* @documentationMaturity preview
|
|
4371
4343
|
* @requiredField draftOrderId
|
|
@@ -4483,9 +4455,49 @@ export interface DraftOrdersQueryBuilder {
|
|
|
4483
4455
|
find: () => Promise<DraftOrdersQueryResult>;
|
|
4484
4456
|
}
|
|
4485
4457
|
/**
|
|
4486
|
-
*
|
|
4458
|
+
* Updates extended fields on a draft order.
|
|
4459
|
+
* @param _id - ID of the entity to update.
|
|
4460
|
+
* @param namespace - Identifier for the app whose extended fields are being updated.
|
|
4487
4461
|
* @public
|
|
4488
4462
|
* @documentationMaturity preview
|
|
4463
|
+
* @requiredField _id
|
|
4464
|
+
* @requiredField namespace
|
|
4465
|
+
* @requiredField options
|
|
4466
|
+
* @requiredField options.namespaceData
|
|
4467
|
+
* @permissionId ECOM.DRAFT_ORDER_UPDATE_EXTENDED_FIELDS
|
|
4468
|
+
* @permissionId ECOM.DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
4469
|
+
* @permissionScope Manage Stores - all permissions
|
|
4470
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4471
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4472
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4473
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4474
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4475
|
+
* @permissionScope Manage Stores - all permissions
|
|
4476
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4477
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4478
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4479
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4480
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4481
|
+
* @permissionScope Manage Orders
|
|
4482
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4483
|
+
* @applicableIdentity APP
|
|
4484
|
+
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.UpdateExtendedFields
|
|
4485
|
+
*/
|
|
4486
|
+
export declare function updateExtendedFields(_id: string, namespace: string, options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`>): Promise<NonNullablePaths<UpdateExtendedFieldsResponse, {
|
|
4487
|
+
[P in DraftOrderNonNullablePaths]: `draftOrder.${P}`;
|
|
4488
|
+
}[DraftOrderNonNullablePaths]>>;
|
|
4489
|
+
export interface UpdateExtendedFieldsOptions {
|
|
4490
|
+
/** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
|
|
4491
|
+
namespaceData: Record<string, any> | null;
|
|
4492
|
+
}
|
|
4493
|
+
/**
|
|
4494
|
+
* Sets tax exemption on a draft order.
|
|
4495
|
+
* @param draftOrderId - Draft order ID.
|
|
4496
|
+
* @public
|
|
4497
|
+
* @documentationMaturity preview
|
|
4498
|
+
* @requiredField draftOrderId
|
|
4499
|
+
* @requiredField options
|
|
4500
|
+
* @requiredField options.taxExempt
|
|
4489
4501
|
* @permissionId ECOM.DRAFT_ORDER_SET_TAX_EXEMPTION
|
|
4490
4502
|
* @permissionScope Manage Stores - all permissions
|
|
4491
4503
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4496,11 +4508,24 @@ export interface DraftOrdersQueryBuilder {
|
|
|
4496
4508
|
* @applicableIdentity APP
|
|
4497
4509
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetTaxExemption
|
|
4498
4510
|
*/
|
|
4499
|
-
export declare function setTaxExemption(): Promise<
|
|
4511
|
+
export declare function setTaxExemption(draftOrderId: string, options: NonNullablePaths<SetTaxExemptionOptions, `taxExempt`>): Promise<NonNullablePaths<SetTaxExemptionResponse, {
|
|
4512
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4513
|
+
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
4514
|
+
export interface SetTaxExemptionOptions {
|
|
4515
|
+
/**
|
|
4516
|
+
* Flag, indicating whether the draft order is exempt from tax calculations.
|
|
4517
|
+
*
|
|
4518
|
+
* Default: `false`
|
|
4519
|
+
*/
|
|
4520
|
+
taxExempt: boolean | null;
|
|
4521
|
+
}
|
|
4500
4522
|
/**
|
|
4501
|
-
* Sets business location
|
|
4523
|
+
* Sets business location on a draft order.
|
|
4524
|
+
* @param draftOrderId - Draft order ID.
|
|
4502
4525
|
* @public
|
|
4503
4526
|
* @documentationMaturity preview
|
|
4527
|
+
* @requiredField draftOrderId
|
|
4528
|
+
* @requiredField options.businessLocation._id
|
|
4504
4529
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUSINESS_LOCATION
|
|
4505
4530
|
* @permissionScope Manage Stores - all permissions
|
|
4506
4531
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4511,5 +4536,11 @@ export declare function setTaxExemption(): Promise<void>;
|
|
|
4511
4536
|
* @applicableIdentity APP
|
|
4512
4537
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetBusinessLocation
|
|
4513
4538
|
*/
|
|
4514
|
-
export declare function setBusinessLocation(): Promise<
|
|
4539
|
+
export declare function setBusinessLocation(draftOrderId: string, options?: NonNullablePaths<SetBusinessLocationOptions, `businessLocation._id`>): Promise<NonNullablePaths<SetBusinessLocationResponse, {
|
|
4540
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4541
|
+
}[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`>>;
|
|
4542
|
+
export interface SetBusinessLocationOptions {
|
|
4543
|
+
/** Business location. */
|
|
4544
|
+
businessLocation?: Location;
|
|
4545
|
+
}
|
|
4515
4546
|
export {};
|