@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.
- package/build/cjs/index.d.ts +41 -16
- package/build/cjs/index.js.map +1 -1
- package/build/{internal/cjs/ecom-v1-checkout-checkout.universal-o9jU9uir.d.ts → cjs/index.typings.d.ts} +648 -129
- package/build/cjs/index.typings.js +2389 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +41 -16
- package/build/es/index.mjs.map +1 -1
- package/build/{internal/es/ecom-v1-checkout-checkout.universal-o9jU9uir.d.mts → es/index.typings.d.mts} +648 -129
- package/build/es/index.typings.mjs +2318 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +46 -19
- package/build/internal/cjs/index.js.map +1 -1
- package/build/{cjs/ecom-v1-checkout-checkout.universal-BWJwZODy.d.ts → internal/cjs/index.typings.d.ts} +812 -1
- package/build/internal/cjs/index.typings.js +2389 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +46 -19
- package/build/internal/es/index.mjs.map +1 -1
- package/build/{es/ecom-v1-checkout-checkout.universal-BWJwZODy.d.mts → internal/es/index.typings.d.mts} +812 -1
- package/build/internal/es/index.typings.mjs +2318 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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
|
|
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">;
|