@wix/auto_sdk_ecom_cart-v-2 1.0.0 → 1.0.1
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/index.d.ts +134 -147
- package/build/cjs/index.js +83 -90
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +71 -78
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +110 -127
- package/build/cjs/meta.js +50 -50
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +134 -147
- package/build/es/index.mjs +82 -88
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +70 -76
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +110 -127
- package/build/es/meta.mjs +49 -49
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +34 -32
- package/build/internal/cjs/index.js +83 -90
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +171 -182
- package/build/internal/cjs/index.typings.js +71 -78
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +110 -127
- package/build/internal/cjs/meta.js +50 -50
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +34 -32
- package/build/internal/es/index.mjs +82 -88
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +171 -182
- package/build/internal/es/index.typings.mjs +70 -76
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +110 -127
- package/build/internal/es/meta.mjs +49 -49
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -20,11 +20,6 @@ interface Cart {
|
|
|
20
20
|
* @readonly
|
|
21
21
|
*/
|
|
22
22
|
revision?: string | null;
|
|
23
|
-
/**
|
|
24
|
-
* Custom fields.
|
|
25
|
-
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
26
|
-
*/
|
|
27
|
-
extendedFields?: ExtendedFields;
|
|
28
23
|
/**
|
|
29
24
|
* Line items added to the Cart by the customer.
|
|
30
25
|
* This list may include both valid items (in stock) and invalid ones (e.g., out of stock).
|
|
@@ -33,6 +28,14 @@ interface Cart {
|
|
|
33
28
|
* @readonly
|
|
34
29
|
*/
|
|
35
30
|
lineItems?: V2LineItem[];
|
|
31
|
+
/** The sum of all line item final prices. */
|
|
32
|
+
subtotal?: MultiCurrencyPrice;
|
|
33
|
+
/**
|
|
34
|
+
* Optional message left by the customer.
|
|
35
|
+
* Usually intended for the merchant and contain special instructions, requests, or clarifications related to the order.
|
|
36
|
+
* @maxLength 1000
|
|
37
|
+
*/
|
|
38
|
+
note?: string | null;
|
|
36
39
|
/**
|
|
37
40
|
* The discounts of the Cart.
|
|
38
41
|
* Automatic discounts are removed from the Cart entirely when they are no longer valid.
|
|
@@ -44,7 +47,7 @@ interface Cart {
|
|
|
44
47
|
/** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
|
|
45
48
|
source?: CartSource;
|
|
46
49
|
/** Information about the site from which the Cart's line items were added. */
|
|
47
|
-
|
|
50
|
+
businessInfo?: BusinessInfo;
|
|
48
51
|
/** Information about the customer that owns the Cart. */
|
|
49
52
|
customerInfo?: CustomerInfo;
|
|
50
53
|
/** Delivery-related information associated with the Cart. */
|
|
@@ -54,15 +57,24 @@ interface Cart {
|
|
|
54
57
|
/** Payment-related information associated with the Cart. */
|
|
55
58
|
paymentInfo?: PaymentInfo;
|
|
56
59
|
/**
|
|
57
|
-
*
|
|
60
|
+
* Whether the Cart has been placed as an Order.
|
|
61
|
+
* Defaults to `false`.
|
|
62
|
+
* @readonly
|
|
63
|
+
*/
|
|
64
|
+
orderPlaced?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The ID of the Order created from the Cart.
|
|
67
|
+
* This field is empty until the checkout process is completed.
|
|
68
|
+
* @format GUID
|
|
58
69
|
* @readonly
|
|
59
70
|
*/
|
|
60
|
-
|
|
71
|
+
orderId?: string | null;
|
|
61
72
|
/**
|
|
62
|
-
*
|
|
73
|
+
* Persistent ID that correlates between the Cart and the created Order (after the checkout is completed).
|
|
74
|
+
* @format GUID
|
|
63
75
|
* @readonly
|
|
64
76
|
*/
|
|
65
|
-
|
|
77
|
+
purchaseFlowId?: string | null;
|
|
66
78
|
/**
|
|
67
79
|
* Additional Cart settings.
|
|
68
80
|
*
|
|
@@ -71,7 +83,7 @@ interface Cart {
|
|
|
71
83
|
* > * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
72
84
|
* @immutable
|
|
73
85
|
*/
|
|
74
|
-
|
|
86
|
+
settings?: CartSettings;
|
|
75
87
|
/**
|
|
76
88
|
* Custom checkout URL to redirect the customer to a checkout page.
|
|
77
89
|
* By default, customers are redirected to the standard Wix checkout page.
|
|
@@ -81,29 +93,10 @@ interface Cart {
|
|
|
81
93
|
*/
|
|
82
94
|
customCheckoutUrl?: string | null;
|
|
83
95
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* @format GUID
|
|
87
|
-
* @readonly
|
|
88
|
-
*/
|
|
89
|
-
orderId?: string | null;
|
|
90
|
-
/**
|
|
91
|
-
* Persistent ID that correlates between the Cart and the created Order (after the checkout is completed).
|
|
92
|
-
* @format GUID
|
|
93
|
-
* @readonly
|
|
94
|
-
*/
|
|
95
|
-
purchaseFlowId?: string | null;
|
|
96
|
-
}
|
|
97
|
-
interface ExtendedFields {
|
|
98
|
-
/**
|
|
99
|
-
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
100
|
-
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
101
|
-
*
|
|
102
|
-
* You can only access fields for which you have the appropriate permissions.
|
|
103
|
-
*
|
|
104
|
-
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
96
|
+
* Custom fields.
|
|
97
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
105
98
|
*/
|
|
106
|
-
|
|
99
|
+
extendedFields?: ExtendedFields;
|
|
107
100
|
}
|
|
108
101
|
interface V2LineItem {
|
|
109
102
|
/**
|
|
@@ -146,10 +139,10 @@ interface V2LineItem {
|
|
|
146
139
|
*/
|
|
147
140
|
modifierGroups?: ModifierGroup[];
|
|
148
141
|
/**
|
|
149
|
-
* Whether the item
|
|
150
|
-
*
|
|
142
|
+
* Whether the line item is a custom line item.
|
|
143
|
+
* Custom line items don't trigger the Catalog service plugin.
|
|
151
144
|
*/
|
|
152
|
-
|
|
145
|
+
customLineItem?: boolean;
|
|
153
146
|
}
|
|
154
147
|
interface TranslatableString {
|
|
155
148
|
/**
|
|
@@ -188,7 +181,10 @@ interface ItemQuantityInfo {
|
|
|
188
181
|
requestedQuantity?: number;
|
|
189
182
|
/** The maximum quantity of items available for purchase. */
|
|
190
183
|
availableQuantity?: number | null;
|
|
191
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* Whether the line item quantity is fixed and cannot be changed.
|
|
186
|
+
* Default: `false`.
|
|
187
|
+
*/
|
|
192
188
|
fixedQuantity?: boolean;
|
|
193
189
|
}
|
|
194
190
|
interface ItemPricingInfo {
|
|
@@ -271,11 +267,6 @@ interface ItemPriceBreakdown {
|
|
|
271
267
|
totalDiscount?: MultiCurrencyPrice;
|
|
272
268
|
}
|
|
273
269
|
interface ItemSource {
|
|
274
|
-
/**
|
|
275
|
-
* Whether the line item is a custom line item.
|
|
276
|
-
* Custom line items don't trigger the Catalog service plugin.
|
|
277
|
-
*/
|
|
278
|
-
customLineItem?: boolean;
|
|
279
270
|
/**
|
|
280
271
|
* Catalog and item reference.
|
|
281
272
|
* Holds IDs for the item and the catalog it came from, as well as further optional info.
|
|
@@ -506,6 +497,11 @@ interface ItemAttributes {
|
|
|
506
497
|
subscriptionInfo?: SubscriptionOptionInfo;
|
|
507
498
|
/** Service properties. When relevant, this contains information such as date and number of participants. */
|
|
508
499
|
serviceProperties?: ServiceProperties;
|
|
500
|
+
/**
|
|
501
|
+
* Whether the item can only be purchased by site members.
|
|
502
|
+
* Default: `false`
|
|
503
|
+
*/
|
|
504
|
+
membersOnly?: boolean;
|
|
509
505
|
}
|
|
510
506
|
interface Policy {
|
|
511
507
|
/**
|
|
@@ -750,16 +746,27 @@ interface V2SelectedMembership {
|
|
|
750
746
|
declare enum ItemStatus {
|
|
751
747
|
UNKNOWN_ITEM_STATUS = "UNKNOWN_ITEM_STATUS",
|
|
752
748
|
/** The item is available in the requested quantity. */
|
|
753
|
-
|
|
749
|
+
IN_STOCK = "IN_STOCK",
|
|
754
750
|
/** Only part of the requested quantity is available. */
|
|
755
|
-
|
|
751
|
+
PARTIALLY_IN_STOCK = "PARTIALLY_IN_STOCK",
|
|
756
752
|
/** The item is out of stock. */
|
|
757
753
|
OUT_OF_STOCK = "OUT_OF_STOCK",
|
|
758
754
|
/** The item is no longer exists in the catalog. */
|
|
759
|
-
|
|
755
|
+
REMOVED_FROM_CATALOG = "REMOVED_FROM_CATALOG"
|
|
760
756
|
}
|
|
761
757
|
/** @enumType */
|
|
762
|
-
type ItemStatusWithLiterals = ItemStatus | 'UNKNOWN_ITEM_STATUS' | '
|
|
758
|
+
type ItemStatusWithLiterals = ItemStatus | 'UNKNOWN_ITEM_STATUS' | 'IN_STOCK' | 'PARTIALLY_IN_STOCK' | 'OUT_OF_STOCK' | 'REMOVED_FROM_CATALOG';
|
|
759
|
+
interface ExtendedFields {
|
|
760
|
+
/**
|
|
761
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
762
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
763
|
+
*
|
|
764
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
765
|
+
*
|
|
766
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
767
|
+
*/
|
|
768
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
769
|
+
}
|
|
763
770
|
interface AdditionalFee {
|
|
764
771
|
/**
|
|
765
772
|
* Additional fee's unique code or ID.
|
|
@@ -1084,18 +1091,13 @@ interface CustomContentReference {
|
|
|
1084
1091
|
*/
|
|
1085
1092
|
componentId?: string;
|
|
1086
1093
|
}
|
|
1087
|
-
interface
|
|
1094
|
+
interface BusinessInfo {
|
|
1088
1095
|
/**
|
|
1089
1096
|
* The ID of the business location associated with the cart.
|
|
1090
1097
|
* Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
1091
1098
|
* @format GUID
|
|
1092
1099
|
*/
|
|
1093
|
-
|
|
1094
|
-
/**
|
|
1095
|
-
* The business’s unit of weight measurement (e.g., KG, LB).
|
|
1096
|
-
* @readonly
|
|
1097
|
-
*/
|
|
1098
|
-
weightUnit?: WeightUnitWithLiterals;
|
|
1100
|
+
locationId?: string | null;
|
|
1099
1101
|
/**
|
|
1100
1102
|
* The business’s default language, represented as a two-letter ISO 639-1 code.
|
|
1101
1103
|
* @format LANGUAGE
|
|
@@ -1109,16 +1111,6 @@ interface SiteInfo {
|
|
|
1109
1111
|
*/
|
|
1110
1112
|
currencyCode?: string;
|
|
1111
1113
|
}
|
|
1112
|
-
declare enum WeightUnit {
|
|
1113
|
-
/** Weight unit can't be classified due to an error. */
|
|
1114
|
-
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
1115
|
-
/** Kilograms. */
|
|
1116
|
-
KG = "KG",
|
|
1117
|
-
/** Pounds. */
|
|
1118
|
-
LB = "LB"
|
|
1119
|
-
}
|
|
1120
|
-
/** @enumType */
|
|
1121
|
-
type WeightUnitWithLiterals = WeightUnit | 'UNSPECIFIED_WEIGHT_UNIT' | 'KG' | 'LB';
|
|
1122
1114
|
interface CustomerInfo extends CustomerInfoIdOneOf {
|
|
1123
1115
|
/**
|
|
1124
1116
|
* Site visitor ID (if site visitor is **not** a member).
|
|
@@ -1166,11 +1158,6 @@ interface CustomerInfo extends CustomerInfoIdOneOf {
|
|
|
1166
1158
|
* @readonly
|
|
1167
1159
|
*/
|
|
1168
1160
|
currencyCode?: string;
|
|
1169
|
-
/**
|
|
1170
|
-
* The [buyer note](https://support.wix.com/en/article/wix-stores-viewing-customer-notes) left by the customer.
|
|
1171
|
-
* @maxLength 1000
|
|
1172
|
-
*/
|
|
1173
|
-
buyerNote?: string | null;
|
|
1174
1161
|
}
|
|
1175
1162
|
/** @oneof */
|
|
1176
1163
|
interface CustomerInfoIdOneOf {
|
|
@@ -1201,6 +1188,11 @@ interface DeliveryInfo {
|
|
|
1201
1188
|
recipient?: FullAddressContactDetails;
|
|
1202
1189
|
/** The selected delivery method by the customer. */
|
|
1203
1190
|
method?: DeliveryMethod;
|
|
1191
|
+
/**
|
|
1192
|
+
* The unit of weight measurement when shipping items (e.g., KG, LB).
|
|
1193
|
+
* @readonly
|
|
1194
|
+
*/
|
|
1195
|
+
weightUnit?: WeightUnitWithLiterals;
|
|
1204
1196
|
}
|
|
1205
1197
|
/** Physical address */
|
|
1206
1198
|
interface Address {
|
|
@@ -1330,6 +1322,16 @@ interface DeliveryMethod {
|
|
|
1330
1322
|
*/
|
|
1331
1323
|
pickup?: boolean;
|
|
1332
1324
|
}
|
|
1325
|
+
declare enum WeightUnit {
|
|
1326
|
+
/** Weight unit can't be classified due to an error. */
|
|
1327
|
+
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
1328
|
+
/** Kilograms. */
|
|
1329
|
+
KG = "KG",
|
|
1330
|
+
/** Pounds. */
|
|
1331
|
+
LB = "LB"
|
|
1332
|
+
}
|
|
1333
|
+
/** @enumType */
|
|
1334
|
+
type WeightUnitWithLiterals = WeightUnit | 'UNSPECIFIED_WEIGHT_UNIT' | 'KG' | 'LB';
|
|
1333
1335
|
interface TaxInfo {
|
|
1334
1336
|
/**
|
|
1335
1337
|
* Indicates whether tax is already included in prices (line items, discounts, delivery, additional fess).
|
|
@@ -1383,23 +1385,7 @@ interface GiftCard {
|
|
|
1383
1385
|
*/
|
|
1384
1386
|
externalId?: string | null;
|
|
1385
1387
|
}
|
|
1386
|
-
interface
|
|
1387
|
-
/** The sum of all line items after applying automatic discounts. */
|
|
1388
|
-
subtotal?: MultiCurrencyPrice;
|
|
1389
|
-
/** The coupon discount amount. Automatic discounts are not included in this amount. */
|
|
1390
|
-
discount?: MultiCurrencyPrice;
|
|
1391
|
-
/** The sum of all line items after applying all discounts. */
|
|
1392
|
-
discountedSubtotal?: MultiCurrencyPrice;
|
|
1393
|
-
}
|
|
1394
|
-
declare enum CartStatus {
|
|
1395
|
-
/** A new Cart. */
|
|
1396
|
-
CREATED = "CREATED",
|
|
1397
|
-
/** The checkout process is completed. */
|
|
1398
|
-
CHECKOUT_COMPLETED = "CHECKOUT_COMPLETED"
|
|
1399
|
-
}
|
|
1400
|
-
/** @enumType */
|
|
1401
|
-
type CartStatusWithLiterals = CartStatus | 'CREATED' | 'CHECKOUT_COMPLETED';
|
|
1402
|
-
interface CustomSettings {
|
|
1388
|
+
interface CartSettings {
|
|
1403
1389
|
/**
|
|
1404
1390
|
* Whether to restrict the option to add or remove a gift card on the checkout page.
|
|
1405
1391
|
* Default: `false`
|
|
@@ -1603,7 +1589,7 @@ interface AdditionalFeeTax {
|
|
|
1603
1589
|
interface PriceSummary {
|
|
1604
1590
|
/**
|
|
1605
1591
|
* Total price of all line items after applying item-level discounts.
|
|
1606
|
-
*
|
|
1592
|
+
* Before tax TODO: Change it to include tax if the 'prices_include_tax' flag is true.
|
|
1607
1593
|
*/
|
|
1608
1594
|
subtotal?: MultiCurrencyPrice;
|
|
1609
1595
|
/**
|
|
@@ -1614,20 +1600,17 @@ interface PriceSummary {
|
|
|
1614
1600
|
discount?: MultiCurrencyPrice;
|
|
1615
1601
|
/**
|
|
1616
1602
|
* Final delivery cost for the cart.
|
|
1617
|
-
*
|
|
1603
|
+
* Before tax TODO: Change it to include tax if the 'prices_include_tax' flag is true.
|
|
1618
1604
|
*/
|
|
1619
1605
|
delivery?: MultiCurrencyPrice;
|
|
1620
1606
|
/**
|
|
1621
1607
|
* Total additional fees associated with the cart.
|
|
1622
|
-
*
|
|
1608
|
+
* Before tax TODO: Change it to include tax if the 'prices_include_tax' flag is true.
|
|
1623
1609
|
*/
|
|
1624
1610
|
additionalFees?: MultiCurrencyPrice;
|
|
1625
1611
|
/** Total tax amount calculated across all applicable components (items, discounts, delivery, and fees). */
|
|
1626
1612
|
tax?: MultiCurrencyPrice;
|
|
1627
|
-
/**
|
|
1628
|
-
* Total amount to be paid.
|
|
1629
|
-
* Curenntly, total = subtotal - discount + delivery + additional_fees + tax.
|
|
1630
|
-
*/
|
|
1613
|
+
/** Total amount to be paid. */
|
|
1631
1614
|
total?: MultiCurrencyPrice;
|
|
1632
1615
|
}
|
|
1633
1616
|
interface PaymentSummary {
|
|
@@ -1962,11 +1945,6 @@ interface CustomItemInput {
|
|
|
1962
1945
|
* @maxSize 25
|
|
1963
1946
|
*/
|
|
1964
1947
|
modifierGroups?: ModifierGroup[];
|
|
1965
|
-
/**
|
|
1966
|
-
* Whether the item can only be purchased by site members.
|
|
1967
|
-
* Default: `false`
|
|
1968
|
-
*/
|
|
1969
|
-
membersOnly?: boolean;
|
|
1970
1948
|
}
|
|
1971
1949
|
interface CustomItemQuantityInfo {
|
|
1972
1950
|
/**
|
|
@@ -2047,6 +2025,11 @@ interface CustomItemAttributes {
|
|
|
2047
2025
|
subscriptionInfo?: SubscriptionOptionInfo;
|
|
2048
2026
|
/** Service properties. When relevant, this contains information such as date and number of participants. */
|
|
2049
2027
|
serviceProperties?: ServiceProperties;
|
|
2028
|
+
/**
|
|
2029
|
+
* Whether the item can only be purchased by site members.
|
|
2030
|
+
* Default: `false`
|
|
2031
|
+
*/
|
|
2032
|
+
membersOnly?: boolean;
|
|
2050
2033
|
}
|
|
2051
2034
|
interface CustomItemDeliveryConfig {
|
|
2052
2035
|
/**
|
|
@@ -2192,7 +2175,7 @@ interface UpdateLineItemsInCurrentCartRequest {
|
|
|
2192
2175
|
* @minSize 1
|
|
2193
2176
|
* @maxSize 100
|
|
2194
2177
|
*/
|
|
2195
|
-
|
|
2178
|
+
lineItems?: LineItemUpdate[];
|
|
2196
2179
|
}
|
|
2197
2180
|
interface LineItemUpdate {
|
|
2198
2181
|
/**
|
|
@@ -2201,9 +2184,9 @@ interface LineItemUpdate {
|
|
|
2201
2184
|
*/
|
|
2202
2185
|
lineItemId?: string;
|
|
2203
2186
|
/** Quantity update (optional - if not provided, quantity is not updated) */
|
|
2204
|
-
|
|
2187
|
+
quantity?: QuantityUpdate;
|
|
2205
2188
|
/** Selected membership update (optional - if not provided, membership is not updated) */
|
|
2206
|
-
|
|
2189
|
+
selectedMembership?: SelectedMembershipUpdate;
|
|
2207
2190
|
}
|
|
2208
2191
|
interface QuantityUpdate {
|
|
2209
2192
|
/**
|
|
@@ -2211,7 +2194,7 @@ interface QuantityUpdate {
|
|
|
2211
2194
|
* @min 1
|
|
2212
2195
|
* @max 100000
|
|
2213
2196
|
*/
|
|
2214
|
-
|
|
2197
|
+
newQuantity?: number;
|
|
2215
2198
|
}
|
|
2216
2199
|
interface SelectedMembershipUpdate {
|
|
2217
2200
|
/**
|
|
@@ -2219,7 +2202,7 @@ interface SelectedMembershipUpdate {
|
|
|
2219
2202
|
*
|
|
2220
2203
|
* To just remove current selected membership, and not replace with a new one, pass an empty value here.
|
|
2221
2204
|
*/
|
|
2222
|
-
|
|
2205
|
+
newMembership?: V2SelectedMembership;
|
|
2223
2206
|
}
|
|
2224
2207
|
interface UpdateLineItemsInCurrentCartResponse {
|
|
2225
2208
|
/** Updated Cart. */
|
|
@@ -2529,7 +2512,7 @@ interface GetCheckoutURLResponse {
|
|
|
2529
2512
|
*/
|
|
2530
2513
|
checkoutUrl?: string;
|
|
2531
2514
|
}
|
|
2532
|
-
interface
|
|
2515
|
+
interface PlaceOrderRequest {
|
|
2533
2516
|
/**
|
|
2534
2517
|
* Cart ID.
|
|
2535
2518
|
* @format GUID
|
|
@@ -2571,7 +2554,7 @@ interface RedirectUrls {
|
|
|
2571
2554
|
*/
|
|
2572
2555
|
pendingUrl?: string | null;
|
|
2573
2556
|
}
|
|
2574
|
-
interface
|
|
2557
|
+
interface PlaceOrderResponse {
|
|
2575
2558
|
/**
|
|
2576
2559
|
* The order ID of the created order.
|
|
2577
2560
|
* @format GUID
|
|
@@ -2633,6 +2616,23 @@ interface RemoveLineItemsResponse {
|
|
|
2633
2616
|
/** Updated Cart. */
|
|
2634
2617
|
cart?: Cart;
|
|
2635
2618
|
}
|
|
2619
|
+
interface UpdateLineItemsRequest {
|
|
2620
|
+
/**
|
|
2621
|
+
* Cart ID.
|
|
2622
|
+
* @format GUID
|
|
2623
|
+
*/
|
|
2624
|
+
cartId: string;
|
|
2625
|
+
/**
|
|
2626
|
+
* Line item updates to apply.
|
|
2627
|
+
* @minSize 1
|
|
2628
|
+
* @maxSize 300
|
|
2629
|
+
*/
|
|
2630
|
+
lineItems?: LineItemUpdate[];
|
|
2631
|
+
}
|
|
2632
|
+
interface UpdateLineItemsResponse {
|
|
2633
|
+
/** Updated Cart. */
|
|
2634
|
+
cart?: Cart;
|
|
2635
|
+
}
|
|
2636
2636
|
interface AddDiscountRequest {
|
|
2637
2637
|
/**
|
|
2638
2638
|
* Cart ID.
|
|
@@ -2702,23 +2702,6 @@ interface RemoveGiftCardResponse {
|
|
|
2702
2702
|
/** Updated Cart. */
|
|
2703
2703
|
cart?: Cart;
|
|
2704
2704
|
}
|
|
2705
|
-
interface UpdateLineItemsRequest {
|
|
2706
|
-
/**
|
|
2707
|
-
* Cart ID.
|
|
2708
|
-
* @format GUID
|
|
2709
|
-
*/
|
|
2710
|
-
cartId: string;
|
|
2711
|
-
/**
|
|
2712
|
-
* Line item updates to apply.
|
|
2713
|
-
* @minSize 1
|
|
2714
|
-
* @maxSize 100
|
|
2715
|
-
*/
|
|
2716
|
-
lineItemUpdates?: LineItemUpdate[];
|
|
2717
|
-
}
|
|
2718
|
-
interface UpdateLineItemsResponse {
|
|
2719
|
-
/** Updated Cart. */
|
|
2720
|
-
cart?: Cart;
|
|
2721
|
-
}
|
|
2722
2705
|
interface MarkCartAsCompletedRequest {
|
|
2723
2706
|
/**
|
|
2724
2707
|
* Cart ID.
|
|
@@ -2811,11 +2794,6 @@ interface UpdateCart {
|
|
|
2811
2794
|
* @readonly
|
|
2812
2795
|
*/
|
|
2813
2796
|
revision?: string | null;
|
|
2814
|
-
/**
|
|
2815
|
-
* Custom fields.
|
|
2816
|
-
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
2817
|
-
*/
|
|
2818
|
-
extendedFields?: ExtendedFields;
|
|
2819
2797
|
/**
|
|
2820
2798
|
* Line items added to the Cart by the customer.
|
|
2821
2799
|
* This list may include both valid items (in stock) and invalid ones (e.g., out of stock).
|
|
@@ -2824,6 +2802,14 @@ interface UpdateCart {
|
|
|
2824
2802
|
* @readonly
|
|
2825
2803
|
*/
|
|
2826
2804
|
lineItems?: V2LineItem[];
|
|
2805
|
+
/** The sum of all line item final prices. */
|
|
2806
|
+
subtotal?: MultiCurrencyPrice;
|
|
2807
|
+
/**
|
|
2808
|
+
* Optional message left by the customer.
|
|
2809
|
+
* Usually intended for the merchant and contain special instructions, requests, or clarifications related to the order.
|
|
2810
|
+
* @maxLength 1000
|
|
2811
|
+
*/
|
|
2812
|
+
note?: string | null;
|
|
2827
2813
|
/**
|
|
2828
2814
|
* The discounts of the Cart.
|
|
2829
2815
|
* Automatic discounts are removed from the Cart entirely when they are no longer valid.
|
|
@@ -2835,7 +2821,7 @@ interface UpdateCart {
|
|
|
2835
2821
|
/** Information about the source of the Cart, detailing the origin or context in which the Cart was created. */
|
|
2836
2822
|
source?: CartSource;
|
|
2837
2823
|
/** Information about the site from which the Cart's line items were added. */
|
|
2838
|
-
|
|
2824
|
+
businessInfo?: BusinessInfo;
|
|
2839
2825
|
/** Information about the customer that owns the Cart. */
|
|
2840
2826
|
customerInfo?: CustomerInfo;
|
|
2841
2827
|
/** Delivery-related information associated with the Cart. */
|
|
@@ -2845,15 +2831,24 @@ interface UpdateCart {
|
|
|
2845
2831
|
/** Payment-related information associated with the Cart. */
|
|
2846
2832
|
paymentInfo?: PaymentInfo;
|
|
2847
2833
|
/**
|
|
2848
|
-
*
|
|
2834
|
+
* Whether the Cart has been placed as an Order.
|
|
2835
|
+
* Defaults to `false`.
|
|
2849
2836
|
* @readonly
|
|
2850
2837
|
*/
|
|
2851
|
-
|
|
2838
|
+
orderPlaced?: boolean;
|
|
2852
2839
|
/**
|
|
2853
|
-
* The
|
|
2840
|
+
* The ID of the Order created from the Cart.
|
|
2841
|
+
* This field is empty until the checkout process is completed.
|
|
2842
|
+
* @format GUID
|
|
2854
2843
|
* @readonly
|
|
2855
2844
|
*/
|
|
2856
|
-
|
|
2845
|
+
orderId?: string | null;
|
|
2846
|
+
/**
|
|
2847
|
+
* Persistent ID that correlates between the Cart and the created Order (after the checkout is completed).
|
|
2848
|
+
* @format GUID
|
|
2849
|
+
* @readonly
|
|
2850
|
+
*/
|
|
2851
|
+
purchaseFlowId?: string | null;
|
|
2857
2852
|
/**
|
|
2858
2853
|
* Additional Cart settings.
|
|
2859
2854
|
*
|
|
@@ -2862,7 +2857,7 @@ interface UpdateCart {
|
|
|
2862
2857
|
* > * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions).
|
|
2863
2858
|
* @immutable
|
|
2864
2859
|
*/
|
|
2865
|
-
|
|
2860
|
+
settings?: CartSettings;
|
|
2866
2861
|
/**
|
|
2867
2862
|
* Custom checkout URL to redirect the customer to a checkout page.
|
|
2868
2863
|
* By default, customers are redirected to the standard Wix checkout page.
|
|
@@ -2872,18 +2867,10 @@ interface UpdateCart {
|
|
|
2872
2867
|
*/
|
|
2873
2868
|
customCheckoutUrl?: string | null;
|
|
2874
2869
|
/**
|
|
2875
|
-
*
|
|
2876
|
-
*
|
|
2877
|
-
* @format GUID
|
|
2878
|
-
* @readonly
|
|
2879
|
-
*/
|
|
2880
|
-
orderId?: string | null;
|
|
2881
|
-
/**
|
|
2882
|
-
* Persistent ID that correlates between the Cart and the created Order (after the checkout is completed).
|
|
2883
|
-
* @format GUID
|
|
2884
|
-
* @readonly
|
|
2870
|
+
* Custom fields.
|
|
2871
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
|
|
2885
2872
|
*/
|
|
2886
|
-
|
|
2873
|
+
extendedFields?: ExtendedFields;
|
|
2887
2874
|
}
|
|
2888
2875
|
interface CalculateCartOptions {
|
|
2889
2876
|
/**
|
|
@@ -2904,7 +2891,7 @@ interface GetCheckoutUrlOptions {
|
|
|
2904
2891
|
*/
|
|
2905
2892
|
currencyCode?: string | null;
|
|
2906
2893
|
}
|
|
2907
|
-
interface
|
|
2894
|
+
interface PlaceOrderOptions {
|
|
2908
2895
|
/**
|
|
2909
2896
|
* The pricing token received from `CalculateCart`'s response.
|
|
2910
2897
|
* Used to verify that the prices shown to the customer have not changed before completing checkout.
|
|
@@ -2935,9 +2922,9 @@ interface UpdateLineItemsOptions {
|
|
|
2935
2922
|
/**
|
|
2936
2923
|
* Line item updates to apply.
|
|
2937
2924
|
* @minSize 1
|
|
2938
|
-
* @maxSize
|
|
2925
|
+
* @maxSize 300
|
|
2939
2926
|
*/
|
|
2940
|
-
|
|
2927
|
+
lineItems?: LineItemUpdate[];
|
|
2941
2928
|
}
|
|
2942
2929
|
interface MarkCartAsCompletedOptions {
|
|
2943
2930
|
/**
|
|
@@ -2947,4 +2934,4 @@ interface MarkCartAsCompletedOptions {
|
|
|
2947
2934
|
orderId?: string | null;
|
|
2948
2935
|
}
|
|
2949
2936
|
|
|
2950
|
-
export { type ActionEvent, type AddDiscountRequest, type AddDiscountResponse, type AddDiscountToCurrentCartRequest, type AddDiscountToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, CalculationComponent, type CalculationComponentWithLiterals, type CalculationConfig, type CalculationError, type Cart, type
|
|
2937
|
+
export { type ActionEvent, type AddDiscountRequest, type AddDiscountResponse, type AddDiscountToCurrentCartRequest, type AddDiscountToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsOptions, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, type AdditionalFeeTax, type Address, type AddressLocation, type ApplicationError, type BusinessInfo, type CalculateCartOptions, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, CalculationComponent, type CalculationComponentWithLiterals, type CalculationConfig, type CalculationError, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Color, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomItemAttributes, type CustomItemDeliveryConfig, type CustomItemInput, type CustomItemPaymentConfig, type CustomItemPricingInfo, type CustomItemQuantityInfo, type CustomItemSource, type CustomItemTaxConfig, type CustomerInfo, type CustomerInfoIdOneOf, type DeleteCartRequest, type DeleteCartResponse, type DeleteCurrentCartRequest, type DeleteCurrentCartResponse, type DeliveryInfo, type DeliveryMethod, type DeliverySummary, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, DiscountStatus, type DiscountStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, ErrorCode, type ErrorCodeWithLiterals, type ExtendedFields, type ExternalReference, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCheckoutUrlOptions, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type ItemAttributes, type ItemDeliveryConfig, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type MessageEnvelope, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PlaceOrderOptions, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type RemoveDiscountFromCurrentCartRequest, type RemoveDiscountFromCurrentCartResponse, type RemoveDiscountRequest, type RemoveDiscountResponse, type RemoveGiftCardFromCurrentCartRequest, type RemoveGiftCardFromCurrentCartResponse, type RemoveGiftCardRequest, type RemoveGiftCardResponse, type RemoveLineItemsFromCurrentCartRequest, type RemoveLineItemsFromCurrentCartResponse, type RemoveLineItemsRequest, type RemoveLineItemsResponse, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type Scope, type SecuredMedia, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, Severity, type SeverityWithLiterals, type StreetAddress, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxDetails, type TaxInfo, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UpdateCart, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsOptions, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V2AdditionalFee, type V2LineItem, type V2SelectedMembership, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals };
|