stream-connect-sdk 0.7.7 → 0.8.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,319 @@
1
+ # Changelog
2
+
3
+ All notable changes to the `stream-connect-sdk` npm package. The
4
+ companion React Native hook (`stream-connect-sdk-hook`) is on its own
5
+ release line; see [`sdk-hook/docs/README.md`](./sdk-hook/docs/README.md).
6
+
7
+ ## 0.8.1
8
+
9
+ ### Handle expired connectAccessToken without a confusing error
10
+
11
+ Connect access tokens have a ~60 minute server-side TTL. Previously,
12
+ when a member left an SDK-hosting page open past that window and came
13
+ back to interact, the next API call failed with a misleading 422
14
+ error ("A connect access token can only be used once...") that
15
+ pointed integrators toward the wrong fix.
16
+
17
+ The SDK now detects the backend's expired-token shape
18
+ (`{status: 422, error_code: "expired_connect_token"}`) via an axios
19
+ response interceptor. **What happens next depends on how you wire
20
+ it** — there's no zero-config auto-recovery because only your server
21
+ holds the SDK secret key needed to mint a new token:
22
+
23
+ * **Recommended: wire `connectAccessTokenRefreshFn`** — a new init
24
+ option that points at a refresh endpoint on your server. The SDK
25
+ calls it for a fresh token, swaps it into the
26
+ `X-Connect-Access-Token` header, and retries the failed request
27
+ transparently — the member sees no error. Multiple parallel failed
28
+ requests share a single refresh attempt (stampede guard). See
29
+ [`docs/connect-access-token.md` → Refreshing an expired
30
+ token](./docs/connect-access-token.md#refreshing-an-expired-token-081)
31
+ for the server-side endpoint pattern (Flask + Express examples)
32
+ and the SDK-side wiring.
33
+ * **Fallback: wire `onConnectAccessTokenExpired`** — a new init
34
+ callback that fires when no refresh hook is wired or the refresh
35
+ rejected. Use to render a "session expired, please reload" UI on
36
+ the host page. Also dispatched as a
37
+ `tpastream-connect-token-expired` CustomEvent on `window` for
38
+ global listeners. Coalesced to one notification per expiry cycle.
39
+ * **No wiring at all**: the only change you see is a cleaner
40
+ server-side error message in the existing error-handler chain
41
+ (`handleFormErrors` etc.). The 422 still bubbles up; the member
42
+ still has to reload the page to recover.
43
+
44
+ See [`docs/client-usage.md`](./docs/client-usage.md) for the option
45
+ reference.
46
+
47
+ ## 0.8.0
48
+
49
+ ### Look and feel
50
+
51
+ * Polished default appearance: cards, generous whitespace, system-font
52
+ stack, accessible focus rings. No host-page CSS required; the SDK
53
+ is visually self-contained.
54
+ * New `theme.primaryColor` init option (hex like `#2563eb`) recolors
55
+ buttons, links, focus rings, and progress bars. See
56
+ [`docs/theme.md`](./docs/theme.md).
57
+
58
+ ### Stack
59
+
60
+ * React 19, full TypeScript port.
61
+ * Tailwind utility classes with the `tpa-` prefix to avoid host-page
62
+ collisions. The reset + theme variables are wrapped under
63
+ `.tpa-sdk-root` so they don't leak outside the SDK subtree; the
64
+ utility classes themselves are prefixed but global, so a host page
65
+ that already uses `.tpa-*` class names would still collide (none
66
+ observed in real customer integrations).
67
+ * Headless UI primitives for accessible Dialog and Combobox.
68
+ * React Hook Form + Zod for the carrier credential form.
69
+ * **Removed dependencies**: `@fortawesome/*`, `font-awesome`,
70
+ `react-jsonschema-form`, `react-popup`, `react-select`,
71
+ `react-highlight-words`, `query-string`, `@babel/polyfill`,
72
+ `regenerator-runtime`.
73
+
74
+ ### Credential validation
75
+
76
+ * Server-Sent Events stream replaces polling. State transitions
77
+ arrive as they happen instead of on a 5-second cadence.
78
+ * Backed by the new `/v3/sdk/progress/<task_id>/stream` endpoint.
79
+ Auth is a short-lived task-scoped JWT minted by the Flask
80
+ credential-submit endpoint and forwarded as a `?token=` query
81
+ param on the SSE subscription. The token is audience-locked to
82
+ `sdk:sse:progress`, bound to `(user_id, task_id)`, and expires
83
+ after 10 minutes.
84
+ * Multiple validations can run in parallel; each owns its own SSE
85
+ subscription. The credential-submit response also returns a
86
+ `task_token` field for SDK consumers.
87
+
88
+ ### MFA / 2FA
89
+
90
+ * Inline in the validation hero element. Method picker, code entry,
91
+ and error handling all render in the hero card without a modal hop
92
+ or full-screen swap. See [`docs/two-factor.md`](./docs/two-factor.md).
93
+
94
+ ### Terms of Use
95
+
96
+ * Renders as a Dialog overlay portal instead of replacing the
97
+ credentials form. Form state survives the round trip; no formData
98
+ ferrying required. The inline "Terms of Use" link is `tabIndex={-1}`
99
+ so keyboard users cycle straight from the consent checkbox to the
100
+ next form control.
101
+
102
+ ### Init() options
103
+
104
+ * `realTimeVerification` default is unchanged from 0.7.7 (still
105
+ `true`). Transport changed (SSE replaces polling); the UI is now
106
+ non-blocking. Pass `realTimeVerification: false` explicitly to
107
+ skip the validation UI.
108
+ * `enableInterop` deprecated in favor of `enablePatientAccessAPI`.
109
+ Legacy name keeps working indefinitely; using it logs a one-time
110
+ `console.warn`.
111
+ * `enableInteropSinglePage` deprecated in favor of
112
+ `enablePatientAccessAPISinglePage`. Same indefinite-support rule.
113
+ * **Default change**: `enablePatientAccessAPI` now defaults to `true`
114
+ (was implicitly `false` in 0.7.x). PAA-routed payers (those with
115
+ `supports_interoperability_apis: true` — Anthem, UHC Interop, Kaiser
116
+ Interop, Empire BCBS API, etc.) take the OAuth-popup branch
117
+ automatically; the old fallthrough rendered `interoperability.OnBoard`
118
+ with `interoperability_refresh_token` as a user-visible text input,
119
+ which no real user could fill (the OAuth callback populates that
120
+ field server-side). Customers who explicitly pass
121
+ `enablePatientAccessAPI: false` (or `enableInterop: false`) keep
122
+ the legacy behavior.
123
+ * `enablePatientAccessAPISinglePage` remains default `false`. Turning
124
+ it on changes the OAuth flow from popup to full host-page redirect
125
+ and would silently lose host-page state for popup-flow customers, so
126
+ it stays opt-in.
127
+
128
+ ### Headless bundle (new)
129
+
130
+ * `stream-connect-sdk/headless` subpath export ships the same SDK
131
+ without the bundled Tailwind stylesheet (~27 KiB smaller). For
132
+ customers who drive every step themselves via the renderXxx
133
+ callbacks and don't want our utility-class CSS in their host page.
134
+ Same StreamConnect function, same auth, same SSE/2FA pipeline; the
135
+ only difference is whether `tailwind.css` is imported at module
136
+ load. See [docs/headless.md](./docs/headless.md).
137
+ * `realtimeTimeout` and `maxRetries` are accepted but `@deprecated`
138
+ no-ops (both were knobs for the deleted polling loop).
139
+ * `fixCredentials` is accepted but `@deprecated` and ignored.
140
+ Member-portal mode is now derived automatically from the presence
141
+ of `connectAccessToken` (which was already a hard backend
142
+ requirement for the fix-credentials endpoint, so token presence
143
+ was always the de-facto gate). Passing `fixCredentials` logs a
144
+ one-time `console.warn`; integrators should drop it from their
145
+ init() call.
146
+ * `userSchema` is still accepted but no longer drives form rendering.
147
+ Customer-supplied keys are forwarded into the credential-submit
148
+ payload as extra fields; a console warning fires once per init if
149
+ `userSchema` is non-empty.
150
+ * All other init() options keep the same shape and names: `done*`
151
+ callbacks, the three `render*` toggles, `theme`, `_overrideBaseUrl`,
152
+ `forceEndStep`, etc.
153
+ * **New**: `theme.primaryColor`.
154
+ * **New**: `enablePatientAccessAPI` and `enablePatientAccessAPISinglePage`.
155
+
156
+ ### Migration notes
157
+
158
+ See [`docs/migration-0.7-to-0.8.md`](./docs/migration-0.7-to-0.8.md)
159
+ for the full upgrade story. The short version:
160
+
161
+ * Default render path: new appearance applies automatically; no code
162
+ changes needed.
163
+ * Custom render props (`renderChoosePayer={false}` /
164
+ `renderPayerForm={false}` / `renderEndWidget={false}`): data shape
165
+ passed into your components is unchanged.
166
+ * Bootstrap CSS is no longer needed on the host page.
167
+ * 0.7.x remains supported on the CDN for integrators not ready to
168
+ upgrade.
169
+
170
+ ## 0.7.7
171
+
172
+ * Fix-Credentials no longer white-screens when a member's carrier
173
+ isn't in the loaded payer list; the tile renders disabled with an
174
+ explanatory message and EnterCredentials is null-safe against a
175
+ missing streamPayer.
176
+ * Log SDK version (`TPAStream Connect SDK v0.7.7`) on entry-point
177
+ load.
178
+ * Migrate `EnterCredentials.componentWillMount` to constructor
179
+ (removes React deprecation warning).
180
+ * Tighten loose-equality comparisons in `interoperability-payer-form`
181
+ and `sdk` setStep4.
182
+ * Remove leftover dev `console.log` from interoperability polling.
183
+ * Tests added for `card`, `choose-payer`, `fix-credentials`,
184
+ `payer-info`, `select-enroll-process`, `payer-images`, and
185
+ `enter-credentials`.
186
+ * Dependency security: `npm audit fix` for moderate-severity
187
+ transitive advisories.
188
+ * **`axios` bumped from `^0.21.1` to `^1.7.9`** (major version). The
189
+ 1.x line carries breaking changes (default `transformResponse`,
190
+ error object shape, `crossdomain` / `Cookie` removal,
191
+ `paramsSerializer`, response header casing). All in-SDK consumers
192
+ of `sdkAxios` were audited:
193
+ * Request shapes: all `.get/.post/.put` calls use the
194
+ `(url, body, { params })` style supported in 1.x; no calls pass
195
+ `transformResponse` or `paramsSerializer`.
196
+ * Response handling: consumers read `response.data.data.<field>`
197
+ only; `.data` JSON-parse path is unchanged in 1.x.
198
+ * Error handling: `error.response.data.message` is unchanged in
199
+ 1.x.
200
+ * Request defaults: phantom `crossdomain: true` removed (was a
201
+ no-op axios silently dropped);
202
+ `defaults.headers['X-Connect-Access-Token']` migrated to
203
+ `defaults.headers.common['X-Connect-Access-Token']` per the 1.x
204
+ convention.
205
+ * No header reads in consumer code, so the response-header-casing
206
+ change is not a risk.
207
+ * Any host page that wraps `sdkAxios` externally and inspects axios
208
+ internals would be the only remaining surface to verify.
209
+ * **`jquery` removed as a dependency**. The single use in
210
+ `entries/sdk.jsx` (`$(document).ready`) was replaced with a vanilla
211
+ `onDOMReady` helper. Embedding pages that bring their own jQuery
212
+ are unaffected; pages that relied on the SDK to load jQuery for
213
+ them now need to load it themselves (no evidence any did).
214
+
215
+ ## 0.7.6
216
+
217
+ * Surface the carrier's specific error message in the
218
+ interoperability payer form.
219
+
220
+ ## 0.7.5
221
+
222
+ * Autofill username on fix credentials if it exists.
223
+
224
+ ## 0.7.4
225
+
226
+ * Fix invalid message with 2fa-only carriers.
227
+
228
+ ## v0.7.3
229
+
230
+ * Add `logo_url` to the `doneCreatedForm` callback.
231
+
232
+ ## v0.7.2
233
+
234
+ * Change button language to account for redirects.
235
+
236
+ ## v0.7.0
237
+
238
+ * Add fix-credentials flow for interop migrating login problem.
239
+ * Aggressively expire AccessTokens and handle redirect with new
240
+ tokens passed in interop.
241
+
242
+ ## v0.6.9
243
+
244
+ * Add `realtimeTimeout` to allow configuration around the
245
+ validate-credentials wait time for MFA / normal validate crawls.
246
+ * Fix bug with 2fa end where screen would flicker.
247
+
248
+ ## v0.6.8
249
+
250
+ * Add webview delegation init option. Allows an implementor to handle
251
+ the final part of redirection themselves.
252
+ * Add `forceEndStep` init option.
253
+
254
+ ## v0.6.7
255
+
256
+ * Open a new payer window when entering credentials for a patient
257
+ access API.
258
+
259
+ ## v0.6.4
260
+
261
+ * Hotfix URL issues with improper routing.
262
+
263
+ ## v0.6.3
264
+
265
+ * Add interoperability payer flag and redirect URL.
266
+
267
+ ## v0.6.2
268
+
269
+ * Bump version and have better npm ignore.
270
+
271
+ ## v0.6.1
272
+
273
+ * Add payer blogs. See `includePayerBlogs` in client-usage
274
+ documentation.
275
+ * Various bug fixes in SDK-Hooks.
276
+ * Fix SDK flow bug which caused page to stop rendering on multiple
277
+ login inputs. Related to AIV which is now deprecated.
278
+ * Various package updates.
279
+ * Remove auto version injector. Deprecated. TPAStream devs must now
280
+ manually update the version file.
281
+
282
+ ## v0.5.5
283
+
284
+ * Add ability to implement custom widgets for payer form and the end
285
+ widget.
286
+
287
+ ## v0.5.4
288
+
289
+ * Fix bug where single-payer employers won't render.
290
+
291
+ ## v0.5.3
292
+
293
+ * Add config error page.
294
+ * Make state transfer through terms-of-service widget.
295
+
296
+ ## v0.5.2
297
+
298
+ * Fix issue with Anthem security questions.
299
+
300
+ ## v0.5.1
301
+
302
+ * Add two-factor-authentication handling.
303
+
304
+ ## v0.5.0
305
+
306
+ * Fix bug with SDK demo mode where final page won't load.
307
+
308
+ ## v0.4.8
309
+
310
+ * Add individual endpoints for payer and terms of service.
311
+ * Separate the versions of the API and create a version manager.
312
+ * Drastically improve initial endpoint load time by bringing down
313
+ less info.
314
+
315
+ ## v0.4.7
316
+
317
+ * Add versioning to the CDN provider.
318
+ * Append version to all request headers for the underlying API to
319
+ read.
package/README.md CHANGED
@@ -4,130 +4,56 @@
4
4
 
5
5
  ## Version
6
6
 
7
- ### 0.7.7
7
+ ### 0.8.1
8
8
 
9
- Defensive fix for the Fix-Credentials flow (no white-screen on unresolvable carriers), plus dependency hygiene, lint cleanup, and added test coverage. Logs the SDK version on entry-point load.
9
+ Handle expired `connectAccessToken` cleanly. Long-lived pages no longer surface the misleading 422 when the ~60-minute server-side TTL elapses; integrations opt into transparent refresh via a new server-side endpoint hook, or a clean expiry callback as a fallback. See the [Refreshing an expired token](./docs/connect-access-token.md#refreshing-an-expired-token-081) integration guide.
10
10
 
11
- ## Philosophy
12
-
13
- This SDK is designed to implement the [EasyEnrollment platform](https://www.easyenrollment.net) into our clients own hosted web-portals. We want to make it fit as seemlessly as possible with the current experience of their sites; because of this, we have provided functionality to add callbacks to the end of each of the necessary flows and we are as unopinionated as possible about the styling of the SDK's flow.
14
-
15
- In the spirit of creating a seemless process we will also be forgoing the verification of emails for users using easyenrollment. Instead, we will be relying on the implementers to provide valid emails, first names, and last names in order to create an association of information to a user.
16
-
17
- ## Change Log
18
-
19
- ### 0.7.7
20
-
21
- * Fix-Credentials no longer white-screens when a member's carrier isn't in the loaded payer list; the tile renders disabled with an explanatory message and EnterCredentials is null-safe against a missing streamPayer
22
- * Log SDK version (`TPAStream Connect SDK v0.7.7`) on entry-point load
23
- * Migrate `EnterCredentials.componentWillMount` to constructor (removes React deprecation warning)
24
- * Tighten loose-equality comparisons in `interoperability-payer-form` and `sdk` setStep4
25
- * Remove leftover dev `console.log` from interoperability polling
26
- * Tests added for `card`, `choose-payer`, `fix-credentials`, `payer-info`, `select-enroll-process`, `payer-images`, and `enter-credentials`
27
- * Dependency security: `npm audit fix` for moderate-severity transitive advisories
28
- * **`axios` bumped from `^0.21.1` to `^1.7.9` (major version)**. The 1.x line carries breaking changes (default `transformResponse`, error object shape, `crossdomain` / `Cookie` removal, `paramsSerializer`, response header casing). All in-SDK consumers of `sdkAxios` were audited:
29
- - Request shapes: all `.get/.post/.put` calls use the `(url, body, { params })` style supported in 1.x; no calls pass `transformResponse` or `paramsSerializer`.
30
- - Response handling: consumers read `response.data.data.<field>` only; `.data` JSON-parse path is unchanged in 1.x.
31
- - Error handling: `error.response.data.message` is unchanged in 1.x.
32
- - Request defaults: phantom `crossdomain: true` removed (was a no-op axios silently dropped); `defaults.headers['X-Connect-Access-Token']` migrated to `defaults.headers.common['X-Connect-Access-Token']` per the 1.x convention.
33
- - No header reads in consumer code, so the response-header-casing change is not a risk.
34
- Any host page that wraps `sdkAxios` externally and inspects axios internals would be the only remaining surface to verify.
35
- * **`jquery` removed as a dependency**. The single use in `entries/sdk.jsx` (`$(document).ready`) was replaced with a vanilla `onDOMReady` helper. Embedding pages that bring their own jQuery are unaffected; pages that relied on the SDK to load jQuery for them now need to load it themselves (we have no evidence any did).
36
-
37
- ### 0.7.6
38
-
39
- * Surface the carrier's specific error message in the interoperability payer form
40
-
41
- ### 0.7.5
42
-
43
- * Autofill username on fix credentials if it exists
44
-
45
- ### 0.7.4
46
-
47
- * Fix invalid message with 2fa-only carriers
48
-
49
- ### v0.7.3
50
-
51
- * add logo_url to the doneCreatedForm callback
52
-
53
- ### v0.7.2
54
-
55
- * Change button language to account for redirects
56
-
57
- ### v0.7.0
58
-
59
- * Add in to fix-credentials flow interop migrating login problem
60
- * Aggressively Expire AccessTokens and handle redirect with new tokens passed in interop
61
-
62
- ### v0.6.9
63
-
64
- * Add in `realtimeTimeout` to allow for configuration around the validate credentials wait time for MFA / normal validate crawls.
65
- * Fix bug with 2fa end where screen would flicker.
66
-
67
- ### v0.6.8
68
-
69
- * Adds in webview delegation init option. This allows an implementor to handle the final part of redirection themselves.
70
- * Adds in forceEndStep init option.
71
-
72
- ### v0.6.7
73
-
74
- * Open a new payer window when entering credentials for a patient access api.
75
-
76
- ### v0.6.4
11
+ ### 0.8.0
77
12
 
78
- * Hotfix URL issues with improper routing.
13
+ Polished default appearance, React 19 + TypeScript, real-time credential-validation streaming, and a substantial dependency cleanup. The init() contract is backward-compatible: every option supported in 0.7.7 keeps working, including the custom render props (`renderChoosePayer`, `renderPayerForm`, `renderEndWidget`).
79
14
 
80
- ### v0.6.3
81
-
82
- * Add in interoperability payer flag and redirect URL
83
-
84
- ### v0.6.2
85
-
86
- * Bump version and have better npm ignore
87
-
88
- ### v0.6.1
89
-
90
- * Add in payer blogs. See includePayerBlogs in client-usage documentaiton.
91
- * Various bug fixes in SDK-Hooks
92
- * Fix SDK flow bug which caused page to stop rendering on multiple login inputs. This was related to AIV which is now deprecated.
93
- * Various package updates
94
- * Remove auto version injector. Deprecated. TPAStream Devs MUST now manually update the file (unfortunately)
95
-
96
- ### v0.5.5
97
-
98
- * Add in ability to implement custom widgets for payer form and the end widget.
99
-
100
- ### v0.5.4
101
-
102
- * Fix bug where single payer employers won't render
103
-
104
- ### v0.5.3
105
-
106
- * Add config error page
107
- * Make state transfer through terms of service widget
108
-
109
- ### v0.5.2
110
-
111
- * Fix issue with Anthem security questions.
112
-
113
- ### v0.5.1
114
-
115
- * Add two factor authentication handling.
116
-
117
- ### v0.5.0
118
-
119
- * Fix bug with sdk demo mode where final page won't load
120
-
121
- ### v0.4.8
15
+ ## Philosophy
122
16
 
123
- * Add individual endpoints for the following: payer and terms of service
124
- * Seperate the versions of the api and create a version manager.
125
- * Drastically improve initial endpoint loadtime by bringing down less info.
17
+ This SDK embeds the [EasyEnrollment platform](https://www.easyenrollment.net) into the host application's own pages. From 0.8.0 onward, the SDK ships with a polished default appearance so it looks good out of the box on any host page, with no required CSS work. Branding is configurable via `theme.primaryColor`, and the existing custom render props remain available for integrators who want full control over a particular step.
126
18
 
127
- ### v0.4.7
19
+ ## Change Log
128
20
 
129
- * Add versioning to the CDN provider
130
- * Append version to all request headers for underlying api to read.
21
+ Latest highlights below. The full per-version changelog lives in
22
+ [CHANGELOG.md](./CHANGELOG.md).
23
+
24
+ ### 0.8.1 highlights
25
+
26
+ * Handle expired `connectAccessToken` (the ~60-minute server-side
27
+ TTL) without the misleading 422. Opt in to transparent recovery by
28
+ wiring `connectAccessTokenRefreshFn` against a server-side refresh
29
+ endpoint (Flask + Express snippets in [docs](./docs/connect-access-token.md#refreshing-an-expired-token-081)),
30
+ or use the `onConnectAccessTokenExpired` callback (and
31
+ `tpastream-connect-token-expired` window event) to render a
32
+ "session expired" UI as a fallback. Parallel-request stampede
33
+ guarded; notifications coalesced to one per expiry cycle.
34
+ Integrations that wire nothing see a cleaner error message but
35
+ still need a page reload to recover.
36
+
37
+ ### 0.8.0 highlights
38
+
39
+ * Polished default appearance; no host-page CSS required.
40
+ * `theme.primaryColor` init option recolors buttons, links, focus
41
+ rings, and progress bars.
42
+ * React 19, full TypeScript port; substantial dependency cleanup
43
+ (Bootstrap, jQuery, FontAwesome, react-jsonschema-form, react-popup,
44
+ react-select, query-string and others removed).
45
+ * Non-blocking credential validation: SSE-driven progress in a hero
46
+ element + corner panel, parallel validations, inline 2FA, no
47
+ modal/full-screen takeover.
48
+ * `enableInterop` -> `enablePatientAccessAPI` rename (legacy alias
49
+ kept indefinitely).
50
+ * `realtimeTimeout` and `maxRetries` accepted but `@deprecated`
51
+ no-ops (knobs for the deleted polling loop).
52
+ * `fixCredentials` accepted but `@deprecated` and ignored;
53
+ member-portal mode is derived from `connectAccessToken` presence.
54
+ * Backward-compatible with 0.7.7 at the `init()` call site. See
55
+ [`docs/migration-0.7-to-0.8.md`](./docs/migration-0.7-to-0.8.md)
56
+ for the upgrade story.
131
57
 
132
58
  ## Example Page
133
59
 
@@ -139,22 +65,52 @@ In the spirit of creating a seemless process we will also be forgoing the verifi
139
65
 
140
66
  ## Additional Documentation
141
67
 
142
- [Client Usage](docs/client-usage.md)
143
-
144
- [SDK Flow Details](docs/sdk-flow.md)
145
-
146
- [QuickStart Guide](docs/quickstart.md)
147
-
148
- [SDK-Hook Guide](sdk-hook/docs/README.md)
68
+ Start with [`docs/`](./docs/README.md) for a full table of contents.
69
+ Common entry points:
70
+
71
+ * [Quickstart](docs/quickstart.md)
72
+ * [Client Usage](docs/client-usage.md): full init option reference
73
+ * [Migrating from 0.7.x to 0.8](docs/migration-0.7-to-0.8.md)
74
+ * [SDK Flow](docs/sdk-flow.md)
75
+ * [Two-Factor Authentication](docs/two-factor.md)
76
+ * [Fix Credentials](docs/fix-credentials.md)
77
+ * [Patient Access API (Interop)](docs/interop.md)
78
+ * [Theme](docs/theme.md)
79
+ * [Connect Access Token](docs/connect-access-token.md)
80
+ * [Errors](docs/error.md)
81
+ * [FAQ](docs/faq.md)
82
+
83
+ The separate React Native hook package (`stream-connect-sdk-hook@0.6.2`)
84
+ is **soft-deprecated** in favor of embedding the main SDK in a WebView.
85
+ The published 0.6.2 tarball on npm keeps working for existing
86
+ integrations; we're not republishing because the hook's source
87
+ imports from `assets/shared/` which the 0.8 rewrite deleted, and
88
+ the right path for new integrations is the WebView pattern anyway.
89
+ See [`sdk-hook/docs/README.md`](sdk-hook/docs/README.md) for the
90
+ deprecation notice and recommended pattern;
91
+ [Quickstart > Mobile](docs/quickstart.md#mobile-android-ios-react-native)
92
+ has end-to-end examples.
149
93
 
150
94
  ## Development Commands
151
95
 
152
- `npm install`
153
- `npm run build`
154
- `npm run format`
155
-
156
- Make sure to bump the version of the `package.json` with each release.
157
-
158
- Develop APIToken `49d492e0-9772-4975-8d1e-17f0ad8f2de0` not for actual customer use.
159
-
160
- On init you can pass in \_overrideBaseUrl for development sandbox as well.
96
+ ```
97
+ npm install # install dependencies
98
+ npm run build # build sdk.js (production bundle)
99
+ npm run format # biome check --write across assets/
100
+ npm test # lint + typecheck (runs both below)
101
+ npm run test:lint # biome check assets/
102
+ npm run test:types # tsc --noEmit
103
+ ```
104
+
105
+ Bump the `version` in `package.json` with each release and update
106
+ [CHANGELOG.md](./CHANGELOG.md).
107
+
108
+ ## Local sandbox
109
+
110
+ A dev-only `/sdk-test` route is wired into the stream webapp for
111
+ iterating on the SDK against a real backend. It mints a fresh
112
+ connect access token server-side per request and embeds the SDK with
113
+ a known-good fixture. See `stream/views.py::sdk_test` in the
114
+ [stream repo](https://github.com/LakeEriePartners/stream) for the
115
+ implementation, and `stream/static/js/sdk-test.js` for the bundled
116
+ SDK artifact it serves.
package/docs/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # stream-connect-sdk docs
2
+
3
+ Reference for the 0.8 SDK. Start with the quickstart and the migration
4
+ guide; reach for the rest as needed.
5
+
6
+ ## Getting started
7
+
8
+ * [Quickstart](./quickstart.md): minimal HTML page that mounts the
9
+ SDK, step-by-step (plus Android / iOS / React Native WebView patterns)
10
+ * [Migration: 0.7 to 0.8](./migration-0.7-to-0.8.md): what changed,
11
+ what's deprecated, what stayed the same
12
+ * [Client Usage](./client-usage.md): full reference for every init
13
+ option and lifecycle callback
14
+
15
+ ## Feature deep dives
16
+
17
+ * [SDK Flow](./sdk-flow.md): the wizard step machine (choose-payer,
18
+ enter-credentials, real-time validation, end widget)
19
+ * [Theme](./theme.md): `theme.primaryColor` and what it does (and
20
+ doesn't) recolor
21
+ * [Two-Factor Authentication](./two-factor.md): inline MFA in the
22
+ hero element, what state transitions look like, what can go wrong
23
+ * [Fix Credentials](./fix-credentials.md): the per-carrier
24
+ status-badge view (entered automatically when `connectAccessToken`
25
+ is supplied at init)
26
+ * [Patient Access API (Interop)](./interop.md): carriers that
27
+ authenticate via redirect to the carrier site instead of inline
28
+ credentials
29
+ * [Headless mode](./headless.md): driving every step yourself with
30
+ your own UI; using the `stream-connect-sdk/headless` bundle that
31
+ ships without our stylesheet
32
+
33
+ ## Security
34
+
35
+ * [Connect Access Token](./connect-access-token.md): server-side
36
+ minting of `connectAccessToken` for fix-credentials and other
37
+ advanced flows
38
+
39
+ ## Reference
40
+
41
+ * [Errors](./error.md): error messages grouped by where they originate
42
+ in the SDK lifecycle (init, cred-submit, SSE, MFA)
43
+ * [FAQ](./faq.md)
44
+
45
+ ## Other packages in this repo
46
+
47
+ * [`stream-connect-sdk-hook` (v0.6.2, deprecated)](../sdk-hook/docs/README.md):
48
+ a separate React Native / headless hook package on its own release
49
+ line. **Deprecated** in favor of the WebView pattern documented in
50
+ [Quickstart > Mobile](./quickstart.md#mobile-android-ios-react-native).
51
+ The published 0.6.2 tarball keeps working for existing integrations;
52
+ new ones should embed the main SDK in a WebView.