@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.
- package/LICENSE +64 -0
- package/README.md +363 -0
- package/dist/api/index.d.ts +12 -0
- package/dist/api/index.js +8 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/index.jsx +127 -0
- package/dist/cart-CBH8Em8f.d.ts +189 -0
- package/dist/cart-D4mVX_zx.d.ts +66 -0
- package/dist/chunk/2OXI5TKO.jsx +249 -0
- package/dist/chunk/3A3MF7R2.jsx +1 -0
- package/dist/chunk/3VEOP7TZ.jsx +16679 -0
- package/dist/chunk/5XGPFYIJ.js +26 -0
- package/dist/chunk/5XGPFYIJ.js.map +1 -0
- package/dist/chunk/67KHO66G.js +26 -0
- package/dist/chunk/67KHO66G.js.map +1 -0
- package/dist/chunk/6TFBQECC.jsx +135 -0
- package/dist/chunk/AN3WPMEP.js +3 -0
- package/dist/chunk/AN3WPMEP.js.map +1 -0
- package/dist/chunk/DHII7L5Y.js +686 -0
- package/dist/chunk/DHII7L5Y.js.map +1 -0
- package/dist/chunk/DS4E7FAI.js +132 -0
- package/dist/chunk/DS4E7FAI.js.map +1 -0
- package/dist/chunk/DY5BJ6UG.js +1195 -0
- package/dist/chunk/DY5BJ6UG.js.map +1 -0
- package/dist/chunk/E7722UPF.js +378 -0
- package/dist/chunk/E7722UPF.js.map +1 -0
- package/dist/chunk/HLXKWRRW.js +16774 -0
- package/dist/chunk/HLXKWRRW.js.map +1 -0
- package/dist/chunk/I46Y2J5W.jsx +144 -0
- package/dist/chunk/J63XPQP4.jsx +21 -0
- package/dist/chunk/J6KNY37T.js +122 -0
- package/dist/chunk/J6KNY37T.js.map +1 -0
- package/dist/chunk/KNTZTYXE.jsx +3315 -0
- package/dist/chunk/KZZSQ7LP.jsx +409 -0
- package/dist/chunk/L46OKCKG.jsx +733 -0
- package/dist/chunk/LDZIUFDM.jsx +31 -0
- package/dist/chunk/LZWA44KD.js +3 -0
- package/dist/chunk/LZWA44KD.js.map +1 -0
- package/dist/chunk/NVRAOAVV.js +3 -0
- package/dist/chunk/NVRAOAVV.js.map +1 -0
- package/dist/chunk/O3QK7YZR.jsx +1 -0
- package/dist/chunk/UZCST66N.jsx +21 -0
- package/dist/chunk/V42CGY2S.jsx +1229 -0
- package/dist/chunk/YJEHCCLY.js +467 -0
- package/dist/chunk/YJEHCCLY.js.map +1 -0
- package/dist/chunk/ZMOG2IIC.js +3194 -0
- package/dist/chunk/ZMOG2IIC.js.map +1 -0
- package/dist/client-BzSg2DEK.d.ts +1539 -0
- package/dist/config/index.d.ts +55 -0
- package/dist/config/index.js +3 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/index.jsx +11 -0
- package/dist/flows/index.d.ts +1322 -0
- package/dist/flows/index.js +9 -0
- package/dist/flows/index.js.map +1 -0
- package/dist/flows/index.jsx +124 -0
- package/dist/index/index.d.ts +71 -0
- package/dist/index/index.js +15 -0
- package/dist/index/index.js.map +1 -0
- package/dist/index/index.jsx +311 -0
- package/dist/pages/index.d.ts +617 -0
- package/dist/pages/index.js +10 -0
- package/dist/pages/index.js.map +1 -0
- package/dist/pages/index.jsx +50 -0
- package/dist/primitives/default/index.d.ts +6 -0
- package/dist/primitives/default/index.js +3 -0
- package/dist/primitives/default/index.js.map +1 -0
- package/dist/primitives/default/index.jsx +7 -0
- package/dist/primitives/index.d.ts +122 -0
- package/dist/primitives/index.js +3 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/primitives/index.jsx +9 -0
- package/dist/stores/index.d.ts +48 -0
- package/dist/stores/index.js +6 -0
- package/dist/stores/index.js.map +1 -0
- package/dist/stores/index.jsx +16 -0
- package/dist/surveyV2-BgQHK0GE.d.ts +48 -0
- package/dist/testing/adapter.d.ts +104 -0
- package/dist/testing/adapter.d.ts.map +1 -0
- package/dist/testing/adapter.js +14 -0
- package/dist/testing/adapter.js.map +1 -0
- package/dist/testing/env.d.ts +29 -0
- package/dist/testing/env.d.ts.map +1 -0
- package/dist/testing/env.js +42 -0
- package/dist/testing/env.js.map +1 -0
- package/dist/testing/fixtures.d.ts +70 -0
- package/dist/testing/fixtures.d.ts.map +1 -0
- package/dist/testing/fixtures.js +74 -0
- package/dist/testing/fixtures.js.map +1 -0
- package/dist/testing/index.d.ts +15 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +14 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/mocks.d.ts +53 -0
- package/dist/testing/mocks.d.ts.map +1 -0
- package/dist/testing/mocks.js +90 -0
- package/dist/testing/mocks.js.map +1 -0
- package/dist/testing/seam-suite.d.ts +39 -0
- package/dist/testing/seam-suite.d.ts.map +1 -0
- package/dist/testing/seam-suite.js +196 -0
- package/dist/testing/seam-suite.js.map +1 -0
- package/dist/testing/storage.d.ts +40 -0
- package/dist/testing/storage.d.ts.map +1 -0
- package/dist/testing/storage.js +71 -0
- package/dist/testing/storage.js.map +1 -0
- package/dist/theme/admin.css +579 -0
- package/dist/theme/affiliate.css +191 -0
- package/dist/theme/flow.css +497 -0
- package/dist/theme/index.d.ts +84 -0
- package/dist/theme/index.js +94 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/index.jsx +97 -0
- package/dist/theme/member-portal.css +1762 -0
- 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 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|