@apextelemed/partner-core 0.1.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 (114) hide show
  1. package/LICENSE +64 -0
  2. package/README.md +363 -0
  3. package/dist/api/index.d.ts +12 -0
  4. package/dist/api/index.js +8 -0
  5. package/dist/api/index.js.map +1 -0
  6. package/dist/api/index.jsx +127 -0
  7. package/dist/cart-CBH8Em8f.d.ts +189 -0
  8. package/dist/cart-D4mVX_zx.d.ts +66 -0
  9. package/dist/chunk/2OXI5TKO.jsx +249 -0
  10. package/dist/chunk/3A3MF7R2.jsx +1 -0
  11. package/dist/chunk/3VEOP7TZ.jsx +16679 -0
  12. package/dist/chunk/5XGPFYIJ.js +26 -0
  13. package/dist/chunk/5XGPFYIJ.js.map +1 -0
  14. package/dist/chunk/67KHO66G.js +26 -0
  15. package/dist/chunk/67KHO66G.js.map +1 -0
  16. package/dist/chunk/6TFBQECC.jsx +135 -0
  17. package/dist/chunk/AN3WPMEP.js +3 -0
  18. package/dist/chunk/AN3WPMEP.js.map +1 -0
  19. package/dist/chunk/DHII7L5Y.js +686 -0
  20. package/dist/chunk/DHII7L5Y.js.map +1 -0
  21. package/dist/chunk/DS4E7FAI.js +132 -0
  22. package/dist/chunk/DS4E7FAI.js.map +1 -0
  23. package/dist/chunk/DY5BJ6UG.js +1195 -0
  24. package/dist/chunk/DY5BJ6UG.js.map +1 -0
  25. package/dist/chunk/E7722UPF.js +378 -0
  26. package/dist/chunk/E7722UPF.js.map +1 -0
  27. package/dist/chunk/HLXKWRRW.js +16774 -0
  28. package/dist/chunk/HLXKWRRW.js.map +1 -0
  29. package/dist/chunk/I46Y2J5W.jsx +144 -0
  30. package/dist/chunk/J63XPQP4.jsx +21 -0
  31. package/dist/chunk/J6KNY37T.js +122 -0
  32. package/dist/chunk/J6KNY37T.js.map +1 -0
  33. package/dist/chunk/KNTZTYXE.jsx +3315 -0
  34. package/dist/chunk/KZZSQ7LP.jsx +409 -0
  35. package/dist/chunk/L46OKCKG.jsx +733 -0
  36. package/dist/chunk/LDZIUFDM.jsx +31 -0
  37. package/dist/chunk/LZWA44KD.js +3 -0
  38. package/dist/chunk/LZWA44KD.js.map +1 -0
  39. package/dist/chunk/NVRAOAVV.js +3 -0
  40. package/dist/chunk/NVRAOAVV.js.map +1 -0
  41. package/dist/chunk/O3QK7YZR.jsx +1 -0
  42. package/dist/chunk/UZCST66N.jsx +21 -0
  43. package/dist/chunk/V42CGY2S.jsx +1229 -0
  44. package/dist/chunk/YJEHCCLY.js +467 -0
  45. package/dist/chunk/YJEHCCLY.js.map +1 -0
  46. package/dist/chunk/ZMOG2IIC.js +3194 -0
  47. package/dist/chunk/ZMOG2IIC.js.map +1 -0
  48. package/dist/client-BzSg2DEK.d.ts +1539 -0
  49. package/dist/config/index.d.ts +55 -0
  50. package/dist/config/index.js +3 -0
  51. package/dist/config/index.js.map +1 -0
  52. package/dist/config/index.jsx +11 -0
  53. package/dist/flows/index.d.ts +1322 -0
  54. package/dist/flows/index.js +9 -0
  55. package/dist/flows/index.js.map +1 -0
  56. package/dist/flows/index.jsx +124 -0
  57. package/dist/index/index.d.ts +71 -0
  58. package/dist/index/index.js +15 -0
  59. package/dist/index/index.js.map +1 -0
  60. package/dist/index/index.jsx +311 -0
  61. package/dist/pages/index.d.ts +617 -0
  62. package/dist/pages/index.js +10 -0
  63. package/dist/pages/index.js.map +1 -0
  64. package/dist/pages/index.jsx +50 -0
  65. package/dist/primitives/default/index.d.ts +6 -0
  66. package/dist/primitives/default/index.js +3 -0
  67. package/dist/primitives/default/index.js.map +1 -0
  68. package/dist/primitives/default/index.jsx +7 -0
  69. package/dist/primitives/index.d.ts +122 -0
  70. package/dist/primitives/index.js +3 -0
  71. package/dist/primitives/index.js.map +1 -0
  72. package/dist/primitives/index.jsx +9 -0
  73. package/dist/stores/index.d.ts +48 -0
  74. package/dist/stores/index.js +6 -0
  75. package/dist/stores/index.js.map +1 -0
  76. package/dist/stores/index.jsx +16 -0
  77. package/dist/surveyV2-BgQHK0GE.d.ts +48 -0
  78. package/dist/testing/adapter.d.ts +104 -0
  79. package/dist/testing/adapter.d.ts.map +1 -0
  80. package/dist/testing/adapter.js +14 -0
  81. package/dist/testing/adapter.js.map +1 -0
  82. package/dist/testing/env.d.ts +29 -0
  83. package/dist/testing/env.d.ts.map +1 -0
  84. package/dist/testing/env.js +42 -0
  85. package/dist/testing/env.js.map +1 -0
  86. package/dist/testing/fixtures.d.ts +70 -0
  87. package/dist/testing/fixtures.d.ts.map +1 -0
  88. package/dist/testing/fixtures.js +74 -0
  89. package/dist/testing/fixtures.js.map +1 -0
  90. package/dist/testing/index.d.ts +15 -0
  91. package/dist/testing/index.d.ts.map +1 -0
  92. package/dist/testing/index.js +14 -0
  93. package/dist/testing/index.js.map +1 -0
  94. package/dist/testing/mocks.d.ts +53 -0
  95. package/dist/testing/mocks.d.ts.map +1 -0
  96. package/dist/testing/mocks.js +90 -0
  97. package/dist/testing/mocks.js.map +1 -0
  98. package/dist/testing/seam-suite.d.ts +39 -0
  99. package/dist/testing/seam-suite.d.ts.map +1 -0
  100. package/dist/testing/seam-suite.js +196 -0
  101. package/dist/testing/seam-suite.js.map +1 -0
  102. package/dist/testing/storage.d.ts +40 -0
  103. package/dist/testing/storage.d.ts.map +1 -0
  104. package/dist/testing/storage.js +71 -0
  105. package/dist/testing/storage.js.map +1 -0
  106. package/dist/theme/admin.css +579 -0
  107. package/dist/theme/affiliate.css +191 -0
  108. package/dist/theme/flow.css +497 -0
  109. package/dist/theme/index.d.ts +84 -0
  110. package/dist/theme/index.js +94 -0
  111. package/dist/theme/index.js.map +1 -0
  112. package/dist/theme/index.jsx +97 -0
  113. package/dist/theme/member-portal.css +1762 -0
  114. package/package.json +199 -0
@@ -0,0 +1,55 @@
1
+ interface PortalConfig {
2
+ /** Base URL for backend API requests, e.g. `/api` or `https://api.example.com`. */
3
+ apiBase: string;
4
+ /** Value sent in the `X-Tenant-Key` header to identify this site to the multi-tenant backend. */
5
+ tenantKey: string;
6
+ /** Prefix for localStorage keys (auth tokens, cart, etc.). Pick something unique per site to avoid collisions when multiple sites share an origin in dev. */
7
+ storagePrefix: string;
8
+ /**
9
+ * Base URL for the Apex Telemed v2 embedded survey API. The browser hits this
10
+ * directly (no proxy) using `apexPublishableKey` + the partner's allowed-origin
11
+ * allowlist on the Apex side. Required to use `apexV2Api` / `useSurveyV2Flow`
12
+ * / `SurveyV2Page`. Example: `https://apextelemed.com/api` in prod,
13
+ * `http://localhost:8080/api` in dev.
14
+ */
15
+ apexEmbedApiBase?: string;
16
+ /** Partner's publishable key (pk_*). Safe to ship in client JS. */
17
+ apexPublishableKey?: string;
18
+ /**
19
+ * USPS codes (e.g. `['DE']`) of states this tenant cannot serve. They are
20
+ * omitted from every state dropdown fed by `stateOptions()` /
21
+ * `availableStates()`, and shipping-address validation rejects them (so a
22
+ * previously saved address in one of these states can't slip through
23
+ * prefill). Billing addresses are NOT restricted — the restriction is about
24
+ * where medications ship. Omit for the default: all 50 states + DC.
25
+ */
26
+ unavailableStates?: string[];
27
+ /**
28
+ * Short user-facing note rendered near state dropdowns when
29
+ * `unavailableStates` is set, e.g. "Acme cannot provide medications to
30
+ * customers in Delaware." Also used as the validation message when a saved
31
+ * address falls in an unavailable state.
32
+ */
33
+ unavailableStatesNote?: string;
34
+ /**
35
+ * Send an `Idempotency-Key` header on charge/create requests so the backend
36
+ * can dedupe a retried-after-network-drop or double-clicked mutation instead
37
+ * of double-charging / double-creating. Default OFF: leave disabled until the
38
+ * backend both (a) CORS-allow-lists the `Idempotency-Key` request header —
39
+ * otherwise the preflight fails and the request is blocked — and (b) actually
40
+ * honors the key for dedup. Flip to `true` per tenant once both are live.
41
+ */
42
+ idempotencyKeys?: boolean;
43
+ }
44
+ declare function configure(c: PortalConfig): void;
45
+ /**
46
+ * Run `cb` once configuration is available: immediately if `configure()` has
47
+ * already been called, otherwise on the next `configure()`. Module-internal —
48
+ * intentionally not re-exported from the package entrypoint. Lets the singleton
49
+ * stores hydrate after boot instead of snapshotting storage at import time
50
+ * (which runs before the host site calls `configure()`).
51
+ */
52
+ declare function onConfigured(cb: () => void): void;
53
+ declare function getConfig(): PortalConfig;
54
+
55
+ export { type PortalConfig, configure, getConfig, onConfigured };
@@ -0,0 +1,3 @@
1
+ export { configure, getConfig, onConfigured } from '../chunk/5XGPFYIJ.js';
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,11 @@
1
+ import {
2
+ configure,
3
+ getConfig,
4
+ onConfigured
5
+ } from "../chunk/LDZIUFDM.jsx";
6
+ export {
7
+ configure,
8
+ getConfig,
9
+ onConfigured
10
+ };
11
+ //# sourceMappingURL=index.jsx.map