@cimplify/sdk 0.16.2 → 0.16.3
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 +9 -2
- package/dist/advanced.mjs +9 -2
- package/dist/{client-DTTtSSmQ.d.ts → client-BaolRdB4.d.mts} +3 -3
- package/dist/{client-Cb7r8u6t.d.mts → client-C59R79gx.d.ts} +3 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +13 -5
- package/dist/index.mjs +13 -5
- package/dist/{payment-Dvd7nRmk.d.mts → payment-C6ULw3K-.d.mts} +1 -1
- package/dist/{payment-Dvd7nRmk.d.ts → payment-C6ULw3K-.d.ts} +1 -1
- package/dist/{price-DrfhwHpw.d.ts → price-Bd6JBV8W.d.ts} +1 -1
- package/dist/{price-BDZNXiLS.d.mts → price-CbR6DCt0.d.mts} +1 -1
- package/dist/react.d.mts +3 -3
- package/dist/react.d.ts +3 -3
- package/dist/react.js +9 -2
- package/dist/react.mjs +9 -2
- package/dist/utils.d.mts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +4 -3
- package/dist/utils.mjs +4 -3
- package/package.json +1 -1
package/dist/advanced.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, k as CheckoutOperations, k as CheckoutService, x as CimplifyElement, w as CimplifyElements, z as ELEMENT_TYPES, E as EVENT_TYPES, K as ElementEventType, H as ElementOptions, J as ElementType, D as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q 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, i as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, y as createElements, l as generateIdempotencyKey } from './client-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, k as CheckoutOperations, k as CheckoutService, x as CimplifyElement, w as CimplifyElements, z as ELEMENT_TYPES, E as EVENT_TYPES, K as ElementEventType, H as ElementOptions, J as ElementType, D as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q 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, i as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, y as createElements, l as generateIdempotencyKey } from './client-BaolRdB4.mjs';
|
|
2
|
+
import './payment-C6ULw3K-.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, j as CartOperations, b as CatalogueQueries, k as CheckoutOperations, k as CheckoutService, x as CimplifyElement, w as CimplifyElements, z as ELEMENT_TYPES, E as EVENT_TYPES, K as ElementEventType, H as ElementOptions, J as ElementType, D as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q 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, i as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, y as createElements, l as generateIdempotencyKey } from './client-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, k as CheckoutOperations, k as CheckoutService, x as CimplifyElement, w as CimplifyElements, z as ELEMENT_TYPES, E as EVENT_TYPES, K as ElementEventType, H as ElementOptions, J as ElementType, D as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q 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, i as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, y as createElements, l as generateIdempotencyKey } from './client-C59R79gx.js';
|
|
2
|
+
import './payment-C6ULw3K-.js';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
|
5
5
|
type SortOrder = "asc" | "desc";
|
package/dist/advanced.js
CHANGED
|
@@ -866,9 +866,16 @@ function isValidMobileMoneyProvider(value) {
|
|
|
866
866
|
return VALID_MOBILE_MONEY_PROVIDERS.has(value);
|
|
867
867
|
}
|
|
868
868
|
function normalizeAuthorizationType(value) {
|
|
869
|
+
if (value && typeof value === "object" && "address" in value) {
|
|
870
|
+
return "address";
|
|
871
|
+
}
|
|
869
872
|
if (typeof value !== "string") return void 0;
|
|
870
|
-
const
|
|
871
|
-
|
|
873
|
+
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
874
|
+
if (normalized === "otp" || normalized === "pin") return normalized;
|
|
875
|
+
if (normalized === "phone" || normalized === "birthday" || normalized === "address") {
|
|
876
|
+
return normalized;
|
|
877
|
+
}
|
|
878
|
+
return void 0;
|
|
872
879
|
}
|
|
873
880
|
function formatMoney2(value) {
|
|
874
881
|
if (typeof value === "number" && Number.isFinite(value)) {
|
package/dist/advanced.mjs
CHANGED
|
@@ -864,9 +864,16 @@ function isValidMobileMoneyProvider(value) {
|
|
|
864
864
|
return VALID_MOBILE_MONEY_PROVIDERS.has(value);
|
|
865
865
|
}
|
|
866
866
|
function normalizeAuthorizationType(value) {
|
|
867
|
+
if (value && typeof value === "object" && "address" in value) {
|
|
868
|
+
return "address";
|
|
869
|
+
}
|
|
867
870
|
if (typeof value !== "string") return void 0;
|
|
868
|
-
const
|
|
869
|
-
|
|
871
|
+
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
872
|
+
if (normalized === "otp" || normalized === "pin") return normalized;
|
|
873
|
+
if (normalized === "phone" || normalized === "birthday" || normalized === "address") {
|
|
874
|
+
return normalized;
|
|
875
|
+
}
|
|
876
|
+
return void 0;
|
|
870
877
|
}
|
|
871
878
|
function formatMoney2(value) {
|
|
872
879
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as Category, r as Product, G as AddOnWithOptions, b as Pagination, g as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, W as BundleSummary, U as Bundle, a7 as Composite, ae as ComponentSelectionInput, af as CompositePriceResult, aD as ChosenPrice, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, ao as ProductAvailabilityNow, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, au as TagsResponse, b6 as UICart, aT as Cart, aU as CartItem, ba as CartSummary, b8 as AddToCartInput, b9 as UpdateCartItemInput, aH as DiscountDetails, M as Money, C as CurrencyCode, aS as LineConfiguration, bf as AuthorizationType, bh as PaymentMethod, bj as InitializePaymentResult, bn as SubmitAuthorizationInput, bl as PaymentStatusResponse } from './payment-
|
|
1
|
+
import { L as Category, r as Product, G as AddOnWithOptions, b as Pagination, g as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, W as BundleSummary, U as Bundle, a7 as Composite, ae as ComponentSelectionInput, af as CompositePriceResult, aD as ChosenPrice, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, ao as ProductAvailabilityNow, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, au as TagsResponse, b6 as UICart, aT as Cart, aU as CartItem, ba as CartSummary, b8 as AddToCartInput, b9 as UpdateCartItemInput, aH as DiscountDetails, M as Money, C as CurrencyCode, aS as LineConfiguration, bf as AuthorizationType, bh as PaymentMethod, bj as InitializePaymentResult, bn as SubmitAuthorizationInput, bl as PaymentStatusResponse } from './payment-C6ULw3K-.mjs';
|
|
2
2
|
|
|
3
3
|
interface RequestContext {
|
|
4
4
|
method: "GET" | "POST" | "PATCH" | "DELETE";
|
|
@@ -972,7 +972,7 @@ interface CheckoutResult {
|
|
|
972
972
|
type CheckoutStatus = "preparing" | "recovering" | "processing" | "awaiting_authorization" | "polling" | "finalizing" | "success" | "failed";
|
|
973
973
|
interface CheckoutStatusContext {
|
|
974
974
|
display_text?: string;
|
|
975
|
-
authorization_type?: "otp" | "pin";
|
|
975
|
+
authorization_type?: "otp" | "pin" | "phone" | "birthday" | "address";
|
|
976
976
|
poll_attempt?: number;
|
|
977
977
|
max_poll_attempts?: number;
|
|
978
978
|
order_id?: string;
|
|
@@ -1015,7 +1015,7 @@ interface ProcessAndResolveOptions {
|
|
|
1015
1015
|
poll_interval_ms?: number;
|
|
1016
1016
|
max_poll_attempts?: number;
|
|
1017
1017
|
on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void;
|
|
1018
|
-
on_authorization_required?: (type: "otp" | "pin", submit: (code: string) => Promise<void>) => void | Promise<void>;
|
|
1018
|
+
on_authorization_required?: (type: "otp" | "pin" | "phone" | "birthday" | "address", submit: (code: string) => Promise<void>) => void | Promise<void>;
|
|
1019
1019
|
return_url?: string;
|
|
1020
1020
|
signal?: AbortSignal;
|
|
1021
1021
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as Category, r as Product, G as AddOnWithOptions, b as Pagination, g as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, W as BundleSummary, U as Bundle, a7 as Composite, ae as ComponentSelectionInput, af as CompositePriceResult, aD as ChosenPrice, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, ao as ProductAvailabilityNow, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, au as TagsResponse, b6 as UICart, aT as Cart, aU as CartItem, ba as CartSummary, b8 as AddToCartInput, b9 as UpdateCartItemInput, aH as DiscountDetails, M as Money, C as CurrencyCode, aS as LineConfiguration, bf as AuthorizationType, bh as PaymentMethod, bj as InitializePaymentResult, bn as SubmitAuthorizationInput, bl as PaymentStatusResponse } from './payment-
|
|
1
|
+
import { L as Category, r as Product, G as AddOnWithOptions, b as Pagination, g as CimplifyError, s as ProductWithDetails, t as ProductVariant, v as VariantAxis, B as VariantAxisSelection, F as AddOn, O as Collection, W as BundleSummary, U as Bundle, a7 as Composite, ae as ComponentSelectionInput, af as CompositePriceResult, aD as ChosenPrice, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, ao as ProductAvailabilityNow, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, au as TagsResponse, b6 as UICart, aT as Cart, aU as CartItem, ba as CartSummary, b8 as AddToCartInput, b9 as UpdateCartItemInput, aH as DiscountDetails, M as Money, C as CurrencyCode, aS as LineConfiguration, bf as AuthorizationType, bh as PaymentMethod, bj as InitializePaymentResult, bn as SubmitAuthorizationInput, bl as PaymentStatusResponse } from './payment-C6ULw3K-.js';
|
|
2
2
|
|
|
3
3
|
interface RequestContext {
|
|
4
4
|
method: "GET" | "POST" | "PATCH" | "DELETE";
|
|
@@ -972,7 +972,7 @@ interface CheckoutResult {
|
|
|
972
972
|
type CheckoutStatus = "preparing" | "recovering" | "processing" | "awaiting_authorization" | "polling" | "finalizing" | "success" | "failed";
|
|
973
973
|
interface CheckoutStatusContext {
|
|
974
974
|
display_text?: string;
|
|
975
|
-
authorization_type?: "otp" | "pin";
|
|
975
|
+
authorization_type?: "otp" | "pin" | "phone" | "birthday" | "address";
|
|
976
976
|
poll_attempt?: number;
|
|
977
977
|
max_poll_attempts?: number;
|
|
978
978
|
order_id?: string;
|
|
@@ -1015,7 +1015,7 @@ interface ProcessAndResolveOptions {
|
|
|
1015
1015
|
poll_interval_ms?: number;
|
|
1016
1016
|
max_poll_attempts?: number;
|
|
1017
1017
|
on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void;
|
|
1018
|
-
on_authorization_required?: (type: "otp" | "pin", submit: (code: string) => Promise<void>) => void | Promise<void>;
|
|
1018
|
+
on_authorization_required?: (type: "otp" | "pin" | "phone" | "birthday" | "address", submit: (code: string) => Promise<void>) => void | Promise<void>;
|
|
1019
1019
|
return_url?: string;
|
|
1020
1020
|
signal?: AbortSignal;
|
|
1021
1021
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { af as AUTHORIZATION_TYPE, ak as AUTH_MUTATION, a4 as AbortablePromise, s as ActivityService, cd as AddressData, cG as AddressInfo, aU as AmountToPay, co as AuthResponse, A as AuthService, n as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c3 as AvailabilityResult, bK as AvailableSlot, bN as Booking, bM as BookingStatus, bO as BookingWithDetails, bc as BufferTimes, br as Business, bF as BusinessHours, bq as BusinessPreferences, B as BusinessService, bE as BusinessSettings, bp as BusinessType, bC as BusinessWithLocations, a8 as CHECKOUT_MODE, al as CHECKOUT_MUTATION, ab as CHECKOUT_STEP, ah as CONTACT_TYPE, bV as CancelBookingInput, bW as CancelBookingResult, b6 as CancelOrderInput, be as CancellationPolicy, j as CartOperations, b as CatalogueQueries, aH as CatalogueResult, aI as CatalogueSnapshot, bG as CategoryInfo, bS as CheckSlotAvailabilityInput, bT as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, Y as CheckoutFormData, b4 as CheckoutInput, N as CheckoutMode, k as CheckoutOperations, V as CheckoutOrderType, W as CheckoutPaymentMethod, Z as CheckoutResult, k as CheckoutService, a2 as CheckoutStatus, a3 as CheckoutStatusContext, X as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, x as CimplifyElement, w as CimplifyElements, a7 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bQ as CustomerBooking, bP as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, bb as CustomerServicePreferences, ap as DEFAULT_COUNTRY, ao as DEFAULT_CURRENCY, ag as DEVICE_TYPE, bL as DayAvailability, bl as DepositResult, a6 as DeviceType, z as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, K as ElementEventType, H as ElementOptions, J as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, D as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, as as Err, aT as FeeBearerType, F as FetchQuoteInput, aR as FulfillmentLink, aQ as FulfillmentStatus, aP as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, r as FxService, bR as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, aj as LINK_MUTATION, ai as LINK_QUERY, aV as LineItem, aM as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, u as LiteBootstrap, q as LiteService, bu as Location, bo as LocationAppointment, c2 as LocationStock, bs as LocationTaxBehavior, bt as LocationTaxOverrides, bx as LocationTimeProfile, bD as LocationWithDetails, M as MESSAGE_TYPES, ae as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a5 as MobileMoneyProvider, _ as NextAction, an as ORDER_MUTATION, a9 as ORDER_TYPE, cD as ObservabilityHooks, ar as Ok, aW as Order, aL as OrderChannel, b3 as OrderFilter, aS as OrderFulfillmentSummary, aZ as OrderGroup, b1 as OrderGroupDetails, a_ as OrderGroupPayment, aY as OrderGroupPaymentState, b0 as OrderGroupPaymentSummary, aX as OrderHistory, aN as OrderLineState, aO as OrderLineStatus, b2 as OrderPaymentEvent, O as OrderQueries, a$ as OrderSplitDetail, aJ as OrderStatus, cE as OrderType, o as OtpResult, aa as PAYMENT_METHOD, am as PAYMENT_MUTATION, ac as PAYMENT_STATE, ad as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aK as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bg as PricingOverrides, a1 as ProcessAndResolveOptions, $ as ProcessCheckoutOptions, a0 as ProcessCheckoutResult, c0 as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, b7 as RefundOrderInput, ba as ReminderMethod, bd as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, h as RequestSource, cy as RequestStartEvent, cz as RequestSuccessEvent, bU as RescheduleBookingInput, bX as RescheduleBookingResult, bj as ResourceAssignment, aq as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bz as Room, bh as SchedulingMetadata, bk as SchedulingResult, p as SchedulingService, S as SearchOptions, bH as Service, bY as ServiceAvailabilityParams, bZ as ServiceAvailabilityResult, bA as ServiceCharge, bf as ServiceNotes, bm as ServiceScheduleRequest, b8 as ServiceStatus, cC as SessionChangeEvent, bI as Staff, bi as StaffAssignment, b9 as StaffRole, bn as StaffScheduleItem, b$ as StockLevel, b_ as StockStatus, bB as StorefrontBootstrap, by as Table, v as TableInfo, bv as TimeRange, bw as TimeRanges, bJ as TimeSlot, t as TrackCategoryViewOptions, T as TrackProductViewOptions, ca as UpdateAddressInput, b5 as UpdateOrderStatusInput, U as UpdateProfileInput, c1 as VariantStock, cn as VerifyOtpInput, aF as combine, aG as combineObject, c as createCimplifyClient, y as createElements, au as err, az as flatMap, aD as fromPromise, l as generateIdempotencyKey, aA as getOrElse, aw as isErr, av as isOk, ay as mapError, ax as mapResult, at as ok, aC as toNullable, aE as tryCatch, aB as unwrap } from './client-
|
|
1
|
+
export { af as AUTHORIZATION_TYPE, ak as AUTH_MUTATION, a4 as AbortablePromise, s as ActivityService, cd as AddressData, cG as AddressInfo, aU as AmountToPay, co as AuthResponse, A as AuthService, n as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c3 as AvailabilityResult, bK as AvailableSlot, bN as Booking, bM as BookingStatus, bO as BookingWithDetails, bc as BufferTimes, br as Business, bF as BusinessHours, bq as BusinessPreferences, B as BusinessService, bE as BusinessSettings, bp as BusinessType, bC as BusinessWithLocations, a8 as CHECKOUT_MODE, al as CHECKOUT_MUTATION, ab as CHECKOUT_STEP, ah as CONTACT_TYPE, bV as CancelBookingInput, bW as CancelBookingResult, b6 as CancelOrderInput, be as CancellationPolicy, j as CartOperations, b as CatalogueQueries, aH as CatalogueResult, aI as CatalogueSnapshot, bG as CategoryInfo, bS as CheckSlotAvailabilityInput, bT as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, Y as CheckoutFormData, b4 as CheckoutInput, N as CheckoutMode, k as CheckoutOperations, V as CheckoutOrderType, W as CheckoutPaymentMethod, Z as CheckoutResult, k as CheckoutService, a2 as CheckoutStatus, a3 as CheckoutStatusContext, X as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, x as CimplifyElement, w as CimplifyElements, a7 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bQ as CustomerBooking, bP as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, bb as CustomerServicePreferences, ap as DEFAULT_COUNTRY, ao as DEFAULT_CURRENCY, ag as DEVICE_TYPE, bL as DayAvailability, bl as DepositResult, a6 as DeviceType, z as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, K as ElementEventType, H as ElementOptions, J as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, D as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, as as Err, aT as FeeBearerType, F as FetchQuoteInput, aR as FulfillmentLink, aQ as FulfillmentStatus, aP as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, r as FxService, bR as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, aj as LINK_MUTATION, ai as LINK_QUERY, aV as LineItem, aM as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, u as LiteBootstrap, q as LiteService, bu as Location, bo as LocationAppointment, c2 as LocationStock, bs as LocationTaxBehavior, bt as LocationTaxOverrides, bx as LocationTimeProfile, bD as LocationWithDetails, M as MESSAGE_TYPES, ae as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a5 as MobileMoneyProvider, _ as NextAction, an as ORDER_MUTATION, a9 as ORDER_TYPE, cD as ObservabilityHooks, ar as Ok, aW as Order, aL as OrderChannel, b3 as OrderFilter, aS as OrderFulfillmentSummary, aZ as OrderGroup, b1 as OrderGroupDetails, a_ as OrderGroupPayment, aY as OrderGroupPaymentState, b0 as OrderGroupPaymentSummary, aX as OrderHistory, aN as OrderLineState, aO as OrderLineStatus, b2 as OrderPaymentEvent, O as OrderQueries, a$ as OrderSplitDetail, aJ as OrderStatus, cE as OrderType, o as OtpResult, aa as PAYMENT_METHOD, am as PAYMENT_MUTATION, ac as PAYMENT_STATE, ad as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aK as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bg as PricingOverrides, a1 as ProcessAndResolveOptions, $ as ProcessCheckoutOptions, a0 as ProcessCheckoutResult, c0 as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, b7 as RefundOrderInput, ba as ReminderMethod, bd as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, h as RequestSource, cy as RequestStartEvent, cz as RequestSuccessEvent, bU as RescheduleBookingInput, bX as RescheduleBookingResult, bj as ResourceAssignment, aq as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bz as Room, bh as SchedulingMetadata, bk as SchedulingResult, p as SchedulingService, S as SearchOptions, bH as Service, bY as ServiceAvailabilityParams, bZ as ServiceAvailabilityResult, bA as ServiceCharge, bf as ServiceNotes, bm as ServiceScheduleRequest, b8 as ServiceStatus, cC as SessionChangeEvent, bI as Staff, bi as StaffAssignment, b9 as StaffRole, bn as StaffScheduleItem, b$ as StockLevel, b_ as StockStatus, bB as StorefrontBootstrap, by as Table, v as TableInfo, bv as TimeRange, bw as TimeRanges, bJ as TimeSlot, t as TrackCategoryViewOptions, T as TrackProductViewOptions, ca as UpdateAddressInput, b5 as UpdateOrderStatusInput, U as UpdateProfileInput, c1 as VariantStock, cn as VerifyOtpInput, aF as combine, aG as combineObject, c as createCimplifyClient, y as createElements, au as err, az as flatMap, aD as fromPromise, l as generateIdempotencyKey, aA as getOrElse, aw as isErr, av as isOk, ay as mapError, ax as mapResult, at as ok, aC as toNullable, aE as tryCatch, aB as unwrap } from './client-BaolRdB4.mjs';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.mjs';
|
|
3
|
-
import { A as ApiError } from './payment-
|
|
4
|
-
export { F as AddOn, aJ as AddOnDetails, b3 as AddOnGroupDetails, H as AddOnOption, b2 as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, b8 as AddToCartInput, be as AddressAuthorizationData, ay as AdjustmentType, aF as AppliedDiscount, bf as AuthorizationType, aE as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, a1 as BundleComponentVariantView, a0 as BundleComponentView, T as BundlePriceType, X as BundleProduct, aO as BundleSelectionData, aM as BundleSelectionInput, aN as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aT as Cart, aK as CartAddOn, aw as CartChannel, aU as CartItem, b5 as CartItemDetails, av as CartStatus, ba as CartSummary, aV as CartTotals, L as Category, N as CategorySummary, aD as ChosenPrice, g as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a9 as ComponentGroup, aa as ComponentGroupWithComponents, ag as ComponentPriceBreakdown, ae as ComponentSelectionInput, a6 as ComponentSourceType, a7 as Composite, ad as CompositeComponent, ac as CompositeComponentView, ab as CompositeGroupView, aQ as CompositePriceBreakdown, af as CompositePriceResult, a4 as CompositePricingMode, aR as CompositeSelectionData, ae as CompositeSelectionInput, aP as CompositeStoredSelection, a8 as CompositeWithDetails, C as CurrencyCode, aq as Deal, ap as DealBenefitType, q as DepositType, p as DigitalProductType, aG as DiscountBreakdown, aH as DiscountDetails, as as DiscountValidation, aY as DisplayAddOn, aZ as DisplayAddOnOption, aW as DisplayCart, aX as DisplayCartItem, D as DisplayMode, f as ERROR_HINTS, E as ErrorCode, d as ErrorCodeType, e as ErrorHint, a5 as GroupPricingBehavior, bj as InitializePaymentResult, I as InventoryType, aS as LineConfiguration, aj as LocationProductPrice, M as Money, b as Pagination, P as PaginationParams, bi as Payment, bm as PaymentErrorDetails, bh as PaymentMethod, bd as PaymentMethodType, bg as PaymentProcessingState, bc as PaymentProvider, bk as PaymentResponse, bb as PaymentStatus, bl as PaymentStatusResponse, ai as Price, az as PriceAdjustment, aC as PriceDecisionPath, ah as PriceEntryType, aB as PricePathTaxInfo, ax as PriceSource, r as Product, K as ProductAddOn, ak as ProductAvailability, ao as ProductAvailabilityNow, ar as ProductDealInfo, o as ProductRenderHint, am as ProductTaxonomy, al as ProductTimeProfile, n as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, aI as SelectedAddOnOption, bn as SubmitAuthorizationInput, at as Tag, au as TagsResponse, aA as TaxPathComponent, an as TaxonomyWithChildren, b6 as UICart, a_ as UICartBusiness, b0 as UICartCustomer, a$ as UICartLocation, b1 as UICartPricing, b7 as UICartResponse, b9 as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, a3 as VariantAxisValueView, a2 as VariantAxisView, w as VariantAxisWithValues, aL as VariantDetails, b4 as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, h as isCimplifyError, l as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-
|
|
3
|
+
import { A as ApiError } from './payment-C6ULw3K-.mjs';
|
|
4
|
+
export { F as AddOn, aJ as AddOnDetails, b3 as AddOnGroupDetails, H as AddOnOption, b2 as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, b8 as AddToCartInput, be as AddressAuthorizationData, ay as AdjustmentType, aF as AppliedDiscount, bf as AuthorizationType, aE as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, a1 as BundleComponentVariantView, a0 as BundleComponentView, T as BundlePriceType, X as BundleProduct, aO as BundleSelectionData, aM as BundleSelectionInput, aN as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aT as Cart, aK as CartAddOn, aw as CartChannel, aU as CartItem, b5 as CartItemDetails, av as CartStatus, ba as CartSummary, aV as CartTotals, L as Category, N as CategorySummary, aD as ChosenPrice, g as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a9 as ComponentGroup, aa as ComponentGroupWithComponents, ag as ComponentPriceBreakdown, ae as ComponentSelectionInput, a6 as ComponentSourceType, a7 as Composite, ad as CompositeComponent, ac as CompositeComponentView, ab as CompositeGroupView, aQ as CompositePriceBreakdown, af as CompositePriceResult, a4 as CompositePricingMode, aR as CompositeSelectionData, ae as CompositeSelectionInput, aP as CompositeStoredSelection, a8 as CompositeWithDetails, C as CurrencyCode, aq as Deal, ap as DealBenefitType, q as DepositType, p as DigitalProductType, aG as DiscountBreakdown, aH as DiscountDetails, as as DiscountValidation, aY as DisplayAddOn, aZ as DisplayAddOnOption, aW as DisplayCart, aX as DisplayCartItem, D as DisplayMode, f as ERROR_HINTS, E as ErrorCode, d as ErrorCodeType, e as ErrorHint, a5 as GroupPricingBehavior, bj as InitializePaymentResult, I as InventoryType, aS as LineConfiguration, aj as LocationProductPrice, M as Money, b as Pagination, P as PaginationParams, bi as Payment, bm as PaymentErrorDetails, bh as PaymentMethod, bd as PaymentMethodType, bg as PaymentProcessingState, bc as PaymentProvider, bk as PaymentResponse, bb as PaymentStatus, bl as PaymentStatusResponse, ai as Price, az as PriceAdjustment, aC as PriceDecisionPath, ah as PriceEntryType, aB as PricePathTaxInfo, ax as PriceSource, r as Product, K as ProductAddOn, ak as ProductAvailability, ao as ProductAvailabilityNow, ar as ProductDealInfo, o as ProductRenderHint, am as ProductTaxonomy, al as ProductTimeProfile, n as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, aI as SelectedAddOnOption, bn as SubmitAuthorizationInput, at as Tag, au as TagsResponse, aA as TaxPathComponent, an as TaxonomyWithChildren, b6 as UICart, a_ as UICartBusiness, b0 as UICartCustomer, a$ as UICartLocation, b1 as UICartPricing, b7 as UICartResponse, b9 as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, a3 as VariantAxisValueView, a2 as VariantAxisView, w as VariantAxisWithValues, aL as VariantDetails, b4 as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, h as isCimplifyError, l as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-C6ULw3K-.mjs';
|
|
5
5
|
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, getTaxAmount, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, isValidPhoneForContext, normalizePaymentResponse, normalizePhoneToE164, normalizeStatusResponse, parsePrice, resolvePhoneCountryCode } from './utils.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-BxbWrwqp.mjs';
|
|
7
|
-
export { a as FormatCompactOptions, F as FormatPriceOptions, P as ProductWithPrice } from './price-
|
|
7
|
+
export { a as FormatCompactOptions, F as FormatPriceOptions, P as ProductWithPrice } from './price-CbR6DCt0.mjs';
|
|
8
8
|
import 'libphonenumber-js';
|
|
9
9
|
|
|
10
10
|
interface FrontendContext {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { af as AUTHORIZATION_TYPE, ak as AUTH_MUTATION, a4 as AbortablePromise, s as ActivityService, cd as AddressData, cG as AddressInfo, aU as AmountToPay, co as AuthResponse, A as AuthService, n as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c3 as AvailabilityResult, bK as AvailableSlot, bN as Booking, bM as BookingStatus, bO as BookingWithDetails, bc as BufferTimes, br as Business, bF as BusinessHours, bq as BusinessPreferences, B as BusinessService, bE as BusinessSettings, bp as BusinessType, bC as BusinessWithLocations, a8 as CHECKOUT_MODE, al as CHECKOUT_MUTATION, ab as CHECKOUT_STEP, ah as CONTACT_TYPE, bV as CancelBookingInput, bW as CancelBookingResult, b6 as CancelOrderInput, be as CancellationPolicy, j as CartOperations, b as CatalogueQueries, aH as CatalogueResult, aI as CatalogueSnapshot, bG as CategoryInfo, bS as CheckSlotAvailabilityInput, bT as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, Y as CheckoutFormData, b4 as CheckoutInput, N as CheckoutMode, k as CheckoutOperations, V as CheckoutOrderType, W as CheckoutPaymentMethod, Z as CheckoutResult, k as CheckoutService, a2 as CheckoutStatus, a3 as CheckoutStatusContext, X as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, x as CimplifyElement, w as CimplifyElements, a7 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bQ as CustomerBooking, bP as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, bb as CustomerServicePreferences, ap as DEFAULT_COUNTRY, ao as DEFAULT_CURRENCY, ag as DEVICE_TYPE, bL as DayAvailability, bl as DepositResult, a6 as DeviceType, z as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, K as ElementEventType, H as ElementOptions, J as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, D as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, as as Err, aT as FeeBearerType, F as FetchQuoteInput, aR as FulfillmentLink, aQ as FulfillmentStatus, aP as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, r as FxService, bR as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, aj as LINK_MUTATION, ai as LINK_QUERY, aV as LineItem, aM as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, u as LiteBootstrap, q as LiteService, bu as Location, bo as LocationAppointment, c2 as LocationStock, bs as LocationTaxBehavior, bt as LocationTaxOverrides, bx as LocationTimeProfile, bD as LocationWithDetails, M as MESSAGE_TYPES, ae as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a5 as MobileMoneyProvider, _ as NextAction, an as ORDER_MUTATION, a9 as ORDER_TYPE, cD as ObservabilityHooks, ar as Ok, aW as Order, aL as OrderChannel, b3 as OrderFilter, aS as OrderFulfillmentSummary, aZ as OrderGroup, b1 as OrderGroupDetails, a_ as OrderGroupPayment, aY as OrderGroupPaymentState, b0 as OrderGroupPaymentSummary, aX as OrderHistory, aN as OrderLineState, aO as OrderLineStatus, b2 as OrderPaymentEvent, O as OrderQueries, a$ as OrderSplitDetail, aJ as OrderStatus, cE as OrderType, o as OtpResult, aa as PAYMENT_METHOD, am as PAYMENT_MUTATION, ac as PAYMENT_STATE, ad as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aK as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bg as PricingOverrides, a1 as ProcessAndResolveOptions, $ as ProcessCheckoutOptions, a0 as ProcessCheckoutResult, c0 as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, b7 as RefundOrderInput, ba as ReminderMethod, bd as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, h as RequestSource, cy as RequestStartEvent, cz as RequestSuccessEvent, bU as RescheduleBookingInput, bX as RescheduleBookingResult, bj as ResourceAssignment, aq as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bz as Room, bh as SchedulingMetadata, bk as SchedulingResult, p as SchedulingService, S as SearchOptions, bH as Service, bY as ServiceAvailabilityParams, bZ as ServiceAvailabilityResult, bA as ServiceCharge, bf as ServiceNotes, bm as ServiceScheduleRequest, b8 as ServiceStatus, cC as SessionChangeEvent, bI as Staff, bi as StaffAssignment, b9 as StaffRole, bn as StaffScheduleItem, b$ as StockLevel, b_ as StockStatus, bB as StorefrontBootstrap, by as Table, v as TableInfo, bv as TimeRange, bw as TimeRanges, bJ as TimeSlot, t as TrackCategoryViewOptions, T as TrackProductViewOptions, ca as UpdateAddressInput, b5 as UpdateOrderStatusInput, U as UpdateProfileInput, c1 as VariantStock, cn as VerifyOtpInput, aF as combine, aG as combineObject, c as createCimplifyClient, y as createElements, au as err, az as flatMap, aD as fromPromise, l as generateIdempotencyKey, aA as getOrElse, aw as isErr, av as isOk, ay as mapError, ax as mapResult, at as ok, aC as toNullable, aE as tryCatch, aB as unwrap } from './client-
|
|
1
|
+
export { af as AUTHORIZATION_TYPE, ak as AUTH_MUTATION, a4 as AbortablePromise, s as ActivityService, cd as AddressData, cG as AddressInfo, aU as AmountToPay, co as AuthResponse, A as AuthService, n as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c3 as AvailabilityResult, bK as AvailableSlot, bN as Booking, bM as BookingStatus, bO as BookingWithDetails, bc as BufferTimes, br as Business, bF as BusinessHours, bq as BusinessPreferences, B as BusinessService, bE as BusinessSettings, bp as BusinessType, bC as BusinessWithLocations, a8 as CHECKOUT_MODE, al as CHECKOUT_MUTATION, ab as CHECKOUT_STEP, ah as CONTACT_TYPE, bV as CancelBookingInput, bW as CancelBookingResult, b6 as CancelOrderInput, be as CancellationPolicy, j as CartOperations, b as CatalogueQueries, aH as CatalogueResult, aI as CatalogueSnapshot, bG as CategoryInfo, bS as CheckSlotAvailabilityInput, bT as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, Y as CheckoutFormData, b4 as CheckoutInput, N as CheckoutMode, k as CheckoutOperations, V as CheckoutOrderType, W as CheckoutPaymentMethod, Z as CheckoutResult, k as CheckoutService, a2 as CheckoutStatus, a3 as CheckoutStatusContext, X as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, x as CimplifyElement, w as CimplifyElements, a7 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bQ as CustomerBooking, bP as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, bb as CustomerServicePreferences, ap as DEFAULT_COUNTRY, ao as DEFAULT_CURRENCY, ag as DEVICE_TYPE, bL as DayAvailability, bl as DepositResult, a6 as DeviceType, z as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, K as ElementEventType, H as ElementOptions, J as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, D as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, as as Err, aT as FeeBearerType, F as FetchQuoteInput, aR as FulfillmentLink, aQ as FulfillmentStatus, aP as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, r as FxService, bR as GetAvailableSlotsInput, m as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, aj as LINK_MUTATION, ai as LINK_QUERY, aV as LineItem, aM as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, u as LiteBootstrap, q as LiteService, bu as Location, bo as LocationAppointment, c2 as LocationStock, bs as LocationTaxBehavior, bt as LocationTaxOverrides, bx as LocationTimeProfile, bD as LocationWithDetails, M as MESSAGE_TYPES, ae as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a5 as MobileMoneyProvider, _ as NextAction, an as ORDER_MUTATION, a9 as ORDER_TYPE, cD as ObservabilityHooks, ar as Ok, aW as Order, aL as OrderChannel, b3 as OrderFilter, aS as OrderFulfillmentSummary, aZ as OrderGroup, b1 as OrderGroupDetails, a_ as OrderGroupPayment, aY as OrderGroupPaymentState, b0 as OrderGroupPaymentSummary, aX as OrderHistory, aN as OrderLineState, aO as OrderLineStatus, b2 as OrderPaymentEvent, O as OrderQueries, a$ as OrderSplitDetail, aJ as OrderStatus, cE as OrderType, o as OtpResult, aa as PAYMENT_METHOD, am as PAYMENT_MUTATION, ac as PAYMENT_STATE, ad as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aK as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bg as PricingOverrides, a1 as ProcessAndResolveOptions, $ as ProcessCheckoutOptions, a0 as ProcessCheckoutResult, c0 as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, b7 as RefundOrderInput, ba as ReminderMethod, bd as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, h as RequestSource, cy as RequestStartEvent, cz as RequestSuccessEvent, bU as RescheduleBookingInput, bX as RescheduleBookingResult, bj as ResourceAssignment, aq as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bz as Room, bh as SchedulingMetadata, bk as SchedulingResult, p as SchedulingService, S as SearchOptions, bH as Service, bY as ServiceAvailabilityParams, bZ as ServiceAvailabilityResult, bA as ServiceCharge, bf as ServiceNotes, bm as ServiceScheduleRequest, b8 as ServiceStatus, cC as SessionChangeEvent, bI as Staff, bi as StaffAssignment, b9 as StaffRole, bn as StaffScheduleItem, b$ as StockLevel, b_ as StockStatus, bB as StorefrontBootstrap, by as Table, v as TableInfo, bv as TimeRange, bw as TimeRanges, bJ as TimeSlot, t as TrackCategoryViewOptions, T as TrackProductViewOptions, ca as UpdateAddressInput, b5 as UpdateOrderStatusInput, U as UpdateProfileInput, c1 as VariantStock, cn as VerifyOtpInput, aF as combine, aG as combineObject, c as createCimplifyClient, y as createElements, au as err, az as flatMap, aD as fromPromise, l as generateIdempotencyKey, aA as getOrElse, aw as isErr, av as isOk, ay as mapError, ax as mapResult, at as ok, aC as toNullable, aE as tryCatch, aB as unwrap } from './client-C59R79gx.js';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.js';
|
|
3
|
-
import { A as ApiError } from './payment-
|
|
4
|
-
export { F as AddOn, aJ as AddOnDetails, b3 as AddOnGroupDetails, H as AddOnOption, b2 as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, b8 as AddToCartInput, be as AddressAuthorizationData, ay as AdjustmentType, aF as AppliedDiscount, bf as AuthorizationType, aE as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, a1 as BundleComponentVariantView, a0 as BundleComponentView, T as BundlePriceType, X as BundleProduct, aO as BundleSelectionData, aM as BundleSelectionInput, aN as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aT as Cart, aK as CartAddOn, aw as CartChannel, aU as CartItem, b5 as CartItemDetails, av as CartStatus, ba as CartSummary, aV as CartTotals, L as Category, N as CategorySummary, aD as ChosenPrice, g as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a9 as ComponentGroup, aa as ComponentGroupWithComponents, ag as ComponentPriceBreakdown, ae as ComponentSelectionInput, a6 as ComponentSourceType, a7 as Composite, ad as CompositeComponent, ac as CompositeComponentView, ab as CompositeGroupView, aQ as CompositePriceBreakdown, af as CompositePriceResult, a4 as CompositePricingMode, aR as CompositeSelectionData, ae as CompositeSelectionInput, aP as CompositeStoredSelection, a8 as CompositeWithDetails, C as CurrencyCode, aq as Deal, ap as DealBenefitType, q as DepositType, p as DigitalProductType, aG as DiscountBreakdown, aH as DiscountDetails, as as DiscountValidation, aY as DisplayAddOn, aZ as DisplayAddOnOption, aW as DisplayCart, aX as DisplayCartItem, D as DisplayMode, f as ERROR_HINTS, E as ErrorCode, d as ErrorCodeType, e as ErrorHint, a5 as GroupPricingBehavior, bj as InitializePaymentResult, I as InventoryType, aS as LineConfiguration, aj as LocationProductPrice, M as Money, b as Pagination, P as PaginationParams, bi as Payment, bm as PaymentErrorDetails, bh as PaymentMethod, bd as PaymentMethodType, bg as PaymentProcessingState, bc as PaymentProvider, bk as PaymentResponse, bb as PaymentStatus, bl as PaymentStatusResponse, ai as Price, az as PriceAdjustment, aC as PriceDecisionPath, ah as PriceEntryType, aB as PricePathTaxInfo, ax as PriceSource, r as Product, K as ProductAddOn, ak as ProductAvailability, ao as ProductAvailabilityNow, ar as ProductDealInfo, o as ProductRenderHint, am as ProductTaxonomy, al as ProductTimeProfile, n as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, aI as SelectedAddOnOption, bn as SubmitAuthorizationInput, at as Tag, au as TagsResponse, aA as TaxPathComponent, an as TaxonomyWithChildren, b6 as UICart, a_ as UICartBusiness, b0 as UICartCustomer, a$ as UICartLocation, b1 as UICartPricing, b7 as UICartResponse, b9 as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, a3 as VariantAxisValueView, a2 as VariantAxisView, w as VariantAxisWithValues, aL as VariantDetails, b4 as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, h as isCimplifyError, l as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-
|
|
3
|
+
import { A as ApiError } from './payment-C6ULw3K-.js';
|
|
4
|
+
export { F as AddOn, aJ as AddOnDetails, b3 as AddOnGroupDetails, H as AddOnOption, b2 as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, b8 as AddToCartInput, be as AddressAuthorizationData, ay as AdjustmentType, aF as AppliedDiscount, bf as AuthorizationType, aE as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, a1 as BundleComponentVariantView, a0 as BundleComponentView, T as BundlePriceType, X as BundleProduct, aO as BundleSelectionData, aM as BundleSelectionInput, aN as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aT as Cart, aK as CartAddOn, aw as CartChannel, aU as CartItem, b5 as CartItemDetails, av as CartStatus, ba as CartSummary, aV as CartTotals, L as Category, N as CategorySummary, aD as ChosenPrice, g as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a9 as ComponentGroup, aa as ComponentGroupWithComponents, ag as ComponentPriceBreakdown, ae as ComponentSelectionInput, a6 as ComponentSourceType, a7 as Composite, ad as CompositeComponent, ac as CompositeComponentView, ab as CompositeGroupView, aQ as CompositePriceBreakdown, af as CompositePriceResult, a4 as CompositePricingMode, aR as CompositeSelectionData, ae as CompositeSelectionInput, aP as CompositeStoredSelection, a8 as CompositeWithDetails, C as CurrencyCode, aq as Deal, ap as DealBenefitType, q as DepositType, p as DigitalProductType, aG as DiscountBreakdown, aH as DiscountDetails, as as DiscountValidation, aY as DisplayAddOn, aZ as DisplayAddOnOption, aW as DisplayCart, aX as DisplayCartItem, D as DisplayMode, f as ERROR_HINTS, E as ErrorCode, d as ErrorCodeType, e as ErrorHint, a5 as GroupPricingBehavior, bj as InitializePaymentResult, I as InventoryType, aS as LineConfiguration, aj as LocationProductPrice, M as Money, b as Pagination, P as PaginationParams, bi as Payment, bm as PaymentErrorDetails, bh as PaymentMethod, bd as PaymentMethodType, bg as PaymentProcessingState, bc as PaymentProvider, bk as PaymentResponse, bb as PaymentStatus, bl as PaymentStatusResponse, ai as Price, az as PriceAdjustment, aC as PriceDecisionPath, ah as PriceEntryType, aB as PricePathTaxInfo, ax as PriceSource, r as Product, K as ProductAddOn, ak as ProductAvailability, ao as ProductAvailabilityNow, ar as ProductDealInfo, o as ProductRenderHint, am as ProductTaxonomy, al as ProductTimeProfile, n as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, aI as SelectedAddOnOption, bn as SubmitAuthorizationInput, at as Tag, au as TagsResponse, aA as TaxPathComponent, an as TaxonomyWithChildren, b6 as UICart, a_ as UICartBusiness, b0 as UICartCustomer, a$ as UICartLocation, b1 as UICartPricing, b7 as UICartResponse, b9 as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, a3 as VariantAxisValueView, a2 as VariantAxisView, w as VariantAxisWithValues, aL as VariantDetails, b4 as VariantDetailsDTO, u as VariantDisplayAttribute, z as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, h as isCimplifyError, l as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-C6ULw3K-.js';
|
|
5
5
|
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, getTaxAmount, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, isValidPhoneForContext, normalizePaymentResponse, normalizePhoneToE164, normalizeStatusResponse, parsePrice, resolvePhoneCountryCode } from './utils.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-BxbWrwqp.js';
|
|
7
|
-
export { a as FormatCompactOptions, F as FormatPriceOptions, P as ProductWithPrice } from './price-
|
|
7
|
+
export { a as FormatCompactOptions, F as FormatPriceOptions, P as ProductWithPrice } from './price-Bd6JBV8W.js';
|
|
8
8
|
import 'libphonenumber-js';
|
|
9
9
|
|
|
10
10
|
interface FrontendContext {
|
package/dist/index.js
CHANGED
|
@@ -1169,9 +1169,10 @@ function normalizePaymentResponse(response) {
|
|
|
1169
1169
|
};
|
|
1170
1170
|
}
|
|
1171
1171
|
if (isWebPaymentResponse(response)) {
|
|
1172
|
-
const
|
|
1173
|
-
const
|
|
1174
|
-
const
|
|
1172
|
+
const objectAuthType = response.authorization_type && typeof response.authorization_type === "object" && "address" in response.authorization_type ? "address" : void 0;
|
|
1173
|
+
const authType = typeof response.authorization_type === "string" ? response.authorization_type.trim().toLowerCase().replace(/[\s-]+/g, "_") : void 0;
|
|
1174
|
+
const validStringAuthTypes = ["otp", "pin", "phone", "birthday", "address"];
|
|
1175
|
+
const safeAuthType = objectAuthType || (authType && validStringAuthTypes.includes(authType) ? authType : void 0);
|
|
1175
1176
|
return {
|
|
1176
1177
|
provider: response.transaction.provider_type?.toLowerCase() || "unknown",
|
|
1177
1178
|
requires_action: response.requires_action || false,
|
|
@@ -1453,9 +1454,16 @@ function isValidMobileMoneyProvider(value) {
|
|
|
1453
1454
|
return VALID_MOBILE_MONEY_PROVIDERS.has(value);
|
|
1454
1455
|
}
|
|
1455
1456
|
function normalizeAuthorizationType(value) {
|
|
1457
|
+
if (value && typeof value === "object" && "address" in value) {
|
|
1458
|
+
return "address";
|
|
1459
|
+
}
|
|
1456
1460
|
if (typeof value !== "string") return void 0;
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1461
|
+
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
1462
|
+
if (normalized === "otp" || normalized === "pin") return normalized;
|
|
1463
|
+
if (normalized === "phone" || normalized === "birthday" || normalized === "address") {
|
|
1464
|
+
return normalized;
|
|
1465
|
+
}
|
|
1466
|
+
return void 0;
|
|
1459
1467
|
}
|
|
1460
1468
|
function formatMoney2(value) {
|
|
1461
1469
|
if (typeof value === "number" && Number.isFinite(value)) {
|
package/dist/index.mjs
CHANGED
|
@@ -1167,9 +1167,10 @@ function normalizePaymentResponse(response) {
|
|
|
1167
1167
|
};
|
|
1168
1168
|
}
|
|
1169
1169
|
if (isWebPaymentResponse(response)) {
|
|
1170
|
-
const
|
|
1171
|
-
const
|
|
1172
|
-
const
|
|
1170
|
+
const objectAuthType = response.authorization_type && typeof response.authorization_type === "object" && "address" in response.authorization_type ? "address" : void 0;
|
|
1171
|
+
const authType = typeof response.authorization_type === "string" ? response.authorization_type.trim().toLowerCase().replace(/[\s-]+/g, "_") : void 0;
|
|
1172
|
+
const validStringAuthTypes = ["otp", "pin", "phone", "birthday", "address"];
|
|
1173
|
+
const safeAuthType = objectAuthType || (authType && validStringAuthTypes.includes(authType) ? authType : void 0);
|
|
1173
1174
|
return {
|
|
1174
1175
|
provider: response.transaction.provider_type?.toLowerCase() || "unknown",
|
|
1175
1176
|
requires_action: response.requires_action || false,
|
|
@@ -1451,9 +1452,16 @@ function isValidMobileMoneyProvider(value) {
|
|
|
1451
1452
|
return VALID_MOBILE_MONEY_PROVIDERS.has(value);
|
|
1452
1453
|
}
|
|
1453
1454
|
function normalizeAuthorizationType(value) {
|
|
1455
|
+
if (value && typeof value === "object" && "address" in value) {
|
|
1456
|
+
return "address";
|
|
1457
|
+
}
|
|
1454
1458
|
if (typeof value !== "string") return void 0;
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1459
|
+
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
1460
|
+
if (normalized === "otp" || normalized === "pin") return normalized;
|
|
1461
|
+
if (normalized === "phone" || normalized === "birthday" || normalized === "address") {
|
|
1462
|
+
return normalized;
|
|
1463
|
+
}
|
|
1464
|
+
return void 0;
|
|
1457
1465
|
}
|
|
1458
1466
|
function formatMoney2(value) {
|
|
1459
1467
|
if (typeof value === "number" && Number.isFinite(value)) {
|
|
@@ -1169,7 +1169,7 @@ interface AddressAuthorizationData {
|
|
|
1169
1169
|
state: string;
|
|
1170
1170
|
zip_code: string;
|
|
1171
1171
|
}
|
|
1172
|
-
type AuthorizationType = "otp" | "pin" | "phone" | "birthday" | {
|
|
1172
|
+
type AuthorizationType = "otp" | "pin" | "phone" | "birthday" | "address" | {
|
|
1173
1173
|
address: AddressAuthorizationData;
|
|
1174
1174
|
};
|
|
1175
1175
|
type PaymentProcessingState = "initial" | "preparing" | "processing" | "verifying" | "awaiting_authorization" | "success" | "error" | "timeout";
|
|
@@ -1169,7 +1169,7 @@ interface AddressAuthorizationData {
|
|
|
1169
1169
|
state: string;
|
|
1170
1170
|
zip_code: string;
|
|
1171
1171
|
}
|
|
1172
|
-
type AuthorizationType = "otp" | "pin" | "phone" | "birthday" | {
|
|
1172
|
+
type AuthorizationType = "otp" | "pin" | "phone" | "birthday" | "address" | {
|
|
1173
1173
|
address: AddressAuthorizationData;
|
|
1174
1174
|
};
|
|
1175
1175
|
type PaymentProcessingState = "initial" | "preparing" | "processing" | "verifying" | "awaiting_authorization" | "success" | "error" | "timeout";
|
package/dist/react.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-BxbWrwqp.mjs';
|
|
3
3
|
export { c as AdConfig, g as getVariantDisplayName } from './ads-BxbWrwqp.mjs';
|
|
4
|
-
import { C as CimplifyClient, a0 as ProcessCheckoutResult, a2 as CheckoutStatus, a3 as CheckoutStatusContext, bu as Location, br as Business, aW as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, aJ as OrderStatus, bH as Service, bK as AvailableSlot, bL as DayAvailability, bQ as CustomerBooking, bW as CancelBookingResult, D as ElementsOptions, cK as AuthenticatedData, cG as AddressInfo, cH as PaymentMethodInfo, w as CimplifyElements, cM as ElementsCheckoutResult, $ as ProcessCheckoutOptions, aV as LineItem, bI as Staff } from './client-
|
|
5
|
-
import { r as Product, b as Pagination, g as CimplifyError, s as ProductWithDetails, L as Category, M as Money, aM as BundleSelectionInput, ae as ComponentSelectionInput, O as Collection, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, W as BundleSummary, af as CompositePriceResult, C as CurrencyCode, t as ProductVariant, w as VariantAxisWithValues, G as AddOnWithOptions, a0 as BundleComponentView, T as BundlePriceType, ab as CompositeGroupView } from './payment-
|
|
6
|
-
import { P as ProductWithPrice } from './price-
|
|
4
|
+
import { C as CimplifyClient, a0 as ProcessCheckoutResult, a2 as CheckoutStatus, a3 as CheckoutStatusContext, bu as Location, br as Business, aW as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, aJ as OrderStatus, bH as Service, bK as AvailableSlot, bL as DayAvailability, bQ as CustomerBooking, bW as CancelBookingResult, D as ElementsOptions, cK as AuthenticatedData, cG as AddressInfo, cH as PaymentMethodInfo, w as CimplifyElements, cM as ElementsCheckoutResult, $ as ProcessCheckoutOptions, aV as LineItem, bI as Staff } from './client-BaolRdB4.mjs';
|
|
5
|
+
import { r as Product, b as Pagination, g as CimplifyError, s as ProductWithDetails, L as Category, M as Money, aM as BundleSelectionInput, ae as ComponentSelectionInput, O as Collection, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, W as BundleSummary, af as CompositePriceResult, C as CurrencyCode, t as ProductVariant, w as VariantAxisWithValues, G as AddOnWithOptions, a0 as BundleComponentView, T as BundlePriceType, ab as CompositeGroupView } from './payment-C6ULw3K-.mjs';
|
|
6
|
+
import { P as ProductWithPrice } from './price-CbR6DCt0.mjs';
|
|
7
7
|
import { ClassValue } from 'clsx';
|
|
8
8
|
|
|
9
9
|
interface UserIdentity {
|
package/dist/react.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-BxbWrwqp.js';
|
|
3
3
|
export { c as AdConfig, g as getVariantDisplayName } from './ads-BxbWrwqp.js';
|
|
4
|
-
import { C as CimplifyClient, a0 as ProcessCheckoutResult, a2 as CheckoutStatus, a3 as CheckoutStatusContext, bu as Location, br as Business, aW as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, aJ as OrderStatus, bH as Service, bK as AvailableSlot, bL as DayAvailability, bQ as CustomerBooking, bW as CancelBookingResult, D as ElementsOptions, cK as AuthenticatedData, cG as AddressInfo, cH as PaymentMethodInfo, w as CimplifyElements, cM as ElementsCheckoutResult, $ as ProcessCheckoutOptions, aV as LineItem, bI as Staff } from './client-
|
|
5
|
-
import { r as Product, b as Pagination, g as CimplifyError, s as ProductWithDetails, L as Category, M as Money, aM as BundleSelectionInput, ae as ComponentSelectionInput, O as Collection, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, W as BundleSummary, af as CompositePriceResult, C as CurrencyCode, t as ProductVariant, w as VariantAxisWithValues, G as AddOnWithOptions, a0 as BundleComponentView, T as BundlePriceType, ab as CompositeGroupView } from './payment-
|
|
6
|
-
import { P as ProductWithPrice } from './price-
|
|
4
|
+
import { C as CimplifyClient, a0 as ProcessCheckoutResult, a2 as CheckoutStatus, a3 as CheckoutStatusContext, bu as Location, br as Business, aW as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, aJ as OrderStatus, bH as Service, bK as AvailableSlot, bL as DayAvailability, bQ as CustomerBooking, bW as CancelBookingResult, D as ElementsOptions, cK as AuthenticatedData, cG as AddressInfo, cH as PaymentMethodInfo, w as CimplifyElements, cM as ElementsCheckoutResult, $ as ProcessCheckoutOptions, aV as LineItem, bI as Staff } from './client-C59R79gx.js';
|
|
5
|
+
import { r as Product, b as Pagination, g as CimplifyError, s as ProductWithDetails, L as Category, M as Money, aM as BundleSelectionInput, ae as ComponentSelectionInput, O as Collection, am as ProductTaxonomy, an as TaxonomyWithChildren, al as ProductTimeProfile, aq as Deal, ar as ProductDealInfo, as as DiscountValidation, W as BundleSummary, af as CompositePriceResult, C as CurrencyCode, t as ProductVariant, w as VariantAxisWithValues, G as AddOnWithOptions, a0 as BundleComponentView, T as BundlePriceType, ab as CompositeGroupView } from './payment-C6ULw3K-.js';
|
|
6
|
+
import { P as ProductWithPrice } from './price-Bd6JBV8W.js';
|
|
7
7
|
import { ClassValue } from 'clsx';
|
|
8
8
|
|
|
9
9
|
interface UserIdentity {
|
package/dist/react.js
CHANGED
|
@@ -1439,9 +1439,16 @@ function isValidMobileMoneyProvider(value) {
|
|
|
1439
1439
|
return VALID_MOBILE_MONEY_PROVIDERS.has(value);
|
|
1440
1440
|
}
|
|
1441
1441
|
function normalizeAuthorizationType(value) {
|
|
1442
|
+
if (value && typeof value === "object" && "address" in value) {
|
|
1443
|
+
return "address";
|
|
1444
|
+
}
|
|
1442
1445
|
if (typeof value !== "string") return void 0;
|
|
1443
|
-
const
|
|
1444
|
-
|
|
1446
|
+
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
1447
|
+
if (normalized === "otp" || normalized === "pin") return normalized;
|
|
1448
|
+
if (normalized === "phone" || normalized === "birthday" || normalized === "address") {
|
|
1449
|
+
return normalized;
|
|
1450
|
+
}
|
|
1451
|
+
return void 0;
|
|
1445
1452
|
}
|
|
1446
1453
|
function formatMoney2(value) {
|
|
1447
1454
|
if (typeof value === "number" && Number.isFinite(value)) {
|
package/dist/react.mjs
CHANGED
|
@@ -1433,9 +1433,16 @@ function isValidMobileMoneyProvider(value) {
|
|
|
1433
1433
|
return VALID_MOBILE_MONEY_PROVIDERS.has(value);
|
|
1434
1434
|
}
|
|
1435
1435
|
function normalizeAuthorizationType(value) {
|
|
1436
|
+
if (value && typeof value === "object" && "address" in value) {
|
|
1437
|
+
return "address";
|
|
1438
|
+
}
|
|
1436
1439
|
if (typeof value !== "string") return void 0;
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1440
|
+
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
1441
|
+
if (normalized === "otp" || normalized === "pin") return normalized;
|
|
1442
|
+
if (normalized === "phone" || normalized === "birthday" || normalized === "address") {
|
|
1443
|
+
return normalized;
|
|
1444
|
+
}
|
|
1445
|
+
return void 0;
|
|
1439
1446
|
}
|
|
1440
1447
|
function formatMoney2(value) {
|
|
1441
1448
|
if (typeof value === "number" && Number.isFinite(value)) {
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Money, C as CurrencyCode, aB as PricePathTaxInfo, bm as PaymentErrorDetails, bk as PaymentResponse, bl as PaymentStatusResponse } from './payment-
|
|
2
|
-
import { P as ProductWithPrice } from './price-
|
|
1
|
+
import { M as Money, C as CurrencyCode, aB as PricePathTaxInfo, bm as PaymentErrorDetails, bk as PaymentResponse, bl as PaymentStatusResponse } from './payment-C6ULw3K-.mjs';
|
|
2
|
+
import { P as ProductWithPrice } from './price-CbR6DCt0.mjs';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
4
|
|
|
5
5
|
declare const CURRENCY_SYMBOLS: Record<string, string>;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Money, C as CurrencyCode, aB as PricePathTaxInfo, bm as PaymentErrorDetails, bk as PaymentResponse, bl as PaymentStatusResponse } from './payment-
|
|
2
|
-
import { P as ProductWithPrice } from './price-
|
|
1
|
+
import { M as Money, C as CurrencyCode, aB as PricePathTaxInfo, bm as PaymentErrorDetails, bk as PaymentResponse, bl as PaymentStatusResponse } from './payment-C6ULw3K-.js';
|
|
2
|
+
import { P as ProductWithPrice } from './price-Bd6JBV8W.js';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
4
|
|
|
5
5
|
declare const CURRENCY_SYMBOLS: Record<string, string>;
|
package/dist/utils.js
CHANGED
|
@@ -361,9 +361,10 @@ function normalizePaymentResponse(response) {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
if (isWebPaymentResponse(response)) {
|
|
364
|
-
const
|
|
365
|
-
const
|
|
366
|
-
const
|
|
364
|
+
const objectAuthType = response.authorization_type && typeof response.authorization_type === "object" && "address" in response.authorization_type ? "address" : void 0;
|
|
365
|
+
const authType = typeof response.authorization_type === "string" ? response.authorization_type.trim().toLowerCase().replace(/[\s-]+/g, "_") : void 0;
|
|
366
|
+
const validStringAuthTypes = ["otp", "pin", "phone", "birthday", "address"];
|
|
367
|
+
const safeAuthType = objectAuthType || (authType && validStringAuthTypes.includes(authType) ? authType : void 0);
|
|
367
368
|
return {
|
|
368
369
|
provider: response.transaction.provider_type?.toLowerCase() || "unknown",
|
|
369
370
|
requires_action: response.requires_action || false,
|
package/dist/utils.mjs
CHANGED
|
@@ -359,9 +359,10 @@ function normalizePaymentResponse(response) {
|
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
if (isWebPaymentResponse(response)) {
|
|
362
|
-
const
|
|
363
|
-
const
|
|
364
|
-
const
|
|
362
|
+
const objectAuthType = response.authorization_type && typeof response.authorization_type === "object" && "address" in response.authorization_type ? "address" : void 0;
|
|
363
|
+
const authType = typeof response.authorization_type === "string" ? response.authorization_type.trim().toLowerCase().replace(/[\s-]+/g, "_") : void 0;
|
|
364
|
+
const validStringAuthTypes = ["otp", "pin", "phone", "birthday", "address"];
|
|
365
|
+
const safeAuthType = objectAuthType || (authType && validStringAuthTypes.includes(authType) ? authType : void 0);
|
|
365
366
|
return {
|
|
366
367
|
provider: response.transaction.provider_type?.toLowerCase() || "unknown",
|
|
367
368
|
requires_action: response.requires_action || false,
|