@wix/auto_sdk_ecom_cart 1.0.13 → 1.0.14
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/src/ecom-v1-cart-cart.types.d.ts → ecom-v1-cart-cart.universal-BIIZxJYL.d.mts} +504 -269
- package/build/{internal/cjs/src/ecom-v1-cart-cart.types.d.ts → ecom-v1-cart-cart.universal-BIIZxJYL.d.ts} +504 -269
- package/build/index.d.mts +149 -0
- package/build/index.d.ts +149 -0
- package/build/index.js +1938 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +1875 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/ecom-v1-cart-cart.types.d.ts → ecom-v1-cart-cart.universal-CJdmyIWv.d.mts} +668 -269
- package/build/{es/src/ecom-v1-cart-cart.types.d.ts → internal/ecom-v1-cart-cart.universal-CJdmyIWv.d.ts} +668 -269
- package/build/internal/index.d.mts +160 -0
- package/build/internal/index.d.ts +160 -0
- package/build/internal/index.js +1938 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +1875 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +2050 -0
- package/build/internal/meta.d.ts +2050 -0
- package/build/internal/meta.js +1027 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +989 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/meta.d.mts +2050 -0
- package/build/meta.d.ts +2050 -0
- package/build/meta.js +1027 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +989 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- 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-cart-cart.context.d.ts +0 -29
- package/build/cjs/src/ecom-v1-cart-cart.context.js +0 -59
- package/build/cjs/src/ecom-v1-cart-cart.context.js.map +0 -1
- package/build/cjs/src/ecom-v1-cart-cart.http.d.ts +0 -60
- package/build/cjs/src/ecom-v1-cart-cart.http.js +0 -818
- package/build/cjs/src/ecom-v1-cart-cart.http.js.map +0 -1
- package/build/cjs/src/ecom-v1-cart-cart.meta.d.ts +0 -46
- package/build/cjs/src/ecom-v1-cart-cart.meta.js +0 -256
- package/build/cjs/src/ecom-v1-cart-cart.meta.js.map +0 -1
- package/build/cjs/src/ecom-v1-cart-cart.public.d.ts +0 -129
- package/build/cjs/src/ecom-v1-cart-cart.public.js +0 -227
- package/build/cjs/src/ecom-v1-cart-cart.public.js.map +0 -1
- package/build/cjs/src/ecom-v1-cart-cart.types.js +0 -255
- package/build/cjs/src/ecom-v1-cart-cart.types.js.map +0 -1
- package/build/cjs/src/ecom-v1-cart-cart.universal.d.ts +0 -3263
- package/build/cjs/src/ecom-v1-cart-cart.universal.js +0 -1192
- package/build/cjs/src/ecom-v1-cart-cart.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-cart-cart.context.d.ts +0 -29
- package/build/es/src/ecom-v1-cart-cart.context.js +0 -31
- package/build/es/src/ecom-v1-cart-cart.context.js.map +0 -1
- package/build/es/src/ecom-v1-cart-cart.http.d.ts +0 -60
- package/build/es/src/ecom-v1-cart-cart.http.js +0 -803
- package/build/es/src/ecom-v1-cart-cart.http.js.map +0 -1
- package/build/es/src/ecom-v1-cart-cart.meta.d.ts +0 -46
- package/build/es/src/ecom-v1-cart-cart.meta.js +0 -218
- package/build/es/src/ecom-v1-cart-cart.meta.js.map +0 -1
- package/build/es/src/ecom-v1-cart-cart.public.d.ts +0 -129
- package/build/es/src/ecom-v1-cart-cart.public.js +0 -187
- package/build/es/src/ecom-v1-cart-cart.public.js.map +0 -1
- package/build/es/src/ecom-v1-cart-cart.types.js +0 -252
- package/build/es/src/ecom-v1-cart-cart.types.js.map +0 -1
- package/build/es/src/ecom-v1-cart-cart.universal.d.ts +0 -3263
- package/build/es/src/ecom-v1-cart-cart.universal.js +0 -1154
- package/build/es/src/ecom-v1-cart-cart.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-cart-cart.context.d.ts +0 -31
- package/build/internal/cjs/src/ecom-v1-cart-cart.context.js +0 -59
- package/build/internal/cjs/src/ecom-v1-cart-cart.context.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.http.d.ts +0 -60
- package/build/internal/cjs/src/ecom-v1-cart-cart.http.js +0 -818
- package/build/internal/cjs/src/ecom-v1-cart-cart.http.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.meta.d.ts +0 -46
- package/build/internal/cjs/src/ecom-v1-cart-cart.meta.js +0 -256
- package/build/internal/cjs/src/ecom-v1-cart-cart.meta.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.public.d.ts +0 -138
- package/build/internal/cjs/src/ecom-v1-cart-cart.public.js +0 -227
- package/build/internal/cjs/src/ecom-v1-cart-cart.public.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.types.js +0 -255
- package/build/internal/cjs/src/ecom-v1-cart-cart.types.js.map +0 -1
- package/build/internal/cjs/src/ecom-v1-cart-cart.universal.d.ts +0 -3457
- package/build/internal/cjs/src/ecom-v1-cart-cart.universal.js +0 -1192
- package/build/internal/cjs/src/ecom-v1-cart-cart.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-cart-cart.context.d.ts +0 -31
- package/build/internal/es/src/ecom-v1-cart-cart.context.js +0 -31
- package/build/internal/es/src/ecom-v1-cart-cart.context.js.map +0 -1
- package/build/internal/es/src/ecom-v1-cart-cart.http.d.ts +0 -60
- package/build/internal/es/src/ecom-v1-cart-cart.http.js +0 -803
- package/build/internal/es/src/ecom-v1-cart-cart.http.js.map +0 -1
- package/build/internal/es/src/ecom-v1-cart-cart.meta.d.ts +0 -46
- package/build/internal/es/src/ecom-v1-cart-cart.meta.js +0 -218
- package/build/internal/es/src/ecom-v1-cart-cart.meta.js.map +0 -1
- package/build/internal/es/src/ecom-v1-cart-cart.public.d.ts +0 -138
- package/build/internal/es/src/ecom-v1-cart-cart.public.js +0 -187
- package/build/internal/es/src/ecom-v1-cart-cart.public.js.map +0 -1
- package/build/internal/es/src/ecom-v1-cart-cart.types.js +0 -252
- package/build/internal/es/src/ecom-v1-cart-cart.types.js.map +0 -1
- package/build/internal/es/src/ecom-v1-cart-cart.universal.d.ts +0 -3457
- package/build/internal/es/src/ecom-v1-cart-cart.universal.js +0 -1154
- package/build/internal/es/src/ecom-v1-cart-cart.universal.js.map +0 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { C as CreateCartOptions, a as Cart, U as UpdateCartOptions, A as AddToCartOptions, b as AddToCartResponse, R as RemoveLineItemsResponse, c as CreateCheckoutOptions, d as CreateCheckoutResponse, e as RemoveCouponResponse, L as LineItemQuantityUpdate, f as UpdateLineItemsQuantityResponse, E as EstimateTotalsOptions, g as EstimateTotalsResponse, h as RemoveBusinessLocationResponse } from './ecom-v1-cart-cart.universal-BIIZxJYL.mjs';
|
|
3
|
+
export { bO as ActionEvent, bY as AddToCartRequest, aG as AddToCurrentCartAndEstimateTotalsRequest, aF as AddToCurrentCartRequest, bv as AdditionalFee, q as AdditionalFeeSource, at as Address, av as AddressLocation, as as AddressWithContact, aV as AggregatedTaxBreakdown, b5 as ApplicableLineItems, aU as ApplicationError, ba as AppliedDiscount, bb as AppliedDiscountDiscountSourceOneOf, o as AppliedDiscountDiscountType, aT as AutoTaxFallbackCalculationDetails, c5 as BaseEventMetadata, ak as BuyerInfo, al as BuyerInfoIdOneOf, aJ as CalculatedLineItem, bh as CalculationErrors, bi as CalculationErrorsShippingCalculationErrorOneOf, b3 as Carrier, bp as CarrierError, bo as CarrierErrors, b6 as CarrierServiceOption, c9 as CartCreatedEnvelope, c7 as CartDeletedEnvelope, am as CartDiscount, an as CartDiscountDiscountSourceOneOf, c8 as CartUpdatedEnvelope, ab as CatalogOverrideFields, x as CatalogReference, u as ChannelType, n as ChargeType, Q as Color, ao as Coupon, bS as CreateCartRequest, bT as CreateCartResponse, bC as CreateCheckoutFromCurrentCartRequest, b_ as CreateCheckoutRequest, aD as CustomLineItem, c2 as DeleteCartRequest, bH as DeleteCartResponse, bG as DeleteCurrentCartRequest, b2 as DeliveryAllocation, aZ as DeliveryLogistics, a$ as DeliveryTimeSlot, a6 as Description, B as DescriptionLine, H as DescriptionLineDescriptionLineValueOneOf, K as DescriptionLineName, D as DescriptionLineType, G as DescriptionLineValueOneOf, bj as Details, bk as DetailsKindOneOf, aq as DiscountRule, ar as DiscountRuleName, j as DiscountType, bI as DomainEvent, bJ as DomainEventBodyOneOf, c3 as Empty, bK as EntityCreatedEvent, bN as EntityDeletedEvent, bM as EntityUpdatedEvent, bF as EstimateCurrentCartTotalsRequest, c1 as EstimateTotalsRequest, c6 as EventMetadata, af as ExtendedFields, l as FallbackReason, bm as FieldViolation, F as FileType, X as FocalPoint, a4 as FreeTrialPeriod, aw as FullAddressContactDetails, bW as GetCartByCheckoutIdRequest, bX as GetCartByCheckoutIdResponse, bU as GetCartRequest, bV as GetCartResponse, az as GetCurrentCartRequest, aA as GetCurrentCartResponse, aP as GiftCard, $ as Group, aI as HostSelectedMembership, bQ as IdentificationData, bR as IdentificationDataIdOneOf, bu as InvalidMembership, Y as ItemAvailabilityInfo, I as ItemAvailabilityStatus, aj as ItemModifier, aL as ItemTaxFullDetails, a0 as ItemType, i as ItemTypeItemType, a1 as ItemTypeItemTypeDataOneOf, J as JurisdictionType, w as LineItem, bg as LineItemDiscount, aK as LineItemPricesData, M as ManualCalculationReason, br as Membership, bs as MembershipName, bq as MembershipOptions, bt as MembershipPaymentCredits, ap as MerchantDiscount, aC as MerchantDiscountInput, bP as MessageEnvelope, ah as ModifierGroup, z as MultiCurrencyPrice, s as NameInLineItem, N as NameInOther, bz as Other, b9 as OtherCharge, ac as PaymentOption, P as PaymentOptionType, Z as PhysicalProperties, a_ as PickupDetails, m as PickupMethod, O as PlainTextValue, ag as Policy, a9 as PriceDescription, aO as PriceSummary, y as ProductName, k as RateType, b4 as Region, c4 as RemoveBusinessLocationRequest, bD as RemoveCouponFromCurrentCartRequest, b$ as RemoveCouponRequest, bB as RemoveLineItemsFromCurrentCartRequest, bZ as RemoveLineItemsRequest, bL as RestoreInfo, p as RuleType, _ as Scope, a7 as SecuredMedia, aY as SelectedCarrierServiceOption, b1 as SelectedCarrierServiceOptionOtherCharge, b0 as SelectedCarrierServiceOptionPrices, aa as SelectedMembership, aH as SelectedMemberships, ay as SelectedShippingOption, a8 as ServiceProperties, r as Severity, aW as ShippingInformation, b7 as ShippingOption, b8 as ShippingPrice, aX as ShippingRegion, au as StreetAddress, S as SubscriptionFrequency, a2 as SubscriptionOptionInfo, a3 as SubscriptionSettings, t as SuggestedFix, bn as SystemError, bx as Target, bA as TargetLineItem, by as TargetTargetTypeOneOf, aN as TaxBreakdown, aR as TaxCalculationDetails, aS as TaxCalculationDetailsCalculationDetailsOneOf, aM as TaxRateBreakdown, aQ as TaxSummary, ad as TaxableAddress, ae as TaxableAddressTaxableAddressDataOneOf, T as TaxableAddressType, a5 as Title, ai as TranslatableString, aB as UpdateCartRequest, aE as UpdateCartResponse, bE as UpdateCurrentCartLineItemQuantityRequest, c0 as UpdateLineItemsQuantityRequest, bc as V1Coupon, be as V1DiscountRule, bf as V1DiscountRuleName, bd as V1MerchantDiscount, bl as ValidationError, ax as VatId, V as VatType, bw as Violation, v as WebhookIdentityType, W as WeightUnit } from './ecom-v1-cart-cart.universal-BIIZxJYL.mjs';
|
|
4
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
5
|
+
|
|
6
|
+
declare function createCart$1(httpClient: HttpClient): CreateCartSignature;
|
|
7
|
+
interface CreateCartSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a cart.
|
|
10
|
+
*
|
|
11
|
+
* > **Note:** When adding catalog line items, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
|
|
12
|
+
* @param - Cart creation options.
|
|
13
|
+
* @returns Cart.
|
|
14
|
+
*/
|
|
15
|
+
(options?: CreateCartOptions | undefined): Promise<Cart>;
|
|
16
|
+
}
|
|
17
|
+
declare function updateCart$1(httpClient: HttpClient): UpdateCartSignature;
|
|
18
|
+
interface UpdateCartSignature {
|
|
19
|
+
/**
|
|
20
|
+
* Updates a cart's properties.
|
|
21
|
+
*
|
|
22
|
+
* > **Note:** When updating line items, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
|
|
23
|
+
* @param - Available options to use when updating a cart.
|
|
24
|
+
* @param - ID of the cart to be updated.
|
|
25
|
+
* @returns Updated Cart.
|
|
26
|
+
*/
|
|
27
|
+
(_id: string, options?: UpdateCartOptions | undefined): Promise<Cart>;
|
|
28
|
+
}
|
|
29
|
+
declare function getCart$1(httpClient: HttpClient): GetCartSignature;
|
|
30
|
+
interface GetCartSignature {
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves a cart.
|
|
33
|
+
* @param - Cart ID.
|
|
34
|
+
* @returns Retrieved cart.
|
|
35
|
+
*/
|
|
36
|
+
(_id: string): Promise<Cart>;
|
|
37
|
+
}
|
|
38
|
+
declare function addToCart$1(httpClient: HttpClient): AddToCartSignature;
|
|
39
|
+
interface AddToCartSignature {
|
|
40
|
+
/**
|
|
41
|
+
* Adds 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)) line items to a cart.
|
|
42
|
+
*
|
|
43
|
+
* >**Note:** When adding catalog line items to a cart, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
|
|
44
|
+
* @param - Cart ID.
|
|
45
|
+
* @param - Items to be added to cart.
|
|
46
|
+
*/
|
|
47
|
+
(_id: string, options?: AddToCartOptions | undefined): Promise<AddToCartResponse>;
|
|
48
|
+
}
|
|
49
|
+
declare function removeLineItems$1(httpClient: HttpClient): RemoveLineItemsSignature;
|
|
50
|
+
interface RemoveLineItemsSignature {
|
|
51
|
+
/**
|
|
52
|
+
* Removes line items from a cart.
|
|
53
|
+
* @param - IDs of the line items to remove from the cart.
|
|
54
|
+
* @param - ID of the cart to remove line items from.
|
|
55
|
+
*/
|
|
56
|
+
(_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse>;
|
|
57
|
+
}
|
|
58
|
+
declare function createCheckout$1(httpClient: HttpClient): CreateCheckoutSignature;
|
|
59
|
+
interface CreateCheckoutSignature {
|
|
60
|
+
/**
|
|
61
|
+
* Creates a checkout from a cart.
|
|
62
|
+
*
|
|
63
|
+
* If a checkout for the specified cart already exists, that checkout is
|
|
64
|
+
* updated with any new information from the cart.
|
|
65
|
+
*
|
|
66
|
+
* > **Note:** `channelType` is a required field.
|
|
67
|
+
* @param - Cart ID.
|
|
68
|
+
* @param - Checkout creation options.
|
|
69
|
+
*/
|
|
70
|
+
(_id: string, options?: CreateCheckoutOptions | undefined): Promise<CreateCheckoutResponse>;
|
|
71
|
+
}
|
|
72
|
+
declare function removeCoupon$1(httpClient: HttpClient): RemoveCouponSignature;
|
|
73
|
+
interface RemoveCouponSignature {
|
|
74
|
+
/**
|
|
75
|
+
* Removes the coupon from a cart.
|
|
76
|
+
* @param - Cart ID.
|
|
77
|
+
*/
|
|
78
|
+
(_id: string): Promise<RemoveCouponResponse>;
|
|
79
|
+
}
|
|
80
|
+
declare function updateLineItemsQuantity$1(httpClient: HttpClient): UpdateLineItemsQuantitySignature;
|
|
81
|
+
interface UpdateLineItemsQuantitySignature {
|
|
82
|
+
/**
|
|
83
|
+
* Updates the quantity of one or more line items in a cart.
|
|
84
|
+
*
|
|
85
|
+
* This method is only for updating the quantity of line items.
|
|
86
|
+
* To entirely remove a line item from the cart, use Remove Line Items.
|
|
87
|
+
* To add a new line item to the cart, use Add To Cart.
|
|
88
|
+
*
|
|
89
|
+
* This method checks the amount of stock remaining for this line item.
|
|
90
|
+
* If the specified quantity is greater than the remaining stock,
|
|
91
|
+
* then the quantity returned in the response is the total amount of remaining stock.
|
|
92
|
+
* @param - Cart ID.
|
|
93
|
+
* @param - Line item IDs and their new quantity.
|
|
94
|
+
*/
|
|
95
|
+
(_id: string, lineItems: LineItemQuantityUpdate[]): Promise<UpdateLineItemsQuantityResponse>;
|
|
96
|
+
}
|
|
97
|
+
declare function estimateTotals$1(httpClient: HttpClient): EstimateTotalsSignature;
|
|
98
|
+
interface EstimateTotalsSignature {
|
|
99
|
+
/**
|
|
100
|
+
* Estimates the subtotal and total for current site visitor’s cart.
|
|
101
|
+
*
|
|
102
|
+
* Totals include tax and are based on the selected carrier service, shipping address, and billing information.
|
|
103
|
+
*
|
|
104
|
+
* > **Note:** Not passing any optional parameters will only estimate the cart items price totals.
|
|
105
|
+
* @param - Cart ID.
|
|
106
|
+
* @param - Total estimation options.
|
|
107
|
+
*/
|
|
108
|
+
(_id: string, options?: EstimateTotalsOptions | undefined): Promise<EstimateTotalsResponse>;
|
|
109
|
+
}
|
|
110
|
+
declare function deleteCart$1(httpClient: HttpClient): DeleteCartSignature;
|
|
111
|
+
interface DeleteCartSignature {
|
|
112
|
+
/**
|
|
113
|
+
* Deletes a cart.
|
|
114
|
+
* @param - ID of the cart to delete.
|
|
115
|
+
*/
|
|
116
|
+
(_id: string): Promise<void>;
|
|
117
|
+
}
|
|
118
|
+
declare function removeBusinessLocation$1(httpClient: HttpClient): RemoveBusinessLocationSignature;
|
|
119
|
+
interface RemoveBusinessLocationSignature {
|
|
120
|
+
/**
|
|
121
|
+
* Removes the location associated with a cart.
|
|
122
|
+
* @param - Cart ID.
|
|
123
|
+
*/
|
|
124
|
+
(_id: string): Promise<RemoveBusinessLocationResponse>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
declare const createCart: MaybeContext<BuildRESTFunction<typeof createCart$1> & typeof createCart$1>;
|
|
128
|
+
declare const updateCart: MaybeContext<BuildRESTFunction<typeof updateCart$1> & typeof updateCart$1>;
|
|
129
|
+
declare const getCart: MaybeContext<BuildRESTFunction<typeof getCart$1> & typeof getCart$1>;
|
|
130
|
+
declare const addToCart: MaybeContext<BuildRESTFunction<typeof addToCart$1> & typeof addToCart$1>;
|
|
131
|
+
declare const removeLineItems: MaybeContext<BuildRESTFunction<typeof removeLineItems$1> & typeof removeLineItems$1>;
|
|
132
|
+
declare const createCheckout: MaybeContext<BuildRESTFunction<typeof createCheckout$1> & typeof createCheckout$1>;
|
|
133
|
+
declare const removeCoupon: MaybeContext<BuildRESTFunction<typeof removeCoupon$1> & typeof removeCoupon$1>;
|
|
134
|
+
declare const updateLineItemsQuantity: MaybeContext<BuildRESTFunction<typeof updateLineItemsQuantity$1> & typeof updateLineItemsQuantity$1>;
|
|
135
|
+
declare const estimateTotals: MaybeContext<BuildRESTFunction<typeof estimateTotals$1> & typeof estimateTotals$1>;
|
|
136
|
+
declare const deleteCart: MaybeContext<BuildRESTFunction<typeof deleteCart$1> & typeof deleteCart$1>;
|
|
137
|
+
declare const removeBusinessLocation: MaybeContext<BuildRESTFunction<typeof removeBusinessLocation$1> & typeof removeBusinessLocation$1>;
|
|
138
|
+
/**
|
|
139
|
+
* Triggered when a cart is deleted.
|
|
140
|
+
*/
|
|
141
|
+
declare const onCartDeleted: ReturnType<typeof createEventModule<typeof publicOnCartDeleted>>;
|
|
142
|
+
/** */
|
|
143
|
+
declare const onCartUpdated: ReturnType<typeof createEventModule<typeof publicOnCartUpdated>>;
|
|
144
|
+
/**
|
|
145
|
+
* Triggered when a cart is created.
|
|
146
|
+
*/
|
|
147
|
+
declare const onCartCreated: ReturnType<typeof createEventModule<typeof publicOnCartCreated>>;
|
|
148
|
+
|
|
149
|
+
export { AddToCartOptions, AddToCartResponse, Cart, CreateCartOptions, CreateCheckoutOptions, CreateCheckoutResponse, EstimateTotalsOptions, EstimateTotalsResponse, LineItemQuantityUpdate, RemoveBusinessLocationResponse, RemoveCouponResponse, RemoveLineItemsResponse, UpdateCartOptions, UpdateLineItemsQuantityResponse, addToCart, createCart, createCheckout, deleteCart, estimateTotals, getCart, onCartCreated, onCartDeleted, onCartUpdated, removeBusinessLocation, removeCoupon, removeLineItems, updateCart, updateLineItemsQuantity };
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
+
import { C as CreateCartOptions, a as Cart, U as UpdateCartOptions, A as AddToCartOptions, b as AddToCartResponse, R as RemoveLineItemsResponse, c as CreateCheckoutOptions, d as CreateCheckoutResponse, e as RemoveCouponResponse, L as LineItemQuantityUpdate, f as UpdateLineItemsQuantityResponse, E as EstimateTotalsOptions, g as EstimateTotalsResponse, h as RemoveBusinessLocationResponse } from './ecom-v1-cart-cart.universal-BIIZxJYL.js';
|
|
3
|
+
export { bO as ActionEvent, bY as AddToCartRequest, aG as AddToCurrentCartAndEstimateTotalsRequest, aF as AddToCurrentCartRequest, bv as AdditionalFee, q as AdditionalFeeSource, at as Address, av as AddressLocation, as as AddressWithContact, aV as AggregatedTaxBreakdown, b5 as ApplicableLineItems, aU as ApplicationError, ba as AppliedDiscount, bb as AppliedDiscountDiscountSourceOneOf, o as AppliedDiscountDiscountType, aT as AutoTaxFallbackCalculationDetails, c5 as BaseEventMetadata, ak as BuyerInfo, al as BuyerInfoIdOneOf, aJ as CalculatedLineItem, bh as CalculationErrors, bi as CalculationErrorsShippingCalculationErrorOneOf, b3 as Carrier, bp as CarrierError, bo as CarrierErrors, b6 as CarrierServiceOption, c9 as CartCreatedEnvelope, c7 as CartDeletedEnvelope, am as CartDiscount, an as CartDiscountDiscountSourceOneOf, c8 as CartUpdatedEnvelope, ab as CatalogOverrideFields, x as CatalogReference, u as ChannelType, n as ChargeType, Q as Color, ao as Coupon, bS as CreateCartRequest, bT as CreateCartResponse, bC as CreateCheckoutFromCurrentCartRequest, b_ as CreateCheckoutRequest, aD as CustomLineItem, c2 as DeleteCartRequest, bH as DeleteCartResponse, bG as DeleteCurrentCartRequest, b2 as DeliveryAllocation, aZ as DeliveryLogistics, a$ as DeliveryTimeSlot, a6 as Description, B as DescriptionLine, H as DescriptionLineDescriptionLineValueOneOf, K as DescriptionLineName, D as DescriptionLineType, G as DescriptionLineValueOneOf, bj as Details, bk as DetailsKindOneOf, aq as DiscountRule, ar as DiscountRuleName, j as DiscountType, bI as DomainEvent, bJ as DomainEventBodyOneOf, c3 as Empty, bK as EntityCreatedEvent, bN as EntityDeletedEvent, bM as EntityUpdatedEvent, bF as EstimateCurrentCartTotalsRequest, c1 as EstimateTotalsRequest, c6 as EventMetadata, af as ExtendedFields, l as FallbackReason, bm as FieldViolation, F as FileType, X as FocalPoint, a4 as FreeTrialPeriod, aw as FullAddressContactDetails, bW as GetCartByCheckoutIdRequest, bX as GetCartByCheckoutIdResponse, bU as GetCartRequest, bV as GetCartResponse, az as GetCurrentCartRequest, aA as GetCurrentCartResponse, aP as GiftCard, $ as Group, aI as HostSelectedMembership, bQ as IdentificationData, bR as IdentificationDataIdOneOf, bu as InvalidMembership, Y as ItemAvailabilityInfo, I as ItemAvailabilityStatus, aj as ItemModifier, aL as ItemTaxFullDetails, a0 as ItemType, i as ItemTypeItemType, a1 as ItemTypeItemTypeDataOneOf, J as JurisdictionType, w as LineItem, bg as LineItemDiscount, aK as LineItemPricesData, M as ManualCalculationReason, br as Membership, bs as MembershipName, bq as MembershipOptions, bt as MembershipPaymentCredits, ap as MerchantDiscount, aC as MerchantDiscountInput, bP as MessageEnvelope, ah as ModifierGroup, z as MultiCurrencyPrice, s as NameInLineItem, N as NameInOther, bz as Other, b9 as OtherCharge, ac as PaymentOption, P as PaymentOptionType, Z as PhysicalProperties, a_ as PickupDetails, m as PickupMethod, O as PlainTextValue, ag as Policy, a9 as PriceDescription, aO as PriceSummary, y as ProductName, k as RateType, b4 as Region, c4 as RemoveBusinessLocationRequest, bD as RemoveCouponFromCurrentCartRequest, b$ as RemoveCouponRequest, bB as RemoveLineItemsFromCurrentCartRequest, bZ as RemoveLineItemsRequest, bL as RestoreInfo, p as RuleType, _ as Scope, a7 as SecuredMedia, aY as SelectedCarrierServiceOption, b1 as SelectedCarrierServiceOptionOtherCharge, b0 as SelectedCarrierServiceOptionPrices, aa as SelectedMembership, aH as SelectedMemberships, ay as SelectedShippingOption, a8 as ServiceProperties, r as Severity, aW as ShippingInformation, b7 as ShippingOption, b8 as ShippingPrice, aX as ShippingRegion, au as StreetAddress, S as SubscriptionFrequency, a2 as SubscriptionOptionInfo, a3 as SubscriptionSettings, t as SuggestedFix, bn as SystemError, bx as Target, bA as TargetLineItem, by as TargetTargetTypeOneOf, aN as TaxBreakdown, aR as TaxCalculationDetails, aS as TaxCalculationDetailsCalculationDetailsOneOf, aM as TaxRateBreakdown, aQ as TaxSummary, ad as TaxableAddress, ae as TaxableAddressTaxableAddressDataOneOf, T as TaxableAddressType, a5 as Title, ai as TranslatableString, aB as UpdateCartRequest, aE as UpdateCartResponse, bE as UpdateCurrentCartLineItemQuantityRequest, c0 as UpdateLineItemsQuantityRequest, bc as V1Coupon, be as V1DiscountRule, bf as V1DiscountRuleName, bd as V1MerchantDiscount, bl as ValidationError, ax as VatId, V as VatType, bw as Violation, v as WebhookIdentityType, W as WeightUnit } from './ecom-v1-cart-cart.universal-BIIZxJYL.js';
|
|
4
|
+
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
5
|
+
|
|
6
|
+
declare function createCart$1(httpClient: HttpClient): CreateCartSignature;
|
|
7
|
+
interface CreateCartSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a cart.
|
|
10
|
+
*
|
|
11
|
+
* > **Note:** When adding catalog line items, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
|
|
12
|
+
* @param - Cart creation options.
|
|
13
|
+
* @returns Cart.
|
|
14
|
+
*/
|
|
15
|
+
(options?: CreateCartOptions | undefined): Promise<Cart>;
|
|
16
|
+
}
|
|
17
|
+
declare function updateCart$1(httpClient: HttpClient): UpdateCartSignature;
|
|
18
|
+
interface UpdateCartSignature {
|
|
19
|
+
/**
|
|
20
|
+
* Updates a cart's properties.
|
|
21
|
+
*
|
|
22
|
+
* > **Note:** When updating line items, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
|
|
23
|
+
* @param - Available options to use when updating a cart.
|
|
24
|
+
* @param - ID of the cart to be updated.
|
|
25
|
+
* @returns Updated Cart.
|
|
26
|
+
*/
|
|
27
|
+
(_id: string, options?: UpdateCartOptions | undefined): Promise<Cart>;
|
|
28
|
+
}
|
|
29
|
+
declare function getCart$1(httpClient: HttpClient): GetCartSignature;
|
|
30
|
+
interface GetCartSignature {
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves a cart.
|
|
33
|
+
* @param - Cart ID.
|
|
34
|
+
* @returns Retrieved cart.
|
|
35
|
+
*/
|
|
36
|
+
(_id: string): Promise<Cart>;
|
|
37
|
+
}
|
|
38
|
+
declare function addToCart$1(httpClient: HttpClient): AddToCartSignature;
|
|
39
|
+
interface AddToCartSignature {
|
|
40
|
+
/**
|
|
41
|
+
* Adds 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)) line items to a cart.
|
|
42
|
+
*
|
|
43
|
+
* >**Note:** When adding catalog line items to a cart, the `lineItems.catalogReference.appId` and `lineItems.catalogReference.catalogItemId` fields are required.
|
|
44
|
+
* @param - Cart ID.
|
|
45
|
+
* @param - Items to be added to cart.
|
|
46
|
+
*/
|
|
47
|
+
(_id: string, options?: AddToCartOptions | undefined): Promise<AddToCartResponse>;
|
|
48
|
+
}
|
|
49
|
+
declare function removeLineItems$1(httpClient: HttpClient): RemoveLineItemsSignature;
|
|
50
|
+
interface RemoveLineItemsSignature {
|
|
51
|
+
/**
|
|
52
|
+
* Removes line items from a cart.
|
|
53
|
+
* @param - IDs of the line items to remove from the cart.
|
|
54
|
+
* @param - ID of the cart to remove line items from.
|
|
55
|
+
*/
|
|
56
|
+
(_id: string, lineItemIds: string[]): Promise<RemoveLineItemsResponse>;
|
|
57
|
+
}
|
|
58
|
+
declare function createCheckout$1(httpClient: HttpClient): CreateCheckoutSignature;
|
|
59
|
+
interface CreateCheckoutSignature {
|
|
60
|
+
/**
|
|
61
|
+
* Creates a checkout from a cart.
|
|
62
|
+
*
|
|
63
|
+
* If a checkout for the specified cart already exists, that checkout is
|
|
64
|
+
* updated with any new information from the cart.
|
|
65
|
+
*
|
|
66
|
+
* > **Note:** `channelType` is a required field.
|
|
67
|
+
* @param - Cart ID.
|
|
68
|
+
* @param - Checkout creation options.
|
|
69
|
+
*/
|
|
70
|
+
(_id: string, options?: CreateCheckoutOptions | undefined): Promise<CreateCheckoutResponse>;
|
|
71
|
+
}
|
|
72
|
+
declare function removeCoupon$1(httpClient: HttpClient): RemoveCouponSignature;
|
|
73
|
+
interface RemoveCouponSignature {
|
|
74
|
+
/**
|
|
75
|
+
* Removes the coupon from a cart.
|
|
76
|
+
* @param - Cart ID.
|
|
77
|
+
*/
|
|
78
|
+
(_id: string): Promise<RemoveCouponResponse>;
|
|
79
|
+
}
|
|
80
|
+
declare function updateLineItemsQuantity$1(httpClient: HttpClient): UpdateLineItemsQuantitySignature;
|
|
81
|
+
interface UpdateLineItemsQuantitySignature {
|
|
82
|
+
/**
|
|
83
|
+
* Updates the quantity of one or more line items in a cart.
|
|
84
|
+
*
|
|
85
|
+
* This method is only for updating the quantity of line items.
|
|
86
|
+
* To entirely remove a line item from the cart, use Remove Line Items.
|
|
87
|
+
* To add a new line item to the cart, use Add To Cart.
|
|
88
|
+
*
|
|
89
|
+
* This method checks the amount of stock remaining for this line item.
|
|
90
|
+
* If the specified quantity is greater than the remaining stock,
|
|
91
|
+
* then the quantity returned in the response is the total amount of remaining stock.
|
|
92
|
+
* @param - Cart ID.
|
|
93
|
+
* @param - Line item IDs and their new quantity.
|
|
94
|
+
*/
|
|
95
|
+
(_id: string, lineItems: LineItemQuantityUpdate[]): Promise<UpdateLineItemsQuantityResponse>;
|
|
96
|
+
}
|
|
97
|
+
declare function estimateTotals$1(httpClient: HttpClient): EstimateTotalsSignature;
|
|
98
|
+
interface EstimateTotalsSignature {
|
|
99
|
+
/**
|
|
100
|
+
* Estimates the subtotal and total for current site visitor’s cart.
|
|
101
|
+
*
|
|
102
|
+
* Totals include tax and are based on the selected carrier service, shipping address, and billing information.
|
|
103
|
+
*
|
|
104
|
+
* > **Note:** Not passing any optional parameters will only estimate the cart items price totals.
|
|
105
|
+
* @param - Cart ID.
|
|
106
|
+
* @param - Total estimation options.
|
|
107
|
+
*/
|
|
108
|
+
(_id: string, options?: EstimateTotalsOptions | undefined): Promise<EstimateTotalsResponse>;
|
|
109
|
+
}
|
|
110
|
+
declare function deleteCart$1(httpClient: HttpClient): DeleteCartSignature;
|
|
111
|
+
interface DeleteCartSignature {
|
|
112
|
+
/**
|
|
113
|
+
* Deletes a cart.
|
|
114
|
+
* @param - ID of the cart to delete.
|
|
115
|
+
*/
|
|
116
|
+
(_id: string): Promise<void>;
|
|
117
|
+
}
|
|
118
|
+
declare function removeBusinessLocation$1(httpClient: HttpClient): RemoveBusinessLocationSignature;
|
|
119
|
+
interface RemoveBusinessLocationSignature {
|
|
120
|
+
/**
|
|
121
|
+
* Removes the location associated with a cart.
|
|
122
|
+
* @param - Cart ID.
|
|
123
|
+
*/
|
|
124
|
+
(_id: string): Promise<RemoveBusinessLocationResponse>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
declare const createCart: MaybeContext<BuildRESTFunction<typeof createCart$1> & typeof createCart$1>;
|
|
128
|
+
declare const updateCart: MaybeContext<BuildRESTFunction<typeof updateCart$1> & typeof updateCart$1>;
|
|
129
|
+
declare const getCart: MaybeContext<BuildRESTFunction<typeof getCart$1> & typeof getCart$1>;
|
|
130
|
+
declare const addToCart: MaybeContext<BuildRESTFunction<typeof addToCart$1> & typeof addToCart$1>;
|
|
131
|
+
declare const removeLineItems: MaybeContext<BuildRESTFunction<typeof removeLineItems$1> & typeof removeLineItems$1>;
|
|
132
|
+
declare const createCheckout: MaybeContext<BuildRESTFunction<typeof createCheckout$1> & typeof createCheckout$1>;
|
|
133
|
+
declare const removeCoupon: MaybeContext<BuildRESTFunction<typeof removeCoupon$1> & typeof removeCoupon$1>;
|
|
134
|
+
declare const updateLineItemsQuantity: MaybeContext<BuildRESTFunction<typeof updateLineItemsQuantity$1> & typeof updateLineItemsQuantity$1>;
|
|
135
|
+
declare const estimateTotals: MaybeContext<BuildRESTFunction<typeof estimateTotals$1> & typeof estimateTotals$1>;
|
|
136
|
+
declare const deleteCart: MaybeContext<BuildRESTFunction<typeof deleteCart$1> & typeof deleteCart$1>;
|
|
137
|
+
declare const removeBusinessLocation: MaybeContext<BuildRESTFunction<typeof removeBusinessLocation$1> & typeof removeBusinessLocation$1>;
|
|
138
|
+
/**
|
|
139
|
+
* Triggered when a cart is deleted.
|
|
140
|
+
*/
|
|
141
|
+
declare const onCartDeleted: ReturnType<typeof createEventModule<typeof publicOnCartDeleted>>;
|
|
142
|
+
/** */
|
|
143
|
+
declare const onCartUpdated: ReturnType<typeof createEventModule<typeof publicOnCartUpdated>>;
|
|
144
|
+
/**
|
|
145
|
+
* Triggered when a cart is created.
|
|
146
|
+
*/
|
|
147
|
+
declare const onCartCreated: ReturnType<typeof createEventModule<typeof publicOnCartCreated>>;
|
|
148
|
+
|
|
149
|
+
export { AddToCartOptions, AddToCartResponse, Cart, CreateCartOptions, CreateCheckoutOptions, CreateCheckoutResponse, EstimateTotalsOptions, EstimateTotalsResponse, LineItemQuantityUpdate, RemoveBusinessLocationResponse, RemoveCouponResponse, RemoveLineItemsResponse, UpdateCartOptions, UpdateLineItemsQuantityResponse, addToCart, createCart, createCheckout, deleteCart, estimateTotals, getCart, onCartCreated, onCartDeleted, onCartUpdated, removeBusinessLocation, removeCoupon, removeLineItems, updateCart, updateLineItemsQuantity };
|