@wix/auto_sdk_ecom_cart-v-2 1.0.15 → 1.0.17
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 +68 -38
- package/build/cjs/index.js +53 -17
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +53 -17
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +155 -33
- package/build/cjs/meta.js +51 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +68 -38
- package/build/es/index.mjs +53 -15
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +53 -15
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +155 -33
- package/build/es/meta.mjs +51 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +2 -2
- package/build/internal/cjs/index.js +53 -17
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +69 -39
- package/build/internal/cjs/index.typings.js +53 -17
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +155 -33
- package/build/internal/cjs/meta.js +51 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +2 -2
- package/build/internal/es/index.mjs +53 -15
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +69 -39
- package/build/internal/es/index.typings.mjs +53 -15
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +155 -33
- package/build/internal/es/meta.mjs +51 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.mjs
CHANGED
|
@@ -154,6 +154,9 @@ function createCart(payload) {
|
|
|
154
154
|
method: "POST",
|
|
155
155
|
methodFqn: "wix.ecom.cart.v2.CartService.CreateCart",
|
|
156
156
|
packageName: PACKAGE_NAME,
|
|
157
|
+
migrationOptions: {
|
|
158
|
+
optInTransformResponse: true
|
|
159
|
+
},
|
|
157
160
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
158
161
|
protoPath: "/v2/carts",
|
|
159
162
|
data: serializedData,
|
|
@@ -204,6 +207,9 @@ function getCart(payload) {
|
|
|
204
207
|
method: "GET",
|
|
205
208
|
methodFqn: "wix.ecom.cart.v2.CartService.GetCart",
|
|
206
209
|
packageName: PACKAGE_NAME,
|
|
210
|
+
migrationOptions: {
|
|
211
|
+
optInTransformResponse: true
|
|
212
|
+
},
|
|
207
213
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
208
214
|
protoPath: "/v2/carts/{cartId}",
|
|
209
215
|
data: payload,
|
|
@@ -288,6 +294,9 @@ function updateCart(payload) {
|
|
|
288
294
|
method: "PATCH",
|
|
289
295
|
methodFqn: "wix.ecom.cart.v2.CartService.UpdateCart",
|
|
290
296
|
packageName: PACKAGE_NAME,
|
|
297
|
+
migrationOptions: {
|
|
298
|
+
optInTransformResponse: true
|
|
299
|
+
},
|
|
291
300
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
292
301
|
protoPath: "/v2/carts/{cart.id}",
|
|
293
302
|
data: serializedData,
|
|
@@ -338,6 +347,9 @@ function deleteCart(payload) {
|
|
|
338
347
|
method: "DELETE",
|
|
339
348
|
methodFqn: "wix.ecom.cart.v2.CartService.DeleteCart",
|
|
340
349
|
packageName: PACKAGE_NAME,
|
|
350
|
+
migrationOptions: {
|
|
351
|
+
optInTransformResponse: true
|
|
352
|
+
},
|
|
341
353
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
342
354
|
protoPath: "/v2/carts/{cartId}",
|
|
343
355
|
data: payload,
|
|
@@ -356,6 +368,9 @@ function refreshCart(payload) {
|
|
|
356
368
|
method: "POST",
|
|
357
369
|
methodFqn: "wix.ecom.cart.v2.CartService.RefreshCart",
|
|
358
370
|
packageName: PACKAGE_NAME,
|
|
371
|
+
migrationOptions: {
|
|
372
|
+
optInTransformResponse: true
|
|
373
|
+
},
|
|
359
374
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
360
375
|
protoPath: "/v2/carts/{cartId}/refresh",
|
|
361
376
|
data: payload,
|
|
@@ -406,6 +421,9 @@ function calculateCart(payload) {
|
|
|
406
421
|
method: "POST",
|
|
407
422
|
methodFqn: "wix.ecom.cart.v2.CartService.CalculateCart",
|
|
408
423
|
packageName: PACKAGE_NAME,
|
|
424
|
+
migrationOptions: {
|
|
425
|
+
optInTransformResponse: true
|
|
426
|
+
},
|
|
409
427
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
410
428
|
protoPath: "/v2/carts/{cartId}/calculate",
|
|
411
429
|
data: payload,
|
|
@@ -459,6 +477,9 @@ function getCheckoutUrl(payload) {
|
|
|
459
477
|
method: "POST",
|
|
460
478
|
methodFqn: "wix.ecom.cart.v2.CartService.GetCheckoutURL",
|
|
461
479
|
packageName: PACKAGE_NAME,
|
|
480
|
+
migrationOptions: {
|
|
481
|
+
optInTransformResponse: true
|
|
482
|
+
},
|
|
462
483
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
463
484
|
protoPath: "/v2/carts/{cartId}/get-checkout-url",
|
|
464
485
|
data: payload,
|
|
@@ -477,6 +498,9 @@ function placeOrder(payload) {
|
|
|
477
498
|
method: "POST",
|
|
478
499
|
methodFqn: "wix.ecom.cart.v2.CartService.PlaceOrder",
|
|
479
500
|
packageName: PACKAGE_NAME,
|
|
501
|
+
migrationOptions: {
|
|
502
|
+
optInTransformResponse: true
|
|
503
|
+
},
|
|
480
504
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
481
505
|
protoPath: "/v2/carts/{cartId}/place-order",
|
|
482
506
|
data: payload,
|
|
@@ -519,6 +543,9 @@ function addLineItems(payload) {
|
|
|
519
543
|
method: "POST",
|
|
520
544
|
methodFqn: "wix.ecom.cart.v2.CartService.AddLineItems",
|
|
521
545
|
packageName: PACKAGE_NAME,
|
|
546
|
+
migrationOptions: {
|
|
547
|
+
optInTransformResponse: true
|
|
548
|
+
},
|
|
522
549
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
523
550
|
protoPath: "/v2/carts/{cartId}/add-line-items",
|
|
524
551
|
data: serializedData,
|
|
@@ -569,6 +596,9 @@ function removeLineItems(payload) {
|
|
|
569
596
|
method: "POST",
|
|
570
597
|
methodFqn: "wix.ecom.cart.v2.CartService.RemoveLineItems",
|
|
571
598
|
packageName: PACKAGE_NAME,
|
|
599
|
+
migrationOptions: {
|
|
600
|
+
optInTransformResponse: true
|
|
601
|
+
},
|
|
572
602
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
573
603
|
protoPath: "/v2/carts/{cartId}/remove-line-items",
|
|
574
604
|
data: payload,
|
|
@@ -619,6 +649,9 @@ function updateLineItems(payload) {
|
|
|
619
649
|
method: "POST",
|
|
620
650
|
methodFqn: "wix.ecom.cart.v2.CartService.UpdateLineItems",
|
|
621
651
|
packageName: PACKAGE_NAME,
|
|
652
|
+
migrationOptions: {
|
|
653
|
+
optInTransformResponse: true
|
|
654
|
+
},
|
|
622
655
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
623
656
|
protoPath: "/v2/carts/{cartId}/update-line-items",
|
|
624
657
|
data: payload,
|
|
@@ -669,6 +702,9 @@ function addCoupon(payload) {
|
|
|
669
702
|
method: "POST",
|
|
670
703
|
methodFqn: "wix.ecom.cart.v2.CartService.AddCoupon",
|
|
671
704
|
packageName: PACKAGE_NAME,
|
|
705
|
+
migrationOptions: {
|
|
706
|
+
optInTransformResponse: true
|
|
707
|
+
},
|
|
672
708
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
673
709
|
protoPath: "/v2/carts/{cartId}/add-coupon",
|
|
674
710
|
data: payload,
|
|
@@ -719,6 +755,9 @@ function removeCoupon(payload) {
|
|
|
719
755
|
method: "POST",
|
|
720
756
|
methodFqn: "wix.ecom.cart.v2.CartService.RemoveCoupon",
|
|
721
757
|
packageName: PACKAGE_NAME,
|
|
758
|
+
migrationOptions: {
|
|
759
|
+
optInTransformResponse: true
|
|
760
|
+
},
|
|
722
761
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
723
762
|
protoPath: "/v2/carts/{cartId}/remove-coupon",
|
|
724
763
|
data: payload,
|
|
@@ -769,6 +808,9 @@ function addGiftCard(payload) {
|
|
|
769
808
|
method: "POST",
|
|
770
809
|
methodFqn: "wix.ecom.cart.v2.CartService.AddGiftCard",
|
|
771
810
|
packageName: PACKAGE_NAME,
|
|
811
|
+
migrationOptions: {
|
|
812
|
+
optInTransformResponse: true
|
|
813
|
+
},
|
|
772
814
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
773
815
|
protoPath: "/v2/carts/{cartId}/add-gift-card",
|
|
774
816
|
data: payload,
|
|
@@ -819,6 +861,9 @@ function removeGiftCard(payload) {
|
|
|
819
861
|
method: "POST",
|
|
820
862
|
methodFqn: "wix.ecom.cart.v2.CartService.RemoveGiftCard",
|
|
821
863
|
packageName: PACKAGE_NAME,
|
|
864
|
+
migrationOptions: {
|
|
865
|
+
optInTransformResponse: true
|
|
866
|
+
},
|
|
822
867
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
823
868
|
protoPath: "/v2/carts/{cartId}/remove-gift-card",
|
|
824
869
|
data: payload,
|
|
@@ -869,6 +914,9 @@ function markCartAsCompleted(payload) {
|
|
|
869
914
|
method: "POST",
|
|
870
915
|
methodFqn: "wix.ecom.cart.v2.CartService.MarkCartAsCompleted",
|
|
871
916
|
packageName: PACKAGE_NAME,
|
|
917
|
+
migrationOptions: {
|
|
918
|
+
optInTransformResponse: true
|
|
919
|
+
},
|
|
872
920
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
873
921
|
protoPath: "/v2/carts/{cartId}/mark-cart-as-completed",
|
|
874
922
|
data: payload,
|
|
@@ -919,6 +967,9 @@ function handleAsyncCheckoutCompletion(payload) {
|
|
|
919
967
|
method: "POST",
|
|
920
968
|
methodFqn: "wix.ecom.cart.v2.CartService.HandleAsyncCheckoutCompletion",
|
|
921
969
|
packageName: PACKAGE_NAME,
|
|
970
|
+
migrationOptions: {
|
|
971
|
+
optInTransformResponse: true
|
|
972
|
+
},
|
|
922
973
|
url: resolveWixEcomCartV2CartServiceUrl({
|
|
923
974
|
protoPath: "/v2/carts/handle-async-checkout-completion",
|
|
924
975
|
data: payload,
|
|
@@ -1045,19 +1096,6 @@ var DiscountScope = /* @__PURE__ */ ((DiscountScope2) => {
|
|
|
1045
1096
|
DiscountScope2["DELIVERY"] = "DELIVERY";
|
|
1046
1097
|
return DiscountScope2;
|
|
1047
1098
|
})(DiscountScope || {});
|
|
1048
|
-
var CalculationComponent = /* @__PURE__ */ ((CalculationComponent2) => {
|
|
1049
|
-
CalculationComponent2["UNKNOWN_CALCULATION_COMPONENT"] = "UNKNOWN_CALCULATION_COMPONENT";
|
|
1050
|
-
CalculationComponent2["DISCOUNTS"] = "DISCOUNTS";
|
|
1051
|
-
CalculationComponent2["DELIVERY"] = "DELIVERY";
|
|
1052
|
-
CalculationComponent2["TAX"] = "TAX";
|
|
1053
|
-
CalculationComponent2["MEMBERSHIPS"] = "MEMBERSHIPS";
|
|
1054
|
-
CalculationComponent2["GIFT_CARDS"] = "GIFT_CARDS";
|
|
1055
|
-
return CalculationComponent2;
|
|
1056
|
-
})(CalculationComponent || {});
|
|
1057
|
-
var ErrorCode = /* @__PURE__ */ ((ErrorCode2) => {
|
|
1058
|
-
ErrorCode2["UNKNOWN_ERROR_CODE"] = "UNKNOWN_ERROR_CODE";
|
|
1059
|
-
return ErrorCode2;
|
|
1060
|
-
})(ErrorCode || {});
|
|
1061
1099
|
var RuleType = /* @__PURE__ */ ((RuleType2) => {
|
|
1062
1100
|
RuleType2["VALIDATION"] = "VALIDATION";
|
|
1063
1101
|
RuleType2["OTHER"] = "OTHER";
|
|
@@ -1460,6 +1498,7 @@ async function placeOrder2(cartId, options) {
|
|
|
1460
1498
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1461
1499
|
cartId,
|
|
1462
1500
|
pricingToken: options?.pricingToken,
|
|
1501
|
+
paymentToken: options?.paymentToken,
|
|
1463
1502
|
redirectUrls: options?.redirectUrls,
|
|
1464
1503
|
savePaymentMethod: options?.savePaymentMethod,
|
|
1465
1504
|
delayCapture: options?.delayCapture
|
|
@@ -1478,6 +1517,7 @@ async function placeOrder2(cartId, options) {
|
|
|
1478
1517
|
explicitPathsToArguments: {
|
|
1479
1518
|
cartId: "$[0]",
|
|
1480
1519
|
pricingToken: "$[1].pricingToken",
|
|
1520
|
+
paymentToken: "$[1].paymentToken",
|
|
1481
1521
|
redirectUrls: "$[1].redirectUrls",
|
|
1482
1522
|
savePaymentMethod: "$[1].savePaymentMethod",
|
|
1483
1523
|
delayCapture: "$[1].delayCapture"
|
|
@@ -2066,12 +2106,10 @@ var removeGiftCard4 = /* @__PURE__ */ createRESTModule(removeGiftCard3);
|
|
|
2066
2106
|
var markCartAsCompleted4 = /* @__PURE__ */ createRESTModule(markCartAsCompleted3);
|
|
2067
2107
|
var handleAsyncCheckoutCompletion4 = /* @__PURE__ */ createRESTModule(handleAsyncCheckoutCompletion3);
|
|
2068
2108
|
export {
|
|
2069
|
-
CalculationComponent,
|
|
2070
2109
|
ChannelType,
|
|
2071
2110
|
DescriptionLineType,
|
|
2072
2111
|
DiscountScope,
|
|
2073
2112
|
DiscountSourceType,
|
|
2074
|
-
ErrorCode,
|
|
2075
2113
|
FileType,
|
|
2076
2114
|
ItemStatus,
|
|
2077
2115
|
ItemTypeItemType,
|