@cimplify/sdk 0.70.2 → 0.70.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.
Files changed (48) hide show
  1. package/dist/advanced.d.mts +1 -1
  2. package/dist/advanced.d.ts +1 -1
  3. package/dist/advanced.js +20 -20
  4. package/dist/advanced.mjs +1 -1
  5. package/dist/{chunk-M2CXZQHS.mjs → chunk-3BKMNVTR.mjs} +2 -1
  6. package/dist/{chunk-BCWPRPK7.js → chunk-CV5QMDQS.js} +2 -1
  7. package/dist/{chunk-EAVXSFAB.mjs → chunk-H337NF4O.mjs} +1 -1
  8. package/dist/{chunk-QZQEGRGB.js → chunk-QS4XDVHI.js} +35 -35
  9. package/dist/{chunk-O3ECKVOM.mjs → chunk-QXMO2LGU.mjs} +27 -10
  10. package/dist/{chunk-6XXVA3IV.mjs → chunk-UUW7WBCG.mjs} +2 -2
  11. package/dist/{chunk-SC5DUKGD.js → chunk-XGKMSLMJ.js} +4 -4
  12. package/dist/{chunk-I4MP2XZS.js → chunk-XQ6LEDEO.js} +27 -10
  13. package/dist/{client-Des_GqmQ.d.ts → client-BvqaIlJ0.d.ts} +2 -2
  14. package/dist/{client-DRJvXz54.d.mts → client-C7EMuGoz.d.mts} +9 -7
  15. package/dist/{client-DjQhg6yr.d.ts → client-D6CZ2Ggp.d.ts} +9 -7
  16. package/dist/{client-BRGGjeny.d.mts → client-DWA_XIh3.d.mts} +2 -2
  17. package/dist/index.d.mts +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +68 -68
  20. package/dist/index.mjs +3 -3
  21. package/dist/mock/cli.mjs +27 -10
  22. package/dist/mock/library.js +27 -10
  23. package/dist/mock/library.mjs +27 -10
  24. package/dist/mock/msw.js +27 -10
  25. package/dist/mock/msw.mjs +27 -10
  26. package/dist/react.d.mts +1 -1
  27. package/dist/react.d.ts +1 -1
  28. package/dist/react.js +16 -16
  29. package/dist/react.mjs +2 -2
  30. package/dist/{server-D8rwqZQ6.d.mts → server-DDQ1O3XR.d.mts} +4 -1
  31. package/dist/{server-BQzz921M.d.ts → server-DMvQp27Z.d.ts} +4 -1
  32. package/dist/server.d.mts +2 -2
  33. package/dist/server.d.ts +2 -2
  34. package/dist/server.js +7 -7
  35. package/dist/server.mjs +2 -2
  36. package/dist/testing/msw.d.mts +1 -1
  37. package/dist/testing/msw.d.ts +1 -1
  38. package/dist/testing/msw.js +2 -2
  39. package/dist/testing/msw.mjs +1 -1
  40. package/dist/testing/suite.d.mts +4 -4
  41. package/dist/testing/suite.d.ts +4 -4
  42. package/dist/testing/suite.js +23 -23
  43. package/dist/testing/suite.mjs +4 -4
  44. package/dist/testing.d.mts +3 -3
  45. package/dist/testing.d.ts +3 -3
  46. package/dist/testing.js +79 -79
  47. package/dist/testing.mjs +5 -5
  48. package/package.json +1 -1
@@ -3161,16 +3161,21 @@ function buildLink(deps) {
3161
3161
  const body = await c.req.json().catch(() => ({}));
3162
3162
  return tryRoute(c, () => {
3163
3163
  const cid = customerId(c);
3164
- const prefs = deps.link.enroll(cid, body.business_id ?? deps.defaultBusinessId);
3164
+ const orderId = body.order_id ?? "";
3165
+ const businessId = body.business_id ?? deps.defaultBusinessId;
3166
+ const prefs = deps.link.enroll(cid, businessId);
3165
3167
  const address = body.address ? deps.link.createAddress(cid, body.address) : null;
3166
3168
  const mobile_money = body.mobile_money ? deps.link.createMobileMoney(cid, body.mobile_money) : null;
3167
3169
  return {
3168
3170
  success: true,
3169
3171
  customer_id: cid,
3170
- order_id: body.order_id,
3171
- preferences: prefs,
3172
- address,
3173
- mobile_money
3172
+ order_id: orderId,
3173
+ enrollment_result: {
3174
+ preferences: prefs,
3175
+ address,
3176
+ mobile_money
3177
+ },
3178
+ linked_at: deps.clock.iso()
3174
3179
  };
3175
3180
  });
3176
3181
  });
@@ -3270,14 +3275,23 @@ function buildLink(deps) {
3270
3275
  "/sessions",
3271
3276
  (c) => tryRoute(c, () => {
3272
3277
  const count = deps.link.revokeAllSessions(customerId(c));
3273
- return { success: true, revoked: count };
3278
+ return {
3279
+ success: true,
3280
+ revoked_count: count,
3281
+ message: `Revoked ${count} sessions`
3282
+ };
3274
3283
  })
3275
3284
  );
3276
3285
  app.delete(
3277
3286
  "/sessions/:id",
3278
3287
  (c) => tryRoute(c, () => {
3279
- deps.link.revokeSession(customerId(c), c.req.param("id"));
3280
- return { success: true };
3288
+ const sessionId = c.req.param("id");
3289
+ deps.link.revokeSession(customerId(c), sessionId);
3290
+ return {
3291
+ success: true,
3292
+ session_id: sessionId,
3293
+ message: "Session revoked successfully"
3294
+ };
3281
3295
  })
3282
3296
  );
3283
3297
  return app;
@@ -5582,8 +5596,11 @@ function createLinkService({ clock, ids }) {
5582
5596
  email: seed.email ?? null,
5583
5597
  phone: seed.phone ?? null,
5584
5598
  name: seed.name ?? "Test User",
5599
+ delivery_address: null,
5585
5600
  created_at: now,
5586
- updated_at: now
5601
+ updated_at: now,
5602
+ metadata: null,
5603
+ account_id: customerId
5587
5604
  },
5588
5605
  addresses: /* @__PURE__ */ new Map(),
5589
5606
  mobileMoney: /* @__PURE__ */ new Map(),
@@ -5597,7 +5614,7 @@ function createLinkService({ clock, ids }) {
5597
5614
  created_at: now,
5598
5615
  last_used_at: now,
5599
5616
  device_type: "desktop",
5600
- ip: null,
5617
+ ip_address: null,
5601
5618
  user_agent: null,
5602
5619
  is_current: true
5603
5620
  });
@@ -3159,16 +3159,21 @@ function buildLink(deps) {
3159
3159
  const body = await c.req.json().catch(() => ({}));
3160
3160
  return tryRoute(c, () => {
3161
3161
  const cid = customerId(c);
3162
- const prefs = deps.link.enroll(cid, body.business_id ?? deps.defaultBusinessId);
3162
+ const orderId = body.order_id ?? "";
3163
+ const businessId = body.business_id ?? deps.defaultBusinessId;
3164
+ const prefs = deps.link.enroll(cid, businessId);
3163
3165
  const address = body.address ? deps.link.createAddress(cid, body.address) : null;
3164
3166
  const mobile_money = body.mobile_money ? deps.link.createMobileMoney(cid, body.mobile_money) : null;
3165
3167
  return {
3166
3168
  success: true,
3167
3169
  customer_id: cid,
3168
- order_id: body.order_id,
3169
- preferences: prefs,
3170
- address,
3171
- mobile_money
3170
+ order_id: orderId,
3171
+ enrollment_result: {
3172
+ preferences: prefs,
3173
+ address,
3174
+ mobile_money
3175
+ },
3176
+ linked_at: deps.clock.iso()
3172
3177
  };
3173
3178
  });
3174
3179
  });
@@ -3268,14 +3273,23 @@ function buildLink(deps) {
3268
3273
  "/sessions",
3269
3274
  (c) => tryRoute(c, () => {
3270
3275
  const count = deps.link.revokeAllSessions(customerId(c));
3271
- return { success: true, revoked: count };
3276
+ return {
3277
+ success: true,
3278
+ revoked_count: count,
3279
+ message: `Revoked ${count} sessions`
3280
+ };
3272
3281
  })
3273
3282
  );
3274
3283
  app.delete(
3275
3284
  "/sessions/:id",
3276
3285
  (c) => tryRoute(c, () => {
3277
- deps.link.revokeSession(customerId(c), c.req.param("id"));
3278
- return { success: true };
3286
+ const sessionId = c.req.param("id");
3287
+ deps.link.revokeSession(customerId(c), sessionId);
3288
+ return {
3289
+ success: true,
3290
+ session_id: sessionId,
3291
+ message: "Session revoked successfully"
3292
+ };
3279
3293
  })
3280
3294
  );
3281
3295
  return app;
@@ -5580,8 +5594,11 @@ function createLinkService({ clock, ids }) {
5580
5594
  email: seed.email ?? null,
5581
5595
  phone: seed.phone ?? null,
5582
5596
  name: seed.name ?? "Test User",
5597
+ delivery_address: null,
5583
5598
  created_at: now,
5584
- updated_at: now
5599
+ updated_at: now,
5600
+ metadata: null,
5601
+ account_id: customerId
5585
5602
  },
5586
5603
  addresses: /* @__PURE__ */ new Map(),
5587
5604
  mobileMoney: /* @__PURE__ */ new Map(),
@@ -5595,7 +5612,7 @@ function createLinkService({ clock, ids }) {
5595
5612
  created_at: now,
5596
5613
  last_used_at: now,
5597
5614
  device_type: "desktop",
5598
- ip: null,
5615
+ ip_address: null,
5599
5616
  user_agent: null,
5600
5617
  is_current: true
5601
5618
  });
package/dist/mock/msw.js CHANGED
@@ -3159,16 +3159,21 @@ function buildLink(deps) {
3159
3159
  const body = await c.req.json().catch(() => ({}));
3160
3160
  return tryRoute(c, () => {
3161
3161
  const cid = customerId(c);
3162
- const prefs = deps.link.enroll(cid, body.business_id ?? deps.defaultBusinessId);
3162
+ const orderId = body.order_id ?? "";
3163
+ const businessId = body.business_id ?? deps.defaultBusinessId;
3164
+ const prefs = deps.link.enroll(cid, businessId);
3163
3165
  const address = body.address ? deps.link.createAddress(cid, body.address) : null;
3164
3166
  const mobile_money = body.mobile_money ? deps.link.createMobileMoney(cid, body.mobile_money) : null;
3165
3167
  return {
3166
3168
  success: true,
3167
3169
  customer_id: cid,
3168
- order_id: body.order_id,
3169
- preferences: prefs,
3170
- address,
3171
- mobile_money
3170
+ order_id: orderId,
3171
+ enrollment_result: {
3172
+ preferences: prefs,
3173
+ address,
3174
+ mobile_money
3175
+ },
3176
+ linked_at: deps.clock.iso()
3172
3177
  };
3173
3178
  });
3174
3179
  });
@@ -3268,14 +3273,23 @@ function buildLink(deps) {
3268
3273
  "/sessions",
3269
3274
  (c) => tryRoute(c, () => {
3270
3275
  const count = deps.link.revokeAllSessions(customerId(c));
3271
- return { success: true, revoked: count };
3276
+ return {
3277
+ success: true,
3278
+ revoked_count: count,
3279
+ message: `Revoked ${count} sessions`
3280
+ };
3272
3281
  })
3273
3282
  );
3274
3283
  app.delete(
3275
3284
  "/sessions/:id",
3276
3285
  (c) => tryRoute(c, () => {
3277
- deps.link.revokeSession(customerId(c), c.req.param("id"));
3278
- return { success: true };
3286
+ const sessionId = c.req.param("id");
3287
+ deps.link.revokeSession(customerId(c), sessionId);
3288
+ return {
3289
+ success: true,
3290
+ session_id: sessionId,
3291
+ message: "Session revoked successfully"
3292
+ };
3279
3293
  })
3280
3294
  );
3281
3295
  return app;
@@ -5580,8 +5594,11 @@ function createLinkService({ clock, ids }) {
5580
5594
  email: seed.email ?? null,
5581
5595
  phone: seed.phone ?? null,
5582
5596
  name: seed.name ?? "Test User",
5597
+ delivery_address: null,
5583
5598
  created_at: now,
5584
- updated_at: now
5599
+ updated_at: now,
5600
+ metadata: null,
5601
+ account_id: customerId
5585
5602
  },
5586
5603
  addresses: /* @__PURE__ */ new Map(),
5587
5604
  mobileMoney: /* @__PURE__ */ new Map(),
@@ -5595,7 +5612,7 @@ function createLinkService({ clock, ids }) {
5595
5612
  created_at: now,
5596
5613
  last_used_at: now,
5597
5614
  device_type: "desktop",
5598
- ip: null,
5615
+ ip_address: null,
5599
5616
  user_agent: null,
5600
5617
  is_current: true
5601
5618
  });
package/dist/mock/msw.mjs CHANGED
@@ -3157,16 +3157,21 @@ function buildLink(deps) {
3157
3157
  const body = await c.req.json().catch(() => ({}));
3158
3158
  return tryRoute(c, () => {
3159
3159
  const cid = customerId(c);
3160
- const prefs = deps.link.enroll(cid, body.business_id ?? deps.defaultBusinessId);
3160
+ const orderId = body.order_id ?? "";
3161
+ const businessId = body.business_id ?? deps.defaultBusinessId;
3162
+ const prefs = deps.link.enroll(cid, businessId);
3161
3163
  const address = body.address ? deps.link.createAddress(cid, body.address) : null;
3162
3164
  const mobile_money = body.mobile_money ? deps.link.createMobileMoney(cid, body.mobile_money) : null;
3163
3165
  return {
3164
3166
  success: true,
3165
3167
  customer_id: cid,
3166
- order_id: body.order_id,
3167
- preferences: prefs,
3168
- address,
3169
- mobile_money
3168
+ order_id: orderId,
3169
+ enrollment_result: {
3170
+ preferences: prefs,
3171
+ address,
3172
+ mobile_money
3173
+ },
3174
+ linked_at: deps.clock.iso()
3170
3175
  };
3171
3176
  });
3172
3177
  });
@@ -3266,14 +3271,23 @@ function buildLink(deps) {
3266
3271
  "/sessions",
3267
3272
  (c) => tryRoute(c, () => {
3268
3273
  const count = deps.link.revokeAllSessions(customerId(c));
3269
- return { success: true, revoked: count };
3274
+ return {
3275
+ success: true,
3276
+ revoked_count: count,
3277
+ message: `Revoked ${count} sessions`
3278
+ };
3270
3279
  })
3271
3280
  );
3272
3281
  app.delete(
3273
3282
  "/sessions/:id",
3274
3283
  (c) => tryRoute(c, () => {
3275
- deps.link.revokeSession(customerId(c), c.req.param("id"));
3276
- return { success: true };
3284
+ const sessionId = c.req.param("id");
3285
+ deps.link.revokeSession(customerId(c), sessionId);
3286
+ return {
3287
+ success: true,
3288
+ session_id: sessionId,
3289
+ message: "Session revoked successfully"
3290
+ };
3277
3291
  })
3278
3292
  );
3279
3293
  return app;
@@ -5578,8 +5592,11 @@ function createLinkService({ clock, ids }) {
5578
5592
  email: seed.email ?? null,
5579
5593
  phone: seed.phone ?? null,
5580
5594
  name: seed.name ?? "Test User",
5595
+ delivery_address: null,
5581
5596
  created_at: now,
5582
- updated_at: now
5597
+ updated_at: now,
5598
+ metadata: null,
5599
+ account_id: customerId
5583
5600
  },
5584
5601
  addresses: /* @__PURE__ */ new Map(),
5585
5602
  mobileMoney: /* @__PURE__ */ new Map(),
@@ -5593,7 +5610,7 @@ function createLinkService({ clock, ids }) {
5593
5610
  created_at: now,
5594
5611
  last_used_at: now,
5595
5612
  device_type: "desktop",
5596
- ip: null,
5613
+ ip_address: null,
5597
5614
  user_agent: null,
5598
5615
  is_current: true
5599
5616
  });
package/dist/react.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React$1, { ReactNode } from 'react';
2
2
  import { d as AdSlot, c as AdPosition, a as AdContextValue, S as SignInOptions } from './sign-in-DQlIdqsi.mjs';
3
3
  export { A as AdConfig, g as getVariantDisplayName } from './sign-in-DQlIdqsi.mjs';
4
- import { ad as CimplifyClient, cj as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, aV as EnrichedOrderItem, aU as EnrichedOrder, w as Business, bp as Location, cA as ReorderResult, b$ as OrderStatus, bF as Order, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cf as PriceQuote, cp as QuoteUiMessage, cV as Service, r as AvailableSlot, av as DayAvailability, an as CustomerBooking, M as CancelBookingResult, f as ActivityStateResponse, d2 as SessionMessage, c as ActivityRecommendation, ax as DeliveryFeeResponse, b6 as FxRateResponse, db as StorefrontBootstrap, Y as ChatWidgetStarter, X as ChatMessage, h as AddressInfo, n as AuthenticatedData, aT as ElementsOptions, c9 as PaymentMethodInfo, aR as ElementsCheckoutResult, ci as ProcessCheckoutOptions, ag as CimplifyElements, bg as LineItem, d5 as Staff, cQ as Room } from './client-DRJvXz54.mjs';
4
+ import { ad as CimplifyClient, cj as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, aV as EnrichedOrderItem, aU as EnrichedOrder, w as Business, bp as Location, cA as ReorderResult, b$ as OrderStatus, bF as Order, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cf as PriceQuote, cp as QuoteUiMessage, cV as Service, r as AvailableSlot, av as DayAvailability, an as CustomerBooking, M as CancelBookingResult, f as ActivityStateResponse, d2 as SessionMessage, c as ActivityRecommendation, ax as DeliveryFeeResponse, b6 as FxRateResponse, db as StorefrontBootstrap, Y as ChatWidgetStarter, X as ChatMessage, h as AddressInfo, n as AuthenticatedData, aT as ElementsOptions, c9 as PaymentMethodInfo, aR as ElementsCheckoutResult, ci as ProcessCheckoutOptions, ag as CimplifyElements, bg as LineItem, d5 as Staff, cQ as Room } from './client-C7EMuGoz.mjs';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { ab as CurrencyCode, aX as Product, aO as Pagination, T as CimplifyError, b9 as ProductWithDetails, Q as Category, aM as Money, C as BundleSelectionInput, $ as ComponentSelectionInput, z as BundleSelectionData, a8 as CompositeSelectionData, U as Collection, b4 as ProductTaxonomy, bt as TaxonomyWithChildren, b5 as ProductTimeProfile, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, E as BundleSummary, a6 as CompositePriceResult, bo as SubscriptionWithDetails, bn as SubscriptionStatus, bk as Subscription, ac as CustomAttributeDefinition, ba as PropertyFacet, a$ as ProductBillingPlan, bL as VariantView, bF as VariantAxisWithValues, f as AddOnWithOptions, w as BundleComponentView, x as BundlePriceType, a4 as CompositeGroupView, aq as DisplayCart, b1 as ProductInputField, bg as SchedulingMode, at as DurationUnit, ad as CustomAttributeValue, b2 as ProductProperty, bc as QuantityPricingTier } from './product-B_kS4Oxa.mjs';
7
7
  import { P as ProductWithPrice } from './price-Cm0tU0V5.mjs';
package/dist/react.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React$1, { ReactNode } from 'react';
2
2
  import { d as AdSlot, c as AdPosition, a as AdContextValue, S as SignInOptions } from './sign-in-DQlIdqsi.js';
3
3
  export { A as AdConfig, g as getVariantDisplayName } from './sign-in-DQlIdqsi.js';
4
- import { ad as CimplifyClient, cj as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, aV as EnrichedOrderItem, aU as EnrichedOrder, w as Business, bp as Location, cA as ReorderResult, b$ as OrderStatus, bF as Order, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cf as PriceQuote, cp as QuoteUiMessage, cV as Service, r as AvailableSlot, av as DayAvailability, an as CustomerBooking, M as CancelBookingResult, f as ActivityStateResponse, d2 as SessionMessage, c as ActivityRecommendation, ax as DeliveryFeeResponse, b6 as FxRateResponse, db as StorefrontBootstrap, Y as ChatWidgetStarter, X as ChatMessage, h as AddressInfo, n as AuthenticatedData, aT as ElementsOptions, c9 as PaymentMethodInfo, aR as ElementsCheckoutResult, ci as ProcessCheckoutOptions, ag as CimplifyElements, bg as LineItem, d5 as Staff, cQ as Room } from './client-DjQhg6yr.js';
4
+ import { ad as CimplifyClient, cj as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, aV as EnrichedOrderItem, aU as EnrichedOrder, w as Business, bp as Location, cA as ReorderResult, b$ as OrderStatus, bF as Order, cl as QuoteBundleSelectionInput, cm as QuoteCompositeSelectionInput, cf as PriceQuote, cp as QuoteUiMessage, cV as Service, r as AvailableSlot, av as DayAvailability, an as CustomerBooking, M as CancelBookingResult, f as ActivityStateResponse, d2 as SessionMessage, c as ActivityRecommendation, ax as DeliveryFeeResponse, b6 as FxRateResponse, db as StorefrontBootstrap, Y as ChatWidgetStarter, X as ChatMessage, h as AddressInfo, n as AuthenticatedData, aT as ElementsOptions, c9 as PaymentMethodInfo, aR as ElementsCheckoutResult, ci as ProcessCheckoutOptions, ag as CimplifyElements, bg as LineItem, d5 as Staff, cQ as Room } from './client-D6CZ2Ggp.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { ab as CurrencyCode, aX as Product, aO as Pagination, T as CimplifyError, b9 as ProductWithDetails, Q as Category, aM as Money, C as BundleSelectionInput, $ as ComponentSelectionInput, z as BundleSelectionData, a8 as CompositeSelectionData, U as Collection, b4 as ProductTaxonomy, bt as TaxonomyWithChildren, b5 as ProductTimeProfile, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, E as BundleSummary, a6 as CompositePriceResult, bo as SubscriptionWithDetails, bn as SubscriptionStatus, bk as Subscription, ac as CustomAttributeDefinition, ba as PropertyFacet, a$ as ProductBillingPlan, bL as VariantView, bF as VariantAxisWithValues, f as AddOnWithOptions, w as BundleComponentView, x as BundlePriceType, a4 as CompositeGroupView, aq as DisplayCart, b1 as ProductInputField, bg as SchedulingMode, at as DurationUnit, ad as CustomAttributeValue, b2 as ProductProperty, bc as QuantityPricingTier } from './product-B_kS4Oxa.js';
7
7
  import { P as ProductWithPrice } from './price-9T1Y47oS.js';
package/dist/react.js CHANGED
@@ -2,8 +2,8 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkIQLJJW2H_js = require('./chunk-IQLJJW2H.js');
5
- var chunkQZQEGRGB_js = require('./chunk-QZQEGRGB.js');
6
- var chunkBCWPRPK7_js = require('./chunk-BCWPRPK7.js');
5
+ var chunkQS4XDVHI_js = require('./chunk-QS4XDVHI.js');
6
+ var chunkCV5QMDQS_js = require('./chunk-CV5QMDQS.js');
7
7
  var chunk7Y2O3E4D_js = require('./chunk-7Y2O3E4D.js');
8
8
  var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
9
9
  require('./chunk-OWW5GUSB.js');
@@ -1086,7 +1086,7 @@ var DEFAULT_COUNTRY = "US";
1086
1086
  function createDefaultClient() {
1087
1087
  const processRef = globalThis.process;
1088
1088
  const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
1089
- return chunkQZQEGRGB_js.createCimplifyClient({ publicKey: envPublicKey });
1089
+ return chunkQS4XDVHI_js.createCimplifyClient({ publicKey: envPublicKey });
1090
1090
  }
1091
1091
  function getStoredLocationId() {
1092
1092
  if (typeof window === "undefined" || !window.localStorage) {
@@ -3361,7 +3361,7 @@ function CimplifySignInButton({
3361
3361
  const onClick = async () => {
3362
3362
  if (busy || disabled) return;
3363
3363
  setBusy(true);
3364
- await chunkBCWPRPK7_js.startSignIn({
3364
+ await chunkCV5QMDQS_js.startSignIn({
3365
3365
  ...signInOpts,
3366
3366
  onSuccess: () => {
3367
3367
  setBusy(false);
@@ -5967,15 +5967,15 @@ function AuthElement({
5967
5967
  }, [onReady, onAuthenticated, onError]);
5968
5968
  React14.useEffect(() => {
5969
5969
  if (!elements || !containerRef.current) return;
5970
- const element = elements.create(chunkBCWPRPK7_js.ELEMENT_TYPES.AUTH, { prefillEmail });
5970
+ const element = elements.create(chunkCV5QMDQS_js.ELEMENT_TYPES.AUTH, { prefillEmail });
5971
5971
  elementRef.current = element;
5972
- element.on(chunkBCWPRPK7_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
5972
+ element.on(chunkCV5QMDQS_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
5973
5973
  element.on(
5974
- chunkBCWPRPK7_js.EVENT_TYPES.AUTHENTICATED,
5974
+ chunkCV5QMDQS_js.EVENT_TYPES.AUTHENTICATED,
5975
5975
  (data) => onAuthenticatedRef.current?.(data)
5976
5976
  );
5977
5977
  element.on(
5978
- chunkBCWPRPK7_js.EVENT_TYPES.ERROR,
5978
+ chunkCV5QMDQS_js.EVENT_TYPES.ERROR,
5979
5979
  (data) => onErrorRef.current?.(data)
5980
5980
  );
5981
5981
  element.mount(containerRef.current);
@@ -6004,15 +6004,15 @@ function AddressElement({
6004
6004
  }, [onReady, onChange, onError]);
6005
6005
  React14.useEffect(() => {
6006
6006
  if (!elements || !containerRef.current) return;
6007
- const element = elements.create(chunkBCWPRPK7_js.ELEMENT_TYPES.ADDRESS, { mode });
6007
+ const element = elements.create(chunkCV5QMDQS_js.ELEMENT_TYPES.ADDRESS, { mode });
6008
6008
  elementRef.current = element;
6009
- element.on(chunkBCWPRPK7_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
6009
+ element.on(chunkCV5QMDQS_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
6010
6010
  element.on(
6011
- chunkBCWPRPK7_js.EVENT_TYPES.CHANGE,
6011
+ chunkCV5QMDQS_js.EVENT_TYPES.CHANGE,
6012
6012
  (data) => onChangeRef.current?.(data)
6013
6013
  );
6014
6014
  element.on(
6015
- chunkBCWPRPK7_js.EVENT_TYPES.ERROR,
6015
+ chunkCV5QMDQS_js.EVENT_TYPES.ERROR,
6016
6016
  (data) => onErrorRef.current?.(data)
6017
6017
  );
6018
6018
  element.mount(containerRef.current);
@@ -6042,15 +6042,15 @@ function PaymentElement({
6042
6042
  }, [onReady, onChange, onError]);
6043
6043
  React14.useEffect(() => {
6044
6044
  if (!elements || !containerRef.current) return;
6045
- const element = elements.create(chunkBCWPRPK7_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
6045
+ const element = elements.create(chunkCV5QMDQS_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
6046
6046
  elementRef.current = element;
6047
- element.on(chunkBCWPRPK7_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
6047
+ element.on(chunkCV5QMDQS_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
6048
6048
  element.on(
6049
- chunkBCWPRPK7_js.EVENT_TYPES.CHANGE,
6049
+ chunkCV5QMDQS_js.EVENT_TYPES.CHANGE,
6050
6050
  (data) => onChangeRef.current?.(data)
6051
6051
  );
6052
6052
  element.on(
6053
- chunkBCWPRPK7_js.EVENT_TYPES.ERROR,
6053
+ chunkCV5QMDQS_js.EVENT_TYPES.ERROR,
6054
6054
  (data) => onErrorRef.current?.(data)
6055
6055
  );
6056
6056
  element.mount(containerRef.current);
package/dist/react.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, PRODUCT_TYPE, resolveGallery, RENDER_HINT } from './chunk-E6T5VJMG.mjs';
3
3
  export { getVariantDisplayName } from './chunk-E6T5VJMG.mjs';
4
- import { createCimplifyClient } from './chunk-EAVXSFAB.mjs';
5
- import { ELEMENT_TYPES, EVENT_TYPES, startSignIn } from './chunk-M2CXZQHS.mjs';
4
+ import { createCimplifyClient } from './chunk-H337NF4O.mjs';
5
+ import { ELEMENT_TYPES, EVENT_TYPES, startSignIn } from './chunk-3BKMNVTR.mjs';
6
6
  import { parsePrice, formatMoney, formatPrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-TD3AY34U.mjs';
7
7
  import { isSupportedCurrency } from './chunk-AMZXALF6.mjs';
8
8
  import './chunk-3G6RQLXK.mjs';
@@ -1010,8 +1010,11 @@ interface MockLinkCustomer {
1010
1010
  email: string | null;
1011
1011
  phone: string | null;
1012
1012
  name: string;
1013
+ delivery_address: string | null;
1013
1014
  created_at: string;
1014
1015
  updated_at: string;
1016
+ metadata: Record<string, unknown> | null;
1017
+ account_id: string | null;
1015
1018
  }
1016
1019
  interface MockLinkSession {
1017
1020
  id: string;
@@ -1019,7 +1022,7 @@ interface MockLinkSession {
1019
1022
  created_at: string;
1020
1023
  last_used_at: string;
1021
1024
  device_type: "mobile" | "desktop" | "tablet" | "unknown";
1022
- ip: string | null;
1025
+ ip_address: string | null;
1023
1026
  user_agent: string | null;
1024
1027
  is_current: boolean;
1025
1028
  }
@@ -1010,8 +1010,11 @@ interface MockLinkCustomer {
1010
1010
  email: string | null;
1011
1011
  phone: string | null;
1012
1012
  name: string;
1013
+ delivery_address: string | null;
1013
1014
  created_at: string;
1014
1015
  updated_at: string;
1016
+ metadata: Record<string, unknown> | null;
1017
+ account_id: string | null;
1015
1018
  }
1016
1019
  interface MockLinkSession {
1017
1020
  id: string;
@@ -1019,7 +1022,7 @@ interface MockLinkSession {
1019
1022
  created_at: string;
1020
1023
  last_used_at: string;
1021
1024
  device_type: "mobile" | "desktop" | "tablet" | "unknown";
1022
- ip: string | null;
1025
+ ip_address: string | null;
1023
1026
  user_agent: string | null;
1024
1027
  is_current: boolean;
1025
1028
  }
package/dist/server.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { ad as CimplifyClient } from './client-DRJvXz54.mjs';
2
- export { K as CacheOptions, cq as ReadRequestOptions, cM as Result } from './client-DRJvXz54.mjs';
1
+ import { ad as CimplifyClient } from './client-C7EMuGoz.mjs';
2
+ export { K as CacheOptions, cq as ReadRequestOptions, cM as Result } from './client-C7EMuGoz.mjs';
3
3
  export { Q as Category, T as CimplifyError, U as Collection, aX as Product, b9 as ProductWithDetails } from './product-B_kS4Oxa.mjs';
4
4
  import { JWTVerifyResult } from 'jose';
5
5
  import './payment-DVS7ZUEp.mjs';
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ad as CimplifyClient } from './client-DjQhg6yr.js';
2
- export { K as CacheOptions, cq as ReadRequestOptions, cM as Result } from './client-DjQhg6yr.js';
1
+ import { ad as CimplifyClient } from './client-D6CZ2Ggp.js';
2
+ export { K as CacheOptions, cq as ReadRequestOptions, cM as Result } from './client-D6CZ2Ggp.js';
3
3
  export { Q as Category, T as CimplifyError, U as Collection, aX as Product, b9 as ProductWithDetails } from './product-B_kS4Oxa.js';
4
4
  import { JWTVerifyResult } from 'jose';
5
5
  import './payment-sn-yGL7v.js';
package/dist/server.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkQZQEGRGB_js = require('./chunk-QZQEGRGB.js');
4
- var chunkBCWPRPK7_js = require('./chunk-BCWPRPK7.js');
3
+ var chunkQS4XDVHI_js = require('./chunk-QS4XDVHI.js');
4
+ var chunkCV5QMDQS_js = require('./chunk-CV5QMDQS.js');
5
5
  require('./chunk-7Y2O3E4D.js');
6
6
  var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
7
7
  require('./chunk-OWW5GUSB.js');
@@ -26,7 +26,7 @@ function readEnv(...keys) {
26
26
  var getServerClient = react.cache((opts = {}) => {
27
27
  const baseUrl = opts.apiUrl ?? readEnv("CIMPLIFY_API_URL", "NEXT_PUBLIC_CIMPLIFY_API_URL") ?? defaultBaseUrl();
28
28
  const publicKey = opts.secretKey ?? readEnv("CIMPLIFY_SECRET_KEY", "NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY") ?? "mock-dev";
29
- const client = chunkQZQEGRGB_js.createCimplifyClient({
29
+ const client = chunkQS4XDVHI_js.createCimplifyClient({
30
30
  baseUrl,
31
31
  publicKey,
32
32
  suppressPublicKeyWarning: true
@@ -250,7 +250,7 @@ var QUERY_AUTH_ERROR = "cimplify_auth_error";
250
250
  var discoveryCache = /* @__PURE__ */ new Map();
251
251
  var jwksCache = /* @__PURE__ */ new Map();
252
252
  function issuerBase(cfg) {
253
- return (cfg.issuer ?? cfg.authUrl ?? chunkBCWPRPK7_js.DEFAULT_ISSUER).replace(/\/$/, "");
253
+ return (cfg.issuer ?? cfg.authUrl ?? chunkCV5QMDQS_js.DEFAULT_ISSUER).replace(/\/$/, "");
254
254
  }
255
255
  function cookieName(cfg) {
256
256
  return cfg.cookieName ?? SESSION_COOKIE;
@@ -465,12 +465,12 @@ async function handleOidcCallback(req, opts) {
465
465
  }
466
466
  function readPkceCookie(cookieHeader) {
467
467
  if (!cookieHeader) return null;
468
- const match = cookieHeader.split(/;\s*/).find((p) => p.startsWith(`${chunkBCWPRPK7_js.PKCE_COOKIE}=`));
468
+ const match = cookieHeader.split(/;\s*/).find((p) => p.startsWith(`${chunkCV5QMDQS_js.PKCE_COOKIE}=`));
469
469
  if (!match) return null;
470
- return chunkBCWPRPK7_js.decodePkceState(match.slice(chunkBCWPRPK7_js.PKCE_COOKIE.length + 1));
470
+ return chunkCV5QMDQS_js.decodePkceState(match.slice(chunkCV5QMDQS_js.PKCE_COOKIE.length + 1));
471
471
  }
472
472
  function buildPkceClearCookie() {
473
- return `${chunkBCWPRPK7_js.PKCE_COOKIE}=; Path=${chunkBCWPRPK7_js.PKCE_COOKIE_PATH}; Max-Age=0; Secure; SameSite=Lax`;
473
+ return `${chunkCV5QMDQS_js.PKCE_COOKIE}=; Path=${chunkCV5QMDQS_js.PKCE_COOKIE_PATH}; Max-Age=0; Secure; SameSite=Lax`;
474
474
  }
475
475
  function safeReturnPath(returnTo, fallback) {
476
476
  if (returnTo && returnTo.startsWith("/") && !returnTo.startsWith("//")) return returnTo;
package/dist/server.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { createCimplifyClient } from './chunk-EAVXSFAB.mjs';
2
- import { PKCE_COOKIE, decodePkceState, PKCE_COOKIE_PATH, DEFAULT_ISSUER } from './chunk-M2CXZQHS.mjs';
1
+ import { createCimplifyClient } from './chunk-H337NF4O.mjs';
2
+ import { PKCE_COOKIE, decodePkceState, PKCE_COOKIE_PATH, DEFAULT_ISSUER } from './chunk-3BKMNVTR.mjs';
3
3
  import './chunk-TD3AY34U.mjs';
4
4
  export { CimplifyError } from './chunk-AMZXALF6.mjs';
5
5
  import './chunk-3G6RQLXK.mjs';
@@ -1,4 +1,4 @@
1
- import { A as AppHandle, C as CreateAppOptions } from '../server-D8rwqZQ6.mjs';
1
+ import { A as AppHandle, C as CreateAppOptions } from '../server-DDQ1O3XR.mjs';
2
2
  import 'hono';
3
3
  import '../product-B_kS4Oxa.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { A as AppHandle, C as CreateAppOptions } from '../server-BQzz921M.js';
1
+ import { A as AppHandle, C as CreateAppOptions } from '../server-DMvQp27Z.js';
2
2
  import 'hono';
3
3
  import '../product-B_kS4Oxa.js';
4
4
 
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkI4MP2XZS_js = require('../chunk-I4MP2XZS.js');
3
+ var chunkXQ6LEDEO_js = require('../chunk-XQ6LEDEO.js');
4
4
  require('../chunk-XA3ZNR75.js');
5
5
  require('../chunk-OWW5GUSB.js');
6
6
 
7
7
  // src/mock/msw.ts
8
8
  async function createMswHandlers(options = {}) {
9
9
  const baseUrl = options.baseUrl ?? "http://localhost:8787";
10
- const handle = chunkI4MP2XZS_js.createMockApp(options);
10
+ const handle = chunkXQ6LEDEO_js.createMockApp(options);
11
11
  const msw = await import('msw').catch(() => {
12
12
  throw new Error("msw is required to use @cimplify/sdk/mock/msw \u2014 install it as a peer dependency");
13
13
  });
@@ -1,4 +1,4 @@
1
- import { createMockApp } from '../chunk-O3ECKVOM.mjs';
1
+ import { createMockApp } from '../chunk-QXMO2LGU.mjs';
2
2
  import '../chunk-AMZXALF6.mjs';
3
3
  import '../chunk-3G6RQLXK.mjs';
4
4
 
@@ -1,8 +1,8 @@
1
1
  import { TestAPI } from 'vitest';
2
- import { T as TestClientHandle } from '../client-BRGGjeny.mjs';
3
- import { C as CreateAppOptions } from '../server-D8rwqZQ6.mjs';
4
- export { S as SeedName } from '../server-D8rwqZQ6.mjs';
5
- import '../client-DRJvXz54.mjs';
2
+ import { T as TestClientHandle } from '../client-DWA_XIh3.mjs';
3
+ import { C as CreateAppOptions } from '../server-DDQ1O3XR.mjs';
4
+ export { S as SeedName } from '../server-DDQ1O3XR.mjs';
5
+ import '../client-C7EMuGoz.mjs';
6
6
  import '../product-B_kS4Oxa.mjs';
7
7
  import '../payment-DVS7ZUEp.mjs';
8
8
  import 'hono';
@@ -1,8 +1,8 @@
1
1
  import { TestAPI } from 'vitest';
2
- import { T as TestClientHandle } from '../client-Des_GqmQ.js';
3
- import { C as CreateAppOptions } from '../server-BQzz921M.js';
4
- export { S as SeedName } from '../server-BQzz921M.js';
5
- import '../client-DjQhg6yr.js';
2
+ import { T as TestClientHandle } from '../client-BvqaIlJ0.js';
3
+ import { C as CreateAppOptions } from '../server-DMvQp27Z.js';
4
+ export { S as SeedName } from '../server-DMvQp27Z.js';
5
+ import '../client-D6CZ2Ggp.js';
6
6
  import '../product-B_kS4Oxa.js';
7
7
  import '../payment-sn-yGL7v.js';
8
8
  import 'hono';