@wix/auto_sdk_ecom_cart-v-2 1.0.26 → 1.0.27

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +62 -8
  2. package/build/cjs/index.js +109 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +100 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +64 -9
  8. package/build/cjs/meta.js +69 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +62 -8
  11. package/build/es/index.mjs +108 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -1
  14. package/build/es/index.typings.mjs +99 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +64 -9
  17. package/build/es/meta.mjs +68 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +16 -4
  20. package/build/internal/cjs/index.js +109 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +76 -9
  23. package/build/internal/cjs/index.typings.js +100 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +64 -9
  26. package/build/internal/cjs/meta.js +69 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +16 -4
  29. package/build/internal/es/index.mjs +108 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +76 -9
  32. package/build/internal/es/index.typings.mjs +99 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +64 -9
  35. package/build/internal/es/meta.mjs +68 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -1168,7 +1168,10 @@ type VatTypeWithLiterals = VatType | 'UNSPECIFIED' | 'CPF' | 'CNPJ';
1168
1168
  interface DeliveryInfo {
1169
1169
  /** The delivery address. */
1170
1170
  address?: Address;
1171
- /** The selected delivery method by the customer. */
1171
+ /**
1172
+ * The selected delivery method by the customer.
1173
+ * @readonly
1174
+ */
1172
1175
  method?: DeliveryMethod;
1173
1176
  /**
1174
1177
  * The unit of weight measurement when shipping items (e.g., KG, LB).
@@ -1239,7 +1242,7 @@ interface DeliveryMethod {
1239
1242
  /**
1240
1243
  * Unique code that acts as an ID for a shipping rate.
1241
1244
  * For example, `"usps_std_overnight"`.
1242
- * @maxLength 250
1245
+ * @maxLength 100
1243
1246
  */
1244
1247
  code?: string;
1245
1248
  /**
@@ -1250,13 +1253,9 @@ interface DeliveryMethod {
1250
1253
  /**
1251
1254
  * Delivery rate title.
1252
1255
  * For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`.
1253
- * @readonly
1254
1256
  */
1255
1257
  title?: TranslatableString;
1256
- /**
1257
- * Whether the delivery method is a pickup option.
1258
- * @readonly
1259
- */
1258
+ /** Whether the delivery method is a pickup option. */
1260
1259
  pickup?: boolean;
1261
1260
  }
1262
1261
  declare enum WeightUnit {
@@ -1275,6 +1274,11 @@ interface TaxInfo {
1275
1274
  * @readonly
1276
1275
  */
1277
1276
  pricesIncludeTax?: boolean;
1277
+ /**
1278
+ * Tax exempt group ID to use for tax exemptions.
1279
+ * @format GUID
1280
+ */
1281
+ taxExemptGroupId?: string | null;
1278
1282
  }
1279
1283
  interface PaymentInfo {
1280
1284
  /**
@@ -1468,6 +1472,11 @@ interface CartSummary {
1468
1472
  * @format GUID
1469
1473
  */
1470
1474
  cartId?: string;
1475
+ /**
1476
+ * A unique identifier for this specific cart calculation.
1477
+ * @format GUID
1478
+ */
1479
+ calculationId?: string;
1471
1480
  /**
1472
1481
  * Summarized details for each line item in the cart.
1473
1482
  * @maxSize 300
@@ -2000,6 +2009,8 @@ interface CreateCurrentCartRequest {
2000
2009
  * @maxLength 50
2001
2010
  */
2002
2011
  couponCodes?: string[];
2012
+ /** Delivery method to set. */
2013
+ deliveryMethod?: DeliveryMethodInput;
2003
2014
  /**
2004
2015
  * Gift cards to add.
2005
2016
  * Currently only one is support.
@@ -2171,6 +2182,18 @@ interface CustomItemPaymentConfig {
2171
2182
  */
2172
2183
  paymentOption?: PaymentOptionTypeWithLiterals;
2173
2184
  }
2185
+ interface DeliveryMethodInput {
2186
+ /**
2187
+ * Delivery method code.
2188
+ * @maxLength 100
2189
+ */
2190
+ code?: string;
2191
+ /**
2192
+ * Carrier app id.
2193
+ * @format GUID
2194
+ */
2195
+ appId?: string | null;
2196
+ }
2174
2197
  interface CreateCurrentCartResponse {
2175
2198
  /** The created Cart. */
2176
2199
  cart?: Cart;
@@ -2350,6 +2373,14 @@ interface RemoveCouponFromCurrentCartResponse {
2350
2373
  /** Updated Cart. */
2351
2374
  cart?: Cart;
2352
2375
  }
2376
+ interface SetDeliveryMethodForCurrentCartRequest {
2377
+ /** Delivery method. */
2378
+ deliveryMethod?: DeliveryMethodInput;
2379
+ }
2380
+ interface SetDeliveryMethodForCurrentCartResponse {
2381
+ /** Updated Cart. */
2382
+ cart?: Cart;
2383
+ }
2353
2384
  interface AddGiftCardToCurrentCartRequest {
2354
2385
  /**
2355
2386
  * Gift card code.
@@ -2374,6 +2405,12 @@ interface RemoveGiftCardFromCurrentCartResponse {
2374
2405
  /** Updated Cart. */
2375
2406
  cart?: Cart;
2376
2407
  }
2408
+ interface UnmarkAsCurrentCartRequest {
2409
+ }
2410
+ interface UnmarkAsCurrentCartResponse {
2411
+ /** Cart that was unmarked as current cart, if such existed. */
2412
+ cart?: Cart;
2413
+ }
2377
2414
  interface DomainEvent extends DomainEventBodyOneOf {
2378
2415
  createdEvent?: EntityCreatedEvent;
2379
2416
  updatedEvent?: EntityUpdatedEvent;
@@ -2533,6 +2570,8 @@ interface CreateCartRequest {
2533
2570
  * @maxLength 50
2534
2571
  */
2535
2572
  couponCodes?: string[];
2573
+ /** Delivery method to set. */
2574
+ deliveryMethod?: DeliveryMethodInput;
2536
2575
  /**
2537
2576
  * Gift cards to add.
2538
2577
  * Currently only one is support.
@@ -2793,6 +2832,19 @@ interface RemoveCouponResponse {
2793
2832
  /** Updated Cart. */
2794
2833
  cart?: Cart;
2795
2834
  }
2835
+ interface SetDeliveryMethodRequest {
2836
+ /**
2837
+ * Cart ID.
2838
+ * @format GUID
2839
+ */
2840
+ cartId: string;
2841
+ /** Delivery method. */
2842
+ deliveryMethod: DeliveryMethodInput;
2843
+ }
2844
+ interface SetDeliveryMethodResponse {
2845
+ /** Updated Cart. */
2846
+ cart?: Cart;
2847
+ }
2796
2848
  interface AddGiftCardRequest {
2797
2849
  /**
2798
2850
  * Cart ID.
@@ -2887,6 +2939,8 @@ interface CreateCartOptions {
2887
2939
  * @maxLength 50
2888
2940
  */
2889
2941
  couponCodes?: string[];
2942
+ /** Delivery method to set. */
2943
+ deliveryMethod?: DeliveryMethodInput;
2890
2944
  /**
2891
2945
  * Gift cards to add.
2892
2946
  * Currently only one is support.
@@ -3069,4 +3123,4 @@ interface MarkCartAsCompletedOptions {
3069
3123
  orderId?: string | null;
3070
3124
  }
3071
3125
 
3072
- 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 ConvertedMoney, 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, 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 };
3126
+ 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 ConvertedMoney, 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 DeliveryMethodInput, 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, 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, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, 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 UnmarkAsCurrentCartRequest, type UnmarkAsCurrentCartResponse, 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 };
@@ -745,6 +745,55 @@ function removeCoupon(payload) {
745
745
  }
746
746
  return __removeCoupon;
747
747
  }
748
+ function setDeliveryMethod(payload) {
749
+ function __setDeliveryMethod({ host }) {
750
+ const metadata = {
751
+ entityFqdn: "wix.ecom.v2.cart",
752
+ method: "POST",
753
+ methodFqn: "wix.ecom.cart.v2.CartService.SetDeliveryMethod",
754
+ packageName: PACKAGE_NAME,
755
+ migrationOptions: {
756
+ optInTransformResponse: true
757
+ },
758
+ url: resolveWixEcomCartV2CartServiceUrl({
759
+ protoPath: "/v2/carts/{cartId}/set-delivery-method",
760
+ data: payload,
761
+ host
762
+ }),
763
+ data: payload,
764
+ transformResponse: (payload2) => transformPaths(payload2, [
765
+ {
766
+ transformFn: transformRESTTimestampToSDKTimestamp,
767
+ paths: [
768
+ { path: "cart.createdDate" },
769
+ { path: "cart.updatedDate" },
770
+ {
771
+ path: "cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate"
772
+ },
773
+ {
774
+ path: "cart.lineItems.attributes.serviceProperties.scheduledDate"
775
+ }
776
+ ]
777
+ },
778
+ {
779
+ transformFn: transformRESTFloatToSDKFloat,
780
+ paths: [
781
+ {
782
+ path: "cart.lineItems.source.catalogOverrideFields.physicalProperties.weight"
783
+ },
784
+ { path: "cart.lineItems.attributes.physicalProperties.weight" },
785
+ { path: "cart.deliveryInfo.address.geocode.latitude" },
786
+ { path: "cart.deliveryInfo.address.geocode.longitude" },
787
+ { path: "cart.paymentInfo.billingAddress.geocode.latitude" },
788
+ { path: "cart.paymentInfo.billingAddress.geocode.longitude" }
789
+ ]
790
+ }
791
+ ])
792
+ };
793
+ return metadata;
794
+ }
795
+ return __setDeliveryMethod;
796
+ }
748
797
  function addGiftCard(payload) {
749
798
  function __addGiftCard({ host }) {
750
799
  const metadata = {
@@ -1093,6 +1142,7 @@ async function createCart2(options) {
1093
1142
  catalogItems: options?.catalogItems,
1094
1143
  customItems: options?.customItems,
1095
1144
  couponCodes: options?.couponCodes,
1145
+ deliveryMethod: options?.deliveryMethod,
1096
1146
  giftCardCodes: options?.giftCardCodes
1097
1147
  }),
1098
1148
  [
@@ -1158,6 +1208,7 @@ async function createCart2(options) {
1158
1208
  catalogItems: "$[0].catalogItems",
1159
1209
  customItems: "$[0].customItems",
1160
1210
  couponCodes: "$[0].couponCodes",
1211
+ deliveryMethod: "$[0].deliveryMethod",
1161
1212
  giftCardCodes: "$[0].giftCardCodes"
1162
1213
  },
1163
1214
  singleArgumentUnchanged: false
@@ -1722,6 +1773,53 @@ async function removeCoupon2(cartId, couponId) {
1722
1773
  throw transformedError;
1723
1774
  }
1724
1775
  }
1776
+ async function setDeliveryMethod2(cartId, deliveryMethod) {
1777
+ const { httpClient, sideEffects } = arguments[2];
1778
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1779
+ cartId,
1780
+ deliveryMethod
1781
+ });
1782
+ const reqOpts = setDeliveryMethod(payload);
1783
+ sideEffects?.onSiteCall?.();
1784
+ try {
1785
+ const result = await httpClient.request(reqOpts);
1786
+ sideEffects?.onSuccess?.(result);
1787
+ return renameKeysFromRESTResponseToSDKResponse(
1788
+ transformPaths2(result.data, [
1789
+ {
1790
+ transformFn: transformRESTImageToSDKImage,
1791
+ paths: [
1792
+ { path: "cart.lineItems.source.catalogOverrideFields.image" },
1793
+ { path: "cart.lineItems.attributes.image" }
1794
+ ]
1795
+ },
1796
+ {
1797
+ transformFn: transformRESTPageURLV2ToSDKPageURLV2,
1798
+ paths: [{ path: "cart.lineItems.attributes.url" }]
1799
+ },
1800
+ {
1801
+ transformFn: transformRESTAddressToSDKAddress,
1802
+ paths: [
1803
+ { path: "cart.deliveryInfo.address" },
1804
+ { path: "cart.paymentInfo.billingAddress" }
1805
+ ]
1806
+ }
1807
+ ])
1808
+ );
1809
+ } catch (err) {
1810
+ const transformedError = sdkTransformError(
1811
+ err,
1812
+ {
1813
+ spreadPathsToArguments: {},
1814
+ explicitPathsToArguments: { cartId: "$[0]", deliveryMethod: "$[1]" },
1815
+ singleArgumentUnchanged: false
1816
+ },
1817
+ ["cartId", "deliveryMethod"]
1818
+ );
1819
+ sideEffects?.onError?.(err);
1820
+ throw transformedError;
1821
+ }
1822
+ }
1725
1823
  async function addGiftCard2(cartId, giftCardCode) {
1726
1824
  const { httpClient, sideEffects } = arguments[2];
1727
1825
  const payload = renameKeysFromSDKRequestToRESTRequest({
@@ -1988,6 +2086,14 @@ function removeCoupon3(httpClient) {
1988
2086
  { httpClient }
1989
2087
  );
1990
2088
  }
2089
+ function setDeliveryMethod3(httpClient) {
2090
+ return (cartId, deliveryMethod) => setDeliveryMethod2(
2091
+ cartId,
2092
+ deliveryMethod,
2093
+ // @ts-ignore
2094
+ { httpClient }
2095
+ );
2096
+ }
1991
2097
  function addGiftCard3(httpClient) {
1992
2098
  return (cartId, giftCardCode) => addGiftCard2(
1993
2099
  cartId,
@@ -2035,6 +2141,7 @@ var removeLineItems4 = /* @__PURE__ */ createRESTModule(removeLineItems3);
2035
2141
  var updateLineItems4 = /* @__PURE__ */ createRESTModule(updateLineItems3);
2036
2142
  var addCoupon4 = /* @__PURE__ */ createRESTModule(addCoupon3);
2037
2143
  var removeCoupon4 = /* @__PURE__ */ createRESTModule(removeCoupon3);
2144
+ var setDeliveryMethod4 = /* @__PURE__ */ createRESTModule(setDeliveryMethod3);
2038
2145
  var addGiftCard4 = /* @__PURE__ */ createRESTModule(addGiftCard3);
2039
2146
  var removeGiftCard4 = /* @__PURE__ */ createRESTModule(removeGiftCard3);
2040
2147
  var markCartAsCompleted4 = /* @__PURE__ */ createRESTModule(markCartAsCompleted3);
@@ -2074,6 +2181,7 @@ export {
2074
2181
  removeCoupon4 as removeCoupon,
2075
2182
  removeGiftCard4 as removeGiftCard,
2076
2183
  removeLineItems4 as removeLineItems,
2184
+ setDeliveryMethod4 as setDeliveryMethod,
2077
2185
  updateCart4 as updateCart,
2078
2186
  updateLineItems4 as updateLineItems
2079
2187
  };