@wix/auto_sdk_ecom_cart-v-2 1.0.16 → 1.0.18
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 +69 -39
- package/build/cjs/index.js +2 -17
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +2 -17
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +156 -34
- package/build/es/index.d.mts +69 -39
- package/build/es/index.mjs +2 -15
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +2 -15
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +156 -34
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/index.js +2 -17
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +70 -40
- package/build/internal/cjs/index.typings.js +2 -17
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +156 -34
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/index.mjs +2 -15
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +70 -40
- package/build/internal/es/index.typings.mjs +2 -15
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +156 -34
- package/package.json +2 -2
package/build/cjs/meta.d.ts
CHANGED
|
@@ -125,7 +125,7 @@ interface V2LineItem {
|
|
|
125
125
|
/**
|
|
126
126
|
* Custom extended fields for the line item object.
|
|
127
127
|
*
|
|
128
|
-
* [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.
|
|
128
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured using the 'Checkout & Orders - Line Items Schema Plugin' in the app dashboard before they can be accessed with API calls.
|
|
129
129
|
*/
|
|
130
130
|
extendedFields?: ExtendedFields;
|
|
131
131
|
/**
|
|
@@ -1237,7 +1237,7 @@ interface AddressLocation {
|
|
|
1237
1237
|
interface DeliveryMethod {
|
|
1238
1238
|
/**
|
|
1239
1239
|
* The carrier app id
|
|
1240
|
-
* @
|
|
1240
|
+
* @maxLength 50
|
|
1241
1241
|
*/
|
|
1242
1242
|
appId?: string;
|
|
1243
1243
|
/**
|
|
@@ -1460,16 +1460,6 @@ interface CartSummary {
|
|
|
1460
1460
|
priceSummary?: PriceSummary;
|
|
1461
1461
|
/** Payment details summarizing how the customer will pay for the order. */
|
|
1462
1462
|
paymentSummary?: PaymentSummary;
|
|
1463
|
-
/**
|
|
1464
|
-
* List of errors that occurred during the calculation process.
|
|
1465
|
-
* @maxSize 100
|
|
1466
|
-
*/
|
|
1467
|
-
errors?: CalculationError[];
|
|
1468
|
-
/**
|
|
1469
|
-
* List of business violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
|
|
1470
|
-
* @maxSize 100
|
|
1471
|
-
*/
|
|
1472
|
-
violations?: Violation[];
|
|
1473
1463
|
/**
|
|
1474
1464
|
* A token representing the Cart's calculated prices.
|
|
1475
1465
|
*
|
|
@@ -1486,6 +1476,17 @@ interface CartSummary {
|
|
|
1486
1476
|
* @maxLength 1024
|
|
1487
1477
|
*/
|
|
1488
1478
|
priceVerificationToken?: string | null;
|
|
1479
|
+
/**
|
|
1480
|
+
* List of errors that occurred during the calculation process, returned by Totals Calculator.
|
|
1481
|
+
* TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
|
|
1482
|
+
*/
|
|
1483
|
+
calculationErrors?: CalculationErrors;
|
|
1484
|
+
/**
|
|
1485
|
+
* List of business violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
|
|
1486
|
+
* TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
|
|
1487
|
+
* @maxSize 100
|
|
1488
|
+
*/
|
|
1489
|
+
spiViolations?: Violation[];
|
|
1489
1490
|
}
|
|
1490
1491
|
interface LineItemSummary {
|
|
1491
1492
|
/**
|
|
@@ -1730,32 +1731,149 @@ interface Charge {
|
|
|
1730
1731
|
/** The billing date from which the charge starts. */
|
|
1731
1732
|
cycleBillingDate?: Date | null;
|
|
1732
1733
|
}
|
|
1733
|
-
interface
|
|
1734
|
-
/**
|
|
1735
|
-
|
|
1736
|
-
/**
|
|
1737
|
-
|
|
1734
|
+
interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
1735
|
+
/** General shipping calculation error. */
|
|
1736
|
+
generalShippingCalculationError?: Details;
|
|
1737
|
+
/** Carrier errors. */
|
|
1738
|
+
carrierErrors?: CarrierErrors;
|
|
1739
|
+
/** Tax calculation error. */
|
|
1740
|
+
taxCalculationError?: Details;
|
|
1741
|
+
/** Coupon calculation error. */
|
|
1742
|
+
couponCalculationError?: Details;
|
|
1743
|
+
/** Gift card calculation error. */
|
|
1744
|
+
giftCardCalculationError?: Details;
|
|
1745
|
+
/**
|
|
1746
|
+
* Order validation errors.
|
|
1747
|
+
* @maxSize 100
|
|
1748
|
+
*/
|
|
1749
|
+
orderValidationErrors?: ApplicationError[];
|
|
1738
1750
|
/**
|
|
1739
|
-
*
|
|
1740
|
-
*
|
|
1751
|
+
* Membership payment methods calculation errors
|
|
1752
|
+
* For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
|
|
1741
1753
|
*/
|
|
1742
|
-
|
|
1754
|
+
membershipError?: Details;
|
|
1755
|
+
/** Discount Rule calculation error. */
|
|
1756
|
+
discountsCalculationError?: Details;
|
|
1743
1757
|
}
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
GIFT_CARDS = "GIFT_CARDS"
|
|
1758
|
+
/** @oneof */
|
|
1759
|
+
interface CalculationErrorsShippingCalculationErrorOneOf {
|
|
1760
|
+
/** General shipping calculation error. */
|
|
1761
|
+
generalShippingCalculationError?: Details;
|
|
1762
|
+
/** Carrier errors. */
|
|
1763
|
+
carrierErrors?: CarrierErrors;
|
|
1751
1764
|
}
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1765
|
+
interface Details extends DetailsKindOneOf {
|
|
1766
|
+
applicationError?: ApplicationError;
|
|
1767
|
+
validationError?: ValidationError;
|
|
1768
|
+
systemError?: SystemError;
|
|
1769
|
+
/**
|
|
1770
|
+
* deprecated in API's - to enable migration from rendering arbitrary tracing to rest response
|
|
1771
|
+
* @deprecated
|
|
1772
|
+
*/
|
|
1773
|
+
tracing?: Record<string, string>;
|
|
1774
|
+
}
|
|
1775
|
+
/** @oneof */
|
|
1776
|
+
interface DetailsKindOneOf {
|
|
1777
|
+
applicationError?: ApplicationError;
|
|
1778
|
+
validationError?: ValidationError;
|
|
1779
|
+
systemError?: SystemError;
|
|
1780
|
+
}
|
|
1781
|
+
interface ApplicationError {
|
|
1782
|
+
/** Error code. */
|
|
1783
|
+
code?: string;
|
|
1784
|
+
/** Description of the error. */
|
|
1785
|
+
description?: string;
|
|
1786
|
+
/** Data related to the error. */
|
|
1787
|
+
data?: Record<string, any> | null;
|
|
1788
|
+
}
|
|
1789
|
+
/**
|
|
1790
|
+
* example result:
|
|
1791
|
+
* {
|
|
1792
|
+
* "fieldViolations": [
|
|
1793
|
+
* {
|
|
1794
|
+
* "field": "fieldA",
|
|
1795
|
+
* "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]",
|
|
1796
|
+
* "violatedRule": "OTHER",
|
|
1797
|
+
* "ruleName": "INVALID_NOTE",
|
|
1798
|
+
* "data": {
|
|
1799
|
+
* "value": "FI"
|
|
1800
|
+
* }
|
|
1801
|
+
* },
|
|
1802
|
+
* {
|
|
1803
|
+
* "field": "fieldB",
|
|
1804
|
+
* "description": "field value out of range. supported range: [0-20]",
|
|
1805
|
+
* "violatedRule": "MAX",
|
|
1806
|
+
* "data": {
|
|
1807
|
+
* "threshold": 20
|
|
1808
|
+
* }
|
|
1809
|
+
* },
|
|
1810
|
+
* {
|
|
1811
|
+
* "field": "fieldC",
|
|
1812
|
+
* "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]",
|
|
1813
|
+
* "violatedRule": "FORMAT",
|
|
1814
|
+
* "data": {
|
|
1815
|
+
* "type": "PHONE"
|
|
1816
|
+
* }
|
|
1817
|
+
* }
|
|
1818
|
+
* ]
|
|
1819
|
+
* }
|
|
1820
|
+
*/
|
|
1821
|
+
interface ValidationError {
|
|
1822
|
+
fieldViolations?: FieldViolation[];
|
|
1823
|
+
}
|
|
1824
|
+
declare enum RuleType {
|
|
1825
|
+
VALIDATION = "VALIDATION",
|
|
1826
|
+
OTHER = "OTHER",
|
|
1827
|
+
MAX = "MAX",
|
|
1828
|
+
MIN = "MIN",
|
|
1829
|
+
MAX_LENGTH = "MAX_LENGTH",
|
|
1830
|
+
MIN_LENGTH = "MIN_LENGTH",
|
|
1831
|
+
MAX_SIZE = "MAX_SIZE",
|
|
1832
|
+
MIN_SIZE = "MIN_SIZE",
|
|
1833
|
+
FORMAT = "FORMAT",
|
|
1834
|
+
DECIMAL_LTE = "DECIMAL_LTE",
|
|
1835
|
+
DECIMAL_GTE = "DECIMAL_GTE",
|
|
1836
|
+
DECIMAL_LT = "DECIMAL_LT",
|
|
1837
|
+
DECIMAL_GT = "DECIMAL_GT",
|
|
1838
|
+
DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE",
|
|
1839
|
+
INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE",
|
|
1840
|
+
REQUIRED_FIELD = "REQUIRED_FIELD",
|
|
1841
|
+
FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED",
|
|
1842
|
+
ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT",
|
|
1843
|
+
EXACT_LENGTH = "EXACT_LENGTH",
|
|
1844
|
+
EXACT_SIZE = "EXACT_SIZE",
|
|
1845
|
+
REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD"
|
|
1756
1846
|
}
|
|
1757
1847
|
/** @enumType */
|
|
1758
|
-
type
|
|
1848
|
+
type RuleTypeWithLiterals = RuleType | 'VALIDATION' | 'OTHER' | 'MAX' | 'MIN' | 'MAX_LENGTH' | 'MIN_LENGTH' | 'MAX_SIZE' | 'MIN_SIZE' | 'FORMAT' | 'DECIMAL_LTE' | 'DECIMAL_GTE' | 'DECIMAL_LT' | 'DECIMAL_GT' | 'DECIMAL_MAX_SCALE' | 'INVALID_ENUM_VALUE' | 'REQUIRED_FIELD' | 'FIELD_NOT_ALLOWED' | 'ONE_OF_ALIGNMENT' | 'EXACT_LENGTH' | 'EXACT_SIZE' | 'REQUIRED_ONE_OF_FIELD';
|
|
1849
|
+
interface FieldViolation {
|
|
1850
|
+
field?: string;
|
|
1851
|
+
description?: string;
|
|
1852
|
+
violatedRule?: RuleTypeWithLiterals;
|
|
1853
|
+
/** applicable when violated_rule=OTHER */
|
|
1854
|
+
ruleName?: string | null;
|
|
1855
|
+
data?: Record<string, any> | null;
|
|
1856
|
+
}
|
|
1857
|
+
interface SystemError {
|
|
1858
|
+
/** Error code. */
|
|
1859
|
+
errorCode?: string | null;
|
|
1860
|
+
}
|
|
1861
|
+
interface CarrierErrors {
|
|
1862
|
+
/**
|
|
1863
|
+
* Carrier errors.
|
|
1864
|
+
* @maxSize 100
|
|
1865
|
+
*/
|
|
1866
|
+
errors?: CarrierError[];
|
|
1867
|
+
}
|
|
1868
|
+
interface CarrierError {
|
|
1869
|
+
/**
|
|
1870
|
+
* Carrier ID.
|
|
1871
|
+
* @format GUID
|
|
1872
|
+
*/
|
|
1873
|
+
carrierId?: string;
|
|
1874
|
+
/** Error details. */
|
|
1875
|
+
error?: Details;
|
|
1876
|
+
}
|
|
1759
1877
|
interface Violation {
|
|
1760
1878
|
/** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */
|
|
1761
1879
|
severity?: SeverityWithLiterals;
|
|
@@ -2175,10 +2293,14 @@ interface PlaceOrderRequest {
|
|
|
2175
2293
|
/**
|
|
2176
2294
|
* The pricing token received from `CalculateCart`'s response.
|
|
2177
2295
|
* Used to verify that the prices shown to the customer have not changed before completing checkout.
|
|
2178
|
-
* @maxLength
|
|
2179
|
-
* @readonly
|
|
2296
|
+
* @maxLength 3000
|
|
2180
2297
|
*/
|
|
2181
2298
|
pricingToken?: string | null;
|
|
2299
|
+
/**
|
|
2300
|
+
* Payment token.
|
|
2301
|
+
* @maxLength 100
|
|
2302
|
+
*/
|
|
2303
|
+
paymentToken?: string | null;
|
|
2182
2304
|
/** Urls to redirect to after payment is made. */
|
|
2183
2305
|
redirectUrls?: RedirectUrls;
|
|
2184
2306
|
/** Indicates the payment method should be saved on the order */
|
package/build/es/index.d.mts
CHANGED
|
@@ -123,7 +123,7 @@ interface V2LineItem {
|
|
|
123
123
|
/**
|
|
124
124
|
* Custom extended fields for the line item object.
|
|
125
125
|
*
|
|
126
|
-
* [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.
|
|
126
|
+
* [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured using the 'Checkout & Orders - Line Items Schema Plugin' in the app dashboard before they can be accessed with API calls.
|
|
127
127
|
*/
|
|
128
128
|
extendedFields?: ExtendedFields;
|
|
129
129
|
/**
|
|
@@ -1238,7 +1238,7 @@ interface AddressLocation {
|
|
|
1238
1238
|
interface DeliveryMethod {
|
|
1239
1239
|
/**
|
|
1240
1240
|
* The carrier app id
|
|
1241
|
-
* @
|
|
1241
|
+
* @maxLength 50
|
|
1242
1242
|
*/
|
|
1243
1243
|
appId?: string;
|
|
1244
1244
|
/**
|
|
@@ -1489,16 +1489,6 @@ interface CartSummary {
|
|
|
1489
1489
|
priceSummary?: PriceSummary;
|
|
1490
1490
|
/** Payment details summarizing how the customer will pay for the order. */
|
|
1491
1491
|
paymentSummary?: PaymentSummary;
|
|
1492
|
-
/**
|
|
1493
|
-
* List of errors that occurred during the calculation process.
|
|
1494
|
-
* @maxSize 100
|
|
1495
|
-
*/
|
|
1496
|
-
errors?: CalculationError[];
|
|
1497
|
-
/**
|
|
1498
|
-
* List of business violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
|
|
1499
|
-
* @maxSize 100
|
|
1500
|
-
*/
|
|
1501
|
-
violations?: Violation[];
|
|
1502
1492
|
/**
|
|
1503
1493
|
* A token representing the Cart's calculated prices.
|
|
1504
1494
|
*
|
|
@@ -1515,6 +1505,17 @@ interface CartSummary {
|
|
|
1515
1505
|
* @maxLength 1024
|
|
1516
1506
|
*/
|
|
1517
1507
|
priceVerificationToken?: string | null;
|
|
1508
|
+
/**
|
|
1509
|
+
* List of errors that occurred during the calculation process, returned by Totals Calculator.
|
|
1510
|
+
* TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
|
|
1511
|
+
*/
|
|
1512
|
+
calculationErrors?: CalculationErrors;
|
|
1513
|
+
/**
|
|
1514
|
+
* List of business violations raised by the Validations service plugin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/validations/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/service-plugins/validations-integration-service-plugin/introduction)).
|
|
1515
|
+
* TODO: Temporary field for backward compatibility; will be removed once we introduce the unified 'violations' model.
|
|
1516
|
+
* @maxSize 100
|
|
1517
|
+
*/
|
|
1518
|
+
spiViolations?: Violation[];
|
|
1518
1519
|
}
|
|
1519
1520
|
interface LineItemSummary {
|
|
1520
1521
|
/**
|
|
@@ -1759,32 +1760,37 @@ interface Charge {
|
|
|
1759
1760
|
/** The billing date from which the charge starts. */
|
|
1760
1761
|
cycleBillingDate?: Date | null;
|
|
1761
1762
|
}
|
|
1762
|
-
interface
|
|
1763
|
-
/**
|
|
1764
|
-
|
|
1765
|
-
/**
|
|
1766
|
-
|
|
1763
|
+
interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf {
|
|
1764
|
+
/** General shipping calculation error. */
|
|
1765
|
+
generalShippingCalculationError?: Details;
|
|
1766
|
+
/** Carrier errors. */
|
|
1767
|
+
carrierErrors?: CarrierErrors;
|
|
1768
|
+
/** Tax calculation error. */
|
|
1769
|
+
taxCalculationError?: Details;
|
|
1770
|
+
/** Coupon calculation error. */
|
|
1771
|
+
couponCalculationError?: Details;
|
|
1772
|
+
/** Gift card calculation error. */
|
|
1773
|
+
giftCardCalculationError?: Details;
|
|
1774
|
+
/**
|
|
1775
|
+
* Order validation errors.
|
|
1776
|
+
* @maxSize 100
|
|
1777
|
+
*/
|
|
1778
|
+
orderValidationErrors?: ApplicationError[];
|
|
1767
1779
|
/**
|
|
1768
|
-
*
|
|
1769
|
-
*
|
|
1780
|
+
* Membership payment methods calculation errors
|
|
1781
|
+
* For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid
|
|
1770
1782
|
*/
|
|
1771
|
-
|
|
1783
|
+
membershipError?: Details;
|
|
1784
|
+
/** Discount Rule calculation error. */
|
|
1785
|
+
discountsCalculationError?: Details;
|
|
1772
1786
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
GIFT_CARDS = "GIFT_CARDS"
|
|
1780
|
-
}
|
|
1781
|
-
/** @enumType */
|
|
1782
|
-
type CalculationComponentWithLiterals = CalculationComponent | 'UNKNOWN_CALCULATION_COMPONENT' | 'DISCOUNTS' | 'DELIVERY' | 'TAX' | 'MEMBERSHIPS' | 'GIFT_CARDS';
|
|
1783
|
-
declare enum ErrorCode {
|
|
1784
|
-
UNKNOWN_ERROR_CODE = "UNKNOWN_ERROR_CODE"
|
|
1787
|
+
/** @oneof */
|
|
1788
|
+
interface CalculationErrorsShippingCalculationErrorOneOf {
|
|
1789
|
+
/** General shipping calculation error. */
|
|
1790
|
+
generalShippingCalculationError?: Details;
|
|
1791
|
+
/** Carrier errors. */
|
|
1792
|
+
carrierErrors?: CarrierErrors;
|
|
1785
1793
|
}
|
|
1786
|
-
/** @enumType */
|
|
1787
|
-
type ErrorCodeWithLiterals = ErrorCode | 'UNKNOWN_ERROR_CODE';
|
|
1788
1794
|
interface Details extends DetailsKindOneOf {
|
|
1789
1795
|
applicationError?: ApplicationError;
|
|
1790
1796
|
validationError?: ValidationError;
|
|
@@ -1881,6 +1887,22 @@ interface SystemError {
|
|
|
1881
1887
|
/** Error code. */
|
|
1882
1888
|
errorCode?: string | null;
|
|
1883
1889
|
}
|
|
1890
|
+
interface CarrierErrors {
|
|
1891
|
+
/**
|
|
1892
|
+
* Carrier errors.
|
|
1893
|
+
* @maxSize 100
|
|
1894
|
+
*/
|
|
1895
|
+
errors?: CarrierError[];
|
|
1896
|
+
}
|
|
1897
|
+
interface CarrierError {
|
|
1898
|
+
/**
|
|
1899
|
+
* Carrier ID.
|
|
1900
|
+
* @format GUID
|
|
1901
|
+
*/
|
|
1902
|
+
carrierId?: string;
|
|
1903
|
+
/** Error details. */
|
|
1904
|
+
error?: Details;
|
|
1905
|
+
}
|
|
1884
1906
|
interface Violation {
|
|
1885
1907
|
/** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */
|
|
1886
1908
|
severity?: SeverityWithLiterals;
|
|
@@ -2614,10 +2636,14 @@ interface PlaceOrderRequest {
|
|
|
2614
2636
|
/**
|
|
2615
2637
|
* The pricing token received from `CalculateCart`'s response.
|
|
2616
2638
|
* Used to verify that the prices shown to the customer have not changed before completing checkout.
|
|
2617
|
-
* @maxLength
|
|
2618
|
-
* @readonly
|
|
2639
|
+
* @maxLength 3000
|
|
2619
2640
|
*/
|
|
2620
2641
|
pricingToken?: string | null;
|
|
2642
|
+
/**
|
|
2643
|
+
* Payment token.
|
|
2644
|
+
* @maxLength 100
|
|
2645
|
+
*/
|
|
2646
|
+
paymentToken?: string | null;
|
|
2621
2647
|
/** Urls to redirect to after payment is made. */
|
|
2622
2648
|
redirectUrls?: RedirectUrls;
|
|
2623
2649
|
/** Indicates the payment method should be saved on the order */
|
|
@@ -2986,10 +3012,14 @@ interface PlaceOrderOptions {
|
|
|
2986
3012
|
/**
|
|
2987
3013
|
* The pricing token received from `CalculateCart`'s response.
|
|
2988
3014
|
* Used to verify that the prices shown to the customer have not changed before completing checkout.
|
|
2989
|
-
* @maxLength
|
|
2990
|
-
* @readonly
|
|
3015
|
+
* @maxLength 3000
|
|
2991
3016
|
*/
|
|
2992
3017
|
pricingToken?: string | null;
|
|
3018
|
+
/**
|
|
3019
|
+
* Payment token.
|
|
3020
|
+
* @maxLength 100
|
|
3021
|
+
*/
|
|
3022
|
+
paymentToken?: string | null;
|
|
2993
3023
|
/** Urls to redirect to after payment is made. */
|
|
2994
3024
|
redirectUrls?: RedirectUrls;
|
|
2995
3025
|
/** Indicates the payment method should be saved on the order */
|
|
@@ -3025,4 +3055,4 @@ interface MarkCartAsCompletedOptions {
|
|
|
3025
3055
|
orderId?: string | null;
|
|
3026
3056
|
}
|
|
3027
3057
|
|
|
3028
|
-
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, 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,
|
|
3058
|
+
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, 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, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, type Color, type Coupon, type CreateCartOptions, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartRequest, type CreateCurrentCartResponse, type CreatedBy, type CreatedByIdOneOf, type CustomContentReference, type CustomField, 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, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, 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 ItemDiscount, 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 LegacyFields, type LineItem, type LineItemSummary, type LineItemTax, type LineItemUpdate, type MarkCartAsCompletedOptions, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, 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 RemoveCouponFromCurrentCartRequest, type RemoveCouponFromCurrentCartResponse, type RemoveCouponRequest, type RemoveCouponResponse, 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, type SubscriptionCharges, 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 ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals };
|
package/build/es/index.mjs
CHANGED
|
@@ -1096,19 +1096,6 @@ var DiscountScope = /* @__PURE__ */ ((DiscountScope2) => {
|
|
|
1096
1096
|
DiscountScope2["DELIVERY"] = "DELIVERY";
|
|
1097
1097
|
return DiscountScope2;
|
|
1098
1098
|
})(DiscountScope || {});
|
|
1099
|
-
var CalculationComponent = /* @__PURE__ */ ((CalculationComponent2) => {
|
|
1100
|
-
CalculationComponent2["UNKNOWN_CALCULATION_COMPONENT"] = "UNKNOWN_CALCULATION_COMPONENT";
|
|
1101
|
-
CalculationComponent2["DISCOUNTS"] = "DISCOUNTS";
|
|
1102
|
-
CalculationComponent2["DELIVERY"] = "DELIVERY";
|
|
1103
|
-
CalculationComponent2["TAX"] = "TAX";
|
|
1104
|
-
CalculationComponent2["MEMBERSHIPS"] = "MEMBERSHIPS";
|
|
1105
|
-
CalculationComponent2["GIFT_CARDS"] = "GIFT_CARDS";
|
|
1106
|
-
return CalculationComponent2;
|
|
1107
|
-
})(CalculationComponent || {});
|
|
1108
|
-
var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
|
|
1109
|
-
ErrorCode2["UNKNOWN_ERROR_CODE"] = "UNKNOWN_ERROR_CODE";
|
|
1110
|
-
return ErrorCode2;
|
|
1111
|
-
})(ErrorCode || {});
|
|
1112
1099
|
var RuleType = /* @__PURE__ */ ((RuleType2) => {
|
|
1113
1100
|
RuleType2["VALIDATION"] = "VALIDATION";
|
|
1114
1101
|
RuleType2["OTHER"] = "OTHER";
|
|
@@ -1511,6 +1498,7 @@ async function placeOrder2(cartId, options) {
|
|
|
1511
1498
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1512
1499
|
cartId,
|
|
1513
1500
|
pricingToken: options?.pricingToken,
|
|
1501
|
+
paymentToken: options?.paymentToken,
|
|
1514
1502
|
redirectUrls: options?.redirectUrls,
|
|
1515
1503
|
savePaymentMethod: options?.savePaymentMethod,
|
|
1516
1504
|
delayCapture: options?.delayCapture
|
|
@@ -1529,6 +1517,7 @@ async function placeOrder2(cartId, options) {
|
|
|
1529
1517
|
explicitPathsToArguments: {
|
|
1530
1518
|
cartId: "$[0]",
|
|
1531
1519
|
pricingToken: "$[1].pricingToken",
|
|
1520
|
+
paymentToken: "$[1].paymentToken",
|
|
1532
1521
|
redirectUrls: "$[1].redirectUrls",
|
|
1533
1522
|
savePaymentMethod: "$[1].savePaymentMethod",
|
|
1534
1523
|
delayCapture: "$[1].delayCapture"
|
|
@@ -2117,12 +2106,10 @@ var removeGiftCard4 = /* @__PURE__ */ createRESTModule(removeGiftCard3);
|
|
|
2117
2106
|
var markCartAsCompleted4 = /* @__PURE__ */ createRESTModule(markCartAsCompleted3);
|
|
2118
2107
|
var handleAsyncCheckoutCompletion4 = /* @__PURE__ */ createRESTModule(handleAsyncCheckoutCompletion3);
|
|
2119
2108
|
export {
|
|
2120
|
-
CalculationComponent,
|
|
2121
2109
|
ChannelType,
|
|
2122
2110
|
DescriptionLineType,
|
|
2123
2111
|
DiscountScope,
|
|
2124
2112
|
DiscountSourceType,
|
|
2125
|
-
ErrorCode,
|
|
2126
2113
|
FileType,
|
|
2127
2114
|
ItemStatus,
|
|
2128
2115
|
ItemTypeItemType,
|