@wix/auto_sdk_ecom_checkout 1.0.35 → 1.0.37
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/{es/src/ecom-v1-checkout-checkout.types.d.ts → ecom-v1-checkout-checkout.universal-DEDRvPML.d.mts} +674 -365
- package/build/{cjs/src/ecom-v1-checkout-checkout.types.d.ts → ecom-v1-checkout-checkout.universal-DEDRvPML.d.ts} +674 -365
- package/build/index.d.mts +210 -0
- package/build/index.d.ts +210 -0
- package/build/index.js +2782 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +2708 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{cjs/src/ecom-v1-checkout-checkout.types.d.ts → ecom-v1-checkout-checkout.universal-CirtPjnM.d.mts} +803 -364
- package/build/internal/{es/src/ecom-v1-checkout-checkout.types.d.ts → ecom-v1-checkout-checkout.universal-CirtPjnM.d.ts} +803 -364
- package/build/internal/index.d.mts +240 -0
- package/build/internal/index.d.ts +240 -0
- package/build/internal/index.js +2782 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +2708 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +2606 -0
- package/build/internal/meta.d.ts +2606 -0
- package/build/internal/meta.js +1587 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +1544 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +2606 -0
- package/build/meta.d.ts +2606 -0
- package/build/meta.js +1587 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +1544 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-checkout-checkout.context.d.ts +0 -35
- package/build/cjs/src/ecom-v1-checkout-checkout.context.js +0 -76
- package/build/cjs/src/ecom-v1-checkout-checkout.context.js.map +0 -1
- package/build/cjs/src/ecom-v1-checkout-checkout.http.d.ts +0 -122
- package/build/cjs/src/ecom-v1-checkout-checkout.http.js +0 -1338
- package/build/cjs/src/ecom-v1-checkout-checkout.http.js.map +0 -1
- package/build/cjs/src/ecom-v1-checkout-checkout.meta.d.ts +0 -59
- package/build/cjs/src/ecom-v1-checkout-checkout.meta.js +0 -351
- package/build/cjs/src/ecom-v1-checkout-checkout.meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-checkout-checkout.public.d.ts +0 -194
- package/build/cjs/src/ecom-v1-checkout-checkout.public.js +0 -357
- package/build/cjs/src/ecom-v1-checkout-checkout.public.js.map +0 -1
- package/build/cjs/src/ecom-v1-checkout-checkout.types.js +0 -303
- package/build/cjs/src/ecom-v1-checkout-checkout.types.js.map +0 -1
- package/build/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +0 -4429
- package/build/cjs/src/ecom-v1-checkout-checkout.universal.js +0 -1599
- package/build/cjs/src/ecom-v1-checkout-checkout.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/ecom-v1-checkout-checkout.context.d.ts +0 -35
- package/build/es/src/ecom-v1-checkout-checkout.context.js +0 -41
- package/build/es/src/ecom-v1-checkout-checkout.context.js.map +0 -1
- package/build/es/src/ecom-v1-checkout-checkout.http.d.ts +0 -122
- package/build/es/src/ecom-v1-checkout-checkout.http.js +0 -1318
- package/build/es/src/ecom-v1-checkout-checkout.http.js.map +0 -1
- package/build/es/src/ecom-v1-checkout-checkout.meta.d.ts +0 -59
- package/build/es/src/ecom-v1-checkout-checkout.meta.js +0 -308
- package/build/es/src/ecom-v1-checkout-checkout.meta.js.map +0 -1
- package/build/es/src/ecom-v1-checkout-checkout.public.d.ts +0 -194
- package/build/es/src/ecom-v1-checkout-checkout.public.js +0 -305
- package/build/es/src/ecom-v1-checkout-checkout.public.js.map +0 -1
- package/build/es/src/ecom-v1-checkout-checkout.types.js +0 -300
- package/build/es/src/ecom-v1-checkout-checkout.types.js.map +0 -1
- package/build/es/src/ecom-v1-checkout-checkout.universal.d.ts +0 -4429
- package/build/es/src/ecom-v1-checkout-checkout.universal.js +0 -1556
- package/build/es/src/ecom-v1-checkout-checkout.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.d.ts +0 -41
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.js +0 -76
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.context.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.d.ts +0 -122
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js +0 -1338
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.http.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.d.ts +0 -59
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.js +0 -351
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.d.ts +0 -218
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js +0 -357
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.public.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js +0 -303
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.types.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.d.ts +0 -4615
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js +0 -1599
- package/build/internal/cjs/src/ecom-v1-checkout-checkout.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/ecom-v1-checkout-checkout.context.d.ts +0 -41
- package/build/internal/es/src/ecom-v1-checkout-checkout.context.js +0 -41
- package/build/internal/es/src/ecom-v1-checkout-checkout.context.js.map +0 -1
- package/build/internal/es/src/ecom-v1-checkout-checkout.http.d.ts +0 -122
- package/build/internal/es/src/ecom-v1-checkout-checkout.http.js +0 -1318
- package/build/internal/es/src/ecom-v1-checkout-checkout.http.js.map +0 -1
- package/build/internal/es/src/ecom-v1-checkout-checkout.meta.d.ts +0 -59
- package/build/internal/es/src/ecom-v1-checkout-checkout.meta.js +0 -308
- package/build/internal/es/src/ecom-v1-checkout-checkout.meta.js.map +0 -1
- package/build/internal/es/src/ecom-v1-checkout-checkout.public.d.ts +0 -218
- package/build/internal/es/src/ecom-v1-checkout-checkout.public.js +0 -305
- package/build/internal/es/src/ecom-v1-checkout-checkout.public.js.map +0 -1
- package/build/internal/es/src/ecom-v1-checkout-checkout.types.js +0 -300
- package/build/internal/es/src/ecom-v1-checkout-checkout.types.js.map +0 -1
- package/build/internal/es/src/ecom-v1-checkout-checkout.universal.d.ts +0 -4615
- package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js +0 -1556
- package/build/internal/es/src/ecom-v1-checkout-checkout.universal.js.map +0 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { C as CreateCheckoutOptions, a as Checkout, G as GetCheckoutByCartIdResponse, b as GetCheckoutURLResponse, U as UpdateCheckout, c as UpdateCheckoutOptions, R as RemoveCouponResponse, d as RemoveGiftCardResponse, e as RemoveOverrideCheckoutUrlResponse, A as AddToCheckoutOptions, f as AddToCheckoutResponse, g as RemoveLineItemsResponse, h as CreateOrderOptions, i as CreateOrderResponse, j as RawHttpResponse, L as LineItemQuantityUpdate, k as UpdateLineItemsQuantityResponse, l as CheckoutCompletedEnvelope, m as CheckoutCreatedEnvelope, n as CheckoutUpdatedEnvelope } from './ecom-v1-checkout-checkout.universal-DEDRvPML.mjs';
|
|
3
|
+
export { cT as ActionEvent, b_ as AddToCheckoutRequest, bs as AdditionalFee, x as AdditionalFeeSource, cv as Address, cw as AddressAddressLine1OptionsOneOf, aB as AddressLocation, ay as AddressWithContact, bi as AggregatedTaxBreakdown, az as ApiAddress, aO as ApplicableLineItems, a$ as ApplicationError, cF as AppliedCoupon, b6 as AppliedDiscount, b7 as AppliedDiscountDiscountSourceOneOf, bh as AutoTaxFallbackCalculationDetails, cX as BaseEventMetadata, cL as BillingInfo, aU as BuyerInfo, aV as BuyerInfoIdOneOf, aX as CalculationErrors, aY as CalculationErrorsShippingCalculationErrorOneOf, aM as Carrier, b4 as CarrierError, b3 as CarrierErrors, aQ as CarrierServiceOption, ap as CatalogOverrideFields, _ as CatalogReference, cJ as ChannelInfo, X as ChannelInfoChannelType, w as ChannelType, bD as Charge, cq as ChargeDetails, r as ChargeType, ce as CheckoutMarkedAsCompleted, a9 as Color, aD as CommonVatId, p as CommonVatType, bt as ConversionInfo, b8 as Coupon, bF as CreateCheckoutRequest, bK as CreateCheckoutResponse, cZ as CreateOrderAndChargeOptions, c7 as CreateOrderAndChargeRequest, c8 as CreateOrderAndChargeResponse, c9 as CreateOrderAndChargeResponseIdOneOf, c0 as CreateOrderRequest, c1 as CreateOrderResponseIdOneOf, bj as CreatedBy, bk as CreatedByIdOneOf, bA as CustomContentReference, bd as CustomField, bG as CustomLineItem, bz as CustomSettings, cp as CustomTextFieldSelection, ci as DeleteCheckoutRequest, cj as DeleteCheckoutResponse, aL as DeliveryAllocation, aG as DeliveryLogistics, aI as DeliveryTimeSlot, al as Description, a4 as DescriptionLine, a6 as DescriptionLineDescriptionLineValueOneOf, a7 as DescriptionLineName, D as DescriptionLineType, a5 as DescriptionLineValueOneOf, aZ as Details, a_ as DetailsKindOneOf, cI as Discount, Q as DiscountDiscountType, ba as DiscountRule, bb as DiscountRuleName, t as DiscountType, cN as DomainEvent, cO as DomainEventBodyOneOf, c3 as DoublePaymentErrorData, c4 as DoublePaymentErrorDataIdOneOf, cM as Empty, cP as EntityCreatedEvent, cS as EntityDeletedEvent, cR as EntityUpdatedEvent, cY as EventMetadata, at as ExtendedFields, bB as ExternalReference, v as FallbackReason, b1 as FieldViolation, F as FileType, aa as FocalPoint, aj as FreeTrialPeriod, aC as FullAddressContactDetails, cx as FullName, bR as GetCheckoutByCartIdRequest, cg as GetCheckoutPaymentSettingsRequest, ch as GetCheckoutPaymentSettingsResponse, E as GetCheckoutPaymentSettingsResponsePaymentOption, bN as GetCheckoutRequest, bO as GetCheckoutResponse, bU as GetCheckoutURLRequest, bP as GetCheckoutWithAllExtendedFieldsRequest, bQ as GetCheckoutWithAllExtendedFieldsResponse, bS as GetWixCheckoutURLRequest, bT as GetWixCheckoutURLResponse, b5 as GiftCard, ae as Group, cb as HeadersEntry, cV as IdentificationData, cW as IdentificationDataIdOneOf, H as IdentityType, bp as InvalidMembership, ab as ItemAvailabilityInfo, I as ItemAvailabilityStatus, ax as ItemModifier, a1 as ItemTaxFullDetails, af as ItemType, o as ItemTypeItemType, ag as ItemTypeItemTypeDataOneOf, J as JurisdictionType, Z as LineItem, bc as LineItemDiscount, K as LineItemType, M as ManualCalculationReason, ca as MarkCheckoutAsCompletedAndRedirectToUrlRequest, cc as MarkCheckoutAsCompletedRequest, cd as MarkCheckoutAsCompletedResponse, cs as MediaItem, O as MediaItemType, bm as Membership, bn as MembershipName, bl as MembershipOptions, bo as MembershipPaymentCredits, b9 as MerchantDiscount, bJ as MerchantDiscountInput, cU as MessageEnvelope, av as ModifierGroup, a0 as MultiCurrencyPrice, z as NameInLineItem, N as NameInOther, co as OptionSelection, bx as Other, aT as OtherCharge, c2 as PaymentErrorResponseData, aq as PaymentOption, P as PaymentOptionType, ac as PhysicalProperties, cE as PickupAddress, aH as PickupDetails, q as PickupMethod, a8 as PlainTextValue, au as Policy, ao as PriceDescription, aW as PriceSummary, cr as ProductDetails, $ as ProductName, u as RateType, c5 as RedeemErrorData, aN as Region, bX as RemoveCouponRequest, bY as RemoveGiftCardRequest, b$ as RemoveLineItemsRequest, bZ as RemoveOverrideCheckoutUrlRequest, cQ as RestoreInfo, s as RuleType, ad as Scope, am as SecuredMedia, aF as SelectedCarrierServiceOption, aK as SelectedCarrierServiceOptionOtherCharge, aJ as SelectedCarrierServiceOptionPrices, br as SelectedMembership, bq as SelectedMemberships, an as ServiceProperties, y as Severity, cC as ShipmentDetails, bL as ShippingCalculationErrorData, bM as ShippingCalculationErrorDataShippingCalculationErrorOneOf, aE as ShippingInfo, aR as ShippingOption, aS as ShippingPrice, aP as ShippingRegion, cu as StoreSettings, cy as Street, aA as StreetAddress, cl as Subscription, bC as SubscriptionCharges, ck as SubscriptionCreated, S as SubscriptionFrequency, ah as SubscriptionOptionInfo, ai as SubscriptionSettings, B as SuggestedFix, b2 as SystemError, bv as Target, by as TargetLineItem, bw as TargetTargetTypeOneOf, a3 as TaxBreakdown, bf as TaxCalculationDetails, bg as TaxCalculationDetailsCalculationDetailsOneOf, a2 as TaxRateBreakdown, be as TaxSummary, ar as TaxableAddress, as as TaxableAddressTaxableAddressDataOneOf, T as TaxableAddressType, ak as Title, ct as Totals, aw as TranslatableString, bV as UpdateCheckoutRequest, bW as UpdateCheckoutResponse, cf as UpdateLineItemsQuantityRequest, bE as UpdatedCheckoutMessage, cm as V1BuyerInfo, cG as V1CustomField, bI as V1ItemModifier, cn as V1LineItem, bH as V1ModifierGroup, cD as V1PickupDetails, cA as V1ShippingInfo, cB as V1ShippingInfoDetailsOneOf, cH as V1SubscriptionOptionInfo, cK as V1SubscriptionSettings, b0 as ValidationError, cz as VatId, V as VatType, bu as Violation, c6 as ViolationsList, Y as WebhookIdentityType, W as WeightUnit } from './ecom-v1-checkout-checkout.universal-DEDRvPML.mjs';
|
|
4
|
+
|
|
5
|
+
declare function createCheckout$1(httpClient: HttpClient): CreateCheckoutSignature;
|
|
6
|
+
interface CreateCheckoutSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a checkout.
|
|
9
|
+
*
|
|
10
|
+
* A checkout must include at least 1 item in `lineItems` or `customLineItems`.
|
|
11
|
+
*
|
|
12
|
+
* If passing `checkoutInfo.customFields`, then `checkoutInfo.customFields.value` is a required field.
|
|
13
|
+
* @param - Checkout creation options.
|
|
14
|
+
* @returns Newly created checkout.
|
|
15
|
+
*/
|
|
16
|
+
(options?: CreateCheckoutOptions | undefined): Promise<Checkout>;
|
|
17
|
+
}
|
|
18
|
+
declare function getCheckout$1(httpClient: HttpClient): GetCheckoutSignature;
|
|
19
|
+
interface GetCheckoutSignature {
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves a checkout.
|
|
22
|
+
* @param - Checkout ID.
|
|
23
|
+
* @returns Retrieved checkout.
|
|
24
|
+
*/
|
|
25
|
+
(_id: string): Promise<Checkout>;
|
|
26
|
+
}
|
|
27
|
+
declare function getCheckoutByCartId$1(httpClient: HttpClient): GetCheckoutByCartIdSignature;
|
|
28
|
+
interface GetCheckoutByCartIdSignature {
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves the checkout associated with a specified cart.
|
|
31
|
+
* @param - Cart ID.
|
|
32
|
+
*/
|
|
33
|
+
(_id: string): Promise<GetCheckoutByCartIdResponse>;
|
|
34
|
+
}
|
|
35
|
+
declare function getCheckoutUrl$1(httpClient: HttpClient): GetCheckoutUrlSignature;
|
|
36
|
+
interface GetCheckoutUrlSignature {
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the checkout page URL of a specified checkout.
|
|
39
|
+
*
|
|
40
|
+
* By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.
|
|
41
|
+
* However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
42
|
+
* @param - Checkout ID.
|
|
43
|
+
*/
|
|
44
|
+
(_id: string): Promise<GetCheckoutURLResponse>;
|
|
45
|
+
}
|
|
46
|
+
declare function updateCheckout$1(httpClient: HttpClient): UpdateCheckoutSignature;
|
|
47
|
+
interface UpdateCheckoutSignature {
|
|
48
|
+
/**
|
|
49
|
+
* Updates a checkout.
|
|
50
|
+
*
|
|
51
|
+
* Use this method to update checkout fields such as billing and shipping info, or to add a coupon code or gift card.
|
|
52
|
+
*
|
|
53
|
+
* To update a checkout's `lineItems`, `completed` status, or to remove coupons and gift cards, see these methods:
|
|
54
|
+
* + Add to Checkout: Add line items to the checkout.
|
|
55
|
+
* + Update Line Items Quantity: Update the quantity of 1 or more line items in the checkout.
|
|
56
|
+
* + Remove Line Items: Remove a line item from the checkout.
|
|
57
|
+
* + Mark Checkout As Completed: To update `completed` to `true` if the checkout was completed through a non-Wix orders or payments system.
|
|
58
|
+
* + Remove Coupon: To remove an applied coupon from the checkout.
|
|
59
|
+
* + Remove Gift Card: To remove an applied gift card from the checkout.
|
|
60
|
+
*
|
|
61
|
+
* >**Notes:**
|
|
62
|
+
* > + If nothing is passed in the request, the call will fail.
|
|
63
|
+
* > + The `checkout.buyerInfo.email` may not be removed once it is set.
|
|
64
|
+
* @param - Checkout ID.
|
|
65
|
+
* @param - Checkout update options.
|
|
66
|
+
* @returns Updated checkout.
|
|
67
|
+
*/
|
|
68
|
+
(_id: string, checkout: UpdateCheckout, options?: UpdateCheckoutOptions | undefined): Promise<Checkout>;
|
|
69
|
+
}
|
|
70
|
+
declare function removeCoupon$1(httpClient: HttpClient): RemoveCouponSignature;
|
|
71
|
+
interface RemoveCouponSignature {
|
|
72
|
+
/**
|
|
73
|
+
* Removes the coupon from a specified checkout.
|
|
74
|
+
* @param - ID of the checkout to remove the coupon from.
|
|
75
|
+
*/
|
|
76
|
+
(_id: string): Promise<RemoveCouponResponse>;
|
|
77
|
+
}
|
|
78
|
+
declare function removeGiftCard$1(httpClient: HttpClient): RemoveGiftCardSignature;
|
|
79
|
+
interface RemoveGiftCardSignature {
|
|
80
|
+
/**
|
|
81
|
+
* Removes the gift card from a specified checkout.
|
|
82
|
+
*
|
|
83
|
+
* A checkout can only hold 1 gift card.
|
|
84
|
+
* @param - ID of the checkout to remove the gift card from.
|
|
85
|
+
*/
|
|
86
|
+
(_id: string): Promise<RemoveGiftCardResponse>;
|
|
87
|
+
}
|
|
88
|
+
declare function removeOverrideCheckoutUrl$1(httpClient: HttpClient): RemoveOverrideCheckoutUrlSignature;
|
|
89
|
+
interface RemoveOverrideCheckoutUrlSignature {
|
|
90
|
+
/**
|
|
91
|
+
* Removes the `overrideCheckoutUrl` from a specified checkout.
|
|
92
|
+
*
|
|
93
|
+
* When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard
|
|
94
|
+
* Wix checkout page URL.
|
|
95
|
+
* @param - ID of the checkout to remove the override checkout url from.
|
|
96
|
+
*/
|
|
97
|
+
(_id: string): Promise<RemoveOverrideCheckoutUrlResponse>;
|
|
98
|
+
}
|
|
99
|
+
declare function addToCheckout$1(httpClient: HttpClient): AddToCheckoutSignature;
|
|
100
|
+
interface AddToCheckoutSignature {
|
|
101
|
+
/**
|
|
102
|
+
* Adds catalog line items and/or custom line items to a checkout.
|
|
103
|
+
*
|
|
104
|
+
* When adding catalog ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)) items
|
|
105
|
+
* to a checkout, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
|
|
106
|
+
* @param - Checkout ID.
|
|
107
|
+
* @param - Items to be added to checkout.
|
|
108
|
+
*/
|
|
109
|
+
(_id: string, options?: AddToCheckoutOptions | undefined): Promise<AddToCheckoutResponse>;
|
|
110
|
+
}
|
|
111
|
+
declare function removeLineItems$1(httpClient: HttpClient): RemoveLineItemsSignature;
|
|
112
|
+
interface RemoveLineItemsSignature {
|
|
113
|
+
/**
|
|
114
|
+
* Removes line items from the specified checkout.
|
|
115
|
+
* @param - ID of the checkout to remove line items from.
|
|
116
|
+
* @param - IDs of the line items to remove from the checkout.
|
|
117
|
+
*
|
|
118
|
+
* To find the IDs of the checkout line items you'd like to remove,
|
|
119
|
+
* pass the checkout ID to Get Checkout and look for the IDs under
|
|
120
|
+
* `lineItems`.
|
|
121
|
+
*/
|
|
122
|
+
(_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse>;
|
|
123
|
+
}
|
|
124
|
+
declare function createOrder$1(httpClient: HttpClient): CreateOrderSignature;
|
|
125
|
+
interface CreateOrderSignature {
|
|
126
|
+
/**
|
|
127
|
+
* Creates an order from a specified checkout.
|
|
128
|
+
*
|
|
129
|
+
* For an order to be created from a checkout, the following requirements must be met:
|
|
130
|
+
* + A checkout cannot have calculation errors. Pass the checkout ID to Get Checkout and review the `calculationErrors` field.
|
|
131
|
+
* + A checkout must have at least 1 line item or custom line item.
|
|
132
|
+
* + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
|
|
133
|
+
* + If there is a payment to be made, meaning that `priceSummary.total` is greater than `0`, the `billingInfo.address` field are required.
|
|
134
|
+
* + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields are required.
|
|
135
|
+
* + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field are required.
|
|
136
|
+
* @param - Checkout ID.
|
|
137
|
+
* @param - Additional order creation options.
|
|
138
|
+
*/
|
|
139
|
+
(_id: string, options?: CreateOrderOptions | undefined): Promise<CreateOrderResponse>;
|
|
140
|
+
}
|
|
141
|
+
declare function markCheckoutAsCompletedAndRedirectToUrl$1(httpClient: HttpClient): MarkCheckoutAsCompletedAndRedirectToUrlSignature;
|
|
142
|
+
interface MarkCheckoutAsCompletedAndRedirectToUrlSignature {
|
|
143
|
+
/**
|
|
144
|
+
* Marks a checkout as completed and redirects to a specified URL.
|
|
145
|
+
* @param - Server-signed JWT token with required information to complete checkout
|
|
146
|
+
*/
|
|
147
|
+
(token: string): Promise<RawHttpResponse>;
|
|
148
|
+
}
|
|
149
|
+
declare function markCheckoutAsCompleted$1(httpClient: HttpClient): MarkCheckoutAsCompletedSignature;
|
|
150
|
+
interface MarkCheckoutAsCompletedSignature {
|
|
151
|
+
/**
|
|
152
|
+
* Sets `completed` to `true` to mark a checkout as completed.
|
|
153
|
+
*
|
|
154
|
+
* When an order is completed through Wix, the `completed` field in the associated checkout object
|
|
155
|
+
* will automatically be updated to `true`. If an order is completed through a separate system,
|
|
156
|
+
* use this method to manually mark the checkout as completed.
|
|
157
|
+
* @param - Checkout ID.
|
|
158
|
+
*/
|
|
159
|
+
(_id: string): Promise<void>;
|
|
160
|
+
}
|
|
161
|
+
declare function updateLineItemsQuantity$1(httpClient: HttpClient): UpdateLineItemsQuantitySignature;
|
|
162
|
+
interface UpdateLineItemsQuantitySignature {
|
|
163
|
+
/**
|
|
164
|
+
* Updates the quantity of one or more line items in a checkout.
|
|
165
|
+
*
|
|
166
|
+
* This method is only for updating the quantity of line items. To entirely remove a line item from
|
|
167
|
+
* the checkout, use the Remove Line Items method.
|
|
168
|
+
* To add a new line item to the checkout, use the Add to Checkout method.
|
|
169
|
+
*
|
|
170
|
+
* This method checks the amount of stock remaining for this line item. If the specified `quantity`
|
|
171
|
+
* is greater than the remaining stock, then the `quantity` returned in the response is the total amount
|
|
172
|
+
* of remaining stock.
|
|
173
|
+
* @param - Checkout ID.
|
|
174
|
+
* @param - Line item info to update.
|
|
175
|
+
*/
|
|
176
|
+
(_id: string, lineItems: LineItemQuantityUpdate[]): Promise<UpdateLineItemsQuantityResponse>;
|
|
177
|
+
}
|
|
178
|
+
declare const onCheckoutCompleted$1: EventDefinition<CheckoutCompletedEnvelope, "wix.ecom.v1.checkout_completed">;
|
|
179
|
+
declare const onCheckoutCreated$1: EventDefinition<CheckoutCreatedEnvelope, "wix.ecom.v1.checkout_created">;
|
|
180
|
+
declare const onCheckoutUpdated$1: EventDefinition<CheckoutUpdatedEnvelope, "wix.ecom.v1.checkout_updated">;
|
|
181
|
+
|
|
182
|
+
declare const createCheckout: MaybeContext<BuildRESTFunction<typeof createCheckout$1> & typeof createCheckout$1>;
|
|
183
|
+
declare const getCheckout: MaybeContext<BuildRESTFunction<typeof getCheckout$1> & typeof getCheckout$1>;
|
|
184
|
+
declare const getCheckoutByCartId: MaybeContext<BuildRESTFunction<typeof getCheckoutByCartId$1> & typeof getCheckoutByCartId$1>;
|
|
185
|
+
declare const getCheckoutUrl: MaybeContext<BuildRESTFunction<typeof getCheckoutUrl$1> & typeof getCheckoutUrl$1>;
|
|
186
|
+
declare const updateCheckout: MaybeContext<BuildRESTFunction<typeof updateCheckout$1> & typeof updateCheckout$1>;
|
|
187
|
+
declare const removeCoupon: MaybeContext<BuildRESTFunction<typeof removeCoupon$1> & typeof removeCoupon$1>;
|
|
188
|
+
declare const removeGiftCard: MaybeContext<BuildRESTFunction<typeof removeGiftCard$1> & typeof removeGiftCard$1>;
|
|
189
|
+
declare const removeOverrideCheckoutUrl: MaybeContext<BuildRESTFunction<typeof removeOverrideCheckoutUrl$1> & typeof removeOverrideCheckoutUrl$1>;
|
|
190
|
+
declare const addToCheckout: MaybeContext<BuildRESTFunction<typeof addToCheckout$1> & typeof addToCheckout$1>;
|
|
191
|
+
declare const removeLineItems: MaybeContext<BuildRESTFunction<typeof removeLineItems$1> & typeof removeLineItems$1>;
|
|
192
|
+
declare const createOrder: MaybeContext<BuildRESTFunction<typeof createOrder$1> & typeof createOrder$1>;
|
|
193
|
+
declare const markCheckoutAsCompletedAndRedirectToUrl: MaybeContext<BuildRESTFunction<typeof markCheckoutAsCompletedAndRedirectToUrl$1> & typeof markCheckoutAsCompletedAndRedirectToUrl$1>;
|
|
194
|
+
declare const markCheckoutAsCompleted: MaybeContext<BuildRESTFunction<typeof markCheckoutAsCompleted$1> & typeof markCheckoutAsCompleted$1>;
|
|
195
|
+
declare const updateLineItemsQuantity: MaybeContext<BuildRESTFunction<typeof updateLineItemsQuantity$1> & typeof updateLineItemsQuantity$1>;
|
|
196
|
+
/**
|
|
197
|
+
* Triggered when an order created from this checkout is
|
|
198
|
+
* successfully paid for or when a checkout is marked as completed.
|
|
199
|
+
*/
|
|
200
|
+
declare const onCheckoutCompleted: BuildEventDefinition<typeof onCheckoutCompleted$1>;
|
|
201
|
+
/**
|
|
202
|
+
* Triggered when a checkout is created.
|
|
203
|
+
*/
|
|
204
|
+
declare const onCheckoutCreated: BuildEventDefinition<typeof onCheckoutCreated$1>;
|
|
205
|
+
/**
|
|
206
|
+
* Triggered when a checkout is updated.
|
|
207
|
+
*/
|
|
208
|
+
declare const onCheckoutUpdated: BuildEventDefinition<typeof onCheckoutUpdated$1>;
|
|
209
|
+
|
|
210
|
+
export { AddToCheckoutOptions, AddToCheckoutResponse, Checkout, CheckoutCompletedEnvelope, CheckoutCreatedEnvelope, CheckoutUpdatedEnvelope, CreateCheckoutOptions, CreateOrderOptions, CreateOrderResponse, GetCheckoutByCartIdResponse, GetCheckoutURLResponse, LineItemQuantityUpdate, RawHttpResponse, RemoveCouponResponse, RemoveGiftCardResponse, RemoveLineItemsResponse, RemoveOverrideCheckoutUrlResponse, UpdateCheckout, UpdateCheckoutOptions, UpdateLineItemsQuantityResponse, addToCheckout, createCheckout, createOrder, getCheckout, getCheckoutByCartId, getCheckoutUrl, markCheckoutAsCompleted, markCheckoutAsCompletedAndRedirectToUrl, onCheckoutCompleted, onCheckoutCreated, onCheckoutUpdated, removeCoupon, removeGiftCard, removeLineItems, removeOverrideCheckoutUrl, updateCheckout, updateLineItemsQuantity };
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { C as CreateCheckoutOptions, a as Checkout, G as GetCheckoutByCartIdResponse, b as GetCheckoutURLResponse, U as UpdateCheckout, c as UpdateCheckoutOptions, R as RemoveCouponResponse, d as RemoveGiftCardResponse, e as RemoveOverrideCheckoutUrlResponse, A as AddToCheckoutOptions, f as AddToCheckoutResponse, g as RemoveLineItemsResponse, h as CreateOrderOptions, i as CreateOrderResponse, j as RawHttpResponse, L as LineItemQuantityUpdate, k as UpdateLineItemsQuantityResponse, l as CheckoutCompletedEnvelope, m as CheckoutCreatedEnvelope, n as CheckoutUpdatedEnvelope } from './ecom-v1-checkout-checkout.universal-DEDRvPML.js';
|
|
3
|
+
export { cT as ActionEvent, b_ as AddToCheckoutRequest, bs as AdditionalFee, x as AdditionalFeeSource, cv as Address, cw as AddressAddressLine1OptionsOneOf, aB as AddressLocation, ay as AddressWithContact, bi as AggregatedTaxBreakdown, az as ApiAddress, aO as ApplicableLineItems, a$ as ApplicationError, cF as AppliedCoupon, b6 as AppliedDiscount, b7 as AppliedDiscountDiscountSourceOneOf, bh as AutoTaxFallbackCalculationDetails, cX as BaseEventMetadata, cL as BillingInfo, aU as BuyerInfo, aV as BuyerInfoIdOneOf, aX as CalculationErrors, aY as CalculationErrorsShippingCalculationErrorOneOf, aM as Carrier, b4 as CarrierError, b3 as CarrierErrors, aQ as CarrierServiceOption, ap as CatalogOverrideFields, _ as CatalogReference, cJ as ChannelInfo, X as ChannelInfoChannelType, w as ChannelType, bD as Charge, cq as ChargeDetails, r as ChargeType, ce as CheckoutMarkedAsCompleted, a9 as Color, aD as CommonVatId, p as CommonVatType, bt as ConversionInfo, b8 as Coupon, bF as CreateCheckoutRequest, bK as CreateCheckoutResponse, cZ as CreateOrderAndChargeOptions, c7 as CreateOrderAndChargeRequest, c8 as CreateOrderAndChargeResponse, c9 as CreateOrderAndChargeResponseIdOneOf, c0 as CreateOrderRequest, c1 as CreateOrderResponseIdOneOf, bj as CreatedBy, bk as CreatedByIdOneOf, bA as CustomContentReference, bd as CustomField, bG as CustomLineItem, bz as CustomSettings, cp as CustomTextFieldSelection, ci as DeleteCheckoutRequest, cj as DeleteCheckoutResponse, aL as DeliveryAllocation, aG as DeliveryLogistics, aI as DeliveryTimeSlot, al as Description, a4 as DescriptionLine, a6 as DescriptionLineDescriptionLineValueOneOf, a7 as DescriptionLineName, D as DescriptionLineType, a5 as DescriptionLineValueOneOf, aZ as Details, a_ as DetailsKindOneOf, cI as Discount, Q as DiscountDiscountType, ba as DiscountRule, bb as DiscountRuleName, t as DiscountType, cN as DomainEvent, cO as DomainEventBodyOneOf, c3 as DoublePaymentErrorData, c4 as DoublePaymentErrorDataIdOneOf, cM as Empty, cP as EntityCreatedEvent, cS as EntityDeletedEvent, cR as EntityUpdatedEvent, cY as EventMetadata, at as ExtendedFields, bB as ExternalReference, v as FallbackReason, b1 as FieldViolation, F as FileType, aa as FocalPoint, aj as FreeTrialPeriod, aC as FullAddressContactDetails, cx as FullName, bR as GetCheckoutByCartIdRequest, cg as GetCheckoutPaymentSettingsRequest, ch as GetCheckoutPaymentSettingsResponse, E as GetCheckoutPaymentSettingsResponsePaymentOption, bN as GetCheckoutRequest, bO as GetCheckoutResponse, bU as GetCheckoutURLRequest, bP as GetCheckoutWithAllExtendedFieldsRequest, bQ as GetCheckoutWithAllExtendedFieldsResponse, bS as GetWixCheckoutURLRequest, bT as GetWixCheckoutURLResponse, b5 as GiftCard, ae as Group, cb as HeadersEntry, cV as IdentificationData, cW as IdentificationDataIdOneOf, H as IdentityType, bp as InvalidMembership, ab as ItemAvailabilityInfo, I as ItemAvailabilityStatus, ax as ItemModifier, a1 as ItemTaxFullDetails, af as ItemType, o as ItemTypeItemType, ag as ItemTypeItemTypeDataOneOf, J as JurisdictionType, Z as LineItem, bc as LineItemDiscount, K as LineItemType, M as ManualCalculationReason, ca as MarkCheckoutAsCompletedAndRedirectToUrlRequest, cc as MarkCheckoutAsCompletedRequest, cd as MarkCheckoutAsCompletedResponse, cs as MediaItem, O as MediaItemType, bm as Membership, bn as MembershipName, bl as MembershipOptions, bo as MembershipPaymentCredits, b9 as MerchantDiscount, bJ as MerchantDiscountInput, cU as MessageEnvelope, av as ModifierGroup, a0 as MultiCurrencyPrice, z as NameInLineItem, N as NameInOther, co as OptionSelection, bx as Other, aT as OtherCharge, c2 as PaymentErrorResponseData, aq as PaymentOption, P as PaymentOptionType, ac as PhysicalProperties, cE as PickupAddress, aH as PickupDetails, q as PickupMethod, a8 as PlainTextValue, au as Policy, ao as PriceDescription, aW as PriceSummary, cr as ProductDetails, $ as ProductName, u as RateType, c5 as RedeemErrorData, aN as Region, bX as RemoveCouponRequest, bY as RemoveGiftCardRequest, b$ as RemoveLineItemsRequest, bZ as RemoveOverrideCheckoutUrlRequest, cQ as RestoreInfo, s as RuleType, ad as Scope, am as SecuredMedia, aF as SelectedCarrierServiceOption, aK as SelectedCarrierServiceOptionOtherCharge, aJ as SelectedCarrierServiceOptionPrices, br as SelectedMembership, bq as SelectedMemberships, an as ServiceProperties, y as Severity, cC as ShipmentDetails, bL as ShippingCalculationErrorData, bM as ShippingCalculationErrorDataShippingCalculationErrorOneOf, aE as ShippingInfo, aR as ShippingOption, aS as ShippingPrice, aP as ShippingRegion, cu as StoreSettings, cy as Street, aA as StreetAddress, cl as Subscription, bC as SubscriptionCharges, ck as SubscriptionCreated, S as SubscriptionFrequency, ah as SubscriptionOptionInfo, ai as SubscriptionSettings, B as SuggestedFix, b2 as SystemError, bv as Target, by as TargetLineItem, bw as TargetTargetTypeOneOf, a3 as TaxBreakdown, bf as TaxCalculationDetails, bg as TaxCalculationDetailsCalculationDetailsOneOf, a2 as TaxRateBreakdown, be as TaxSummary, ar as TaxableAddress, as as TaxableAddressTaxableAddressDataOneOf, T as TaxableAddressType, ak as Title, ct as Totals, aw as TranslatableString, bV as UpdateCheckoutRequest, bW as UpdateCheckoutResponse, cf as UpdateLineItemsQuantityRequest, bE as UpdatedCheckoutMessage, cm as V1BuyerInfo, cG as V1CustomField, bI as V1ItemModifier, cn as V1LineItem, bH as V1ModifierGroup, cD as V1PickupDetails, cA as V1ShippingInfo, cB as V1ShippingInfoDetailsOneOf, cH as V1SubscriptionOptionInfo, cK as V1SubscriptionSettings, b0 as ValidationError, cz as VatId, V as VatType, bu as Violation, c6 as ViolationsList, Y as WebhookIdentityType, W as WeightUnit } from './ecom-v1-checkout-checkout.universal-DEDRvPML.js';
|
|
4
|
+
|
|
5
|
+
declare function createCheckout$1(httpClient: HttpClient): CreateCheckoutSignature;
|
|
6
|
+
interface CreateCheckoutSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a checkout.
|
|
9
|
+
*
|
|
10
|
+
* A checkout must include at least 1 item in `lineItems` or `customLineItems`.
|
|
11
|
+
*
|
|
12
|
+
* If passing `checkoutInfo.customFields`, then `checkoutInfo.customFields.value` is a required field.
|
|
13
|
+
* @param - Checkout creation options.
|
|
14
|
+
* @returns Newly created checkout.
|
|
15
|
+
*/
|
|
16
|
+
(options?: CreateCheckoutOptions | undefined): Promise<Checkout>;
|
|
17
|
+
}
|
|
18
|
+
declare function getCheckout$1(httpClient: HttpClient): GetCheckoutSignature;
|
|
19
|
+
interface GetCheckoutSignature {
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves a checkout.
|
|
22
|
+
* @param - Checkout ID.
|
|
23
|
+
* @returns Retrieved checkout.
|
|
24
|
+
*/
|
|
25
|
+
(_id: string): Promise<Checkout>;
|
|
26
|
+
}
|
|
27
|
+
declare function getCheckoutByCartId$1(httpClient: HttpClient): GetCheckoutByCartIdSignature;
|
|
28
|
+
interface GetCheckoutByCartIdSignature {
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves the checkout associated with a specified cart.
|
|
31
|
+
* @param - Cart ID.
|
|
32
|
+
*/
|
|
33
|
+
(_id: string): Promise<GetCheckoutByCartIdResponse>;
|
|
34
|
+
}
|
|
35
|
+
declare function getCheckoutUrl$1(httpClient: HttpClient): GetCheckoutUrlSignature;
|
|
36
|
+
interface GetCheckoutUrlSignature {
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the checkout page URL of a specified checkout.
|
|
39
|
+
*
|
|
40
|
+
* By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page.
|
|
41
|
+
* However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`.
|
|
42
|
+
* @param - Checkout ID.
|
|
43
|
+
*/
|
|
44
|
+
(_id: string): Promise<GetCheckoutURLResponse>;
|
|
45
|
+
}
|
|
46
|
+
declare function updateCheckout$1(httpClient: HttpClient): UpdateCheckoutSignature;
|
|
47
|
+
interface UpdateCheckoutSignature {
|
|
48
|
+
/**
|
|
49
|
+
* Updates a checkout.
|
|
50
|
+
*
|
|
51
|
+
* Use this method to update checkout fields such as billing and shipping info, or to add a coupon code or gift card.
|
|
52
|
+
*
|
|
53
|
+
* To update a checkout's `lineItems`, `completed` status, or to remove coupons and gift cards, see these methods:
|
|
54
|
+
* + Add to Checkout: Add line items to the checkout.
|
|
55
|
+
* + Update Line Items Quantity: Update the quantity of 1 or more line items in the checkout.
|
|
56
|
+
* + Remove Line Items: Remove a line item from the checkout.
|
|
57
|
+
* + Mark Checkout As Completed: To update `completed` to `true` if the checkout was completed through a non-Wix orders or payments system.
|
|
58
|
+
* + Remove Coupon: To remove an applied coupon from the checkout.
|
|
59
|
+
* + Remove Gift Card: To remove an applied gift card from the checkout.
|
|
60
|
+
*
|
|
61
|
+
* >**Notes:**
|
|
62
|
+
* > + If nothing is passed in the request, the call will fail.
|
|
63
|
+
* > + The `checkout.buyerInfo.email` may not be removed once it is set.
|
|
64
|
+
* @param - Checkout ID.
|
|
65
|
+
* @param - Checkout update options.
|
|
66
|
+
* @returns Updated checkout.
|
|
67
|
+
*/
|
|
68
|
+
(_id: string, checkout: UpdateCheckout, options?: UpdateCheckoutOptions | undefined): Promise<Checkout>;
|
|
69
|
+
}
|
|
70
|
+
declare function removeCoupon$1(httpClient: HttpClient): RemoveCouponSignature;
|
|
71
|
+
interface RemoveCouponSignature {
|
|
72
|
+
/**
|
|
73
|
+
* Removes the coupon from a specified checkout.
|
|
74
|
+
* @param - ID of the checkout to remove the coupon from.
|
|
75
|
+
*/
|
|
76
|
+
(_id: string): Promise<RemoveCouponResponse>;
|
|
77
|
+
}
|
|
78
|
+
declare function removeGiftCard$1(httpClient: HttpClient): RemoveGiftCardSignature;
|
|
79
|
+
interface RemoveGiftCardSignature {
|
|
80
|
+
/**
|
|
81
|
+
* Removes the gift card from a specified checkout.
|
|
82
|
+
*
|
|
83
|
+
* A checkout can only hold 1 gift card.
|
|
84
|
+
* @param - ID of the checkout to remove the gift card from.
|
|
85
|
+
*/
|
|
86
|
+
(_id: string): Promise<RemoveGiftCardResponse>;
|
|
87
|
+
}
|
|
88
|
+
declare function removeOverrideCheckoutUrl$1(httpClient: HttpClient): RemoveOverrideCheckoutUrlSignature;
|
|
89
|
+
interface RemoveOverrideCheckoutUrlSignature {
|
|
90
|
+
/**
|
|
91
|
+
* Removes the `overrideCheckoutUrl` from a specified checkout.
|
|
92
|
+
*
|
|
93
|
+
* When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard
|
|
94
|
+
* Wix checkout page URL.
|
|
95
|
+
* @param - ID of the checkout to remove the override checkout url from.
|
|
96
|
+
*/
|
|
97
|
+
(_id: string): Promise<RemoveOverrideCheckoutUrlResponse>;
|
|
98
|
+
}
|
|
99
|
+
declare function addToCheckout$1(httpClient: HttpClient): AddToCheckoutSignature;
|
|
100
|
+
interface AddToCheckoutSignature {
|
|
101
|
+
/**
|
|
102
|
+
* Adds catalog line items and/or custom line items to a checkout.
|
|
103
|
+
*
|
|
104
|
+
* When adding catalog ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)) items
|
|
105
|
+
* to a checkout, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
|
|
106
|
+
* @param - Checkout ID.
|
|
107
|
+
* @param - Items to be added to checkout.
|
|
108
|
+
*/
|
|
109
|
+
(_id: string, options?: AddToCheckoutOptions | undefined): Promise<AddToCheckoutResponse>;
|
|
110
|
+
}
|
|
111
|
+
declare function removeLineItems$1(httpClient: HttpClient): RemoveLineItemsSignature;
|
|
112
|
+
interface RemoveLineItemsSignature {
|
|
113
|
+
/**
|
|
114
|
+
* Removes line items from the specified checkout.
|
|
115
|
+
* @param - ID of the checkout to remove line items from.
|
|
116
|
+
* @param - IDs of the line items to remove from the checkout.
|
|
117
|
+
*
|
|
118
|
+
* To find the IDs of the checkout line items you'd like to remove,
|
|
119
|
+
* pass the checkout ID to Get Checkout and look for the IDs under
|
|
120
|
+
* `lineItems`.
|
|
121
|
+
*/
|
|
122
|
+
(_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse>;
|
|
123
|
+
}
|
|
124
|
+
declare function createOrder$1(httpClient: HttpClient): CreateOrderSignature;
|
|
125
|
+
interface CreateOrderSignature {
|
|
126
|
+
/**
|
|
127
|
+
* Creates an order from a specified checkout.
|
|
128
|
+
*
|
|
129
|
+
* For an order to be created from a checkout, the following requirements must be met:
|
|
130
|
+
* + A checkout cannot have calculation errors. Pass the checkout ID to Get Checkout and review the `calculationErrors` field.
|
|
131
|
+
* + A checkout must have at least 1 line item or custom line item.
|
|
132
|
+
* + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`.
|
|
133
|
+
* + If there is a payment to be made, meaning that `priceSummary.total` is greater than `0`, the `billingInfo.address` field are required.
|
|
134
|
+
* + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields are required.
|
|
135
|
+
* + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field are required.
|
|
136
|
+
* @param - Checkout ID.
|
|
137
|
+
* @param - Additional order creation options.
|
|
138
|
+
*/
|
|
139
|
+
(_id: string, options?: CreateOrderOptions | undefined): Promise<CreateOrderResponse>;
|
|
140
|
+
}
|
|
141
|
+
declare function markCheckoutAsCompletedAndRedirectToUrl$1(httpClient: HttpClient): MarkCheckoutAsCompletedAndRedirectToUrlSignature;
|
|
142
|
+
interface MarkCheckoutAsCompletedAndRedirectToUrlSignature {
|
|
143
|
+
/**
|
|
144
|
+
* Marks a checkout as completed and redirects to a specified URL.
|
|
145
|
+
* @param - Server-signed JWT token with required information to complete checkout
|
|
146
|
+
*/
|
|
147
|
+
(token: string): Promise<RawHttpResponse>;
|
|
148
|
+
}
|
|
149
|
+
declare function markCheckoutAsCompleted$1(httpClient: HttpClient): MarkCheckoutAsCompletedSignature;
|
|
150
|
+
interface MarkCheckoutAsCompletedSignature {
|
|
151
|
+
/**
|
|
152
|
+
* Sets `completed` to `true` to mark a checkout as completed.
|
|
153
|
+
*
|
|
154
|
+
* When an order is completed through Wix, the `completed` field in the associated checkout object
|
|
155
|
+
* will automatically be updated to `true`. If an order is completed through a separate system,
|
|
156
|
+
* use this method to manually mark the checkout as completed.
|
|
157
|
+
* @param - Checkout ID.
|
|
158
|
+
*/
|
|
159
|
+
(_id: string): Promise<void>;
|
|
160
|
+
}
|
|
161
|
+
declare function updateLineItemsQuantity$1(httpClient: HttpClient): UpdateLineItemsQuantitySignature;
|
|
162
|
+
interface UpdateLineItemsQuantitySignature {
|
|
163
|
+
/**
|
|
164
|
+
* Updates the quantity of one or more line items in a checkout.
|
|
165
|
+
*
|
|
166
|
+
* This method is only for updating the quantity of line items. To entirely remove a line item from
|
|
167
|
+
* the checkout, use the Remove Line Items method.
|
|
168
|
+
* To add a new line item to the checkout, use the Add to Checkout method.
|
|
169
|
+
*
|
|
170
|
+
* This method checks the amount of stock remaining for this line item. If the specified `quantity`
|
|
171
|
+
* is greater than the remaining stock, then the `quantity` returned in the response is the total amount
|
|
172
|
+
* of remaining stock.
|
|
173
|
+
* @param - Checkout ID.
|
|
174
|
+
* @param - Line item info to update.
|
|
175
|
+
*/
|
|
176
|
+
(_id: string, lineItems: LineItemQuantityUpdate[]): Promise<UpdateLineItemsQuantityResponse>;
|
|
177
|
+
}
|
|
178
|
+
declare const onCheckoutCompleted$1: EventDefinition<CheckoutCompletedEnvelope, "wix.ecom.v1.checkout_completed">;
|
|
179
|
+
declare const onCheckoutCreated$1: EventDefinition<CheckoutCreatedEnvelope, "wix.ecom.v1.checkout_created">;
|
|
180
|
+
declare const onCheckoutUpdated$1: EventDefinition<CheckoutUpdatedEnvelope, "wix.ecom.v1.checkout_updated">;
|
|
181
|
+
|
|
182
|
+
declare const createCheckout: MaybeContext<BuildRESTFunction<typeof createCheckout$1> & typeof createCheckout$1>;
|
|
183
|
+
declare const getCheckout: MaybeContext<BuildRESTFunction<typeof getCheckout$1> & typeof getCheckout$1>;
|
|
184
|
+
declare const getCheckoutByCartId: MaybeContext<BuildRESTFunction<typeof getCheckoutByCartId$1> & typeof getCheckoutByCartId$1>;
|
|
185
|
+
declare const getCheckoutUrl: MaybeContext<BuildRESTFunction<typeof getCheckoutUrl$1> & typeof getCheckoutUrl$1>;
|
|
186
|
+
declare const updateCheckout: MaybeContext<BuildRESTFunction<typeof updateCheckout$1> & typeof updateCheckout$1>;
|
|
187
|
+
declare const removeCoupon: MaybeContext<BuildRESTFunction<typeof removeCoupon$1> & typeof removeCoupon$1>;
|
|
188
|
+
declare const removeGiftCard: MaybeContext<BuildRESTFunction<typeof removeGiftCard$1> & typeof removeGiftCard$1>;
|
|
189
|
+
declare const removeOverrideCheckoutUrl: MaybeContext<BuildRESTFunction<typeof removeOverrideCheckoutUrl$1> & typeof removeOverrideCheckoutUrl$1>;
|
|
190
|
+
declare const addToCheckout: MaybeContext<BuildRESTFunction<typeof addToCheckout$1> & typeof addToCheckout$1>;
|
|
191
|
+
declare const removeLineItems: MaybeContext<BuildRESTFunction<typeof removeLineItems$1> & typeof removeLineItems$1>;
|
|
192
|
+
declare const createOrder: MaybeContext<BuildRESTFunction<typeof createOrder$1> & typeof createOrder$1>;
|
|
193
|
+
declare const markCheckoutAsCompletedAndRedirectToUrl: MaybeContext<BuildRESTFunction<typeof markCheckoutAsCompletedAndRedirectToUrl$1> & typeof markCheckoutAsCompletedAndRedirectToUrl$1>;
|
|
194
|
+
declare const markCheckoutAsCompleted: MaybeContext<BuildRESTFunction<typeof markCheckoutAsCompleted$1> & typeof markCheckoutAsCompleted$1>;
|
|
195
|
+
declare const updateLineItemsQuantity: MaybeContext<BuildRESTFunction<typeof updateLineItemsQuantity$1> & typeof updateLineItemsQuantity$1>;
|
|
196
|
+
/**
|
|
197
|
+
* Triggered when an order created from this checkout is
|
|
198
|
+
* successfully paid for or when a checkout is marked as completed.
|
|
199
|
+
*/
|
|
200
|
+
declare const onCheckoutCompleted: BuildEventDefinition<typeof onCheckoutCompleted$1>;
|
|
201
|
+
/**
|
|
202
|
+
* Triggered when a checkout is created.
|
|
203
|
+
*/
|
|
204
|
+
declare const onCheckoutCreated: BuildEventDefinition<typeof onCheckoutCreated$1>;
|
|
205
|
+
/**
|
|
206
|
+
* Triggered when a checkout is updated.
|
|
207
|
+
*/
|
|
208
|
+
declare const onCheckoutUpdated: BuildEventDefinition<typeof onCheckoutUpdated$1>;
|
|
209
|
+
|
|
210
|
+
export { AddToCheckoutOptions, AddToCheckoutResponse, Checkout, CheckoutCompletedEnvelope, CheckoutCreatedEnvelope, CheckoutUpdatedEnvelope, CreateCheckoutOptions, CreateOrderOptions, CreateOrderResponse, GetCheckoutByCartIdResponse, GetCheckoutURLResponse, LineItemQuantityUpdate, RawHttpResponse, RemoveCouponResponse, RemoveGiftCardResponse, RemoveLineItemsResponse, RemoveOverrideCheckoutUrlResponse, UpdateCheckout, UpdateCheckoutOptions, UpdateLineItemsQuantityResponse, addToCheckout, createCheckout, createOrder, getCheckout, getCheckoutByCartId, getCheckoutUrl, markCheckoutAsCompleted, markCheckoutAsCompletedAndRedirectToUrl, onCheckoutCompleted, onCheckoutCreated, onCheckoutUpdated, removeCoupon, removeGiftCard, removeLineItems, removeOverrideCheckoutUrl, updateCheckout, updateLineItemsQuantity };
|