@apextelemed/partner-core 0.19.0-dev.61 → 0.19.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 (51) hide show
  1. package/dist/api/index.d.ts +23 -2
  2. package/dist/api/index.js +4 -4
  3. package/dist/api/index.jsx +8 -4
  4. package/dist/chunk/{HEQLEGHI.js → BTDK3J34.js} +51 -3
  5. package/dist/chunk/BTDK3J34.js.map +1 -0
  6. package/dist/chunk/ESNAWOHG.jsx +1 -0
  7. package/dist/chunk/{TFJKTKZ3.jsx → FKEDRIA7.jsx} +2986 -2099
  8. package/dist/chunk/{CDRUVUTJ.js → FZ4LIOG2.js} +18 -8
  9. package/dist/chunk/FZ4LIOG2.js.map +1 -0
  10. package/dist/chunk/{OZHJ5IGL.jsx → HEXXZYK4.jsx} +370 -131
  11. package/dist/chunk/{ZWAZNB4Y.jsx → HSBATWVL.jsx} +2 -2
  12. package/dist/chunk/{WTHAR2P2.js → LJAMZMRF.js} +3 -3
  13. package/dist/chunk/{WTHAR2P2.js.map → LJAMZMRF.js.map} +1 -1
  14. package/dist/chunk/{33BDC6MT.jsx → MVWCKLRH.jsx} +2 -2
  15. package/dist/chunk/{GJSE37VN.js → O2VF7KNG.js} +3 -3
  16. package/dist/chunk/{GJSE37VN.js.map → O2VF7KNG.js.map} +1 -1
  17. package/dist/chunk/{UZ2K7HBG.js → P6YCW73X.js} +2475 -1202
  18. package/dist/chunk/P6YCW73X.js.map +1 -0
  19. package/dist/chunk/{X6WJQ47H.jsx → PZ4BRSEK.jsx} +50 -2
  20. package/dist/chunk/{EED3KNR7.jsx → UAZK2UTR.jsx} +41 -3
  21. package/dist/chunk/{VGF2LLAD.js → WM5KNUNX.js} +240 -14
  22. package/dist/chunk/WM5KNUNX.js.map +1 -0
  23. package/dist/chunk/{OOMMZESR.js → WUVYCWKW.js} +40 -4
  24. package/dist/chunk/WUVYCWKW.js.map +1 -0
  25. package/dist/chunk/XZVVZIRZ.js +3 -0
  26. package/dist/chunk/XZVVZIRZ.js.map +1 -0
  27. package/dist/chunk/{LA6F37YV.jsx → ZEQ5TNDM.jsx} +20 -7
  28. package/dist/{client-CMbSYUam.d.ts → client-C0MG1mOg.d.ts} +178 -2
  29. package/dist/flows/index.d.ts +113 -2
  30. package/dist/flows/index.js +6 -6
  31. package/dist/flows/index.jsx +14 -6
  32. package/dist/index/index.d.ts +26 -5
  33. package/dist/index/index.js +8 -8
  34. package/dist/index/index.jsx +22 -8
  35. package/dist/pages/index.d.ts +2 -2
  36. package/dist/pages/index.js +5 -5
  37. package/dist/pages/index.jsx +5 -5
  38. package/dist/stores/index.d.ts +1 -1
  39. package/dist/stores/index.js +2 -2
  40. package/dist/stores/index.jsx +2 -2
  41. package/dist/theme/admin.css +3 -0
  42. package/dist/theme/member-portal.css +43 -0
  43. package/package.json +1 -1
  44. package/dist/chunk/ACE7M2YA.jsx +0 -1
  45. package/dist/chunk/CDRUVUTJ.js.map +0 -1
  46. package/dist/chunk/HEQLEGHI.js.map +0 -1
  47. package/dist/chunk/JSHO46VZ.js +0 -3
  48. package/dist/chunk/JSHO46VZ.js.map +0 -1
  49. package/dist/chunk/OOMMZESR.js.map +0 -1
  50. package/dist/chunk/UZ2K7HBG.js.map +0 -1
  51. package/dist/chunk/VGF2LLAD.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { getTokens } from './HEQLEGHI.js';
1
+ import { getTokens } from './BTDK3J34.js';
2
2
  import { getConfig } from './2IFPDU4D.js';
3
3
 
4
4
  // src/api/funnel.ts
@@ -137,6 +137,42 @@ function stripResumeToken() {
137
137
  }
138
138
  }
139
139
 
140
- export { adoptFunnelSessionId, captureAuthHeader, fetchFunnelConfig, fetchResumedDraft, funnelSessionId, peekFunnelSessionId, postFunnelEvent, readResumeToken, resetFunnelConfigCache, saveFunnelDraft, stripResumeToken };
141
- //# sourceMappingURL=OOMMZESR.js.map
142
- //# sourceMappingURL=OOMMZESR.js.map
140
+ // src/api/sms.ts
141
+ var DISABLED2 = { enabled: false };
142
+ var str = (v) => typeof v === "string" && v.trim() ? v : void 0;
143
+ var configPromise2 = null;
144
+ function fetchSmsConfig() {
145
+ if (!configPromise2) {
146
+ configPromise2 = (async () => {
147
+ try {
148
+ const cfg = getConfig();
149
+ const res = await fetch(`${cfg.apiBase}/config/sms`, {
150
+ headers: { "X-Tenant-Key": cfg.tenantKey }
151
+ });
152
+ if (!res.ok) return DISABLED2;
153
+ const body = await res.json();
154
+ const consentText = str(body.consentText);
155
+ const consentTextVersion = str(body.consentTextVersion);
156
+ if (body.enabled !== true || !consentText || !consentTextVersion) return DISABLED2;
157
+ return {
158
+ enabled: true,
159
+ brandName: str(body.brandName),
160
+ consentText,
161
+ consentTextVersion,
162
+ termsUrl: str(body.termsUrl),
163
+ privacyUrl: str(body.privacyUrl)
164
+ };
165
+ } catch {
166
+ return DISABLED2;
167
+ }
168
+ })();
169
+ }
170
+ return configPromise2;
171
+ }
172
+ function resetSmsConfigCache() {
173
+ configPromise2 = null;
174
+ }
175
+
176
+ export { adoptFunnelSessionId, captureAuthHeader, fetchFunnelConfig, fetchResumedDraft, fetchSmsConfig, funnelSessionId, peekFunnelSessionId, postFunnelEvent, readResumeToken, resetFunnelConfigCache, resetSmsConfigCache, saveFunnelDraft, stripResumeToken };
177
+ //# sourceMappingURL=WUVYCWKW.js.map
178
+ //# sourceMappingURL=WUVYCWKW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/api/funnel.ts","../../src/api/sms.ts"],"names":["DISABLED","configPromise"],"mappings":";;;;AAmBA,IAAM,WAAyB,EAAE,SAAA,EAAW,OAAO,SAAA,EAAW,KAAA,EAAO,mBAAmB,KAAA,EAAM;AAE9F,IAAI,aAAA,GAA8C,IAAA;AAM3C,SAAS,iBAAA,GAA2C;AACzD,EAAA,IAAI,CAAC,aAAA,EAAe;AAClB,IAAA,aAAA,GAAA,CAAiB,YAAY;AAC3B,MAAA,IAAI;AACF,QAAA,MAAM,MAAM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ClB","file":"WUVYCWKW.js","sourcesContent":["import { getConfig } from '../config';\nimport { getTokens } from './client';\n\n// ── Funnel telemetry transport ──────────────────────────────────────────────\n//\n// Thin client for the-backend's abandoned-funnel capture endpoints:\n// GET /config/funnel → which capture features this tenant enabled\n// POST /funnel/events → survey-session telemetry sink\n//\n// Everything here is fire-and-forget and fail-silent: funnel capture is\n// marketing instrumentation, and it must never break or slow the survey.\n\nexport interface FunnelConfig {\n telemetry: boolean;\n emailGate: boolean;\n /** When true (tenant features.funnelEmailGateRequired), the gate offers no skip. */\n emailGateRequired: boolean;\n}\n\nconst DISABLED: FunnelConfig = { telemetry: false, emailGate: false, emailGateRequired: false };\n\nlet configPromise: Promise<FunnelConfig> | null = null;\n\n/**\n * The tenant's funnel-capture posture, fetched once per page load and cached.\n * Fails closed: any error reads as \"both off\".\n */\nexport function fetchFunnelConfig(): Promise<FunnelConfig> {\n if (!configPromise) {\n configPromise = (async () => {\n try {\n const cfg = getConfig();\n const res = await fetch(`${cfg.apiBase}/config/funnel`, {\n headers: { 'X-Tenant-Key': cfg.tenantKey },\n });\n if (!res.ok) return DISABLED;\n const body = (await res.json()) as Partial<FunnelConfig>;\n return {\n telemetry: body.telemetry === true,\n emailGate: body.emailGate === true,\n emailGateRequired: body.emailGateRequired === true,\n };\n } catch {\n return DISABLED;\n }\n })();\n }\n return configPromise;\n}\n\n/**\n * Continue an existing funnel session (resume-from-email): the emailed link\n * identifies the session that already holds this person's email and reminder\n * history, so adopting its id keeps everything on one row instead of forking a\n * new one that looks like a brand-new visitor.\n */\nexport function adoptFunnelSessionId(id: string): void {\n if (!id) return;\n try {\n sessionStorage.setItem(sessionIdKey(), id);\n } catch {\n /* storage unavailable — the session stays ephemeral */\n }\n}\n\n/** Test seam: forget the cached config so the next fetch re-resolves. */\nexport function resetFunnelConfigCache(): void {\n configPromise = null;\n}\n\nconst sessionIdKey = () => `${getConfig().storagePrefix}-funnel-session`;\n\n/**\n * Stable id for this survey session, minted on first use and kept in\n * sessionStorage — a refresh continues the same session (matching the survey\n * draft's resume behavior); a new tab or browser session starts a new one.\n */\nexport function funnelSessionId(): string {\n let id: string | null = null;\n try {\n id = sessionStorage.getItem(sessionIdKey());\n } catch {\n /* storage unavailable (private mode) — fall through to ephemeral id */\n }\n if (!id) {\n id =\n typeof crypto !== 'undefined' && 'randomUUID' in crypto\n ? crypto.randomUUID()\n : `${Date.now()}-${Math.random().toString(36).slice(2)}`;\n try {\n sessionStorage.setItem(sessionIdKey(), id);\n } catch {\n /* ephemeral it is */\n }\n }\n return id;\n}\n\n/**\n * The current survey session id, or null — WITHOUT minting one.\n *\n * `funnelSessionId()` creates an id on first read, which is right for the\n * survey (asking means a survey is starting) and wrong for anything else. Cart\n * capture uses this to say \"if this shopper also has a survey session, here it\n * is\" — letting the backend borrow the email the gate already collected —\n * without conjuring survey sessions on a storefront that never runs one.\n */\nexport function peekFunnelSessionId(): string | null {\n try {\n return sessionStorage.getItem(sessionIdKey());\n } catch {\n return null;\n }\n}\n\n/**\n * The member's access token, when this browser has one.\n *\n * Read raw and never refreshed: these are fire-and-forget telemetry posts, and\n * a token refresh is a real network round-trip on the unload path. An expired\n * token is not a failure either — the sinks take it with `optionalAuth`, so a\n * stale one simply reads as an anonymous visitor, which is what we had before.\n */\nexport function captureAuthHeader(): Record<string, string> {\n try {\n const token = getTokens()?.accessToken;\n return token ? { Authorization: `Bearer ${token}` } : {};\n } catch {\n return {};\n }\n}\n\n/**\n * Fire-and-forget event post. `keepalive` lets the request survive a page\n * unload — which is exactly when the `abandoned` event is sent. (This is why\n * it's `fetch` and not `navigator.sendBeacon`: beacons can't carry the\n * X-Tenant-Key header the tenant-scoped mount requires — nor the bearer token\n * below.)\n *\n * The token identifies a signed-in member to the sink. Without it a member's\n * session is stored anonymously, and the pre-survey email gate — the only\n * other writer of a session's identity — is deliberately never shown to\n * someone already signed in, so their drop-off could never be attributed to\n * them. That is the whole population of a site where the account is created\n * before the questionnaire (savings-program signups, returning members\n * starting a second intake).\n */\nexport function postFunnelEvent(type: string, data?: Record<string, unknown>): void {\n try {\n const cfg = getConfig();\n void fetch(`${cfg.apiBase}/funnel/events`, {\n method: 'POST',\n keepalive: true,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Tenant-Key': cfg.tenantKey,\n ...captureAuthHeader(),\n },\n body: JSON.stringify({ sessionId: funnelSessionId(), type, data }),\n }).catch(() => {});\n } catch {\n /* not configured yet — drop */\n }\n}\n\n// ── Survey drafts (cross-device resume) ─────────────────────────────────────\n\nexport interface FunnelDraftPayload {\n answers: Array<{ questionId: string; value: unknown }>;\n stepIndex: number;\n}\n\n/**\n * Save in-progress answers to Apex (through the-backend's embed proxy) and\n * return the draft id, so the next save updates the same row.\n *\n * Answers travel to the CLINICAL system — the partner backend stores only the\n * returned pointer. Returns null on any failure: a draft is best-effort, and\n * losing one costs a retype, never correctness.\n */\nexport async function saveFunnelDraft(\n draft: FunnelDraftPayload & { draftId?: string; drugIds?: string[]; templateId?: string; mode?: string },\n): Promise<string | null> {\n try {\n const cfg = getConfig();\n if (!cfg.apexEmbedApiBase) return null;\n const res = await fetch(`${cfg.apexEmbedApiBase}/v2/embed/surveys/drafts`, {\n method: 'PUT',\n headers: { 'Content-Type': 'application/json', 'X-Tenant-Key': cfg.tenantKey },\n body: JSON.stringify(draft),\n });\n if (!res.ok) return null;\n const body = (await res.json()) as { draftId?: string };\n return body.draftId ?? null;\n } catch {\n return null;\n }\n}\n\nexport interface ResumedDraft extends FunnelDraftPayload {\n sessionId: string;\n draftId: string;\n}\n\n/**\n * Exchange an emailed resume token for the saved answers.\n *\n * The token is the ONLY thing authorizing this read — the-backend verifies its\n * HMAC before fetching from Apex with credentials the browser never sees. A\n * 404 (expired, already submitted, tampered) resolves to null so the caller\n * simply starts a fresh survey.\n */\nexport async function fetchResumedDraft(token: string): Promise<ResumedDraft | null> {\n try {\n const cfg = getConfig();\n const res = await fetch(`${cfg.apiBase}/funnel/resume?token=${encodeURIComponent(token)}`, {\n headers: { 'X-Tenant-Key': cfg.tenantKey },\n });\n if (!res.ok) return null;\n const body = (await res.json()) as Partial<ResumedDraft>;\n if (!body.draftId || !Array.isArray(body.answers)) return null;\n return {\n sessionId: String(body.sessionId ?? ''),\n draftId: body.draftId,\n answers: body.answers,\n stepIndex: typeof body.stepIndex === 'number' ? body.stepIndex : 0,\n };\n } catch {\n return null;\n }\n}\n\n/** Read the `?resume=` token from the current URL. */\nexport function readResumeToken(): string | null {\n try {\n const token = new URLSearchParams(window.location.search).get('resume');\n return token && token.length > 0 ? token : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Drop `?resume=` from the address bar once it has been redeemed.\n *\n * This token authorizes a read of someone's clinical answers, so leaving it in\n * the address bar is worse than leaving the cart's there: it gets bookmarked,\n * pasted into a support chat, or captured by whatever the patient's browser\n * syncs. The answers are mirrored into local storage on redemption, so a\n * refresh resumes from this device without it. History is replaced, not\n * pushed — the token was never a page.\n */\nexport function stripResumeToken(): void {\n try {\n const url = new URL(window.location.href);\n if (!url.searchParams.has('resume')) return;\n url.searchParams.delete('resume');\n window.history.replaceState({}, '', url.toString());\n } catch {\n /* no history API — leaving the param is harmless */\n }\n}\n","import { getConfig } from '../config';\n\n// ── Customer text-message config ────────────────────────────────────────────\n//\n// Thin client for the-backend's tenant-level SMS posture:\n// GET /config/sms → whether this tenant texts customers at all, and the exact\n// consent wording (and its version) to show beside the box\n//\n// Sibling of ./cart and ./funnel, and the same posture: unauthenticated, cached\n// once per page load, fail-closed. Unlike those two it gates something a person\n// is asked to AGREE to, so \"any doubt\" reads as \"off\" — a consent box with no\n// wording to show must never render.\n\nexport interface SmsConfig {\n /** Tenant texts customers (feature on, number registered, switched on). false = show nothing. */\n enabled: boolean;\n /** The sender the consent wording names, e.g. \"Acme Health\". */\n brandName?: string;\n /** The consent wording, verbatim. Never reword it: what the person saw is what the record holds. */\n consentText?: string;\n /** Identifies `consentText`; sent back with a grant so the server knows which words were shown. */\n consentTextVersion?: string;\n termsUrl?: string;\n privacyUrl?: string;\n}\n\nconst DISABLED: SmsConfig = { enabled: false };\n\nconst str = (v: unknown): string | undefined => (typeof v === 'string' && v.trim() ? v : undefined);\n\nlet configPromise: Promise<SmsConfig> | null = null;\n\n/**\n * The tenant's text-message posture, fetched once per page load and cached.\n * Fails closed: any error — and an \"enabled\" reply that arrives without the\n * wording or its version — reads as \"off\".\n */\nexport function fetchSmsConfig(): Promise<SmsConfig> {\n if (!configPromise) {\n configPromise = (async () => {\n try {\n const cfg = getConfig();\n const res = await fetch(`${cfg.apiBase}/config/sms`, {\n headers: { 'X-Tenant-Key': cfg.tenantKey },\n });\n if (!res.ok) return DISABLED;\n const body = (await res.json()) as Partial<Record<keyof SmsConfig, unknown>>;\n const consentText = str(body.consentText);\n const consentTextVersion = str(body.consentTextVersion);\n if (body.enabled !== true || !consentText || !consentTextVersion) return DISABLED;\n return {\n enabled: true,\n brandName: str(body.brandName),\n consentText,\n consentTextVersion,\n termsUrl: str(body.termsUrl),\n privacyUrl: str(body.privacyUrl),\n };\n } catch {\n return DISABLED;\n }\n })();\n }\n return configPromise;\n}\n\n/** Test seam: forget the cached config so the next fetch re-resolves. */\nexport function resetSmsConfigCache(): void {\n configPromise = null;\n}\n"]}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=XZVVZIRZ.js.map
3
+ //# sourceMappingURL=XZVVZIRZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"XZVVZIRZ.js"}
@@ -8,8 +8,9 @@ import {
8
8
  readPromoCode,
9
9
  resetCartId,
10
10
  stripCartToken
11
- } from "./33BDC6MT.jsx";
11
+ } from "./MVWCKLRH.jsx";
12
12
  import {
13
+ PHONE_ERROR,
13
14
  bestOfferDiscount,
14
15
  catalogUnavailableMessage,
15
16
  firstAddressError,
@@ -17,16 +18,18 @@ import {
17
18
  formatCvv,
18
19
  formatExpiry,
19
20
  isLive,
21
+ isValidUsPhone,
20
22
  offerBeatsPromo,
21
23
  useAddressPair,
22
24
  useCardTokenizer,
23
25
  useCatalogAvailability,
26
+ useSmsConsent,
24
27
  validateAddress
25
- } from "./OZHJ5IGL.jsx";
28
+ } from "./HEXXZYK4.jsx";
26
29
  import {
27
30
  auth_default,
28
31
  cart_default
29
- } from "./ZWAZNB4Y.jsx";
32
+ } from "./HSBATWVL.jsx";
30
33
  import {
31
34
  ApiError,
32
35
  newIdempotencyKey,
@@ -34,7 +37,7 @@ import {
34
37
  promoCodesApi,
35
38
  subscriptionsApi,
36
39
  usersApi
37
- } from "./X6WJQ47H.jsx";
40
+ } from "./PZ4BRSEK.jsx";
38
41
  import {
39
42
  getConfig
40
43
  } from "./QVZ7BRNO.jsx";
@@ -88,6 +91,7 @@ function useSubscriptionIntakeFlow(options) {
88
91
  const [password, setPassword] = createSignal("");
89
92
  const [dateOfBirth, setDateOfBirth] = createSignal(restored.dateOfBirth ?? "");
90
93
  const [phone, setPhone] = createSignal(restored.phone ?? "");
94
+ const smsConsent = useSmsConsent(phone, restored.smsConsentVersion);
91
95
  const addr = useAddressPair({
92
96
  initialShipping: {
93
97
  street: restored.street ?? "",
@@ -145,6 +149,7 @@ function useSubscriptionIntakeFlow(options) {
145
149
  city: city(),
146
150
  state: state(),
147
151
  zip: zip(),
152
+ smsConsentVersion: smsConsent.draftVersion(),
148
153
  idempotencyKey: idemKey() || void 0
149
154
  });
150
155
  });
@@ -278,6 +283,7 @@ function useSubscriptionIntakeFlow(options) {
278
283
  const age = (Date.now() - dob.getTime()) / (365.25 * 24 * 3600 * 1e3);
279
284
  if (age < 18) return "You must be at least 18 to register.";
280
285
  if (age > 120) return "Enter a valid date of birth.";
286
+ if (phone().trim() && !isValidUsPhone(phone())) return PHONE_ERROR;
281
287
  } else if (s === 1) {
282
288
  return firstAddressError(validateAddress(addr.shipping(), "", { enforceAvailability: true }));
283
289
  } else if (s === 2) {
@@ -358,6 +364,7 @@ function useSubscriptionIntakeFlow(options) {
358
364
  }
359
365
  try {
360
366
  const promo = promoApplied();
367
+ const smsGrant = smsConsent.grant();
361
368
  if (auth_default.isAuthenticated()) {
362
369
  await usersApi.updateProfile({
363
370
  firstName: firstName().trim(),
@@ -367,7 +374,11 @@ function useSubscriptionIntakeFlow(options) {
367
374
  address1: street().trim(),
368
375
  city: city().trim(),
369
376
  state: state(),
370
- zip: zip().trim()
377
+ zip: zip().trim(),
378
+ // Same PATCH as the phone, so the server applies the number first and
379
+ // the grant covers it. Alongside other fields a refused grant is a
380
+ // note in the reply, never a failed intake.
381
+ ...smsGrant ? { smsConsent: { ...smsGrant, source: "intake" } } : {}
371
382
  });
372
383
  const res = await subscriptionsApi.create({
373
384
  opaqueData: opaque,
@@ -422,7 +433,8 @@ function useSubscriptionIntakeFlow(options) {
422
433
  v2SurveyResponseId: options.surveyResult.v2SurveyResponseId,
423
434
  caseNotes: options.surveyResult.caseNotes,
424
435
  promoCode: promo?.valid ? promo.promoCode?.code : void 0,
425
- ...savingsMemberId ? { savingsMemberId } : {}
436
+ ...savingsMemberId ? { savingsMemberId } : {},
437
+ ...smsGrant ? { smsConsent: smsGrant } : {}
426
438
  }, { idempotencyKey });
427
439
  }
428
440
  clearDraft();
@@ -466,6 +478,7 @@ function useSubscriptionIntakeFlow(options) {
466
478
  setDateOfBirth,
467
479
  phone,
468
480
  setPhone,
481
+ smsConsent,
469
482
  address: addr,
470
483
  availability,
471
484
  cardNumber: cardNumberRaw,
@@ -648,4 +661,4 @@ export {
648
661
  restoreCartFromLink,
649
662
  startCartCapture
650
663
  };
651
- //# sourceMappingURL=LA6F37YV.jsx.map
664
+ //# sourceMappingURL=ZEQ5TNDM.jsx.map
@@ -29,6 +29,16 @@ interface RegisterPayload {
29
29
  state: string;
30
30
  zip: string;
31
31
  };
32
+ /**
33
+ * Opt-in to text messages, given at signup. Optional and never required: a
34
+ * consent the server can't record (text out of date, number unusable, texts
35
+ * not set up) is dropped without failing the registration. `textVersion` is
36
+ * the version of the wording the person was shown (`fetchSmsConfig()`).
37
+ */
38
+ smsConsent?: {
39
+ granted: true;
40
+ textVersion: string;
41
+ };
32
42
  }
33
43
  interface RegisterAndSubscribePayload extends RegisterPayload {
34
44
  opaqueData?: Record<string, unknown>;
@@ -161,6 +171,50 @@ interface UpdateProfilePayload {
161
171
  /** Last-entered survey vitals, persisted for cross-device carry-over. */
162
172
  heightIn?: number;
163
173
  weightLb?: number;
174
+ /**
175
+ * Grant or withdraw consent to text messages. A phone change in the same
176
+ * request is applied first, so a grant covers the NEW number. `textVersion`
177
+ * is the version of the wording shown (`fetchSmsConfig()`); required to grant.
178
+ */
179
+ smsConsent?: {
180
+ granted: boolean;
181
+ textVersion?: string;
182
+ source?: 'intake' | 'profile';
183
+ };
184
+ }
185
+ /** Outcome of a consent change sent on `PATCH /users/me`. */
186
+ type SmsConsentStatus = 'granted' | 'already_granted' | 'revoked' | 'nothing_to_revoke' | 'refused';
187
+ /** Why a grant was refused. Alongside other profile fields it comes back as
188
+ * `smsConsent.reason`; on a request that ONLY changes consent it is a 409's `reason`. */
189
+ type SmsRefusalReason = 'stale_text' | 'no_phone' | 'sms_unavailable';
190
+ interface SmsConsentResult {
191
+ status: SmsConsentStatus;
192
+ reason?: SmsRefusalReason;
193
+ }
194
+ interface UpdateProfileResponse {
195
+ user?: User;
196
+ /** Present only when the request carried `smsConsent`. */
197
+ smsConsent?: SmsConsentResult;
198
+ }
199
+ /** One text-message event the tenant switched on, as this member has it set. */
200
+ interface UserSmsEvent {
201
+ key: string;
202
+ label: string;
203
+ enabled: boolean;
204
+ }
205
+ /** The member's text-message state (`GET /users/me/sms`, and the reply to saving preferences). */
206
+ interface UserSmsState {
207
+ /** False when the tenant doesn't text customers — show nothing. */
208
+ available: boolean;
209
+ /** E.164, or null when no number is on file. */
210
+ phone: string | null;
211
+ consented: boolean;
212
+ /** The member replied STOP: a carrier-level block this site cannot lift. */
213
+ optedOutByStop: boolean;
214
+ /** The number texts come from — what the member texts START to. */
215
+ fromNumber?: string;
216
+ /** Only the events the tenant switched on. */
217
+ events: UserSmsEvent[];
164
218
  }
165
219
  interface UpdatePaymentMethodPayload {
166
220
  /** Provider-neutral tokenized card from useCardTokenizer().tokenize() (AuthNet
@@ -234,6 +288,76 @@ interface EmailNotificationSettings {
234
288
  enabledEvents: Record<string, boolean>;
235
289
  }
236
290
  /** `self_serve`: the admin switches it. `request`: the platform team turns it on when asked. */
291
+ /** Why customer texts aren't going out yet, from `GET /admin/sms/settings`. */
292
+ type AdminSmsNotReadyReason = 'feature_off' | 'not_enabled' | 'not_registered';
293
+ interface AdminSmsSettings {
294
+ /** The `sms` feature is on for this tenant (it is request-only: a number is registered with carriers first). */
295
+ feature: boolean;
296
+ /** The tenant has switched texts on. */
297
+ enabled: boolean;
298
+ /** Texts can actually go out right now. */
299
+ ready: boolean;
300
+ /** Present when `ready` is false. */
301
+ notReadyReason?: AdminSmsNotReadyReason;
302
+ fromNumber: string | null;
303
+ brandName: string;
304
+ termsUrl: string | null;
305
+ privacyUrl: string | null;
306
+ }
307
+ /** How a message splits into SMS segments (computed by the backend; the editor mirrors it live). */
308
+ interface AdminSmsSegmentInfo {
309
+ encoding: 'GSM-7' | 'UCS-2';
310
+ /** Characters counted the way the encoding counts them (GSM extension characters are 2). */
311
+ units: number;
312
+ segments: number;
313
+ }
314
+ interface AdminSmsTemplate {
315
+ key: string;
316
+ label: string;
317
+ enabled: boolean;
318
+ body: string;
319
+ defaultBody: string;
320
+ /** `body` differs from `defaultBody`. */
321
+ customized: boolean;
322
+ /** The only `{{tokens}}` this event's body may use. */
323
+ tokens: string[];
324
+ /** `body` rendered with sample values. */
325
+ preview: string;
326
+ segments: AdminSmsSegmentInfo;
327
+ }
328
+ /**
329
+ * One event's change on `PUT /admin/sms/templates`. A value sets it, `null`
330
+ * resets it to the default, and leaving a field out keeps it as it is.
331
+ */
332
+ interface AdminSmsTemplateChange {
333
+ enabled?: boolean | null;
334
+ body?: string | null;
335
+ }
336
+ /** `null` resets the whole event (both fields) to its defaults. */
337
+ type AdminSmsTemplateChanges = Record<string, AdminSmsTemplateChange | null>;
338
+ type AdminSmsTestStatus = 'sent' | 'mock' | 'failed' | 'blocked' | 'not_sent';
339
+ interface AdminSmsTestResult {
340
+ status: AdminSmsTestStatus;
341
+ error?: string;
342
+ reason?: string;
343
+ }
344
+ interface AdminSmsMessage {
345
+ id: string;
346
+ /** The recipient, masked. */
347
+ to: string;
348
+ templateKey: string;
349
+ status: string;
350
+ error: string | null;
351
+ createdAt: string;
352
+ deliveredAt: string | null;
353
+ }
354
+ interface AdminSmsMessagesParams {
355
+ status?: string;
356
+ /** The previous page's `nextBefore`. */
357
+ before?: string;
358
+ limit?: number;
359
+ [key: string]: unknown;
360
+ }
237
361
  type TenantFeatureAccess = 'self_serve' | 'request';
238
362
  /** One optional feature of the tenant, as the backend describes it. */
239
363
  interface TenantFeature {
@@ -526,12 +650,16 @@ declare class ApiError extends Error {
526
650
  /** The response body's `details`, untouched, for the few refusals whose
527
651
  * specifics a caller acts on (e.g. which prices are missing). Never shown as prose. */
528
652
  readonly details?: unknown;
653
+ /** The response body's `reason`, when the endpoint names why it refused (e.g.
654
+ * `stale_text` on a text-message consent). Branch on this, never on message. */
655
+ readonly reason?: string;
529
656
  constructor(message: string, opts?: {
530
657
  status?: number;
531
658
  ambiguous?: boolean;
532
659
  cause?: unknown;
533
660
  code?: string;
534
661
  details?: unknown;
662
+ reason?: string;
535
663
  });
536
664
  }
537
665
  /**
@@ -1066,7 +1194,10 @@ declare const usersApi: {
1066
1194
  getProfile(opts?: {
1067
1195
  authToken?: string;
1068
1196
  }): Promise<ApiResponse<User>>;
1069
- updateProfile(payload: UpdateProfilePayload): Promise<unknown>;
1197
+ updateProfile(payload: UpdateProfilePayload): Promise<UpdateProfileResponse>;
1198
+ getSmsState(): Promise<UserSmsState>;
1199
+ /** Only the named events change; the reply is the full state again. */
1200
+ setSmsEvents(events: Record<string, boolean>): Promise<UserSmsState>;
1070
1201
  };
1071
1202
  type MemberSurveyMode = 'initial' | 'refill';
1072
1203
  /** List entry for a member's own submitted surveys — served from the backend's
@@ -1130,6 +1261,24 @@ interface AdminDashboardStats {
1130
1261
  totalRevenueCents: number;
1131
1262
  failedPayments30d: number;
1132
1263
  }
1264
+ /** One day of the billing forecast. */
1265
+ interface AdminBillingForecastDay {
1266
+ /** YYYY-MM-DD in the forecast's time zone. */
1267
+ date: string;
1268
+ amountCents: number;
1269
+ charges: number;
1270
+ }
1271
+ /** What the billing engine is set to charge on each coming day. */
1272
+ interface AdminBillingForecast {
1273
+ timeZone: string;
1274
+ from: string;
1275
+ to: string;
1276
+ days: AdminBillingForecastDay[];
1277
+ totalCents: number;
1278
+ totalCharges: number;
1279
+ /** Live subscriptions with nothing scheduled to project from. */
1280
+ unscheduled: number;
1281
+ }
1133
1282
  /** One price point in the recurring-revenue breakdown: everyone on the same
1134
1283
  * charge amount and billing cycle. */
1135
1284
  interface AdminRecurringPricePoint {
@@ -2213,6 +2362,11 @@ interface AdminInviteResult {
2213
2362
  declare const adminApi: {
2214
2363
  getDashboard(): Promise<AdminDashboardStats>;
2215
2364
  getRecurringRevenue(): Promise<AdminRecurringRevenue>;
2365
+ /**
2366
+ * Charges due on each of the next `days` days (1–92, default 31), bucketed by
2367
+ * calendar day in `timeZone` (an IANA zone; default the browser's).
2368
+ */
2369
+ getBillingForecast(days?: number, timeZone?: string): Promise<AdminBillingForecast>;
2216
2370
  getCustomers(params?: AdminCustomerListParams & AdminListParams): Promise<{
2217
2371
  customers: AdminCustomerRow[];
2218
2372
  hasMore: boolean;
@@ -2383,6 +2537,28 @@ declare const adminApi: {
2383
2537
  emailed: boolean;
2384
2538
  alreadyRequested: boolean;
2385
2539
  }>;
2540
+ /** Is this site set up to text customers, and from what number. Needs `settings.write`. */
2541
+ getSmsSettings(): Promise<AdminSmsSettings>;
2542
+ /** Every event's text, as saved. Needs `emailTemplates.write`. */
2543
+ getSmsTemplates(): Promise<{
2544
+ templates: AdminSmsTemplate[];
2545
+ }>;
2546
+ /**
2547
+ * Change some events' texts. Send ONLY what changed: a missing event or field
2548
+ * is kept, `null` resets to the default. Rejects (400) with the server's
2549
+ * reason when a body doesn't start with `{{siteName}}`, runs past 300
2550
+ * characters, or uses a token the event doesn't have. Returns the full list.
2551
+ */
2552
+ saveSmsTemplates(templates: AdminSmsTemplateChanges): Promise<{
2553
+ templates: AdminSmsTemplate[];
2554
+ }>;
2555
+ /** Text the SAVED version of an event to the signed-in admin's own phone. */
2556
+ sendSmsTemplateTest(key: string): Promise<AdminSmsTestResult>;
2557
+ /** The send log, newest first. Needs `patient.support`. Page with `nextBefore`. */
2558
+ listSmsMessages(params?: AdminSmsMessagesParams): Promise<{
2559
+ messages: AdminSmsMessage[];
2560
+ nextBefore: string | null;
2561
+ }>;
2386
2562
  getEmailNotifications(): Promise<EmailNotificationSettings>;
2387
2563
  saveEmailNotifications(settings: EmailNotificationSettings): Promise<{
2388
2564
  success: boolean;
@@ -3024,4 +3200,4 @@ declare const affiliatePortalApi: {
3024
3200
  track(refCode: string, landingPage?: string): Promise<AffiliateTrackResponse>;
3025
3201
  };
3026
3202
 
3027
- export { type AdminRecurringPricePoint as $, ADMIN_ROLES as A, type AdminCustomerSupport as B, type AdminCustomerSupportThread as C, type AdminDashboardStats as D, type AdminFillAnchor as E, type AdminFillSchedule as F, type AdminInviteResult as G, type AdminLifecycle as H, type AdminLifecycleBucket as I, type AdminListParams as J, type AdminMe as K, type AdminOffer as L, type AdminOfferBase as M, type AdminOfferGrant as N, type AdminOfferGrantBase as O, type AdminOfferInput as P, type AdminOrderSummary as Q, type AdminOrphanReason as R, type AdminOrphanedDosePrice as S, type AdminPayment as T, type AdminPaymentDetail as U, type AdminProduct as V, type AdminProductOverlayField as W, type AdminProductPharmacy as X, type AdminProductStrength as Y, type AdminPromoCode as Z, type AdminPromoCodeInput as _, type AddPharmacyBody as a, type CatalogDoseSuggestion as a$, type AdminRecurringRevenue as a0, type AdminRefundResult as a1, type AdminRetimeFillBody as a2, type AdminRetimeFillResult as a3, type AdminRetimeSnapshot as a4, type AdminRole as a5, type AdminSale as a6, type AdminSaleInput as a7, type AdminScheduledRefund as a8, type AdminScheduledRefundProblem as a9, type AffiliateTrackResponse as aA, ApiError as aB, type ApiResponse as aC, type AttributionMethod as aD, type AuthTokens as aE, type BillingReminderSettings as aF, type CatalogAvailabilityItem as aG, type CatalogAvailabilityReason as aH, type CatalogAvailabilityResult as aI, type CatalogClassification as aJ, type CatalogConversionChoice as aK, type CatalogConversionCommitResult as aL, type CatalogConversionDose as aM, type CatalogConversionDoseMatch as aN, type CatalogConversionFinding as aO, type CatalogConversionPointers as aP, type CatalogConversionPrepareResult as aQ, type CatalogConversionPreview as aR, type CatalogConversionRun as aS, type CatalogConversionSource as aT, type CatalogConversionStage as aU, type CatalogConversionTarget as aV, type CatalogConversionUndoOptions as aW, type CatalogConversionUndoResult as aX, type CatalogDose as aY, type CatalogDoseInput as aZ, type CatalogDoseModel as a_, type AdminSubscription as aa, type AdminSubscriptionDetail as ab, type AdminSubscriptionPatch as ac, type AdminSubscriptionWriteResult as ad, type AdminSupportCustomer as ae, type AdminSupportStats as af, type AdminSupportThread as ag, type AdminTeamInvite as ah, type AdminTeamMember as ai, type AdminWebhookEvent as aj, type Affiliate as ak, type AffiliateAuthTokens as al, type AffiliateClickRecord as am, type AffiliateConversion as an, type AffiliateDashboardLinks as ao, type AffiliateDashboardProfile as ap, type AffiliateDashboardStats as aq, type AffiliateDownlineMember as ar, type AffiliateEarningsBreakdown as as, type AffiliatePaymentMethod as at, type AffiliateProgram as au, type AffiliateRegisterInput as av, type AffiliateRegisterResponse as aw, type AffiliateSession as ax, type AffiliateStatsResponse as ay, type AffiliateStatus as az, type AddPharmacyDoseMatch as b, type SupportChannel as b$, type CatalogDoseSuggestions as b0, type CatalogEquivalentSuggestions as b1, type CatalogFulfillment as b2, type CatalogFulfillmentInput as b3, type CatalogItem as b4, type CatalogItemInput as b5, type CatalogMappableDrug as b6, type CatalogMatrixCell as b7, type CatalogProduct as b8, type CatalogReadiness as b9, type MemberSurveyTranscriptSection as bA, type MembersMeResponse as bB, type OfferGrantState as bC, type Order as bD, type OrderItemInput as bE, type PaginationParams as bF, type PaymentCallbackPayload as bG, type PaymentInitiatePayload as bH, type PaymentType as bI, type PendingRenewalSurvey as bJ, type Placeholder as bK, type PlaceholderKind as bL, type ProductSaleSummary as bM, type PromoValidationResponse as bN, type PublicCategory as bO, type RegisterAndSubscribePayload as bP, type RegisterPayload as bQ, type RenewalStatus as bR, SUPPORT_ATTACHMENT_MAX_BYTES as bS, SUPPORT_ATTACHMENT_MIME_TYPES as bT, type SelectDrugPayload as bU, type SendMessagePayload as bV, type SendToPharmacyPayload as bW, type SubscriptionPreview as bX, type SubscriptionPreviewLine as bY, type SubscriptionPreviewPayload as bZ, type SupportAttachment as b_, type CategoryMetadata as ba, type CheckoutAddress as bb, type CheckoutPayload as bc, type CheckoutResult as bd, type CommissionConfig as be, type CommissionStatus as bf, type CompleteSurveyPayload as bg, type CreateAffiliatePayload as bh, type CreateAffiliateProgramPayload as bi, type CreateOrderPayload as bj, type CreateRequestPayload as bk, type CreateSubscriptionPayload as bl, type CustomTemplate as bm, type CustomTemplateInput as bn, type CustomerDiscountConfig as bo, type DeliveryInfo as bp, type DiscountType as bq, type EmailNotificationSettings as br, type EmailTemplatesMap as bs, type LoginPayload as bt, type MemberOffer as bu, type MemberPrescriptionRequest as bv, type MemberSurveyMode as bw, type MemberSurveyResponseSummary as bx, type MemberSurveyTranscript as by, type MemberSurveyTranscriptItem as bz, type AddPharmacyDoseOption as c, type SupportChannelSettings as c0, type SupportMessage as c1, type SupportRealtimeToken as c2, type SupportThread as c3, type SupportThreadCategory as c4, type SupportThreadStatus as c5, type SurveySubmitPayload as c6, type TemplatePlaceholdersMap as c7, type TemplateText as c8, type TenantFeature as c9, newIdempotencyKey as cA, offersApi as cB, onTokensCleared as cC, ordersApi as cD, paymentsApi as cE, productsApi as cF, promoCodesApi as cG, setAffiliateTokens as cH, setTokens as cI, subscriptionsApi as cJ, supportApi as cK, usersApi as cL, type TenantFeatureAccess as ca, type TokenTrackName as cb, type UpdateAffiliatePayload as cc, type UpdateAffiliateProgramPayload as cd, type UpdatePaymentMethodPayload as ce, type UpdateProfilePayload as cf, type User as cg, addressesApi as ch, adminAffiliatesApi as ci, adminApi as cj, adminCatalogApi as ck, adminCatalogConversionApi as cl, adminProductPharmaciesApi as cm, affiliateAuthStorageKey as cn, affiliatePortalApi as co, apexApi as cp, apiFetch as cq, authApi as cr, authStorageKey as cs, catalogApi as ct, clearAffiliateTokens as cu, clearTokens as cv, getAffiliateTokens as cw, getTokens as cx, membersApi as cy, messagesApi as cz, type AddPharmacyFinding as d, type AddPharmacyMatchQuestion as e, type AddPharmacyMatchSource as f, type AddPharmacyPlan as g, type AddPharmacyPrice as h, type AddPharmacyResult as i, type AddPharmacyStrengthAfter as j, type AddPharmacyStrengthBefore as k, type AddressVerifyResult as l, type AdminApexDrug as m, type AdminApexItemStatus as n, type AdminBillingAttempt as o, type AdminCategory as p, type AdminCategoryInput as q, type AdminCategoryUpdate as r, type AdminCustomer as s, type AdminCustomerFacts as t, type AdminCustomerFunnel as u, type AdminCustomerListParams as v, type AdminCustomerOverview as w, type AdminCustomerProfile as x, type AdminCustomerRequest as y, type AdminCustomerRow as z };
3203
+ export { type AdminPromoCode as $, ADMIN_ROLES as A, type AdminCustomerRequest as B, type AdminCustomerRow as C, type AdminCustomerSupport as D, type AdminCustomerSupportThread as E, type AdminDashboardStats as F, type AdminFillAnchor as G, type AdminFillSchedule as H, type AdminInviteResult as I, type AdminLifecycle as J, type AdminLifecycleBucket as K, type AdminListParams as L, type AdminMe as M, type AdminOffer as N, type AdminOfferBase as O, type AdminOfferGrant as P, type AdminOfferGrantBase as Q, type AdminOfferInput as R, type AdminOrderSummary as S, type AdminOrphanReason as T, type AdminOrphanedDosePrice as U, type AdminPayment as V, type AdminPaymentDetail as W, type AdminProduct as X, type AdminProductOverlayField as Y, type AdminProductPharmacy as Z, type AdminProductStrength as _, type AddPharmacyBody as a, type CatalogConversionPointers as a$, type AdminPromoCodeInput as a0, type AdminRecurringPricePoint as a1, type AdminRecurringRevenue as a2, type AdminRefundResult as a3, type AdminRetimeFillBody as a4, type AdminRetimeFillResult as a5, type AdminRetimeSnapshot as a6, type AdminRole as a7, type AdminSale as a8, type AdminSaleInput as a9, type AffiliateDashboardLinks as aA, type AffiliateDashboardProfile as aB, type AffiliateDashboardStats as aC, type AffiliateDownlineMember as aD, type AffiliateEarningsBreakdown as aE, type AffiliatePaymentMethod as aF, type AffiliateProgram as aG, type AffiliateRegisterInput as aH, type AffiliateRegisterResponse as aI, type AffiliateSession as aJ, type AffiliateStatsResponse as aK, type AffiliateStatus as aL, type AffiliateTrackResponse as aM, ApiError as aN, type ApiResponse as aO, type AttributionMethod as aP, type AuthTokens as aQ, type BillingReminderSettings as aR, type CatalogAvailabilityItem as aS, type CatalogAvailabilityReason as aT, type CatalogAvailabilityResult as aU, type CatalogClassification as aV, type CatalogConversionChoice as aW, type CatalogConversionCommitResult as aX, type CatalogConversionDose as aY, type CatalogConversionDoseMatch as aZ, type CatalogConversionFinding as a_, type AdminScheduledRefund as aa, type AdminScheduledRefundProblem as ab, type AdminSmsMessage as ac, type AdminSmsMessagesParams as ad, type AdminSmsNotReadyReason as ae, type AdminSmsSegmentInfo as af, type AdminSmsSettings as ag, type AdminSmsTemplate as ah, type AdminSmsTemplateChange as ai, type AdminSmsTemplateChanges as aj, type AdminSmsTestResult as ak, type AdminSmsTestStatus as al, type AdminSubscription as am, type AdminSubscriptionDetail as an, type AdminSubscriptionPatch as ao, type AdminSubscriptionWriteResult as ap, type AdminSupportCustomer as aq, type AdminSupportStats as ar, type AdminSupportThread as as, type AdminTeamInvite as at, type AdminTeamMember as au, type AdminWebhookEvent as av, type Affiliate as aw, type AffiliateAuthTokens as ax, type AffiliateClickRecord as ay, type AffiliateConversion as az, type AddPharmacyDoseMatch as b, type RegisterAndSubscribePayload as b$, type CatalogConversionPrepareResult as b0, type CatalogConversionPreview as b1, type CatalogConversionRun as b2, type CatalogConversionSource as b3, type CatalogConversionStage as b4, type CatalogConversionTarget as b5, type CatalogConversionUndoOptions as b6, type CatalogConversionUndoResult as b7, type CatalogDose as b8, type CatalogDoseInput as b9, type CustomerDiscountConfig as bA, type DeliveryInfo as bB, type DiscountType as bC, type EmailNotificationSettings as bD, type EmailTemplatesMap as bE, type LoginPayload as bF, type MemberOffer as bG, type MemberPrescriptionRequest as bH, type MemberSurveyMode as bI, type MemberSurveyResponseSummary as bJ, type MemberSurveyTranscript as bK, type MemberSurveyTranscriptItem as bL, type MemberSurveyTranscriptSection as bM, type MembersMeResponse as bN, type OfferGrantState as bO, type Order as bP, type OrderItemInput as bQ, type PaginationParams as bR, type PaymentCallbackPayload as bS, type PaymentInitiatePayload as bT, type PaymentType as bU, type PendingRenewalSurvey as bV, type Placeholder as bW, type PlaceholderKind as bX, type ProductSaleSummary as bY, type PromoValidationResponse as bZ, type PublicCategory as b_, type CatalogDoseModel as ba, type CatalogDoseSuggestion as bb, type CatalogDoseSuggestions as bc, type CatalogEquivalentSuggestions as bd, type CatalogFulfillment as be, type CatalogFulfillmentInput as bf, type CatalogItem as bg, type CatalogItemInput as bh, type CatalogMappableDrug as bi, type CatalogMatrixCell as bj, type CatalogProduct as bk, type CatalogReadiness as bl, type CategoryMetadata as bm, type CheckoutAddress as bn, type CheckoutPayload as bo, type CheckoutResult as bp, type CommissionConfig as bq, type CommissionStatus as br, type CompleteSurveyPayload as bs, type CreateAffiliatePayload as bt, type CreateAffiliateProgramPayload as bu, type CreateOrderPayload as bv, type CreateRequestPayload as bw, type CreateSubscriptionPayload as bx, type CustomTemplate as by, type CustomTemplateInput as bz, type AddPharmacyDoseOption as c, subscriptionsApi as c$, type RegisterPayload as c0, type RenewalStatus as c1, SUPPORT_ATTACHMENT_MAX_BYTES as c2, SUPPORT_ATTACHMENT_MIME_TYPES as c3, type SelectDrugPayload as c4, type SendMessagePayload as c5, type SendToPharmacyPayload as c6, type SmsConsentResult as c7, type SmsConsentStatus as c8, type SmsRefusalReason as c9, adminAffiliatesApi as cA, adminApi as cB, adminCatalogApi as cC, adminCatalogConversionApi as cD, adminProductPharmaciesApi as cE, affiliateAuthStorageKey as cF, affiliatePortalApi as cG, apexApi as cH, apiFetch as cI, authApi as cJ, authStorageKey as cK, catalogApi as cL, clearAffiliateTokens as cM, clearTokens as cN, getAffiliateTokens as cO, getTokens as cP, membersApi as cQ, messagesApi as cR, newIdempotencyKey as cS, offersApi as cT, onTokensCleared as cU, ordersApi as cV, paymentsApi as cW, productsApi as cX, promoCodesApi as cY, setAffiliateTokens as cZ, setTokens as c_, type SubscriptionPreview as ca, type SubscriptionPreviewLine as cb, type SubscriptionPreviewPayload as cc, type SupportAttachment as cd, type SupportChannel as ce, type SupportChannelSettings as cf, type SupportMessage as cg, type SupportRealtimeToken as ch, type SupportThread as ci, type SupportThreadCategory as cj, type SupportThreadStatus as ck, type SurveySubmitPayload as cl, type TemplatePlaceholdersMap as cm, type TemplateText as cn, type TenantFeature as co, type TenantFeatureAccess as cp, type TokenTrackName as cq, type UpdateAffiliatePayload as cr, type UpdateAffiliateProgramPayload as cs, type UpdatePaymentMethodPayload as ct, type UpdateProfilePayload as cu, type UpdateProfileResponse as cv, type User as cw, type UserSmsEvent as cx, type UserSmsState as cy, addressesApi as cz, type AddPharmacyFinding as d, supportApi as d0, usersApi as d1, type AddPharmacyMatchQuestion as e, type AddPharmacyMatchSource as f, type AddPharmacyPlan as g, type AddPharmacyPrice as h, type AddPharmacyResult as i, type AddPharmacyStrengthAfter as j, type AddPharmacyStrengthBefore as k, type AddressVerifyResult as l, type AdminApexDrug as m, type AdminApexItemStatus as n, type AdminBillingAttempt as o, type AdminBillingForecast as p, type AdminBillingForecastDay as q, type AdminCategory as r, type AdminCategoryInput as s, type AdminCategoryUpdate as t, type AdminCustomer as u, type AdminCustomerFacts as v, type AdminCustomerFunnel as w, type AdminCustomerListParams as x, type AdminCustomerOverview as y, type AdminCustomerProfile as z };