@wix/auto_sdk_ecom_cart-v-2 1.0.2 → 1.0.4
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 +121 -64
- package/build/cjs/index.js +3 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +3 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +120 -63
- package/build/cjs/meta.js +3 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +121 -64
- package/build/es/index.mjs +3 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +3 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +120 -63
- package/build/es/meta.mjs +3 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +14 -14
- package/build/internal/cjs/index.js +3 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +134 -77
- package/build/internal/cjs/index.typings.js +3 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +120 -63
- package/build/internal/cjs/meta.js +3 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +14 -14
- package/build/internal/es/index.mjs +3 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +134 -77
- package/build/internal/es/index.typings.mjs +3 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +120 -63
- package/build/internal/es/meta.mjs +3 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/meta.d.ts
CHANGED
|
@@ -733,7 +733,7 @@ interface ItemPaymentConfig {
|
|
|
733
733
|
* Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`.
|
|
734
734
|
* This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`.
|
|
735
735
|
*/
|
|
736
|
-
selectedMembership?:
|
|
736
|
+
selectedMembership?: SelectedMembership;
|
|
737
737
|
/**
|
|
738
738
|
* Type of selected payment option for current item.
|
|
739
739
|
*
|
|
@@ -741,7 +741,7 @@ interface ItemPaymentConfig {
|
|
|
741
741
|
*/
|
|
742
742
|
paymentOption?: PaymentOptionTypeWithLiterals;
|
|
743
743
|
}
|
|
744
|
-
interface
|
|
744
|
+
interface SelectedMembership {
|
|
745
745
|
/**
|
|
746
746
|
* Membership ID.
|
|
747
747
|
* @minLength 1
|
|
@@ -1130,6 +1130,33 @@ interface CustomerInfo extends CustomerInfoIdOneOf {
|
|
|
1130
1130
|
* @readonly
|
|
1131
1131
|
*/
|
|
1132
1132
|
userId?: string;
|
|
1133
|
+
/**
|
|
1134
|
+
* Customer's first name.
|
|
1135
|
+
* @maxLength 100
|
|
1136
|
+
*/
|
|
1137
|
+
firstName?: string | null;
|
|
1138
|
+
/**
|
|
1139
|
+
* Customer's last name.
|
|
1140
|
+
* @maxLength 100
|
|
1141
|
+
*/
|
|
1142
|
+
lastName?: string | null;
|
|
1143
|
+
/**
|
|
1144
|
+
* Customer's phone number.
|
|
1145
|
+
* @format PHONE
|
|
1146
|
+
*/
|
|
1147
|
+
phone?: string | null;
|
|
1148
|
+
/**
|
|
1149
|
+
* Company name.
|
|
1150
|
+
* @maxLength 1000
|
|
1151
|
+
*/
|
|
1152
|
+
company?: string | null;
|
|
1153
|
+
/** Business VAT registration number. */
|
|
1154
|
+
vatId?: VatId;
|
|
1155
|
+
/**
|
|
1156
|
+
* Customer's email address.
|
|
1157
|
+
* @format EMAIL
|
|
1158
|
+
*/
|
|
1159
|
+
email?: string | null;
|
|
1133
1160
|
/**
|
|
1134
1161
|
* The Contact ID of the customer.
|
|
1135
1162
|
* Created automatically if one does not yet exist.
|
|
@@ -1139,19 +1166,14 @@ interface CustomerInfo extends CustomerInfoIdOneOf {
|
|
|
1139
1166
|
*/
|
|
1140
1167
|
contactId?: string | null;
|
|
1141
1168
|
/**
|
|
1142
|
-
*
|
|
1143
|
-
* @format EMAIL
|
|
1144
|
-
*/
|
|
1145
|
-
email?: string | null;
|
|
1146
|
-
/**
|
|
1147
|
-
* The customer's language, represented as a two-letter ISO 639-1 code.
|
|
1169
|
+
* Customer's language, represented as a two-letter ISO 639-1 code.
|
|
1148
1170
|
* Resolved automatically from the request metadata ('x-wix-linguist' header).
|
|
1149
1171
|
* @format LANGUAGE
|
|
1150
1172
|
* @readonly
|
|
1151
1173
|
*/
|
|
1152
1174
|
languageCode?: string;
|
|
1153
1175
|
/**
|
|
1154
|
-
*
|
|
1176
|
+
* Customer’s currency, represented as a three-letter ISO 4217 code.
|
|
1155
1177
|
* Resolved automatically from the request metadata ('x-wix-currency' header).
|
|
1156
1178
|
* @format CURRENCY
|
|
1157
1179
|
* @readonly
|
|
@@ -1180,11 +1202,31 @@ interface CustomerInfoIdOneOf {
|
|
|
1180
1202
|
*/
|
|
1181
1203
|
userId?: string;
|
|
1182
1204
|
}
|
|
1205
|
+
interface VatId {
|
|
1206
|
+
/** Customer's tax ID. */
|
|
1207
|
+
id?: string;
|
|
1208
|
+
/**
|
|
1209
|
+
* Tax type.
|
|
1210
|
+
*
|
|
1211
|
+
* Supported values:
|
|
1212
|
+
* + `CPF`: for individual tax payers
|
|
1213
|
+
* + `CNPJ`: for corporations
|
|
1214
|
+
*/
|
|
1215
|
+
type?: VatTypeWithLiterals;
|
|
1216
|
+
}
|
|
1217
|
+
/** tax info types */
|
|
1218
|
+
declare enum VatType {
|
|
1219
|
+
UNSPECIFIED = "UNSPECIFIED",
|
|
1220
|
+
/** CPF - for individual tax payers. */
|
|
1221
|
+
CPF = "CPF",
|
|
1222
|
+
/** CNPJ - for corporations */
|
|
1223
|
+
CNPJ = "CNPJ"
|
|
1224
|
+
}
|
|
1225
|
+
/** @enumType */
|
|
1226
|
+
type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';
|
|
1183
1227
|
interface DeliveryInfo {
|
|
1184
1228
|
/** The delivery address. */
|
|
1185
1229
|
address?: Address;
|
|
1186
|
-
/** The delivery recipient. */
|
|
1187
|
-
recipient?: FullAddressContactDetails;
|
|
1188
1230
|
/** The selected delivery method by the customer. */
|
|
1189
1231
|
method?: DeliveryMethod;
|
|
1190
1232
|
/**
|
|
@@ -1244,53 +1286,6 @@ interface StreetAddress {
|
|
|
1244
1286
|
/** Street name. */
|
|
1245
1287
|
name?: string;
|
|
1246
1288
|
}
|
|
1247
|
-
/** Full contact details for an address */
|
|
1248
|
-
interface FullAddressContactDetails {
|
|
1249
|
-
/**
|
|
1250
|
-
* First name.
|
|
1251
|
-
* @maxLength 100
|
|
1252
|
-
*/
|
|
1253
|
-
firstName?: string | null;
|
|
1254
|
-
/**
|
|
1255
|
-
* Last name.
|
|
1256
|
-
* @maxLength 100
|
|
1257
|
-
*/
|
|
1258
|
-
lastName?: string | null;
|
|
1259
|
-
/**
|
|
1260
|
-
* Phone number.
|
|
1261
|
-
* @format PHONE
|
|
1262
|
-
*/
|
|
1263
|
-
phone?: string | null;
|
|
1264
|
-
/**
|
|
1265
|
-
* Company name.
|
|
1266
|
-
* @maxLength 1000
|
|
1267
|
-
*/
|
|
1268
|
-
company?: string | null;
|
|
1269
|
-
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
1270
|
-
vatId?: VatId;
|
|
1271
|
-
}
|
|
1272
|
-
interface VatId {
|
|
1273
|
-
/** Customer's tax ID. */
|
|
1274
|
-
id?: string;
|
|
1275
|
-
/**
|
|
1276
|
-
* Tax type.
|
|
1277
|
-
*
|
|
1278
|
-
* Supported values:
|
|
1279
|
-
* + `CPF`: for individual tax payers
|
|
1280
|
-
* + `CNPJ`: for corporations
|
|
1281
|
-
*/
|
|
1282
|
-
type?: VatTypeWithLiterals;
|
|
1283
|
-
}
|
|
1284
|
-
/** tax info types */
|
|
1285
|
-
declare enum VatType {
|
|
1286
|
-
UNSPECIFIED = "UNSPECIFIED",
|
|
1287
|
-
/** CPF - for individual tax payers. */
|
|
1288
|
-
CPF = "CPF",
|
|
1289
|
-
/** CNPJ - for corporations */
|
|
1290
|
-
CNPJ = "CNPJ"
|
|
1291
|
-
}
|
|
1292
|
-
/** @enumType */
|
|
1293
|
-
type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';
|
|
1294
1289
|
interface DeliveryMethod {
|
|
1295
1290
|
/**
|
|
1296
1291
|
* The carrier app id
|
|
@@ -1327,7 +1322,7 @@ declare enum WeightUnit {
|
|
|
1327
1322
|
type WeightUnitWithLiterals = WeightUnit | 'UNSPECIFIED_WEIGHT_UNIT' | 'KG' | 'LB';
|
|
1328
1323
|
interface TaxInfo {
|
|
1329
1324
|
/**
|
|
1330
|
-
* Indicates whether tax is already included in prices (line items,
|
|
1325
|
+
* Indicates whether tax is already included in prices (line items, delivery, additional fess).
|
|
1331
1326
|
* @readonly
|
|
1332
1327
|
*/
|
|
1333
1328
|
pricesIncludeTax?: boolean;
|
|
@@ -1378,6 +1373,31 @@ interface GiftCard {
|
|
|
1378
1373
|
*/
|
|
1379
1374
|
externalId?: string | null;
|
|
1380
1375
|
}
|
|
1376
|
+
/** Full contact details for an address */
|
|
1377
|
+
interface FullAddressContactDetails {
|
|
1378
|
+
/**
|
|
1379
|
+
* First name.
|
|
1380
|
+
* @maxLength 100
|
|
1381
|
+
*/
|
|
1382
|
+
firstName?: string | null;
|
|
1383
|
+
/**
|
|
1384
|
+
* Last name.
|
|
1385
|
+
* @maxLength 100
|
|
1386
|
+
*/
|
|
1387
|
+
lastName?: string | null;
|
|
1388
|
+
/**
|
|
1389
|
+
* Phone number.
|
|
1390
|
+
* @format PHONE
|
|
1391
|
+
*/
|
|
1392
|
+
phone?: string | null;
|
|
1393
|
+
/**
|
|
1394
|
+
* Company name.
|
|
1395
|
+
* @maxLength 1000
|
|
1396
|
+
*/
|
|
1397
|
+
company?: string | null;
|
|
1398
|
+
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
1399
|
+
vatId?: VatId;
|
|
1400
|
+
}
|
|
1381
1401
|
interface CartSettings {
|
|
1382
1402
|
/**
|
|
1383
1403
|
* Whether to restrict the option to add or remove a gift card on the checkout page.
|
|
@@ -1617,7 +1637,12 @@ interface PaymentSummary {
|
|
|
1617
1637
|
* A list of valid memberships that will be charged as part of the order.
|
|
1618
1638
|
* @maxSize 300
|
|
1619
1639
|
*/
|
|
1620
|
-
memberships?:
|
|
1640
|
+
memberships?: Membership[];
|
|
1641
|
+
/**
|
|
1642
|
+
* Charges information for each subscription in the checkout.
|
|
1643
|
+
* @maxSize 100
|
|
1644
|
+
*/
|
|
1645
|
+
subscriptionCharges?: SubscriptionCharges[];
|
|
1621
1646
|
/** Indicates whether a remaining payment is required to create the order, after applying gift cards. */
|
|
1622
1647
|
requiresPaymentAfterGiftCard?: boolean;
|
|
1623
1648
|
/** The total amount due after applying all gift cards. */
|
|
@@ -1638,7 +1663,7 @@ interface GiftCardSummary {
|
|
|
1638
1663
|
/** The amount to be reduced from the gift card's balance. */
|
|
1639
1664
|
redeemAmount?: MultiCurrencyPrice;
|
|
1640
1665
|
}
|
|
1641
|
-
interface
|
|
1666
|
+
interface Membership {
|
|
1642
1667
|
/**
|
|
1643
1668
|
* Membership ID.
|
|
1644
1669
|
* @minLength 1
|
|
@@ -1658,6 +1683,38 @@ interface SelectedMembership {
|
|
|
1658
1683
|
* @maxLength 100
|
|
1659
1684
|
*/
|
|
1660
1685
|
lineItemIds?: string[];
|
|
1686
|
+
/** The name of this membership. */
|
|
1687
|
+
name?: TranslatableString;
|
|
1688
|
+
}
|
|
1689
|
+
interface SubscriptionCharges {
|
|
1690
|
+
/**
|
|
1691
|
+
* ids of the items the subscription is defined on
|
|
1692
|
+
* @format GUID
|
|
1693
|
+
* @minSize 1
|
|
1694
|
+
* @maxSize 300
|
|
1695
|
+
*/
|
|
1696
|
+
lineItemIds?: string[];
|
|
1697
|
+
/**
|
|
1698
|
+
* Generated description explaining future charges amount and schedule.
|
|
1699
|
+
* Translated to subscription order buyer language, or to site language if was not provided.
|
|
1700
|
+
* @maxLength 1000
|
|
1701
|
+
*/
|
|
1702
|
+
description?: string | null;
|
|
1703
|
+
/**
|
|
1704
|
+
* Charges for subscription.
|
|
1705
|
+
* @maxSize 50
|
|
1706
|
+
*/
|
|
1707
|
+
charges?: Charge[];
|
|
1708
|
+
}
|
|
1709
|
+
interface Charge {
|
|
1710
|
+
/** The cycle number from which the charge starts. */
|
|
1711
|
+
cycleFrom?: number;
|
|
1712
|
+
/** The number of cycles for which the charge is applicable. */
|
|
1713
|
+
cycleCount?: number | null;
|
|
1714
|
+
/** Charge summary. */
|
|
1715
|
+
priceSummary?: PriceSummary;
|
|
1716
|
+
/** The billing date from which the charge starts. */
|
|
1717
|
+
cycleBillingDate?: Date | null;
|
|
1661
1718
|
}
|
|
1662
1719
|
interface CalculationError {
|
|
1663
1720
|
/** The calculation component that caused the error. */
|
|
@@ -1757,7 +1814,7 @@ interface CatalogItemInput {
|
|
|
1757
1814
|
*/
|
|
1758
1815
|
quantity?: number;
|
|
1759
1816
|
/** Selected membership to be used as payment for this item. */
|
|
1760
|
-
selectedMembership?:
|
|
1817
|
+
selectedMembership?: SelectedMembership;
|
|
1761
1818
|
/**
|
|
1762
1819
|
* Overriding values for catalog item properties.
|
|
1763
1820
|
* To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions".
|
|
@@ -1972,7 +2029,7 @@ interface SelectedMembershipUpdate {
|
|
|
1972
2029
|
*
|
|
1973
2030
|
* To just remove current selected membership, and not replace with a new one, pass an empty value here.
|
|
1974
2031
|
*/
|
|
1975
|
-
newMembership?:
|
|
2032
|
+
newMembership?: SelectedMembership;
|
|
1976
2033
|
}
|
|
1977
2034
|
interface CreateCartRequest {
|
|
1978
2035
|
/** Cart to be created. */
|
package/build/cjs/meta.js
CHANGED