@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
|
@@ -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, 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
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,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
|
/** @internal */
|
|
38
41
|
declare function getWixCheckoutUrl$1(httpClient: HttpClient): GetWixCheckoutUrlSignature;
|
|
@@ -41,7 +44,7 @@ interface GetWixCheckoutUrlSignature {
|
|
|
41
44
|
* Deprecated and will be removed soon, use GetCheckoutURL
|
|
42
45
|
* @param - Checkout ID.
|
|
43
46
|
*/
|
|
44
|
-
(_id: string): Promise<GetWixCheckoutURLResponse
|
|
47
|
+
(_id: string): Promise<NonNullablePaths<GetWixCheckoutURLResponse, `checkoutUrl`>>;
|
|
45
48
|
}
|
|
46
49
|
declare function getCheckoutUrl$1(httpClient: HttpClient): GetCheckoutUrlSignature;
|
|
47
50
|
interface GetCheckoutUrlSignature {
|
|
@@ -52,7 +55,7 @@ interface GetCheckoutUrlSignature {
|
|
|
52
55
|
* However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
53
56
|
* @param - Checkout ID.
|
|
54
57
|
*/
|
|
55
|
-
(_id: string): Promise<GetCheckoutURLResponse
|
|
58
|
+
(_id: string): Promise<NonNullablePaths<GetCheckoutURLResponse, `checkoutUrl`>>;
|
|
56
59
|
}
|
|
57
60
|
declare function updateCheckout$1(httpClient: HttpClient): UpdateCheckoutSignature;
|
|
58
61
|
interface UpdateCheckoutSignature {
|
|
@@ -76,8 +79,8 @@ interface UpdateCheckoutSignature {
|
|
|
76
79
|
* @param - Checkout update options.
|
|
77
80
|
* @returns Updated checkout.
|
|
78
81
|
*/
|
|
79
|
-
(_id: string, checkout: UpdateCheckout, options?: UpdateCheckoutOptions |
|
|
80
|
-
__applicationErrorsType?: UpdateCheckoutApplicationErrors
|
|
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;
|
|
81
84
|
}>;
|
|
82
85
|
}
|
|
83
86
|
declare function removeCoupon$1(httpClient: HttpClient): RemoveCouponSignature;
|
|
@@ -86,7 +89,9 @@ interface RemoveCouponSignature {
|
|
|
86
89
|
* Removes the coupon from a specified checkout.
|
|
87
90
|
* @param - ID of the checkout to remove the coupon from.
|
|
88
91
|
*/
|
|
89
|
-
(_id: string): Promise<RemoveCouponResponse
|
|
92
|
+
(_id: string): Promise<NonNullablePaths<RemoveCouponResponse, {
|
|
93
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
94
|
+
}[CheckoutNonNullablePaths]>>;
|
|
90
95
|
}
|
|
91
96
|
declare function removeGiftCard$1(httpClient: HttpClient): RemoveGiftCardSignature;
|
|
92
97
|
interface RemoveGiftCardSignature {
|
|
@@ -96,7 +101,9 @@ interface RemoveGiftCardSignature {
|
|
|
96
101
|
* A checkout can only hold 1 gift card.
|
|
97
102
|
* @param - ID of the checkout to remove the gift card from.
|
|
98
103
|
*/
|
|
99
|
-
(_id: string): Promise<RemoveGiftCardResponse
|
|
104
|
+
(_id: string): Promise<NonNullablePaths<RemoveGiftCardResponse, {
|
|
105
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
106
|
+
}[CheckoutNonNullablePaths]>>;
|
|
100
107
|
}
|
|
101
108
|
declare function removeOverrideCheckoutUrl$1(httpClient: HttpClient): RemoveOverrideCheckoutUrlSignature;
|
|
102
109
|
interface RemoveOverrideCheckoutUrlSignature {
|
|
@@ -107,7 +114,9 @@ interface RemoveOverrideCheckoutUrlSignature {
|
|
|
107
114
|
* Wix checkout page URL.
|
|
108
115
|
* @param - ID of the checkout to remove the override checkout url from.
|
|
109
116
|
*/
|
|
110
|
-
(_id: string): Promise<RemoveOverrideCheckoutUrlResponse
|
|
117
|
+
(_id: string): Promise<NonNullablePaths<RemoveOverrideCheckoutUrlResponse, {
|
|
118
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
119
|
+
}[CheckoutNonNullablePaths]>>;
|
|
111
120
|
}
|
|
112
121
|
declare function addToCheckout$1(httpClient: HttpClient): AddToCheckoutSignature;
|
|
113
122
|
interface AddToCheckoutSignature {
|
|
@@ -119,8 +128,10 @@ interface AddToCheckoutSignature {
|
|
|
119
128
|
* @param - Checkout ID.
|
|
120
129
|
* @param - Items to be added to checkout.
|
|
121
130
|
*/
|
|
122
|
-
(_id: string, options?: AddToCheckoutOptions |
|
|
123
|
-
|
|
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;
|
|
124
135
|
}>;
|
|
125
136
|
}
|
|
126
137
|
declare function removeLineItems$1(httpClient: HttpClient): RemoveLineItemsSignature;
|
|
@@ -134,7 +145,9 @@ interface RemoveLineItemsSignature {
|
|
|
134
145
|
* pass the checkout ID to Get Checkout and look for the IDs under
|
|
135
146
|
* `lineItems`.
|
|
136
147
|
*/
|
|
137
|
-
(_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse
|
|
148
|
+
(_id: string, lineItemIds: string[]): Promise<NonNullablePaths<RemoveLineItemsResponse, {
|
|
149
|
+
[P in CheckoutNonNullablePaths]: `checkout.${P}`;
|
|
150
|
+
}[CheckoutNonNullablePaths]>>;
|
|
138
151
|
}
|
|
139
152
|
declare function createOrder$1(httpClient: HttpClient): CreateOrderSignature;
|
|
140
153
|
interface CreateOrderSignature {
|
|
@@ -151,8 +164,8 @@ interface CreateOrderSignature {
|
|
|
151
164
|
* @param - Checkout ID.
|
|
152
165
|
* @param - Additional order creation options.
|
|
153
166
|
*/
|
|
154
|
-
(_id: string, options?: CreateOrderOptions
|
|
155
|
-
__applicationErrorsType?: CreateOrderApplicationErrors
|
|
167
|
+
(_id: string, options?: CreateOrderOptions): Promise<NonNullablePaths<CreateOrderResponse, `orderId` | `subscriptionId`> & {
|
|
168
|
+
__applicationErrorsType?: CreateOrderApplicationErrors;
|
|
156
169
|
}>;
|
|
157
170
|
}
|
|
158
171
|
/** @internal */
|
|
@@ -162,8 +175,8 @@ interface CreateOrderAndChargeSignature {
|
|
|
162
175
|
* Deprecated (use createOrder instead)
|
|
163
176
|
* @param - Checkout ID.
|
|
164
177
|
*/
|
|
165
|
-
(_id: string, options?: CreateOrderAndChargeOptions
|
|
166
|
-
__applicationErrorsType?: CreateOrderAndChargeApplicationErrors
|
|
178
|
+
(_id: string, options?: CreateOrderAndChargeOptions): Promise<NonNullablePaths<CreateOrderAndChargeResponse, `orderId` | `subscriptionId`> & {
|
|
179
|
+
__applicationErrorsType?: CreateOrderAndChargeApplicationErrors;
|
|
167
180
|
}>;
|
|
168
181
|
}
|
|
169
182
|
declare function markCheckoutAsCompletedAndRedirectToUrl$1(httpClient: HttpClient): MarkCheckoutAsCompletedAndRedirectToUrlSignature;
|
|
@@ -172,8 +185,8 @@ interface MarkCheckoutAsCompletedAndRedirectToUrlSignature {
|
|
|
172
185
|
* Marks a checkout as completed and redirects to a specified URL.
|
|
173
186
|
* @param - Server-signed JWT token with required information to complete checkout
|
|
174
187
|
*/
|
|
175
|
-
(token: string): Promise<RawHttpResponse & {
|
|
176
|
-
__applicationErrorsType?: MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors
|
|
188
|
+
(token: string): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`> & {
|
|
189
|
+
__applicationErrorsType?: MarkCheckoutAsCompletedAndRedirectToUrlApplicationErrors;
|
|
177
190
|
}>;
|
|
178
191
|
}
|
|
179
192
|
declare function markCheckoutAsCompleted$1(httpClient: HttpClient): MarkCheckoutAsCompletedSignature;
|
|
@@ -203,13 +216,15 @@ interface UpdateLineItemsQuantitySignature {
|
|
|
203
216
|
* @param - Checkout ID.
|
|
204
217
|
* @param - Line item info to update.
|
|
205
218
|
*/
|
|
206
|
-
(_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]>>;
|
|
207
222
|
}
|
|
208
223
|
/** @internal */
|
|
209
224
|
declare function getCheckoutPaymentSettings$1(httpClient: HttpClient): GetCheckoutPaymentSettingsSignature;
|
|
210
225
|
interface GetCheckoutPaymentSettingsSignature {
|
|
211
226
|
/** @param - Checkout ID. */
|
|
212
|
-
(_id: string): Promise<GetCheckoutPaymentSettingsResponse
|
|
227
|
+
(_id: string): Promise<NonNullablePaths<GetCheckoutPaymentSettingsResponse, `blockedPaymentOptions`>>;
|
|
213
228
|
}
|
|
214
229
|
declare const onCheckoutCompleted$1: EventDefinition<CheckoutCompletedEnvelope, "wix.ecom.v1.checkout_completed">;
|
|
215
230
|
declare const onCheckoutCreated$1: EventDefinition<CheckoutCreatedEnvelope, "wix.ecom.v1.checkout_created">;
|