@cimplify/sdk 0.106.1 → 0.107.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/advanced.d.mts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{catalogue-ChBjPPME.d.ts → catalogue-BohD-jU_.d.mts} +44 -38
- package/dist/{catalogue-CVKH9faR.d.mts → catalogue-C4xKpirp.d.ts} +44 -38
- package/dist/{chunk-YHR6LFQ7.mjs → chunk-2I6YKE6Q.mjs} +55 -94
- package/dist/{chunk-LJSQ7TUV.js → chunk-73HY36Z7.js} +4 -4
- package/dist/{chunk-SFG2LMRD.js → chunk-HKCB73AJ.js} +55 -94
- package/dist/{chunk-IWXVKW22.mjs → chunk-IWZKCL3P.mjs} +2 -2
- package/dist/{chunk-L4XKIMUO.mjs → chunk-MKZXZDHE.mjs} +17 -0
- package/dist/{chunk-NJK3THWT.js → chunk-NX5YBQZP.js} +17 -0
- package/dist/{chunk-ABAK4YVY.mjs → chunk-P4HYAV3L.mjs} +102 -82
- package/dist/{chunk-QKL5L5IU.js → chunk-W4ZFZPPY.js} +181 -160
- package/dist/{client-BfKFK7cn.d.mts → client-BBFfAtn4.d.mts} +2 -2
- package/dist/{client-DoczTJbs.d.ts → client-ByURQZM9.d.ts} +2 -2
- package/dist/{checkout-XoV4HNg2.d.mts → elements-Dtqe9Ekd.d.mts} +348 -361
- package/dist/{checkout-XoV4HNg2.d.ts → elements-Dtqe9Ekd.d.ts} +348 -361
- package/dist/{index-DEUorPUO.d.mts → index-7oz-hVVA.d.mts} +2 -2
- package/dist/{index-DRMBo26v.d.mts → index-B6mukQYB.d.mts} +2 -2
- package/dist/{index-Dn6xCpDe.d.ts → index-CvLuAMjQ.d.ts} +2 -2
- package/dist/{index-DweR60Cv.d.ts → index-DFqDU6yU.d.ts} +2 -2
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +71 -67
- package/dist/index.mjs +3 -3
- package/dist/mock/cli.mjs +17 -0
- package/dist/mock/library.js +17 -0
- package/dist/mock/library.mjs +17 -0
- package/dist/mock/msw.js +17 -0
- package/dist/mock/msw.mjs +17 -0
- package/dist/{price-De-sxcuj.d.ts → price-B4jL81ef.d.ts} +1 -1
- package/dist/{price-CUGIYRtD.d.mts → price-Pyq-vlrm.d.mts} +1 -1
- package/dist/react.d.mts +3 -3
- package/dist/react.d.ts +3 -3
- package/dist/react.js +34 -34
- package/dist/react.mjs +5 -5
- package/dist/{server-7soMMUgP.d.ts → server-Cowuvfbr.d.ts} +1 -1
- package/dist/{server-DDEJ7e9s.d.mts → server-KilvZJU0.d.mts} +1 -1
- package/dist/server.d.mts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +7 -7
- package/dist/server.mjs +2 -2
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +5 -5
- package/dist/testing/suite.d.ts +5 -5
- package/dist/testing/suite.js +24 -24
- package/dist/testing/suite.mjs +4 -4
- package/dist/testing.d.mts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +116 -116
- package/dist/testing.mjs +5 -5
- package/dist/utils.d.mts +3 -3
- package/dist/utils.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { BOUNDARY_KIND, CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, allGalleryImages, assetUrl, chatMessageCards, displaysGrossPrices, getVariantDisplayName, isCimplifyAsset, isMultiDayService, priceBasisLabel, resolveGallery, serviceBillingMultiplier, stayLength, stayPeriods } from './chunk-3V4DVXV3.mjs';
|
|
2
2
|
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-YOIVZ6OA.mjs';
|
|
3
|
-
export { ActivityService, CimplifyClient, DeliveryService, HostedPurchaseIntentService, PURCHASE_INTENT_ROUTE, PlacesService, PurchaseIntentResolver, PurchaseIntentService, SESSION_CHANGE_SOURCE, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-
|
|
3
|
+
export { ActivityService, CimplifyClient, DeliveryService, HostedPurchaseIntentService, PURCHASE_INTENT_ROUTE, PlacesService, PurchaseIntentResolver, PurchaseIntentService, SESSION_CHANGE_SOURCE, SessionService, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-P4HYAV3L.mjs';
|
|
4
4
|
import './chunk-U4MW6PYU.mjs';
|
|
5
|
-
import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-
|
|
6
|
-
export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, PAYMENT_AUTHORIZATION_OUTCOME_STATUS, PAYMENT_AUTHORIZATION_PROVIDER, PaymentAuthorizationAdapterRegistry, PaystackAuthorizationAdapter, SchedulingService, StripeAuthorizationAdapter, clearIntentIdempotencyKey as clearPurchaseIntentIdempotencyKey, combine, combineObject, createDefaultPaymentAuthorizationAdapterRegistry, createElements, createPurchaseIntentConfirmation, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, intentIdempotencyKey as purchaseIntentIdempotencyKey, purchaseIntentRequiresPaymentOption, selectPurchaseIntentPaymentOption, startSignIn, toNullable, tryCatch, unwrap } from './chunk-
|
|
5
|
+
import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-2I6YKE6Q.mjs';
|
|
6
|
+
export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, PAYMENT_AUTHORIZATION_OUTCOME_STATUS, PAYMENT_AUTHORIZATION_PROVIDER, PaymentAuthorizationAdapterRegistry, PaystackAuthorizationAdapter, SchedulingService, StripeAuthorizationAdapter, clearIntentIdempotencyKey as clearPurchaseIntentIdempotencyKey, combine, combineObject, createDefaultPaymentAuthorizationAdapterRegistry, createElements, createPurchaseIntentConfirmation, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, intentIdempotencyKey as purchaseIntentIdempotencyKey, purchaseIntentRequiresPaymentOption, selectPurchaseIntentPaymentOption, startSignIn, toNullable, tryCatch, unwrap } from './chunk-2I6YKE6Q.mjs';
|
|
7
7
|
export { AUTHORIZATION_TYPE, AUTH_MUTATION, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_NEXT_ACTION, CHECKOUT_ORDER_RESULT_STATUS, CHECKOUT_STATUS, CHECKOUT_STEP, CONTACT_TYPE, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, LINK_MUTATION, LINK_QUERY, MAX_PAYMENT_AUTHORIZATION_STEPS, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE } from './chunk-33VCYWVL.mjs';
|
|
8
8
|
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, PAYMENT_TERMINAL_FAILURE_STATUSES, canonicalMobileMoneyProvider, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceRange, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getPriceRange, getProductCurrency, getTaxAmount, getUnitPriceAtQuantity, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice, paymentAuthorizationUrl, purchaseIntentMobileMoneyNetwork } from './chunk-NYDVVNZI.mjs';
|
|
9
9
|
export { CHECKOUT_COMPLIANCE_LANE, CHECKOUT_COMPLIANCE_REASON, CHECKOUT_INVALIDATION_REASON, CHECKOUT_MATERIAL_TERMS_COMPONENT, CHECKOUT_PROTECTION_STATUS, CHECKOUT_PURCHASE_SURFACE, CHECKOUT_TERMS_COMPONENT, CHECKOUT_TERMS_DELTA_KIND, CimplifyError, ERROR_HINTS, ErrorCode, IdempotencyMismatchError, LEGACY_CHECKOUT_PAYMENT_METHOD_ALIAS, LEGACY_CHECKOUT_PAYMENT_STATUS, MOBILE_MONEY_TENDER_AUTHORITY_KIND, NATIVE_PURCHASE_PLATFORM, PAYMENT_COLLECTION_MODE, PAYMENT_INSTRUMENT_DISPLAY_KIND, PAYMENT_OPTION_NEXT_ACTION, PAYMENT_OPTION_STATUS, PURCHASE_DISPOSITION, PURCHASE_INTENT_ACTION_DECISION, PURCHASE_INTENT_CONFIRM_STATUS, PURCHASE_INTENT_ERROR_CODE, PURCHASE_INTENT_LINE_CONFIGURATION_KIND, PURCHASE_INTENT_MOBILE_MONEY_NETWORK, PURCHASE_INTENT_OFFER_KIND, PURCHASE_INTENT_PAYMENT_METHOD, PURCHASE_INTENT_PAYMENT_PROVIDER, PURCHASE_INTENT_RESOLUTION_KIND, PURCHASE_INTENT_RESOLVE_STATUS, PURCHASE_INTENT_SELLABLE_KIND, PURCHASE_INTENT_SOURCE_KIND, PURCHASE_INTENT_STATUS, PURCHASE_SURFACE, PURCHASING_PRINCIPAL_KIND, ZERO, currencyCode, enrichError, getErrorHint, isCimplifyError, isIdempotencyMismatchError, isQuoteConflictRequiringConsent, isQuoteError, isRetryableError, isSupportedCurrency, money, moneyFromNumber } from './chunk-NJYR6GGM.mjs';
|
package/dist/mock/cli.mjs
CHANGED
|
@@ -4314,6 +4314,23 @@ function buildV1(deps) {
|
|
|
4314
4314
|
return tryRoute(c, () => deps.support.react(c.req.param("messageId"), body.emoji ?? ""));
|
|
4315
4315
|
});
|
|
4316
4316
|
app.post("/support/conversation/handoff", (c) => c.json({ data: { requested: true } }));
|
|
4317
|
+
app.post("/auth/session/claim", async (c) => {
|
|
4318
|
+
const body = await c.req.json().catch(() => ({}));
|
|
4319
|
+
if (!body.access_token) return c.json({ error: "access_token is required" }, 400);
|
|
4320
|
+
const session = c.var.session;
|
|
4321
|
+
return c.json({
|
|
4322
|
+
data: {
|
|
4323
|
+
session_token: session.token,
|
|
4324
|
+
customer: {
|
|
4325
|
+
id: session.customer_id ?? "cus_test",
|
|
4326
|
+
name: session.customer_name ?? "Test User",
|
|
4327
|
+
email: null,
|
|
4328
|
+
phone: null
|
|
4329
|
+
},
|
|
4330
|
+
cart: null
|
|
4331
|
+
}
|
|
4332
|
+
});
|
|
4333
|
+
});
|
|
4317
4334
|
app.post("/support/conversation/claim", async (c) => {
|
|
4318
4335
|
const body = await c.req.json().catch(() => ({}));
|
|
4319
4336
|
if (!body.access_token) return c.json({ error: "access_token is required" }, 400);
|
package/dist/mock/library.js
CHANGED
|
@@ -3136,6 +3136,23 @@ function buildV1(deps) {
|
|
|
3136
3136
|
return tryRoute(c, () => deps.support.react(c.req.param("messageId"), body.emoji ?? ""));
|
|
3137
3137
|
});
|
|
3138
3138
|
app.post("/support/conversation/handoff", (c) => c.json({ data: { requested: true } }));
|
|
3139
|
+
app.post("/auth/session/claim", async (c) => {
|
|
3140
|
+
const body = await c.req.json().catch(() => ({}));
|
|
3141
|
+
if (!body.access_token) return c.json({ error: "access_token is required" }, 400);
|
|
3142
|
+
const session = c.var.session;
|
|
3143
|
+
return c.json({
|
|
3144
|
+
data: {
|
|
3145
|
+
session_token: session.token,
|
|
3146
|
+
customer: {
|
|
3147
|
+
id: session.customer_id ?? "cus_test",
|
|
3148
|
+
name: session.customer_name ?? "Test User",
|
|
3149
|
+
email: null,
|
|
3150
|
+
phone: null
|
|
3151
|
+
},
|
|
3152
|
+
cart: null
|
|
3153
|
+
}
|
|
3154
|
+
});
|
|
3155
|
+
});
|
|
3139
3156
|
app.post("/support/conversation/claim", async (c) => {
|
|
3140
3157
|
const body = await c.req.json().catch(() => ({}));
|
|
3141
3158
|
if (!body.access_token) return c.json({ error: "access_token is required" }, 400);
|
package/dist/mock/library.mjs
CHANGED
|
@@ -3134,6 +3134,23 @@ function buildV1(deps) {
|
|
|
3134
3134
|
return tryRoute(c, () => deps.support.react(c.req.param("messageId"), body.emoji ?? ""));
|
|
3135
3135
|
});
|
|
3136
3136
|
app.post("/support/conversation/handoff", (c) => c.json({ data: { requested: true } }));
|
|
3137
|
+
app.post("/auth/session/claim", async (c) => {
|
|
3138
|
+
const body = await c.req.json().catch(() => ({}));
|
|
3139
|
+
if (!body.access_token) return c.json({ error: "access_token is required" }, 400);
|
|
3140
|
+
const session = c.var.session;
|
|
3141
|
+
return c.json({
|
|
3142
|
+
data: {
|
|
3143
|
+
session_token: session.token,
|
|
3144
|
+
customer: {
|
|
3145
|
+
id: session.customer_id ?? "cus_test",
|
|
3146
|
+
name: session.customer_name ?? "Test User",
|
|
3147
|
+
email: null,
|
|
3148
|
+
phone: null
|
|
3149
|
+
},
|
|
3150
|
+
cart: null
|
|
3151
|
+
}
|
|
3152
|
+
});
|
|
3153
|
+
});
|
|
3137
3154
|
app.post("/support/conversation/claim", async (c) => {
|
|
3138
3155
|
const body = await c.req.json().catch(() => ({}));
|
|
3139
3156
|
if (!body.access_token) return c.json({ error: "access_token is required" }, 400);
|
package/dist/mock/msw.js
CHANGED
|
@@ -3134,6 +3134,23 @@ function buildV1(deps) {
|
|
|
3134
3134
|
return tryRoute(c, () => deps.support.react(c.req.param("messageId"), body.emoji ?? ""));
|
|
3135
3135
|
});
|
|
3136
3136
|
app.post("/support/conversation/handoff", (c) => c.json({ data: { requested: true } }));
|
|
3137
|
+
app.post("/auth/session/claim", async (c) => {
|
|
3138
|
+
const body = await c.req.json().catch(() => ({}));
|
|
3139
|
+
if (!body.access_token) return c.json({ error: "access_token is required" }, 400);
|
|
3140
|
+
const session = c.var.session;
|
|
3141
|
+
return c.json({
|
|
3142
|
+
data: {
|
|
3143
|
+
session_token: session.token,
|
|
3144
|
+
customer: {
|
|
3145
|
+
id: session.customer_id ?? "cus_test",
|
|
3146
|
+
name: session.customer_name ?? "Test User",
|
|
3147
|
+
email: null,
|
|
3148
|
+
phone: null
|
|
3149
|
+
},
|
|
3150
|
+
cart: null
|
|
3151
|
+
}
|
|
3152
|
+
});
|
|
3153
|
+
});
|
|
3137
3154
|
app.post("/support/conversation/claim", async (c) => {
|
|
3138
3155
|
const body = await c.req.json().catch(() => ({}));
|
|
3139
3156
|
if (!body.access_token) return c.json({ error: "access_token is required" }, 400);
|
package/dist/mock/msw.mjs
CHANGED
|
@@ -3132,6 +3132,23 @@ function buildV1(deps) {
|
|
|
3132
3132
|
return tryRoute(c, () => deps.support.react(c.req.param("messageId"), body.emoji ?? ""));
|
|
3133
3133
|
});
|
|
3134
3134
|
app.post("/support/conversation/handoff", (c) => c.json({ data: { requested: true } }));
|
|
3135
|
+
app.post("/auth/session/claim", async (c) => {
|
|
3136
|
+
const body = await c.req.json().catch(() => ({}));
|
|
3137
|
+
if (!body.access_token) return c.json({ error: "access_token is required" }, 400);
|
|
3138
|
+
const session = c.var.session;
|
|
3139
|
+
return c.json({
|
|
3140
|
+
data: {
|
|
3141
|
+
session_token: session.token,
|
|
3142
|
+
customer: {
|
|
3143
|
+
id: session.customer_id ?? "cus_test",
|
|
3144
|
+
name: session.customer_name ?? "Test User",
|
|
3145
|
+
email: null,
|
|
3146
|
+
phone: null
|
|
3147
|
+
},
|
|
3148
|
+
cart: null
|
|
3149
|
+
}
|
|
3150
|
+
});
|
|
3151
|
+
});
|
|
3135
3152
|
app.post("/support/conversation/claim", async (c) => {
|
|
3136
3153
|
const body = await c.req.json().catch(() => ({}));
|
|
3137
3154
|
if (!body.access_token) return c.json({ error: "access_token is required" }, 400);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './
|
|
1
|
+
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './elements-Dtqe9Ekd.js';
|
|
2
2
|
|
|
3
3
|
interface ProductWithPrice {
|
|
4
4
|
price_info?: ChosenPrice;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './
|
|
1
|
+
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './elements-Dtqe9Ekd.mjs';
|
|
2
2
|
|
|
3
3
|
interface ProductWithPrice {
|
|
4
4
|
price_info?: ChosenPrice;
|
package/dist/react.d.mts
CHANGED
|
@@ -2,10 +2,10 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { ReactNode, PointerEvent, MouseEvent } from 'react';
|
|
3
3
|
import { d as AdSlot, c as AdPosition, a as AdContextValue, S as SignInOptions } from './sign-in-DQlIdqsi.mjs';
|
|
4
4
|
export { A as AdConfig, g as getVariantDisplayName } from './sign-in-DQlIdqsi.mjs';
|
|
5
|
-
import { C as CimplifyClient, aj as EnrichedOrderItem, ai as EnrichedOrder, u as Business, aN as Location, bQ as ReorderResult, be as OrderStatus, aV as Order, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bs as PriceQuote, bG as QuoteUiMessage, c8 as Service, p as AvailableSlot, a8 as DayAvailability, a5 as CustomerBooking, F as CancelBookingResult, h as ActivityStateResponse, ci as SessionMessage, A as ActivityRecommendation, aa as DeliveryFeeResponse, ae as DeliveryOptionsResponse, aw as FxRateResponse,
|
|
6
|
-
import { g as CheckoutTermsView,
|
|
5
|
+
import { C as CimplifyClient, aj as EnrichedOrderItem, ai as EnrichedOrder, u as Business, aN as Location, bQ as ReorderResult, be as OrderStatus, aV as Order, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bs as PriceQuote, bG as QuoteUiMessage, c8 as Service, p as AvailableSlot, a8 as DayAvailability, a5 as CustomerBooking, F as CancelBookingResult, h as ActivityStateResponse, ci as SessionMessage, A as ActivityRecommendation, aa as DeliveryFeeResponse, ae as DeliveryOptionsResponse, aw as FxRateResponse, cs as StoreCreditBalance, cu as StorefrontBootstrap, W as ChatWidgetStarter, T as ChatMessage, V as ChatUploadAttachment, a1 as CimplifyElements, O as ChatAttachment, aG as LineItem, cm as Staff, c2 as Room, U as ChatReplyContext } from './catalogue-BohD-jU_.mjs';
|
|
6
|
+
import { g as CheckoutTermsView, cQ as OrderType, dL as ProcessCheckoutResult, aW as CheckoutStatus, aX as CheckoutStatusContext, C as CurrencyCode, P as Product, de as Pagination, c as CimplifyError, e as ProductWithDetails, b as Category, cI as Money, a as ChosenPrice, a1 as BundleSelectionInput, b6 as ComponentSelectionInput, a0 as BundleSelectionData, bf as CompositeSelectionData, d as Collection, dU as ProductTaxonomy, eJ as TaxonomyWithChildren, dV as ProductTimeProfile, by as Deal, dQ as ProductDealInfo, bI as DiscountValidation, a3 as BundleSummary, bd as CompositePriceResult, eE as SubscriptionWithDetails, eD as SubscriptionStatus, eA as Subscription, bm as CustomAttributeDefinition, dZ as PropertyFacet, dP as ProductBillingPlan, f1 as VariantView, eX as VariantAxisWithValues, w as AddressInfo, J as AuthenticatedData, c4 as ElementsOptions, dp as PaymentMethodInfo, c2 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, s as AddOnWithOptions, Z as BundleComponentView, _ as BundlePriceType, bb as CompositeGroupView, bL as DisplayCart, dR as ProductInputField, x as AddressValue, S as SaleInfo, U as UpcomingSale, D as DurationUnit, R as BoundaryKind, es as SchedulingMode, bA as DepositType, bn as CustomAttributeValue, dS as ProductProperty, ei as QuantityPricingTier } from './elements-Dtqe9Ekd.mjs';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import { P as ProductWithPrice } from './price-
|
|
8
|
+
import { P as ProductWithPrice } from './price-Pyq-vlrm.mjs';
|
|
9
9
|
import { ClassValue } from 'clsx';
|
|
10
10
|
import { Matcher } from 'react-day-picker';
|
|
11
11
|
|
package/dist/react.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { ReactNode, PointerEvent, MouseEvent } from 'react';
|
|
3
3
|
import { d as AdSlot, c as AdPosition, a as AdContextValue, S as SignInOptions } from './sign-in-DQlIdqsi.js';
|
|
4
4
|
export { A as AdConfig, g as getVariantDisplayName } from './sign-in-DQlIdqsi.js';
|
|
5
|
-
import { C as CimplifyClient, aj as EnrichedOrderItem, ai as EnrichedOrder, u as Business, aN as Location, bQ as ReorderResult, be as OrderStatus, aV as Order, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bs as PriceQuote, bG as QuoteUiMessage, c8 as Service, p as AvailableSlot, a8 as DayAvailability, a5 as CustomerBooking, F as CancelBookingResult, h as ActivityStateResponse, ci as SessionMessage, A as ActivityRecommendation, aa as DeliveryFeeResponse, ae as DeliveryOptionsResponse, aw as FxRateResponse,
|
|
6
|
-
import { g as CheckoutTermsView,
|
|
5
|
+
import { C as CimplifyClient, aj as EnrichedOrderItem, ai as EnrichedOrder, u as Business, aN as Location, bQ as ReorderResult, be as OrderStatus, aV as Order, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bs as PriceQuote, bG as QuoteUiMessage, c8 as Service, p as AvailableSlot, a8 as DayAvailability, a5 as CustomerBooking, F as CancelBookingResult, h as ActivityStateResponse, ci as SessionMessage, A as ActivityRecommendation, aa as DeliveryFeeResponse, ae as DeliveryOptionsResponse, aw as FxRateResponse, cs as StoreCreditBalance, cu as StorefrontBootstrap, W as ChatWidgetStarter, T as ChatMessage, V as ChatUploadAttachment, a1 as CimplifyElements, O as ChatAttachment, aG as LineItem, cm as Staff, c2 as Room, U as ChatReplyContext } from './catalogue-C4xKpirp.js';
|
|
6
|
+
import { g as CheckoutTermsView, cQ as OrderType, dL as ProcessCheckoutResult, aW as CheckoutStatus, aX as CheckoutStatusContext, C as CurrencyCode, P as Product, de as Pagination, c as CimplifyError, e as ProductWithDetails, b as Category, cI as Money, a as ChosenPrice, a1 as BundleSelectionInput, b6 as ComponentSelectionInput, a0 as BundleSelectionData, bf as CompositeSelectionData, d as Collection, dU as ProductTaxonomy, eJ as TaxonomyWithChildren, dV as ProductTimeProfile, by as Deal, dQ as ProductDealInfo, bI as DiscountValidation, a3 as BundleSummary, bd as CompositePriceResult, eE as SubscriptionWithDetails, eD as SubscriptionStatus, eA as Subscription, bm as CustomAttributeDefinition, dZ as PropertyFacet, dP as ProductBillingPlan, f1 as VariantView, eX as VariantAxisWithValues, w as AddressInfo, J as AuthenticatedData, c4 as ElementsOptions, dp as PaymentMethodInfo, c2 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, s as AddOnWithOptions, Z as BundleComponentView, _ as BundlePriceType, bb as CompositeGroupView, bL as DisplayCart, dR as ProductInputField, x as AddressValue, S as SaleInfo, U as UpcomingSale, D as DurationUnit, R as BoundaryKind, es as SchedulingMode, bA as DepositType, bn as CustomAttributeValue, dS as ProductProperty, ei as QuantityPricingTier } from './elements-Dtqe9Ekd.js';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import { P as ProductWithPrice } from './price-
|
|
8
|
+
import { P as ProductWithPrice } from './price-B4jL81ef.js';
|
|
9
9
|
import { ClassValue } from 'clsx';
|
|
10
10
|
import { Matcher } from 'react-day-picker';
|
|
11
11
|
|
package/dist/react.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunk2P4KXFB6_js = require('./chunk-2P4KXFB6.js');
|
|
5
|
-
var
|
|
5
|
+
var chunkW4ZFZPPY_js = require('./chunk-W4ZFZPPY.js');
|
|
6
6
|
var chunkXREIZ56K_js = require('./chunk-XREIZ56K.js');
|
|
7
|
-
var
|
|
7
|
+
var chunkHKCB73AJ_js = require('./chunk-HKCB73AJ.js');
|
|
8
8
|
var chunkEV2EVOYS_js = require('./chunk-EV2EVOYS.js');
|
|
9
9
|
var chunkUYFTOIFW_js = require('./chunk-UYFTOIFW.js');
|
|
10
10
|
var chunkAVXA4F6G_js = require('./chunk-AVXA4F6G.js');
|
|
@@ -863,7 +863,7 @@ async function syncFromServer(entry) {
|
|
|
863
863
|
return next;
|
|
864
864
|
}
|
|
865
865
|
function emitMutationError(entry, operation, opId, idempotencyKey, error) {
|
|
866
|
-
entry.client.events.emit(
|
|
866
|
+
entry.client.events.emit(chunkHKCB73AJ_js.MUTATION_ERROR, {
|
|
867
867
|
service: "cart",
|
|
868
868
|
operation,
|
|
869
869
|
opId,
|
|
@@ -903,10 +903,10 @@ function getOrCreateStore(params) {
|
|
|
903
903
|
syncTail: Promise.resolve(),
|
|
904
904
|
failedOpRemovers: /* @__PURE__ */ new Set()
|
|
905
905
|
};
|
|
906
|
-
client.events.on(
|
|
906
|
+
client.events.on(chunkHKCB73AJ_js.SESSION_CLAIMED, () => {
|
|
907
907
|
if (entry.initialized) void syncFromServer(entry);
|
|
908
908
|
});
|
|
909
|
-
client.events.on(
|
|
909
|
+
client.events.on(chunkHKCB73AJ_js.SESSION_CLEARED, () => {
|
|
910
910
|
if (entry.initialized) void syncFromServer(entry);
|
|
911
911
|
});
|
|
912
912
|
cartStores.set(storeKey, entry);
|
|
@@ -1214,7 +1214,7 @@ var DEFAULT_COUNTRY = "US";
|
|
|
1214
1214
|
function createDefaultClient() {
|
|
1215
1215
|
const processRef = globalThis.process;
|
|
1216
1216
|
const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
|
|
1217
|
-
return
|
|
1217
|
+
return chunkW4ZFZPPY_js.createCimplifyClient({ publicKey: envPublicKey });
|
|
1218
1218
|
}
|
|
1219
1219
|
function getStoredLocationId() {
|
|
1220
1220
|
if (typeof window === "undefined" || !window.localStorage) {
|
|
@@ -1772,7 +1772,7 @@ function CimplifyCheckout({
|
|
|
1772
1772
|
linkUrl
|
|
1773
1773
|
});
|
|
1774
1774
|
elementsRef.current = elements;
|
|
1775
|
-
const checkout = elements.create(
|
|
1775
|
+
const checkout = elements.create(chunkHKCB73AJ_js.ELEMENT_TYPES.CHECKOUT, {
|
|
1776
1776
|
orderTypes: resolvedOrderTypes,
|
|
1777
1777
|
defaultOrderType: resolvedDefaultOrderType,
|
|
1778
1778
|
submitLabel,
|
|
@@ -1783,19 +1783,19 @@ function CimplifyCheckout({
|
|
|
1783
1783
|
if (checkoutMountRef.current) {
|
|
1784
1784
|
checkout.mount(checkoutMountRef.current);
|
|
1785
1785
|
}
|
|
1786
|
-
checkout.on(
|
|
1786
|
+
checkout.on(chunkHKCB73AJ_js.EVENT_TYPES.READY, () => {
|
|
1787
1787
|
const cart = resolvedCartRef.current;
|
|
1788
1788
|
if (cart) {
|
|
1789
1789
|
checkout.setCart(transformToCheckoutCart(cart, fxOptionsRef.current));
|
|
1790
1790
|
}
|
|
1791
1791
|
});
|
|
1792
|
-
checkout.on(
|
|
1792
|
+
checkout.on(chunkHKCB73AJ_js.EVENT_TYPES.ORDER_TYPE_CHANGED, (data) => {
|
|
1793
1793
|
const typed = data;
|
|
1794
1794
|
if (typed.orderType) {
|
|
1795
1795
|
setOrderType(typed.orderType);
|
|
1796
1796
|
}
|
|
1797
1797
|
});
|
|
1798
|
-
checkout.on(
|
|
1798
|
+
checkout.on(chunkHKCB73AJ_js.EVENT_TYPES.REQUEST_SUBMIT, () => {
|
|
1799
1799
|
void handleSubmit();
|
|
1800
1800
|
});
|
|
1801
1801
|
return () => {
|
|
@@ -1816,7 +1816,7 @@ function CimplifyCheckout({
|
|
|
1816
1816
|
]);
|
|
1817
1817
|
React14.useEffect(() => {
|
|
1818
1818
|
if (!resolvedCart || !elementsRef.current) return;
|
|
1819
|
-
const checkoutElement = elementsRef.current.getElement(
|
|
1819
|
+
const checkoutElement = elementsRef.current.getElement(chunkHKCB73AJ_js.ELEMENT_TYPES.CHECKOUT);
|
|
1820
1820
|
if (checkoutElement) {
|
|
1821
1821
|
checkoutElement.setCart(transformToCheckoutCart(resolvedCart, fxOptions));
|
|
1822
1822
|
}
|
|
@@ -3555,7 +3555,7 @@ function CimplifySignInButton({
|
|
|
3555
3555
|
const onClick = async () => {
|
|
3556
3556
|
if (busy || disabled || !signInOpts.clientId) return;
|
|
3557
3557
|
setBusy(true);
|
|
3558
|
-
await
|
|
3558
|
+
await chunkHKCB73AJ_js.startSignIn({
|
|
3559
3559
|
...signInOpts,
|
|
3560
3560
|
onSuccess: () => {
|
|
3561
3561
|
setBusy(false);
|
|
@@ -5026,9 +5026,9 @@ function useClientSessionEpoch(client) {
|
|
|
5026
5026
|
const subscribe = React14.useCallback(
|
|
5027
5027
|
(notify) => {
|
|
5028
5028
|
const unsubscribe = [
|
|
5029
|
-
client.events.on(
|
|
5030
|
-
client.events.on(
|
|
5031
|
-
client.events.on(
|
|
5029
|
+
client.events.on(chunkHKCB73AJ_js.AUTH_TOKEN_CHANGED, notify),
|
|
5030
|
+
client.events.on(chunkHKCB73AJ_js.SESSION_CLAIMED, notify),
|
|
5031
|
+
client.events.on(chunkHKCB73AJ_js.SESSION_CLEARED, notify)
|
|
5032
5032
|
];
|
|
5033
5033
|
return () => {
|
|
5034
5034
|
for (const stopListening of unsubscribe) {
|
|
@@ -6139,7 +6139,7 @@ function useChat(options = {}) {
|
|
|
6139
6139
|
const [seenAt, setSeenAt] = React14.useState(null);
|
|
6140
6140
|
const [mayHaveOlder, setMayHaveOlder] = React14.useState(false);
|
|
6141
6141
|
const [claimedAs, setClaimedAs] = React14.useState(
|
|
6142
|
-
() => client?.
|
|
6142
|
+
() => client?.session.claimedCustomerName ?? null
|
|
6143
6143
|
);
|
|
6144
6144
|
const pollRef = React14.useRef(null);
|
|
6145
6145
|
const lastActivityRef = React14.useRef(Date.now());
|
|
@@ -6268,7 +6268,7 @@ function useChat(options = {}) {
|
|
|
6268
6268
|
ws.onmessage = (event) => {
|
|
6269
6269
|
try {
|
|
6270
6270
|
const envelope = JSON.parse(event.data);
|
|
6271
|
-
const update =
|
|
6271
|
+
const update = chunkW4ZFZPPY_js.chatRealtimeUpdateFromWire(envelope);
|
|
6272
6272
|
if (update.kind === "message") {
|
|
6273
6273
|
appendMessages([update.message]);
|
|
6274
6274
|
} else if (update.kind === "message_updated") {
|
|
@@ -6358,7 +6358,7 @@ function useChat(options = {}) {
|
|
|
6358
6358
|
setHumanRequested(value.conversation.ai_mode === "off");
|
|
6359
6359
|
setSeenAt(null);
|
|
6360
6360
|
setMayHaveOlder(value.messages.length >= 50);
|
|
6361
|
-
setClaimedAs(c?.
|
|
6361
|
+
setClaimedAs(c?.session.claimedCustomerName ?? null);
|
|
6362
6362
|
connectWebSocket();
|
|
6363
6363
|
},
|
|
6364
6364
|
[connectWebSocket]
|
|
@@ -6379,8 +6379,8 @@ function useChat(options = {}) {
|
|
|
6379
6379
|
const watchSessionClaims = React14.useCallback(() => {
|
|
6380
6380
|
const c = clientRef.current;
|
|
6381
6381
|
if (!c || claimUnsubRef.current) return;
|
|
6382
|
-
const unsubClaimed = c.events.on(
|
|
6383
|
-
setClaimedAs(event.customerName || c.
|
|
6382
|
+
const unsubClaimed = c.events.on(chunkHKCB73AJ_js.SESSION_CLAIMED, (event) => {
|
|
6383
|
+
setClaimedAs(event.customerName || c.session.claimedCustomerName || null);
|
|
6384
6384
|
if (!openedRef.current) {
|
|
6385
6385
|
void openIfExisting();
|
|
6386
6386
|
return;
|
|
@@ -6388,7 +6388,7 @@ function useChat(options = {}) {
|
|
|
6388
6388
|
connectWebSocket();
|
|
6389
6389
|
void resyncConversation();
|
|
6390
6390
|
});
|
|
6391
|
-
const unsubCleared = c.events.on(
|
|
6391
|
+
const unsubCleared = c.events.on(chunkHKCB73AJ_js.SESSION_CLEARED, resetConversation);
|
|
6392
6392
|
claimUnsubRef.current = () => {
|
|
6393
6393
|
unsubClaimed();
|
|
6394
6394
|
unsubCleared();
|
|
@@ -6440,7 +6440,7 @@ function useChat(options = {}) {
|
|
|
6440
6440
|
if (!openedRef.current) return false;
|
|
6441
6441
|
}
|
|
6442
6442
|
const replyTo = opts?.replyTo;
|
|
6443
|
-
const clientId =
|
|
6443
|
+
const clientId = chunkHKCB73AJ_js.generateIdempotencyKey();
|
|
6444
6444
|
const localId = optimisticId(clientId);
|
|
6445
6445
|
const optimistic = {
|
|
6446
6446
|
id: localId,
|
|
@@ -6629,15 +6629,15 @@ function AuthElement({
|
|
|
6629
6629
|
}, [onReady, onAuthenticated, onError]);
|
|
6630
6630
|
React14.useEffect(() => {
|
|
6631
6631
|
if (!elements || !containerRef.current) return;
|
|
6632
|
-
const element = elements.create(
|
|
6632
|
+
const element = elements.create(chunkHKCB73AJ_js.ELEMENT_TYPES.AUTH, { prefillEmail });
|
|
6633
6633
|
elementRef.current = element;
|
|
6634
|
-
element.on(
|
|
6634
|
+
element.on(chunkHKCB73AJ_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
6635
6635
|
element.on(
|
|
6636
|
-
|
|
6636
|
+
chunkHKCB73AJ_js.EVENT_TYPES.AUTHENTICATED,
|
|
6637
6637
|
(data) => onAuthenticatedRef.current?.(data)
|
|
6638
6638
|
);
|
|
6639
6639
|
element.on(
|
|
6640
|
-
|
|
6640
|
+
chunkHKCB73AJ_js.EVENT_TYPES.ERROR,
|
|
6641
6641
|
(data) => onErrorRef.current?.(data)
|
|
6642
6642
|
);
|
|
6643
6643
|
element.mount(containerRef.current);
|
|
@@ -6666,15 +6666,15 @@ function AddressElement({
|
|
|
6666
6666
|
}, [onReady, onChange, onError]);
|
|
6667
6667
|
React14.useEffect(() => {
|
|
6668
6668
|
if (!elements || !containerRef.current) return;
|
|
6669
|
-
const element = elements.create(
|
|
6669
|
+
const element = elements.create(chunkHKCB73AJ_js.ELEMENT_TYPES.ADDRESS, { mode });
|
|
6670
6670
|
elementRef.current = element;
|
|
6671
|
-
element.on(
|
|
6671
|
+
element.on(chunkHKCB73AJ_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
6672
6672
|
element.on(
|
|
6673
|
-
|
|
6673
|
+
chunkHKCB73AJ_js.EVENT_TYPES.CHANGE,
|
|
6674
6674
|
(data) => onChangeRef.current?.(data)
|
|
6675
6675
|
);
|
|
6676
6676
|
element.on(
|
|
6677
|
-
|
|
6677
|
+
chunkHKCB73AJ_js.EVENT_TYPES.ERROR,
|
|
6678
6678
|
(data) => onErrorRef.current?.(data)
|
|
6679
6679
|
);
|
|
6680
6680
|
element.mount(containerRef.current);
|
|
@@ -6704,15 +6704,15 @@ function PaymentElement({
|
|
|
6704
6704
|
}, [onReady, onChange, onError]);
|
|
6705
6705
|
React14.useEffect(() => {
|
|
6706
6706
|
if (!elements || !containerRef.current) return;
|
|
6707
|
-
const element = elements.create(
|
|
6707
|
+
const element = elements.create(chunkHKCB73AJ_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
|
|
6708
6708
|
elementRef.current = element;
|
|
6709
|
-
element.on(
|
|
6709
|
+
element.on(chunkHKCB73AJ_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
6710
6710
|
element.on(
|
|
6711
|
-
|
|
6711
|
+
chunkHKCB73AJ_js.EVENT_TYPES.CHANGE,
|
|
6712
6712
|
(data) => onChangeRef.current?.(data)
|
|
6713
6713
|
);
|
|
6714
6714
|
element.on(
|
|
6715
|
-
|
|
6715
|
+
chunkHKCB73AJ_js.EVENT_TYPES.ERROR,
|
|
6716
6716
|
(data) => onErrorRef.current?.(data)
|
|
6717
6717
|
);
|
|
6718
6718
|
element.mount(containerRef.current);
|
package/dist/react.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, isMultiDayService, serviceBillingMultiplier, PRODUCT_TYPE, BOUNDARY_KIND, resolveGallery, chatMessageCards, RENDER_HINT, displaysGrossPrices, DEFAULT_CDN_BASE_URL } from './chunk-3V4DVXV3.mjs';
|
|
3
3
|
export { getVariantDisplayName } from './chunk-3V4DVXV3.mjs';
|
|
4
|
-
import { chatRealtimeUpdateFromWire, createCimplifyClient } from './chunk-
|
|
4
|
+
import { chatRealtimeUpdateFromWire, createCimplifyClient } from './chunk-P4HYAV3L.mjs';
|
|
5
5
|
import { splitGenUIContent, messagePreview } from './chunk-U4MW6PYU.mjs';
|
|
6
6
|
export { messagePreview, splitGenUIContent } from './chunk-U4MW6PYU.mjs';
|
|
7
|
-
import { ELEMENT_TYPES, EVENT_TYPES, SESSION_CLAIMED, SESSION_CLEARED, generateIdempotencyKey, startSignIn, AUTH_TOKEN_CHANGED, MUTATION_ERROR } from './chunk-
|
|
7
|
+
import { ELEMENT_TYPES, EVENT_TYPES, SESSION_CLAIMED, SESSION_CLEARED, generateIdempotencyKey, startSignIn, AUTH_TOKEN_CHANGED, MUTATION_ERROR } from './chunk-2I6YKE6Q.mjs';
|
|
8
8
|
import { ORDER_TYPE, CHECKOUT_STATUS } from './chunk-33VCYWVL.mjs';
|
|
9
9
|
import { parsePrice, formatMoney, formatPrice, getVariantUnitPrice, getProductCurrency, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-NYDVVNZI.mjs';
|
|
10
10
|
import { isSupportedCurrency, ErrorCode, currencyCode, CimplifyError } from './chunk-NJYR6GGM.mjs';
|
|
@@ -6115,7 +6115,7 @@ function useChat(options = {}) {
|
|
|
6115
6115
|
const [seenAt, setSeenAt] = useState(null);
|
|
6116
6116
|
const [mayHaveOlder, setMayHaveOlder] = useState(false);
|
|
6117
6117
|
const [claimedAs, setClaimedAs] = useState(
|
|
6118
|
-
() => client?.
|
|
6118
|
+
() => client?.session.claimedCustomerName ?? null
|
|
6119
6119
|
);
|
|
6120
6120
|
const pollRef = useRef(null);
|
|
6121
6121
|
const lastActivityRef = useRef(Date.now());
|
|
@@ -6334,7 +6334,7 @@ function useChat(options = {}) {
|
|
|
6334
6334
|
setHumanRequested(value.conversation.ai_mode === "off");
|
|
6335
6335
|
setSeenAt(null);
|
|
6336
6336
|
setMayHaveOlder(value.messages.length >= 50);
|
|
6337
|
-
setClaimedAs(c?.
|
|
6337
|
+
setClaimedAs(c?.session.claimedCustomerName ?? null);
|
|
6338
6338
|
connectWebSocket();
|
|
6339
6339
|
},
|
|
6340
6340
|
[connectWebSocket]
|
|
@@ -6356,7 +6356,7 @@ function useChat(options = {}) {
|
|
|
6356
6356
|
const c = clientRef.current;
|
|
6357
6357
|
if (!c || claimUnsubRef.current) return;
|
|
6358
6358
|
const unsubClaimed = c.events.on(SESSION_CLAIMED, (event) => {
|
|
6359
|
-
setClaimedAs(event.customerName || c.
|
|
6359
|
+
setClaimedAs(event.customerName || c.session.claimedCustomerName || null);
|
|
6360
6360
|
if (!openedRef.current) {
|
|
6361
6361
|
void openIfExisting();
|
|
6362
6362
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
|
-
import {
|
|
2
|
+
import { dR as ProductInputField, ee as PurchaseIntentView, cD as MintPurchaseIntentRequest, bi as ConfirmPurchaseIntentResponse, ey as SubmitAuthorizationInput, ab as CHECKOUT_NEXT_ACTION, i as ConfirmPurchaseIntentRequest, ez as SubmitPurchaseIntentActionRequest } from './elements-Dtqe9Ekd.js';
|
|
3
3
|
|
|
4
4
|
interface Clock {
|
|
5
5
|
now(): Date;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
|
-
import {
|
|
2
|
+
import { dR as ProductInputField, ee as PurchaseIntentView, cD as MintPurchaseIntentRequest, bi as ConfirmPurchaseIntentResponse, ey as SubmitAuthorizationInput, ab as CHECKOUT_NEXT_ACTION, i as ConfirmPurchaseIntentRequest, ez as SubmitPurchaseIntentActionRequest } from './elements-Dtqe9Ekd.mjs';
|
|
3
3
|
|
|
4
4
|
interface Clock {
|
|
5
5
|
now(): Date;
|
package/dist/server.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CimplifyClient } from './catalogue-
|
|
2
|
-
export { a as CacheOptions, R as ReadRequestOptions, b as Result } from './catalogue-
|
|
3
|
-
export { b as Category, c as CimplifyError, d as Collection, P as Product, e as ProductWithDetails } from './
|
|
1
|
+
import { C as CimplifyClient } from './catalogue-BohD-jU_.mjs';
|
|
2
|
+
export { a as CacheOptions, R as ReadRequestOptions, b as Result } from './catalogue-BohD-jU_.mjs';
|
|
3
|
+
export { b as Category, c as CimplifyError, d as Collection, P as Product, e as ProductWithDetails } from './elements-Dtqe9Ekd.mjs';
|
|
4
4
|
import { JWTVerifyResult } from 'jose';
|
|
5
5
|
|
|
6
6
|
interface ServerClientOptions {
|
package/dist/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CimplifyClient } from './catalogue-
|
|
2
|
-
export { a as CacheOptions, R as ReadRequestOptions, b as Result } from './catalogue-
|
|
3
|
-
export { b as Category, c as CimplifyError, d as Collection, P as Product, e as ProductWithDetails } from './
|
|
1
|
+
import { C as CimplifyClient } from './catalogue-C4xKpirp.js';
|
|
2
|
+
export { a as CacheOptions, R as ReadRequestOptions, b as Result } from './catalogue-C4xKpirp.js';
|
|
3
|
+
export { b as Category, c as CimplifyError, d as Collection, P as Product, e as ProductWithDetails } from './elements-Dtqe9Ekd.js';
|
|
4
4
|
import { JWTVerifyResult } from 'jose';
|
|
5
5
|
|
|
6
6
|
interface ServerClientOptions {
|
package/dist/server.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkW4ZFZPPY_js = require('./chunk-W4ZFZPPY.js');
|
|
4
4
|
require('./chunk-XREIZ56K.js');
|
|
5
|
-
var
|
|
5
|
+
var chunkHKCB73AJ_js = require('./chunk-HKCB73AJ.js');
|
|
6
6
|
require('./chunk-EV2EVOYS.js');
|
|
7
7
|
require('./chunk-UYFTOIFW.js');
|
|
8
8
|
var chunkAVXA4F6G_js = require('./chunk-AVXA4F6G.js');
|
|
@@ -28,7 +28,7 @@ function readEnv(...keys) {
|
|
|
28
28
|
var getServerClient = react.cache((opts = {}) => {
|
|
29
29
|
const baseUrl = opts.apiUrl ?? readEnv("CIMPLIFY_API_URL", "NEXT_PUBLIC_CIMPLIFY_API_URL") ?? defaultBaseUrl();
|
|
30
30
|
const publicKey = opts.secretKey ?? readEnv("CIMPLIFY_SECRET_KEY", "NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY") ?? "mock-dev";
|
|
31
|
-
const client =
|
|
31
|
+
const client = chunkW4ZFZPPY_js.createCimplifyClient({
|
|
32
32
|
baseUrl,
|
|
33
33
|
publicKey,
|
|
34
34
|
suppressPublicKeyWarning: true
|
|
@@ -252,7 +252,7 @@ var QUERY_AUTH_ERROR = "cimplify_auth_error";
|
|
|
252
252
|
var discoveryCache = /* @__PURE__ */ new Map();
|
|
253
253
|
var jwksCache = /* @__PURE__ */ new Map();
|
|
254
254
|
function issuerBase(cfg) {
|
|
255
|
-
return (cfg.issuer ?? cfg.authUrl ??
|
|
255
|
+
return (cfg.issuer ?? cfg.authUrl ?? chunkHKCB73AJ_js.DEFAULT_ISSUER).replace(/\/$/, "");
|
|
256
256
|
}
|
|
257
257
|
function cookieName(cfg) {
|
|
258
258
|
return cfg.cookieName ?? SESSION_COOKIE;
|
|
@@ -467,12 +467,12 @@ async function handleOidcCallback(req, opts) {
|
|
|
467
467
|
}
|
|
468
468
|
function readPkceCookie(cookieHeader) {
|
|
469
469
|
if (!cookieHeader) return null;
|
|
470
|
-
const match = cookieHeader.split(/;\s*/).find((p) => p.startsWith(`${
|
|
470
|
+
const match = cookieHeader.split(/;\s*/).find((p) => p.startsWith(`${chunkHKCB73AJ_js.PKCE_COOKIE}=`));
|
|
471
471
|
if (!match) return null;
|
|
472
|
-
return
|
|
472
|
+
return chunkHKCB73AJ_js.decodePkceState(match.slice(chunkHKCB73AJ_js.PKCE_COOKIE.length + 1));
|
|
473
473
|
}
|
|
474
474
|
function buildPkceClearCookie() {
|
|
475
|
-
return `${
|
|
475
|
+
return `${chunkHKCB73AJ_js.PKCE_COOKIE}=; Path=${chunkHKCB73AJ_js.PKCE_COOKIE_PATH}; Max-Age=0; Secure; SameSite=Lax`;
|
|
476
476
|
}
|
|
477
477
|
function safeReturnPath(returnTo, fallback) {
|
|
478
478
|
if (returnTo && returnTo.startsWith("/") && !returnTo.startsWith("//")) return returnTo;
|
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createCimplifyClient } from './chunk-
|
|
1
|
+
import { createCimplifyClient } from './chunk-P4HYAV3L.mjs';
|
|
2
2
|
import './chunk-U4MW6PYU.mjs';
|
|
3
|
-
import { PKCE_COOKIE, decodePkceState, PKCE_COOKIE_PATH, DEFAULT_ISSUER } from './chunk-
|
|
3
|
+
import { PKCE_COOKIE, decodePkceState, PKCE_COOKIE_PATH, DEFAULT_ISSUER } from './chunk-2I6YKE6Q.mjs';
|
|
4
4
|
import './chunk-33VCYWVL.mjs';
|
|
5
5
|
import './chunk-NYDVVNZI.mjs';
|
|
6
6
|
export { CimplifyError } from './chunk-NJYR6GGM.mjs';
|
package/dist/testing/msw.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AppHandle, C as CreateAppOptions } from '../server-
|
|
1
|
+
import { A as AppHandle, C as CreateAppOptions } from '../server-KilvZJU0.mjs';
|
|
2
2
|
import 'hono';
|
|
3
|
-
import '../
|
|
3
|
+
import '../elements-Dtqe9Ekd.mjs';
|
|
4
4
|
|
|
5
5
|
interface MswHandlerSetup {
|
|
6
6
|
handlers: unknown[];
|
package/dist/testing/msw.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as AppHandle, C as CreateAppOptions } from '../server-
|
|
1
|
+
import { A as AppHandle, C as CreateAppOptions } from '../server-Cowuvfbr.js';
|
|
2
2
|
import 'hono';
|
|
3
|
-
import '../
|
|
3
|
+
import '../elements-Dtqe9Ekd.js';
|
|
4
4
|
|
|
5
5
|
interface MswHandlerSetup {
|
|
6
6
|
handlers: unknown[];
|
package/dist/testing/msw.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNX5YBQZP_js = require('../chunk-NX5YBQZP.js');
|
|
4
4
|
require('../chunk-XREIZ56K.js');
|
|
5
5
|
require('../chunk-EV2EVOYS.js');
|
|
6
6
|
require('../chunk-AVXA4F6G.js');
|
|
@@ -9,7 +9,7 @@ require('../chunk-OWW5GUSB.js');
|
|
|
9
9
|
// src/mock/msw.ts
|
|
10
10
|
async function createMswHandlers(options = {}) {
|
|
11
11
|
const baseUrl = options.baseUrl ?? "http://localhost:8787";
|
|
12
|
-
const handle =
|
|
12
|
+
const handle = chunkNX5YBQZP_js.createMockApp(options);
|
|
13
13
|
const msw = await import('msw').catch(() => {
|
|
14
14
|
throw new Error("msw is required to use @cimplify/sdk/mock/msw \u2014 install it as a peer dependency");
|
|
15
15
|
});
|
package/dist/testing/msw.mjs
CHANGED
package/dist/testing/suite.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { TestAPI } from 'vitest';
|
|
2
|
-
import { T as TestClientHandle } from '../client-
|
|
3
|
-
import { C as CreateAppOptions } from '../server-
|
|
4
|
-
export { S as SeedName } from '../server-
|
|
5
|
-
import '../catalogue-
|
|
6
|
-
import '../
|
|
2
|
+
import { T as TestClientHandle } from '../client-BBFfAtn4.mjs';
|
|
3
|
+
import { C as CreateAppOptions } from '../server-KilvZJU0.mjs';
|
|
4
|
+
export { S as SeedName } from '../server-KilvZJU0.mjs';
|
|
5
|
+
import '../catalogue-BohD-jU_.mjs';
|
|
6
|
+
import '../elements-Dtqe9Ekd.mjs';
|
|
7
7
|
import 'hono';
|
|
8
8
|
|
|
9
9
|
/**
|