@wix/auto_sdk_ecom_draft-orders 1.0.20 → 1.0.22
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 +288 -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 +473 -213
- package/build/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +581 -136
- 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 +288 -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 +473 -213
- package/build/es/src/ecom-v1-draft-order-draft-orders.universal.js +578 -135
- 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 +288 -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 +369 -379
- package/build/internal/cjs/src/ecom-v1-draft-order-draft-orders.universal.js +581 -136
- 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 +288 -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 +369 -379
- package/build/internal/es/src/ecom-v1-draft-order-draft-orders.universal.js +578 -135
- 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,12 +111,31 @@ 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.
|
|
118
127
|
*/
|
|
119
128
|
extendedFields?: ExtendedFields;
|
|
129
|
+
/**
|
|
130
|
+
* Buyer information.
|
|
131
|
+
* Includes details about changes when relevant.
|
|
132
|
+
*/
|
|
133
|
+
buyerDetails?: BuyerDetails;
|
|
134
|
+
/**
|
|
135
|
+
* Billing address and contact details.
|
|
136
|
+
* Includes details about changes when relevant.
|
|
137
|
+
*/
|
|
138
|
+
billingDetails?: BillingDetails;
|
|
120
139
|
/**
|
|
121
140
|
* Order business location
|
|
122
141
|
* Includes details about changes when relevant.
|
|
@@ -1064,6 +1083,7 @@ export interface AdditionalFeeDetails {
|
|
|
1064
1083
|
*
|
|
1065
1084
|
* Supported values:
|
|
1066
1085
|
* + `ORIGINAL_ORDER`: This additional fee is part of the original order.
|
|
1086
|
+
* + `AUTOMATIC`: User added a catalog item which is configured to have an additional fee.
|
|
1067
1087
|
* + `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.
|
|
1068
1088
|
*/
|
|
1069
1089
|
source?: SourceType;
|
|
@@ -1119,11 +1139,11 @@ export interface TaxDetails {
|
|
|
1119
1139
|
taxGroupId?: string | null;
|
|
1120
1140
|
}
|
|
1121
1141
|
export declare enum SourceType {
|
|
1122
|
-
/** Part of the original order */
|
|
1142
|
+
/** Part of the original order. */
|
|
1123
1143
|
ORIGINAL_ORDER = "ORIGINAL_ORDER",
|
|
1124
|
-
/** Added by
|
|
1144
|
+
/** Added automatically, as the result of recalculation caused by changes in draft order. */
|
|
1125
1145
|
AUTOMATIC = "AUTOMATIC",
|
|
1126
|
-
/** Added manually to
|
|
1146
|
+
/** Added manually to draft order. */
|
|
1127
1147
|
CUSTOM = "CUSTOM"
|
|
1128
1148
|
}
|
|
1129
1149
|
export interface DiscountDetails {
|
|
@@ -1289,9 +1309,9 @@ export interface CreatedByStringOneOf {
|
|
|
1289
1309
|
appId?: string;
|
|
1290
1310
|
}
|
|
1291
1311
|
export declare enum EditingStatus {
|
|
1292
|
-
/**
|
|
1312
|
+
/** Draft order can be modified and committed. */
|
|
1293
1313
|
DRAFT = "DRAFT",
|
|
1294
|
-
/**
|
|
1314
|
+
/** Draft order is already committed. No further modifications allowed. */
|
|
1295
1315
|
COMMITTED = "COMMITTED"
|
|
1296
1316
|
}
|
|
1297
1317
|
export declare enum WeightUnit {
|
|
@@ -1329,6 +1349,18 @@ export interface BalanceSummary {
|
|
|
1329
1349
|
* @readonly
|
|
1330
1350
|
*/
|
|
1331
1351
|
balance?: Balance;
|
|
1352
|
+
/**
|
|
1353
|
+
* Sum of all approved and successful payments.
|
|
1354
|
+
*
|
|
1355
|
+
* The value includes payments that have subsequently been fully or partially refunded.
|
|
1356
|
+
* @readonly
|
|
1357
|
+
*/
|
|
1358
|
+
paid?: Price;
|
|
1359
|
+
/**
|
|
1360
|
+
* Sum of all successfully refunded payments.
|
|
1361
|
+
* @readonly
|
|
1362
|
+
*/
|
|
1363
|
+
refunded?: Price;
|
|
1332
1364
|
/**
|
|
1333
1365
|
* Sum of all authorized payments.
|
|
1334
1366
|
* @readonly
|
|
@@ -1468,18 +1500,50 @@ export interface OrderTaxBreakdown {
|
|
|
1468
1500
|
aggregatedTaxAmount?: Price;
|
|
1469
1501
|
}
|
|
1470
1502
|
export interface BuyerDetails extends BuyerDetailsChangeTypeOneOf {
|
|
1503
|
+
/** Indicates that buyer information was added during draft. */
|
|
1504
|
+
added?: boolean;
|
|
1505
|
+
/** Indicates that buyer information was changed. Contains billing information before draft. */
|
|
1506
|
+
changedDetails?: BuyerChangedDetails;
|
|
1507
|
+
/** Indicates that buyer information was removed during draft. */
|
|
1508
|
+
removed?: boolean;
|
|
1509
|
+
/** Buyer information. */
|
|
1510
|
+
buyerInfo?: BuyerInfo;
|
|
1471
1511
|
}
|
|
1472
1512
|
/** @oneof */
|
|
1473
1513
|
export interface BuyerDetailsChangeTypeOneOf {
|
|
1514
|
+
/** Indicates that buyer information was added during draft. */
|
|
1515
|
+
added?: boolean;
|
|
1516
|
+
/** Indicates that buyer information was changed. Contains billing information before draft. */
|
|
1517
|
+
changedDetails?: BuyerChangedDetails;
|
|
1518
|
+
/** Indicates that buyer information was removed during draft. */
|
|
1519
|
+
removed?: boolean;
|
|
1474
1520
|
}
|
|
1475
1521
|
export interface BuyerChangedDetails {
|
|
1522
|
+
/** Buyer information before draft. */
|
|
1523
|
+
buyerInfoBeforeChange?: BuyerInfo;
|
|
1476
1524
|
}
|
|
1477
1525
|
export interface BillingDetails extends BillingDetailsChangeTypeOneOf {
|
|
1526
|
+
/** Indicates that billing information was added during draft. */
|
|
1527
|
+
added?: boolean;
|
|
1528
|
+
/** Indicates that billing information was changed. Contains billing information before draft. */
|
|
1529
|
+
changedDetails?: BillingChangedDetails;
|
|
1530
|
+
/** Indicates that billing information was removed during draft. */
|
|
1531
|
+
removed?: boolean;
|
|
1532
|
+
/** Billing address and contact details. */
|
|
1533
|
+
billingInfo?: AddressWithContact;
|
|
1478
1534
|
}
|
|
1479
1535
|
/** @oneof */
|
|
1480
1536
|
export interface BillingDetailsChangeTypeOneOf {
|
|
1537
|
+
/** Indicates that billing information was added during draft. */
|
|
1538
|
+
added?: boolean;
|
|
1539
|
+
/** Indicates that billing information was changed. Contains billing information before draft. */
|
|
1540
|
+
changedDetails?: BillingChangedDetails;
|
|
1541
|
+
/** Indicates that billing information was removed during draft. */
|
|
1542
|
+
removed?: boolean;
|
|
1481
1543
|
}
|
|
1482
1544
|
export interface BillingChangedDetails {
|
|
1545
|
+
/** Billing address and contact details before draft. */
|
|
1546
|
+
billingInfoBeforeChange?: AddressWithContact;
|
|
1483
1547
|
}
|
|
1484
1548
|
export interface BusinessLocationDetails extends BusinessLocationDetailsChangeTypeOneOf {
|
|
1485
1549
|
/** Indicates that business location was added during draft. */
|
|
@@ -1521,22 +1585,24 @@ export interface BusinessLocationChangedDetails {
|
|
|
1521
1585
|
}
|
|
1522
1586
|
export interface CreateDraftOrderRequest {
|
|
1523
1587
|
/**
|
|
1524
|
-
*
|
|
1588
|
+
* Existing order ID to create draft from.
|
|
1525
1589
|
* @format GUID
|
|
1526
1590
|
*/
|
|
1527
1591
|
orderId: string | null;
|
|
1528
1592
|
}
|
|
1529
1593
|
export interface CreateDraftOrderResponse {
|
|
1530
|
-
/**
|
|
1594
|
+
/** Draft order details calculated with latest content. */
|
|
1531
1595
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1532
|
-
}
|
|
1533
|
-
export interface CalculatedDraftOrder {
|
|
1534
1596
|
/**
|
|
1535
|
-
*
|
|
1536
|
-
*
|
|
1597
|
+
* Flag indicating whether response contains draft order that existed before request.
|
|
1598
|
+
* `False` - new draft order was created.
|
|
1537
1599
|
*/
|
|
1600
|
+
preexistingDraftOrder?: boolean | null;
|
|
1601
|
+
}
|
|
1602
|
+
export interface CalculatedDraftOrder {
|
|
1603
|
+
/** Draft order full details with calculations based on it's content. */
|
|
1538
1604
|
draftOrder?: DraftOrder;
|
|
1539
|
-
/**
|
|
1605
|
+
/** Order shipping options. */
|
|
1540
1606
|
shippingOptions?: ShippingOption[];
|
|
1541
1607
|
/** Errors that occurred during calculation. */
|
|
1542
1608
|
calculationErrors?: CalculationErrors;
|
|
@@ -1569,18 +1635,14 @@ export interface DeliveryLogistics {
|
|
|
1569
1635
|
export interface PickupDetails {
|
|
1570
1636
|
/** Pickup address */
|
|
1571
1637
|
address?: Address;
|
|
1572
|
-
/**
|
|
1573
|
-
* Pickup method.
|
|
1574
|
-
*
|
|
1575
|
-
* Supported values:
|
|
1576
|
-
* + `"STORE_PICKUP"`
|
|
1577
|
-
* + `"PICKUP_POINT"`
|
|
1578
|
-
*/
|
|
1638
|
+
/** Pickup method. */
|
|
1579
1639
|
pickupMethod?: PickupMethod;
|
|
1580
1640
|
}
|
|
1581
1641
|
export declare enum PickupMethod {
|
|
1582
1642
|
UNKNOWN_METHOD = "UNKNOWN_METHOD",
|
|
1643
|
+
/** Pickup is from the merchant's brick and mortar store. */
|
|
1583
1644
|
STORE_PICKUP = "STORE_PICKUP",
|
|
1645
|
+
/** Item is shipped to a specified pickup point. */
|
|
1584
1646
|
PICKUP_POINT = "PICKUP_POINT"
|
|
1585
1647
|
}
|
|
1586
1648
|
export interface DeliveryTimeSlot {
|
|
@@ -1722,12 +1784,12 @@ export interface CarrierError {
|
|
|
1722
1784
|
export interface CreateEmptyDraftOrderRequest {
|
|
1723
1785
|
}
|
|
1724
1786
|
export interface CreateEmptyDraftOrderResponse {
|
|
1725
|
-
/**
|
|
1787
|
+
/** Draft order details calculated with latest content. */
|
|
1726
1788
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1727
1789
|
}
|
|
1728
1790
|
export interface AddLineItemsToDraftOrderRequest {
|
|
1729
1791
|
/**
|
|
1730
|
-
*
|
|
1792
|
+
* Draft order ID.
|
|
1731
1793
|
* @format GUID
|
|
1732
1794
|
*/
|
|
1733
1795
|
draftOrderId: string;
|
|
@@ -1743,7 +1805,10 @@ export interface AddLineItemsToDraftOrderRequest {
|
|
|
1743
1805
|
customLineItems?: CustomLineItem[];
|
|
1744
1806
|
}
|
|
1745
1807
|
export interface CatalogReferenceLineItem {
|
|
1746
|
-
/**
|
|
1808
|
+
/**
|
|
1809
|
+
* Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1810
|
+
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1811
|
+
*/
|
|
1747
1812
|
catalogReference?: CatalogReference;
|
|
1748
1813
|
/**
|
|
1749
1814
|
* Item quantity.
|
|
@@ -1753,6 +1818,12 @@ export interface CatalogReferenceLineItem {
|
|
|
1753
1818
|
quantity?: number;
|
|
1754
1819
|
/** Item price override. */
|
|
1755
1820
|
price?: Price;
|
|
1821
|
+
/**
|
|
1822
|
+
* Whether the price is not yet defined, and will be updated after the order is created.
|
|
1823
|
+
*
|
|
1824
|
+
* Default: `false`
|
|
1825
|
+
*/
|
|
1826
|
+
priceUndetermined?: boolean;
|
|
1756
1827
|
/**
|
|
1757
1828
|
* Line item locations.
|
|
1758
1829
|
*
|
|
@@ -1776,7 +1847,10 @@ export interface CustomLineItem {
|
|
|
1776
1847
|
* @max 100000
|
|
1777
1848
|
*/
|
|
1778
1849
|
quantity?: number;
|
|
1779
|
-
/**
|
|
1850
|
+
/**
|
|
1851
|
+
* Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info.
|
|
1852
|
+
* Optional for custom line items, which don't trigger the Catalog service plugin.
|
|
1853
|
+
*/
|
|
1780
1854
|
catalogReference?: CatalogReference;
|
|
1781
1855
|
/**
|
|
1782
1856
|
* Item name.
|
|
@@ -1843,35 +1917,35 @@ export declare enum FileType {
|
|
|
1843
1917
|
SECURE_ARCHIVE = "SECURE_ARCHIVE"
|
|
1844
1918
|
}
|
|
1845
1919
|
export interface AddLineItemsToDraftOrderResponse {
|
|
1846
|
-
/**
|
|
1920
|
+
/** Draft order details calculated with latest content. */
|
|
1847
1921
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1848
1922
|
}
|
|
1849
1923
|
export interface UpdateLineItemsRequest {
|
|
1850
1924
|
/**
|
|
1851
|
-
*
|
|
1925
|
+
* Draft order ID.
|
|
1852
1926
|
* @format GUID
|
|
1853
1927
|
*/
|
|
1854
1928
|
draftOrderId: string;
|
|
1855
1929
|
/**
|
|
1856
|
-
* Details of changes to apply per line item
|
|
1930
|
+
* Details of changes to apply per line item.
|
|
1857
1931
|
* @minSize 1
|
|
1858
1932
|
* @maxSize 300
|
|
1859
1933
|
*/
|
|
1860
|
-
lineItemChanges
|
|
1934
|
+
lineItemChanges: LineItemChangeDetails[];
|
|
1861
1935
|
}
|
|
1862
1936
|
export interface LineItemChangeDetails {
|
|
1863
1937
|
/**
|
|
1864
|
-
*
|
|
1938
|
+
* Line item ID.
|
|
1865
1939
|
* @format GUID
|
|
1866
1940
|
*/
|
|
1867
1941
|
lineItemId?: string;
|
|
1868
1942
|
/**
|
|
1869
|
-
* The new quantity for the line item.
|
|
1943
|
+
* The new quantity for the line item. Quantity zero removes the line item.
|
|
1870
1944
|
* @max 1000000
|
|
1871
1945
|
*/
|
|
1872
1946
|
newQuantity?: number | null;
|
|
1873
1947
|
/**
|
|
1874
|
-
* The new price for 1 unit of the line item
|
|
1948
|
+
* The new price for 1 unit of the line item.
|
|
1875
1949
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
1876
1950
|
*/
|
|
1877
1951
|
newPrice?: string | null;
|
|
@@ -1879,51 +1953,59 @@ export interface LineItemChangeDetails {
|
|
|
1879
1953
|
newPriceDescription?: PriceDescription;
|
|
1880
1954
|
}
|
|
1881
1955
|
export interface UpdateLineItemsResponse {
|
|
1882
|
-
/**
|
|
1956
|
+
/** Draft order details calculated with latest content. */
|
|
1883
1957
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1884
1958
|
}
|
|
1885
1959
|
export interface SetDiscountsRequest {
|
|
1886
1960
|
/**
|
|
1887
|
-
*
|
|
1961
|
+
* Draft order ID.
|
|
1888
1962
|
* @format GUID
|
|
1889
1963
|
*/
|
|
1890
1964
|
draftOrderId: string;
|
|
1891
1965
|
/**
|
|
1892
|
-
*
|
|
1966
|
+
* Discount IDs to apply/unapply.
|
|
1967
|
+
* Existing discounts, not mentioned in request, will keep their current state.
|
|
1893
1968
|
* @minSize 1
|
|
1969
|
+
* @maxSize 320
|
|
1894
1970
|
*/
|
|
1895
1971
|
discounts: IdAndApplied[];
|
|
1896
1972
|
}
|
|
1897
1973
|
export interface IdAndApplied {
|
|
1898
|
-
/**
|
|
1974
|
+
/**
|
|
1975
|
+
* Entity ID. Depending on context, it's either discount or additional fee ID.
|
|
1976
|
+
* @format GUID
|
|
1977
|
+
*/
|
|
1899
1978
|
_id?: string;
|
|
1900
|
-
/**
|
|
1979
|
+
/** Flag indicating whether entity (discount/additional fee) should be applied to a draft order. */
|
|
1901
1980
|
applied?: boolean;
|
|
1902
1981
|
}
|
|
1903
1982
|
export interface SetDiscountsResponse {
|
|
1904
|
-
/**
|
|
1983
|
+
/** Draft order details calculated with latest content. */
|
|
1905
1984
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1906
1985
|
}
|
|
1907
1986
|
export interface CreateCustomDiscountsRequest {
|
|
1908
1987
|
/**
|
|
1909
|
-
*
|
|
1988
|
+
* Draft order ID.
|
|
1910
1989
|
* @format GUID
|
|
1911
1990
|
*/
|
|
1912
1991
|
draftOrderId: string;
|
|
1913
1992
|
/**
|
|
1914
|
-
*
|
|
1993
|
+
* Discounts to create. Created discounts are unapplied by default.
|
|
1915
1994
|
* @minSize 1
|
|
1916
1995
|
* @maxSize 100
|
|
1917
1996
|
*/
|
|
1918
1997
|
discounts?: DiscountOption[];
|
|
1919
1998
|
}
|
|
1920
1999
|
export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
2000
|
+
/** Discount price amount. */
|
|
2001
|
+
priceAmount?: Price;
|
|
1921
2002
|
/**
|
|
1922
|
-
* Discount
|
|
1923
|
-
*
|
|
1924
|
-
*
|
|
1925
|
-
* * `"SHIPPING"` - discount applies to shipping. For example, free shipping.
|
|
2003
|
+
* Discount percentage amount.
|
|
2004
|
+
* @format DECIMAL_VALUE
|
|
2005
|
+
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
1926
2006
|
*/
|
|
2007
|
+
percentage?: string | null;
|
|
2008
|
+
/** Discount type. */
|
|
1927
2009
|
discountType?: DiscountType;
|
|
1928
2010
|
/**
|
|
1929
2011
|
* ID of line item discount applies to.
|
|
@@ -1947,31 +2029,47 @@ export interface DiscountOption extends DiscountOptionDiscountAmountOneOf {
|
|
|
1947
2029
|
description?: string | null;
|
|
1948
2030
|
/**
|
|
1949
2031
|
* Should opt-in the added discount. default = false.
|
|
1950
|
-
* if not set or false, then to opt-in them, please call SetDiscounts with the added discounts
|
|
2032
|
+
* if not set or false, then to opt-in them, please call SetDiscounts with the added discounts IDs.
|
|
1951
2033
|
*/
|
|
1952
2034
|
applyToDraftOrder?: boolean | null;
|
|
2035
|
+
/**
|
|
2036
|
+
* Line items the discount applies to.
|
|
2037
|
+
* @maxSize 1
|
|
2038
|
+
*/
|
|
2039
|
+
lineItemDiscounts?: LineItemDiscount[];
|
|
1953
2040
|
}
|
|
1954
2041
|
/** @oneof */
|
|
1955
2042
|
export interface DiscountOptionDiscountAmountOneOf {
|
|
2043
|
+
/** Discount price amount. */
|
|
2044
|
+
priceAmount?: Price;
|
|
2045
|
+
/**
|
|
2046
|
+
* Discount percentage amount.
|
|
2047
|
+
* @format DECIMAL_VALUE
|
|
2048
|
+
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
2049
|
+
*/
|
|
2050
|
+
percentage?: string | null;
|
|
1956
2051
|
}
|
|
1957
2052
|
export declare enum DiscountType {
|
|
1958
2053
|
UNKNOWN_TYPE = "UNKNOWN_TYPE",
|
|
2054
|
+
/** Discount applies to entire order. */
|
|
1959
2055
|
GLOBAL = "GLOBAL",
|
|
2056
|
+
/** Discount applies to specific items. */
|
|
1960
2057
|
SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
|
|
2058
|
+
/** Discount applies to shipping. For example, free shipping. */
|
|
1961
2059
|
SHIPPING = "SHIPPING"
|
|
1962
2060
|
}
|
|
1963
2061
|
export interface CreateCustomDiscountsResponse {
|
|
1964
|
-
/**
|
|
2062
|
+
/** Draft order details calculated with latest content. */
|
|
1965
2063
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1966
2064
|
}
|
|
1967
2065
|
export interface DeleteCustomDiscountsRequest {
|
|
1968
2066
|
/**
|
|
1969
|
-
*
|
|
2067
|
+
* Draft order ID.
|
|
1970
2068
|
* @format GUID
|
|
1971
2069
|
*/
|
|
1972
2070
|
draftOrderId: string;
|
|
1973
2071
|
/**
|
|
1974
|
-
*
|
|
2072
|
+
* Ids of discounts to remove.
|
|
1975
2073
|
* @format GUID
|
|
1976
2074
|
* @minSize 1
|
|
1977
2075
|
* @maxSize 100
|
|
@@ -1979,34 +2077,35 @@ export interface DeleteCustomDiscountsRequest {
|
|
|
1979
2077
|
discountIds: string[];
|
|
1980
2078
|
}
|
|
1981
2079
|
export interface DeleteCustomDiscountsResponse {
|
|
1982
|
-
/**
|
|
2080
|
+
/** Draft order details calculated with latest content. */
|
|
1983
2081
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
1984
2082
|
}
|
|
1985
2083
|
export interface SetAdditionalFeesRequest {
|
|
1986
2084
|
/**
|
|
1987
|
-
*
|
|
2085
|
+
* Draft order ID.
|
|
1988
2086
|
* @format GUID
|
|
1989
2087
|
*/
|
|
1990
2088
|
draftOrderId: string;
|
|
1991
2089
|
/**
|
|
1992
|
-
*
|
|
2090
|
+
* Additional fee IDs to apply/unapply.
|
|
2091
|
+
* Existing additional fees, not mentioned in this list, will keep their current state.
|
|
1993
2092
|
* @minSize 1
|
|
1994
2093
|
* @maxSize 100
|
|
1995
2094
|
*/
|
|
1996
2095
|
additionalFees: IdAndApplied[];
|
|
1997
2096
|
}
|
|
1998
2097
|
export interface SetAdditionalFeesResponse {
|
|
1999
|
-
/**
|
|
2098
|
+
/** Draft order details calculated with latest content. */
|
|
2000
2099
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2001
2100
|
}
|
|
2002
2101
|
export interface CreateCustomAdditionalFeesRequest {
|
|
2003
2102
|
/**
|
|
2004
|
-
*
|
|
2103
|
+
* Draft order ID.
|
|
2005
2104
|
* @format GUID
|
|
2006
2105
|
*/
|
|
2007
2106
|
draftOrderId: string;
|
|
2008
2107
|
/**
|
|
2009
|
-
* The additional fees to
|
|
2108
|
+
* The additional fees to create. Created fees are unapplied by default.
|
|
2010
2109
|
* @minSize 1
|
|
2011
2110
|
* @maxSize 100
|
|
2012
2111
|
*/
|
|
@@ -2025,7 +2124,7 @@ export interface AdditionalFeeOption {
|
|
|
2025
2124
|
taxDetails?: TaxDetails;
|
|
2026
2125
|
/**
|
|
2027
2126
|
* Should apply the additional fee. default = false.
|
|
2028
|
-
* if not set or false, then to apply them, please call ApplyAdditionalFees with the added additional fee
|
|
2127
|
+
* if not set or false, then to apply them, please call ApplyAdditionalFees with the added additional fee IDs.
|
|
2029
2128
|
*/
|
|
2030
2129
|
applyToDraftOrder?: boolean | null;
|
|
2031
2130
|
/**
|
|
@@ -2034,19 +2133,26 @@ export interface AdditionalFeeOption {
|
|
|
2034
2133
|
* @maxLength 100
|
|
2035
2134
|
*/
|
|
2036
2135
|
code?: string | null;
|
|
2136
|
+
/**
|
|
2137
|
+
* Optional - Line items associated with this additional fee.
|
|
2138
|
+
* If no `lineItemIds` are provided, the fee will be associated with the whole order.
|
|
2139
|
+
* @format GUID
|
|
2140
|
+
* @maxSize 300
|
|
2141
|
+
*/
|
|
2142
|
+
lineItemIds?: string[];
|
|
2037
2143
|
}
|
|
2038
2144
|
export interface CreateCustomAdditionalFeesResponse {
|
|
2039
|
-
/**
|
|
2145
|
+
/** Draft order details calculated with latest content. */
|
|
2040
2146
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2041
2147
|
}
|
|
2042
2148
|
export interface DeleteCustomAdditionalFeesRequest {
|
|
2043
2149
|
/**
|
|
2044
|
-
*
|
|
2150
|
+
* Draft order ID.
|
|
2045
2151
|
* @format GUID
|
|
2046
2152
|
*/
|
|
2047
2153
|
draftOrderId: string;
|
|
2048
2154
|
/**
|
|
2049
|
-
*
|
|
2155
|
+
* Ids of additional fees to remove.
|
|
2050
2156
|
* @format GUID
|
|
2051
2157
|
* @minSize 1
|
|
2052
2158
|
* @maxSize 100
|
|
@@ -2054,93 +2160,138 @@ export interface DeleteCustomAdditionalFeesRequest {
|
|
|
2054
2160
|
customAdditionalFees: string[];
|
|
2055
2161
|
}
|
|
2056
2162
|
export interface DeleteCustomAdditionalFeesResponse {
|
|
2057
|
-
/**
|
|
2163
|
+
/** Draft order details calculated with latest content. */
|
|
2058
2164
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2059
2165
|
}
|
|
2060
2166
|
export interface SetShippingInfoRequest {
|
|
2167
|
+
/**
|
|
2168
|
+
* Draft order ID.
|
|
2169
|
+
* @format GUID
|
|
2170
|
+
*/
|
|
2171
|
+
draftOrderId: string;
|
|
2172
|
+
/** Shipping information. Empty value removes shipping information from draft. */
|
|
2173
|
+
shippingInfo?: V1ShippingInformation;
|
|
2061
2174
|
}
|
|
2062
2175
|
export interface SetShippingInfoResponse {
|
|
2176
|
+
/** Draft order details calculated with latest content. */
|
|
2177
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2063
2178
|
}
|
|
2064
2179
|
export interface SetBuyerInfoRequest {
|
|
2180
|
+
/**
|
|
2181
|
+
* Draft order ID.
|
|
2182
|
+
* @format GUID
|
|
2183
|
+
*/
|
|
2184
|
+
draftOrderId: string;
|
|
2185
|
+
/** Buyer information. Empty value removes buyer information from draft. */
|
|
2186
|
+
buyerInfo?: BuyerInfo;
|
|
2065
2187
|
}
|
|
2066
2188
|
export interface SetBuyerInfoResponse {
|
|
2189
|
+
/** Draft order details calculated with latest content. */
|
|
2190
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2067
2191
|
}
|
|
2068
2192
|
export interface SetRecipientInfoRequest {
|
|
2193
|
+
/**
|
|
2194
|
+
* Draft order ID.
|
|
2195
|
+
* @format GUID
|
|
2196
|
+
*/
|
|
2197
|
+
draftOrderId: string;
|
|
2198
|
+
/** Order recipient address and contact details. Empty value removes recipient information from draft. */
|
|
2199
|
+
recipientInfo?: AddressWithContact;
|
|
2069
2200
|
}
|
|
2070
2201
|
export interface SetRecipientInfoResponse {
|
|
2202
|
+
/** Draft order details calculated with latest content. */
|
|
2203
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2071
2204
|
}
|
|
2072
2205
|
export interface SetBillingInfoRequest {
|
|
2206
|
+
/**
|
|
2207
|
+
* Draft order ID.
|
|
2208
|
+
* @format GUID
|
|
2209
|
+
*/
|
|
2210
|
+
draftOrderId: string;
|
|
2211
|
+
/** Billing address and contact details. Empty value removes billing information from draft. */
|
|
2212
|
+
billingInfo?: AddressWithContact;
|
|
2073
2213
|
}
|
|
2074
2214
|
export interface SetBillingInfoResponse {
|
|
2215
|
+
/** Draft order details calculated with latest content. */
|
|
2216
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2075
2217
|
}
|
|
2218
|
+
/** Deprecated */
|
|
2076
2219
|
export interface UpdateShippingInfoRequest {
|
|
2077
2220
|
/**
|
|
2078
|
-
*
|
|
2221
|
+
* Draft order ID.
|
|
2079
2222
|
* @format GUID
|
|
2080
2223
|
*/
|
|
2081
2224
|
draftOrderId?: string;
|
|
2082
|
-
/**
|
|
2225
|
+
/** Update the shipping option on the order. If not set then the selected shipping is removed. */
|
|
2083
2226
|
shippingOption?: ShippingOption;
|
|
2084
2227
|
}
|
|
2228
|
+
/** Deprecated */
|
|
2085
2229
|
export interface UpdateShippingInfoResponse {
|
|
2086
|
-
/**
|
|
2230
|
+
/** Draft order details calculated with latest content. */
|
|
2087
2231
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2088
2232
|
}
|
|
2089
2233
|
export interface GetDraftOrderRequest {
|
|
2090
2234
|
/**
|
|
2091
|
-
*
|
|
2235
|
+
* Draft order ID.
|
|
2092
2236
|
* @format GUID
|
|
2093
2237
|
*/
|
|
2094
2238
|
draftOrderId: string;
|
|
2095
2239
|
}
|
|
2096
2240
|
export interface GetDraftOrderResponse {
|
|
2097
|
-
/**
|
|
2241
|
+
/** Draft order details calculated with latest content. */
|
|
2098
2242
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2099
2243
|
}
|
|
2100
2244
|
export interface GetOrderDraftabilityStatusRequest {
|
|
2101
2245
|
/**
|
|
2102
|
-
* Order
|
|
2103
|
-
* @
|
|
2104
|
-
* @maxLength 100
|
|
2246
|
+
* Order Id.
|
|
2247
|
+
* @format GUID
|
|
2105
2248
|
*/
|
|
2106
2249
|
orderId: string;
|
|
2107
2250
|
}
|
|
2108
2251
|
export interface GetOrderDraftabilityStatusResponse {
|
|
2109
2252
|
/**
|
|
2110
|
-
* Order
|
|
2111
|
-
* @
|
|
2112
|
-
* @maxLength 100
|
|
2253
|
+
* Order Id.
|
|
2254
|
+
* @format GUID
|
|
2113
2255
|
*/
|
|
2114
2256
|
orderId?: string;
|
|
2115
|
-
/**
|
|
2257
|
+
/** Flag, indicating whether a draft can be created from this order. */
|
|
2116
2258
|
orderDraftable?: boolean;
|
|
2117
2259
|
/**
|
|
2118
|
-
* Reasons why the order is not draftable
|
|
2260
|
+
* Reasons why the order is not draftable.
|
|
2119
2261
|
* @maxSize 5
|
|
2120
2262
|
*/
|
|
2121
2263
|
nonDraftableReasons?: NonDraftableReason[];
|
|
2122
2264
|
}
|
|
2123
2265
|
export declare enum NonDraftableReason {
|
|
2124
2266
|
UNSPECIFIED = "UNSPECIFIED",
|
|
2267
|
+
/** Modifications of refunded orders are not supported. */
|
|
2125
2268
|
PARTIALLY_OR_FULLY_REFUNDED = "PARTIALLY_OR_FULLY_REFUNDED",
|
|
2269
|
+
/**
|
|
2270
|
+
* Original order must be created via one of the following channel types:
|
|
2271
|
+
* + WEB
|
|
2272
|
+
* + POS
|
|
2273
|
+
* + BACKOFFICE_MERCHANT
|
|
2274
|
+
* + WIX_APP_STORE
|
|
2275
|
+
*/
|
|
2126
2276
|
UNSUPPORTED_CHANNEL_TYPE = "UNSUPPORTED_CHANNEL_TYPE",
|
|
2277
|
+
/** Order status is not APPROVED. */
|
|
2127
2278
|
ORDER_STATUS_IS_NOT_SUPPORTED = "ORDER_STATUS_IS_NOT_SUPPORTED",
|
|
2279
|
+
/** Site and order currencies are different. */
|
|
2128
2280
|
ORDER_AND_SITE_CURRENCIES_ARE_INCONSISTENT = "ORDER_AND_SITE_CURRENCIES_ARE_INCONSISTENT",
|
|
2281
|
+
/** Site and order weight units are different. */
|
|
2129
2282
|
ORDER_AND_SITE_WEIGHT_UNITS_ARE_INCONSISTENT = "ORDER_AND_SITE_WEIGHT_UNITS_ARE_INCONSISTENT",
|
|
2130
|
-
|
|
2131
|
-
/** remove - this is not a reason, it's an error */
|
|
2283
|
+
/** Order not found. */
|
|
2132
2284
|
ORDER_NOT_FOUND = "ORDER_NOT_FOUND",
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
TAXABLE_EXISTING_ADDITIONAL_FEE = "TAXABLE_EXISTING_ADDITIONAL_FEE"
|
|
2285
|
+
/** Modifications of orders with subscription items are not supported. */
|
|
2286
|
+
SUBSCRIPTION_LINE_ITEM_EXISTS = "SUBSCRIPTION_LINE_ITEM_EXISTS"
|
|
2136
2287
|
}
|
|
2137
2288
|
export interface CommitDraftOrderRequest {
|
|
2138
2289
|
/**
|
|
2139
|
-
*
|
|
2290
|
+
* Draft order ID.
|
|
2140
2291
|
* @format GUID
|
|
2141
2292
|
*/
|
|
2142
2293
|
draftOrderId: string;
|
|
2143
|
-
/** Optional side effects to trigger */
|
|
2294
|
+
/** Optional side effects to trigger. */
|
|
2144
2295
|
commitSettings?: DraftOrderCommitSettings;
|
|
2145
2296
|
/**
|
|
2146
2297
|
* Reason for edit, given by user (optional).
|
|
@@ -2149,9 +2300,9 @@ export interface CommitDraftOrderRequest {
|
|
|
2149
2300
|
reason?: string | null;
|
|
2150
2301
|
}
|
|
2151
2302
|
export interface CommitDraftOrderResponse {
|
|
2152
|
-
/**
|
|
2303
|
+
/** Draft order after commit. */
|
|
2153
2304
|
committedDraftOrder?: DraftOrder;
|
|
2154
|
-
/**
|
|
2305
|
+
/** Updated order after commit. */
|
|
2155
2306
|
orderAfterCommit?: Order;
|
|
2156
2307
|
}
|
|
2157
2308
|
export interface Order {
|
|
@@ -3206,16 +3357,48 @@ export interface TagList {
|
|
|
3206
3357
|
tagIds?: string[];
|
|
3207
3358
|
}
|
|
3208
3359
|
export interface CreateOrderFromDraftRequest {
|
|
3360
|
+
/**
|
|
3361
|
+
* Draft order ID.
|
|
3362
|
+
* @format GUID
|
|
3363
|
+
*/
|
|
3364
|
+
draftOrderId: string;
|
|
3365
|
+
/** Optional side effects to trigger. */
|
|
3366
|
+
createSettings?: OrderCreateSettings;
|
|
3367
|
+
/**
|
|
3368
|
+
* Reason for order creation, given by user (optional).
|
|
3369
|
+
* @maxLength 200
|
|
3370
|
+
*/
|
|
3371
|
+
reason?: string | null;
|
|
3372
|
+
/** Information about the sales channel that submitted this order. */
|
|
3373
|
+
channelInfo?: ChannelInfo;
|
|
3209
3374
|
}
|
|
3210
3375
|
export interface OrderCreateSettings {
|
|
3376
|
+
/** Notification settings to be applied on order creation */
|
|
3377
|
+
notifications?: OrderCreateNotifications;
|
|
3211
3378
|
}
|
|
3212
3379
|
export interface OrderCreateNotifications {
|
|
3380
|
+
/**
|
|
3381
|
+
* Whether to send notification to the buyer.
|
|
3382
|
+
*
|
|
3383
|
+
* Default: `true`
|
|
3384
|
+
*/
|
|
3385
|
+
sendNotificationToBuyer?: boolean | null;
|
|
3386
|
+
/**
|
|
3387
|
+
* Whether to send notifications to the business.
|
|
3388
|
+
*
|
|
3389
|
+
* Default: `true`
|
|
3390
|
+
*/
|
|
3391
|
+
sendNotificationsToBusiness?: boolean | null;
|
|
3213
3392
|
}
|
|
3214
3393
|
export interface CreateOrderFromDraftResponse {
|
|
3394
|
+
/** The draft order after commit. */
|
|
3395
|
+
committedDraftOrder?: DraftOrder;
|
|
3396
|
+
/** Created order. */
|
|
3397
|
+
createdOrder?: Order;
|
|
3215
3398
|
}
|
|
3216
3399
|
export interface DeleteDraftOrderRequest {
|
|
3217
3400
|
/**
|
|
3218
|
-
*
|
|
3401
|
+
* Draft order ID.
|
|
3219
3402
|
* @format GUID
|
|
3220
3403
|
*/
|
|
3221
3404
|
draftOrderId: string;
|
|
@@ -3223,7 +3406,7 @@ export interface DeleteDraftOrderRequest {
|
|
|
3223
3406
|
export interface DeleteDraftOrderResponse {
|
|
3224
3407
|
}
|
|
3225
3408
|
export interface QueryDraftOrdersRequest {
|
|
3226
|
-
/**
|
|
3409
|
+
/** Query options. */
|
|
3227
3410
|
query?: CursorQuery;
|
|
3228
3411
|
}
|
|
3229
3412
|
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
@@ -3285,7 +3468,7 @@ export interface CursorPaging {
|
|
|
3285
3468
|
cursor?: string | null;
|
|
3286
3469
|
}
|
|
3287
3470
|
export interface QueryDraftOrdersResponse {
|
|
3288
|
-
/**
|
|
3471
|
+
/** Draft orders, found by query. */
|
|
3289
3472
|
draftOrders?: DraftOrder[];
|
|
3290
3473
|
/** Paging metadata. */
|
|
3291
3474
|
pagingMetadata?: CursorPagingMetadata;
|
|
@@ -3317,42 +3500,45 @@ export interface Cursors {
|
|
|
3317
3500
|
}
|
|
3318
3501
|
export interface UpdateExtendedFieldsRequest {
|
|
3319
3502
|
/** ID of the entity to update. */
|
|
3320
|
-
_id
|
|
3503
|
+
_id: string;
|
|
3321
3504
|
/** Identifier for the app whose extended fields are being updated. */
|
|
3322
|
-
namespace
|
|
3505
|
+
namespace: string;
|
|
3323
3506
|
/** 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. */
|
|
3324
|
-
namespaceData
|
|
3507
|
+
namespaceData: Record<string, any> | null;
|
|
3325
3508
|
}
|
|
3326
3509
|
export interface UpdateExtendedFieldsResponse {
|
|
3327
|
-
/** Updated
|
|
3510
|
+
/** Updated draft order. */
|
|
3328
3511
|
draftOrder?: DraftOrder;
|
|
3329
3512
|
}
|
|
3330
3513
|
export interface SetTaxExemptionRequest {
|
|
3331
|
-
}
|
|
3332
|
-
export interface SetTaxExemptionResponse {
|
|
3333
|
-
}
|
|
3334
|
-
export interface GetDraftEditabilityStatusRequest {
|
|
3335
3514
|
/**
|
|
3336
3515
|
* Draft order ID.
|
|
3337
3516
|
* @format GUID
|
|
3338
3517
|
*/
|
|
3339
|
-
draftOrderId
|
|
3518
|
+
draftOrderId: string;
|
|
3519
|
+
/**
|
|
3520
|
+
* Flag, indicating whether the draft order is exempt from tax calculations.
|
|
3521
|
+
*
|
|
3522
|
+
* Default: `false`
|
|
3523
|
+
*/
|
|
3524
|
+
taxExempt: boolean | null;
|
|
3340
3525
|
}
|
|
3341
|
-
export interface
|
|
3526
|
+
export interface SetTaxExemptionResponse {
|
|
3527
|
+
/** Draft order details calculated with latest content. */
|
|
3528
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3529
|
+
}
|
|
3530
|
+
export interface SetBusinessLocationRequest {
|
|
3342
3531
|
/**
|
|
3343
3532
|
* Draft order ID.
|
|
3344
3533
|
* @format GUID
|
|
3345
3534
|
*/
|
|
3346
|
-
draftOrderId
|
|
3347
|
-
/**
|
|
3348
|
-
|
|
3349
|
-
* @readonly
|
|
3350
|
-
*/
|
|
3351
|
-
status?: EditingStatus;
|
|
3352
|
-
}
|
|
3353
|
-
export interface SetBusinessLocationRequest {
|
|
3535
|
+
draftOrderId: string;
|
|
3536
|
+
/** Business location. */
|
|
3537
|
+
businessLocation?: Location;
|
|
3354
3538
|
}
|
|
3355
3539
|
export interface SetBusinessLocationResponse {
|
|
3540
|
+
/** Draft order details calculated with latest content. */
|
|
3541
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
3356
3542
|
}
|
|
3357
3543
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
3358
3544
|
createdEvent?: EntityCreatedEvent;
|
|
@@ -3494,13 +3680,13 @@ export declare enum WebhookIdentityType {
|
|
|
3494
3680
|
WIX_USER = "WIX_USER",
|
|
3495
3681
|
APP = "APP"
|
|
3496
3682
|
}
|
|
3497
|
-
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.
|
|
3683
|
+
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.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`;
|
|
3498
3684
|
/**
|
|
3499
3685
|
* Creates or gets a draft order.
|
|
3500
3686
|
*
|
|
3501
3687
|
* When passing the ID of an order that is already in draft, the existing draft order will be returned.
|
|
3502
|
-
* To complete a draft and update the order, call
|
|
3503
|
-
* @param orderId -
|
|
3688
|
+
* 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)).
|
|
3689
|
+
* @param orderId - Existing order ID to create draft from.
|
|
3504
3690
|
* @public
|
|
3505
3691
|
* @documentationMaturity preview
|
|
3506
3692
|
* @requiredField orderId
|
|
@@ -3513,8 +3699,6 @@ type DraftOrderNonNullablePaths = `lineItems` | `lineItems.${number}.added` | `l
|
|
|
3513
3699
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3514
3700
|
* @permissionScope Manage eCommerce - all permissions
|
|
3515
3701
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3516
|
-
* @permissionScope Picasso private app mega scope
|
|
3517
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3518
3702
|
* @applicableIdentity APP
|
|
3519
3703
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateDraftOrder
|
|
3520
3704
|
*/
|
|
@@ -3534,8 +3718,6 @@ export declare function createDraftOrder(orderId: string): Promise<NonNullablePa
|
|
|
3534
3718
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3535
3719
|
* @permissionScope Manage eCommerce - all permissions
|
|
3536
3720
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3537
|
-
* @permissionScope Picasso private app mega scope
|
|
3538
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3539
3721
|
* @applicableIdentity APP
|
|
3540
3722
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateEmptyDraftOrder
|
|
3541
3723
|
*/
|
|
@@ -3544,7 +3726,7 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
3544
3726
|
}[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`>>;
|
|
3545
3727
|
/**
|
|
3546
3728
|
* Adds line items to a draft order.
|
|
3547
|
-
* @param draftOrderId -
|
|
3729
|
+
* @param draftOrderId - Draft order ID.
|
|
3548
3730
|
* @public
|
|
3549
3731
|
* @documentationMaturity preview
|
|
3550
3732
|
* @requiredField draftOrderId
|
|
@@ -3556,8 +3738,6 @@ export declare function createEmptyDraftOrder(): Promise<NonNullablePaths<Create
|
|
|
3556
3738
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3557
3739
|
* @permissionScope Manage eCommerce - all permissions
|
|
3558
3740
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3559
|
-
* @permissionScope Picasso private app mega scope
|
|
3560
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3561
3741
|
* @applicableIdentity APP
|
|
3562
3742
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.AddLineItemsToDraftOrder
|
|
3563
3743
|
*/
|
|
@@ -3584,10 +3764,13 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3584
3764
|
* > + Passing a quantity of `0` will remove the line item.
|
|
3585
3765
|
* > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`.
|
|
3586
3766
|
* > + 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).
|
|
3587
|
-
* @param draftOrderId -
|
|
3767
|
+
* @param draftOrderId - Draft order ID.
|
|
3768
|
+
* @param lineItemChanges - Details of changes to apply per line item.
|
|
3588
3769
|
* @public
|
|
3589
3770
|
* @documentationMaturity preview
|
|
3590
3771
|
* @requiredField draftOrderId
|
|
3772
|
+
* @requiredField lineItemChanges
|
|
3773
|
+
* @requiredField lineItemChanges.lineItemId
|
|
3591
3774
|
* @permissionId ECOM.DRAFT_ORDERS_MODIFY_ITEMS
|
|
3592
3775
|
* @permissionScope Manage Stores - all permissions
|
|
3593
3776
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -3595,31 +3778,25 @@ export interface AddLineItemsToDraftOrderOptions {
|
|
|
3595
3778
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3596
3779
|
* @permissionScope Manage eCommerce - all permissions
|
|
3597
3780
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3598
|
-
* @permissionScope Picasso private app mega scope
|
|
3599
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3600
3781
|
* @applicableIdentity APP
|
|
3601
3782
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.UpdateLineItems
|
|
3602
3783
|
*/
|
|
3603
|
-
export declare function updateLineItems(draftOrderId: string,
|
|
3784
|
+
export declare function updateLineItems(draftOrderId: string, lineItemChanges: NonNullablePaths<LineItemChangeDetails, `lineItemId`>[]): Promise<NonNullablePaths<UpdateLineItemsResponse, {
|
|
3604
3785
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3605
3786
|
}[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`>>;
|
|
3606
|
-
export interface UpdateLineItemsOptions {
|
|
3607
|
-
/**
|
|
3608
|
-
* Details of changes to apply per line item
|
|
3609
|
-
* @minSize 1
|
|
3610
|
-
* @maxSize 300
|
|
3611
|
-
*/
|
|
3612
|
-
lineItemChanges?: LineItemChangeDetails[];
|
|
3613
|
-
}
|
|
3614
3787
|
/**
|
|
3615
|
-
*
|
|
3788
|
+
* Applies or unapplies discounts on a draft order.
|
|
3616
3789
|
*
|
|
3617
|
-
*
|
|
3618
|
-
*
|
|
3619
|
-
* @param
|
|
3790
|
+
* Unapplied discounts are still part of draft order, but do not affect balance.
|
|
3791
|
+
* Existing discounts, not mentioned in request, will keep their current state.
|
|
3792
|
+
* @param draftOrderId - Draft order ID.
|
|
3793
|
+
* @param discounts - Discount IDs to apply/unapply.
|
|
3794
|
+
* Existing discounts, not mentioned in request, will keep their current state.
|
|
3620
3795
|
* @public
|
|
3621
3796
|
* @documentationMaturity preview
|
|
3622
3797
|
* @requiredField discounts
|
|
3798
|
+
* @requiredField discounts._id
|
|
3799
|
+
* @requiredField discounts.applied
|
|
3623
3800
|
* @requiredField draftOrderId
|
|
3624
3801
|
* @permissionId ECOM.DRAFT_ORDERS_SET_DISCOUNTS
|
|
3625
3802
|
* @permissionScope Manage Stores - all permissions
|
|
@@ -3628,23 +3805,24 @@ export interface UpdateLineItemsOptions {
|
|
|
3628
3805
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3629
3806
|
* @permissionScope Manage eCommerce - all permissions
|
|
3630
3807
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3631
|
-
* @permissionScope Picasso private app mega scope
|
|
3632
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3633
3808
|
* @applicableIdentity APP
|
|
3634
3809
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetDiscounts
|
|
3635
3810
|
*/
|
|
3636
|
-
export declare function setDiscounts(draftOrderId: string, discounts: IdAndApplied[]): Promise<NonNullablePaths<SetDiscountsResponse, {
|
|
3811
|
+
export declare function setDiscounts(draftOrderId: string, discounts: NonNullablePaths<IdAndApplied, `_id` | `applied`>[]): Promise<NonNullablePaths<SetDiscountsResponse, {
|
|
3637
3812
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3638
3813
|
}[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`>>;
|
|
3639
3814
|
/**
|
|
3640
|
-
*
|
|
3641
|
-
*
|
|
3815
|
+
* Create custom discounts on a draft order.
|
|
3816
|
+
*
|
|
3817
|
+
* Newly added discounts are unapplied by default.
|
|
3818
|
+
* 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)).
|
|
3819
|
+
* @param draftOrderId - Draft order ID.
|
|
3642
3820
|
* @public
|
|
3643
3821
|
* @documentationMaturity preview
|
|
3644
3822
|
* @requiredField draftOrderId
|
|
3645
|
-
* @requiredField options.discounts.amount
|
|
3646
3823
|
* @requiredField options.discounts.amount.amount
|
|
3647
3824
|
* @requiredField options.discounts.discountType
|
|
3825
|
+
* @requiredField options.discounts.priceAmount.amount
|
|
3648
3826
|
* @permissionId ECOM.DRAFT_ORDERS_ADD_DISCOUNTS
|
|
3649
3827
|
* @permissionScope Manage Stores - all permissions
|
|
3650
3828
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -3652,17 +3830,15 @@ export declare function setDiscounts(draftOrderId: string, discounts: IdAndAppli
|
|
|
3652
3830
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3653
3831
|
* @permissionScope Manage eCommerce - all permissions
|
|
3654
3832
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3655
|
-
* @permissionScope Picasso private app mega scope
|
|
3656
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3657
3833
|
* @applicableIdentity APP
|
|
3658
3834
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateCustomDiscounts
|
|
3659
3835
|
*/
|
|
3660
|
-
export declare function createCustomDiscounts(draftOrderId: string, options?: NonNullablePaths<CreateCustomDiscountsOptions, `discounts.${number}.amount` | `discounts.${number}.
|
|
3836
|
+
export declare function createCustomDiscounts(draftOrderId: string, options?: NonNullablePaths<CreateCustomDiscountsOptions, `discounts.${number}.amount.amount` | `discounts.${number}.discountType` | `discounts.${number}.priceAmount.amount`>): Promise<NonNullablePaths<CreateCustomDiscountsResponse, {
|
|
3661
3837
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3662
3838
|
}[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`>>;
|
|
3663
3839
|
export interface CreateCustomDiscountsOptions {
|
|
3664
3840
|
/**
|
|
3665
|
-
*
|
|
3841
|
+
* Discounts to create. Created discounts are unapplied by default.
|
|
3666
3842
|
* @minSize 1
|
|
3667
3843
|
* @maxSize 100
|
|
3668
3844
|
*/
|
|
@@ -3670,8 +3846,8 @@ export interface CreateCustomDiscountsOptions {
|
|
|
3670
3846
|
}
|
|
3671
3847
|
/**
|
|
3672
3848
|
* Remove custom discounts from the order.
|
|
3673
|
-
* @param draftOrderId -
|
|
3674
|
-
* @param discountIds -
|
|
3849
|
+
* @param draftOrderId - Draft order ID.
|
|
3850
|
+
* @param discountIds - Ids of discounts to remove.
|
|
3675
3851
|
* @public
|
|
3676
3852
|
* @documentationMaturity preview
|
|
3677
3853
|
* @requiredField discountIds
|
|
@@ -3683,8 +3859,6 @@ export interface CreateCustomDiscountsOptions {
|
|
|
3683
3859
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3684
3860
|
* @permissionScope Manage eCommerce - all permissions
|
|
3685
3861
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3686
|
-
* @permissionScope Picasso private app mega scope
|
|
3687
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3688
3862
|
* @applicableIdentity APP
|
|
3689
3863
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.DeleteCustomDiscounts
|
|
3690
3864
|
*/
|
|
@@ -3692,13 +3866,18 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
3692
3866
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3693
3867
|
}[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`>>;
|
|
3694
3868
|
/**
|
|
3695
|
-
*
|
|
3696
|
-
*
|
|
3697
|
-
*
|
|
3698
|
-
*
|
|
3869
|
+
* Applies or unapplies additional fees on a draft order.
|
|
3870
|
+
*
|
|
3871
|
+
* Unapplied fees are still part of draft order, but do not affect balance.
|
|
3872
|
+
* Existing additional fees, not mentioned in request, will keep their current state.
|
|
3873
|
+
* @param draftOrderId - Draft order ID.
|
|
3874
|
+
* @param additionalFees - Additional fee IDs to apply/unapply.
|
|
3875
|
+
* Existing additional fees, not mentioned in this list, will keep their current state.
|
|
3699
3876
|
* @public
|
|
3700
3877
|
* @documentationMaturity preview
|
|
3701
3878
|
* @requiredField additionalFees
|
|
3879
|
+
* @requiredField additionalFees._id
|
|
3880
|
+
* @requiredField additionalFees.applied
|
|
3702
3881
|
* @requiredField draftOrderId
|
|
3703
3882
|
* @permissionId ECOM.DRAFT_ORDERS_SET_ADDITIONAL_FEES
|
|
3704
3883
|
* @permissionScope Manage Stores - all permissions
|
|
@@ -3707,19 +3886,18 @@ export declare function deleteCustomDiscounts(draftOrderId: string, discountIds:
|
|
|
3707
3886
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3708
3887
|
* @permissionScope Manage eCommerce - all permissions
|
|
3709
3888
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3710
|
-
* @permissionScope Picasso private app mega scope
|
|
3711
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3712
3889
|
* @applicableIdentity APP
|
|
3713
3890
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetAdditionalFees
|
|
3714
3891
|
*/
|
|
3715
|
-
export declare function setAdditionalFees(draftOrderId: string, additionalFees: IdAndApplied[]): Promise<NonNullablePaths<SetAdditionalFeesResponse, {
|
|
3892
|
+
export declare function setAdditionalFees(draftOrderId: string, additionalFees: NonNullablePaths<IdAndApplied, `_id` | `applied`>[]): Promise<NonNullablePaths<SetAdditionalFeesResponse, {
|
|
3716
3893
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3717
3894
|
}[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`>>;
|
|
3718
3895
|
/**
|
|
3719
|
-
*
|
|
3720
|
-
*
|
|
3721
|
-
*
|
|
3722
|
-
*
|
|
3896
|
+
* Creates custom additional fees on a draft order.
|
|
3897
|
+
*
|
|
3898
|
+
* Newly added additional fees are unapplied by default.
|
|
3899
|
+
* 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)).
|
|
3900
|
+
* @param draftOrderId - Draft order ID.
|
|
3723
3901
|
* @public
|
|
3724
3902
|
* @documentationMaturity preview
|
|
3725
3903
|
* @requiredField draftOrderId
|
|
@@ -3733,8 +3911,6 @@ export declare function setAdditionalFees(draftOrderId: string, additionalFees:
|
|
|
3733
3911
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3734
3912
|
* @permissionScope Manage eCommerce - all permissions
|
|
3735
3913
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3736
|
-
* @permissionScope Picasso private app mega scope
|
|
3737
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3738
3914
|
* @applicableIdentity APP
|
|
3739
3915
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateCustomAdditionalFees
|
|
3740
3916
|
*/
|
|
@@ -3743,7 +3919,7 @@ export declare function createCustomAdditionalFees(draftOrderId: string, options
|
|
|
3743
3919
|
}[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`>>;
|
|
3744
3920
|
export interface CreateCustomAdditionalFeesOptions {
|
|
3745
3921
|
/**
|
|
3746
|
-
* The additional fees to
|
|
3922
|
+
* The additional fees to create. Created fees are unapplied by default.
|
|
3747
3923
|
* @minSize 1
|
|
3748
3924
|
* @maxSize 100
|
|
3749
3925
|
*/
|
|
@@ -3751,8 +3927,8 @@ export interface CreateCustomAdditionalFeesOptions {
|
|
|
3751
3927
|
}
|
|
3752
3928
|
/**
|
|
3753
3929
|
* Remove custom additional fees from the order.
|
|
3754
|
-
* @param draftOrderId -
|
|
3755
|
-
* @param customAdditionalFees -
|
|
3930
|
+
* @param draftOrderId - Draft order ID.
|
|
3931
|
+
* @param customAdditionalFees - Ids of additional fees to remove.
|
|
3756
3932
|
* @public
|
|
3757
3933
|
* @documentationMaturity preview
|
|
3758
3934
|
* @requiredField customAdditionalFees
|
|
@@ -3764,8 +3940,6 @@ export interface CreateCustomAdditionalFeesOptions {
|
|
|
3764
3940
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3765
3941
|
* @permissionScope Manage eCommerce - all permissions
|
|
3766
3942
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3767
|
-
* @permissionScope Picasso private app mega scope
|
|
3768
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3769
3943
|
* @applicableIdentity APP
|
|
3770
3944
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.DeleteCustomAdditionalFees
|
|
3771
3945
|
*/
|
|
@@ -3773,9 +3947,11 @@ export declare function deleteCustomAdditionalFees(draftOrderId: string, customA
|
|
|
3773
3947
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3774
3948
|
}[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`>>;
|
|
3775
3949
|
/**
|
|
3776
|
-
* Sets shipping
|
|
3950
|
+
* Sets shipping information on a draft order.
|
|
3951
|
+
* @param draftOrderId - Draft order ID.
|
|
3777
3952
|
* @public
|
|
3778
3953
|
* @documentationMaturity preview
|
|
3954
|
+
* @requiredField draftOrderId
|
|
3779
3955
|
* @permissionId ECOM.DRAFT_ORDERS_SET_SHIPPING_INFO
|
|
3780
3956
|
* @permissionScope Manage Stores - all permissions
|
|
3781
3957
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -3783,16 +3959,22 @@ export declare function deleteCustomAdditionalFees(draftOrderId: string, customA
|
|
|
3783
3959
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3784
3960
|
* @permissionScope Manage eCommerce - all permissions
|
|
3785
3961
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3786
|
-
* @permissionScope Picasso private app mega scope
|
|
3787
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3788
3962
|
* @applicableIdentity APP
|
|
3789
3963
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetShippingInfo
|
|
3790
3964
|
*/
|
|
3791
|
-
export declare function setShippingInfo(): Promise<
|
|
3965
|
+
export declare function setShippingInfo(draftOrderId: string, options?: SetShippingInfoOptions): Promise<NonNullablePaths<SetShippingInfoResponse, {
|
|
3966
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3967
|
+
}[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`>>;
|
|
3968
|
+
export interface SetShippingInfoOptions {
|
|
3969
|
+
/** Shipping information. Empty value removes shipping information from draft. */
|
|
3970
|
+
shippingInfo?: V1ShippingInformation;
|
|
3971
|
+
}
|
|
3792
3972
|
/**
|
|
3793
|
-
* Sets buyer info
|
|
3973
|
+
* Sets buyer info on a draft order.
|
|
3974
|
+
* @param draftOrderId - Draft order ID.
|
|
3794
3975
|
* @public
|
|
3795
3976
|
* @documentationMaturity preview
|
|
3977
|
+
* @requiredField draftOrderId
|
|
3796
3978
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUYER_INFO
|
|
3797
3979
|
* @permissionScope Manage Stores - all permissions
|
|
3798
3980
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -3800,16 +3982,22 @@ export declare function setShippingInfo(): Promise<void>;
|
|
|
3800
3982
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3801
3983
|
* @permissionScope Manage eCommerce - all permissions
|
|
3802
3984
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3803
|
-
* @permissionScope Picasso private app mega scope
|
|
3804
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3805
3985
|
* @applicableIdentity APP
|
|
3806
3986
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetBuyerInfo
|
|
3807
3987
|
*/
|
|
3808
|
-
export declare function setBuyerInfo(): Promise<
|
|
3988
|
+
export declare function setBuyerInfo(draftOrderId: string, options?: SetBuyerInfoOptions): Promise<NonNullablePaths<SetBuyerInfoResponse, {
|
|
3989
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3990
|
+
}[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`>>;
|
|
3991
|
+
export interface SetBuyerInfoOptions {
|
|
3992
|
+
/** Buyer information. Empty value removes buyer information from draft. */
|
|
3993
|
+
buyerInfo?: BuyerInfo;
|
|
3994
|
+
}
|
|
3809
3995
|
/**
|
|
3810
|
-
* Sets recipient info
|
|
3996
|
+
* Sets recipient info on a draft order.
|
|
3997
|
+
* @param draftOrderId - Draft order ID.
|
|
3811
3998
|
* @public
|
|
3812
3999
|
* @documentationMaturity preview
|
|
4000
|
+
* @requiredField draftOrderId
|
|
3813
4001
|
* @permissionId ECOM.DRAFT_ORDER_SET_RECIPIENT_INFO
|
|
3814
4002
|
* @permissionScope Manage Stores - all permissions
|
|
3815
4003
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -3817,16 +4005,22 @@ export declare function setBuyerInfo(): Promise<void>;
|
|
|
3817
4005
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3818
4006
|
* @permissionScope Manage eCommerce - all permissions
|
|
3819
4007
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3820
|
-
* @permissionScope Picasso private app mega scope
|
|
3821
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3822
4008
|
* @applicableIdentity APP
|
|
3823
4009
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetRecipientInfo
|
|
3824
4010
|
*/
|
|
3825
|
-
export declare function setRecipientInfo(): Promise<
|
|
4011
|
+
export declare function setRecipientInfo(draftOrderId: string, options?: SetRecipientInfoOptions): Promise<NonNullablePaths<SetRecipientInfoResponse, {
|
|
4012
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4013
|
+
}[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`>>;
|
|
4014
|
+
export interface SetRecipientInfoOptions {
|
|
4015
|
+
/** Order recipient address and contact details. Empty value removes recipient information from draft. */
|
|
4016
|
+
recipientInfo?: AddressWithContact;
|
|
4017
|
+
}
|
|
3826
4018
|
/**
|
|
3827
|
-
* Sets billing info
|
|
4019
|
+
* Sets billing info on a draft order.
|
|
4020
|
+
* @param draftOrderId - Draft order ID.
|
|
3828
4021
|
* @public
|
|
3829
4022
|
* @documentationMaturity preview
|
|
4023
|
+
* @requiredField draftOrderId
|
|
3830
4024
|
* @permissionId ECOM.DRAFT_ORDER_SET_BILLING_INFO
|
|
3831
4025
|
* @permissionScope Manage Stores - all permissions
|
|
3832
4026
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -3834,19 +4028,24 @@ export declare function setRecipientInfo(): Promise<void>;
|
|
|
3834
4028
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3835
4029
|
* @permissionScope Manage eCommerce - all permissions
|
|
3836
4030
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3837
|
-
* @permissionScope Picasso private app mega scope
|
|
3838
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3839
4031
|
* @applicableIdentity APP
|
|
3840
4032
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetBillingInfo
|
|
3841
4033
|
*/
|
|
3842
|
-
export declare function setBillingInfo(): Promise<
|
|
4034
|
+
export declare function setBillingInfo(draftOrderId: string, options?: SetBillingInfoOptions): Promise<NonNullablePaths<SetBillingInfoResponse, {
|
|
4035
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4036
|
+
}[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`>>;
|
|
4037
|
+
export interface SetBillingInfoOptions {
|
|
4038
|
+
/** Billing address and contact details. Empty value removes billing information from draft. */
|
|
4039
|
+
billingInfo?: AddressWithContact;
|
|
4040
|
+
}
|
|
3843
4041
|
/**
|
|
3844
|
-
*
|
|
3845
|
-
*
|
|
4042
|
+
* Gets a draft order.
|
|
4043
|
+
*
|
|
4044
|
+
* Draft order is recalculated and contains latest tax and totals (unless already committed).
|
|
3846
4045
|
* Automatic discounts and automatic additional fees will reflect the latest prices and eligibility.
|
|
3847
4046
|
* Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees.
|
|
3848
|
-
* When
|
|
3849
|
-
* @param draftOrderId -
|
|
4047
|
+
* When retrieving an already committed draft, it's not recalculated and contains data calculated during commit.
|
|
4048
|
+
* @param draftOrderId - Draft order ID.
|
|
3850
4049
|
* @public
|
|
3851
4050
|
* @documentationMaturity preview
|
|
3852
4051
|
* @requiredField draftOrderId
|
|
@@ -3858,8 +4057,6 @@ export declare function setBillingInfo(): Promise<void>;
|
|
|
3858
4057
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3859
4058
|
* @permissionScope Manage eCommerce - all permissions
|
|
3860
4059
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3861
|
-
* @permissionScope Picasso private app mega scope
|
|
3862
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3863
4060
|
* @applicableIdentity APP
|
|
3864
4061
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.GetDraftOrder
|
|
3865
4062
|
*/
|
|
@@ -3867,8 +4064,8 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
3867
4064
|
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
3868
4065
|
}[DraftOrderNonNullablePaths] | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.number` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.address.streetAddress.name` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.amount` | `calculatedDraftOrder.shippingOptions.${number}.cost.price.formattedAmount` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`>>;
|
|
3869
4066
|
/**
|
|
3870
|
-
* Checks whether a draft can be created for this order
|
|
3871
|
-
* @param orderId - Order
|
|
4067
|
+
* Checks whether a draft can be created for this order.
|
|
4068
|
+
* @param orderId - Order Id.
|
|
3872
4069
|
* @public
|
|
3873
4070
|
* @documentationMaturity preview
|
|
3874
4071
|
* @requiredField orderId
|
|
@@ -3879,17 +4076,16 @@ export declare function getDraftOrder(draftOrderId: string): Promise<NonNullable
|
|
|
3879
4076
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3880
4077
|
* @permissionScope Manage eCommerce - all permissions
|
|
3881
4078
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3882
|
-
* @permissionScope Picasso private app mega scope
|
|
3883
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3884
4079
|
* @applicableIdentity APP
|
|
3885
4080
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.GetOrderDraftabilityStatus
|
|
3886
4081
|
*/
|
|
3887
4082
|
export declare function getOrderDraftabilityStatus(orderId: string): Promise<NonNullablePaths<GetOrderDraftabilityStatusResponse, `orderId` | `orderDraftable` | `nonDraftableReasons`>>;
|
|
3888
4083
|
/**
|
|
3889
|
-
* Commit latest changes to the baseline order and control
|
|
4084
|
+
* Commit latest changes to the baseline order and control which side-effects are executed.
|
|
4085
|
+
*
|
|
3890
4086
|
* Commit cannot be undone or reverted.
|
|
3891
|
-
*
|
|
3892
|
-
* @param draftOrderId -
|
|
4087
|
+
* Committed draft will become closed for further modifications, however it's kept for reference and can be retrieved.
|
|
4088
|
+
* @param draftOrderId - Draft order ID.
|
|
3893
4089
|
* @public
|
|
3894
4090
|
* @documentationMaturity preview
|
|
3895
4091
|
* @requiredField draftOrderId
|
|
@@ -3901,16 +4097,14 @@ export declare function getOrderDraftabilityStatus(orderId: string): Promise<Non
|
|
|
3901
4097
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3902
4098
|
* @permissionScope Manage eCommerce - all permissions
|
|
3903
4099
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3904
|
-
* @permissionScope Picasso private app mega scope
|
|
3905
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3906
4100
|
* @applicableIdentity APP
|
|
3907
4101
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CommitDraftOrder
|
|
3908
4102
|
*/
|
|
3909
4103
|
export declare function commitDraftOrder(draftOrderId: string, options?: CommitDraftOrderOptions): Promise<NonNullablePaths<CommitDraftOrderResponse, {
|
|
3910
4104
|
[P in DraftOrderNonNullablePaths]: `committedDraftOrder.${P}`;
|
|
3911
|
-
}[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}.
|
|
4105
|
+
}[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`>>;
|
|
3912
4106
|
export interface CommitDraftOrderOptions {
|
|
3913
|
-
/** Optional side effects to trigger */
|
|
4107
|
+
/** Optional side effects to trigger. */
|
|
3914
4108
|
commitSettings?: DraftOrderCommitSettings;
|
|
3915
4109
|
/**
|
|
3916
4110
|
* Reason for edit, given by user (optional).
|
|
@@ -3919,11 +4113,14 @@ export interface CommitDraftOrderOptions {
|
|
|
3919
4113
|
reason?: string | null;
|
|
3920
4114
|
}
|
|
3921
4115
|
/**
|
|
3922
|
-
*
|
|
4116
|
+
* Creates a new order while specifying which side-effects are executed.
|
|
4117
|
+
*
|
|
3923
4118
|
* Commit cannot be undone or reverted.
|
|
3924
|
-
*
|
|
4119
|
+
* Committed draft will become closed for further modifications, however it's kept for reference and can be retrieved.
|
|
4120
|
+
* @param draftOrderId - Draft order ID.
|
|
3925
4121
|
* @public
|
|
3926
4122
|
* @documentationMaturity preview
|
|
4123
|
+
* @requiredField draftOrderId
|
|
3927
4124
|
* @permissionId ECOM.DRAFT_ORDER_CREATE_ORDER_FROM_DRAFT
|
|
3928
4125
|
* @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS
|
|
3929
4126
|
* @permissionScope Manage Stores - all permissions
|
|
@@ -3932,16 +4129,28 @@ export interface CommitDraftOrderOptions {
|
|
|
3932
4129
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3933
4130
|
* @permissionScope Manage eCommerce - all permissions
|
|
3934
4131
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3935
|
-
* @permissionScope Picasso private app mega scope
|
|
3936
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3937
4132
|
* @applicableIdentity APP
|
|
3938
4133
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.CreateOrderFromDraft
|
|
3939
4134
|
*/
|
|
3940
|
-
export declare function createOrderFromDraft(): Promise<
|
|
4135
|
+
export declare function createOrderFromDraft(draftOrderId: string, options?: CreateOrderFromDraftOptions): Promise<NonNullablePaths<CreateOrderFromDraftResponse, {
|
|
4136
|
+
[P in DraftOrderNonNullablePaths]: `committedDraftOrder.${P}`;
|
|
4137
|
+
}[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.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`>>;
|
|
4138
|
+
export interface CreateOrderFromDraftOptions {
|
|
4139
|
+
/** Optional side effects to trigger. */
|
|
4140
|
+
createSettings?: OrderCreateSettings;
|
|
4141
|
+
/**
|
|
4142
|
+
* Reason for order creation, given by user (optional).
|
|
4143
|
+
* @maxLength 200
|
|
4144
|
+
*/
|
|
4145
|
+
reason?: string | null;
|
|
4146
|
+
/** Information about the sales channel that submitted this order. */
|
|
4147
|
+
channelInfo?: ChannelInfo;
|
|
4148
|
+
}
|
|
3941
4149
|
/**
|
|
3942
|
-
*
|
|
3943
|
-
*
|
|
3944
|
-
*
|
|
4150
|
+
* Deletes a draft order along with all its pending changes.
|
|
4151
|
+
*
|
|
4152
|
+
* Draft orders in status 'COMMITTED' cannot be deleted.
|
|
4153
|
+
* @param draftOrderId - Draft order ID.
|
|
3945
4154
|
* @public
|
|
3946
4155
|
* @documentationMaturity preview
|
|
3947
4156
|
* @requiredField draftOrderId
|
|
@@ -3953,8 +4162,6 @@ export declare function createOrderFromDraft(): Promise<void>;
|
|
|
3953
4162
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3954
4163
|
* @permissionScope Manage eCommerce - all permissions
|
|
3955
4164
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3956
|
-
* @permissionScope Picasso private app mega scope
|
|
3957
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3958
4165
|
* @applicableIdentity APP
|
|
3959
4166
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.DeleteDraftOrder
|
|
3960
4167
|
*/
|
|
@@ -3978,8 +4185,6 @@ export declare function deleteDraftOrder(draftOrderId: string): Promise<void>;
|
|
|
3978
4185
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
3979
4186
|
* @permissionScope Manage eCommerce - all permissions
|
|
3980
4187
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
3981
|
-
* @permissionScope Picasso private app mega scope
|
|
3982
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
3983
4188
|
* @permissionId ECOM.DRAFT_ORDERS_READ
|
|
3984
4189
|
* @applicableIdentity APP
|
|
3985
4190
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.QueryDraftOrders
|
|
@@ -4063,9 +4268,49 @@ export interface DraftOrdersQueryBuilder {
|
|
|
4063
4268
|
find: () => Promise<DraftOrdersQueryResult>;
|
|
4064
4269
|
}
|
|
4065
4270
|
/**
|
|
4066
|
-
*
|
|
4271
|
+
* Updates extended fields on a draft order.
|
|
4272
|
+
* @param _id - ID of the entity to update.
|
|
4273
|
+
* @param namespace - Identifier for the app whose extended fields are being updated.
|
|
4274
|
+
* @public
|
|
4275
|
+
* @documentationMaturity preview
|
|
4276
|
+
* @requiredField _id
|
|
4277
|
+
* @requiredField namespace
|
|
4278
|
+
* @requiredField options
|
|
4279
|
+
* @requiredField options.namespaceData
|
|
4280
|
+
* @permissionId ECOM.DRAFT_ORDER_UPDATE_EXTENDED_FIELDS
|
|
4281
|
+
* @permissionId ECOM.DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS
|
|
4282
|
+
* @permissionScope Manage Stores - all permissions
|
|
4283
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4284
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4285
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4286
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4287
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4288
|
+
* @permissionScope Manage Stores - all permissions
|
|
4289
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4290
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4291
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4292
|
+
* @permissionScope Manage eCommerce - all permissions
|
|
4293
|
+
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4294
|
+
* @permissionScope Manage Orders
|
|
4295
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4296
|
+
* @applicableIdentity APP
|
|
4297
|
+
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.UpdateExtendedFields
|
|
4298
|
+
*/
|
|
4299
|
+
export declare function updateExtendedFields(_id: string, namespace: string, options: NonNullablePaths<UpdateExtendedFieldsOptions, `namespaceData`>): Promise<NonNullablePaths<UpdateExtendedFieldsResponse, {
|
|
4300
|
+
[P in DraftOrderNonNullablePaths]: `draftOrder.${P}`;
|
|
4301
|
+
}[DraftOrderNonNullablePaths]>>;
|
|
4302
|
+
export interface UpdateExtendedFieldsOptions {
|
|
4303
|
+
/** 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. */
|
|
4304
|
+
namespaceData: Record<string, any> | null;
|
|
4305
|
+
}
|
|
4306
|
+
/**
|
|
4307
|
+
* Sets tax exemption on a draft order.
|
|
4308
|
+
* @param draftOrderId - Draft order ID.
|
|
4067
4309
|
* @public
|
|
4068
4310
|
* @documentationMaturity preview
|
|
4311
|
+
* @requiredField draftOrderId
|
|
4312
|
+
* @requiredField options
|
|
4313
|
+
* @requiredField options.taxExempt
|
|
4069
4314
|
* @permissionId ECOM.DRAFT_ORDER_SET_TAX_EXEMPTION
|
|
4070
4315
|
* @permissionScope Manage Stores - all permissions
|
|
4071
4316
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4073,16 +4318,27 @@ export interface DraftOrdersQueryBuilder {
|
|
|
4073
4318
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4074
4319
|
* @permissionScope Manage eCommerce - all permissions
|
|
4075
4320
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4076
|
-
* @permissionScope Picasso private app mega scope
|
|
4077
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
4078
4321
|
* @applicableIdentity APP
|
|
4079
4322
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetTaxExemption
|
|
4080
4323
|
*/
|
|
4081
|
-
export declare function setTaxExemption(): Promise<
|
|
4324
|
+
export declare function setTaxExemption(draftOrderId: string, options: NonNullablePaths<SetTaxExemptionOptions, `taxExempt`>): Promise<NonNullablePaths<SetTaxExemptionResponse, {
|
|
4325
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4326
|
+
}[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`>>;
|
|
4327
|
+
export interface SetTaxExemptionOptions {
|
|
4328
|
+
/**
|
|
4329
|
+
* Flag, indicating whether the draft order is exempt from tax calculations.
|
|
4330
|
+
*
|
|
4331
|
+
* Default: `false`
|
|
4332
|
+
*/
|
|
4333
|
+
taxExempt: boolean | null;
|
|
4334
|
+
}
|
|
4082
4335
|
/**
|
|
4083
|
-
* Sets business location
|
|
4336
|
+
* Sets business location on a draft order.
|
|
4337
|
+
* @param draftOrderId - Draft order ID.
|
|
4084
4338
|
* @public
|
|
4085
4339
|
* @documentationMaturity preview
|
|
4340
|
+
* @requiredField draftOrderId
|
|
4341
|
+
* @requiredField options.businessLocation._id
|
|
4086
4342
|
* @permissionId ECOM.DRAFT_ORDER_SET_BUSINESS_LOCATION
|
|
4087
4343
|
* @permissionScope Manage Stores - all permissions
|
|
4088
4344
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -4090,10 +4346,14 @@ export declare function setTaxExemption(): Promise<void>;
|
|
|
4090
4346
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4091
4347
|
* @permissionScope Manage eCommerce - all permissions
|
|
4092
4348
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
4093
|
-
* @permissionScope Picasso private app mega scope
|
|
4094
|
-
* @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
|
|
4095
4349
|
* @applicableIdentity APP
|
|
4096
4350
|
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetBusinessLocation
|
|
4097
4351
|
*/
|
|
4098
|
-
export declare function setBusinessLocation(): Promise<
|
|
4352
|
+
export declare function setBusinessLocation(draftOrderId: string, options?: NonNullablePaths<SetBusinessLocationOptions, `businessLocation._id`>): Promise<NonNullablePaths<SetBusinessLocationResponse, {
|
|
4353
|
+
[P in DraftOrderNonNullablePaths]: `calculatedDraftOrder.draftOrder.${P}`;
|
|
4354
|
+
}[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`>>;
|
|
4355
|
+
export interface SetBusinessLocationOptions {
|
|
4356
|
+
/** Business location. */
|
|
4357
|
+
businessLocation?: Location;
|
|
4358
|
+
}
|
|
4099
4359
|
export {};
|