@cimplify/sdk 0.8.13 → 0.9.0
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/dist/ads-DeL3PGzf.d.mts +33 -0
- package/dist/ads-DeL3PGzf.d.ts +33 -0
- package/dist/advanced.d.mts +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/advanced.js +6 -0
- package/dist/advanced.mjs +6 -0
- package/dist/{client-BYpHOPXm.d.mts → client-CmnVngkm.d.mts} +1 -1
- package/dist/{client-9gpFQIeG.d.ts → client-vi6GsbUP.d.ts} +1 -1
- package/dist/{index-DKLWJwJd.d.mts → index-DWl8VbnB.d.mts} +1 -1
- package/dist/{index-DQp1xkcl.d.ts → index-UNwoWldH.d.ts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +16 -0
- package/dist/index.mjs +16 -1
- package/dist/{payment-BKjX2fAs.d.mts → payment-BNlyzm_Q.d.mts} +1 -1
- package/dist/{payment-BKjX2fAs.d.ts → payment-BNlyzm_Q.d.ts} +1 -1
- package/dist/react.d.mts +123 -6
- package/dist/react.d.ts +123 -6
- package/dist/react.js +951 -5
- package/dist/react.mjs +943 -6
- package/dist/utils.d.mts +2 -2
- package/dist/utils.d.ts +2 -2
- package/package.json +9 -8
- package/dist/ads-t3FBTU8p.d.mts +0 -20
- package/dist/ads-t3FBTU8p.d.ts +0 -20
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derive a human-readable display name for a variant.
|
|
3
|
+
*
|
|
4
|
+
* Priority: explicit name → display_attributes joined → "Default"/"Option" fallback.
|
|
5
|
+
*/
|
|
6
|
+
declare function getVariantDisplayName(variant: {
|
|
7
|
+
name?: string;
|
|
8
|
+
display_attributes?: Array<{
|
|
9
|
+
value_name: string;
|
|
10
|
+
}>;
|
|
11
|
+
is_default?: boolean;
|
|
12
|
+
}): string;
|
|
13
|
+
|
|
14
|
+
type AdSlot = "banner" | "sidebar" | "in-content" | "native" | "footer";
|
|
15
|
+
type AdPosition = "static" | "sticky" | "fixed";
|
|
16
|
+
type AdTheme = "light" | "dark" | "auto";
|
|
17
|
+
interface AdConfig {
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
theme: AdTheme;
|
|
20
|
+
excludePaths?: string[];
|
|
21
|
+
}
|
|
22
|
+
interface AdCreative {
|
|
23
|
+
id: string;
|
|
24
|
+
html: string;
|
|
25
|
+
clickUrl: string;
|
|
26
|
+
}
|
|
27
|
+
interface AdContextValue {
|
|
28
|
+
siteId: string | null;
|
|
29
|
+
config: AdConfig | null;
|
|
30
|
+
isLoading: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { type AdSlot as A, type AdPosition as a, type AdTheme as b, type AdConfig as c, type AdCreative as d, type AdContextValue as e, getVariantDisplayName as g };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derive a human-readable display name for a variant.
|
|
3
|
+
*
|
|
4
|
+
* Priority: explicit name → display_attributes joined → "Default"/"Option" fallback.
|
|
5
|
+
*/
|
|
6
|
+
declare function getVariantDisplayName(variant: {
|
|
7
|
+
name?: string;
|
|
8
|
+
display_attributes?: Array<{
|
|
9
|
+
value_name: string;
|
|
10
|
+
}>;
|
|
11
|
+
is_default?: boolean;
|
|
12
|
+
}): string;
|
|
13
|
+
|
|
14
|
+
type AdSlot = "banner" | "sidebar" | "in-content" | "native" | "footer";
|
|
15
|
+
type AdPosition = "static" | "sticky" | "fixed";
|
|
16
|
+
type AdTheme = "light" | "dark" | "auto";
|
|
17
|
+
interface AdConfig {
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
theme: AdTheme;
|
|
20
|
+
excludePaths?: string[];
|
|
21
|
+
}
|
|
22
|
+
interface AdCreative {
|
|
23
|
+
id: string;
|
|
24
|
+
html: string;
|
|
25
|
+
clickUrl: string;
|
|
26
|
+
}
|
|
27
|
+
interface AdContextValue {
|
|
28
|
+
siteId: string | null;
|
|
29
|
+
config: AdConfig | null;
|
|
30
|
+
isLoading: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { type AdSlot as A, type AdPosition as a, type AdTheme as b, type AdConfig as c, type AdCreative as d, type AdContextValue as e, getVariantDisplayName as g };
|
package/dist/advanced.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-CmnVngkm.mjs';
|
|
2
|
+
import './payment-BNlyzm_Q.mjs';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
|
5
5
|
type SortOrder = "asc" | "desc";
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-vi6GsbUP.js';
|
|
2
|
+
import './payment-BNlyzm_Q.js';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
|
5
5
|
type SortOrder = "asc" | "desc";
|
package/dist/advanced.js
CHANGED
|
@@ -189,6 +189,12 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
189
189
|
if (variantAdjustment === void 0 || variantAdjustment === null || variantAdjustment === "") {
|
|
190
190
|
normalizedVariant["price_adjustment"] = readFinalPrice(normalizedVariant["price_info"]) ?? "0";
|
|
191
191
|
}
|
|
192
|
+
if (!normalizedVariant["name"]) {
|
|
193
|
+
const attrs = normalizedVariant["display_attributes"];
|
|
194
|
+
if (Array.isArray(attrs) && attrs.length > 0) {
|
|
195
|
+
normalizedVariant["name"] = attrs.map((a) => a.value_name).filter(Boolean).join(" / ");
|
|
196
|
+
}
|
|
197
|
+
}
|
|
192
198
|
return normalizedVariant;
|
|
193
199
|
});
|
|
194
200
|
}
|
package/dist/advanced.mjs
CHANGED
|
@@ -187,6 +187,12 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
187
187
|
if (variantAdjustment === void 0 || variantAdjustment === null || variantAdjustment === "") {
|
|
188
188
|
normalizedVariant["price_adjustment"] = readFinalPrice(normalizedVariant["price_info"]) ?? "0";
|
|
189
189
|
}
|
|
190
|
+
if (!normalizedVariant["name"]) {
|
|
191
|
+
const attrs = normalizedVariant["display_attributes"];
|
|
192
|
+
if (Array.isArray(attrs) && attrs.length > 0) {
|
|
193
|
+
normalizedVariant["name"] = attrs.map((a) => a.value_name).filter(Boolean).join(" / ");
|
|
194
|
+
}
|
|
195
|
+
}
|
|
190
196
|
return normalizedVariant;
|
|
191
197
|
});
|
|
192
198
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as Category, r as Product, G as AddOnWithOptions, d as Pagination, h as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, U as Bundle, Y as BundleWithDetails, a3 as Composite, a4 as CompositeWithDetails, a8 as ComponentSelectionInput, a9 as CompositePriceResult, ao as ChosenPrice, aT as UICart, aE as Cart, aF as CartItem, aX as CartSummary, aV as AddToCartInput, aW as UpdateCartItemInput, as as DiscountDetails, M as Money, C as CurrencyCode, aD as LineConfiguration, a$ as AuthorizationType, b1 as PaymentMethod, b3 as InitializePaymentResult, b7 as SubmitAuthorizationInput, b5 as PaymentStatusResponse } from './payment-
|
|
1
|
+
import { L as Category, r as Product, G as AddOnWithOptions, d as Pagination, h as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, U as Bundle, Y as BundleWithDetails, a3 as Composite, a4 as CompositeWithDetails, a8 as ComponentSelectionInput, a9 as CompositePriceResult, ao as ChosenPrice, aT as UICart, aE as Cart, aF as CartItem, aX as CartSummary, aV as AddToCartInput, aW as UpdateCartItemInput, as as DiscountDetails, M as Money, C as CurrencyCode, aD as LineConfiguration, a$ as AuthorizationType, b1 as PaymentMethod, b3 as InitializePaymentResult, b7 as SubmitAuthorizationInput, b5 as PaymentStatusResponse } from './payment-BNlyzm_Q.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Observability hooks for monitoring SDK behavior.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as Category, r as Product, G as AddOnWithOptions, d as Pagination, h as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, U as Bundle, Y as BundleWithDetails, a3 as Composite, a4 as CompositeWithDetails, a8 as ComponentSelectionInput, a9 as CompositePriceResult, ao as ChosenPrice, aT as UICart, aE as Cart, aF as CartItem, aX as CartSummary, aV as AddToCartInput, aW as UpdateCartItemInput, as as DiscountDetails, M as Money, C as CurrencyCode, aD as LineConfiguration, a$ as AuthorizationType, b1 as PaymentMethod, b3 as InitializePaymentResult, b7 as SubmitAuthorizationInput, b5 as PaymentStatusResponse } from './payment-
|
|
1
|
+
import { L as Category, r as Product, G as AddOnWithOptions, d as Pagination, h as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, U as Bundle, Y as BundleWithDetails, a3 as Composite, a4 as CompositeWithDetails, a8 as ComponentSelectionInput, a9 as CompositePriceResult, ao as ChosenPrice, aT as UICart, aE as Cart, aF as CartItem, aX as CartSummary, aV as AddToCartInput, aW as UpdateCartItemInput, as as DiscountDetails, M as Money, C as CurrencyCode, aD as LineConfiguration, a$ as AuthorizationType, b1 as PaymentMethod, b3 as InitializePaymentResult, b7 as SubmitAuthorizationInput, b5 as PaymentStatusResponse } from './payment-BNlyzm_Q.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Observability hooks for monitoring SDK behavior.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ao as ChosenPrice, C as CurrencyCode, al as TaxPathComponent, am as PricePathTaxInfo, M as Money, b6 as PaymentErrorDetails, b4 as PaymentResponse, b5 as PaymentStatusResponse } from './payment-
|
|
1
|
+
import { ao as ChosenPrice, C as CurrencyCode, al as TaxPathComponent, am as PricePathTaxInfo, M as Money, b6 as PaymentErrorDetails, b4 as PaymentResponse, b5 as PaymentStatusResponse } from './payment-BNlyzm_Q.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Price Types
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ao as ChosenPrice, C as CurrencyCode, al as TaxPathComponent, am as PricePathTaxInfo, M as Money, b6 as PaymentErrorDetails, b4 as PaymentResponse, b5 as PaymentStatusResponse } from './payment-
|
|
1
|
+
import { ao as ChosenPrice, C as CurrencyCode, al as TaxPathComponent, am as PricePathTaxInfo, M as Money, b6 as PaymentErrorDetails, b4 as PaymentResponse, b5 as PaymentStatusResponse } from './payment-BNlyzm_Q.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Price Types
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { ab as AUTHORIZATION_TYPE, ag as AUTH_MUTATION, a0 as AbortablePromise, cd as AddressData, cG as AddressInfo, aQ as AmountToPay, co as AuthResponse, A as AuthService, m as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c1 as AvailabilityCheck, c2 as AvailabilityResult, bG as AvailableSlot, bJ as Booking, bI as BookingStatus, bK as BookingWithDetails, b8 as BufferTimes, bn as Business, bB as BusinessHours, bm as BusinessPreferences, B as BusinessService, bA as BusinessSettings, bl as BusinessType, by as BusinessWithLocations, a4 as CHECKOUT_MODE, ah as CHECKOUT_MUTATION, a7 as CHECKOUT_STEP, ad as CONTACT_TYPE, bR as CancelBookingInput, bS as CancelBookingResult, b2 as CancelOrderInput, ba as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aD as CatalogueResult, aE as CatalogueSnapshot, bC as CategoryInfo, bO as CheckSlotAvailabilityInput, bP as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, N as CheckoutFormData, b0 as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, _ as CheckoutStatus, $ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a3 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bM as CustomerBooking, bL as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, b7 as CustomerServicePreferences, al as DEFAULT_COUNTRY, ak as DEFAULT_CURRENCY, ac as DEVICE_TYPE, bH as DayAvailability, bh as DepositResult, a2 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, w as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, ao as Err, aP as FeeBearerType, F as FetchQuoteInput, aN as FulfillmentLink, aM as FulfillmentStatus, aL as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, q as FxService, bN as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, c3 as InventorySummary, af as LINK_MUTATION, ae as LINK_QUERY, aR as LineItem, aI as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, r as LiteBootstrap, p as LiteService, bq as Location, bk as LocationAppointment, c0 as LocationStock, bo as LocationTaxBehavior, bp as LocationTaxOverrides, bt as LocationTimeProfile, bz as LocationWithDetails, M as MESSAGE_TYPES, aa as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a1 as MobileMoneyProvider, W as NextAction, aj as ORDER_MUTATION, a5 as ORDER_TYPE, cD as ObservabilityHooks, an as Ok, aS as Order, aH as OrderChannel, a$ as OrderFilter, aO as OrderFulfillmentSummary, aV as OrderGroup, aZ as OrderGroupDetails, aW as OrderGroupPayment, aU as OrderGroupPaymentState, aY as OrderGroupPaymentSummary, aT as OrderHistory, aJ as OrderLineState, aK as OrderLineStatus, a_ as OrderPaymentEvent, O as OrderQueries, aX as OrderSplitDetail, aF as OrderStatus, cE as OrderType, n as OtpResult, a6 as PAYMENT_METHOD, ai as PAYMENT_MUTATION, a8 as PAYMENT_STATE, a9 as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aG as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bc as PricingOverrides, Z as ProcessAndResolveOptions, X as ProcessCheckoutOptions, Y as ProcessCheckoutResult, b_ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b3 as RefundOrderInput, b6 as ReminderMethod, b9 as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, cy as RequestStartEvent, cz as RequestSuccessEvent, bQ as RescheduleBookingInput, bT as RescheduleBookingResult, bf as ResourceAssignment, am as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bv as Room, bd as SchedulingMetadata, bg as SchedulingResult, o as SchedulingService, S as SearchOptions, bD as Service, bU as ServiceAvailabilityParams, bV as ServiceAvailabilityResult, bw as ServiceCharge, bb as ServiceNotes, bi as ServiceScheduleRequest, b4 as ServiceStatus, cC as SessionChangeEvent, bE as Staff, be as StaffAssignment, b5 as StaffRole, bj as StaffScheduleItem, bY as Stock, bZ as StockLevel, bW as StockOwnershipType, bX as StockStatus, bx as StorefrontBootstrap, bu as Table, T as TableInfo, br as TimeRange, bs as TimeRanges, bF as TimeSlot, ca as UpdateAddressInput, b1 as UpdateOrderStatusInput, U as UpdateProfileInput, b$ as VariantStock, cn as VerifyOtpInput, aB as combine, aC as combineObject, c as createCimplifyClient, u as createElements, aq as err, av as flatMap, az as fromPromise, k as generateIdempotencyKey, aw as getOrElse, as as isErr, ar as isOk, au as mapError, at as mapResult, ap as ok, ay as toNullable, aA as tryCatch, ax as unwrap } from './client-
|
|
1
|
+
export { ab as AUTHORIZATION_TYPE, ag as AUTH_MUTATION, a0 as AbortablePromise, cd as AddressData, cG as AddressInfo, aQ as AmountToPay, co as AuthResponse, A as AuthService, m as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c1 as AvailabilityCheck, c2 as AvailabilityResult, bG as AvailableSlot, bJ as Booking, bI as BookingStatus, bK as BookingWithDetails, b8 as BufferTimes, bn as Business, bB as BusinessHours, bm as BusinessPreferences, B as BusinessService, bA as BusinessSettings, bl as BusinessType, by as BusinessWithLocations, a4 as CHECKOUT_MODE, ah as CHECKOUT_MUTATION, a7 as CHECKOUT_STEP, ad as CONTACT_TYPE, bR as CancelBookingInput, bS as CancelBookingResult, b2 as CancelOrderInput, ba as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aD as CatalogueResult, aE as CatalogueSnapshot, bC as CategoryInfo, bO as CheckSlotAvailabilityInput, bP as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, N as CheckoutFormData, b0 as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, _ as CheckoutStatus, $ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a3 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bM as CustomerBooking, bL as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, b7 as CustomerServicePreferences, al as DEFAULT_COUNTRY, ak as DEFAULT_CURRENCY, ac as DEVICE_TYPE, bH as DayAvailability, bh as DepositResult, a2 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, w as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, ao as Err, aP as FeeBearerType, F as FetchQuoteInput, aN as FulfillmentLink, aM as FulfillmentStatus, aL as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, q as FxService, bN as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, c3 as InventorySummary, af as LINK_MUTATION, ae as LINK_QUERY, aR as LineItem, aI as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, r as LiteBootstrap, p as LiteService, bq as Location, bk as LocationAppointment, c0 as LocationStock, bo as LocationTaxBehavior, bp as LocationTaxOverrides, bt as LocationTimeProfile, bz as LocationWithDetails, M as MESSAGE_TYPES, aa as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a1 as MobileMoneyProvider, W as NextAction, aj as ORDER_MUTATION, a5 as ORDER_TYPE, cD as ObservabilityHooks, an as Ok, aS as Order, aH as OrderChannel, a$ as OrderFilter, aO as OrderFulfillmentSummary, aV as OrderGroup, aZ as OrderGroupDetails, aW as OrderGroupPayment, aU as OrderGroupPaymentState, aY as OrderGroupPaymentSummary, aT as OrderHistory, aJ as OrderLineState, aK as OrderLineStatus, a_ as OrderPaymentEvent, O as OrderQueries, aX as OrderSplitDetail, aF as OrderStatus, cE as OrderType, n as OtpResult, a6 as PAYMENT_METHOD, ai as PAYMENT_MUTATION, a8 as PAYMENT_STATE, a9 as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aG as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bc as PricingOverrides, Z as ProcessAndResolveOptions, X as ProcessCheckoutOptions, Y as ProcessCheckoutResult, b_ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b3 as RefundOrderInput, b6 as ReminderMethod, b9 as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, cy as RequestStartEvent, cz as RequestSuccessEvent, bQ as RescheduleBookingInput, bT as RescheduleBookingResult, bf as ResourceAssignment, am as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bv as Room, bd as SchedulingMetadata, bg as SchedulingResult, o as SchedulingService, S as SearchOptions, bD as Service, bU as ServiceAvailabilityParams, bV as ServiceAvailabilityResult, bw as ServiceCharge, bb as ServiceNotes, bi as ServiceScheduleRequest, b4 as ServiceStatus, cC as SessionChangeEvent, bE as Staff, be as StaffAssignment, b5 as StaffRole, bj as StaffScheduleItem, bY as Stock, bZ as StockLevel, bW as StockOwnershipType, bX as StockStatus, bx as StorefrontBootstrap, bu as Table, T as TableInfo, br as TimeRange, bs as TimeRanges, bF as TimeSlot, ca as UpdateAddressInput, b1 as UpdateOrderStatusInput, U as UpdateProfileInput, b$ as VariantStock, cn as VerifyOtpInput, aB as combine, aC as combineObject, c as createCimplifyClient, u as createElements, aq as err, av as flatMap, az as fromPromise, k as generateIdempotencyKey, aw as getOrElse, as as isErr, ar as isOk, au as mapError, at as mapResult, ap as ok, ay as toNullable, aA as tryCatch, ax as unwrap } from './client-CmnVngkm.mjs';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.mjs';
|
|
3
|
-
import { A as ApiError } from './payment-
|
|
4
|
-
export { F as AddOn, au as AddOnDetails, aQ as AddOnGroupDetails, H as AddOnOption, aP as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, aV as AddToCartInput, aj as AdjustmentType, aq as AppliedDiscount, a$ as AuthorizationType, ap as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, T as BundlePriceType, X as BundleProduct, az as BundleSelectionData, ax as BundleSelectionInput, ay as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aE as Cart, av as CartAddOn, ah as CartChannel, aF as CartItem, aS as CartItemDetails, ag as CartStatus, aX as CartSummary, aG as CartTotals, L as Category, N as CategorySummary, ao as ChosenPrice, h as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a5 as ComponentGroup, a6 as ComponentGroupWithComponents, aa as ComponentPriceBreakdown, a8 as ComponentSelectionInput, a2 as ComponentSourceType, a3 as Composite, a7 as CompositeComponent, aB as CompositePriceBreakdown, a9 as CompositePriceResult, a0 as CompositePricingMode, aC as CompositeSelectionData, a8 as CompositeSelectionInput, aA as CompositeStoredSelection, a4 as CompositeWithDetails, b as Currency, C as CurrencyCode, q as DepositType, D as DigitalProductType, ar as DiscountBreakdown, as as DiscountDetails, aJ as DisplayAddOn, aK as DisplayAddOnOption, aH as DisplayCart, aI as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a1 as GroupPricingBehavior, b3 as InitializePaymentResult, I as InventoryType, aD as LineConfiguration, ad as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b2 as Payment, b6 as PaymentErrorDetails, b1 as PaymentMethod, a_ as PaymentMethodType, b0 as PaymentProcessingState, aZ as PaymentProvider, b4 as PaymentResponse, aY as PaymentStatus, b5 as PaymentStatusResponse, ac as Price, ak as PriceAdjustment, an as PriceDecisionPath, ab as PriceEntryType, am as PricePathTaxInfo, ai as PriceSource, r as Product, K as ProductAddOn, ae as ProductAvailability, p as ProductRenderHint, af as ProductTimeProfile, o as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, at as SelectedAddOnOption, b7 as SubmitAuthorizationInput, al as TaxPathComponent, aT as UICart, aL as UICartBusiness, aN as UICartCustomer, aM as UICartLocation, aO as UICartPricing, aU as UICartResponse, aW as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, w as VariantAxisWithValues, aw as VariantDetails, aR as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, l as enrichError, k as getErrorHint, j as isCimplifyError, n as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-
|
|
5
|
-
export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-
|
|
6
|
-
export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme } from './ads-
|
|
3
|
+
import { A as ApiError } from './payment-BNlyzm_Q.mjs';
|
|
4
|
+
export { F as AddOn, au as AddOnDetails, aQ as AddOnGroupDetails, H as AddOnOption, aP as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, aV as AddToCartInput, aj as AdjustmentType, aq as AppliedDiscount, a$ as AuthorizationType, ap as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, T as BundlePriceType, X as BundleProduct, az as BundleSelectionData, ax as BundleSelectionInput, ay as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aE as Cart, av as CartAddOn, ah as CartChannel, aF as CartItem, aS as CartItemDetails, ag as CartStatus, aX as CartSummary, aG as CartTotals, L as Category, N as CategorySummary, ao as ChosenPrice, h as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a5 as ComponentGroup, a6 as ComponentGroupWithComponents, aa as ComponentPriceBreakdown, a8 as ComponentSelectionInput, a2 as ComponentSourceType, a3 as Composite, a7 as CompositeComponent, aB as CompositePriceBreakdown, a9 as CompositePriceResult, a0 as CompositePricingMode, aC as CompositeSelectionData, a8 as CompositeSelectionInput, aA as CompositeStoredSelection, a4 as CompositeWithDetails, b as Currency, C as CurrencyCode, q as DepositType, D as DigitalProductType, ar as DiscountBreakdown, as as DiscountDetails, aJ as DisplayAddOn, aK as DisplayAddOnOption, aH as DisplayCart, aI as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a1 as GroupPricingBehavior, b3 as InitializePaymentResult, I as InventoryType, aD as LineConfiguration, ad as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b2 as Payment, b6 as PaymentErrorDetails, b1 as PaymentMethod, a_ as PaymentMethodType, b0 as PaymentProcessingState, aZ as PaymentProvider, b4 as PaymentResponse, aY as PaymentStatus, b5 as PaymentStatusResponse, ac as Price, ak as PriceAdjustment, an as PriceDecisionPath, ab as PriceEntryType, am as PricePathTaxInfo, ai as PriceSource, r as Product, K as ProductAddOn, ae as ProductAvailability, p as ProductRenderHint, af as ProductTimeProfile, o as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, at as SelectedAddOnOption, b7 as SubmitAuthorizationInput, al as TaxPathComponent, aT as UICart, aL as UICartBusiness, aN as UICartCustomer, aM as UICartLocation, aO as UICartPricing, aU as UICartResponse, aW as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, w as VariantAxisWithValues, aw as VariantDetails, aR as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, l as enrichError, k as getErrorHint, j as isCimplifyError, n as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-BNlyzm_Q.mjs';
|
|
5
|
+
export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-DWl8VbnB.mjs';
|
|
6
|
+
export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme, g as getVariantDisplayName } from './ads-DeL3PGzf.mjs';
|
|
7
7
|
|
|
8
8
|
/** Context sent with every request to scope operations to a specific location/branch */
|
|
9
9
|
interface FrontendContext {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { ab as AUTHORIZATION_TYPE, ag as AUTH_MUTATION, a0 as AbortablePromise, cd as AddressData, cG as AddressInfo, aQ as AmountToPay, co as AuthResponse, A as AuthService, m as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c1 as AvailabilityCheck, c2 as AvailabilityResult, bG as AvailableSlot, bJ as Booking, bI as BookingStatus, bK as BookingWithDetails, b8 as BufferTimes, bn as Business, bB as BusinessHours, bm as BusinessPreferences, B as BusinessService, bA as BusinessSettings, bl as BusinessType, by as BusinessWithLocations, a4 as CHECKOUT_MODE, ah as CHECKOUT_MUTATION, a7 as CHECKOUT_STEP, ad as CONTACT_TYPE, bR as CancelBookingInput, bS as CancelBookingResult, b2 as CancelOrderInput, ba as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aD as CatalogueResult, aE as CatalogueSnapshot, bC as CategoryInfo, bO as CheckSlotAvailabilityInput, bP as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, N as CheckoutFormData, b0 as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, _ as CheckoutStatus, $ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a3 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bM as CustomerBooking, bL as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, b7 as CustomerServicePreferences, al as DEFAULT_COUNTRY, ak as DEFAULT_CURRENCY, ac as DEVICE_TYPE, bH as DayAvailability, bh as DepositResult, a2 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, w as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, ao as Err, aP as FeeBearerType, F as FetchQuoteInput, aN as FulfillmentLink, aM as FulfillmentStatus, aL as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, q as FxService, bN as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, c3 as InventorySummary, af as LINK_MUTATION, ae as LINK_QUERY, aR as LineItem, aI as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, r as LiteBootstrap, p as LiteService, bq as Location, bk as LocationAppointment, c0 as LocationStock, bo as LocationTaxBehavior, bp as LocationTaxOverrides, bt as LocationTimeProfile, bz as LocationWithDetails, M as MESSAGE_TYPES, aa as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a1 as MobileMoneyProvider, W as NextAction, aj as ORDER_MUTATION, a5 as ORDER_TYPE, cD as ObservabilityHooks, an as Ok, aS as Order, aH as OrderChannel, a$ as OrderFilter, aO as OrderFulfillmentSummary, aV as OrderGroup, aZ as OrderGroupDetails, aW as OrderGroupPayment, aU as OrderGroupPaymentState, aY as OrderGroupPaymentSummary, aT as OrderHistory, aJ as OrderLineState, aK as OrderLineStatus, a_ as OrderPaymentEvent, O as OrderQueries, aX as OrderSplitDetail, aF as OrderStatus, cE as OrderType, n as OtpResult, a6 as PAYMENT_METHOD, ai as PAYMENT_MUTATION, a8 as PAYMENT_STATE, a9 as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aG as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bc as PricingOverrides, Z as ProcessAndResolveOptions, X as ProcessCheckoutOptions, Y as ProcessCheckoutResult, b_ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b3 as RefundOrderInput, b6 as ReminderMethod, b9 as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, cy as RequestStartEvent, cz as RequestSuccessEvent, bQ as RescheduleBookingInput, bT as RescheduleBookingResult, bf as ResourceAssignment, am as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bv as Room, bd as SchedulingMetadata, bg as SchedulingResult, o as SchedulingService, S as SearchOptions, bD as Service, bU as ServiceAvailabilityParams, bV as ServiceAvailabilityResult, bw as ServiceCharge, bb as ServiceNotes, bi as ServiceScheduleRequest, b4 as ServiceStatus, cC as SessionChangeEvent, bE as Staff, be as StaffAssignment, b5 as StaffRole, bj as StaffScheduleItem, bY as Stock, bZ as StockLevel, bW as StockOwnershipType, bX as StockStatus, bx as StorefrontBootstrap, bu as Table, T as TableInfo, br as TimeRange, bs as TimeRanges, bF as TimeSlot, ca as UpdateAddressInput, b1 as UpdateOrderStatusInput, U as UpdateProfileInput, b$ as VariantStock, cn as VerifyOtpInput, aB as combine, aC as combineObject, c as createCimplifyClient, u as createElements, aq as err, av as flatMap, az as fromPromise, k as generateIdempotencyKey, aw as getOrElse, as as isErr, ar as isOk, au as mapError, at as mapResult, ap as ok, ay as toNullable, aA as tryCatch, ax as unwrap } from './client-
|
|
1
|
+
export { ab as AUTHORIZATION_TYPE, ag as AUTH_MUTATION, a0 as AbortablePromise, cd as AddressData, cG as AddressInfo, aQ as AmountToPay, co as AuthResponse, A as AuthService, m as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c1 as AvailabilityCheck, c2 as AvailabilityResult, bG as AvailableSlot, bJ as Booking, bI as BookingStatus, bK as BookingWithDetails, b8 as BufferTimes, bn as Business, bB as BusinessHours, bm as BusinessPreferences, B as BusinessService, bA as BusinessSettings, bl as BusinessType, by as BusinessWithLocations, a4 as CHECKOUT_MODE, ah as CHECKOUT_MUTATION, a7 as CHECKOUT_STEP, ad as CONTACT_TYPE, bR as CancelBookingInput, bS as CancelBookingResult, b2 as CancelOrderInput, ba as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aD as CatalogueResult, aE as CatalogueSnapshot, bC as CategoryInfo, bO as CheckSlotAvailabilityInput, bP as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, N as CheckoutFormData, b0 as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, _ as CheckoutStatus, $ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a3 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bM as CustomerBooking, bL as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, b7 as CustomerServicePreferences, al as DEFAULT_COUNTRY, ak as DEFAULT_CURRENCY, ac as DEVICE_TYPE, bH as DayAvailability, bh as DepositResult, a2 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, w as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, ao as Err, aP as FeeBearerType, F as FetchQuoteInput, aN as FulfillmentLink, aM as FulfillmentStatus, aL as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, q as FxService, bN as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, c3 as InventorySummary, af as LINK_MUTATION, ae as LINK_QUERY, aR as LineItem, aI as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, r as LiteBootstrap, p as LiteService, bq as Location, bk as LocationAppointment, c0 as LocationStock, bo as LocationTaxBehavior, bp as LocationTaxOverrides, bt as LocationTimeProfile, bz as LocationWithDetails, M as MESSAGE_TYPES, aa as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a1 as MobileMoneyProvider, W as NextAction, aj as ORDER_MUTATION, a5 as ORDER_TYPE, cD as ObservabilityHooks, an as Ok, aS as Order, aH as OrderChannel, a$ as OrderFilter, aO as OrderFulfillmentSummary, aV as OrderGroup, aZ as OrderGroupDetails, aW as OrderGroupPayment, aU as OrderGroupPaymentState, aY as OrderGroupPaymentSummary, aT as OrderHistory, aJ as OrderLineState, aK as OrderLineStatus, a_ as OrderPaymentEvent, O as OrderQueries, aX as OrderSplitDetail, aF as OrderStatus, cE as OrderType, n as OtpResult, a6 as PAYMENT_METHOD, ai as PAYMENT_MUTATION, a8 as PAYMENT_STATE, a9 as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aG as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bc as PricingOverrides, Z as ProcessAndResolveOptions, X as ProcessCheckoutOptions, Y as ProcessCheckoutResult, b_ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b3 as RefundOrderInput, b6 as ReminderMethod, b9 as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, cy as RequestStartEvent, cz as RequestSuccessEvent, bQ as RescheduleBookingInput, bT as RescheduleBookingResult, bf as ResourceAssignment, am as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bv as Room, bd as SchedulingMetadata, bg as SchedulingResult, o as SchedulingService, S as SearchOptions, bD as Service, bU as ServiceAvailabilityParams, bV as ServiceAvailabilityResult, bw as ServiceCharge, bb as ServiceNotes, bi as ServiceScheduleRequest, b4 as ServiceStatus, cC as SessionChangeEvent, bE as Staff, be as StaffAssignment, b5 as StaffRole, bj as StaffScheduleItem, bY as Stock, bZ as StockLevel, bW as StockOwnershipType, bX as StockStatus, bx as StorefrontBootstrap, bu as Table, T as TableInfo, br as TimeRange, bs as TimeRanges, bF as TimeSlot, ca as UpdateAddressInput, b1 as UpdateOrderStatusInput, U as UpdateProfileInput, b$ as VariantStock, cn as VerifyOtpInput, aB as combine, aC as combineObject, c as createCimplifyClient, u as createElements, aq as err, av as flatMap, az as fromPromise, k as generateIdempotencyKey, aw as getOrElse, as as isErr, ar as isOk, au as mapError, at as mapResult, ap as ok, ay as toNullable, aA as tryCatch, ax as unwrap } from './client-vi6GsbUP.js';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.js';
|
|
3
|
-
import { A as ApiError } from './payment-
|
|
4
|
-
export { F as AddOn, au as AddOnDetails, aQ as AddOnGroupDetails, H as AddOnOption, aP as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, aV as AddToCartInput, aj as AdjustmentType, aq as AppliedDiscount, a$ as AuthorizationType, ap as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, T as BundlePriceType, X as BundleProduct, az as BundleSelectionData, ax as BundleSelectionInput, ay as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aE as Cart, av as CartAddOn, ah as CartChannel, aF as CartItem, aS as CartItemDetails, ag as CartStatus, aX as CartSummary, aG as CartTotals, L as Category, N as CategorySummary, ao as ChosenPrice, h as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a5 as ComponentGroup, a6 as ComponentGroupWithComponents, aa as ComponentPriceBreakdown, a8 as ComponentSelectionInput, a2 as ComponentSourceType, a3 as Composite, a7 as CompositeComponent, aB as CompositePriceBreakdown, a9 as CompositePriceResult, a0 as CompositePricingMode, aC as CompositeSelectionData, a8 as CompositeSelectionInput, aA as CompositeStoredSelection, a4 as CompositeWithDetails, b as Currency, C as CurrencyCode, q as DepositType, D as DigitalProductType, ar as DiscountBreakdown, as as DiscountDetails, aJ as DisplayAddOn, aK as DisplayAddOnOption, aH as DisplayCart, aI as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a1 as GroupPricingBehavior, b3 as InitializePaymentResult, I as InventoryType, aD as LineConfiguration, ad as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b2 as Payment, b6 as PaymentErrorDetails, b1 as PaymentMethod, a_ as PaymentMethodType, b0 as PaymentProcessingState, aZ as PaymentProvider, b4 as PaymentResponse, aY as PaymentStatus, b5 as PaymentStatusResponse, ac as Price, ak as PriceAdjustment, an as PriceDecisionPath, ab as PriceEntryType, am as PricePathTaxInfo, ai as PriceSource, r as Product, K as ProductAddOn, ae as ProductAvailability, p as ProductRenderHint, af as ProductTimeProfile, o as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, at as SelectedAddOnOption, b7 as SubmitAuthorizationInput, al as TaxPathComponent, aT as UICart, aL as UICartBusiness, aN as UICartCustomer, aM as UICartLocation, aO as UICartPricing, aU as UICartResponse, aW as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, w as VariantAxisWithValues, aw as VariantDetails, aR as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, l as enrichError, k as getErrorHint, j as isCimplifyError, n as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-
|
|
5
|
-
export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-
|
|
6
|
-
export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme } from './ads-
|
|
3
|
+
import { A as ApiError } from './payment-BNlyzm_Q.js';
|
|
4
|
+
export { F as AddOn, au as AddOnDetails, aQ as AddOnGroupDetails, H as AddOnOption, aP as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, aV as AddToCartInput, aj as AdjustmentType, aq as AppliedDiscount, a$ as AuthorizationType, ap as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, T as BundlePriceType, X as BundleProduct, az as BundleSelectionData, ax as BundleSelectionInput, ay as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aE as Cart, av as CartAddOn, ah as CartChannel, aF as CartItem, aS as CartItemDetails, ag as CartStatus, aX as CartSummary, aG as CartTotals, L as Category, N as CategorySummary, ao as ChosenPrice, h as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a5 as ComponentGroup, a6 as ComponentGroupWithComponents, aa as ComponentPriceBreakdown, a8 as ComponentSelectionInput, a2 as ComponentSourceType, a3 as Composite, a7 as CompositeComponent, aB as CompositePriceBreakdown, a9 as CompositePriceResult, a0 as CompositePricingMode, aC as CompositeSelectionData, a8 as CompositeSelectionInput, aA as CompositeStoredSelection, a4 as CompositeWithDetails, b as Currency, C as CurrencyCode, q as DepositType, D as DigitalProductType, ar as DiscountBreakdown, as as DiscountDetails, aJ as DisplayAddOn, aK as DisplayAddOnOption, aH as DisplayCart, aI as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a1 as GroupPricingBehavior, b3 as InitializePaymentResult, I as InventoryType, aD as LineConfiguration, ad as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b2 as Payment, b6 as PaymentErrorDetails, b1 as PaymentMethod, a_ as PaymentMethodType, b0 as PaymentProcessingState, aZ as PaymentProvider, b4 as PaymentResponse, aY as PaymentStatus, b5 as PaymentStatusResponse, ac as Price, ak as PriceAdjustment, an as PriceDecisionPath, ab as PriceEntryType, am as PricePathTaxInfo, ai as PriceSource, r as Product, K as ProductAddOn, ae as ProductAvailability, p as ProductRenderHint, af as ProductTimeProfile, o as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, at as SelectedAddOnOption, b7 as SubmitAuthorizationInput, al as TaxPathComponent, aT as UICart, aL as UICartBusiness, aN as UICartCustomer, aM as UICartLocation, aO as UICartPricing, aU as UICartResponse, aW as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, w as VariantAxisWithValues, aw as VariantDetails, aR as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, l as enrichError, k as getErrorHint, j as isCimplifyError, n as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-BNlyzm_Q.js';
|
|
5
|
+
export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-UNwoWldH.js';
|
|
6
|
+
export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme, g as getVariantDisplayName } from './ads-DeL3PGzf.js';
|
|
7
7
|
|
|
8
8
|
/** Context sent with every request to scope operations to a specific location/branch */
|
|
9
9
|
interface FrontendContext {
|
package/dist/index.js
CHANGED
|
@@ -358,6 +358,12 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
358
358
|
if (variantAdjustment === void 0 || variantAdjustment === null || variantAdjustment === "") {
|
|
359
359
|
normalizedVariant["price_adjustment"] = readFinalPrice(normalizedVariant["price_info"]) ?? "0";
|
|
360
360
|
}
|
|
361
|
+
if (!normalizedVariant["name"]) {
|
|
362
|
+
const attrs = normalizedVariant["display_attributes"];
|
|
363
|
+
if (Array.isArray(attrs) && attrs.length > 0) {
|
|
364
|
+
normalizedVariant["name"] = attrs.map((a) => a.value_name).filter(Boolean).join(" / ");
|
|
365
|
+
}
|
|
366
|
+
}
|
|
361
367
|
return normalizedVariant;
|
|
362
368
|
});
|
|
363
369
|
}
|
|
@@ -4265,6 +4271,15 @@ function query(entity) {
|
|
|
4265
4271
|
return new QueryBuilder(entity);
|
|
4266
4272
|
}
|
|
4267
4273
|
|
|
4274
|
+
// src/utils/variant.ts
|
|
4275
|
+
function getVariantDisplayName(variant) {
|
|
4276
|
+
if (variant.name) return variant.name;
|
|
4277
|
+
if (variant.display_attributes?.length) {
|
|
4278
|
+
return variant.display_attributes.map((a) => a.value_name).join(" / ");
|
|
4279
|
+
}
|
|
4280
|
+
return variant.is_default ? "Default" : "Option";
|
|
4281
|
+
}
|
|
4282
|
+
|
|
4268
4283
|
exports.AUTHORIZATION_TYPE = AUTHORIZATION_TYPE;
|
|
4269
4284
|
exports.AUTH_MUTATION = AUTH_MUTATION;
|
|
4270
4285
|
exports.AuthService = AuthService;
|
|
@@ -4336,6 +4351,7 @@ exports.getMarkupPercentage = getMarkupPercentage;
|
|
|
4336
4351
|
exports.getOrElse = getOrElse;
|
|
4337
4352
|
exports.getProductCurrency = getProductCurrency;
|
|
4338
4353
|
exports.getTaxAmount = getTaxAmount;
|
|
4354
|
+
exports.getVariantDisplayName = getVariantDisplayName;
|
|
4339
4355
|
exports.hasTaxInfo = hasTaxInfo;
|
|
4340
4356
|
exports.isCimplifyError = isCimplifyError;
|
|
4341
4357
|
exports.isErr = isErr;
|
package/dist/index.mjs
CHANGED
|
@@ -356,6 +356,12 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
356
356
|
if (variantAdjustment === void 0 || variantAdjustment === null || variantAdjustment === "") {
|
|
357
357
|
normalizedVariant["price_adjustment"] = readFinalPrice(normalizedVariant["price_info"]) ?? "0";
|
|
358
358
|
}
|
|
359
|
+
if (!normalizedVariant["name"]) {
|
|
360
|
+
const attrs = normalizedVariant["display_attributes"];
|
|
361
|
+
if (Array.isArray(attrs) && attrs.length > 0) {
|
|
362
|
+
normalizedVariant["name"] = attrs.map((a) => a.value_name).filter(Boolean).join(" / ");
|
|
363
|
+
}
|
|
364
|
+
}
|
|
359
365
|
return normalizedVariant;
|
|
360
366
|
});
|
|
361
367
|
}
|
|
@@ -4263,4 +4269,13 @@ function query(entity) {
|
|
|
4263
4269
|
return new QueryBuilder(entity);
|
|
4264
4270
|
}
|
|
4265
4271
|
|
|
4266
|
-
|
|
4272
|
+
// src/utils/variant.ts
|
|
4273
|
+
function getVariantDisplayName(variant) {
|
|
4274
|
+
if (variant.name) return variant.name;
|
|
4275
|
+
if (variant.display_attributes?.length) {
|
|
4276
|
+
return variant.display_attributes.map((a) => a.value_name).join(" / ");
|
|
4277
|
+
}
|
|
4278
|
+
return variant.is_default ? "Default" : "Option";
|
|
4279
|
+
}
|
|
4280
|
+
|
|
4281
|
+
export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CURRENCY_SYMBOLS, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyClient, CimplifyElement, CimplifyElements, CimplifyError, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENT_TYPES, ERROR_HINTS, EVENT_TYPES, ErrorCode, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, MOBILE_MONEY_PROVIDERS, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, QueryBuilder, SchedulingService, ZERO, categorizePaymentError, combine, combineObject, createCimplifyClient, createElements, currencyCode, detectMobileMoneyProvider, enrichError, err, flatMap, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, fromPromise, generateIdempotencyKey, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getErrorHint, getMarkupPercentage, getOrElse, getProductCurrency, getTaxAmount, getVariantDisplayName, hasTaxInfo, isCimplifyError, isErr, isOk, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isRetryableError, isSupportedCurrency, isTaxInclusive, mapError, mapResult, money, moneyFromNumber, normalizePaymentResponse, normalizeStatusResponse, ok, parsePrice, query, toNullable, tryCatch, unwrap };
|
package/dist/react.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-
|
|
3
|
-
export { c as AdConfig } from './ads-
|
|
4
|
-
import { C as CimplifyClient, Y as ProcessCheckoutResult, _ as CheckoutStatus, $ as CheckoutStatusContext, bq as Location, bn as Business, aS as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, w as ElementsOptions, cK as AuthenticatedData, cG as AddressInfo, cH as PaymentMethodInfo, s as CimplifyElements, cM as ElementsCheckoutResult, X as ProcessCheckoutOptions } from './client-
|
|
5
|
-
import { r as Product, d as Pagination, h as CimplifyError, s as ProductWithDetails, L as Category, ax as BundleSelectionInput, a8 as ComponentSelectionInput, O as Collection, Y as BundleWithDetails, a4 as CompositeWithDetails, a9 as CompositePriceResult, C as CurrencyCode } from './payment-
|
|
2
|
+
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-DeL3PGzf.mjs';
|
|
3
|
+
export { c as AdConfig, g as getVariantDisplayName } from './ads-DeL3PGzf.mjs';
|
|
4
|
+
import { C as CimplifyClient, Y as ProcessCheckoutResult, _ as CheckoutStatus, $ as CheckoutStatusContext, bq as Location, bn as Business, aS as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, w as ElementsOptions, cK as AuthenticatedData, cG as AddressInfo, cH as PaymentMethodInfo, s as CimplifyElements, cM as ElementsCheckoutResult, X as ProcessCheckoutOptions } from './client-CmnVngkm.mjs';
|
|
5
|
+
import { r as Product, d as Pagination, h as CimplifyError, s as ProductWithDetails, L as Category, ax as BundleSelectionInput, a8 as ComponentSelectionInput, O as Collection, Y as BundleWithDetails, a4 as CompositeWithDetails, a9 as CompositePriceResult, C as CurrencyCode, t as ProductVariant, w as VariantAxisWithValues, M as Money, G as AddOnWithOptions } from './payment-BNlyzm_Q.mjs';
|
|
6
6
|
|
|
7
7
|
interface UserIdentity {
|
|
8
8
|
uid: string;
|
|
@@ -57,6 +57,8 @@ interface CimplifyCheckoutProps {
|
|
|
57
57
|
locationId?: string;
|
|
58
58
|
linkUrl?: string;
|
|
59
59
|
orderTypes?: CheckoutOrderType[];
|
|
60
|
+
defaultOrderType?: CheckoutOrderType;
|
|
61
|
+
submitLabel?: string;
|
|
60
62
|
enrollInLink?: boolean;
|
|
61
63
|
onComplete: (result: ProcessCheckoutResult) => void;
|
|
62
64
|
onError?: (error: {
|
|
@@ -75,7 +77,7 @@ interface CimplifyCheckoutProps {
|
|
|
75
77
|
demoMode?: boolean;
|
|
76
78
|
className?: string;
|
|
77
79
|
}
|
|
78
|
-
declare function CimplifyCheckout({ client, businessId, cartId, locationId, linkUrl, orderTypes, enrollInLink, onComplete, onError, onStatusChange, appearance, demoMode, className, }: CimplifyCheckoutProps): React.ReactElement;
|
|
80
|
+
declare function CimplifyCheckout({ client, businessId, cartId, locationId, linkUrl, orderTypes, defaultOrderType, submitLabel, enrollInLink, onComplete, onError, onStatusChange, appearance, demoMode, className, }: CimplifyCheckoutProps): React.ReactElement;
|
|
79
81
|
|
|
80
82
|
interface PriceProps {
|
|
81
83
|
/** The amount in base (business) currency. */
|
|
@@ -402,4 +404,119 @@ declare function useCheckout(): {
|
|
|
402
404
|
isLoading: boolean;
|
|
403
405
|
};
|
|
404
406
|
|
|
405
|
-
|
|
407
|
+
interface QuantitySelectorProps {
|
|
408
|
+
value: number;
|
|
409
|
+
onChange: (value: number) => void;
|
|
410
|
+
min?: number;
|
|
411
|
+
max?: number;
|
|
412
|
+
className?: string;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* QuantitySelector — controlled increment/decrement input.
|
|
416
|
+
*
|
|
417
|
+
* Pure presentation. Pass `value` and `onChange` to drive it.
|
|
418
|
+
*/
|
|
419
|
+
declare function QuantitySelector({ value, onChange, min, max, className, }: QuantitySelectorProps): React.ReactElement;
|
|
420
|
+
|
|
421
|
+
interface VariantSelectorProps {
|
|
422
|
+
variants: ProductVariant[];
|
|
423
|
+
variantAxes?: VariantAxisWithValues[];
|
|
424
|
+
basePrice?: Money;
|
|
425
|
+
selectedVariantId?: string;
|
|
426
|
+
onVariantChange: (variantId: string | undefined, variant: ProductVariant | undefined) => void;
|
|
427
|
+
className?: string;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* VariantSelector — select product variants via axis chips or direct list.
|
|
431
|
+
*
|
|
432
|
+
* Axis mode: one row of chips per axis (e.g. Size, Temperature).
|
|
433
|
+
* Direct mode: a vertical list showing variant name + full effective price.
|
|
434
|
+
*/
|
|
435
|
+
declare function VariantSelector({ variants, variantAxes, basePrice, selectedVariantId, onVariantChange, className, }: VariantSelectorProps): React.ReactElement | null;
|
|
436
|
+
|
|
437
|
+
interface AddOnSelectorProps {
|
|
438
|
+
addOns: AddOnWithOptions[];
|
|
439
|
+
selectedOptions: string[];
|
|
440
|
+
onOptionsChange: (optionIds: string[]) => void;
|
|
441
|
+
className?: string;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* AddOnSelector — modifier groups with single-select (radio) or multi-select (checkbox).
|
|
445
|
+
*
|
|
446
|
+
* Respects min/max constraints, required flags, and mutual exclusivity.
|
|
447
|
+
*/
|
|
448
|
+
declare function AddOnSelector({ addOns, selectedOptions, onOptionsChange, className, }: AddOnSelectorProps): React.ReactElement | null;
|
|
449
|
+
|
|
450
|
+
interface CompositeSelectorProps {
|
|
451
|
+
productId: string;
|
|
452
|
+
onSelectionsChange: (selections: ComponentSelectionInput[]) => void;
|
|
453
|
+
onPriceChange?: (price: CompositePriceResult | null) => void;
|
|
454
|
+
onReady?: (ready: boolean) => void;
|
|
455
|
+
className?: string;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* CompositeSelector — "build your own" product configurator.
|
|
459
|
+
*
|
|
460
|
+
* Renders component groups (e.g. "Choose your base", "Pick toppings") with
|
|
461
|
+
* min/max selection constraints. Calculates real-time pricing via the SDK.
|
|
462
|
+
*/
|
|
463
|
+
declare function CompositeSelector({ productId, onSelectionsChange, onPriceChange, onReady, className, }: CompositeSelectorProps): React.ReactElement | null;
|
|
464
|
+
|
|
465
|
+
interface BundleSelectorProps {
|
|
466
|
+
bundleIdOrSlug: string;
|
|
467
|
+
onSelectionsChange: (selections: BundleSelectionInput[]) => void;
|
|
468
|
+
onReady?: (ready: boolean) => void;
|
|
469
|
+
className?: string;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* BundleSelector — curated product set with optional variant choices.
|
|
473
|
+
*
|
|
474
|
+
* Each bundle component shows the included product. If `allow_variant_choice`
|
|
475
|
+
* is true, the customer can pick which variant they want for that slot.
|
|
476
|
+
*/
|
|
477
|
+
declare function BundleSelector({ bundleIdOrSlug, onSelectionsChange, onReady, className, }: BundleSelectorProps): React.ReactElement | null;
|
|
478
|
+
|
|
479
|
+
interface ProductCustomizerProps {
|
|
480
|
+
product: ProductWithDetails;
|
|
481
|
+
onAddToCart?: (product: ProductWithDetails, quantity: number, options: AddToCartOptions) => void | Promise<void>;
|
|
482
|
+
className?: string;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* ProductCustomizer — full product customization + add-to-cart flow.
|
|
486
|
+
*
|
|
487
|
+
* Auto-detects product_type and routes to CompositeSelector / BundleSelector /
|
|
488
|
+
* VariantSelector + AddOnSelector. Ships a built-in "Add to Cart" button with
|
|
489
|
+
* QuantitySelector. When `onAddToCart` is provided it calls that instead of
|
|
490
|
+
* using the SDK cart (escape hatch for custom logic like toasts).
|
|
491
|
+
*/
|
|
492
|
+
declare function ProductCustomizer({ product, onAddToCart, className, }: ProductCustomizerProps): React.ReactElement;
|
|
493
|
+
|
|
494
|
+
interface ProductImageGalleryProps {
|
|
495
|
+
images: string[];
|
|
496
|
+
productName: string;
|
|
497
|
+
aspectRatio?: "square" | "4/3" | "16/10" | "3/4";
|
|
498
|
+
className?: string;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* ProductImageGallery — main image + thumbnail strip.
|
|
502
|
+
*
|
|
503
|
+
* Uses plain `<img>` for framework-agnostic rendering (not Next.js Image).
|
|
504
|
+
*/
|
|
505
|
+
declare function ProductImageGallery({ images, productName, aspectRatio, className, }: ProductImageGalleryProps): React.ReactElement | null;
|
|
506
|
+
|
|
507
|
+
interface CartSummaryProps {
|
|
508
|
+
onCheckout?: () => void;
|
|
509
|
+
onItemRemove?: (itemId: string) => void;
|
|
510
|
+
onQuantityChange?: (itemId: string, quantity: number) => void;
|
|
511
|
+
emptyMessage?: string;
|
|
512
|
+
className?: string;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* CartSummary — renders cart line items + totals.
|
|
516
|
+
*
|
|
517
|
+
* NOT a drawer or modal — just the cart content. Templates wrap this in
|
|
518
|
+
* their own drawer/modal shell with animations.
|
|
519
|
+
*/
|
|
520
|
+
declare function CartSummary({ onCheckout, onItemRemove, onQuantityChange, emptyMessage, className, }: CartSummaryProps): React.ReactElement;
|
|
521
|
+
|
|
522
|
+
export { Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, BundleSelector, type BundleSelectorProps, CartSummary, type CartSummaryProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, CompositeSelector, type CompositeSelectorProps, ElementsProvider, PaymentElement, Price, type PriceProps, ProductCustomizer, type ProductCustomizerProps, ProductImageGallery, type ProductImageGalleryProps, QuantitySelector, type QuantitySelectorProps, type UseBundleOptions, type UseBundleResult, type UseCartItem, type UseCartOptions, type UseCartResult, type UseCategoriesOptions, type UseCategoriesResult, type UseCollectionOptions, type UseCollectionResult, type UseCollectionsOptions, type UseCollectionsResult, type UseCompositeOptions, type UseCompositeResult, type UseLocationsOptions, type UseLocationsResult, type UseOrderOptions, type UseOrderResult, type UseProductOptions, type UseProductResult, type UseProductsOptions, type UseProductsResult, type UseQuoteInput, type UseQuoteOptions, type UseQuoteResult, type UseSearchOptions, type UseSearchResult, VariantSelector, type VariantSelectorProps, useAds, useBundle, useCart, useCategories, useCheckout, useCimplify, useCollection, useCollections, useComposite, useElements, useElementsReady, useLocations, useOptionalCimplify, useOrder, useProduct, useProducts, useQuote, useSearch };
|