@wix/auto_sdk_ecom_current-cart-v-2 1.0.38 → 1.0.40
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 +36 -38
- package/build/cjs/index.js +26 -30
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +22 -26
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +34 -32
- package/build/cjs/meta.js +10 -10
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +36 -38
- package/build/es/index.mjs +25 -29
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +21 -25
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +34 -32
- package/build/es/meta.mjs +9 -9
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +5 -5
- package/build/internal/cjs/index.js +26 -30
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +44 -44
- package/build/internal/cjs/index.typings.js +22 -26
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +34 -32
- package/build/internal/cjs/meta.js +10 -10
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +5 -5
- package/build/internal/es/index.mjs +25 -29
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +44 -44
- package/build/internal/es/index.typings.mjs +21 -25
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +34 -32
- package/build/internal/es/meta.mjs +9 -9
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -523,18 +523,18 @@ interface Policy {
|
|
|
523
523
|
}
|
|
524
524
|
interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
525
525
|
/** Preset item type. */
|
|
526
|
-
preset?:
|
|
526
|
+
preset?: ItemTypePresetWithLiterals;
|
|
527
527
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
528
528
|
custom?: string;
|
|
529
529
|
}
|
|
530
530
|
/** @oneof */
|
|
531
531
|
interface ItemTypeItemTypeDataOneOf {
|
|
532
532
|
/** Preset item type. */
|
|
533
|
-
preset?:
|
|
533
|
+
preset?: ItemTypePresetWithLiterals;
|
|
534
534
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
535
535
|
custom?: string;
|
|
536
536
|
}
|
|
537
|
-
declare enum
|
|
537
|
+
declare enum ItemTypePreset {
|
|
538
538
|
UNRECOGNISED = "UNRECOGNISED",
|
|
539
539
|
PHYSICAL = "PHYSICAL",
|
|
540
540
|
DIGITAL = "DIGITAL",
|
|
@@ -542,7 +542,7 @@ declare enum ItemTypeItemType {
|
|
|
542
542
|
SERVICE = "SERVICE"
|
|
543
543
|
}
|
|
544
544
|
/** @enumType */
|
|
545
|
-
type
|
|
545
|
+
type ItemTypePresetWithLiterals = ItemTypePreset | 'UNRECOGNISED' | 'PHYSICAL' | 'DIGITAL' | 'GIFT_CARD' | 'SERVICE';
|
|
546
546
|
interface SubscriptionOptionInfo {
|
|
547
547
|
/** Subscription option settings. */
|
|
548
548
|
subscriptionSettings?: SubscriptionSettings;
|
|
@@ -887,10 +887,7 @@ interface V2Coupon {
|
|
|
887
887
|
code?: string;
|
|
888
888
|
}
|
|
889
889
|
interface CartSource {
|
|
890
|
-
/**
|
|
891
|
-
* Sales channel that created the Cart.
|
|
892
|
-
* @immutable
|
|
893
|
-
*/
|
|
890
|
+
/** Sales channel that created the Cart. */
|
|
894
891
|
channelType?: ChannelTypeWithLiterals;
|
|
895
892
|
/**
|
|
896
893
|
* References to an external app and resource associated with this Cart.
|
|
@@ -1330,6 +1327,8 @@ interface V2GiftCard {
|
|
|
1330
1327
|
* @maxLength 50
|
|
1331
1328
|
*/
|
|
1332
1329
|
externalId?: string | null;
|
|
1330
|
+
/** The amount requested to redeem from this gift card. */
|
|
1331
|
+
requestedRedeemAmount?: ConvertedMoney;
|
|
1333
1332
|
}
|
|
1334
1333
|
/** Full contact details for an address */
|
|
1335
1334
|
interface FullAddressContactDetails {
|
|
@@ -1989,20 +1988,16 @@ interface CreateCurrentCartRequest {
|
|
|
1989
1988
|
* Coupons to apply.
|
|
1990
1989
|
* Currently only one is supported.
|
|
1991
1990
|
* @maxSize 1
|
|
1992
|
-
* @minLength 1
|
|
1993
|
-
* @maxLength 50
|
|
1994
1991
|
*/
|
|
1995
|
-
|
|
1992
|
+
coupons?: CouponInput[];
|
|
1996
1993
|
/** Delivery method to set. */
|
|
1997
1994
|
deliveryMethod?: DeliveryMethodInput;
|
|
1998
1995
|
/**
|
|
1999
1996
|
* Gift cards to add.
|
|
2000
1997
|
* Currently only one is support.
|
|
2001
1998
|
* @maxSize 1
|
|
2002
|
-
* @minLength 8
|
|
2003
|
-
* @maxLength 20
|
|
2004
1999
|
*/
|
|
2005
|
-
|
|
2000
|
+
giftCards?: GiftCardInput[];
|
|
2006
2001
|
}
|
|
2007
2002
|
interface CatalogItemInput {
|
|
2008
2003
|
/** A reference to the catalog item. */
|
|
@@ -2166,6 +2161,14 @@ interface CustomItemPaymentConfig {
|
|
|
2166
2161
|
*/
|
|
2167
2162
|
paymentOption?: PaymentOptionTypeWithLiterals;
|
|
2168
2163
|
}
|
|
2164
|
+
interface CouponInput {
|
|
2165
|
+
/**
|
|
2166
|
+
* Coupon code.
|
|
2167
|
+
* @minLength 1
|
|
2168
|
+
* @maxLength 50
|
|
2169
|
+
*/
|
|
2170
|
+
code?: string;
|
|
2171
|
+
}
|
|
2169
2172
|
interface DeliveryMethodInput {
|
|
2170
2173
|
/**
|
|
2171
2174
|
* Delivery method code.
|
|
@@ -2178,6 +2181,16 @@ interface DeliveryMethodInput {
|
|
|
2178
2181
|
*/
|
|
2179
2182
|
appId?: string | null;
|
|
2180
2183
|
}
|
|
2184
|
+
interface GiftCardInput {
|
|
2185
|
+
/**
|
|
2186
|
+
* Gift card code.
|
|
2187
|
+
* @minLength 8
|
|
2188
|
+
* @maxLength 20
|
|
2189
|
+
*/
|
|
2190
|
+
code?: string;
|
|
2191
|
+
/** The amount requested to redeem from this gift card. */
|
|
2192
|
+
redeemAmount?: ConvertedMoney;
|
|
2193
|
+
}
|
|
2181
2194
|
interface CreateCurrentCartResponse {
|
|
2182
2195
|
/** The created Cart. */
|
|
2183
2196
|
cart?: Cart;
|
|
@@ -2337,10 +2350,8 @@ interface AddCouponToCurrentCartRequest {
|
|
|
2337
2350
|
* Coupon to apply.
|
|
2338
2351
|
*
|
|
2339
2352
|
* Currently only one is supported.
|
|
2340
|
-
* @minLength 1
|
|
2341
|
-
* @maxLength 50
|
|
2342
2353
|
*/
|
|
2343
|
-
|
|
2354
|
+
coupon: CouponInput;
|
|
2344
2355
|
}
|
|
2345
2356
|
interface AddCouponToCurrentCartResponse {
|
|
2346
2357
|
/** Updated Cart. */
|
|
@@ -2370,9 +2381,8 @@ interface AddGiftCardToCurrentCartRequest {
|
|
|
2370
2381
|
* Gift card code.
|
|
2371
2382
|
*
|
|
2372
2383
|
* Currently only one is supported.
|
|
2373
|
-
* @maxLength 50
|
|
2374
2384
|
*/
|
|
2375
|
-
|
|
2385
|
+
giftCard: GiftCardInput;
|
|
2376
2386
|
}
|
|
2377
2387
|
interface AddGiftCardToCurrentCartResponse {
|
|
2378
2388
|
/** Updated Cart. */
|
|
@@ -2550,20 +2560,16 @@ interface CreateCartRequest {
|
|
|
2550
2560
|
* Coupons to apply.
|
|
2551
2561
|
* Currently only one is supported.
|
|
2552
2562
|
* @maxSize 1
|
|
2553
|
-
* @minLength 1
|
|
2554
|
-
* @maxLength 50
|
|
2555
2563
|
*/
|
|
2556
|
-
|
|
2564
|
+
coupons?: CouponInput[];
|
|
2557
2565
|
/** Delivery method to set. */
|
|
2558
2566
|
deliveryMethod?: DeliveryMethodInput;
|
|
2559
2567
|
/**
|
|
2560
2568
|
* Gift cards to add.
|
|
2561
2569
|
* Currently only one is support.
|
|
2562
2570
|
* @maxSize 1
|
|
2563
|
-
* @minLength 8
|
|
2564
|
-
* @maxLength 20
|
|
2565
2571
|
*/
|
|
2566
|
-
|
|
2572
|
+
giftCards?: GiftCardInput[];
|
|
2567
2573
|
}
|
|
2568
2574
|
interface CreateCartResponse {
|
|
2569
2575
|
/** The created Cart. */
|
|
@@ -3780,10 +3786,8 @@ interface AddCouponRequest {
|
|
|
3780
3786
|
* Coupon to apply.
|
|
3781
3787
|
*
|
|
3782
3788
|
* Currently only one is supported.
|
|
3783
|
-
* @minLength 1
|
|
3784
|
-
* @maxLength 50
|
|
3785
3789
|
*/
|
|
3786
|
-
|
|
3790
|
+
coupon?: CouponInput;
|
|
3787
3791
|
}
|
|
3788
3792
|
interface AddCouponResponse {
|
|
3789
3793
|
/** Updated Cart. */
|
|
@@ -3828,10 +3832,8 @@ interface AddGiftCardRequest {
|
|
|
3828
3832
|
* Gift card code.
|
|
3829
3833
|
*
|
|
3830
3834
|
* Currently only one is supported.
|
|
3831
|
-
* @minLength 8
|
|
3832
|
-
* @maxLength 20
|
|
3833
3835
|
*/
|
|
3834
|
-
|
|
3836
|
+
giftCard?: GiftCardInput;
|
|
3835
3837
|
}
|
|
3836
3838
|
interface AddGiftCardResponse {
|
|
3837
3839
|
/** Updated Cart. */
|
|
@@ -3908,20 +3910,16 @@ interface CreateCurrentCartOptions {
|
|
|
3908
3910
|
* Coupons to apply.
|
|
3909
3911
|
* Currently only one is supported.
|
|
3910
3912
|
* @maxSize 1
|
|
3911
|
-
* @minLength 1
|
|
3912
|
-
* @maxLength 50
|
|
3913
3913
|
*/
|
|
3914
|
-
|
|
3914
|
+
coupons?: CouponInput[];
|
|
3915
3915
|
/** Delivery method to set. */
|
|
3916
3916
|
deliveryMethod?: DeliveryMethodInput;
|
|
3917
3917
|
/**
|
|
3918
3918
|
* Gift cards to add.
|
|
3919
3919
|
* Currently only one is support.
|
|
3920
3920
|
* @maxSize 1
|
|
3921
|
-
* @minLength 8
|
|
3922
|
-
* @maxLength 20
|
|
3923
3921
|
*/
|
|
3924
|
-
|
|
3922
|
+
giftCards?: GiftCardInput[];
|
|
3925
3923
|
}
|
|
3926
3924
|
interface CalculateCurrentCartOptions {
|
|
3927
3925
|
/**
|
|
@@ -3962,4 +3960,4 @@ interface UpdateLineItemsInCurrentCartOptions {
|
|
|
3962
3960
|
lineItems?: LineItemUpdate[];
|
|
3963
3961
|
}
|
|
3964
3962
|
|
|
3965
|
-
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type AdditionalFeeTax, type Address, type AddressLocation, type AggregatedTaxBreakdown, type ApplicableLineItems, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type AutoTaxFallbackCalculationDetails, type BusinessInfo, type CalculateCartForV1Request, type CalculateCartForV1Response, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartOptions, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculateTotalsResponse, type CalculatedItemModifier, type CalculatedLineItem, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type Carrier, type CarrierError, type CarrierErrors, type CarrierServiceOption, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, ChargeType, type ChargeTypeWithLiterals, CheckoutStage, type CheckoutStageWithLiterals, type Color, type ConvertedMoney, type Coupon, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartOptions, 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 DeliveryAllocation, type DeliveryInfo, type DeliveryLogistics, type DeliveryMethod, type DeliveryMethodInput, type DeliverySummary, type DeliveryTimeSlot, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, type DiscountRule, type DiscountRuleName, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type DummyErrorDataMethodLevel, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, FallbackReason, type FallbackReasonWithLiterals, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type InvalidMembership, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemTaxFullDetails, type ItemType,
|
|
3963
|
+
export { type ActionEvent, type AddCouponRequest, type AddCouponResponse, type AddCouponToCurrentCartRequest, type AddCouponToCurrentCartResponse, type AddGiftCardRequest, type AddGiftCardResponse, type AddGiftCardToCurrentCartRequest, type AddGiftCardToCurrentCartResponse, type AddLineItemsRequest, type AddLineItemsResponse, type AddLineItemsToCurrentCartOptions, type AddLineItemsToCurrentCartRequest, type AddLineItemsToCurrentCartResponse, type AdditionalFee, AdditionalFeeSource, type AdditionalFeeSourceWithLiterals, type AdditionalFeeTax, type Address, type AddressLocation, type AggregatedTaxBreakdown, type ApplicableLineItems, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type AutoTaxFallbackCalculationDetails, type BusinessInfo, type CalculateCartForV1Request, type CalculateCartForV1Response, type CalculateCartRequest, type CalculateCartResponse, type CalculateCurrentCartOptions, type CalculateCurrentCartRequest, type CalculateCurrentCartResponse, type CalculateTotalsResponse, type CalculatedItemModifier, type CalculatedLineItem, type CalculationConfig, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type Carrier, type CarrierError, type CarrierErrors, type CarrierServiceOption, type Cart, type CartSettings, type CartSource, type CartSummary, type CatalogItemInput, type CatalogOverrideFields, type CatalogReference, ChannelType, type ChannelTypeWithLiterals, type Charge, ChargeType, type ChargeTypeWithLiterals, CheckoutStage, type CheckoutStageWithLiterals, type Color, type ConvertedMoney, type Coupon, type CouponInput, type CreateCartRequest, type CreateCartResponse, type CreateCurrentCartOptions, 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 DeliveryAllocation, type DeliveryInfo, type DeliveryLogistics, type DeliveryMethod, type DeliveryMethodInput, type DeliverySummary, type DeliveryTimeSlot, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type Details, type DetailsKindOneOf, type Discount, type DiscountBenefit, type DiscountBenefitValueOneOf, type DiscountRule, type DiscountRuleName, DiscountScope, type DiscountScopeWithLiterals, type DiscountSource, DiscountSourceType, type DiscountSourceTypeWithLiterals, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type DummyErrorDataMethodLevel, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalReference, FallbackReason, type FallbackReasonWithLiterals, type FieldViolation, FileType, type FileTypeWithLiterals, type FreeTrialPeriod, type FullAddressContactDetails, type GetCartRequest, type GetCartResponse, type GetCheckoutURLRequest, type GetCheckoutURLResponse, type GetCurrentCartRequest, type GetCurrentCartResponse, type GiftCard, type GiftCardInput, type GiftCardSummary, type Group, type HandleAsyncCheckoutCompletionRequest, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type InvalidMembership, type ItemAttributes, type ItemDeliveryConfig, type ItemDiscount, type ItemModifier, type ItemPaymentConfig, type ItemPriceBreakdown, type ItemPricingInfo, type ItemQuantityInfo, type ItemSource, ItemStatus, type ItemStatusWithLiterals, type ItemTaxConfig, type ItemTaxFullDetails, type ItemType, type ItemTypeItemTypeDataOneOf, ItemTypePreset, type ItemTypePresetWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LegacyFields, type LineItem, type LineItemDiscount, type LineItemIdentifier, type LineItemIdentifierIdOneOf, type LineItemPricesData, type LineItemSummary, type LineItemTax, type LineItemUpdate, ManualCalculationReason, type ManualCalculationReasonWithLiterals, type MarkCartAsCompletedRequest, type MarkCartAsCompletedResponse, type Membership, type MembershipName, type MembershipOptions, type MembershipPaymentCredits, type MerchantDiscount, type MessageEnvelope, type ModifierGroup, type MultiCurrencyPrice, NameInLineItem, type NameInLineItemWithLiterals, NameInOther, type NameInOtherWithLiterals, type Other, type OtherCharge, type PaymentInfo, type PaymentOption, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentSummary, type PhysicalProperties, type PickupDetails, PickupMethod, type PickupMethodWithLiterals, type PlaceOrderRequest, type PlaceOrderResponse, type PlainTextValue, type Policy, type PriceDescription, type PriceSummary, type QuantityUpdate, RateType, type RateTypeWithLiterals, type RawHttpResponse, type RedirectUrls, type RefreshCartRequest, type RefreshCartResponse, type RefreshCurrentCartRequest, type RefreshCurrentCartResponse, type Region, 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 SelectedCarrierServiceOption, type SelectedCarrierServiceOptionOtherCharge, type SelectedCarrierServiceOptionPrices, type SelectedMembership, type SelectedMembershipUpdate, type ServiceProperties, type SetDeliveryMethodForCurrentCartRequest, type SetDeliveryMethodForCurrentCartResponse, type SetDeliveryMethodRequest, type SetDeliveryMethodResponse, Severity, type SeverityWithLiterals, type ShippingInformation, type ShippingOption, type ShippingPrice, type ShippingRegion, type Stage, type StageStagesOneOf, type StreetAddress, type SubscriptionCharges, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type SuggestedFixWithLiterals, type SystemError, type Target, type TargetTargetTypeOneOf, type Tax, type TaxBreakdown, type TaxCalculationDetails, type TaxCalculationDetailsCalculationDetailsOneOf, type TaxDetails, type TaxInfo, type TaxRateBreakdown, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type Title, type TranslatableString, type UnmarkAsCurrentCartRequest, type UnmarkAsCurrentCartResponse, type UpdateCartRequest, type UpdateCartResponse, type UpdateCurrentCartRequest, type UpdateCurrentCartResponse, type UpdateLineItemsInCurrentCartOptions, type UpdateLineItemsInCurrentCartRequest, type UpdateLineItemsInCurrentCartResponse, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type V1AdditionalFee, type V2AdditionalFee, type V2CalculationErrors, type V2CalculationErrorsShippingCalculationErrorOneOf, type V2CarrierError, type V2CarrierErrors, type V2Coupon, type V2GiftCard, type V2LineItem, type V2Membership, type V2PriceSummary, type V2SelectedMembership, type V2TaxSummary, type ValidationError, ValidationsConfig, type ValidationsConfigWithLiterals, type VatId, VatType, type VatTypeWithLiterals, type Violation, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals };
|
package/build/cjs/index.js
CHANGED
|
@@ -31,7 +31,7 @@ __export(index_exports, {
|
|
|
31
31
|
FallbackReason: () => FallbackReason,
|
|
32
32
|
FileType: () => FileType,
|
|
33
33
|
ItemStatus: () => ItemStatus,
|
|
34
|
-
|
|
34
|
+
ItemTypePreset: () => ItemTypePreset,
|
|
35
35
|
JurisdictionType: () => JurisdictionType,
|
|
36
36
|
ManualCalculationReason: () => ManualCalculationReason,
|
|
37
37
|
NameInLineItem: () => NameInLineItem,
|
|
@@ -1005,14 +1005,14 @@ var PaymentOptionType = /* @__PURE__ */ ((PaymentOptionType2) => {
|
|
|
1005
1005
|
PaymentOptionType2["MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER"] = "MEMBERSHIP_ONLINE_WITH_OFFLINE_REMAINDER";
|
|
1006
1006
|
return PaymentOptionType2;
|
|
1007
1007
|
})(PaymentOptionType || {});
|
|
1008
|
-
var
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
return
|
|
1015
|
-
})(
|
|
1008
|
+
var ItemTypePreset = /* @__PURE__ */ ((ItemTypePreset2) => {
|
|
1009
|
+
ItemTypePreset2["UNRECOGNISED"] = "UNRECOGNISED";
|
|
1010
|
+
ItemTypePreset2["PHYSICAL"] = "PHYSICAL";
|
|
1011
|
+
ItemTypePreset2["DIGITAL"] = "DIGITAL";
|
|
1012
|
+
ItemTypePreset2["GIFT_CARD"] = "GIFT_CARD";
|
|
1013
|
+
ItemTypePreset2["SERVICE"] = "SERVICE";
|
|
1014
|
+
return ItemTypePreset2;
|
|
1015
|
+
})(ItemTypePreset || {});
|
|
1016
1016
|
var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
|
|
1017
1017
|
SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
|
|
1018
1018
|
SubscriptionFrequency2["DAY"] = "DAY";
|
|
@@ -1212,9 +1212,9 @@ async function createCurrentCart2(options) {
|
|
|
1212
1212
|
cart: options?.cart,
|
|
1213
1213
|
catalogItems: options?.catalogItems,
|
|
1214
1214
|
customItems: options?.customItems,
|
|
1215
|
-
|
|
1215
|
+
coupons: options?.coupons,
|
|
1216
1216
|
deliveryMethod: options?.deliveryMethod,
|
|
1217
|
-
|
|
1217
|
+
giftCards: options?.giftCards
|
|
1218
1218
|
}),
|
|
1219
1219
|
[
|
|
1220
1220
|
{
|
|
@@ -1278,9 +1278,9 @@ async function createCurrentCart2(options) {
|
|
|
1278
1278
|
cart: "$[0].cart",
|
|
1279
1279
|
catalogItems: "$[0].catalogItems",
|
|
1280
1280
|
customItems: "$[0].customItems",
|
|
1281
|
-
|
|
1281
|
+
coupons: "$[0].coupons",
|
|
1282
1282
|
deliveryMethod: "$[0].deliveryMethod",
|
|
1283
|
-
|
|
1283
|
+
giftCards: "$[0].giftCards"
|
|
1284
1284
|
},
|
|
1285
1285
|
singleArgumentUnchanged: false
|
|
1286
1286
|
},
|
|
@@ -1675,11 +1675,9 @@ async function updateLineItemsInCurrentCart2(options) {
|
|
|
1675
1675
|
throw transformedError;
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
|
-
async function addCouponToCurrentCart2(
|
|
1678
|
+
async function addCouponToCurrentCart2(coupon) {
|
|
1679
1679
|
const { httpClient, sideEffects } = arguments[1];
|
|
1680
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1681
|
-
couponCode
|
|
1682
|
-
});
|
|
1680
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ coupon });
|
|
1683
1681
|
const reqOpts = addCouponToCurrentCart(payload);
|
|
1684
1682
|
sideEffects?.onSiteCall?.();
|
|
1685
1683
|
try {
|
|
@@ -1712,10 +1710,10 @@ async function addCouponToCurrentCart2(couponCode) {
|
|
|
1712
1710
|
err,
|
|
1713
1711
|
{
|
|
1714
1712
|
spreadPathsToArguments: {},
|
|
1715
|
-
explicitPathsToArguments: {
|
|
1713
|
+
explicitPathsToArguments: { coupon: "$[0]" },
|
|
1716
1714
|
singleArgumentUnchanged: false
|
|
1717
1715
|
},
|
|
1718
|
-
["
|
|
1716
|
+
["coupon"]
|
|
1719
1717
|
);
|
|
1720
1718
|
sideEffects?.onError?.(err);
|
|
1721
1719
|
throw transformedError;
|
|
@@ -1811,11 +1809,9 @@ async function setDeliveryMethodForCurrentCart2(deliveryMethod) {
|
|
|
1811
1809
|
throw transformedError;
|
|
1812
1810
|
}
|
|
1813
1811
|
}
|
|
1814
|
-
async function addGiftCardToCurrentCart2(
|
|
1812
|
+
async function addGiftCardToCurrentCart2(giftCard) {
|
|
1815
1813
|
const { httpClient, sideEffects } = arguments[1];
|
|
1816
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1817
|
-
giftCardCode
|
|
1818
|
-
});
|
|
1814
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ giftCard });
|
|
1819
1815
|
const reqOpts = addGiftCardToCurrentCart(payload);
|
|
1820
1816
|
sideEffects?.onSiteCall?.();
|
|
1821
1817
|
try {
|
|
@@ -1848,10 +1844,10 @@ async function addGiftCardToCurrentCart2(giftCardCode) {
|
|
|
1848
1844
|
err,
|
|
1849
1845
|
{
|
|
1850
1846
|
spreadPathsToArguments: {},
|
|
1851
|
-
explicitPathsToArguments: {
|
|
1847
|
+
explicitPathsToArguments: { giftCard: "$[0]" },
|
|
1852
1848
|
singleArgumentUnchanged: false
|
|
1853
1849
|
},
|
|
1854
|
-
["
|
|
1850
|
+
["giftCard"]
|
|
1855
1851
|
);
|
|
1856
1852
|
sideEffects?.onError?.(err);
|
|
1857
1853
|
throw transformedError;
|
|
@@ -1966,8 +1962,8 @@ function updateLineItemsInCurrentCart3(httpClient) {
|
|
|
1966
1962
|
);
|
|
1967
1963
|
}
|
|
1968
1964
|
function addCouponToCurrentCart3(httpClient) {
|
|
1969
|
-
return (
|
|
1970
|
-
|
|
1965
|
+
return (coupon) => addCouponToCurrentCart2(
|
|
1966
|
+
coupon,
|
|
1971
1967
|
// @ts-ignore
|
|
1972
1968
|
{ httpClient }
|
|
1973
1969
|
);
|
|
@@ -1987,8 +1983,8 @@ function setDeliveryMethodForCurrentCart3(httpClient) {
|
|
|
1987
1983
|
);
|
|
1988
1984
|
}
|
|
1989
1985
|
function addGiftCardToCurrentCart3(httpClient) {
|
|
1990
|
-
return (
|
|
1991
|
-
|
|
1986
|
+
return (giftCard) => addGiftCardToCurrentCart2(
|
|
1987
|
+
giftCard,
|
|
1992
1988
|
// @ts-ignore
|
|
1993
1989
|
{ httpClient }
|
|
1994
1990
|
);
|
|
@@ -2030,7 +2026,7 @@ var removeGiftCardFromCurrentCart4 = /* @__PURE__ */ (0, import_rest_modules3.cr
|
|
|
2030
2026
|
FallbackReason,
|
|
2031
2027
|
FileType,
|
|
2032
2028
|
ItemStatus,
|
|
2033
|
-
|
|
2029
|
+
ItemTypePreset,
|
|
2034
2030
|
JurisdictionType,
|
|
2035
2031
|
ManualCalculationReason,
|
|
2036
2032
|
NameInLineItem,
|