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