@cimplify/sdk 0.88.0 → 0.89.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.
Files changed (45) hide show
  1. package/dist/advanced.d.mts +3 -3
  2. package/dist/advanced.d.ts +3 -3
  3. package/dist/{chunk-A7NODD4Q.mjs → chunk-DENWOZEA.mjs} +39 -11
  4. package/dist/{chunk-6JA4HBBD.js → chunk-JHJTXAPS.js} +2 -2
  5. package/dist/{chunk-VU5LFNEX.mjs → chunk-M4ALCELT.mjs} +1 -1
  6. package/dist/{chunk-W5BVGAO6.js → chunk-T2CJ67QV.js} +39 -11
  7. package/dist/{client-B-8ceVyt.d.mts → client-CAY2NbRG.d.mts} +2 -2
  8. package/dist/{client-B3FBDfTg.d.ts → client-CUbwb6Om.d.ts} +2 -2
  9. package/dist/{client-D0PrO1-Q.d.ts → client-CqZgdUtw.d.ts} +18 -3
  10. package/dist/{client-r5VSGFRU.d.mts → client-D8ZFs-sq.d.mts} +18 -3
  11. package/dist/{index-C-Pxrzna.d.ts → index-Bc5qUxAt.d.ts} +3 -3
  12. package/dist/{index-DLulxmF1.d.mts → index-CmWOz9bi.d.mts} +3 -3
  13. package/dist/index.d.mts +6 -6
  14. package/dist/index.d.ts +6 -6
  15. package/dist/index.js +10 -10
  16. package/dist/index.mjs +1 -1
  17. package/dist/{payment-TnJUoHqL.d.mts → payment-Dcgb9n1n.d.mts} +1 -1
  18. package/dist/{payment-Cfoo9MT7.d.ts → payment-Xq0WDZXh.d.ts} +1 -1
  19. package/dist/{price-CM0zVSyM.d.mts → price--Ma_WO5_.d.mts} +1 -1
  20. package/dist/{price-CCDSrIsc.d.ts → price-DAAjKgAp.d.ts} +1 -1
  21. package/dist/{product-DoA36Eqh.d.mts → product-BakHcsP2.d.mts} +11 -2
  22. package/dist/{product-DoA36Eqh.d.ts → product-BakHcsP2.d.ts} +11 -2
  23. package/dist/react.d.mts +4 -4
  24. package/dist/react.d.ts +4 -4
  25. package/dist/react.js +22 -7
  26. package/dist/react.mjs +21 -6
  27. package/dist/{server-CHfYeTAa.d.ts → server-Bei5lBrc.d.ts} +1 -1
  28. package/dist/{server-CI1CUFVu.d.mts → server-Bk_hlefX.d.mts} +1 -1
  29. package/dist/server.d.mts +4 -4
  30. package/dist/server.d.ts +4 -4
  31. package/dist/server.js +2 -2
  32. package/dist/server.mjs +1 -1
  33. package/dist/testing/msw.d.mts +2 -2
  34. package/dist/testing/msw.d.ts +2 -2
  35. package/dist/testing/suite.d.mts +6 -6
  36. package/dist/testing/suite.d.ts +6 -6
  37. package/dist/testing/suite.js +21 -21
  38. package/dist/testing/suite.mjs +2 -2
  39. package/dist/testing.d.mts +5 -5
  40. package/dist/testing.d.ts +5 -5
  41. package/dist/testing.js +77 -77
  42. package/dist/testing.mjs +3 -3
  43. package/dist/utils.d.mts +4 -4
  44. package/dist/utils.d.ts +4 -4
  45. package/package.json +1 -1
@@ -2264,7 +2264,7 @@ interface components {
2264
2264
  };
2265
2265
  CustomerInputEntry: {
2266
2266
  field_id: string;
2267
- value: Record<string, never>;
2267
+ value: unknown;
2268
2268
  };
2269
2269
  CustomerInputValue: {
2270
2270
  field_id: string;
@@ -3007,6 +3007,8 @@ interface components {
3007
3007
  * enable POS without enabling `tap`, and vice versa.
3008
3008
  */
3009
3009
  pos?: boolean;
3010
+ /** @description Daily takings view + cash-drawer reconciliation (till sessions). */
3011
+ takings?: boolean;
3010
3012
  customers: boolean;
3011
3013
  locations: boolean;
3012
3014
  tables: boolean;
@@ -3256,6 +3258,12 @@ interface components {
3256
3258
  balance_due: string;
3257
3259
  deposit_required: boolean;
3258
3260
  deposit_amount: string;
3261
+ /**
3262
+ * @description True when the order has a settled payment whose provider can no longer
3263
+ * refund it (direct-to-bank T+1), so a refund must be recorded out of band.
3264
+ * Computed on the single-order detail view only (false elsewhere).
3265
+ */
3266
+ manual_refund_required?: boolean;
3259
3267
  };
3260
3268
  PaymentMethodPreferences: {
3261
3269
  /** @description Cash payment settings */
@@ -3438,6 +3446,7 @@ interface components {
3438
3446
  allergies?: string[] | null;
3439
3447
  recipe: Record<string, never>;
3440
3448
  is_active: boolean;
3449
+ is_archived?: boolean | null;
3441
3450
  /** Format: date-time */
3442
3451
  created_at: string;
3443
3452
  /** Format: date-time */
@@ -4053,7 +4062,7 @@ interface components {
4053
4062
  * is in Autopilot mode.
4054
4063
  * `client_id` is a widget-supplied idempotency key; passed through to
4055
4064
  * `CreateMessage.external_id`, so a retried POST with the same id
4056
- * returns 409 instead of inserting twice.
4065
+ * returns the originally created message instead of inserting twice.
4057
4066
  */
4058
4067
  SendMessageBody: {
4059
4068
  content: string;
@@ -2264,7 +2264,7 @@ interface components {
2264
2264
  };
2265
2265
  CustomerInputEntry: {
2266
2266
  field_id: string;
2267
- value: Record<string, never>;
2267
+ value: unknown;
2268
2268
  };
2269
2269
  CustomerInputValue: {
2270
2270
  field_id: string;
@@ -3007,6 +3007,8 @@ interface components {
3007
3007
  * enable POS without enabling `tap`, and vice versa.
3008
3008
  */
3009
3009
  pos?: boolean;
3010
+ /** @description Daily takings view + cash-drawer reconciliation (till sessions). */
3011
+ takings?: boolean;
3010
3012
  customers: boolean;
3011
3013
  locations: boolean;
3012
3014
  tables: boolean;
@@ -3256,6 +3258,12 @@ interface components {
3256
3258
  balance_due: string;
3257
3259
  deposit_required: boolean;
3258
3260
  deposit_amount: string;
3261
+ /**
3262
+ * @description True when the order has a settled payment whose provider can no longer
3263
+ * refund it (direct-to-bank T+1), so a refund must be recorded out of band.
3264
+ * Computed on the single-order detail view only (false elsewhere).
3265
+ */
3266
+ manual_refund_required?: boolean;
3259
3267
  };
3260
3268
  PaymentMethodPreferences: {
3261
3269
  /** @description Cash payment settings */
@@ -3438,6 +3446,7 @@ interface components {
3438
3446
  allergies?: string[] | null;
3439
3447
  recipe: Record<string, never>;
3440
3448
  is_active: boolean;
3449
+ is_archived?: boolean | null;
3441
3450
  /** Format: date-time */
3442
3451
  created_at: string;
3443
3452
  /** Format: date-time */
@@ -4053,7 +4062,7 @@ interface components {
4053
4062
  * is in Autopilot mode.
4054
4063
  * `client_id` is a widget-supplied idempotency key; passed through to
4055
4064
  * `CreateMessage.external_id`, so a retried POST with the same id
4056
- * returns 409 instead of inserting twice.
4065
+ * returns the originally created message instead of inserting twice.
4057
4066
  */
4058
4067
  SendMessageBody: {
4059
4068
  content: string;
package/dist/react.d.mts CHANGED
@@ -1,13 +1,13 @@
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 { ac as CimplifyClient, c4 as OrderType, cp as ProcessCheckoutResult, a9 as CheckoutStatus, aa as CheckoutStatusContext, aW as EnrichedOrderItem, aV as EnrichedOrder, w as Business, bt as Location, cG as ReorderResult, c2 as OrderStatus, bJ as Order, cr as QuoteBundleSelectionInput, cs as QuoteCompositeSelectionInput, cl as PriceQuote, cv as QuoteUiMessage, d0 as Service, r as AvailableSlot, au as DayAvailability, am as CustomerBooking, L as CancelBookingResult, f as ActivityStateResponse, d9 as SessionMessage, c as ActivityRecommendation, aw as DeliveryFeeResponse, ay as DeliveryOptionsResponse, b8 as FxRateResponse, di as StoreCreditBalance, dk as StorefrontBootstrap, X as ChatWidgetStarter, W as ChatMessage, h as AddressInfo, n as AuthenticatedData, aU as ElementsOptions, cf as PaymentMethodInfo, aS as ElementsCheckoutResult, co as ProcessCheckoutOptions, af as CimplifyElements, bk as LineItem, dc as Staff, cX as Room } from './client-r5VSGFRU.mjs';
4
+ import { ac as CimplifyClient, c4 as OrderType, cp as ProcessCheckoutResult, a9 as CheckoutStatus, aa as CheckoutStatusContext, aW as EnrichedOrderItem, aV as EnrichedOrder, w as Business, bt as Location, cG as ReorderResult, c2 as OrderStatus, bJ as Order, cr as QuoteBundleSelectionInput, cs as QuoteCompositeSelectionInput, cl as PriceQuote, cv as QuoteUiMessage, d0 as Service, r as AvailableSlot, au as DayAvailability, am as CustomerBooking, L as CancelBookingResult, f as ActivityStateResponse, d9 as SessionMessage, c as ActivityRecommendation, aw as DeliveryFeeResponse, ay as DeliveryOptionsResponse, b8 as FxRateResponse, di as StoreCreditBalance, dk as StorefrontBootstrap, X as ChatWidgetStarter, W as ChatMessage, h as AddressInfo, n as AuthenticatedData, aU as ElementsOptions, cf as PaymentMethodInfo, aS as ElementsCheckoutResult, co as ProcessCheckoutOptions, af as CimplifyElements, bk as LineItem, dc as Staff, cX as Room } from './client-D8ZFs-sq.mjs';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
- import { ad as CurrencyCode, aZ as Product, aQ as Pagination, V as CimplifyError, bb as ProductWithDetails, S as Category, aO as Money, E as BundleSelectionInput, a1 as ComponentSelectionInput, D as BundleSelectionData, aa as CompositeSelectionData, W as Collection, b6 as ProductTaxonomy, bx as TaxonomyWithChildren, b7 as ProductTimeProfile, aj as Deal, b2 as ProductDealInfo, ap as DiscountValidation, G as BundleSummary, a8 as CompositePriceResult, bs as SubscriptionWithDetails, br as SubscriptionStatus, bo as Subscription, ae as CustomAttributeDefinition, bc as PropertyFacet, b1 as ProductBillingPlan, bQ as VariantView, bK as VariantAxisWithValues, f as AddOnWithOptions, y as BundleComponentView, z as BundlePriceType, a6 as CompositeGroupView, as as DisplayCart, b3 as ProductInputField, bi as SaleInfo, bD as UpcomingSale, av as DurationUnit, t as BoundaryKind, bk as SchedulingMode, al as DepositType, af as CustomAttributeValue, b4 as ProductProperty, be as QuantityPricingTier } from './product-DoA36Eqh.mjs';
7
- import { P as ProductWithPrice } from './price-CM0zVSyM.mjs';
6
+ import { ad as CurrencyCode, aZ as Product, aQ as Pagination, V as CimplifyError, bb as ProductWithDetails, S as Category, aO as Money, E as BundleSelectionInput, a1 as ComponentSelectionInput, D as BundleSelectionData, aa as CompositeSelectionData, W as Collection, b6 as ProductTaxonomy, bx as TaxonomyWithChildren, b7 as ProductTimeProfile, aj as Deal, b2 as ProductDealInfo, ap as DiscountValidation, G as BundleSummary, a8 as CompositePriceResult, bs as SubscriptionWithDetails, br as SubscriptionStatus, bo as Subscription, ae as CustomAttributeDefinition, bc as PropertyFacet, b1 as ProductBillingPlan, bQ as VariantView, bK as VariantAxisWithValues, f as AddOnWithOptions, y as BundleComponentView, z as BundlePriceType, a6 as CompositeGroupView, as as DisplayCart, b3 as ProductInputField, bi as SaleInfo, bD as UpcomingSale, av as DurationUnit, t as BoundaryKind, bk as SchedulingMode, al as DepositType, af as CustomAttributeValue, b4 as ProductProperty, be as QuantityPricingTier } from './product-BakHcsP2.mjs';
7
+ import { P as ProductWithPrice } from './price--Ma_WO5_.mjs';
8
8
  import { ClassValue } from 'clsx';
9
9
  import { Matcher } from 'react-day-picker';
10
- import './payment-TnJUoHqL.mjs';
10
+ import './payment-Dcgb9n1n.mjs';
11
11
 
12
12
  interface UserIdentity {
13
13
  uid: string;
package/dist/react.d.ts CHANGED
@@ -1,13 +1,13 @@
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 { ac as CimplifyClient, c4 as OrderType, cp as ProcessCheckoutResult, a9 as CheckoutStatus, aa as CheckoutStatusContext, aW as EnrichedOrderItem, aV as EnrichedOrder, w as Business, bt as Location, cG as ReorderResult, c2 as OrderStatus, bJ as Order, cr as QuoteBundleSelectionInput, cs as QuoteCompositeSelectionInput, cl as PriceQuote, cv as QuoteUiMessage, d0 as Service, r as AvailableSlot, au as DayAvailability, am as CustomerBooking, L as CancelBookingResult, f as ActivityStateResponse, d9 as SessionMessage, c as ActivityRecommendation, aw as DeliveryFeeResponse, ay as DeliveryOptionsResponse, b8 as FxRateResponse, di as StoreCreditBalance, dk as StorefrontBootstrap, X as ChatWidgetStarter, W as ChatMessage, h as AddressInfo, n as AuthenticatedData, aU as ElementsOptions, cf as PaymentMethodInfo, aS as ElementsCheckoutResult, co as ProcessCheckoutOptions, af as CimplifyElements, bk as LineItem, dc as Staff, cX as Room } from './client-D0PrO1-Q.js';
4
+ import { ac as CimplifyClient, c4 as OrderType, cp as ProcessCheckoutResult, a9 as CheckoutStatus, aa as CheckoutStatusContext, aW as EnrichedOrderItem, aV as EnrichedOrder, w as Business, bt as Location, cG as ReorderResult, c2 as OrderStatus, bJ as Order, cr as QuoteBundleSelectionInput, cs as QuoteCompositeSelectionInput, cl as PriceQuote, cv as QuoteUiMessage, d0 as Service, r as AvailableSlot, au as DayAvailability, am as CustomerBooking, L as CancelBookingResult, f as ActivityStateResponse, d9 as SessionMessage, c as ActivityRecommendation, aw as DeliveryFeeResponse, ay as DeliveryOptionsResponse, b8 as FxRateResponse, di as StoreCreditBalance, dk as StorefrontBootstrap, X as ChatWidgetStarter, W as ChatMessage, h as AddressInfo, n as AuthenticatedData, aU as ElementsOptions, cf as PaymentMethodInfo, aS as ElementsCheckoutResult, co as ProcessCheckoutOptions, af as CimplifyElements, bk as LineItem, dc as Staff, cX as Room } from './client-CqZgdUtw.js';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
- import { ad as CurrencyCode, aZ as Product, aQ as Pagination, V as CimplifyError, bb as ProductWithDetails, S as Category, aO as Money, E as BundleSelectionInput, a1 as ComponentSelectionInput, D as BundleSelectionData, aa as CompositeSelectionData, W as Collection, b6 as ProductTaxonomy, bx as TaxonomyWithChildren, b7 as ProductTimeProfile, aj as Deal, b2 as ProductDealInfo, ap as DiscountValidation, G as BundleSummary, a8 as CompositePriceResult, bs as SubscriptionWithDetails, br as SubscriptionStatus, bo as Subscription, ae as CustomAttributeDefinition, bc as PropertyFacet, b1 as ProductBillingPlan, bQ as VariantView, bK as VariantAxisWithValues, f as AddOnWithOptions, y as BundleComponentView, z as BundlePriceType, a6 as CompositeGroupView, as as DisplayCart, b3 as ProductInputField, bi as SaleInfo, bD as UpcomingSale, av as DurationUnit, t as BoundaryKind, bk as SchedulingMode, al as DepositType, af as CustomAttributeValue, b4 as ProductProperty, be as QuantityPricingTier } from './product-DoA36Eqh.js';
7
- import { P as ProductWithPrice } from './price-CCDSrIsc.js';
6
+ import { ad as CurrencyCode, aZ as Product, aQ as Pagination, V as CimplifyError, bb as ProductWithDetails, S as Category, aO as Money, E as BundleSelectionInput, a1 as ComponentSelectionInput, D as BundleSelectionData, aa as CompositeSelectionData, W as Collection, b6 as ProductTaxonomy, bx as TaxonomyWithChildren, b7 as ProductTimeProfile, aj as Deal, b2 as ProductDealInfo, ap as DiscountValidation, G as BundleSummary, a8 as CompositePriceResult, bs as SubscriptionWithDetails, br as SubscriptionStatus, bo as Subscription, ae as CustomAttributeDefinition, bc as PropertyFacet, b1 as ProductBillingPlan, bQ as VariantView, bK as VariantAxisWithValues, f as AddOnWithOptions, y as BundleComponentView, z as BundlePriceType, a6 as CompositeGroupView, as as DisplayCart, b3 as ProductInputField, bi as SaleInfo, bD as UpcomingSale, av as DurationUnit, t as BoundaryKind, bk as SchedulingMode, al as DepositType, af as CustomAttributeValue, b4 as ProductProperty, be as QuantityPricingTier } from './product-BakHcsP2.js';
7
+ import { P as ProductWithPrice } from './price-DAAjKgAp.js';
8
8
  import { ClassValue } from 'clsx';
9
9
  import { Matcher } from 'react-day-picker';
10
- import './payment-Cfoo9MT7.js';
10
+ import './payment-Xq0WDZXh.js';
11
11
 
12
12
  interface UserIdentity {
13
13
  uid: string;
package/dist/react.js CHANGED
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkT7Z25EY4_js = require('./chunk-T7Z25EY4.js');
5
- var chunkW5BVGAO6_js = require('./chunk-W5BVGAO6.js');
5
+ var chunkT2CJ67QV_js = require('./chunk-T2CJ67QV.js');
6
6
  var chunkGHFDYM5K_js = require('./chunk-GHFDYM5K.js');
7
7
  var chunkPTPOQVXS_js = require('./chunk-PTPOQVXS.js');
8
8
  var chunkAETVRBKI_js = require('./chunk-AETVRBKI.js');
@@ -1132,7 +1132,7 @@ var DEFAULT_COUNTRY = "US";
1132
1132
  function createDefaultClient() {
1133
1133
  const processRef = globalThis.process;
1134
1134
  const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
1135
- return chunkW5BVGAO6_js.createCimplifyClient({ publicKey: envPublicKey });
1135
+ return chunkT2CJ67QV_js.createCimplifyClient({ publicKey: envPublicKey });
1136
1136
  }
1137
1137
  function getStoredLocationId() {
1138
1138
  if (typeof window === "undefined" || !window.localStorage) {
@@ -5905,10 +5905,9 @@ function useChat(options = {}) {
5905
5905
  return fresh.length > 0 ? [...prev, ...fresh] : prev;
5906
5906
  });
5907
5907
  }, []);
5908
- const pollMessages = React14.useCallback(async () => {
5908
+ const fetchNewMessages = React14.useCallback(async () => {
5909
5909
  const c = clientRef.current;
5910
5910
  if (!c) return;
5911
- if (Date.now() - lastActivityRef.current > IDLE_TIMEOUT_MS) return;
5912
5911
  const last = messagesRef.current[messagesRef.current.length - 1];
5913
5912
  const result = await c.support.getMessages({
5914
5913
  after: last?.created_at,
@@ -5918,6 +5917,10 @@ function useChat(options = {}) {
5918
5917
  appendMessages(result.value);
5919
5918
  }
5920
5919
  }, [appendMessages]);
5920
+ const pollMessages = React14.useCallback(async () => {
5921
+ if (Date.now() - lastActivityRef.current > IDLE_TIMEOUT_MS) return;
5922
+ await fetchNewMessages();
5923
+ }, [fetchNewMessages]);
5921
5924
  const startPolling = React14.useCallback(() => {
5922
5925
  if (pollRef.current) clearInterval(pollRef.current);
5923
5926
  const interval = Date.now() - lastActivityRef.current > IDLE_TIMEOUT_MS ? pollIdleInterval : pollInterval;
@@ -5950,6 +5953,12 @@ function useChat(options = {}) {
5950
5953
  const envelope = JSON.parse(event.data);
5951
5954
  if (envelope.type === "message.created" && envelope.data) {
5952
5955
  appendMessages([envelope.data]);
5956
+ } else if (envelope.type === "resync") {
5957
+ const latest = envelope.latest_message_at;
5958
+ const last = messagesRef.current[messagesRef.current.length - 1];
5959
+ if (latest && (!last || new Date(last.created_at).getTime() < new Date(latest).getTime())) {
5960
+ fetchNewMessages();
5961
+ }
5953
5962
  }
5954
5963
  } catch {
5955
5964
  }
@@ -5957,7 +5966,7 @@ function useChat(options = {}) {
5957
5966
  ws.onclose = () => {
5958
5967
  wsRef.current = null;
5959
5968
  if (!openedRef.current) return;
5960
- pollMessages();
5969
+ fetchNewMessages();
5961
5970
  if (wsReconnectAttemptRef.current < WS_MAX_RECONNECT_ATTEMPTS) {
5962
5971
  const attempt = wsReconnectAttemptRef.current++;
5963
5972
  const delay = Math.min(1e3 * Math.pow(2, attempt) + Math.random() * 500, 3e4);
@@ -5969,7 +5978,7 @@ function useChat(options = {}) {
5969
5978
  ws.onerror = () => {
5970
5979
  };
5971
5980
  wsRef.current = ws;
5972
- }, [appendMessages, startPolling, stopPolling, pollMessages]);
5981
+ }, [appendMessages, startPolling, stopPolling, fetchNewMessages]);
5973
5982
  React14.useEffect(() => {
5974
5983
  return () => {
5975
5984
  if (pollRef.current) clearInterval(pollRef.current);
@@ -6019,8 +6028,14 @@ function useChat(options = {}) {
6019
6028
  setIsSending(true);
6020
6029
  const result = await client.support.sendMessage(content.trim());
6021
6030
  if (result.ok) {
6031
+ const confirmed = result.value;
6022
6032
  setMessages(
6023
- (prev) => prev.map((m) => m.id === optimisticId ? result.value : m)
6033
+ (prev) => (
6034
+ // The websocket may have already streamed the confirmed message
6035
+ // in while the POST was in flight; drop the optimistic bubble
6036
+ // instead of inserting a duplicate.
6037
+ prev.some((m) => m.id === confirmed.id) ? prev.filter((m) => m.id !== optimisticId) : prev.map((m) => m.id === optimisticId ? confirmed : m)
6038
+ )
6024
6039
  );
6025
6040
  } else {
6026
6041
  setMessages((prev) => prev.filter((m) => m.id !== optimisticId));
package/dist/react.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, PRODUCT_TYPE, BOUNDARY_KIND, resolveGallery, RENDER_HINT, DEFAULT_CDN_BASE_URL } from './chunk-OZDDHSIB.mjs';
3
3
  export { getVariantDisplayName } from './chunk-OZDDHSIB.mjs';
4
- import { createCimplifyClient } from './chunk-A7NODD4Q.mjs';
4
+ import { createCimplifyClient } from './chunk-DENWOZEA.mjs';
5
5
  import { ELEMENT_TYPES, EVENT_TYPES, startSignIn } from './chunk-ZU4ZRYUR.mjs';
6
6
  import { parsePrice, formatMoney, formatPrice, getProductCurrency, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-KFLGQGMC.mjs';
7
7
  import { isSupportedCurrency } from './chunk-K5EN2W2Q.mjs';
@@ -5881,10 +5881,9 @@ function useChat(options = {}) {
5881
5881
  return fresh.length > 0 ? [...prev, ...fresh] : prev;
5882
5882
  });
5883
5883
  }, []);
5884
- const pollMessages = useCallback(async () => {
5884
+ const fetchNewMessages = useCallback(async () => {
5885
5885
  const c = clientRef.current;
5886
5886
  if (!c) return;
5887
- if (Date.now() - lastActivityRef.current > IDLE_TIMEOUT_MS) return;
5888
5887
  const last = messagesRef.current[messagesRef.current.length - 1];
5889
5888
  const result = await c.support.getMessages({
5890
5889
  after: last?.created_at,
@@ -5894,6 +5893,10 @@ function useChat(options = {}) {
5894
5893
  appendMessages(result.value);
5895
5894
  }
5896
5895
  }, [appendMessages]);
5896
+ const pollMessages = useCallback(async () => {
5897
+ if (Date.now() - lastActivityRef.current > IDLE_TIMEOUT_MS) return;
5898
+ await fetchNewMessages();
5899
+ }, [fetchNewMessages]);
5897
5900
  const startPolling = useCallback(() => {
5898
5901
  if (pollRef.current) clearInterval(pollRef.current);
5899
5902
  const interval = Date.now() - lastActivityRef.current > IDLE_TIMEOUT_MS ? pollIdleInterval : pollInterval;
@@ -5926,6 +5929,12 @@ function useChat(options = {}) {
5926
5929
  const envelope = JSON.parse(event.data);
5927
5930
  if (envelope.type === "message.created" && envelope.data) {
5928
5931
  appendMessages([envelope.data]);
5932
+ } else if (envelope.type === "resync") {
5933
+ const latest = envelope.latest_message_at;
5934
+ const last = messagesRef.current[messagesRef.current.length - 1];
5935
+ if (latest && (!last || new Date(last.created_at).getTime() < new Date(latest).getTime())) {
5936
+ fetchNewMessages();
5937
+ }
5929
5938
  }
5930
5939
  } catch {
5931
5940
  }
@@ -5933,7 +5942,7 @@ function useChat(options = {}) {
5933
5942
  ws.onclose = () => {
5934
5943
  wsRef.current = null;
5935
5944
  if (!openedRef.current) return;
5936
- pollMessages();
5945
+ fetchNewMessages();
5937
5946
  if (wsReconnectAttemptRef.current < WS_MAX_RECONNECT_ATTEMPTS) {
5938
5947
  const attempt = wsReconnectAttemptRef.current++;
5939
5948
  const delay = Math.min(1e3 * Math.pow(2, attempt) + Math.random() * 500, 3e4);
@@ -5945,7 +5954,7 @@ function useChat(options = {}) {
5945
5954
  ws.onerror = () => {
5946
5955
  };
5947
5956
  wsRef.current = ws;
5948
- }, [appendMessages, startPolling, stopPolling, pollMessages]);
5957
+ }, [appendMessages, startPolling, stopPolling, fetchNewMessages]);
5949
5958
  useEffect(() => {
5950
5959
  return () => {
5951
5960
  if (pollRef.current) clearInterval(pollRef.current);
@@ -5995,8 +6004,14 @@ function useChat(options = {}) {
5995
6004
  setIsSending(true);
5996
6005
  const result = await client.support.sendMessage(content.trim());
5997
6006
  if (result.ok) {
6007
+ const confirmed = result.value;
5998
6008
  setMessages(
5999
- (prev) => prev.map((m) => m.id === optimisticId ? result.value : m)
6009
+ (prev) => (
6010
+ // The websocket may have already streamed the confirmed message
6011
+ // in while the POST was in flight; drop the optimistic bubble
6012
+ // instead of inserting a duplicate.
6013
+ prev.some((m) => m.id === confirmed.id) ? prev.filter((m) => m.id !== optimisticId) : prev.map((m) => m.id === optimisticId ? confirmed : m)
6014
+ )
6000
6015
  );
6001
6016
  } else {
6002
6017
  setMessages((prev) => prev.filter((m) => m.id !== optimisticId));
@@ -1,5 +1,5 @@
1
1
  import { Hono } from 'hono';
2
- import { b3 as ProductInputField } from './product-DoA36Eqh.js';
2
+ import { b3 as ProductInputField } from './product-BakHcsP2.js';
3
3
 
4
4
  interface Clock {
5
5
  now(): Date;
@@ -1,5 +1,5 @@
1
1
  import { Hono } from 'hono';
2
- import { b3 as ProductInputField } from './product-DoA36Eqh.mjs';
2
+ import { b3 as ProductInputField } from './product-BakHcsP2.mjs';
3
3
 
4
4
  interface Clock {
5
5
  now(): Date;
package/dist/server.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { ac as CimplifyClient } from './client-r5VSGFRU.mjs';
2
- export { J as CacheOptions, cw as ReadRequestOptions, cT as Result } from './client-r5VSGFRU.mjs';
3
- export { S as Category, V as CimplifyError, W as Collection, aZ as Product, bb as ProductWithDetails } from './product-DoA36Eqh.mjs';
1
+ import { ac as CimplifyClient } from './client-D8ZFs-sq.mjs';
2
+ export { J as CacheOptions, cw as ReadRequestOptions, cT as Result } from './client-D8ZFs-sq.mjs';
3
+ export { S as Category, V as CimplifyError, W as Collection, aZ as Product, bb as ProductWithDetails } from './product-BakHcsP2.mjs';
4
4
  import { JWTVerifyResult } from 'jose';
5
- import './payment-TnJUoHqL.mjs';
5
+ import './payment-Dcgb9n1n.mjs';
6
6
 
7
7
  interface ServerClientOptions {
8
8
  /**
package/dist/server.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { ac as CimplifyClient } from './client-D0PrO1-Q.js';
2
- export { J as CacheOptions, cw as ReadRequestOptions, cT as Result } from './client-D0PrO1-Q.js';
3
- export { S as Category, V as CimplifyError, W as Collection, aZ as Product, bb as ProductWithDetails } from './product-DoA36Eqh.js';
1
+ import { ac as CimplifyClient } from './client-CqZgdUtw.js';
2
+ export { J as CacheOptions, cw as ReadRequestOptions, cT as Result } from './client-CqZgdUtw.js';
3
+ export { S as Category, V as CimplifyError, W as Collection, aZ as Product, bb as ProductWithDetails } from './product-BakHcsP2.js';
4
4
  import { JWTVerifyResult } from 'jose';
5
- import './payment-Cfoo9MT7.js';
5
+ import './payment-Xq0WDZXh.js';
6
6
 
7
7
  interface ServerClientOptions {
8
8
  /**
package/dist/server.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkW5BVGAO6_js = require('./chunk-W5BVGAO6.js');
3
+ var chunkT2CJ67QV_js = require('./chunk-T2CJ67QV.js');
4
4
  var chunkGHFDYM5K_js = require('./chunk-GHFDYM5K.js');
5
5
  require('./chunk-PTPOQVXS.js');
6
6
  var chunkAETVRBKI_js = require('./chunk-AETVRBKI.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 = chunkW5BVGAO6_js.createCimplifyClient({
29
+ const client = chunkT2CJ67QV_js.createCimplifyClient({
30
30
  baseUrl,
31
31
  publicKey,
32
32
  suppressPublicKeyWarning: true
package/dist/server.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { createCimplifyClient } from './chunk-A7NODD4Q.mjs';
1
+ import { createCimplifyClient } from './chunk-DENWOZEA.mjs';
2
2
  import { PKCE_COOKIE, decodePkceState, PKCE_COOKIE_PATH, DEFAULT_ISSUER } from './chunk-ZU4ZRYUR.mjs';
3
3
  import './chunk-KFLGQGMC.mjs';
4
4
  export { CimplifyError } from './chunk-K5EN2W2Q.mjs';
@@ -1,6 +1,6 @@
1
- import { A as AppHandle, C as CreateAppOptions } from '../server-CI1CUFVu.mjs';
1
+ import { A as AppHandle, C as CreateAppOptions } from '../server-Bk_hlefX.mjs';
2
2
  import 'hono';
3
- import '../product-DoA36Eqh.mjs';
3
+ import '../product-BakHcsP2.mjs';
4
4
 
5
5
  interface MswHandlerSetup {
6
6
  handlers: unknown[];
@@ -1,6 +1,6 @@
1
- import { A as AppHandle, C as CreateAppOptions } from '../server-CHfYeTAa.js';
1
+ import { A as AppHandle, C as CreateAppOptions } from '../server-Bei5lBrc.js';
2
2
  import 'hono';
3
- import '../product-DoA36Eqh.js';
3
+ import '../product-BakHcsP2.js';
4
4
 
5
5
  interface MswHandlerSetup {
6
6
  handlers: unknown[];
@@ -1,10 +1,10 @@
1
1
  import { TestAPI } from 'vitest';
2
- import { T as TestClientHandle } from '../client-B-8ceVyt.mjs';
3
- import { C as CreateAppOptions } from '../server-CI1CUFVu.mjs';
4
- export { S as SeedName } from '../server-CI1CUFVu.mjs';
5
- import '../client-r5VSGFRU.mjs';
6
- import '../product-DoA36Eqh.mjs';
7
- import '../payment-TnJUoHqL.mjs';
2
+ import { T as TestClientHandle } from '../client-CAY2NbRG.mjs';
3
+ import { C as CreateAppOptions } from '../server-Bk_hlefX.mjs';
4
+ export { S as SeedName } from '../server-Bk_hlefX.mjs';
5
+ import '../client-D8ZFs-sq.mjs';
6
+ import '../product-BakHcsP2.mjs';
7
+ import '../payment-Dcgb9n1n.mjs';
8
8
  import 'hono';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  import { TestAPI } from 'vitest';
2
- import { T as TestClientHandle } from '../client-B3FBDfTg.js';
3
- import { C as CreateAppOptions } from '../server-CHfYeTAa.js';
4
- export { S as SeedName } from '../server-CHfYeTAa.js';
5
- import '../client-D0PrO1-Q.js';
6
- import '../product-DoA36Eqh.js';
7
- import '../payment-Cfoo9MT7.js';
2
+ import { T as TestClientHandle } from '../client-CUbwb6Om.js';
3
+ import { C as CreateAppOptions } from '../server-Bei5lBrc.js';
4
+ export { S as SeedName } from '../server-Bei5lBrc.js';
5
+ import '../client-CqZgdUtw.js';
6
+ import '../product-BakHcsP2.js';
7
+ import '../payment-Xq0WDZXh.js';
8
8
  import 'hono';
9
9
 
10
10
  /**
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk6JA4HBBD_js = require('../chunk-6JA4HBBD.js');
3
+ var chunkJHJTXAPS_js = require('../chunk-JHJTXAPS.js');
4
4
  require('../chunk-ROBTTS3Q.js');
5
- require('../chunk-W5BVGAO6.js');
5
+ require('../chunk-T2CJ67QV.js');
6
6
  require('../chunk-GHFDYM5K.js');
7
7
  require('../chunk-PTPOQVXS.js');
8
8
  require('../chunk-AETVRBKI.js');
@@ -20,11 +20,11 @@ var PLACEHOLDER_PHRASES = [
20
20
  function createBrandSuite(opts) {
21
21
  vitest.describe(opts.label ?? "brand schema", () => {
22
22
  vitest.it("conforms to the Cimplify brand contract", () => {
23
- vitest.expect(() => chunk6JA4HBBD_js.assertBrand(opts.brand)).not.toThrow();
23
+ vitest.expect(() => chunkJHJTXAPS_js.assertBrand(opts.brand)).not.toThrow();
24
24
  });
25
25
  vitest.it("declares a known mock seed", () => {
26
26
  const b = opts.brand;
27
- vitest.expect(chunk6JA4HBBD_js.SeedNameSchema.safeParse(b.mock?.seed).success).toBe(true);
27
+ vitest.expect(chunkJHJTXAPS_js.SeedNameSchema.safeParse(b.mock?.seed).success).toBe(true);
28
28
  });
29
29
  vitest.it("has no placeholder copy left in", () => {
30
30
  const offenders = [];
@@ -56,7 +56,7 @@ ${msg}`);
56
56
  vitest.expect(b.mock?.businessId).toMatch(/^bus_/);
57
57
  });
58
58
  vitest.it("zod-parses cleanly", () => {
59
- const result = chunk6JA4HBBD_js.BrandSchema.safeParse(opts.brand);
59
+ const result = chunkJHJTXAPS_js.BrandSchema.safeParse(opts.brand);
60
60
  if (!result.success) {
61
61
  throw new Error(
62
62
  "Brand schema violations:\n" + result.error.issues.map((i) => ` \u2022 brand.${i.path.join(".")}: ${i.message}`).join("\n")
@@ -71,23 +71,23 @@ function createCartFlowSuite(opts = {}) {
71
71
  vitest.describe(opts.label ?? "cart flow against in-process mock", () => {
72
72
  let h;
73
73
  vitest.beforeEach(() => {
74
- h = chunk6JA4HBBD_js.createTestClient(opts);
74
+ h = chunkJHJTXAPS_js.createTestClient(opts);
75
75
  });
76
76
  vitest.afterEach(() => h.dispose());
77
77
  vitest.it("starts with an empty cart matching the canonical shape", async () => {
78
78
  const res = await h.client.cart.get();
79
79
  vitest.expect(res.ok).toBe(true);
80
80
  if (!res.ok) return;
81
- vitest.expect(() => chunk6JA4HBBD_js.assertCart(res.value)).not.toThrow();
81
+ vitest.expect(() => chunkJHJTXAPS_js.assertCart(res.value)).not.toThrow();
82
82
  vitest.expect(res.value.items).toHaveLength(0);
83
83
  });
84
84
  vitest.it("adds the first product, persists it, and returns a shape-valid cart", async () => {
85
- const { product, variantId } = await chunk6JA4HBBD_js.fixtures.addFirstProduct(h.client);
85
+ const { product, variantId } = await chunkJHJTXAPS_js.fixtures.addFirstProduct(h.client);
86
86
  vitest.expect(product.id).toBeTruthy();
87
87
  const get = await h.client.cart.get();
88
88
  vitest.expect(get.ok).toBe(true);
89
89
  if (!get.ok) return;
90
- vitest.expect(() => chunk6JA4HBBD_js.assertCart(get.value)).not.toThrow();
90
+ vitest.expect(() => chunkJHJTXAPS_js.assertCart(get.value)).not.toThrow();
91
91
  vitest.expect(get.value.items).toHaveLength(1);
92
92
  vitest.expect(get.value.items[0]?.item_id).toBe(product.id);
93
93
  if (variantId) {
@@ -98,8 +98,8 @@ function createCartFlowSuite(opts = {}) {
98
98
  vitest.expect(parseFloat(String(get.value.pricing.subtotal))).toBeGreaterThan(0);
99
99
  });
100
100
  vitest.it("dedupes by line_key when adding the same product twice", async () => {
101
- await chunk6JA4HBBD_js.fixtures.addFirstProduct(h.client);
102
- await chunk6JA4HBBD_js.fixtures.addFirstProduct(h.client);
101
+ await chunkJHJTXAPS_js.fixtures.addFirstProduct(h.client);
102
+ await chunkJHJTXAPS_js.fixtures.addFirstProduct(h.client);
103
103
  const res = await h.client.cart.get();
104
104
  vitest.expect(res.ok).toBe(true);
105
105
  if (!res.ok) return;
@@ -107,7 +107,7 @@ function createCartFlowSuite(opts = {}) {
107
107
  vitest.expect(res.value.items[0]?.quantity).toBe(2);
108
108
  });
109
109
  vitest.it("removes items and zeroes the subtotal", async () => {
110
- await chunk6JA4HBBD_js.fixtures.addFirstProduct(h.client);
110
+ await chunkJHJTXAPS_js.fixtures.addFirstProduct(h.client);
111
111
  const before = await h.client.cart.get();
112
112
  if (!before.ok) throw before.error;
113
113
  const itemId = before.value.items[0]?.id;
@@ -133,28 +133,28 @@ function createContractSuite(opts = {}) {
133
133
  vitest.describe(opts.label ?? "SDK \u2194 mock contract", () => {
134
134
  let h;
135
135
  vitest.beforeEach(() => {
136
- h = chunk6JA4HBBD_js.createTestClient(opts);
136
+ h = chunkJHJTXAPS_js.createTestClient(opts);
137
137
  });
138
138
  vitest.afterEach(() => h.dispose());
139
139
  vitest.it("AddItemPayload schema accepts a minimal valid body", () => {
140
- const result = chunk6JA4HBBD_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: 1 });
140
+ const result = chunkJHJTXAPS_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: 1 });
141
141
  vitest.expect(result.success).toBe(true);
142
142
  });
143
143
  vitest.it("AddItemPayload schema rejects negative quantity", () => {
144
- const result = chunk6JA4HBBD_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: -1 });
144
+ const result = chunkJHJTXAPS_js.AddItemPayloadSchema.safeParse({ item_id: "prod_x", quantity: -1 });
145
145
  vitest.expect(result.success).toBe(false);
146
146
  });
147
147
  vitest.it("AddItemPayload schema rejects empty item_id", () => {
148
- const result = chunk6JA4HBBD_js.AddItemPayloadSchema.safeParse({ item_id: "", quantity: 1 });
148
+ const result = chunkJHJTXAPS_js.AddItemPayloadSchema.safeParse({ item_id: "", quantity: 1 });
149
149
  vitest.expect(result.success).toBe(false);
150
150
  });
151
151
  vitest.it("Cart line items returned by the mock match CartItemSchema", async () => {
152
- const { product } = await chunk6JA4HBBD_js.fixtures.addFirstProduct(h.client);
152
+ const { product } = await chunkJHJTXAPS_js.fixtures.addFirstProduct(h.client);
153
153
  const get = await h.client.cart.get();
154
154
  if (!get.ok) throw get.error;
155
155
  vitest.expect(get.value.items.length).toBeGreaterThan(0);
156
156
  for (const item of get.value.items) {
157
- const result = chunk6JA4HBBD_js.CartItemSchema.safeParse(item);
157
+ const result = chunkJHJTXAPS_js.CartItemSchema.safeParse(item);
158
158
  if (!result.success) {
159
159
  const issues = result.error.issues.map((i) => ` \u2022 ${i.path.join(".")}: ${i.message}`).join("\n");
160
160
  throw new Error(`Cart item shape mismatch for ${product.name}:
@@ -164,19 +164,19 @@ ${issues}`);
164
164
  }
165
165
  });
166
166
  vitest.it("CheckoutResponse from the mock includes bill_token", async () => {
167
- await chunk6JA4HBBD_js.fixtures.addFirstProduct(h.client);
167
+ await chunkJHJTXAPS_js.fixtures.addFirstProduct(h.client);
168
168
  const cartRes = await h.client.cart.get();
169
169
  if (!cartRes.ok) throw cartRes.error;
170
170
  const checkout = await h.client.checkout.process({
171
171
  cart_id: cartRes.value.id,
172
- customer: chunk6JA4HBBD_js.fixtures.customer(),
172
+ customer: chunkJHJTXAPS_js.fixtures.customer(),
173
173
  order_type: "delivery",
174
174
  payment_method: "mobile_money",
175
175
  mobile_money_details: { phone_number: "+233244000000", provider: "mtn" }
176
176
  });
177
177
  vitest.expect(checkout.ok).toBe(true);
178
178
  if (!checkout.ok) return;
179
- const result = chunk6JA4HBBD_js.CheckoutResponseSchema.safeParse(checkout.value);
179
+ const result = chunkJHJTXAPS_js.CheckoutResponseSchema.safeParse(checkout.value);
180
180
  if (!result.success) {
181
181
  const issues = result.error.issues.map((i) => ` \u2022 ${i.path.join(".")}: ${i.message}`).join("\n");
182
182
  throw new Error(`CheckoutResponse shape mismatch:
@@ -1,6 +1,6 @@
1
- import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-VU5LFNEX.mjs';
1
+ import { assertBrand, SeedNameSchema, BrandSchema, createTestClient, assertCart, fixtures, AddItemPayloadSchema, CartItemSchema, CheckoutResponseSchema } from '../chunk-M4ALCELT.mjs';
2
2
  import '../chunk-APBLFZ2I.mjs';
3
- import '../chunk-A7NODD4Q.mjs';
3
+ import '../chunk-DENWOZEA.mjs';
4
4
  import '../chunk-ZU4ZRYUR.mjs';
5
5
  import '../chunk-KFLGQGMC.mjs';
6
6
  import '../chunk-K5EN2W2Q.mjs';
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { $ZodType } from 'zod/v4/core';
3
- export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-B-8ceVyt.mjs';
4
- import './client-r5VSGFRU.mjs';
5
- import './product-DoA36Eqh.mjs';
6
- import './payment-TnJUoHqL.mjs';
7
- import './server-CI1CUFVu.mjs';
3
+ export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-CAY2NbRG.mjs';
4
+ import './client-D8ZFs-sq.mjs';
5
+ import './product-BakHcsP2.mjs';
6
+ import './payment-Dcgb9n1n.mjs';
7
+ import './server-Bk_hlefX.mjs';
8
8
  import 'hono';
9
9
 
10
10
  /**
package/dist/testing.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { $ZodType } from 'zod/v4/core';
3
- export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-B3FBDfTg.js';
4
- import './client-D0PrO1-Q.js';
5
- import './product-DoA36Eqh.js';
6
- import './payment-Cfoo9MT7.js';
7
- import './server-CHfYeTAa.js';
3
+ export { A as AddFirstProductOptions, a as AddFirstProductResult, P as ProductSummary, T as TestClientHandle, c as createTestClient, f as fixtures } from './client-CUbwb6Om.js';
4
+ import './client-CqZgdUtw.js';
5
+ import './product-BakHcsP2.js';
6
+ import './payment-Xq0WDZXh.js';
7
+ import './server-Bei5lBrc.js';
8
8
  import 'hono';
9
9
 
10
10
  /**