@cimplify/sdk 0.9.0 → 0.9.2
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/advanced.d.mts +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/advanced.js +1 -21
- package/dist/advanced.mjs +1 -21
- package/dist/{client-vi6GsbUP.d.ts → client-BFqLTbxI.d.ts} +1 -1
- package/dist/{client-CmnVngkm.d.mts → client-D_3KMWI_.d.mts} +1 -1
- package/dist/{index-DWl8VbnB.d.mts → index-4Ke_FJa6.d.mts} +1 -1
- package/dist/{index-UNwoWldH.d.ts → index-ynsh8lBa.d.ts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -21
- package/dist/index.mjs +1 -21
- package/dist/{payment-BNlyzm_Q.d.mts → payment-DsGQPORm.d.mts} +3 -1
- package/dist/{payment-BNlyzm_Q.d.ts → payment-DsGQPORm.d.ts} +3 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -21
- package/dist/react.mjs +1 -21
- package/dist/utils.d.mts +2 -2
- package/dist/utils.d.ts +2 -2
- package/package.json +1 -1
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-D_3KMWI_.mjs';
|
|
2
|
+
import './payment-DsGQPORm.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-BFqLTbxI.js';
|
|
2
|
+
import './payment-DsGQPORm.js';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
|
5
5
|
type SortOrder = "asc" | "desc";
|
package/dist/advanced.js
CHANGED
|
@@ -180,24 +180,6 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
180
180
|
const derivedDefaultPrice = readFinalPrice(normalized["default_price_info"]) || readFinalPrice(normalized["price_info"]) || (typeof normalized["final_price"] === "string" || typeof normalized["final_price"] === "number" ? normalized["final_price"] : void 0);
|
|
181
181
|
normalized["default_price"] = derivedDefaultPrice ?? "0";
|
|
182
182
|
}
|
|
183
|
-
const variants = normalized["variants"];
|
|
184
|
-
if (Array.isArray(variants)) {
|
|
185
|
-
normalized["variants"] = variants.map((variant) => {
|
|
186
|
-
if (!isRecord(variant)) return variant;
|
|
187
|
-
const normalizedVariant = { ...variant };
|
|
188
|
-
const variantAdjustment = normalizedVariant["price_adjustment"];
|
|
189
|
-
if (variantAdjustment === void 0 || variantAdjustment === null || variantAdjustment === "") {
|
|
190
|
-
normalizedVariant["price_adjustment"] = readFinalPrice(normalizedVariant["price_info"]) ?? "0";
|
|
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
|
-
}
|
|
198
|
-
return normalizedVariant;
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
183
|
const addOns = normalized["add_ons"];
|
|
202
184
|
if (Array.isArray(addOns)) {
|
|
203
185
|
normalized["add_ons"] = addOns.map((addOn) => normalizeAddOnPayload(addOn));
|
|
@@ -340,9 +322,7 @@ var CatalogueQueries = class {
|
|
|
340
322
|
return safe(
|
|
341
323
|
this.client.post(
|
|
342
324
|
`/api/v1/catalogue/products/${encodedId}/variants/find`,
|
|
343
|
-
{
|
|
344
|
-
axis_selections: selections
|
|
345
|
-
}
|
|
325
|
+
{ axis_selections: selections }
|
|
346
326
|
)
|
|
347
327
|
);
|
|
348
328
|
}
|
package/dist/advanced.mjs
CHANGED
|
@@ -178,24 +178,6 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
178
178
|
const derivedDefaultPrice = readFinalPrice(normalized["default_price_info"]) || readFinalPrice(normalized["price_info"]) || (typeof normalized["final_price"] === "string" || typeof normalized["final_price"] === "number" ? normalized["final_price"] : void 0);
|
|
179
179
|
normalized["default_price"] = derivedDefaultPrice ?? "0";
|
|
180
180
|
}
|
|
181
|
-
const variants = normalized["variants"];
|
|
182
|
-
if (Array.isArray(variants)) {
|
|
183
|
-
normalized["variants"] = variants.map((variant) => {
|
|
184
|
-
if (!isRecord(variant)) return variant;
|
|
185
|
-
const normalizedVariant = { ...variant };
|
|
186
|
-
const variantAdjustment = normalizedVariant["price_adjustment"];
|
|
187
|
-
if (variantAdjustment === void 0 || variantAdjustment === null || variantAdjustment === "") {
|
|
188
|
-
normalizedVariant["price_adjustment"] = readFinalPrice(normalizedVariant["price_info"]) ?? "0";
|
|
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
|
-
}
|
|
196
|
-
return normalizedVariant;
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
181
|
const addOns = normalized["add_ons"];
|
|
200
182
|
if (Array.isArray(addOns)) {
|
|
201
183
|
normalized["add_ons"] = addOns.map((addOn) => normalizeAddOnPayload(addOn));
|
|
@@ -338,9 +320,7 @@ var CatalogueQueries = class {
|
|
|
338
320
|
return safe(
|
|
339
321
|
this.client.post(
|
|
340
322
|
`/api/v1/catalogue/products/${encodedId}/variants/find`,
|
|
341
|
-
{
|
|
342
|
-
axis_selections: selections
|
|
343
|
-
}
|
|
323
|
+
{ axis_selections: selections }
|
|
344
324
|
)
|
|
345
325
|
);
|
|
346
326
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as Category, s as Product, H as AddOnWithOptions, d as Pagination, h as CimplifyError, t as ProductWithDetails, u as ProductVariant, w as VariantAxis, F as VariantAxisSelection, G as AddOn, Q as Collection, W as Bundle, _ as BundleWithDetails, a4 as Composite, a5 as CompositeWithDetails, a9 as ComponentSelectionInput, aa as CompositePriceResult, ap as ChosenPrice, aU as UICart, aF as Cart, aG as CartItem, aY as CartSummary, aW as AddToCartInput, aX as UpdateCartItemInput, at as DiscountDetails, M as Money, C as CurrencyCode, aE as LineConfiguration, b0 as AuthorizationType, b2 as PaymentMethod, b4 as InitializePaymentResult, b8 as SubmitAuthorizationInput, b6 as PaymentStatusResponse } from './payment-DsGQPORm.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Observability hooks for monitoring SDK behavior.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as Category, s as Product, H as AddOnWithOptions, d as Pagination, h as CimplifyError, t as ProductWithDetails, u as ProductVariant, w as VariantAxis, F as VariantAxisSelection, G as AddOn, Q as Collection, W as Bundle, _ as BundleWithDetails, a4 as Composite, a5 as CompositeWithDetails, a9 as ComponentSelectionInput, aa as CompositePriceResult, ap as ChosenPrice, aU as UICart, aF as Cart, aG as CartItem, aY as CartSummary, aW as AddToCartInput, aX as UpdateCartItemInput, at as DiscountDetails, M as Money, C as CurrencyCode, aE as LineConfiguration, b0 as AuthorizationType, b2 as PaymentMethod, b4 as InitializePaymentResult, b8 as SubmitAuthorizationInput, b6 as PaymentStatusResponse } from './payment-DsGQPORm.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Observability hooks for monitoring SDK behavior.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ap as ChosenPrice, C as CurrencyCode, am as TaxPathComponent, an as PricePathTaxInfo, M as Money, b7 as PaymentErrorDetails, b5 as PaymentResponse, b6 as PaymentStatusResponse } from './payment-DsGQPORm.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Price Types
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ap as ChosenPrice, C as CurrencyCode, am as TaxPathComponent, an as PricePathTaxInfo, M as Money, b7 as PaymentErrorDetails, b5 as PaymentResponse, b6 as PaymentStatusResponse } from './payment-DsGQPORm.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Price Types
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-D_3KMWI_.mjs';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.mjs';
|
|
3
|
-
import { A as ApiError } from './payment-
|
|
4
|
-
export {
|
|
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-
|
|
3
|
+
import { A as ApiError } from './payment-DsGQPORm.mjs';
|
|
4
|
+
export { G as AddOn, av as AddOnDetails, aR as AddOnGroupDetails, J as AddOnOption, aQ as AddOnOptionDetails, K as AddOnOptionPrice, H as AddOnWithOptions, aW as AddToCartInput, ak as AdjustmentType, ar as AppliedDiscount, b0 as AuthorizationType, aq as BenefitType, W as Bundle, $ as BundleComponentData, a0 as BundleComponentInfo, U as BundlePriceType, Y as BundleProduct, aA as BundleSelectionData, ay as BundleSelectionInput, az as BundleStoredSelection, X as BundleSummary, _ as BundleWithDetails, aF as Cart, aw as CartAddOn, ai as CartChannel, aG as CartItem, aT as CartItemDetails, ah as CartStatus, aY as CartSummary, aH as CartTotals, N as Category, O as CategorySummary, ap as ChosenPrice, h as CimplifyError, Q as Collection, T as CollectionProduct, R as CollectionSummary, a6 as ComponentGroup, a7 as ComponentGroupWithComponents, ab as ComponentPriceBreakdown, a9 as ComponentSelectionInput, a3 as ComponentSourceType, a4 as Composite, a8 as CompositeComponent, aC as CompositePriceBreakdown, aa as CompositePriceResult, a1 as CompositePricingMode, aD as CompositeSelectionData, a9 as CompositeSelectionInput, aB as CompositeStoredSelection, a5 as CompositeWithDetails, b as Currency, C as CurrencyCode, r as DepositType, q as DigitalProductType, as as DiscountBreakdown, at as DiscountDetails, aK as DisplayAddOn, aL as DisplayAddOnOption, aI as DisplayCart, aJ as DisplayCartItem, D as DisplayMode, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a2 as GroupPricingBehavior, b4 as InitializePaymentResult, I as InventoryType, aE as LineConfiguration, ae as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b3 as Payment, b7 as PaymentErrorDetails, b2 as PaymentMethod, a$ as PaymentMethodType, b1 as PaymentProcessingState, a_ as PaymentProvider, b5 as PaymentResponse, aZ as PaymentStatus, b6 as PaymentStatusResponse, ad as Price, al as PriceAdjustment, ao as PriceDecisionPath, ac as PriceEntryType, an as PricePathTaxInfo, aj as PriceSource, s as Product, L as ProductAddOn, af as ProductAvailability, p as ProductRenderHint, ag as ProductTimeProfile, o as ProductType, u as ProductVariant, z as ProductVariantValue, t as ProductWithDetails, S as SalesChannel, au as SelectedAddOnOption, b8 as SubmitAuthorizationInput, am as TaxPathComponent, aU as UICart, aM as UICartBusiness, aO as UICartCustomer, aN as UICartLocation, aP as UICartPricing, aV as UICartResponse, aX as UpdateCartItemInput, w as VariantAxis, F as VariantAxisSelection, y as VariantAxisValue, x as VariantAxisWithValues, ax as VariantDetails, aS as VariantDetailsDTO, v as VariantDisplayAttribute, B 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-DsGQPORm.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-4Ke_FJa6.mjs';
|
|
6
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 */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-BFqLTbxI.js';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.js';
|
|
3
|
-
import { A as ApiError } from './payment-
|
|
4
|
-
export {
|
|
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-
|
|
3
|
+
import { A as ApiError } from './payment-DsGQPORm.js';
|
|
4
|
+
export { G as AddOn, av as AddOnDetails, aR as AddOnGroupDetails, J as AddOnOption, aQ as AddOnOptionDetails, K as AddOnOptionPrice, H as AddOnWithOptions, aW as AddToCartInput, ak as AdjustmentType, ar as AppliedDiscount, b0 as AuthorizationType, aq as BenefitType, W as Bundle, $ as BundleComponentData, a0 as BundleComponentInfo, U as BundlePriceType, Y as BundleProduct, aA as BundleSelectionData, ay as BundleSelectionInput, az as BundleStoredSelection, X as BundleSummary, _ as BundleWithDetails, aF as Cart, aw as CartAddOn, ai as CartChannel, aG as CartItem, aT as CartItemDetails, ah as CartStatus, aY as CartSummary, aH as CartTotals, N as Category, O as CategorySummary, ap as ChosenPrice, h as CimplifyError, Q as Collection, T as CollectionProduct, R as CollectionSummary, a6 as ComponentGroup, a7 as ComponentGroupWithComponents, ab as ComponentPriceBreakdown, a9 as ComponentSelectionInput, a3 as ComponentSourceType, a4 as Composite, a8 as CompositeComponent, aC as CompositePriceBreakdown, aa as CompositePriceResult, a1 as CompositePricingMode, aD as CompositeSelectionData, a9 as CompositeSelectionInput, aB as CompositeStoredSelection, a5 as CompositeWithDetails, b as Currency, C as CurrencyCode, r as DepositType, q as DigitalProductType, as as DiscountBreakdown, at as DiscountDetails, aK as DisplayAddOn, aL as DisplayAddOnOption, aI as DisplayCart, aJ as DisplayCartItem, D as DisplayMode, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a2 as GroupPricingBehavior, b4 as InitializePaymentResult, I as InventoryType, aE as LineConfiguration, ae as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b3 as Payment, b7 as PaymentErrorDetails, b2 as PaymentMethod, a$ as PaymentMethodType, b1 as PaymentProcessingState, a_ as PaymentProvider, b5 as PaymentResponse, aZ as PaymentStatus, b6 as PaymentStatusResponse, ad as Price, al as PriceAdjustment, ao as PriceDecisionPath, ac as PriceEntryType, an as PricePathTaxInfo, aj as PriceSource, s as Product, L as ProductAddOn, af as ProductAvailability, p as ProductRenderHint, ag as ProductTimeProfile, o as ProductType, u as ProductVariant, z as ProductVariantValue, t as ProductWithDetails, S as SalesChannel, au as SelectedAddOnOption, b8 as SubmitAuthorizationInput, am as TaxPathComponent, aU as UICart, aM as UICartBusiness, aO as UICartCustomer, aN as UICartLocation, aP as UICartPricing, aV as UICartResponse, aX as UpdateCartItemInput, w as VariantAxis, F as VariantAxisSelection, y as VariantAxisValue, x as VariantAxisWithValues, ax as VariantDetails, aS as VariantDetailsDTO, v as VariantDisplayAttribute, B 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-DsGQPORm.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-ynsh8lBa.js';
|
|
6
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 */
|
package/dist/index.js
CHANGED
|
@@ -349,24 +349,6 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
349
349
|
const derivedDefaultPrice = readFinalPrice(normalized["default_price_info"]) || readFinalPrice(normalized["price_info"]) || (typeof normalized["final_price"] === "string" || typeof normalized["final_price"] === "number" ? normalized["final_price"] : void 0);
|
|
350
350
|
normalized["default_price"] = derivedDefaultPrice ?? "0";
|
|
351
351
|
}
|
|
352
|
-
const variants = normalized["variants"];
|
|
353
|
-
if (Array.isArray(variants)) {
|
|
354
|
-
normalized["variants"] = variants.map((variant) => {
|
|
355
|
-
if (!isRecord(variant)) return variant;
|
|
356
|
-
const normalizedVariant = { ...variant };
|
|
357
|
-
const variantAdjustment = normalizedVariant["price_adjustment"];
|
|
358
|
-
if (variantAdjustment === void 0 || variantAdjustment === null || variantAdjustment === "") {
|
|
359
|
-
normalizedVariant["price_adjustment"] = readFinalPrice(normalizedVariant["price_info"]) ?? "0";
|
|
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
|
-
}
|
|
367
|
-
return normalizedVariant;
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
352
|
const addOns = normalized["add_ons"];
|
|
371
353
|
if (Array.isArray(addOns)) {
|
|
372
354
|
normalized["add_ons"] = addOns.map((addOn) => normalizeAddOnPayload(addOn));
|
|
@@ -509,9 +491,7 @@ var CatalogueQueries = class {
|
|
|
509
491
|
return safe(
|
|
510
492
|
this.client.post(
|
|
511
493
|
`/api/v1/catalogue/products/${encodedId}/variants/find`,
|
|
512
|
-
{
|
|
513
|
-
axis_selections: selections
|
|
514
|
-
}
|
|
494
|
+
{ axis_selections: selections }
|
|
515
495
|
)
|
|
516
496
|
);
|
|
517
497
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -347,24 +347,6 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
347
347
|
const derivedDefaultPrice = readFinalPrice(normalized["default_price_info"]) || readFinalPrice(normalized["price_info"]) || (typeof normalized["final_price"] === "string" || typeof normalized["final_price"] === "number" ? normalized["final_price"] : void 0);
|
|
348
348
|
normalized["default_price"] = derivedDefaultPrice ?? "0";
|
|
349
349
|
}
|
|
350
|
-
const variants = normalized["variants"];
|
|
351
|
-
if (Array.isArray(variants)) {
|
|
352
|
-
normalized["variants"] = variants.map((variant) => {
|
|
353
|
-
if (!isRecord(variant)) return variant;
|
|
354
|
-
const normalizedVariant = { ...variant };
|
|
355
|
-
const variantAdjustment = normalizedVariant["price_adjustment"];
|
|
356
|
-
if (variantAdjustment === void 0 || variantAdjustment === null || variantAdjustment === "") {
|
|
357
|
-
normalizedVariant["price_adjustment"] = readFinalPrice(normalizedVariant["price_info"]) ?? "0";
|
|
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
|
-
}
|
|
365
|
-
return normalizedVariant;
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
350
|
const addOns = normalized["add_ons"];
|
|
369
351
|
if (Array.isArray(addOns)) {
|
|
370
352
|
normalized["add_ons"] = addOns.map((addOn) => normalizeAddOnPayload(addOn));
|
|
@@ -507,9 +489,7 @@ var CatalogueQueries = class {
|
|
|
507
489
|
return safe(
|
|
508
490
|
this.client.post(
|
|
509
491
|
`/api/v1/catalogue/products/${encodedId}/variants/find`,
|
|
510
|
-
{
|
|
511
|
-
axis_selections: selections
|
|
512
|
-
}
|
|
492
|
+
{ axis_selections: selections }
|
|
513
493
|
)
|
|
514
494
|
);
|
|
515
495
|
}
|
|
@@ -126,6 +126,7 @@ declare function isRetryableError(error: unknown): boolean;
|
|
|
126
126
|
|
|
127
127
|
type ProductType = "product" | "service" | "digital" | "bundle" | "composite";
|
|
128
128
|
type ProductRenderHint = "food" | "physical" | "general";
|
|
129
|
+
type DisplayMode = "card" | "page";
|
|
129
130
|
type InventoryType = "one_to_one" | "composition" | "none";
|
|
130
131
|
type VariantStrategy = "fetch_all" | "use_axes";
|
|
131
132
|
type DigitalProductType = "download" | "license_key" | "ticket" | "access_grant" | "redemption_code";
|
|
@@ -145,6 +146,7 @@ interface Product {
|
|
|
145
146
|
product_type: ProductType;
|
|
146
147
|
/** Server-derived UI hint for conditional rendering. */
|
|
147
148
|
render_hint?: ProductRenderHint;
|
|
149
|
+
display_mode?: DisplayMode;
|
|
148
150
|
inventory_type: InventoryType;
|
|
149
151
|
variant_strategy: VariantStrategy;
|
|
150
152
|
is_active: boolean;
|
|
@@ -1131,4 +1133,4 @@ interface SubmitAuthorizationInput {
|
|
|
1131
1133
|
value: string;
|
|
1132
1134
|
}
|
|
1133
1135
|
|
|
1134
|
-
export { type
|
|
1136
|
+
export { type BundleComponentData as $, type ApiError as A, type VariantLocationAvailability as B, type CurrencyCode as C, type DisplayMode as D, ErrorCode as E, type VariantAxisSelection as F, type AddOn as G, type AddOnWithOptions as H, type InventoryType as I, type AddOnOption as J, type AddOnOptionPrice as K, type ProductAddOn as L, type Money as M, type Category as N, type CategorySummary as O, type PaginationParams as P, type Collection as Q, type CollectionSummary as R, type SalesChannel as S, type CollectionProduct as T, type BundlePriceType as U, type VariantStrategy as V, type Bundle as W, type BundleSummary as X, type BundleProduct as Y, ZERO as Z, type BundleWithDetails as _, moneyFromNumber as a, type PaymentMethodType as a$, type BundleComponentInfo as a0, type CompositePricingMode as a1, type GroupPricingBehavior as a2, type ComponentSourceType as a3, type Composite as a4, type CompositeWithDetails as a5, type ComponentGroup as a6, type ComponentGroupWithComponents as a7, type CompositeComponent as a8, type ComponentSelectionInput as a9, type BundleSelectionData as aA, type CompositeStoredSelection as aB, type CompositePriceBreakdown as aC, type CompositeSelectionData as aD, type LineConfiguration as aE, type Cart as aF, type CartItem as aG, type CartTotals as aH, type DisplayCart as aI, type DisplayCartItem as aJ, type DisplayAddOn as aK, type DisplayAddOnOption as aL, type UICartBusiness as aM, type UICartLocation as aN, type UICartCustomer as aO, type UICartPricing as aP, type AddOnOptionDetails as aQ, type AddOnGroupDetails as aR, type VariantDetailsDTO as aS, type CartItemDetails as aT, type UICart as aU, type UICartResponse as aV, type AddToCartInput as aW, type UpdateCartItemInput as aX, type CartSummary as aY, type PaymentStatus as aZ, type PaymentProvider as a_, type CompositePriceResult as aa, type ComponentPriceBreakdown as ab, type PriceEntryType as ac, type Price as ad, type LocationProductPrice as ae, type ProductAvailability as af, type ProductTimeProfile as ag, type CartStatus as ah, type CartChannel as ai, type PriceSource as aj, type AdjustmentType as ak, type PriceAdjustment as al, type TaxPathComponent as am, type PricePathTaxInfo as an, type PriceDecisionPath as ao, type ChosenPrice as ap, type BenefitType as aq, type AppliedDiscount as ar, type DiscountBreakdown as as, type DiscountDetails as at, type SelectedAddOnOption as au, type AddOnDetails as av, type CartAddOn as aw, type VariantDetails as ax, type BundleSelectionInput as ay, type BundleStoredSelection as az, type Currency as b, type AuthorizationType as b0, type PaymentProcessingState as b1, type PaymentMethod as b2, type Payment as b3, type InitializePaymentResult as b4, type PaymentResponse as b5, type PaymentStatusResponse as b6, type PaymentErrorDetails as b7, type SubmitAuthorizationInput as b8, currencyCode as c, type Pagination as d, type ErrorCodeType as e, type ErrorHint as f, ERROR_HINTS as g, CimplifyError as h, isSupportedCurrency as i, isCimplifyError as j, getErrorHint as k, enrichError as l, money as m, isRetryableError as n, type ProductType as o, type ProductRenderHint as p, type DigitalProductType as q, type DepositType as r, type Product as s, type ProductWithDetails as t, type ProductVariant as u, type VariantDisplayAttribute as v, type VariantAxis as w, type VariantAxisWithValues as x, type VariantAxisValue as y, type ProductVariantValue as z };
|
|
@@ -126,6 +126,7 @@ declare function isRetryableError(error: unknown): boolean;
|
|
|
126
126
|
|
|
127
127
|
type ProductType = "product" | "service" | "digital" | "bundle" | "composite";
|
|
128
128
|
type ProductRenderHint = "food" | "physical" | "general";
|
|
129
|
+
type DisplayMode = "card" | "page";
|
|
129
130
|
type InventoryType = "one_to_one" | "composition" | "none";
|
|
130
131
|
type VariantStrategy = "fetch_all" | "use_axes";
|
|
131
132
|
type DigitalProductType = "download" | "license_key" | "ticket" | "access_grant" | "redemption_code";
|
|
@@ -145,6 +146,7 @@ interface Product {
|
|
|
145
146
|
product_type: ProductType;
|
|
146
147
|
/** Server-derived UI hint for conditional rendering. */
|
|
147
148
|
render_hint?: ProductRenderHint;
|
|
149
|
+
display_mode?: DisplayMode;
|
|
148
150
|
inventory_type: InventoryType;
|
|
149
151
|
variant_strategy: VariantStrategy;
|
|
150
152
|
is_active: boolean;
|
|
@@ -1131,4 +1133,4 @@ interface SubmitAuthorizationInput {
|
|
|
1131
1133
|
value: string;
|
|
1132
1134
|
}
|
|
1133
1135
|
|
|
1134
|
-
export { type
|
|
1136
|
+
export { type BundleComponentData as $, type ApiError as A, type VariantLocationAvailability as B, type CurrencyCode as C, type DisplayMode as D, ErrorCode as E, type VariantAxisSelection as F, type AddOn as G, type AddOnWithOptions as H, type InventoryType as I, type AddOnOption as J, type AddOnOptionPrice as K, type ProductAddOn as L, type Money as M, type Category as N, type CategorySummary as O, type PaginationParams as P, type Collection as Q, type CollectionSummary as R, type SalesChannel as S, type CollectionProduct as T, type BundlePriceType as U, type VariantStrategy as V, type Bundle as W, type BundleSummary as X, type BundleProduct as Y, ZERO as Z, type BundleWithDetails as _, moneyFromNumber as a, type PaymentMethodType as a$, type BundleComponentInfo as a0, type CompositePricingMode as a1, type GroupPricingBehavior as a2, type ComponentSourceType as a3, type Composite as a4, type CompositeWithDetails as a5, type ComponentGroup as a6, type ComponentGroupWithComponents as a7, type CompositeComponent as a8, type ComponentSelectionInput as a9, type BundleSelectionData as aA, type CompositeStoredSelection as aB, type CompositePriceBreakdown as aC, type CompositeSelectionData as aD, type LineConfiguration as aE, type Cart as aF, type CartItem as aG, type CartTotals as aH, type DisplayCart as aI, type DisplayCartItem as aJ, type DisplayAddOn as aK, type DisplayAddOnOption as aL, type UICartBusiness as aM, type UICartLocation as aN, type UICartCustomer as aO, type UICartPricing as aP, type AddOnOptionDetails as aQ, type AddOnGroupDetails as aR, type VariantDetailsDTO as aS, type CartItemDetails as aT, type UICart as aU, type UICartResponse as aV, type AddToCartInput as aW, type UpdateCartItemInput as aX, type CartSummary as aY, type PaymentStatus as aZ, type PaymentProvider as a_, type CompositePriceResult as aa, type ComponentPriceBreakdown as ab, type PriceEntryType as ac, type Price as ad, type LocationProductPrice as ae, type ProductAvailability as af, type ProductTimeProfile as ag, type CartStatus as ah, type CartChannel as ai, type PriceSource as aj, type AdjustmentType as ak, type PriceAdjustment as al, type TaxPathComponent as am, type PricePathTaxInfo as an, type PriceDecisionPath as ao, type ChosenPrice as ap, type BenefitType as aq, type AppliedDiscount as ar, type DiscountBreakdown as as, type DiscountDetails as at, type SelectedAddOnOption as au, type AddOnDetails as av, type CartAddOn as aw, type VariantDetails as ax, type BundleSelectionInput as ay, type BundleStoredSelection as az, type Currency as b, type AuthorizationType as b0, type PaymentProcessingState as b1, type PaymentMethod as b2, type Payment as b3, type InitializePaymentResult as b4, type PaymentResponse as b5, type PaymentStatusResponse as b6, type PaymentErrorDetails as b7, type SubmitAuthorizationInput as b8, currencyCode as c, type Pagination as d, type ErrorCodeType as e, type ErrorHint as f, ERROR_HINTS as g, CimplifyError as h, isSupportedCurrency as i, isCimplifyError as j, getErrorHint as k, enrichError as l, money as m, isRetryableError as n, type ProductType as o, type ProductRenderHint as p, type DigitalProductType as q, type DepositType as r, type Product as s, type ProductWithDetails as t, type ProductVariant as u, type VariantDisplayAttribute as v, type VariantAxis as w, type VariantAxisWithValues as x, type VariantAxisValue as y, type ProductVariantValue as z };
|
package/dist/react.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-DeL3PGzf.mjs';
|
|
3
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-
|
|
5
|
-
import {
|
|
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-D_3KMWI_.mjs';
|
|
5
|
+
import { s as Product, d as Pagination, h as CimplifyError, t as ProductWithDetails, N as Category, ay as BundleSelectionInput, a9 as ComponentSelectionInput, Q as Collection, _ as BundleWithDetails, a5 as CompositeWithDetails, aa as CompositePriceResult, C as CurrencyCode, u as ProductVariant, x as VariantAxisWithValues, M as Money, H as AddOnWithOptions } from './payment-DsGQPORm.mjs';
|
|
6
6
|
|
|
7
7
|
interface UserIdentity {
|
|
8
8
|
uid: string;
|
package/dist/react.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-DeL3PGzf.js';
|
|
3
3
|
export { c as AdConfig, g as getVariantDisplayName } from './ads-DeL3PGzf.js';
|
|
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 {
|
|
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-BFqLTbxI.js';
|
|
5
|
+
import { s as Product, d as Pagination, h as CimplifyError, t as ProductWithDetails, N as Category, ay as BundleSelectionInput, a9 as ComponentSelectionInput, Q as Collection, _ as BundleWithDetails, a5 as CompositeWithDetails, aa as CompositePriceResult, C as CurrencyCode, u as ProductVariant, x as VariantAxisWithValues, M as Money, H as AddOnWithOptions } from './payment-DsGQPORm.js';
|
|
6
6
|
|
|
7
7
|
interface UserIdentity {
|
|
8
8
|
uid: string;
|
package/dist/react.js
CHANGED
|
@@ -603,24 +603,6 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
603
603
|
const derivedDefaultPrice = readFinalPrice(normalized["default_price_info"]) || readFinalPrice(normalized["price_info"]) || (typeof normalized["final_price"] === "string" || typeof normalized["final_price"] === "number" ? normalized["final_price"] : void 0);
|
|
604
604
|
normalized["default_price"] = derivedDefaultPrice ?? "0";
|
|
605
605
|
}
|
|
606
|
-
const variants = normalized["variants"];
|
|
607
|
-
if (Array.isArray(variants)) {
|
|
608
|
-
normalized["variants"] = variants.map((variant) => {
|
|
609
|
-
if (!isRecord(variant)) return variant;
|
|
610
|
-
const normalizedVariant = { ...variant };
|
|
611
|
-
const variantAdjustment = normalizedVariant["price_adjustment"];
|
|
612
|
-
if (variantAdjustment === void 0 || variantAdjustment === null || variantAdjustment === "") {
|
|
613
|
-
normalizedVariant["price_adjustment"] = readFinalPrice(normalizedVariant["price_info"]) ?? "0";
|
|
614
|
-
}
|
|
615
|
-
if (!normalizedVariant["name"]) {
|
|
616
|
-
const attrs = normalizedVariant["display_attributes"];
|
|
617
|
-
if (Array.isArray(attrs) && attrs.length > 0) {
|
|
618
|
-
normalizedVariant["name"] = attrs.map((a) => a.value_name).filter(Boolean).join(" / ");
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
return normalizedVariant;
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
606
|
const addOns = normalized["add_ons"];
|
|
625
607
|
if (Array.isArray(addOns)) {
|
|
626
608
|
normalized["add_ons"] = addOns.map((addOn) => normalizeAddOnPayload(addOn));
|
|
@@ -763,9 +745,7 @@ var CatalogueQueries = class {
|
|
|
763
745
|
return safe(
|
|
764
746
|
this.client.post(
|
|
765
747
|
`/api/v1/catalogue/products/${encodedId}/variants/find`,
|
|
766
|
-
{
|
|
767
|
-
axis_selections: selections
|
|
768
|
-
}
|
|
748
|
+
{ axis_selections: selections }
|
|
769
749
|
)
|
|
770
750
|
);
|
|
771
751
|
}
|
package/dist/react.mjs
CHANGED
|
@@ -597,24 +597,6 @@ function normalizeCatalogueProductPayload(product) {
|
|
|
597
597
|
const derivedDefaultPrice = readFinalPrice(normalized["default_price_info"]) || readFinalPrice(normalized["price_info"]) || (typeof normalized["final_price"] === "string" || typeof normalized["final_price"] === "number" ? normalized["final_price"] : void 0);
|
|
598
598
|
normalized["default_price"] = derivedDefaultPrice ?? "0";
|
|
599
599
|
}
|
|
600
|
-
const variants = normalized["variants"];
|
|
601
|
-
if (Array.isArray(variants)) {
|
|
602
|
-
normalized["variants"] = variants.map((variant) => {
|
|
603
|
-
if (!isRecord(variant)) return variant;
|
|
604
|
-
const normalizedVariant = { ...variant };
|
|
605
|
-
const variantAdjustment = normalizedVariant["price_adjustment"];
|
|
606
|
-
if (variantAdjustment === void 0 || variantAdjustment === null || variantAdjustment === "") {
|
|
607
|
-
normalizedVariant["price_adjustment"] = readFinalPrice(normalizedVariant["price_info"]) ?? "0";
|
|
608
|
-
}
|
|
609
|
-
if (!normalizedVariant["name"]) {
|
|
610
|
-
const attrs = normalizedVariant["display_attributes"];
|
|
611
|
-
if (Array.isArray(attrs) && attrs.length > 0) {
|
|
612
|
-
normalizedVariant["name"] = attrs.map((a) => a.value_name).filter(Boolean).join(" / ");
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
return normalizedVariant;
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
600
|
const addOns = normalized["add_ons"];
|
|
619
601
|
if (Array.isArray(addOns)) {
|
|
620
602
|
normalized["add_ons"] = addOns.map((addOn) => normalizeAddOnPayload(addOn));
|
|
@@ -757,9 +739,7 @@ var CatalogueQueries = class {
|
|
|
757
739
|
return safe(
|
|
758
740
|
this.client.post(
|
|
759
741
|
`/api/v1/catalogue/products/${encodedId}/variants/find`,
|
|
760
|
-
{
|
|
761
|
-
axis_selections: selections
|
|
762
|
-
}
|
|
742
|
+
{ axis_selections: selections }
|
|
763
743
|
)
|
|
764
744
|
);
|
|
765
745
|
}
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, 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-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, 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-4Ke_FJa6.mjs';
|
|
2
|
+
import './payment-DsGQPORm.mjs';
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, 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-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, 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-ynsh8lBa.js';
|
|
2
|
+
import './payment-DsGQPORm.js';
|