@wix/auto_sdk_ecom_checkout 1.0.43 → 1.0.45

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.
@@ -1,7 +1,8 @@
1
- import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { C as CreateCheckoutOptions, a as Checkout, G as GetCheckoutByCartIdResponse, b as GetCheckoutURLResponse, U as UpdateCheckout, c as UpdateCheckoutOptions, R as RemoveCouponResponse, d as RemoveGiftCardResponse, e as RemoveOverrideCheckoutUrlResponse, A as AddToCheckoutOptions, f as AddToCheckoutResponse, g as RemoveLineItemsResponse, h as CreateOrderOptions, i as CreateOrderResponse, j as RawHttpResponse, L as LineItemQuantityUpdate, k as UpdateLineItemsQuantityResponse, l as CheckoutCompletedEnvelope, m as CheckoutCreatedEnvelope, n as CheckoutDeletedEnvelope, o as CheckoutUpdatedEnvelope } from './ecom-v1-checkout-checkout.universal-BWJwZODy.js';
3
- export { cU as ActionEvent, c0 as AddToCheckoutRequest, bt as AdditionalFee, y as AdditionalFeeSource, cw as Address, cx as AddressAddressLine1OptionsOneOf, aC as AddressLocation, az as AddressWithContact, bj as AggregatedTaxBreakdown, aA as ApiAddress, aP as ApplicableLineItems, b0 as ApplicationError, cG as AppliedCoupon, b7 as AppliedDiscount, b8 as AppliedDiscountDiscountSourceOneOf, bi as AutoTaxFallbackCalculationDetails, cY as BaseEventMetadata, cM as BillingInfo, aV as BuyerInfo, aW as BuyerInfoIdOneOf, aY as CalculationErrors, aZ as CalculationErrorsShippingCalculationErrorOneOf, aN as Carrier, b5 as CarrierError, b4 as CarrierErrors, aR as CarrierServiceOption, aq as CatalogOverrideFields, $ as CatalogReference, cK as ChannelInfo, Y as ChannelInfoChannelType, x as ChannelType, bE as Charge, cr as ChargeDetails, s as ChargeType, bG as CheckoutMarkedAsCompleted, aa as Color, aE as CommonVatId, q as CommonVatType, bu as ConversionInfo, b9 as Coupon, bH as CreateCheckoutRequest, bM as CreateCheckoutResponse, c_ as CreateOrderAndChargeOptions, c9 as CreateOrderAndChargeRequest, ca as CreateOrderAndChargeResponse, cb as CreateOrderAndChargeResponseIdOneOf, c2 as CreateOrderRequest, c3 as CreateOrderResponseIdOneOf, bk as CreatedBy, bl as CreatedByIdOneOf, bB as CustomContentReference, be as CustomField, bI as CustomLineItem, bA as CustomSettings, cq as CustomTextFieldSelection, cj as DeleteCheckoutRequest, ck as DeleteCheckoutResponse, aM as DeliveryAllocation, aH as DeliveryLogistics, aJ as DeliveryTimeSlot, am as Description, a5 as DescriptionLine, a7 as DescriptionLineDescriptionLineValueOneOf, a8 as DescriptionLineName, D as DescriptionLineType, a6 as DescriptionLineValueOneOf, a_ as Details, a$ as DetailsKindOneOf, cJ as Discount, X as DiscountDiscountType, bb as DiscountRule, bc as DiscountRuleName, u as DiscountType, cO as DomainEvent, cP as DomainEventBodyOneOf, c5 as DoublePaymentErrorData, c6 as DoublePaymentErrorDataIdOneOf, cN as Empty, cQ as EntityCreatedEvent, cT as EntityDeletedEvent, cS as EntityUpdatedEvent, cZ as EventMetadata, au as ExtendedFields, bC as ExternalReference, w as FallbackReason, b2 as FieldViolation, F as FileType, ab as FocalPoint, ak as FreeTrialPeriod, aD as FullAddressContactDetails, cy as FullName, bT as GetCheckoutByCartIdRequest, ch as GetCheckoutPaymentSettingsRequest, ci as GetCheckoutPaymentSettingsResponse, H as GetCheckoutPaymentSettingsResponsePaymentOption, bP as GetCheckoutRequest, bQ as GetCheckoutResponse, bW as GetCheckoutURLRequest, bR as GetCheckoutWithAllExtendedFieldsRequest, bS as GetCheckoutWithAllExtendedFieldsResponse, bU as GetWixCheckoutURLRequest, bV as GetWixCheckoutURLResponse, b6 as GiftCard, af as Group, cd as HeadersEntry, cW as IdentificationData, cX as IdentificationDataIdOneOf, K as IdentityType, bq as InvalidMembership, ac as ItemAvailabilityInfo, I as ItemAvailabilityStatus, ay as ItemModifier, a2 as ItemTaxFullDetails, ag as ItemType, p as ItemTypeItemType, ah as ItemTypeItemTypeDataOneOf, J as JurisdictionType, _ as LineItem, bd as LineItemDiscount, O as LineItemType, M as ManualCalculationReason, cc as MarkCheckoutAsCompletedAndRedirectToUrlRequest, ce as MarkCheckoutAsCompletedRequest, cf as MarkCheckoutAsCompletedResponse, ct as MediaItem, Q as MediaItemType, bn as Membership, bo as MembershipName, bm as MembershipOptions, bp as MembershipPaymentCredits, ba as MerchantDiscount, bL as MerchantDiscountInput, cV as MessageEnvelope, aw as ModifierGroup, a1 as MultiCurrencyPrice, B as NameInLineItem, N as NameInOther, cp as OptionSelection, by as Other, aU as OtherCharge, c4 as PaymentErrorResponseData, ar as PaymentOption, P as PaymentOptionType, ad as PhysicalProperties, cF as PickupAddress, aI as PickupDetails, r as PickupMethod, a9 as PlainTextValue, av as Policy, ap as PriceDescription, aX as PriceSummary, cs as ProductDetails, a0 as ProductName, v as RateType, c7 as RedeemErrorData, aO as Region, bZ as RemoveCouponRequest, b_ as RemoveGiftCardRequest, c1 as RemoveLineItemsRequest, b$ as RemoveOverrideCheckoutUrlRequest, cR as RestoreInfo, t as RuleType, ae as Scope, an as SecuredMedia, aG as SelectedCarrierServiceOption, aL as SelectedCarrierServiceOptionOtherCharge, aK as SelectedCarrierServiceOptionPrices, bs as SelectedMembership, br as SelectedMemberships, ao as ServiceProperties, z as Severity, cD as ShipmentDetails, bN as ShippingCalculationErrorData, bO as ShippingCalculationErrorDataShippingCalculationErrorOneOf, aF as ShippingInfo, aS as ShippingOption, aT as ShippingPrice, aQ as ShippingRegion, cv as StoreSettings, cz as Street, aB as StreetAddress, cm as Subscription, bD as SubscriptionCharges, cl as SubscriptionCreated, S as SubscriptionFrequency, ai as SubscriptionOptionInfo, aj as SubscriptionSettings, E as SuggestedFix, b3 as SystemError, bw as Target, bz as TargetLineItem, bx as TargetTargetTypeOneOf, a4 as TaxBreakdown, bg as TaxCalculationDetails, bh as TaxCalculationDetailsCalculationDetailsOneOf, a3 as TaxRateBreakdown, bf as TaxSummary, as as TaxableAddress, at as TaxableAddressTaxableAddressDataOneOf, T as TaxableAddressType, al as Title, cu as Totals, ax as TranslatableString, bX as UpdateCheckoutRequest, bY as UpdateCheckoutResponse, cg as UpdateLineItemsQuantityRequest, bF as UpdatedCheckoutMessage, cn as V1BuyerInfo, cH as V1CustomField, bK as V1ItemModifier, co as V1LineItem, bJ as V1ModifierGroup, cE as V1PickupDetails, cB as V1ShippingInfo, cC as V1ShippingInfoDetailsOneOf, cI as V1SubscriptionOptionInfo, cL as V1SubscriptionSettings, b1 as ValidationError, cA as VatId, V as VatType, bv as Violation, c8 as ViolationsList, Z as WebhookIdentityType, W as WeightUnit } from './ecom-v1-checkout-checkout.universal-BWJwZODy.js';
1
+ import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { CreateCheckoutOptions, Checkout, CreateCheckoutApplicationErrors, GetCheckoutByCartIdResponse, GetCheckoutURLResponse, UpdateCheckout, UpdateCheckoutOptions, UpdateCheckoutApplicationErrors, RemoveCouponResponse, RemoveGiftCardResponse, RemoveOverrideCheckoutUrlResponse, AddToCheckoutOptions, AddToCheckoutResponse, AddToCheckoutApplicationErrors, RemoveLineItemsResponse, CreateOrderOptions, CreateOrderResponse, CreateOrderApplicationErrors, RawHttpResponse, MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors, LineItemQuantityUpdate, UpdateLineItemsQuantityResponse, CheckoutCompletedEnvelope, CheckoutCreatedEnvelope, CheckoutDeletedEnvelope, CheckoutUpdatedEnvelope } from './index.typings.js';
3
+ export { ActionEvent, AddToCheckoutRequest, AdditionalFee, AdditionalFeeSource, Address, AddressAddressLine1OptionsOneOf, AddressLocation, AddressWithContact, AggregatedTaxBreakdown, ApiAddress, ApplicableLineItems, ApplicationError, AppliedCoupon, AppliedDiscount, AppliedDiscountDiscountSourceOneOf, AutoTaxFallbackCalculationDetails, BaseEventMetadata, BillingInfo, BuyerInfo, BuyerInfoIdOneOf, CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf, Carrier, CarrierError, CarrierErrors, CarrierServiceOption, CatalogOverrideFields, CatalogReference, ChannelInfo, ChannelInfoChannelType, ChannelType, Charge, ChargeDetails, ChargeType, CheckoutMarkedAsCompleted, Color, CommonVatId, CommonVatType, ConversionInfo, Coupon, CreateCheckoutRequest, CreateCheckoutResponse, CreateOrderAndChargeOptions, CreateOrderAndChargeRequest, CreateOrderAndChargeResponse, CreateOrderAndChargeResponseIdOneOf, CreateOrderRequest, CreateOrderResponseIdOneOf, CreatedBy, CreatedByIdOneOf, CustomContentReference, CustomField, CustomLineItem, CustomSettings, CustomTextFieldSelection, DeleteCheckoutRequest, DeleteCheckoutResponse, DeliveryAllocation, DeliveryLogistics, DeliveryTimeSlot, Description, DescriptionLine, DescriptionLineDescriptionLineValueOneOf, DescriptionLineName, DescriptionLineType, DescriptionLineValueOneOf, Details, DetailsKindOneOf, Discount, DiscountDiscountType, DiscountRule, DiscountRuleName, DiscountType, DomainEvent, DomainEventBodyOneOf, DoublePaymentErrorData, DoublePaymentErrorDataIdOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, ExternalReference, FallbackReason, FieldViolation, FileType, FocalPoint, FreeTrialPeriod, FullAddressContactDetails, FullName, GetCheckoutByCartIdRequest, GetCheckoutPaymentSettingsRequest, GetCheckoutPaymentSettingsResponse, GetCheckoutPaymentSettingsResponsePaymentOption, GetCheckoutRequest, GetCheckoutResponse, GetCheckoutURLRequest, GetCheckoutWithAllExtendedFieldsRequest, GetCheckoutWithAllExtendedFieldsResponse, GetWixCheckoutURLRequest, GetWixCheckoutURLResponse, GiftCard, Group, HeadersEntry, IdentificationData, IdentificationDataIdOneOf, IdentityType, InvalidMembership, ItemAvailabilityInfo, ItemAvailabilityStatus, ItemModifier, ItemTaxFullDetails, ItemType, ItemTypeItemType, ItemTypeItemTypeDataOneOf, JurisdictionType, LineItem, LineItemDiscount, LineItemType, ManualCalculationReason, MarkCheckoutAsCompletedAndRedirectToUrlRequest, MarkCheckoutAsCompletedRequest, MarkCheckoutAsCompletedResponse, MediaItem, MediaItemType, Membership, MembershipName, MembershipOptions, MembershipPaymentCredits, MerchantDiscount, MerchantDiscountInput, MessageEnvelope, ModifierGroup, MultiCurrencyPrice, NameInLineItem, NameInOther, OptionSelection, Other, OtherCharge, PaymentErrorResponseData, PaymentOption, PaymentOptionType, PhysicalProperties, PickupAddress, PickupDetails, PickupMethod, PlainTextValue, Policy, PriceDescription, PriceSummary, ProductDetails, ProductName, RateType, RedeemErrorData, Region, RemoveCouponRequest, RemoveGiftCardRequest, RemoveLineItemsRequest, RemoveOverrideCheckoutUrlRequest, RestoreInfo, RuleType, Scope, SecuredMedia, SelectedCarrierServiceOption, SelectedCarrierServiceOptionOtherCharge, SelectedCarrierServiceOptionPrices, SelectedMembership, SelectedMemberships, ServiceProperties, Severity, ShipmentDetails, ShippingCalculationErrorData, ShippingCalculationErrorDataShippingCalculationErrorOneOf, ShippingInfo, ShippingOption, ShippingPrice, ShippingRegion, StoreSettings, Street, StreetAddress, Subscription, SubscriptionCharges, SubscriptionCreated, SubscriptionFrequency, SubscriptionOptionInfo, SubscriptionSettings, SuggestedFix, SystemError, Target, TargetLineItem, TargetTargetTypeOneOf, TaxBreakdown, TaxCalculationDetails, TaxCalculationDetailsCalculationDetailsOneOf, TaxRateBreakdown, TaxSummary, TaxableAddress, TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, Title, Totals, TranslatableString, UpdateCheckoutRequest, UpdateCheckoutResponse, UpdateLineItemsQuantityRequest, UpdatedCheckoutMessage, V1BuyerInfo, V1CustomField, V1ItemModifier, V1LineItem, V1ModifierGroup, V1PickupDetails, V1ShippingInfo, V1ShippingInfoDetailsOneOf, V1SubscriptionOptionInfo, V1SubscriptionSettings, ValidationError, VatId, VatType, Violation, ViolationsList, WebhookIdentityType, WeightUnit } from './index.typings.js';
4
4
 
5
+ type CheckoutNonNullablePaths = `lineItems` | `lineItems.${number}.quantity` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.productName.original` | `lineItems.${number}.price.amount` | `lineItems.${number}.price.convertedAmount` | `lineItems.${number}.price.formattedAmount` | `lineItems.${number}.price.formattedConvertedAmount` | `lineItems.${number}.taxDetails.taxRate` | `lineItems.${number}.availability.status` | `lineItems.${number}.physicalProperties.shippable` | `lineItems.${number}.itemType.preset` | `lineItems.${number}.itemType.custom` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.frequency` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.autoRenewal` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.enableCustomerCancellation` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.freeTrialPeriod.frequency` | `lineItems.${number}.subscriptionOptionInfo.subscriptionSettings.freeTrialPeriod.interval` | `lineItems.${number}.subscriptionOptionInfo.title.original` | `lineItems.${number}.subscriptionOptionInfo.description.original` | `lineItems.${number}.paymentOption` | `lineItems.${number}.priceDescription.original` | `lineItems.${number}.customLineItem` | `lineItems.${number}.catalogOverrideFields.paymentOption.value` | `lineItems.${number}.priceUndetermined` | `lineItems.${number}.fixedQuantity` | `lineItems.${number}.savePaymentMethod` | `lineItems.${number}.taxableAddress.addressType` | `lineItems.${number}.membersOnly` | `billingInfo.address.streetAddress.number` | `billingInfo.address.streetAddress.name` | `billingInfo.contactDetails.vatId._id` | `billingInfo.contactDetails.vatId.type` | `shippingInfo.shippingDestination.address.streetAddress.number` | `shippingInfo.shippingDestination.address.streetAddress.name` | `shippingInfo.shippingDestination.contactDetails.vatId._id` | `shippingInfo.shippingDestination.contactDetails.vatId.type` | `shippingInfo.selectedCarrierServiceOption.code` | `shippingInfo.selectedCarrierServiceOption.title` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.businessLocation` | `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails.pickupMethod` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.amount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.convertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.totalPriceAfterTax.formattedConvertedAmount` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.taxRate` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.name` | `shippingInfo.selectedCarrierServiceOption.cost.taxDetails.rateBreakdown.${number}.rate` | `shippingInfo.selectedCarrierServiceOption.requestedShippingOption` | `shippingInfo.selectedCarrierServiceOption.otherCharges` | `shippingInfo.selectedCarrierServiceOption.otherCharges.${number}.type` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations` | `shippingInfo.selectedCarrierServiceOption.deliveryAllocations.${number}.deliveryCarrier.code` | `shippingInfo.region._id` | `shippingInfo.region.name` | `shippingInfo.carrierServiceOptions` | `shippingInfo.carrierServiceOptions.${number}.carrierId` | `buyerInfo.visitorId` | `buyerInfo.memberId` | `conversionCurrency` | `priceSummary.subtotal.amount` | `priceSummary.subtotal.convertedAmount` | `priceSummary.subtotal.formattedAmount` | `priceSummary.subtotal.formattedConvertedAmount` | `calculationErrors.generalShippingCalculationError.applicationError.code` | `calculationErrors.generalShippingCalculationError.applicationError.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculationErrors.carrierErrors.errors` | `calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculationErrors.orderValidationErrors` | `giftCard._id` | `giftCard.obfuscatedCode` | `giftCard.amount.amount` | `giftCard.amount.convertedAmount` | `giftCard.amount.formattedAmount` | `giftCard.amount.formattedConvertedAmount` | `giftCard.appId` | `appliedDiscounts` | `appliedDiscounts.${number}.coupon._id` | `appliedDiscounts.${number}.coupon.code` | `appliedDiscounts.${number}.coupon.amount.amount` | `appliedDiscounts.${number}.coupon.amount.convertedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedAmount` | `appliedDiscounts.${number}.coupon.amount.formattedConvertedAmount` | `appliedDiscounts.${number}.coupon.name` | `appliedDiscounts.${number}.discountRule._id` | `appliedDiscounts.${number}.discountRule.name.original` | `appliedDiscounts.${number}.discountType` | `customFields` | `customFields.${number}.title` | `weightUnit` | `taxSummary.taxableAmount.amount` | `taxSummary.taxableAmount.convertedAmount` | `taxSummary.taxableAmount.formattedAmount` | `taxSummary.taxableAmount.formattedConvertedAmount` | `taxSummary.calculationDetails.manualRateReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.fallbackReason` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.code` | `taxSummary.calculationDetails.autoTaxFallbackDetails.error.description` | `taxSummary.calculationDetails.rateType` | `currency` | `channelType` | `siteLanguage` | `buyerLanguage` | `completed` | `taxIncludedInPrice` | `createdBy.userId` | `createdBy.memberId` | `createdBy.visitorId` | `createdBy.appId` | `payNow.subtotal.amount` | `payNow.subtotal.convertedAmount` | `payNow.subtotal.formattedAmount` | `payNow.subtotal.formattedConvertedAmount` | `payLater.subtotal.amount` | `payLater.subtotal.convertedAmount` | `payLater.subtotal.formattedAmount` | `payLater.subtotal.formattedConvertedAmount` | `membershipOptions.eligibleMemberships` | `membershipOptions.eligibleMemberships.${number}._id` | `membershipOptions.eligibleMemberships.${number}.appId` | `membershipOptions.eligibleMemberships.${number}.name.original` | `membershipOptions.eligibleMemberships.${number}.credits.total` | `membershipOptions.eligibleMemberships.${number}.credits.remaining` | `membershipOptions.invalidMemberships` | `membershipOptions.invalidMemberships.${number}.reason` | `membershipOptions.selectedMemberships.memberships` | `membershipOptions.selectedMemberships.memberships.${number}._id` | `membershipOptions.selectedMemberships.memberships.${number}.appId` | `additionalFees` | `additionalFees.${number}.name` | `additionalFees.${number}.price.amount` | `additionalFees.${number}.price.convertedAmount` | `additionalFees.${number}.price.formattedAmount` | `additionalFees.${number}.price.formattedConvertedAmount` | `additionalFees.${number}.taxDetails.taxRate` | `additionalFees.${number}.source` | `violations` | `violations.${number}.severity` | `violations.${number}.target.other.name` | `violations.${number}.target.lineItem.name` | `customSettings.lockGiftCard` | `customSettings.lockCouponCode` | `customSettings.disabledPolicyAgreementCheckbox` | `customSettings.disabledManualPayment` | `customContentReference.appId` | `customContentReference.componentId` | `externalReference.appId` | `payAfterFreeTrial.subtotal.amount` | `payAfterFreeTrial.subtotal.convertedAmount` | `payAfterFreeTrial.subtotal.formattedAmount` | `payAfterFreeTrial.subtotal.formattedConvertedAmount` | `paymentCurrency`;
5
6
  declare function createCheckout$1(httpClient: HttpClient): CreateCheckoutSignature;
6
7
  interface CreateCheckoutSignature {
7
8
  /**
@@ -13,7 +14,9 @@ interface CreateCheckoutSignature {
13
14
  * @param - Checkout creation options.
14
15
  * @returns Newly created checkout.
15
16
  */
16
- (options?: CreateCheckoutOptions | undefined): Promise<Checkout>;
17
+ (options?: NonNullablePaths<CreateCheckoutOptions, `channelType` | `checkoutInfo.customFields.${number}.value` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}._id` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}.appId` | `checkoutInfo.membershipOptions.selectedMemberships.memberships.${number}.lineItemIds` | `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.modifierGroups.${number}.modifiers.${number}.label` | `customLineItems.${number}.price` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths> & {
18
+ __applicationErrorsType?: CreateCheckoutApplicationErrors;
19
+ }>;
17
20
  }
18
21
  declare function getCheckout$1(httpClient: HttpClient): GetCheckoutSignature;
19
22
  interface GetCheckoutSignature {
@@ -22,7 +25,7 @@ interface GetCheckoutSignature {
22
25
  * @param - Checkout ID.
23
26
  * @returns Retrieved checkout.
24
27
  */
25
- (_id: string): Promise<Checkout>;
28
+ (_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
26
29
  }
27
30
  declare function getCheckoutByCartId$1(httpClient: HttpClient): GetCheckoutByCartIdSignature;
28
31
  interface GetCheckoutByCartIdSignature {
@@ -30,7 +33,9 @@ interface GetCheckoutByCartIdSignature {
30
33
  * Retrieves the checkout associated with a specified cart.
31
34
  * @param - Cart ID.
32
35
  */
33
- (_id: string): Promise<GetCheckoutByCartIdResponse>;
36
+ (_id: string): Promise<NonNullablePaths<GetCheckoutByCartIdResponse, {
37
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
38
+ }[CheckoutNonNullablePaths]>>;
34
39
  }
35
40
  declare function getCheckoutUrl$1(httpClient: HttpClient): GetCheckoutUrlSignature;
36
41
  interface GetCheckoutUrlSignature {
@@ -41,7 +46,7 @@ interface GetCheckoutUrlSignature {
41
46
  * However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
42
47
  * @param - Checkout ID.
43
48
  */
44
- (_id: string): Promise<GetCheckoutURLResponse>;
49
+ (_id: string): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`>>;
45
50
  }
46
51
  declare function updateCheckout$1(httpClient: HttpClient): UpdateCheckoutSignature;
47
52
  interface UpdateCheckoutSignature {
@@ -65,7 +70,9 @@ interface UpdateCheckoutSignature {
65
70
  * @param - Checkout update options.
66
71
  * @returns Updated checkout.
67
72
  */
68
- (_id: string, checkout: UpdateCheckout, options?: UpdateCheckoutOptions | undefined): Promise<Checkout>;
73
+ (_id: string, checkout: NonNullablePaths<UpdateCheckout, `customFields.${number}.value` | `membershipOptions.selectedMemberships.memberships.${number}._id` | `membershipOptions.selectedMemberships.memberships.${number}.appId` | `membershipOptions.selectedMemberships.memberships.${number}.lineItemIds`>, options?: NonNullablePaths<UpdateCheckoutOptions, `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.modifierGroups.${number}.modifiers.${number}.label` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths> & {
74
+ __applicationErrorsType?: UpdateCheckoutApplicationErrors;
75
+ }>;
69
76
  }
70
77
  declare function removeCoupon$1(httpClient: HttpClient): RemoveCouponSignature;
71
78
  interface RemoveCouponSignature {
@@ -73,7 +80,9 @@ interface RemoveCouponSignature {
73
80
  * Removes the coupon from a specified checkout.
74
81
  * @param - ID of the checkout to remove the coupon from.
75
82
  */
76
- (_id: string): Promise<RemoveCouponResponse>;
83
+ (_id: string): Promise<NonNullablePaths<RemoveCouponResponse, {
84
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
85
+ }[CheckoutNonNullablePaths]>>;
77
86
  }
78
87
  declare function removeGiftCard$1(httpClient: HttpClient): RemoveGiftCardSignature;
79
88
  interface RemoveGiftCardSignature {
@@ -83,7 +92,9 @@ interface RemoveGiftCardSignature {
83
92
  * A checkout can only hold 1 gift card.
84
93
  * @param - ID of the checkout to remove the gift card from.
85
94
  */
86
- (_id: string): Promise<RemoveGiftCardResponse>;
95
+ (_id: string): Promise<NonNullablePaths<RemoveGiftCardResponse, {
96
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
97
+ }[CheckoutNonNullablePaths]>>;
87
98
  }
88
99
  declare function removeOverrideCheckoutUrl$1(httpClient: HttpClient): RemoveOverrideCheckoutUrlSignature;
89
100
  interface RemoveOverrideCheckoutUrlSignature {
@@ -94,7 +105,9 @@ interface RemoveOverrideCheckoutUrlSignature {
94
105
  * Wix checkout page URL.
95
106
  * @param - ID of the checkout to remove the override checkout url from.
96
107
  */
97
- (_id: string): Promise<RemoveOverrideCheckoutUrlResponse>;
108
+ (_id: string): Promise<NonNullablePaths<RemoveOverrideCheckoutUrlResponse, {
109
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
110
+ }[CheckoutNonNullablePaths]>>;
98
111
  }
99
112
  declare function addToCheckout$1(httpClient: HttpClient): AddToCheckoutSignature;
100
113
  interface AddToCheckoutSignature {
@@ -106,7 +119,11 @@ interface AddToCheckoutSignature {
106
119
  * @param - Checkout ID.
107
120
  * @param - Items to be added to checkout.
108
121
  */
109
- (_id: string, options?: AddToCheckoutOptions | undefined): Promise<AddToCheckoutResponse>;
122
+ (_id: string, options?: NonNullablePaths<AddToCheckoutOptions, `customLineItems.${number}.descriptionLines.${number}.name` | `customLineItems.${number}.itemType` | `customLineItems.${number}.modifierGroups.${number}.modifiers.${number}.label` | `customLineItems.${number}.productName` | `customLineItems.${number}.quantity` | `lineItems.${number}.catalogReference` | `lineItems.${number}.catalogReference.appId` | `lineItems.${number}.catalogReference.catalogItemId` | `lineItems.${number}.quantity`>): Promise<NonNullablePaths<AddToCheckoutResponse, {
123
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
124
+ }[CheckoutNonNullablePaths]> & {
125
+ __applicationErrorsType?: AddToCheckoutApplicationErrors;
126
+ }>;
110
127
  }
111
128
  declare function removeLineItems$1(httpClient: HttpClient): RemoveLineItemsSignature;
112
129
  interface RemoveLineItemsSignature {
@@ -119,7 +136,9 @@ interface RemoveLineItemsSignature {
119
136
  * pass the checkout ID to Get Checkout and look for the IDs under
120
137
  * `lineItems`.
121
138
  */
122
- (_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse>;
139
+ (_id: string, lineItemIds: string[]): Promise<NonNullablePaths<RemoveLineItemsResponse, {
140
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
141
+ }[CheckoutNonNullablePaths]>>;
123
142
  }
124
143
  declare function createOrder$1(httpClient: HttpClient): CreateOrderSignature;
125
144
  interface CreateOrderSignature {
@@ -136,7 +155,9 @@ interface CreateOrderSignature {
136
155
  * @param - Checkout ID.
137
156
  * @param - Additional order creation options.
138
157
  */
139
- (_id: string, options?: CreateOrderOptions | undefined): Promise<CreateOrderResponse>;
158
+ (_id: string, options?: CreateOrderOptions): Promise<NonNullablePaths<CreateOrderResponse, `orderId` | `subscriptionId`> & {
159
+ __applicationErrorsType?: CreateOrderApplicationErrors;
160
+ }>;
140
161
  }
141
162
  declare function markCheckoutAsCompletedAndRedirectToUrl$1(httpClient: HttpClient): MarkCheckoutAsCompletedAndRedirectToUrlSignature;
142
163
  interface MarkCheckoutAsCompletedAndRedirectToUrlSignature {
@@ -144,7 +165,9 @@ interface MarkCheckoutAsCompletedAndRedirectToUrlSignature {
144
165
  * Marks a checkout as completed and redirects to a specified URL.
145
166
  * @param - Server-signed JWT token with required information to complete checkout
146
167
  */
147
- (token: string): Promise<RawHttpResponse>;
168
+ (token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`> & {
169
+ __applicationErrorsType?: MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors;
170
+ }>;
148
171
  }
149
172
  declare function markCheckoutAsCompleted$1(httpClient: HttpClient): MarkCheckoutAsCompletedSignature;
150
173
  interface MarkCheckoutAsCompletedSignature {
@@ -173,7 +196,9 @@ interface UpdateLineItemsQuantitySignature {
173
196
  * @param - Checkout ID.
174
197
  * @param - Line item info to update.
175
198
  */
176
- (_id: string, lineItems: LineItemQuantityUpdate[]): Promise<UpdateLineItemsQuantityResponse>;
199
+ (_id: string, lineItems: NonNullablePaths<LineItemQuantityUpdate, `_id` | `quantity`>[]): Promise<NonNullablePaths<UpdateLineItemsQuantityResponse, {
200
+ [P in CheckoutNonNullablePaths]: `checkout.${P}`;
201
+ }[CheckoutNonNullablePaths]>>;
177
202
  }
178
203
  declare const onCheckoutCompleted$1: EventDefinition<CheckoutCompletedEnvelope, "wix.ecom.v1.checkout_completed">;
179
204
  declare const onCheckoutCreated$1: EventDefinition<CheckoutCreatedEnvelope, "wix.ecom.v1.checkout_created">;