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