@wix/auto_sdk_ecom_checkout 1.0.44 → 1.0.46
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 +34 -19
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +34 -19
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +38 -23
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +38 -23
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +1 -2
- package/build/internal/es/index.typings.mjs.map +1 -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';
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
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
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,8 +14,8 @@ interface CreateCheckoutSignature {
|
|
|
13
14
|
* @param - Checkout creation options.
|
|
14
15
|
* @returns Newly created checkout.
|
|
15
16
|
*/
|
|
16
|
-
(options?: CreateCheckoutOptions |
|
|
17
|
-
__applicationErrorsType?: CreateCheckoutApplicationErrors
|
|
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;
|
|
18
19
|
}>;
|
|
19
20
|
}
|
|
20
21
|
declare function getCheckout$1(httpClient: HttpClient): GetCheckoutSignature;
|
|
@@ -24,7 +25,7 @@ interface GetCheckoutSignature {
|
|
|
24
25
|
* @param - Checkout ID.
|
|
25
26
|
* @returns Retrieved checkout.
|
|
26
27
|
*/
|
|
27
|
-
(_id: string): Promise<Checkout
|
|
28
|
+
(_id: string): Promise<NonNullablePaths<Checkout, CheckoutNonNullablePaths>>;
|
|
28
29
|
}
|
|
29
30
|
declare function getCheckoutByCartId$1(httpClient: HttpClient): GetCheckoutByCartIdSignature;
|
|
30
31
|
interface GetCheckoutByCartIdSignature {
|
|
@@ -32,7 +33,9 @@ interface GetCheckoutByCartIdSignature {
|
|
|
32
33
|
* Retrieves the checkout associated with a specified cart.
|
|
33
34
|
* @param - Cart ID.
|
|
34
35
|
*/
|
|
35
|
-
(_id: string): Promise<GetCheckoutByCartIdResponse
|
|
36
|
+
(_id: string): Promise<NonNullablePaths<GetCheckoutByCartIdResponse, {
|
|
37
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
38
|
+
}[CheckoutNonNullablePaths]>>;
|
|
36
39
|
}
|
|
37
40
|
declare function getCheckoutUrl$1(httpClient: HttpClient): GetCheckoutUrlSignature;
|
|
38
41
|
interface GetCheckoutUrlSignature {
|
|
@@ -43,7 +46,7 @@ interface GetCheckoutUrlSignature {
|
|
|
43
46
|
* However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
44
47
|
* @param - Checkout ID.
|
|
45
48
|
*/
|
|
46
|
-
(_id: string): Promise<GetCheckoutURLResponse
|
|
49
|
+
(_id: string): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`>>;
|
|
47
50
|
}
|
|
48
51
|
declare function updateCheckout$1(httpClient: HttpClient): UpdateCheckoutSignature;
|
|
49
52
|
interface UpdateCheckoutSignature {
|
|
@@ -67,8 +70,8 @@ interface UpdateCheckoutSignature {
|
|
|
67
70
|
* @param - Checkout update options.
|
|
68
71
|
* @returns Updated checkout.
|
|
69
72
|
*/
|
|
70
|
-
(_id: string, checkout: UpdateCheckout, options?: UpdateCheckoutOptions |
|
|
71
|
-
__applicationErrorsType?: UpdateCheckoutApplicationErrors
|
|
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;
|
|
72
75
|
}>;
|
|
73
76
|
}
|
|
74
77
|
declare function removeCoupon$1(httpClient: HttpClient): RemoveCouponSignature;
|
|
@@ -77,7 +80,9 @@ interface RemoveCouponSignature {
|
|
|
77
80
|
* Removes the coupon from a specified checkout.
|
|
78
81
|
* @param - ID of the checkout to remove the coupon from.
|
|
79
82
|
*/
|
|
80
|
-
(_id: string): Promise<RemoveCouponResponse
|
|
83
|
+
(_id: string): Promise<NonNullablePaths<RemoveCouponResponse, {
|
|
84
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
85
|
+
}[CheckoutNonNullablePaths]>>;
|
|
81
86
|
}
|
|
82
87
|
declare function removeGiftCard$1(httpClient: HttpClient): RemoveGiftCardSignature;
|
|
83
88
|
interface RemoveGiftCardSignature {
|
|
@@ -87,7 +92,9 @@ interface RemoveGiftCardSignature {
|
|
|
87
92
|
* A checkout can only hold 1 gift card.
|
|
88
93
|
* @param - ID of the checkout to remove the gift card from.
|
|
89
94
|
*/
|
|
90
|
-
(_id: string): Promise<RemoveGiftCardResponse
|
|
95
|
+
(_id: string): Promise<NonNullablePaths<RemoveGiftCardResponse, {
|
|
96
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
97
|
+
}[CheckoutNonNullablePaths]>>;
|
|
91
98
|
}
|
|
92
99
|
declare function removeOverrideCheckoutUrl$1(httpClient: HttpClient): RemoveOverrideCheckoutUrlSignature;
|
|
93
100
|
interface RemoveOverrideCheckoutUrlSignature {
|
|
@@ -98,7 +105,9 @@ interface RemoveOverrideCheckoutUrlSignature {
|
|
|
98
105
|
* Wix checkout page URL.
|
|
99
106
|
* @param - ID of the checkout to remove the override checkout url from.
|
|
100
107
|
*/
|
|
101
|
-
(_id: string): Promise<RemoveOverrideCheckoutUrlResponse
|
|
108
|
+
(_id: string): Promise<NonNullablePaths<RemoveOverrideCheckoutUrlResponse, {
|
|
109
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
110
|
+
}[CheckoutNonNullablePaths]>>;
|
|
102
111
|
}
|
|
103
112
|
declare function addToCheckout$1(httpClient: HttpClient): AddToCheckoutSignature;
|
|
104
113
|
interface AddToCheckoutSignature {
|
|
@@ -110,8 +119,10 @@ interface AddToCheckoutSignature {
|
|
|
110
119
|
* @param - Checkout ID.
|
|
111
120
|
* @param - Items to be added to checkout.
|
|
112
121
|
*/
|
|
113
|
-
(_id: string, options?: AddToCheckoutOptions |
|
|
114
|
-
|
|
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;
|
|
115
126
|
}>;
|
|
116
127
|
}
|
|
117
128
|
declare function removeLineItems$1(httpClient: HttpClient): RemoveLineItemsSignature;
|
|
@@ -125,7 +136,9 @@ interface RemoveLineItemsSignature {
|
|
|
125
136
|
* pass the checkout ID to Get Checkout and look for the IDs under
|
|
126
137
|
* `lineItems`.
|
|
127
138
|
*/
|
|
128
|
-
(_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse
|
|
139
|
+
(_id: string, lineItemIds: string[]): Promise<NonNullablePaths<RemoveLineItemsResponse, {
|
|
140
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
141
|
+
}[CheckoutNonNullablePaths]>>;
|
|
129
142
|
}
|
|
130
143
|
declare function createOrder$1(httpClient: HttpClient): CreateOrderSignature;
|
|
131
144
|
interface CreateOrderSignature {
|
|
@@ -142,8 +155,8 @@ interface CreateOrderSignature {
|
|
|
142
155
|
* @param - Checkout ID.
|
|
143
156
|
* @param - Additional order creation options.
|
|
144
157
|
*/
|
|
145
|
-
(_id: string, options?: CreateOrderOptions
|
|
146
|
-
__applicationErrorsType?: CreateOrderApplicationErrors
|
|
158
|
+
(_id: string, options?: CreateOrderOptions): Promise<NonNullablePaths<CreateOrderResponse, `orderId` | `subscriptionId`> & {
|
|
159
|
+
__applicationErrorsType?: CreateOrderApplicationErrors;
|
|
147
160
|
}>;
|
|
148
161
|
}
|
|
149
162
|
declare function markCheckoutAsCompletedAndRedirectToUrl$1(httpClient: HttpClient): MarkCheckoutAsCompletedAndRedirectToUrlSignature;
|
|
@@ -152,8 +165,8 @@ interface MarkCheckoutAsCompletedAndRedirectToUrlSignature {
|
|
|
152
165
|
* Marks a checkout as completed and redirects to a specified URL.
|
|
153
166
|
* @param - Server-signed JWT token with required information to complete checkout
|
|
154
167
|
*/
|
|
155
|
-
(token: string): Promise<RawHttpResponse & {
|
|
156
|
-
__applicationErrorsType?: MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors
|
|
168
|
+
(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`> & {
|
|
169
|
+
__applicationErrorsType?: MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors;
|
|
157
170
|
}>;
|
|
158
171
|
}
|
|
159
172
|
declare function markCheckoutAsCompleted$1(httpClient: HttpClient): MarkCheckoutAsCompletedSignature;
|
|
@@ -183,7 +196,9 @@ interface UpdateLineItemsQuantitySignature {
|
|
|
183
196
|
* @param - Checkout ID.
|
|
184
197
|
* @param - Line item info to update.
|
|
185
198
|
*/
|
|
186
|
-
(_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]>>;
|
|
187
202
|
}
|
|
188
203
|
declare const onCheckoutCompleted$1: EventDefinition<CheckoutCompletedEnvelope, "wix.ecom.v1.checkout_completed">;
|
|
189
204
|
declare const onCheckoutCreated$1: EventDefinition<CheckoutCreatedEnvelope, "wix.ecom.v1.checkout_created">;
|