@choiceapps/communityservices-sdk 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/AGENTS.md +43 -0
- package/API.md +86 -0
- package/CHANGELOG.md +12 -0
- package/LICENSE +201 -0
- package/NOTICE +11 -0
- package/README.md +100 -0
- package/SSVF.md +131 -0
- package/browser/attachment-conflict.mjs +6 -0
- package/browser/case-plans-ui.mjs +23 -0
- package/browser/case-plans.d.mts +20 -0
- package/browser/case-plans.mjs +89 -0
- package/browser/client-creation.d.mts +16 -0
- package/browser/client-creation.mjs +60 -0
- package/browser/client-profile-ui.mjs +59 -0
- package/browser/client-profile.d.mts +24 -0
- package/browser/client-profile.mjs +94 -0
- package/browser/client-workflows.mjs +135 -0
- package/browser/connection.d.mts +4 -0
- package/browser/connection.mjs +41 -0
- package/browser/current-living-situation.d.mts +44 -0
- package/browser/current-living-situation.mjs +161 -0
- package/browser/date-of-birth-ui.mjs +68 -0
- package/browser/date-of-birth.d.mts +28 -0
- package/browser/date-of-birth.mjs +112 -0
- package/browser/enrollment-workflow.d.mts +174 -0
- package/browser/enrollment-workflow.mjs +518 -0
- package/browser/exit-details.mjs +21 -0
- package/browser/file-store.mjs +32 -0
- package/browser/gwt-mapped.mjs +46 -0
- package/browser/household-exit.d.mts +34 -0
- package/browser/household-exit.mjs +102 -0
- package/browser/households-ui.mjs +20 -0
- package/browser/households.d.mts +22 -0
- package/browser/households.mjs +115 -0
- package/browser/index.d.mts +78 -0
- package/browser/index.mjs +46 -0
- package/browser/member-entry-date.d.mts +30 -0
- package/browser/member-entry-date.mjs +71 -0
- package/browser/need-recording.d.mts +37 -0
- package/browser/need-recording.mjs +68 -0
- package/browser/need-ui.mjs +138 -0
- package/browser/page-lock.mjs +11 -0
- package/browser/password-recovery.mjs +49 -0
- package/browser/playwright-session.mjs +196 -0
- package/browser/program-discovery.d.mts +22 -0
- package/browser/program-discovery.mjs +80 -0
- package/browser/recovery-diagnostics.mjs +9 -0
- package/browser/service-recording.d.mts +45 -0
- package/browser/service-recording.mjs +148 -0
- package/browser/service-ui.mjs +160 -0
- package/browser/session-authentication.mjs +40 -0
- package/browser/shelter-inventory.d.mts +103 -0
- package/browser/shelter-inventory.mjs +273 -0
- package/browser/shelter-ui.mjs +382 -0
- package/browser/shelters.d.mts +139 -0
- package/browser/shelters.mjs +425 -0
- package/browser/ssvf-rules.d.mts +21 -0
- package/browser/ssvf-rules.mjs +145 -0
- package/browser/ui-login.mjs +135 -0
- package/dist/cjs/bulk.d.ts +33 -0
- package/dist/cjs/bulk.d.ts.map +1 -0
- package/dist/cjs/bulk.js +42 -0
- package/dist/cjs/bulk.js.map +1 -0
- package/dist/cjs/control.d.ts +35 -0
- package/dist/cjs/control.d.ts.map +1 -0
- package/dist/cjs/control.js +141 -0
- package/dist/cjs/control.js.map +1 -0
- package/dist/cjs/effective-date.d.ts +3 -0
- package/dist/cjs/effective-date.d.ts.map +1 -0
- package/dist/cjs/effective-date.js +27 -0
- package/dist/cjs/effective-date.js.map +1 -0
- package/dist/cjs/encoding.d.ts +32 -0
- package/dist/cjs/encoding.d.ts.map +1 -0
- package/dist/cjs/encoding.js +121 -0
- package/dist/cjs/encoding.js.map +1 -0
- package/dist/cjs/enrollment-verifications.d.ts +39 -0
- package/dist/cjs/enrollment-verifications.d.ts.map +1 -0
- package/dist/cjs/enrollment-verifications.js +96 -0
- package/dist/cjs/enrollment-verifications.js.map +1 -0
- package/dist/cjs/errors.d.ts +33 -0
- package/dist/cjs/errors.d.ts.map +1 -0
- package/dist/cjs/errors.js +45 -0
- package/dist/cjs/errors.js.map +1 -0
- package/dist/cjs/generated/v2-models.d.ts +1482 -0
- package/dist/cjs/generated/v2-models.d.ts.map +1 -0
- package/dist/cjs/generated/v2-models.js +3 -0
- package/dist/cjs/generated/v2-models.js.map +1 -0
- package/dist/cjs/generated/v2.d.ts +1149 -0
- package/dist/cjs/generated/v2.d.ts.map +1 -0
- package/dist/cjs/generated/v2.js +252 -0
- package/dist/cjs/generated/v2.js.map +1 -0
- package/dist/cjs/generated/v3-models.d.ts +1420 -0
- package/dist/cjs/generated/v3-models.d.ts.map +1 -0
- package/dist/cjs/generated/v3-models.js +3 -0
- package/dist/cjs/generated/v3-models.js.map +1 -0
- package/dist/cjs/generated/v3.d.ts +1149 -0
- package/dist/cjs/generated/v3.d.ts.map +1 -0
- package/dist/cjs/generated/v3.js +252 -0
- package/dist/cjs/generated/v3.js.map +1 -0
- package/dist/cjs/gwt-enrollments.d.ts +131 -0
- package/dist/cjs/gwt-enrollments.d.ts.map +1 -0
- package/dist/cjs/gwt-enrollments.js +280 -0
- package/dist/cjs/gwt-enrollments.js.map +1 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +19 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/metadata.d.ts +100 -0
- package/dist/cjs/metadata.d.ts.map +1 -0
- package/dist/cjs/metadata.js +165 -0
- package/dist/cjs/metadata.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/program-discovery.d.ts +28 -0
- package/dist/cjs/program-discovery.d.ts.map +1 -0
- package/dist/cjs/program-discovery.js +58 -0
- package/dist/cjs/program-discovery.js.map +1 -0
- package/dist/cjs/race.d.ts +4 -0
- package/dist/cjs/race.d.ts.map +1 -0
- package/dist/cjs/race.js +40 -0
- package/dist/cjs/race.js.map +1 -0
- package/dist/cjs/runtime.d.ts +108 -0
- package/dist/cjs/runtime.d.ts.map +1 -0
- package/dist/cjs/runtime.js +38 -0
- package/dist/cjs/runtime.js.map +1 -0
- package/dist/cjs/subassessments.d.ts +29 -0
- package/dist/cjs/subassessments.d.ts.map +1 -0
- package/dist/cjs/subassessments.js +107 -0
- package/dist/cjs/subassessments.js.map +1 -0
- package/dist/cjs/testing.d.ts +45 -0
- package/dist/cjs/testing.d.ts.map +1 -0
- package/dist/cjs/testing.js +66 -0
- package/dist/cjs/testing.js.map +1 -0
- package/dist/cjs/transport.d.ts +19 -0
- package/dist/cjs/transport.d.ts.map +1 -0
- package/dist/cjs/transport.js +373 -0
- package/dist/cjs/transport.js.map +1 -0
- package/dist/cjs/v2.d.ts +13 -0
- package/dist/cjs/v2.d.ts.map +1 -0
- package/dist/cjs/v2.js +29 -0
- package/dist/cjs/v2.js.map +1 -0
- package/dist/cjs/v3.d.ts +13 -0
- package/dist/cjs/v3.d.ts.map +1 -0
- package/dist/cjs/v3.js +29 -0
- package/dist/cjs/v3.js.map +1 -0
- package/dist/cjs/validation.d.ts +33 -0
- package/dist/cjs/validation.d.ts.map +1 -0
- package/dist/cjs/validation.js +77 -0
- package/dist/cjs/validation.js.map +1 -0
- package/dist/cjs/verification.d.ts +82 -0
- package/dist/cjs/verification.d.ts.map +1 -0
- package/dist/cjs/verification.js +122 -0
- package/dist/cjs/verification.js.map +1 -0
- package/dist/esm/bulk.d.ts +33 -0
- package/dist/esm/bulk.d.ts.map +1 -0
- package/dist/esm/bulk.js +39 -0
- package/dist/esm/bulk.js.map +1 -0
- package/dist/esm/control.d.ts +35 -0
- package/dist/esm/control.d.ts.map +1 -0
- package/dist/esm/control.js +132 -0
- package/dist/esm/control.js.map +1 -0
- package/dist/esm/effective-date.d.ts +3 -0
- package/dist/esm/effective-date.d.ts.map +1 -0
- package/dist/esm/effective-date.js +24 -0
- package/dist/esm/effective-date.js.map +1 -0
- package/dist/esm/encoding.d.ts +32 -0
- package/dist/esm/encoding.d.ts.map +1 -0
- package/dist/esm/encoding.js +117 -0
- package/dist/esm/encoding.js.map +1 -0
- package/dist/esm/enrollment-verifications.d.ts +39 -0
- package/dist/esm/enrollment-verifications.d.ts.map +1 -0
- package/dist/esm/enrollment-verifications.js +93 -0
- package/dist/esm/enrollment-verifications.js.map +1 -0
- package/dist/esm/errors.d.ts +33 -0
- package/dist/esm/errors.d.ts.map +1 -0
- package/dist/esm/errors.js +33 -0
- package/dist/esm/errors.js.map +1 -0
- package/dist/esm/generated/v2-models.d.ts +1482 -0
- package/dist/esm/generated/v2-models.d.ts.map +1 -0
- package/dist/esm/generated/v2-models.js +2 -0
- package/dist/esm/generated/v2-models.js.map +1 -0
- package/dist/esm/generated/v2.d.ts +1149 -0
- package/dist/esm/generated/v2.d.ts.map +1 -0
- package/dist/esm/generated/v2.js +247 -0
- package/dist/esm/generated/v2.js.map +1 -0
- package/dist/esm/generated/v3-models.d.ts +1420 -0
- package/dist/esm/generated/v3-models.d.ts.map +1 -0
- package/dist/esm/generated/v3-models.js +2 -0
- package/dist/esm/generated/v3-models.js.map +1 -0
- package/dist/esm/generated/v3.d.ts +1149 -0
- package/dist/esm/generated/v3.d.ts.map +1 -0
- package/dist/esm/generated/v3.js +247 -0
- package/dist/esm/generated/v3.js.map +1 -0
- package/dist/esm/gwt-enrollments.d.ts +131 -0
- package/dist/esm/gwt-enrollments.d.ts.map +1 -0
- package/dist/esm/gwt-enrollments.js +274 -0
- package/dist/esm/gwt-enrollments.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/metadata.d.ts +100 -0
- package/dist/esm/metadata.d.ts.map +1 -0
- package/dist/esm/metadata.js +157 -0
- package/dist/esm/metadata.js.map +1 -0
- package/dist/esm/program-discovery.d.ts +28 -0
- package/dist/esm/program-discovery.d.ts.map +1 -0
- package/dist/esm/program-discovery.js +55 -0
- package/dist/esm/program-discovery.js.map +1 -0
- package/dist/esm/race.d.ts +4 -0
- package/dist/esm/race.d.ts.map +1 -0
- package/dist/esm/race.js +37 -0
- package/dist/esm/race.js.map +1 -0
- package/dist/esm/runtime.d.ts +108 -0
- package/dist/esm/runtime.d.ts.map +1 -0
- package/dist/esm/runtime.js +33 -0
- package/dist/esm/runtime.js.map +1 -0
- package/dist/esm/subassessments.d.ts +29 -0
- package/dist/esm/subassessments.d.ts.map +1 -0
- package/dist/esm/subassessments.js +103 -0
- package/dist/esm/subassessments.js.map +1 -0
- package/dist/esm/testing.d.ts +45 -0
- package/dist/esm/testing.d.ts.map +1 -0
- package/dist/esm/testing.js +60 -0
- package/dist/esm/testing.js.map +1 -0
- package/dist/esm/transport.d.ts +19 -0
- package/dist/esm/transport.d.ts.map +1 -0
- package/dist/esm/transport.js +369 -0
- package/dist/esm/transport.js.map +1 -0
- package/dist/esm/v2.d.ts +13 -0
- package/dist/esm/v2.d.ts.map +1 -0
- package/dist/esm/v2.js +13 -0
- package/dist/esm/v2.js.map +1 -0
- package/dist/esm/v3.d.ts +13 -0
- package/dist/esm/v3.d.ts.map +1 -0
- package/dist/esm/v3.js +13 -0
- package/dist/esm/v3.js.map +1 -0
- package/dist/esm/validation.d.ts +33 -0
- package/dist/esm/validation.d.ts.map +1 -0
- package/dist/esm/validation.js +72 -0
- package/dist/esm/validation.js.map +1 -0
- package/dist/esm/verification.d.ts +82 -0
- package/dist/esm/verification.d.ts.map +1 -0
- package/dist/esm/verification.js +117 -0
- package/dist/esm/verification.js.map +1 -0
- package/docs/README.md +56 -0
- package/docs/assessments.md +103 -0
- package/docs/browser-session.md +129 -0
- package/docs/capabilities.md +75 -0
- package/docs/configuration.md +81 -0
- package/docs/current-living-situation.md +56 -0
- package/docs/dates-and-answers.md +40 -0
- package/docs/development.md +81 -0
- package/docs/durable-records.md +156 -0
- package/docs/enrollments.md +217 -0
- package/docs/files-and-notes.md +39 -0
- package/docs/getting-started.md +56 -0
- package/docs/independent-needs.md +77 -0
- package/docs/integration-methods.md +60 -0
- package/docs/profiles.md +68 -0
- package/docs/reference.md +64 -0
- package/docs/rest-client.md +97 -0
- package/docs/services.md +66 -0
- package/docs/shelter-inventory.md +64 -0
- package/docs/shelters.md +75 -0
- package/docs/troubleshooting.md +61 -0
- package/docs/using-the-sdk.md +203 -0
- package/docs/vendor-issues/README.md +46 -0
- package/docs/vendor-issues/api-coverage.md +27 -0
- package/docs/vendor-issues/attachment-authentication.md +40 -0
- package/docs/vendor-issues/date-semantics.md +51 -0
- package/docs/vendor-issues/empty-service-list-404.md +51 -0
- package/docs/vendor-issues/enrollment-complete-target-error.md +178 -0
- package/docs/vendor-issues/enrollment-effective-date-column.md +112 -0
- package/docs/vendor-issues/household-head-validation.md +26 -0
- package/docs/vendor-issues/write-contracts.md +51 -0
- package/examples/README.md +41 -0
- package/examples/current-living-situation.mts +27 -0
- package/examples/durable-records.mts +78 -0
- package/examples/enrollment-workflow.mts +46 -0
- package/examples/gwt-enrollment-session.ts +17 -0
- package/examples/gwt-file-store.mjs +2 -0
- package/examples/household-enrollment-workflow.mts +43 -0
- package/examples/household-exit-workflow.mts +35 -0
- package/examples/household-lifecycle-workflow.mts +34 -0
- package/examples/independent-needs.mts +30 -0
- package/examples/program-discovery.ts +19 -0
- package/examples/quickstart.mjs +13 -0
- package/examples/shelter-inventory.mts +30 -0
- package/examples/shelters.mts +33 -0
- package/examples/usage.ts +23 -0
- package/examples/verification-snapshot.ts +9 -0
- package/llms.txt +26 -0
- package/package.json +103 -0
- package/specs/provenance.json +17 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# WellSky Community Services SDK agent guide
|
|
2
|
+
|
|
3
|
+
This guide is for agents integrating or maintaining `@choiceapps/communityservices-sdk` for WellSky Community Services (HMIS), formerly ServicePoint. WellSky is the company, and its other software products are outside this SDK's scope. Legacy ServicePoint names in URLs and GWT classes refer to this same platform. The [documentation index](docs/README.md) is the human entry point. The REST SDK is server-side Node 22+. The ESM-only `browser` export controls Playwright from Node; do not import it into frontend bundles.
|
|
4
|
+
|
|
5
|
+
## Establish the task before writing
|
|
6
|
+
|
|
7
|
+
1. Read [capabilities](docs/capabilities.md) to choose the supported path. A generated method proves Swagger coverage, not a successful tenant-specific operation.
|
|
8
|
+
2. Inspect the [API table](API.md) and [helper contracts](docs/reference.md). Preserve exact parameter names such as `clientId`, `client_id`, and `enrollment_id`.
|
|
9
|
+
3. Obtain tenant, connection settings, permitted target IDs, provider, dates, and source keys from the application. Do not infer authorization from an ID, hostname, provider list, or example.
|
|
10
|
+
4. Discover the program's assessment defaults, then its client-scoped questions and picklists. Resolve option codes; do not copy fixture IDs or numeric lookup values.
|
|
11
|
+
5. Use `createClientCreator` for source-ID mapping, `createHouseholds` for membership, and `createCasePlans` for journaled notes/goals/actions. Read [durable records](docs/durable-records.md). Do not guess a lost client receipt from demographics.
|
|
12
|
+
6. Make every assessment field an explicit answer, subassessment operation, carry-forward, or application-approved not-applicable explanation. Metadata does not decide eligibility or complete conditional branching.
|
|
13
|
+
|
|
14
|
+
The package's examples use synthetic or application-owned inputs. Live verification can create records or mint tokens. Perform it only within the task's authorized tenant and scope; documentation work requires no live writes.
|
|
15
|
+
|
|
16
|
+
## Preserve these invariants
|
|
17
|
+
|
|
18
|
+
- REST authentication and UI login are separate. Never extract browser credentials, store cookies, print tokens, or copy `.env` values into reports. The REST client does not load credential files. Browser login reads the selected file.
|
|
19
|
+
- Use the configured tenant consistently for REST, browser sessions, metadata, and durable journals. All configured tenants use identical operations. Reject mismatched REST/UI tenants and cross-tenant navigation.
|
|
20
|
+
- A failed or empty read does not prove absence. An HTTP success does not prove all fields saved. Never retry a raw write because its response was lost.
|
|
21
|
+
- Retain identical intent, source keys, and the durable store when resuming. Do not delete a journal, regenerate a key, remove an unexplained crash lock, or replay a captured RPC to get past a conflict.
|
|
22
|
+
- Reauthentication refreshes the session, not the mutation. Reconcile the original operation. Read [the recovery procedure](docs/troubleshooting.md) for `SESSION_INTERRUPTED` or ambiguous commits.
|
|
23
|
+
- A household enrollment needs a head throughout every member's enrollment. Never promote a later entrant or change the head mid-enrollment. Retroactive correction is a separate workflow and requires the same first entry date. A real mid-enrollment change normally requires closing all enrollments and starting a fresh one.
|
|
24
|
+
- DOB is a strict calendar date through the DOB helper. Enrollment and review dates are explicit instants. Keep mobile effective-date correction separate from DOB encoding and stored verification dates. Read [date contracts](docs/dates-and-answers.md).
|
|
25
|
+
- Every recorded service needs an associated need verified Closed/Fully Met. Use the service recorder for these guarantees and SSVF/UI completion. Generic `bulk` does not provide them.
|
|
26
|
+
- Profile, case-plan, and goal attachments have different entity contexts. Do not promise public visibility or alter sharing based on a profile upload's location.
|
|
27
|
+
- Keep the managed Playwright page dedicated to the helpers. Use fresh UI/GWT models and the shared page lock. Multi-host writers need a shared durable store and locking implementation.
|
|
28
|
+
|
|
29
|
+
## Find the implementation
|
|
30
|
+
|
|
31
|
+
Installed packages contain `dist/esm`, `dist/cjs`, `browser`, examples, and documentation. Use [declaration links](docs/reference.md) to inspect exact types. Internal file paths are not additional supported import entry points.
|
|
32
|
+
|
|
33
|
+
In a source checkout, runtime logic is in `src`, generated REST contracts are in `src/generated`, and browser helpers are in `browser`. `specs` pins Swagger/provenance/overrides. Tests are in `test`. Run SDK commands in `packages/wellsky-sdk`. The repository contains only the SDK and its supporting documentation and tests.
|
|
34
|
+
|
|
35
|
+
In the SDK source checkout, follow the enclosing repository's AGENTS.md, including its GitNexus impact checks before modifying symbols. In an application consuming the installed package, follow that application's repository instructions; this package does not install a GitNexus index or its tools. Do not hand-edit generated files or API.md; use `npm run generate` in the SDK checkout after an intentional contract change. Preserve unrelated workspace changes. Documented sandbox findings are dated evidence, not instructions to replay fixture setup or override current source contracts.
|
|
36
|
+
|
|
37
|
+
## Verify and report
|
|
38
|
+
|
|
39
|
+
For a source change, run the relevant tests, then `npm run package:check`. Documentation changes must pass `npm run docs:check`; the package check also validates shipped links and examples. Set `WELLSKY_TEST_CHROME` to an installed executable for full local browser fixtures. Tests can skip those fixtures when Chrome is unavailable; report skips rather than claiming full browser proof.
|
|
40
|
+
|
|
41
|
+
For a live task, verify actual saved values through the appropriate REST and UI/GWT reads. Record original IDs, same-key retry results, and mutation counts. Do not claim production or live verification from fake tests alone. Keep private evidence outside the package.
|
|
42
|
+
|
|
43
|
+
When finishing, state what changed, what passed, and what remains unverified. Do not claim that a workflow is atomic, that a journal prevents external writers from racing, or that the server supplies an idempotency key.
|
package/API.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# API coverage
|
|
2
|
+
|
|
3
|
+
Generated from the pinned WellSky V2 and V3 Swagger documents. Every operation has a named method and a typed `client.request("METHOD /path", options)` equivalent.
|
|
4
|
+
|
|
5
|
+
Both versions have the methods below. Import from `@choiceapps/communityservices-sdk/v2` or `@choiceapps/communityservices-sdk/v3` to select the matching request and response models.
|
|
6
|
+
|
|
7
|
+
| Method | HTTP | Path | Pagination |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| `apiToApiAuthentication.createAuthKey` | POST | `/apitoapiauthentication/CreateAuthKey` | |
|
|
10
|
+
| `assessments.get` | GET | `/assessments/{clientId}/{assessmentCode}` | |
|
|
11
|
+
| `assessments.create` | POST | `/assessments/create/{clientId}/{assessmentCode}` | |
|
|
12
|
+
| `assessmentsMobile.getAnswers` | GET | `/assessmentsmobile/GetAssessmentAnswers/{clientId}/{assessmentCode}` | |
|
|
13
|
+
| `assessmentsMobile.addAnswer` | POST | `/assessmentsmobile/AddAssessmentAnswer/{clientId}/{assessmentCode}` | |
|
|
14
|
+
| `authentication.setAuthKey` | POST | `/authentication/SetAuthKey` | |
|
|
15
|
+
| `authentication.getCurrentAuthKey` | POST | `/authentication/GetCurrentAuthKey` | |
|
|
16
|
+
| `authentication.getCurrentAuthKeyList` | GET | `/authentication/GetCurrentAuthKeyList` | |
|
|
17
|
+
| `calls.list` | GET | `/calls` | Yes |
|
|
18
|
+
| `caseManagers.list` | GET | `/casemanager` | Yes |
|
|
19
|
+
| `caseManagers.listForClient` | GET | `/casemanager/{clientId}` | Yes |
|
|
20
|
+
| `clientAuthentication.registerClient` | POST | `/clientAuthentication/RegisterClient` | |
|
|
21
|
+
| `clientAuthentication.getMobileInformation` | GET | `/clientAuthentication/MobileAuthenticationInformation` | |
|
|
22
|
+
| `clientAuthentication.updateClientDetails` | PUT | `/clientAuthentication/UpdateClientDetails` | |
|
|
23
|
+
| `clientAuthentication.getMobileAuthKey` | POST | `/clientAuthentication/GetAuthKeyFormobileapp` | |
|
|
24
|
+
| `clientAuthentication.resetPassword` | POST | `/clientAuthentication/ResetPassword` | |
|
|
25
|
+
| `clientAuthentication.changePassword` | PUT | `/clientAuthentication/ChangePassword` | |
|
|
26
|
+
| `clientAuthentication.getMobileMasterData` | GET | `/clientAuthentication/MobileMasterDataInformation` | |
|
|
27
|
+
| `clientAuthentication.saveUserDetails` | PUT | `/clientAuthentication/SaveUserDetails` | |
|
|
28
|
+
| `clientAuthentication.generateTokenUsingOldToken` | POST | `/clientAuthentication/GenerateTokenUsingOldToken` | |
|
|
29
|
+
| `clientNotes.list` | GET | `/clientnotes` | Yes |
|
|
30
|
+
| `clientNotes.create` | POST | `/clientnotes/create` | |
|
|
31
|
+
| `clientNotes.update` | PUT | `/clientnotes/update` | |
|
|
32
|
+
| `clients.list` | GET | `/clients` | Yes |
|
|
33
|
+
| `clients.get` | GET | `/clients/{clientId}` | |
|
|
34
|
+
| `clients.listSimplified` | GET | `/clients/simplified` | Yes |
|
|
35
|
+
| `clients.getSimplified` | GET | `/clients/simplified/{clientId}` | |
|
|
36
|
+
| `clients.create` | POST | `/clients/create` | |
|
|
37
|
+
| `clients.update` | PUT | `/clients/update/{client_id}` | |
|
|
38
|
+
| `enrollments.createEntryAssessment` | POST | `/enrollments/entry/assessment/create` | |
|
|
39
|
+
| `enrollments.updateEntryAssessment` | PUT | `/enrollments/entry/assessment/update` | |
|
|
40
|
+
| `enrollments.list` | GET | `/enrollments` | Yes |
|
|
41
|
+
| `enrollments.listForClient` | GET | `/enrollments/{clientId}` | Yes |
|
|
42
|
+
| `enrollments.getComplete` | GET | `/enrollments/complete/{enrollmentId}` | Yes |
|
|
43
|
+
| `enrollments.getAssessment` | GET | `/enrollments/assessment/{clientId}/{assessmentCode}` | |
|
|
44
|
+
| `fileAttachments.getForClient` | POST | `/fileattachments/clients/get` | |
|
|
45
|
+
| `fileAttachments.createForClient` | POST | `/fileattachments/clients/create` | |
|
|
46
|
+
| `goals.list` | GET | `/goals` | Yes |
|
|
47
|
+
| `goals.listForClient` | GET | `/goals/client/{clientId}` | Yes |
|
|
48
|
+
| `goals.get` | GET | `/goals/{goalId}` | Yes |
|
|
49
|
+
| `goals.create` | POST | `/goals/create` | |
|
|
50
|
+
| `goals.update` | PUT | `/goals/update/{goalId}` | |
|
|
51
|
+
| `goals.createAction` | POST | `/goals/actions/create/{goalId}` | |
|
|
52
|
+
| `goals.updateAction` | PUT | `/goals/actions/update/{goalActionStepId}` | |
|
|
53
|
+
| `healthCheck.get` | GET | `/healthcheckup` | |
|
|
54
|
+
| `households.list` | GET | `/households` | Yes |
|
|
55
|
+
| `households.get` | GET | `/households/{householdId}` | Yes |
|
|
56
|
+
| `households.listForClient` | GET | `/households/client/{clientId}` | Yes |
|
|
57
|
+
| `households.create` | POST | `/households/create` | |
|
|
58
|
+
| `households.update` | PUT | `/households/update/{householdId}` | |
|
|
59
|
+
| `needs.list` | GET | `/needs` | Yes |
|
|
60
|
+
| `needs.listForClient` | GET | `/needs/{clientId}` | Yes |
|
|
61
|
+
| `needs.listForCall` | GET | `/needs/call/{callRecordId}` | Yes |
|
|
62
|
+
| `needs.getComplete` | GET | `/needs/complete/{needId}` | |
|
|
63
|
+
| `providers.list` | GET | `/providers` | Yes |
|
|
64
|
+
| `providers.get` | GET | `/providers/{providerId}` | |
|
|
65
|
+
| `providers.getComplete` | GET | `/providers/complete/{providerId}` | |
|
|
66
|
+
| `referrals.list` | GET | `/referrals` | Yes |
|
|
67
|
+
| `referrals.listForClient` | GET | `/referrals/client/{clientId}` | Yes |
|
|
68
|
+
| `referrals.listForCall` | GET | `/referrals/call/{callRecordId}` | Yes |
|
|
69
|
+
| `referrals.get` | GET | `/referrals/{referralId}` | |
|
|
70
|
+
| `referrals.create` | POST | `/referrals/create` | |
|
|
71
|
+
| `referrals.update` | PUT | `/referrals/update/{referral_id}` | |
|
|
72
|
+
| `releasesOfInformation.list` | GET | `/releasesofinformation` | Yes |
|
|
73
|
+
| `services.updateHouseholdNeeds` | PUT | `/services/needs/household/update/{serviceId}` | |
|
|
74
|
+
| `services.list` | GET | `/services` | Yes |
|
|
75
|
+
| `services.listForClient` | GET | `/services/{clientId}` | Yes |
|
|
76
|
+
| `services.listForCall` | GET | `/services/call/{callRecordId}` | Yes |
|
|
77
|
+
| `services.getComplete` | GET | `/services/complete/{serviceId}` | |
|
|
78
|
+
| `services.create` | POST | `/services/create` | |
|
|
79
|
+
| `services.update` | PUT | `/services/update/{serviceId}` | |
|
|
80
|
+
| `services.createHousehold` | POST | `/services/household/create` | |
|
|
81
|
+
| `services.updateHousehold` | PUT | `/services/household/update/{serviceId}` | |
|
|
82
|
+
| `tenants.list` | GET | `/tenants/GetCurrentTenants` | |
|
|
83
|
+
| `tenants.create` | POST | `/tenants/AddTenantRecord` | |
|
|
84
|
+
| `tenants.update` | PUT | `/tenants/UpdateTenantRecord` | |
|
|
85
|
+
| `tenants.updateByCode` | PUT | `/tenants/UpdateTenantRecord/{tenant_code}` | |
|
|
86
|
+
| `tenants.delete` | DELETE | `/tenants/DeleteTenantRecord` | |
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 - 2026-10-28
|
|
4
|
+
|
|
5
|
+
Initial development release of `@choiceapps/communityservices-sdk`.
|
|
6
|
+
|
|
7
|
+
- Typed REST V2 and V3 clients with authentication, metadata, pagination, retry controls, and synthetic testing utilities.
|
|
8
|
+
- Browser sessions and GWT adapters configured by tenant and module URL. All configured tenants use the same operations.
|
|
9
|
+
- Enrollment, household, client profile, date of birth, case plan, attachment, service, independent need, shelter, inventory, and Current Living Situation workflows.
|
|
10
|
+
- Durable mutation journals, read-back verification, tenant consistency checks, and interrupted-session recovery.
|
|
11
|
+
- Neutral public helper and type names, without tenant-specific aliases or environment classification options.
|
|
12
|
+
- Shipped examples, documentation, and installed-package regression checks.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Community Services SDK
|
|
2
|
+
Copyright 2026 Choice Technology Solutions, LLC
|
|
3
|
+
|
|
4
|
+
This SDK is licensed under the Apache License, Version 2.0.
|
|
5
|
+
|
|
6
|
+
The pinned API descriptions originate from WellSky Community Services.
|
|
7
|
+
Their source URLs and hashes are recorded in specs/provenance.json within
|
|
8
|
+
the SDK package. The SDK license does not grant rights to WellSky services,
|
|
9
|
+
trademarks, or separately owned third-party materials.
|
|
10
|
+
|
|
11
|
+
This is an independent integration and has no WellSky endorsement.
|
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# WellSky Community Services SDK
|
|
2
|
+
|
|
3
|
+
`@choiceapps/communityservices-sdk` is a server-side TypeScript SDK for **WellSky Community Services (HMIS), formerly ServicePoint**. It provides typed Client API V2/V3 requests and workflow helpers for clients, households, assessments, enrollments, services, shelter stays, and contacts.
|
|
4
|
+
|
|
5
|
+
**Start with [Using the SDK](docs/using-the-sdk.md)** for installation, credentials, a complete REST read, a browser session, and guidance on durable writes. The [documentation index](docs/README.md) links to the detailed task guides.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- Node 22 or newer.
|
|
10
|
+
- Credentials for your Community Services tenant when connecting to WellSky.
|
|
11
|
+
- For browser workflows: `playwright-core` and an installed Chrome/Chromium executable. These helpers run in Node, not in a frontend bundle.
|
|
12
|
+
|
|
13
|
+
REST imports support ESM and CommonJS. The optional `/browser` export is ESM-only. All tenants use the same methods; your tenant and connection settings select the system.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install @choiceapps/communityservices-sdk
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The public package uses the default npm registry. No registry token is needed to install it.
|
|
22
|
+
|
|
23
|
+
### Install from GitLab
|
|
24
|
+
|
|
25
|
+
Add this to your application's `.npmrc`:
|
|
26
|
+
|
|
27
|
+
```ini
|
|
28
|
+
@choiceapps:registry=https://gitlab.home.nmbgeek.com/api/v4/projects/48/packages/npm/
|
|
29
|
+
//gitlab.home.nmbgeek.com/api/v4/projects/48/packages/npm/:_authToken=${GITLAB_NPM_TOKEN}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Supply a GitLab token with package-read access through `GITLAB_NPM_TOKEN`, then install:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npm install @choiceapps/communityservices-sdk
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Keep token values out of version control. The GitLab token installs the package; your REST and browser credentials authenticate to Community Services separately.
|
|
39
|
+
|
|
40
|
+
## Run an offline example
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
node node_modules/@choiceapps/communityservices-sdk/examples/quickstart.mjs
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
It prints `Read synthetic client 123; no network requests.` and uses the real SDK transport with synthetic responses. No HMIS account is needed for this example. See the [source and explanation](docs/getting-started.md).
|
|
47
|
+
|
|
48
|
+
## Make your first API call
|
|
49
|
+
|
|
50
|
+
This fragment assumes your application supplies `tenant`, REST `username` and `password`, and an authorized `clientId`:
|
|
51
|
+
|
|
52
|
+
```js
|
|
53
|
+
import {WellSkyClient, toItems} from '@choiceapps/communityservices-sdk';
|
|
54
|
+
|
|
55
|
+
const api = new WellSkyClient({
|
|
56
|
+
tenant,
|
|
57
|
+
auth: {kind: 'credentials', username, password},
|
|
58
|
+
});
|
|
59
|
+
const people = toItems(await api.clients.get({path: {clientId}}));
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The root export uses V3; use `/v2` or `/v3` to choose explicitly. Responses preserve the server's shape, and `toItems()` extracts supported collection formats. See [the complete runnable read](docs/using-the-sdk.md#4-read-an-existing-client), [configuration](docs/configuration.md), and [all HTTP operations](API.md).
|
|
63
|
+
|
|
64
|
+
## Choose a workflow
|
|
65
|
+
|
|
66
|
+
| Work | Documentation |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| Authentication, reads, pagination, and bulk calls | [REST client](docs/rest-client.md) |
|
|
69
|
+
| Client creation, households, notes, goals, and actions | [Durable records](docs/durable-records.md) |
|
|
70
|
+
| Program metadata, questions, and picklist answers | [Assessments](docs/assessments.md) |
|
|
71
|
+
| Enrollment, interim reviews, household changes, and exits | [Enrollments](docs/enrollments.md) |
|
|
72
|
+
| Profile fields and date of birth | [Profiles](docs/profiles.md) |
|
|
73
|
+
| Services, SSVF details, and Funding Sources | [Services](docs/services.md), [SSVF rules](SSVF.md) |
|
|
74
|
+
| Needs without service delivery | [Independent needs](docs/independent-needs.md) |
|
|
75
|
+
| Shelter check-in/check-out and bed availability | [Shelters](docs/shelters.md), [inventory](docs/shelter-inventory.md) |
|
|
76
|
+
| Outreach and shelter contact events | [Current Living Situation](docs/current-living-situation.md) |
|
|
77
|
+
| Attachments and goal case notes | [Files and notes](docs/files-and-notes.md) |
|
|
78
|
+
|
|
79
|
+
For UI-backed operations, see [browser sessions](docs/browser-session.md). Use stable event keys and a persistent journal for workflow writes. After an error, reconcile the original operation before submitting again; a lost response does not prove rollback. [Troubleshooting](docs/troubleshooting.md) explains recovery.
|
|
80
|
+
|
|
81
|
+
## Examples and reference
|
|
82
|
+
|
|
83
|
+
- [Integration methods](docs/integration-methods.md) explains why workflows combine REST, GWT-RPC, browser forms, and multipart uploads.
|
|
84
|
+
- [WellSky feedback](docs/vendor-issues/README.md) preserves reproduced issues, contract questions, and API coverage requests.
|
|
85
|
+
|
|
86
|
+
- [Packaged examples](examples/README.md) cover individual and household workflows and compile against the public SDK.
|
|
87
|
+
- [Helper reference](docs/reference.md) indexes public exports and type declarations.
|
|
88
|
+
- [Capabilities](docs/capabilities.md) records supported behavior and findings reproduced in a sandbox tenant.
|
|
89
|
+
- [Dates and answers](docs/dates-and-answers.md) explains calendar dates and effective timestamps.
|
|
90
|
+
- [Development guide](docs/development.md) covers building, tests, and releases.
|
|
91
|
+
- [Agent guide](AGENTS.md) documents integration rules for coding assistants.
|
|
92
|
+
- [Changelog](CHANGELOG.md) records versioned changes.
|
|
93
|
+
|
|
94
|
+
This is an independent integration and has no WellSky endorsement.
|
|
95
|
+
|
|
96
|
+
## License and source
|
|
97
|
+
|
|
98
|
+
Copyright 2026 Choice Technology Solutions, LLC. Licensed under [Apache-2.0](LICENSE); see [NOTICE](NOTICE) for attribution.
|
|
99
|
+
|
|
100
|
+
[GitLab](https://gitlab.home.nmbgeek.com/nmbgeek/communityservices-sdk) is the source of truth. The [public GitHub mirror](https://github.com/nmbgeek/communityservices-sdk) receives branches and tags from GitLab and runs npm trusted publishing. Make repository changes in GitLab.
|
package/SSVF.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# SSVF service fields
|
|
2
|
+
|
|
3
|
+
The browser SDK exposes `getSsvfServiceRules()` for application forms and validates these rules in `record` and `recordBulk` before reserving a journal entry or writing records. This is a verified snapshot of a service form reproduced in a sandbox tenant under an SSVF RRH provider on October 23, 2026. It is not a live provider configuration query or a statement of reporting requirements. The low-level REST client retains the supplied Swagger contract.
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
import {getSsvfServiceRules} from '@choiceapps/communityservices-sdk/browser';
|
|
7
|
+
const rules = getSsvfServiceRules({
|
|
8
|
+
typeOfSsvfService: 'Assistance obtaining VA benefits',
|
|
9
|
+
});
|
|
10
|
+
const visibleFields = rules.fields.filter(field => field.visible);
|
|
11
|
+
// Each field includes key, label, control, required, transport and any options/maxLength.
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Use `rules.serviceTypes` and `rules.financialAssistanceTypes` for choices. Omit unselected values instead of sending `-Select-`, null, or an empty string. When a user changes the service type, clear answers for the previous type. The recorder rejects inactive dependent fields rather than silently dropping them. Rules are returned as copies.
|
|
15
|
+
|
|
16
|
+
## Service types and dependencies
|
|
17
|
+
|
|
18
|
+
The service type and all four dependent fields are optional in the inspected UI. Blank values passed client-side validation with save requests intercepted before reaching the server. The Other text box has a 100-character limit. No selection within the three dependent picklists revealed another field.
|
|
19
|
+
|
|
20
|
+
| Type of SSVF Service | Dependent SDK field | Control | UI required |
|
|
21
|
+
| --- | --- | --- | --- |
|
|
22
|
+
| Outreach services | None | None | No |
|
|
23
|
+
| Case management services | None | None | No |
|
|
24
|
+
| Assistance obtaining VA benefits | `ifObtainingVaAssistanceBenefits` | Picklist | No |
|
|
25
|
+
| Assistance obtaining/coordinating other public benefits | `ifObtainingCoordinatingOtherPublicBenefits` | Picklist | No |
|
|
26
|
+
| Direct provision of other public benefits | `ifDirectProvisionOfOtherPublicBenefits` | Picklist | No |
|
|
27
|
+
| Other (non-TFA) supportive service approved by VA | `ifOtherNonTfaSupportiveServiceApprovedByVa` | Text, maximum 100 characters | No |
|
|
28
|
+
| Shallow Subsidy | None | None | No |
|
|
29
|
+
| Returning Home | None | None | No |
|
|
30
|
+
| Rapid Resolution | None | None | No |
|
|
31
|
+
| Healthcare Navigation | None | None | No |
|
|
32
|
+
|
|
33
|
+
### Assistance obtaining VA benefits
|
|
34
|
+
|
|
35
|
+
UI label: If "Assistance obtaining VA benefits". REST field: `ssvfInformation.ifObtainingVaAssistanceBenefits`.
|
|
36
|
+
|
|
37
|
+
- VA vocational and rehabilitation counseling
|
|
38
|
+
- Employment and training services
|
|
39
|
+
- Educational assistance
|
|
40
|
+
- Health care services
|
|
41
|
+
|
|
42
|
+
### Assistance obtaining/coordinating other public benefits
|
|
43
|
+
|
|
44
|
+
UI label: If "Assistance obtaining/coordinating other public benefits". REST field: `ssvfInformation.ifObtainingCoordinatingOtherPublicBenefits`.
|
|
45
|
+
|
|
46
|
+
- Health care services
|
|
47
|
+
- Daily living services
|
|
48
|
+
- Personal financial planning services
|
|
49
|
+
- Transportation services
|
|
50
|
+
- Income support services
|
|
51
|
+
- Fiduciary and representative payee services
|
|
52
|
+
- Legal services - child support
|
|
53
|
+
- Legal services - eviction prevention
|
|
54
|
+
- Legal services - outstanding fines and penalties
|
|
55
|
+
- Legal services - restore/acquire driver's license
|
|
56
|
+
- Legal services - other
|
|
57
|
+
- Child care
|
|
58
|
+
- Housing counseling
|
|
59
|
+
|
|
60
|
+
### Direct provision of other public benefits
|
|
61
|
+
|
|
62
|
+
UI label: If "Direct provision of other public benefits". REST field: `ssvfInformation.ifDirectProvisionOfOtherPublicBenefits`.
|
|
63
|
+
|
|
64
|
+
- Personal financial planning services
|
|
65
|
+
- Transportation services
|
|
66
|
+
- Income support services
|
|
67
|
+
- Fiduciary and representative payee services
|
|
68
|
+
- Legal services - child support
|
|
69
|
+
- Legal services - eviction prevention
|
|
70
|
+
- Legal services - outstanding fines and penalties
|
|
71
|
+
- Legal services - restore/acquire driver's license
|
|
72
|
+
- Legal services - other
|
|
73
|
+
- Child care
|
|
74
|
+
- Housing counseling
|
|
75
|
+
|
|
76
|
+
### Other (non-TFA) supportive service approved by VA
|
|
77
|
+
|
|
78
|
+
UI label: If "Other(Non-TFA) Supportive Service approved by VA". REST field: `ssvfInformation.ifOtherNonTfaSupportiveServiceApprovedByVa`.
|
|
79
|
+
|
|
80
|
+
Free text. The SDK permits 1 to 100 characters when supplied; omit the field to leave it unanswered.
|
|
81
|
+
|
|
82
|
+
## Financial assistance
|
|
83
|
+
|
|
84
|
+
Financial assistance is independent of Type of SSVF Service. The same list remains available for all 10 service types. Shallow Subsidy does not automatically select a financial-assistance type. Type, amount, and both dates must be handled separately.
|
|
85
|
+
|
|
86
|
+
`ssvfFinancialAssistanceType` has these choices:
|
|
87
|
+
|
|
88
|
+
- Rental assistance
|
|
89
|
+
- Utility fee payment assistance
|
|
90
|
+
- Security deposit
|
|
91
|
+
- Utility deposit
|
|
92
|
+
- Moving costs
|
|
93
|
+
- Transportation services: tokens/vouchers
|
|
94
|
+
- Transportation services: vehicle repair/maintenance
|
|
95
|
+
- Child Care
|
|
96
|
+
- General housing stability assistance
|
|
97
|
+
- Emergency housing assistance
|
|
98
|
+
- Shallow subsidy financial assistance
|
|
99
|
+
- Food assistance
|
|
100
|
+
- Landlord incentive
|
|
101
|
+
- Tenant incentive
|
|
102
|
+
|
|
103
|
+
Selecting any of these 14 choices reveals and requires both SSVF Financial Assistance Start Date and SSVF Financial Assistance End Date. Blank dates triggered the UI's required-field validation for every choice, before any request to save. Leaving the financial type unselected hides the dates and removes their required markers.
|
|
104
|
+
|
|
105
|
+
Pass those dates as `financialAssistancePeriod: {start, end}` using timezone-qualified timestamps. The recorder requires both, enforces their order, and rejects a period without a financial-assistance type. Swagger has no properties for these dates; the UI adapter fills them and verifies stored readback.
|
|
106
|
+
|
|
107
|
+
`ssvfFinancialAssistanceAmount` is visible and not marked required in the inspected UI. It can be omitted for nonfinancial services. If supplied, the SDK accepts a finite nonnegative amount with at most two decimal places, up to 1,000,000,000. Funding Sources are separate allocations and retain their existing validation.
|
|
108
|
+
|
|
109
|
+
## Recording a nonfinancial service
|
|
110
|
+
|
|
111
|
+
```js
|
|
112
|
+
await recorder.record({
|
|
113
|
+
key: 'source-system-stable-service-id',
|
|
114
|
+
body: {
|
|
115
|
+
clientId, serviceProvider,
|
|
116
|
+
serviceCode: 'BH-3800.7000', // Use the taxonomy appropriate to your service.
|
|
117
|
+
serviceStartDate: '2026-10-23T12:00:00-04:00',
|
|
118
|
+
serviceEndDate: '2026-10-23T12:00:00-04:00',
|
|
119
|
+
ssvfInformation: {
|
|
120
|
+
typeOfSsvfService: 'Assistance obtaining VA benefits',
|
|
121
|
+
ifObtainingVaAssistanceBenefits: 'Educational assistance',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The four conditional values are supported by REST and are verified against both the REST readback and the visible UI control. No GWT workaround is needed for those values. The UI adapter still completes the associated need as Closed / Fully Met and handles financial dates and Funding Sources where supplied. Keep the same key, inputs, and durable journal for retries. Bulk input validates all rows first and stops after an uncertain write.
|
|
128
|
+
|
|
129
|
+
`SsvfInformation` uses the service type as a discriminant, so TypeScript rejects a dependent field belonging to another branch and invalid picklist literals. `ServiceUiSnapshot.ssvfInformation` includes visible, nonblank values for verification. Hidden controls do not count as proof of stored answers.
|
|
130
|
+
|
|
131
|
+
The hidden Moving On controls did not appear for any of the 10 currently offered service types. They are not exposed as supported SSVF inputs. Other tenants, providers, and future WellSky releases need their own UI verification before extending these rules.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** A verified local/readback conflict cannot be resolved by logging in again. */
|
|
2
|
+
export class AttachmentConflictError extends Error {
|
|
3
|
+
constructor(reason,message){
|
|
4
|
+
super(message);this.name='AttachmentConflictError';this.code='ATTACHMENT_CONFLICT';this.reason=reason;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {pageConnection} from './connection.mjs';
|
|
2
|
+
import {withPageLock} from './page-lock.mjs';
|
|
3
|
+
import {decodeMappedResponse} from './gwt-mapped.mjs';
|
|
4
|
+
/** Fresh counted reads back the UI's initial empty notes/goals state. No writes or cached RPCs. */
|
|
5
|
+
export function createCasePlanUi({page}){
|
|
6
|
+
const connection=pageConnection(page),base=connection.moduleBaseUrl;
|
|
7
|
+
const confirmEmpty=({kind,clientId})=>withPageLock(page,async()=>{
|
|
8
|
+
if(!['note','goal'].includes(kind)||!Number.isSafeInteger(clientId)||clientId<1||new URL(page.url()).origin+new URL(page.url()).pathname!==base+'index.html')throw Error('Client and record kind required');
|
|
9
|
+
if(await page.locator('[role=dialog]:visible').count())throw Error('Close dialogs before case-plan workflow');
|
|
10
|
+
const ready=()=>page.waitForFunction(()=>!document.body.innerText.includes('Processing...')&&!document.body.innerText.includes('Loading...'),null,{timeout:30000});
|
|
11
|
+
if(/Client - \(\d+\)/.test(await page.locator('body').innerText())){await page.getByRole('tab',{name:'Client Information',exact:true}).click();await page.getByRole('tab',{name:'Summary',exact:true}).click();await ready();await page.getByRole('button',{name:'Exit',exact:true}).click();await page.waitForURL(u=>u.hash==='#clientPointClientMain');}
|
|
12
|
+
let wire,pending;const listener=r=>{const b=r.postData()??'';if(r.url()===base+'service/MetaQueryService'&&b.includes('|getMappedResults|'))pending=r.allHeaders().then(h=>{wire={policy:b.split('|')[4],headers:Object.fromEntries(['content-type','x-gwt-module-base','x-gwt-permutation'].map(k=>[k,h[k]]))};});};page.on('request',listener);
|
|
13
|
+
try{
|
|
14
|
+
await page.goto(base+'index.html#loadClient;clientId='+clientId);await page.waitForFunction(id=>document.body.innerText.includes(`Client - (${id})`)&&!document.body.innerText.includes('Processing...'),clientId);
|
|
15
|
+
await page.getByRole('tab',{name:kind==='note'?'Client Profile':'Case Plans',exact:true}).click();await ready();await pending;if(!wire)throw Error('Fresh UI read context unavailable');
|
|
16
|
+
}finally{page.off('request',listener);}
|
|
17
|
+
const query=kind==='note'?`SELECT n.clientNoteId AS id FROM SpClientNote AS n WHERE n.active = true AND n.clientId = ${clientId}`:`SELECT g.goalId AS id FROM SpGoal AS g WHERE g.active = true AND g.clientId = ${clientId}`;
|
|
18
|
+
const strings=[base,wire.policy,'com.bowmansystems.sp5.core.client.services.GenericService','getMappedResults','java.lang.String/2004016611','java.util.HashMap/1797211028','I','Z',query+' LIMIT 1,0'];
|
|
19
|
+
const body=['7','0',strings.length,...strings,1,2,3,4,5,5,6,7,7,8,9,0,0,1,1,''].join('|');
|
|
20
|
+
const r=await page.evaluate(async({url,headers,body})=>{const r=await fetch(url,{method:'POST',headers,body,credentials:'same-origin',redirect:'error',signal:AbortSignal.timeout(30000)});return {status:r.status,body:await r.text()};},{url:base+'service/MetaQueryService',headers:wire.headers,body});
|
|
21
|
+
if(r.status!==200)throw Error('UI record read failed');const result=decodeMappedResponse(r.body);return result.total===0&&result.rows.length===0;
|
|
22
|
+
});return {connection,confirmEmpty};
|
|
23
|
+
}
|