@cimplify/sdk 0.56.0 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-JYPLT56O.js → chunk-VV3GTDIP.js} +39 -0
- package/dist/{chunk-XYI4NXWG.mjs → chunk-W6FRIYYU.mjs} +38 -1
- package/dist/index.d.mts +26 -3
- package/dist/index.d.ts +26 -3
- package/dist/index.js +21 -13
- package/dist/index.mjs +2 -2
- package/dist/react.d.mts +441 -2
- package/dist/react.d.ts +441 -2
- package/dist/react.js +2074 -500
- package/dist/react.mjs +1576 -56
- package/dist/styles.css +1 -1
- package/dist/testing.d.mts +15 -15
- package/dist/testing.d.ts +15 -15
- package/package.json +1 -1
- package/registry/default-product-layout.json +1 -1
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
// src/gallery.ts
|
|
4
|
+
function dedupe(urls) {
|
|
5
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6
|
+
const out = [];
|
|
7
|
+
for (const url of urls) {
|
|
8
|
+
if (url && !seen.has(url)) {
|
|
9
|
+
seen.add(url);
|
|
10
|
+
out.push(url);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return out;
|
|
14
|
+
}
|
|
15
|
+
function resolveGallery(product, selectedVariantId) {
|
|
16
|
+
const variant = selectedVariantId ? product.variants?.find((v) => v.id === selectedVariantId) : void 0;
|
|
17
|
+
if (variant?.images?.length) return dedupe(variant.images);
|
|
18
|
+
if (product.images?.length) return dedupe(product.images);
|
|
19
|
+
const firstWithImages = product.variants?.find((v) => v.images?.length);
|
|
20
|
+
if (firstWithImages?.images?.length) return dedupe(firstWithImages.images);
|
|
21
|
+
return product.image_url ? [product.image_url] : [];
|
|
22
|
+
}
|
|
23
|
+
function allGalleryImages(product) {
|
|
24
|
+
const seen = /* @__PURE__ */ new Set();
|
|
25
|
+
const out = [];
|
|
26
|
+
const push = (url, variantId) => {
|
|
27
|
+
if (url && !seen.has(url)) {
|
|
28
|
+
seen.add(url);
|
|
29
|
+
out.push({ url, variantId });
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
push(product.image_url, null);
|
|
33
|
+
for (const url of product.images ?? []) push(url, null);
|
|
34
|
+
for (const variant of product.variants ?? []) {
|
|
35
|
+
for (const url of variant.images ?? []) push(url, variant.id);
|
|
36
|
+
}
|
|
37
|
+
return out;
|
|
38
|
+
}
|
|
39
|
+
|
|
3
40
|
// src/utils/variant.ts
|
|
4
41
|
function stripProductPrefix(variantName, productName) {
|
|
5
42
|
if (!variantName || !productName) return variantName || productName;
|
|
@@ -264,9 +301,11 @@ exports.DURATION_UNIT = DURATION_UNIT;
|
|
|
264
301
|
exports.INPUT_FIELD_TYPE = INPUT_FIELD_TYPE;
|
|
265
302
|
exports.PRODUCT_TYPE = PRODUCT_TYPE;
|
|
266
303
|
exports.RENDER_HINT = RENDER_HINT;
|
|
304
|
+
exports.allGalleryImages = allGalleryImages;
|
|
267
305
|
exports.assetUrl = assetUrl;
|
|
268
306
|
exports.generatePkce = generatePkce;
|
|
269
307
|
exports.generateState = generateState;
|
|
270
308
|
exports.getVariantDisplayName = getVariantDisplayName;
|
|
271
309
|
exports.isCimplifyAsset = isCimplifyAsset;
|
|
310
|
+
exports.resolveGallery = resolveGallery;
|
|
272
311
|
exports.startSignIn = startSignIn;
|
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
// src/gallery.ts
|
|
2
|
+
function dedupe(urls) {
|
|
3
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4
|
+
const out = [];
|
|
5
|
+
for (const url of urls) {
|
|
6
|
+
if (url && !seen.has(url)) {
|
|
7
|
+
seen.add(url);
|
|
8
|
+
out.push(url);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return out;
|
|
12
|
+
}
|
|
13
|
+
function resolveGallery(product, selectedVariantId) {
|
|
14
|
+
const variant = selectedVariantId ? product.variants?.find((v) => v.id === selectedVariantId) : void 0;
|
|
15
|
+
if (variant?.images?.length) return dedupe(variant.images);
|
|
16
|
+
if (product.images?.length) return dedupe(product.images);
|
|
17
|
+
const firstWithImages = product.variants?.find((v) => v.images?.length);
|
|
18
|
+
if (firstWithImages?.images?.length) return dedupe(firstWithImages.images);
|
|
19
|
+
return product.image_url ? [product.image_url] : [];
|
|
20
|
+
}
|
|
21
|
+
function allGalleryImages(product) {
|
|
22
|
+
const seen = /* @__PURE__ */ new Set();
|
|
23
|
+
const out = [];
|
|
24
|
+
const push = (url, variantId) => {
|
|
25
|
+
if (url && !seen.has(url)) {
|
|
26
|
+
seen.add(url);
|
|
27
|
+
out.push({ url, variantId });
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
push(product.image_url, null);
|
|
31
|
+
for (const url of product.images ?? []) push(url, null);
|
|
32
|
+
for (const variant of product.variants ?? []) {
|
|
33
|
+
for (const url of variant.images ?? []) push(url, variant.id);
|
|
34
|
+
}
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
|
|
1
38
|
// src/utils/variant.ts
|
|
2
39
|
function stripProductPrefix(variantName, productName) {
|
|
3
40
|
if (!variantName || !productName) return variantName || productName;
|
|
@@ -256,4 +293,4 @@ function appendTransform(url, t) {
|
|
|
256
293
|
return `${url}${url.includes("?") ? "&" : "?"}${query}`;
|
|
257
294
|
}
|
|
258
295
|
|
|
259
|
-
export { CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, assetUrl, generatePkce, generateState, getVariantDisplayName, isCimplifyAsset, startSignIn };
|
|
296
|
+
export { CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, allGalleryImages, assetUrl, generatePkce, generateState, getVariantDisplayName, isCimplifyAsset, resolveGallery, startSignIn };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as AUTHORIZATION_TYPE, a as AUTH_MUTATION, b as AbortablePromise, c as ActivityRecommendation, d as ActivityRecommendationsResponse, e as ActivityService, f as ActivityStateResponse, g as AddressData, h as AddressInfo, i as AmountToPay, j as AuthResponse, k as AuthService, l as AuthStatus, m as AuthenticatedCustomer, n as AuthenticatedData, o as AutocompletePrediction, p as AutocompleteResponse, q as AvailabilityResult, r as AvailableSlot, B as Booking, s as BookingModificationType, t as BookingStatus, u as BookingWithDetails, v as BufferTimes, w as Business, x as BusinessHours, y as BusinessPreferences, z as BusinessService, C as BusinessSettings, D as BusinessType, E as BusinessWithLocations, F as CHECKOUT_MODE, G as CHECKOUT_MUTATION, H as CHECKOUT_STEP, I as CONTACT_TYPE, J as CacheOptions, K as CancelBookingInput, L as CancelBookingResult, M as CancelOrderInput, N as CancellationPolicy, O as CartOperations, P as CatalogueQueries, Q as CatalogueResult, R as CatalogueSnapshot, S as CategoryInfo, T as ChatAttachment, U as ChatConversation, V as ChatConversationResponse, W as ChatMessage, X as ChatWidgetStarter, Y as CheckSlotAvailabilityInput, Z as CheckSlotAvailabilityResult, _ as CheckoutAddressInfo, $ as CheckoutCartData, a0 as CheckoutCartItem, a1 as CheckoutCustomerInfo, a2 as CheckoutFormData, a3 as CheckoutInput, a4 as CheckoutMode, a8 as CheckoutOperations, a5 as CheckoutOrderType, a6 as CheckoutPaymentMethod, a7 as CheckoutResult, a8 as CheckoutService, a9 as CheckoutStatus, aa as CheckoutStatusContext, ab as CheckoutStep, ac as CimplifyClient, ad as CimplifyConfig, ae as CimplifyElement, af as CimplifyElements, ag as ContactType, ah as ContentType, ai as CreateAddressInput, aj as CreateMobileMoneyInput, ak as Customer, al as CustomerAddress, am as CustomerBooking, an as CustomerBookingServiceItem, ao as CustomerLinkPreferences, ap as CustomerMobileMoney, aq as CustomerServicePreferences, ar as DEFAULT_COUNTRY, as as DEFAULT_CURRENCY, at as DEVICE_TYPE, au as DayAvailability, av as DeliveryFeeDetails, aw as DeliveryFeeResponse, ax as DeliveryService, ay as DepositResult, az as DeviceType, aA as DismissMessageResponse, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aD as ElementAppearance, aE as ElementEventHandler, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aI as ElementsCheckoutData, aJ as ElementsCheckoutResult, aK as ElementsCustomerInfo, aL as ElementsOptions, aM as EnrollAndLinkOrderInput, aN as EnrollAndLinkOrderResult, aO as EnrollmentData, aP as Err, aQ as FeeBearerType, aR as FetchQuoteInput, aS as FulfillmentLink, aT as FulfillmentStatus, aU as FulfillmentType, aV as FxQuote, aW as FxQuoteRequest, aX as FxRateResponse, aY as FxService, aZ as GetAvailableSlotsInput, a_ as GetOrdersOptions, a$ as GetProductsOptions, b0 as IframeToParentMessage, b1 as InventoryService, b2 as LINK_MUTATION, b3 as LINK_QUERY, b4 as LineItem, b5 as LineType, b6 as LinkData, b7 as LinkEnrollResult, b8 as LinkService, b9 as LinkSession, ba as LinkStatusResult, bb as LiteBootstrap, bc as LiteService, bd as Location, be as LocationBooking, bf as LocationTaxBehavior, bg as LocationTaxOverrides, bh as LocationTimeProfile, bi as LocationWithDetails, bj as MESSAGE_TYPES, bk as MOBILE_MONEY_PROVIDER, bl as MobileMoneyData, bm as MobileMoneyDetails, bn as MobileMoneyProvider, bo as NextAction, bp as ORDER_MUTATION, bq as ORDER_TYPE, br as ObservabilityHooks, bs as Ok, bt as Order, bu as OrderChannel, bv as OrderFilter, bw as OrderFulfillmentSummary, bx as OrderGroup, by as OrderGroupDetails, bz as OrderGroupPayment, bA as OrderGroupPaymentState, bB as OrderGroupPaymentStatus, bC as OrderGroupPaymentSummary, bD as OrderGroupStatus, bE as OrderHistory, bF as OrderLineState, bG as OrderLineStatus, bH as OrderPaymentEvent, bI as OrderQueries, bJ as OrderSplitDetail, bK as OrderStatus, bL as OrderType, bM as OtpResult, bN as PAYMENT_METHOD, bO as PAYMENT_MUTATION, bP as PAYMENT_STATE, bQ as PICKUP_TIME_TYPE, bR as ParentToIframeMessage, bS as PaymentMethodInfo, bT as PaymentState, bU as PickupTime, bV as PickupTimeType, bW as PlaceDetailsResponse, bX as PlacesService, bY as PriceQuote, bZ as PricingOverrides, b_ as ProcessAndResolveOptions, b$ as ProcessCheckoutOptions, c0 as ProcessCheckoutResult, c1 as ProviderResolutionSource, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c7 as ReadRequestOptions, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, ca as RefundOrderInput, cb as RelatedCandidate, cc as RelatedProduct, cd as RelatedProductsEnrichment, ce as RelationType, cf as ReminderMethod, cg as ReminderSettings, ch as ReorderResult, ci as RequestContext, cj as RequestErrorEvent, ck as RequestOptions, cl as RequestOtpInput, cm as RequestSource, cn as RequestStartEvent, co as RequestSuccessEvent, cp as RescheduleBookingInput, cq as RescheduleBookingResult, cr as RescheduleHistoryRecord, cs as ResourceAssignment, ct as Result, cu as RetryEvent, cv as RevokeAllSessionsResult, cw as RevokeSessionResult, cx as Room, cy as SchedulingMetadata, cz as SchedulingResult, cA as SchedulingService, cB as SenderType, cC as Service, cD as ServiceAvailabilityParams, cE as ServiceAvailabilityResult, cF as ServiceCharge, cG as ServiceNotes, cH as ServiceScheduleRequest, cI as ServiceStatus, cJ as SessionActivityData, cK as SessionChangeEvent, cL as SessionMessage, cM as SlotResourceInfo, cN as SlotStaffInfo, cO as Staff, cP as StaffAssignment, cQ as StaffRole, cR as StaffScheduleItem, cS as StockLevel, cT as StockStatus, cU as StorefrontBootstrap, cV as SubscriptionService, cW as SupportService, cX as Table, cY as TableInfo, cZ as TimeRange, c_ as TimeRanges, c$ as TimeSlot, d0 as TrackCategoryViewOptions, d1 as TrackProductViewOptions, d2 as UpdateAddressInput, d3 as UpdateOrderStatusInput, d4 as UpdateProfileInput, d5 as UploadInitResponse, d6 as UploadResult, d7 as UploadService, d8 as VerifyOtpInput, d9 as combine, da as combineObject, db as createCimplifyClient, dc as createElements, dd as err, de as flatMap, df as fromPromise, dg as getOrElse, dh as isErr, di as isOk, dj as mapError, dk as mapResult, dl as ok, dm as toNullable, dn as tryCatch, dp as unwrap } from './client-DKg-5OWu.mjs';
|
|
2
|
-
import { j as ApiError } from './product-B_kS4Oxa.mjs';
|
|
3
|
-
export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue,
|
|
2
|
+
import { b9 as ProductWithDetails, j as ApiError } from './product-B_kS4Oxa.mjs';
|
|
3
|
+
export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue, ba as PropertyFacet, bb as PropertySource, bc as QuantityPricingTier, bd as RENDER_HINT, be as RelatedProductView, bf as SalesChannel, bg as SchedulingMode, bh as SelectedAddOnOption, bi as SemanticKind, bj as SignatureValue, bk as Subscription, bl as SubscriptionInvoice, bm as SubscriptionItem, bn as SubscriptionStatus, bo as SubscriptionWithDetails, bp as Tag, bq as TagsResponse, br as TaxPathComponent, bs as TaxonomyAttributeTemplate, bt as TaxonomyWithChildren, bu as UICart, bv as UICartBusiness, bw as UICartCustomer, bx as UICartLocation, by as UICartPricing, bz as UpdateCartItemInput, bA as VariantAxis, bB as VariantAxisSelection, bC as VariantAxisValue, bD as VariantAxisValueView, bE as VariantAxisView, bF as VariantAxisWithValues, bG as VariantDetails, bH as VariantDetailsDTO, bI as VariantDisplayAttribute, bJ as VariantLocationAvailability, bK as VariantStrategy, bL as VariantView, bM as ZERO, bN as currencyCode, bO as enrichError, bP as getErrorHint, bQ as isCimplifyError, bR as isIdempotencyMismatchError, bS as isQuoteConflictRequiringConsent, bT as isQuoteError, bU as isRetryableError, bV as isSupportedCurrency, bW as money, bX as moneyFromNumber } from './product-B_kS4Oxa.mjs';
|
|
4
4
|
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, h as formatPriceRange, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, p as getPriceRange, q as getProductCurrency, r as getTaxAmount, s as getUnitPriceAtQuantity, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-D8vnKlOQ.mjs';
|
|
5
5
|
export { A as AdConfig, a as AdContextValue, b as AdCreative, c as AdPosition, d as AdSlot, e as AdTheme, S as SignInOptions, g as getVariantDisplayName, s as startSignIn } from './sign-in-TL01-awQ.mjs';
|
|
6
6
|
export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-DVS7ZUEp.mjs';
|
|
@@ -8,6 +8,29 @@ export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPri
|
|
|
8
8
|
export { generateIdempotencyKey } from './advanced.mjs';
|
|
9
9
|
import 'libphonenumber-js';
|
|
10
10
|
|
|
11
|
+
interface GalleryImage {
|
|
12
|
+
url: string;
|
|
13
|
+
/** null = product-level image; otherwise the variant it belongs to. */
|
|
14
|
+
variantId: string | null;
|
|
15
|
+
}
|
|
16
|
+
type GalleryProduct = Pick<ProductWithDetails, "image_url" | "images" | "variants">;
|
|
17
|
+
/**
|
|
18
|
+
* The gallery to show for a product, optionally scoped to a selected variant.
|
|
19
|
+
*
|
|
20
|
+
* Resolution order (replace-on-select):
|
|
21
|
+
* 1. Selected variant's own photos, if it has any.
|
|
22
|
+
* 2. Product-level gallery (`images`, which already includes `image_url`).
|
|
23
|
+
* 3. First variant with photos — covers the fashion case where the product
|
|
24
|
+
* row has no images and every photo lives on a variant.
|
|
25
|
+
* 4. The primary `image_url` alone.
|
|
26
|
+
*/
|
|
27
|
+
declare function resolveGallery(product: GalleryProduct, selectedVariantId?: string): string[];
|
|
28
|
+
/**
|
|
29
|
+
* Every image across the product and all its variants, deduped by URL and
|
|
30
|
+
* tagged with provenance. Use for a "view all photos" lightbox.
|
|
31
|
+
*/
|
|
32
|
+
declare function allGalleryImages(product: GalleryProduct): GalleryImage[];
|
|
33
|
+
|
|
11
34
|
interface CustomerGroup {
|
|
12
35
|
id: string;
|
|
13
36
|
business_id: string;
|
|
@@ -95,4 +118,4 @@ interface AssetUrlOptions extends AssetTransform {
|
|
|
95
118
|
declare function assetUrl(path: string, opts?: AssetUrlOptions): string;
|
|
96
119
|
declare function isCimplifyAsset(src: string, base?: string): boolean;
|
|
97
120
|
|
|
98
|
-
export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, type FrontendContext, type MutationRequest, type PriceListItem, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, type SilentSignInOptions, type SilentSignInResult, assetUrl, isCimplifyAsset, signInSilent };
|
|
121
|
+
export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, type FrontendContext, type GalleryImage, type MutationRequest, type PriceListItem, ProductWithDetails, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, type SilentSignInOptions, type SilentSignInResult, allGalleryImages, assetUrl, isCimplifyAsset, resolveGallery, signInSilent };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { A as AUTHORIZATION_TYPE, a as AUTH_MUTATION, b as AbortablePromise, c as ActivityRecommendation, d as ActivityRecommendationsResponse, e as ActivityService, f as ActivityStateResponse, g as AddressData, h as AddressInfo, i as AmountToPay, j as AuthResponse, k as AuthService, l as AuthStatus, m as AuthenticatedCustomer, n as AuthenticatedData, o as AutocompletePrediction, p as AutocompleteResponse, q as AvailabilityResult, r as AvailableSlot, B as Booking, s as BookingModificationType, t as BookingStatus, u as BookingWithDetails, v as BufferTimes, w as Business, x as BusinessHours, y as BusinessPreferences, z as BusinessService, C as BusinessSettings, D as BusinessType, E as BusinessWithLocations, F as CHECKOUT_MODE, G as CHECKOUT_MUTATION, H as CHECKOUT_STEP, I as CONTACT_TYPE, J as CacheOptions, K as CancelBookingInput, L as CancelBookingResult, M as CancelOrderInput, N as CancellationPolicy, O as CartOperations, P as CatalogueQueries, Q as CatalogueResult, R as CatalogueSnapshot, S as CategoryInfo, T as ChatAttachment, U as ChatConversation, V as ChatConversationResponse, W as ChatMessage, X as ChatWidgetStarter, Y as CheckSlotAvailabilityInput, Z as CheckSlotAvailabilityResult, _ as CheckoutAddressInfo, $ as CheckoutCartData, a0 as CheckoutCartItem, a1 as CheckoutCustomerInfo, a2 as CheckoutFormData, a3 as CheckoutInput, a4 as CheckoutMode, a8 as CheckoutOperations, a5 as CheckoutOrderType, a6 as CheckoutPaymentMethod, a7 as CheckoutResult, a8 as CheckoutService, a9 as CheckoutStatus, aa as CheckoutStatusContext, ab as CheckoutStep, ac as CimplifyClient, ad as CimplifyConfig, ae as CimplifyElement, af as CimplifyElements, ag as ContactType, ah as ContentType, ai as CreateAddressInput, aj as CreateMobileMoneyInput, ak as Customer, al as CustomerAddress, am as CustomerBooking, an as CustomerBookingServiceItem, ao as CustomerLinkPreferences, ap as CustomerMobileMoney, aq as CustomerServicePreferences, ar as DEFAULT_COUNTRY, as as DEFAULT_CURRENCY, at as DEVICE_TYPE, au as DayAvailability, av as DeliveryFeeDetails, aw as DeliveryFeeResponse, ax as DeliveryService, ay as DepositResult, az as DeviceType, aA as DismissMessageResponse, aB as ELEMENT_TYPES, aC as EVENT_TYPES, aD as ElementAppearance, aE as ElementEventHandler, aF as ElementEventType, aG as ElementOptions, aH as ElementType, aI as ElementsCheckoutData, aJ as ElementsCheckoutResult, aK as ElementsCustomerInfo, aL as ElementsOptions, aM as EnrollAndLinkOrderInput, aN as EnrollAndLinkOrderResult, aO as EnrollmentData, aP as Err, aQ as FeeBearerType, aR as FetchQuoteInput, aS as FulfillmentLink, aT as FulfillmentStatus, aU as FulfillmentType, aV as FxQuote, aW as FxQuoteRequest, aX as FxRateResponse, aY as FxService, aZ as GetAvailableSlotsInput, a_ as GetOrdersOptions, a$ as GetProductsOptions, b0 as IframeToParentMessage, b1 as InventoryService, b2 as LINK_MUTATION, b3 as LINK_QUERY, b4 as LineItem, b5 as LineType, b6 as LinkData, b7 as LinkEnrollResult, b8 as LinkService, b9 as LinkSession, ba as LinkStatusResult, bb as LiteBootstrap, bc as LiteService, bd as Location, be as LocationBooking, bf as LocationTaxBehavior, bg as LocationTaxOverrides, bh as LocationTimeProfile, bi as LocationWithDetails, bj as MESSAGE_TYPES, bk as MOBILE_MONEY_PROVIDER, bl as MobileMoneyData, bm as MobileMoneyDetails, bn as MobileMoneyProvider, bo as NextAction, bp as ORDER_MUTATION, bq as ORDER_TYPE, br as ObservabilityHooks, bs as Ok, bt as Order, bu as OrderChannel, bv as OrderFilter, bw as OrderFulfillmentSummary, bx as OrderGroup, by as OrderGroupDetails, bz as OrderGroupPayment, bA as OrderGroupPaymentState, bB as OrderGroupPaymentStatus, bC as OrderGroupPaymentSummary, bD as OrderGroupStatus, bE as OrderHistory, bF as OrderLineState, bG as OrderLineStatus, bH as OrderPaymentEvent, bI as OrderQueries, bJ as OrderSplitDetail, bK as OrderStatus, bL as OrderType, bM as OtpResult, bN as PAYMENT_METHOD, bO as PAYMENT_MUTATION, bP as PAYMENT_STATE, bQ as PICKUP_TIME_TYPE, bR as ParentToIframeMessage, bS as PaymentMethodInfo, bT as PaymentState, bU as PickupTime, bV as PickupTimeType, bW as PlaceDetailsResponse, bX as PlacesService, bY as PriceQuote, bZ as PricingOverrides, b_ as ProcessAndResolveOptions, b$ as ProcessCheckoutOptions, c0 as ProcessCheckoutResult, c1 as ProviderResolutionSource, c2 as QuoteBundleSelectionInput, c3 as QuoteCompositeSelectionInput, c4 as QuoteDynamicBuckets, c5 as QuoteStatus, c6 as QuoteUiMessage, c7 as ReadRequestOptions, c8 as RefreshQuoteInput, c9 as RefreshQuoteResult, ca as RefundOrderInput, cb as RelatedCandidate, cc as RelatedProduct, cd as RelatedProductsEnrichment, ce as RelationType, cf as ReminderMethod, cg as ReminderSettings, ch as ReorderResult, ci as RequestContext, cj as RequestErrorEvent, ck as RequestOptions, cl as RequestOtpInput, cm as RequestSource, cn as RequestStartEvent, co as RequestSuccessEvent, cp as RescheduleBookingInput, cq as RescheduleBookingResult, cr as RescheduleHistoryRecord, cs as ResourceAssignment, ct as Result, cu as RetryEvent, cv as RevokeAllSessionsResult, cw as RevokeSessionResult, cx as Room, cy as SchedulingMetadata, cz as SchedulingResult, cA as SchedulingService, cB as SenderType, cC as Service, cD as ServiceAvailabilityParams, cE as ServiceAvailabilityResult, cF as ServiceCharge, cG as ServiceNotes, cH as ServiceScheduleRequest, cI as ServiceStatus, cJ as SessionActivityData, cK as SessionChangeEvent, cL as SessionMessage, cM as SlotResourceInfo, cN as SlotStaffInfo, cO as Staff, cP as StaffAssignment, cQ as StaffRole, cR as StaffScheduleItem, cS as StockLevel, cT as StockStatus, cU as StorefrontBootstrap, cV as SubscriptionService, cW as SupportService, cX as Table, cY as TableInfo, cZ as TimeRange, c_ as TimeRanges, c$ as TimeSlot, d0 as TrackCategoryViewOptions, d1 as TrackProductViewOptions, d2 as UpdateAddressInput, d3 as UpdateOrderStatusInput, d4 as UpdateProfileInput, d5 as UploadInitResponse, d6 as UploadResult, d7 as UploadService, d8 as VerifyOtpInput, d9 as combine, da as combineObject, db as createCimplifyClient, dc as createElements, dd as err, de as flatMap, df as fromPromise, dg as getOrElse, dh as isErr, di as isOk, dj as mapError, dk as mapResult, dl as ok, dm as toNullable, dn as tryCatch, dp as unwrap } from './client-Dfg_hmkP.js';
|
|
2
|
-
import { j as ApiError } from './product-B_kS4Oxa.js';
|
|
3
|
-
export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue,
|
|
2
|
+
import { b9 as ProductWithDetails, j as ApiError } from './product-B_kS4Oxa.js';
|
|
3
|
+
export { A as AddOn, a as AddOnDetails, b as AddOnGroupDetails, c as AddOnOption, d as AddOnOptionDetails, e as AddOnOptionPrice, f as AddOnWithOptions, g as AddToCartInput, h as AddressValue, i as AdjustmentType, k as AppliedDiscount, l as AttributeAppliesTo, m as AttributeType, n as AttributeValidationRules, o as AttributeVisibility, B as BenefitType, p as BillingFrequency, q as BillingMarkupType, r as BillingPlanType, s as Bundle, t as BundleComponentData, u as BundleComponentInfo, v as BundleComponentVariantView, w as BundleComponentView, x as BundlePriceType, y as BundleProduct, z as BundleSelectionData, C as BundleSelectionInput, D as BundleStoredSelection, E as BundleSummary, F as BundleWithDetails, G as Cart, H as CartAddOn, I as CartChannel, J as CartItem, K as CartItemDetails, L as CartMutationResult, M as CartNotice, N as CartStatus, O as CartSummary, P as CartTotals, Q as Category, R as CategorySummary, S as ChosenPrice, T as CimplifyError, U as Collection, V as CollectionProduct, W as CollectionSummary, X as ComponentGroup, Y as ComponentGroupWithComponents, Z as ComponentPriceBreakdown, _ as ComponentSchedulingData, $ as ComponentSelectionInput, a0 as ComponentSourceType, a1 as Composite, a2 as CompositeComponent, a3 as CompositeComponentView, a4 as CompositeGroupView, a5 as CompositePriceBreakdown, a6 as CompositePriceResult, a7 as CompositePricingMode, a8 as CompositeSelectionData, $ as CompositeSelectionInput, a9 as CompositeStoredSelection, aa as CompositeWithDetails, ab as CurrencyCode, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ae as CustomerInputValue, af as DURATION_UNIT, ag as DateRangeValue, ah as Deal, ai as DealBenefitType, aj as DepositType, ak as DigitalProductType, al as DiscountBreakdown, am as DiscountDetails, an as DiscountValidation, ao as DisplayAddOn, ap as DisplayAddOnOption, aq as DisplayCart, ar as DisplayCartItem, as as DisplayMode, at as DurationUnit, au as ERROR_HINTS, av as EligiblePlansQuery, aw as ErrorCode, ax as ErrorCodeType, ay as ErrorHint, az as FacetValue, aA as FormattedPlanOption, aB as GroupPricingBehavior, aC as INPUT_FIELD_TYPE, aD as IdempotencyMismatchError, aE as InputFieldType, aF as InputFieldValidation, aG as InventoryType, aH as KnowledgeArticle, aI as LineConfiguration, aJ as LocationProductPrice, aK as LocationValue, aL as MeasurementValue, aM as Money, aN as PRODUCT_TYPE, aO as Pagination, aP as PaginationParams, aQ as PhoneValue, aR as Price, aS as PriceAdjustment, aT as PriceDecisionPath, aU as PriceEntryType, aV as PricePathTaxInfo, aW as PriceSource, aX as Product, aY as ProductAddOn, aZ as ProductAvailability, a_ as ProductAvailabilityNow, a$ as ProductBillingPlan, b0 as ProductDealInfo, b1 as ProductInputField, b2 as ProductProperty, b3 as ProductRenderHint, b4 as ProductTaxonomy, b5 as ProductTimeProfile, b6 as ProductType, b7 as ProductVariant, b8 as ProductVariantValue, ba as PropertyFacet, bb as PropertySource, bc as QuantityPricingTier, bd as RENDER_HINT, be as RelatedProductView, bf as SalesChannel, bg as SchedulingMode, bh as SelectedAddOnOption, bi as SemanticKind, bj as SignatureValue, bk as Subscription, bl as SubscriptionInvoice, bm as SubscriptionItem, bn as SubscriptionStatus, bo as SubscriptionWithDetails, bp as Tag, bq as TagsResponse, br as TaxPathComponent, bs as TaxonomyAttributeTemplate, bt as TaxonomyWithChildren, bu as UICart, bv as UICartBusiness, bw as UICartCustomer, bx as UICartLocation, by as UICartPricing, bz as UpdateCartItemInput, bA as VariantAxis, bB as VariantAxisSelection, bC as VariantAxisValue, bD as VariantAxisValueView, bE as VariantAxisView, bF as VariantAxisWithValues, bG as VariantDetails, bH as VariantDetailsDTO, bI as VariantDisplayAttribute, bJ as VariantLocationAvailability, bK as VariantStrategy, bL as VariantView, bM as ZERO, bN as currencyCode, bO as enrichError, bP as getErrorHint, bQ as isCimplifyError, bR as isIdempotencyMismatchError, bS as isQuoteConflictRequiringConsent, bT as isQuoteError, bU as isRetryableError, bV as isSupportedCurrency, bW as money, bX as moneyFromNumber } from './product-B_kS4Oxa.js';
|
|
4
4
|
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, c as categorizePaymentError, d as detectMobileMoneyProvider, f as formatMoney, a as formatNumberCompact, b as formatPrice, e as formatPriceAdjustment, g as formatPriceCompact, h as formatPriceRange, i as formatPriceWithTax, j as formatProductPrice, k as getBasePrice, l as getCurrencySymbol, m as getDiscountPercentage, n as getDisplayPrice, o as getMarkupPercentage, p as getPriceRange, q as getProductCurrency, r as getTaxAmount, s as getUnitPriceAtQuantity, t as hasTaxInfo, u as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, y as isTaxInclusive, z as isValidPhoneForContext, A as normalizePaymentResponse, B as normalizePhoneToE164, D as normalizeStatusResponse, E as parsePrice, F as resolvePhoneCountryCode } from './index-DIIlPUOC.js';
|
|
5
5
|
export { A as AdConfig, a as AdContextValue, b as AdCreative, c as AdPosition, d as AdSlot, e as AdTheme, S as SignInOptions, g as getVariantDisplayName, s as startSignIn } from './sign-in-TL01-awQ.js';
|
|
6
6
|
export { A as AddressAuthorizationData, a as AuthorizationType, I as InitializePaymentResult, P as Payment, b as PaymentErrorDetails, c as PaymentMethod, d as PaymentMethodType, e as PaymentProcessingState, f as PaymentProvider, g as PaymentResponse, h as PaymentStatus, i as PaymentStatusResponse, S as SubmitAuthorizationInput } from './payment-sn-yGL7v.js';
|
|
@@ -8,6 +8,29 @@ export { F as FormatCompactOptions, a as FormatPriceOptions, P as ProductWithPri
|
|
|
8
8
|
export { generateIdempotencyKey } from './advanced.js';
|
|
9
9
|
import 'libphonenumber-js';
|
|
10
10
|
|
|
11
|
+
interface GalleryImage {
|
|
12
|
+
url: string;
|
|
13
|
+
/** null = product-level image; otherwise the variant it belongs to. */
|
|
14
|
+
variantId: string | null;
|
|
15
|
+
}
|
|
16
|
+
type GalleryProduct = Pick<ProductWithDetails, "image_url" | "images" | "variants">;
|
|
17
|
+
/**
|
|
18
|
+
* The gallery to show for a product, optionally scoped to a selected variant.
|
|
19
|
+
*
|
|
20
|
+
* Resolution order (replace-on-select):
|
|
21
|
+
* 1. Selected variant's own photos, if it has any.
|
|
22
|
+
* 2. Product-level gallery (`images`, which already includes `image_url`).
|
|
23
|
+
* 3. First variant with photos — covers the fashion case where the product
|
|
24
|
+
* row has no images and every photo lives on a variant.
|
|
25
|
+
* 4. The primary `image_url` alone.
|
|
26
|
+
*/
|
|
27
|
+
declare function resolveGallery(product: GalleryProduct, selectedVariantId?: string): string[];
|
|
28
|
+
/**
|
|
29
|
+
* Every image across the product and all its variants, deduped by URL and
|
|
30
|
+
* tagged with provenance. Use for a "view all photos" lightbox.
|
|
31
|
+
*/
|
|
32
|
+
declare function allGalleryImages(product: GalleryProduct): GalleryImage[];
|
|
33
|
+
|
|
11
34
|
interface CustomerGroup {
|
|
12
35
|
id: string;
|
|
13
36
|
business_id: string;
|
|
@@ -95,4 +118,4 @@ interface AssetUrlOptions extends AssetTransform {
|
|
|
95
118
|
declare function assetUrl(path: string, opts?: AssetUrlOptions): string;
|
|
96
119
|
declare function isCimplifyAsset(src: string, base?: string): boolean;
|
|
97
120
|
|
|
98
|
-
export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, type FrontendContext, type MutationRequest, type PriceListItem, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, type SilentSignInOptions, type SilentSignInResult, assetUrl, isCimplifyAsset, signInSilent };
|
|
121
|
+
export { ApiError, type ApiResponse, type AssetTransform, type AssetUrlOptions, CIMPLIFY_CDN_HOSTS, type CustomerGroup, type CustomerPricingInfo, DEFAULT_CDN_BASE_URL, type FrontendContext, type GalleryImage, type MutationRequest, type PriceListItem, ProductWithDetails, type QuantityBreak, type QueryRequest, type ResolvedQuantityBreak, type ResponseMetadata, type SilentSignInOptions, type SilentSignInResult, allGalleryImages, assetUrl, isCimplifyAsset, resolveGallery, signInSilent };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVV3GTDIP_js = require('./chunk-VV3GTDIP.js');
|
|
4
4
|
var chunkL5GKVQVJ_js = require('./chunk-L5GKVQVJ.js');
|
|
5
5
|
var chunkMW7ICTVK_js = require('./chunk-MW7ICTVK.js');
|
|
6
6
|
var chunkJGBDWEPJ_js = require('./chunk-JGBDWEPJ.js');
|
|
@@ -24,8 +24,8 @@ async function signInSilent(opts) {
|
|
|
24
24
|
}
|
|
25
25
|
const authUrl = (opts.authUrl ?? DEFAULT_AUTH_URL).replace(/\/$/, "");
|
|
26
26
|
const callbackUri = opts.callbackUri ?? "/auth/callback";
|
|
27
|
-
const pkce = await
|
|
28
|
-
const state =
|
|
27
|
+
const pkce = await chunkVV3GTDIP_js.generatePkce();
|
|
28
|
+
const state = chunkVV3GTDIP_js.generateState();
|
|
29
29
|
const params = new URLSearchParams({
|
|
30
30
|
response_type: "code",
|
|
31
31
|
response_mode: "web_message",
|
|
@@ -95,43 +95,51 @@ async function signInSilent(opts) {
|
|
|
95
95
|
|
|
96
96
|
Object.defineProperty(exports, "CIMPLIFY_CDN_HOSTS", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkVV3GTDIP_js.CIMPLIFY_CDN_HOSTS; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "DEFAULT_CDN_BASE_URL", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkVV3GTDIP_js.DEFAULT_CDN_BASE_URL; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "DURATION_UNIT", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkVV3GTDIP_js.DURATION_UNIT; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "INPUT_FIELD_TYPE", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkVV3GTDIP_js.INPUT_FIELD_TYPE; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "PRODUCT_TYPE", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkVV3GTDIP_js.PRODUCT_TYPE; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "RENDER_HINT", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkVV3GTDIP_js.RENDER_HINT; }
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "allGalleryImages", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () { return chunkVV3GTDIP_js.allGalleryImages; }
|
|
119
123
|
});
|
|
120
124
|
Object.defineProperty(exports, "assetUrl", {
|
|
121
125
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkVV3GTDIP_js.assetUrl; }
|
|
123
127
|
});
|
|
124
128
|
Object.defineProperty(exports, "getVariantDisplayName", {
|
|
125
129
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkVV3GTDIP_js.getVariantDisplayName; }
|
|
127
131
|
});
|
|
128
132
|
Object.defineProperty(exports, "isCimplifyAsset", {
|
|
129
133
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkVV3GTDIP_js.isCimplifyAsset; }
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(exports, "resolveGallery", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
get: function () { return chunkVV3GTDIP_js.resolveGallery; }
|
|
131
139
|
});
|
|
132
140
|
Object.defineProperty(exports, "startSignIn", {
|
|
133
141
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkVV3GTDIP_js.startSignIn; }
|
|
135
143
|
});
|
|
136
144
|
Object.defineProperty(exports, "isValidPhoneForContext", {
|
|
137
145
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { generatePkce, generateState } from './chunk-
|
|
2
|
-
export { CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, assetUrl, getVariantDisplayName, isCimplifyAsset, startSignIn } from './chunk-
|
|
1
|
+
import { generatePkce, generateState } from './chunk-W6FRIYYU.mjs';
|
|
2
|
+
export { CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, allGalleryImages, assetUrl, getVariantDisplayName, isCimplifyAsset, resolveGallery, startSignIn } from './chunk-W6FRIYYU.mjs';
|
|
3
3
|
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-YOIVZ6OA.mjs';
|
|
4
4
|
export { ActivityService, CimplifyClient, DeliveryService, PlacesService, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-SQ7U3BWY.mjs';
|
|
5
5
|
export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, SchedulingService, combine, combineObject, createElements, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, toNullable, tryCatch, unwrap } from './chunk-I4IXPQIX.mjs';
|