@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
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateCheckoutRequest as CreateCheckoutRequest$1, CreateCheckoutResponse as CreateCheckoutResponse$1, GetCheckoutRequest as GetCheckoutRequest$1, GetCheckoutResponse as GetCheckoutResponse$1, GetCheckoutByCartIdRequest as GetCheckoutByCartIdRequest$1, GetCheckoutByCartIdResponse as GetCheckoutByCartIdResponse$1, GetWixCheckoutURLRequest as GetWixCheckoutURLRequest$1, GetWixCheckoutURLResponse as GetWixCheckoutURLResponse$1, GetCheckoutURLRequest as GetCheckoutURLRequest$1, GetCheckoutURLResponse as GetCheckoutURLResponse$1, UpdateCheckoutRequest as UpdateCheckoutRequest$1, UpdateCheckoutResponse as UpdateCheckoutResponse$1, RemoveCouponRequest as RemoveCouponRequest$1, RemoveCouponResponse as RemoveCouponResponse$1, RemoveGiftCardRequest as RemoveGiftCardRequest$1, RemoveGiftCardResponse as RemoveGiftCardResponse$1, RemoveOverrideCheckoutUrlRequest as RemoveOverrideCheckoutUrlRequest$1, RemoveOverrideCheckoutUrlResponse as RemoveOverrideCheckoutUrlResponse$1, AddToCheckoutRequest as AddToCheckoutRequest$1, AddToCheckoutResponse as AddToCheckoutResponse$1, RemoveLineItemsRequest as RemoveLineItemsRequest$1, RemoveLineItemsResponse as RemoveLineItemsResponse$1, CreateOrderRequest as CreateOrderRequest$1, CreateOrderResponse as CreateOrderResponse$1, CreateOrderAndChargeRequest as CreateOrderAndChargeRequest$1, CreateOrderAndChargeResponse as CreateOrderAndChargeResponse$1, MarkCheckoutAsCompletedAndRedirectToUrlRequest as MarkCheckoutAsCompletedAndRedirectToUrlRequest$1, RawHttpResponse as RawHttpResponse$1, MarkCheckoutAsCompletedRequest as MarkCheckoutAsCompletedRequest$1, MarkCheckoutAsCompletedResponse as MarkCheckoutAsCompletedResponse$1, UpdateLineItemsQuantityRequest as UpdateLineItemsQuantityRequest$1, UpdateLineItemsQuantityResponse as UpdateLineItemsQuantityResponse$1, GetCheckoutPaymentSettingsRequest as GetCheckoutPaymentSettingsRequest$1, GetCheckoutPaymentSettingsResponse as GetCheckoutPaymentSettingsResponse$1 } from './index.typings.js';
|
|
2
|
+
import '@wix/sdk-types';
|
|
2
3
|
|
|
3
4
|
interface Checkout {
|
|
4
5
|
/**
|
|
@@ -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, GetWixCheckoutURLResponse, GetCheckoutURLResponse, UpdateCheckout, UpdateCheckoutOptions, UpdateCheckoutApplicationErrors, RemoveCouponResponse, RemoveGiftCardResponse, RemoveOverrideCheckoutUrlResponse, AddToCheckoutOptions, AddToCheckoutResponse, AddToCheckoutApplicationErrors, RemoveLineItemsResponse, CreateOrderOptions, CreateOrderResponse, CreateOrderApplicationErrors, CreateOrderAndChargeOptions, CreateOrderAndChargeResponse, CreateOrderAndChargeApplicationErrors, RawHttpResponse, MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors, LineItemQuantityUpdate, UpdateLineItemsQuantityResponse, GetCheckoutPaymentSettingsResponse, CheckoutCompletedEnvelope, CheckoutCreatedEnvelope, CheckoutDeletedEnvelope, CheckoutUpdatedEnvelope } from './index.typings.mjs';
|
|
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, CreateOrderAndChargeRequest, 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, GetCheckoutPaymentSettingsResponsePaymentOption, GetCheckoutRequest, GetCheckoutResponse, GetCheckoutURLRequest, GetCheckoutWithAllExtendedFieldsRequest, GetCheckoutWithAllExtendedFieldsResponse, GetWixCheckoutURLRequest, 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.mjs';
|
|
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
|
/** @internal */
|
|
36
41
|
declare function getWixCheckoutUrl$1(httpClient: HttpClient): GetWixCheckoutUrlSignature;
|
|
@@ -39,7 +44,7 @@ interface GetWixCheckoutUrlSignature {
|
|
|
39
44
|
* Deprecated and will be removed soon, use GetCheckoutURL
|
|
40
45
|
* @param - Checkout ID.
|
|
41
46
|
*/
|
|
42
|
-
(_id: string): Promise<GetWixCheckoutURLResponse
|
|
47
|
+
(_id: string): Promise<NonNullablePaths<GetWixCheckoutURLResponse, `checkoutUrl`>>;
|
|
43
48
|
}
|
|
44
49
|
declare function getCheckoutUrl$1(httpClient: HttpClient): GetCheckoutUrlSignature;
|
|
45
50
|
interface GetCheckoutUrlSignature {
|
|
@@ -50,7 +55,7 @@ interface GetCheckoutUrlSignature {
|
|
|
50
55
|
* However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
51
56
|
* @param - Checkout ID.
|
|
52
57
|
*/
|
|
53
|
-
(_id: string): Promise<GetCheckoutURLResponse
|
|
58
|
+
(_id: string): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`>>;
|
|
54
59
|
}
|
|
55
60
|
declare function updateCheckout$1(httpClient: HttpClient): UpdateCheckoutSignature;
|
|
56
61
|
interface UpdateCheckoutSignature {
|
|
@@ -74,7 +79,9 @@ interface UpdateCheckoutSignature {
|
|
|
74
79
|
* @param - Checkout update options.
|
|
75
80
|
* @returns Updated checkout.
|
|
76
81
|
*/
|
|
77
|
-
(_id: string, checkout: UpdateCheckout, options?: UpdateCheckoutOptions |
|
|
82
|
+
(_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> & {
|
|
83
|
+
__applicationErrorsType?: UpdateCheckoutApplicationErrors;
|
|
84
|
+
}>;
|
|
78
85
|
}
|
|
79
86
|
declare function removeCoupon$1(httpClient: HttpClient): RemoveCouponSignature;
|
|
80
87
|
interface RemoveCouponSignature {
|
|
@@ -82,7 +89,9 @@ interface RemoveCouponSignature {
|
|
|
82
89
|
* Removes the coupon from a specified checkout.
|
|
83
90
|
* @param - ID of the checkout to remove the coupon from.
|
|
84
91
|
*/
|
|
85
|
-
(_id: string): Promise<RemoveCouponResponse
|
|
92
|
+
(_id: string): Promise<NonNullablePaths<RemoveCouponResponse, {
|
|
93
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
94
|
+
}[CheckoutNonNullablePaths]>>;
|
|
86
95
|
}
|
|
87
96
|
declare function removeGiftCard$1(httpClient: HttpClient): RemoveGiftCardSignature;
|
|
88
97
|
interface RemoveGiftCardSignature {
|
|
@@ -92,7 +101,9 @@ interface RemoveGiftCardSignature {
|
|
|
92
101
|
* A checkout can only hold 1 gift card.
|
|
93
102
|
* @param - ID of the checkout to remove the gift card from.
|
|
94
103
|
*/
|
|
95
|
-
(_id: string): Promise<RemoveGiftCardResponse
|
|
104
|
+
(_id: string): Promise<NonNullablePaths<RemoveGiftCardResponse, {
|
|
105
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
106
|
+
}[CheckoutNonNullablePaths]>>;
|
|
96
107
|
}
|
|
97
108
|
declare function removeOverrideCheckoutUrl$1(httpClient: HttpClient): RemoveOverrideCheckoutUrlSignature;
|
|
98
109
|
interface RemoveOverrideCheckoutUrlSignature {
|
|
@@ -103,7 +114,9 @@ interface RemoveOverrideCheckoutUrlSignature {
|
|
|
103
114
|
* Wix checkout page URL.
|
|
104
115
|
* @param - ID of the checkout to remove the override checkout url from.
|
|
105
116
|
*/
|
|
106
|
-
(_id: string): Promise<RemoveOverrideCheckoutUrlResponse
|
|
117
|
+
(_id: string): Promise<NonNullablePaths<RemoveOverrideCheckoutUrlResponse, {
|
|
118
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
119
|
+
}[CheckoutNonNullablePaths]>>;
|
|
107
120
|
}
|
|
108
121
|
declare function addToCheckout$1(httpClient: HttpClient): AddToCheckoutSignature;
|
|
109
122
|
interface AddToCheckoutSignature {
|
|
@@ -115,7 +128,11 @@ interface AddToCheckoutSignature {
|
|
|
115
128
|
* @param - Checkout ID.
|
|
116
129
|
* @param - Items to be added to checkout.
|
|
117
130
|
*/
|
|
118
|
-
(_id: string, options?: AddToCheckoutOptions |
|
|
131
|
+
(_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, {
|
|
132
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
133
|
+
}[CheckoutNonNullablePaths]> & {
|
|
134
|
+
__applicationErrorsType?: AddToCheckoutApplicationErrors;
|
|
135
|
+
}>;
|
|
119
136
|
}
|
|
120
137
|
declare function removeLineItems$1(httpClient: HttpClient): RemoveLineItemsSignature;
|
|
121
138
|
interface RemoveLineItemsSignature {
|
|
@@ -128,7 +145,9 @@ interface RemoveLineItemsSignature {
|
|
|
128
145
|
* pass the checkout ID to Get Checkout and look for the IDs under
|
|
129
146
|
* `lineItems`.
|
|
130
147
|
*/
|
|
131
|
-
(_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse
|
|
148
|
+
(_id: string, lineItemIds: string[]): Promise<NonNullablePaths<RemoveLineItemsResponse, {
|
|
149
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
150
|
+
}[CheckoutNonNullablePaths]>>;
|
|
132
151
|
}
|
|
133
152
|
declare function createOrder$1(httpClient: HttpClient): CreateOrderSignature;
|
|
134
153
|
interface CreateOrderSignature {
|
|
@@ -145,7 +164,9 @@ interface CreateOrderSignature {
|
|
|
145
164
|
* @param - Checkout ID.
|
|
146
165
|
* @param - Additional order creation options.
|
|
147
166
|
*/
|
|
148
|
-
(_id: string, options?: CreateOrderOptions
|
|
167
|
+
(_id: string, options?: CreateOrderOptions): Promise<NonNullablePaths<CreateOrderResponse, `orderId` | `subscriptionId`> & {
|
|
168
|
+
__applicationErrorsType?: CreateOrderApplicationErrors;
|
|
169
|
+
}>;
|
|
149
170
|
}
|
|
150
171
|
/** @internal */
|
|
151
172
|
declare function createOrderAndCharge$1(httpClient: HttpClient): CreateOrderAndChargeSignature;
|
|
@@ -154,7 +175,9 @@ interface CreateOrderAndChargeSignature {
|
|
|
154
175
|
* Deprecated (use createOrder instead)
|
|
155
176
|
* @param - Checkout ID.
|
|
156
177
|
*/
|
|
157
|
-
(_id: string, options?: CreateOrderAndChargeOptions
|
|
178
|
+
(_id: string, options?: CreateOrderAndChargeOptions): Promise<NonNullablePaths<CreateOrderAndChargeResponse, `orderId` | `subscriptionId`> & {
|
|
179
|
+
__applicationErrorsType?: CreateOrderAndChargeApplicationErrors;
|
|
180
|
+
}>;
|
|
158
181
|
}
|
|
159
182
|
declare function markCheckoutAsCompletedAndRedirectToUrl$1(httpClient: HttpClient): MarkCheckoutAsCompletedAndRedirectToUrlSignature;
|
|
160
183
|
interface MarkCheckoutAsCompletedAndRedirectToUrlSignature {
|
|
@@ -162,7 +185,9 @@ interface MarkCheckoutAsCompletedAndRedirectToUrlSignature {
|
|
|
162
185
|
* Marks a checkout as completed and redirects to a specified URL.
|
|
163
186
|
* @param - Server-signed JWT token with required information to complete checkout
|
|
164
187
|
*/
|
|
165
|
-
(token: string): Promise<RawHttpResponse
|
|
188
|
+
(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`> & {
|
|
189
|
+
__applicationErrorsType?: MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors;
|
|
190
|
+
}>;
|
|
166
191
|
}
|
|
167
192
|
declare function markCheckoutAsCompleted$1(httpClient: HttpClient): MarkCheckoutAsCompletedSignature;
|
|
168
193
|
interface MarkCheckoutAsCompletedSignature {
|
|
@@ -191,13 +216,15 @@ interface UpdateLineItemsQuantitySignature {
|
|
|
191
216
|
* @param - Checkout ID.
|
|
192
217
|
* @param - Line item info to update.
|
|
193
218
|
*/
|
|
194
|
-
(_id: string, lineItems: LineItemQuantityUpdate[]): Promise<UpdateLineItemsQuantityResponse
|
|
219
|
+
(_id: string, lineItems: NonNullablePaths<LineItemQuantityUpdate, `_id` | `quantity`>[]): Promise<NonNullablePaths<UpdateLineItemsQuantityResponse, {
|
|
220
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
221
|
+
}[CheckoutNonNullablePaths]>>;
|
|
195
222
|
}
|
|
196
223
|
/** @internal */
|
|
197
224
|
declare function getCheckoutPaymentSettings$1(httpClient: HttpClient): GetCheckoutPaymentSettingsSignature;
|
|
198
225
|
interface GetCheckoutPaymentSettingsSignature {
|
|
199
226
|
/** @param - Checkout ID. */
|
|
200
|
-
(_id: string): Promise<GetCheckoutPaymentSettingsResponse
|
|
227
|
+
(_id: string): Promise<NonNullablePaths<GetCheckoutPaymentSettingsResponse, `blockedPaymentOptions`>>;
|
|
201
228
|
}
|
|
202
229
|
declare const onCheckoutCompleted$1: EventDefinition<CheckoutCompletedEnvelope, "wix.ecom.v1.checkout_completed">;
|
|
203
230
|
declare const onCheckoutCreated$1: EventDefinition<CheckoutCreatedEnvelope, "wix.ecom.v1.checkout_created">;
|