@crvouga/mockingbird-service-caretalk 3.0.0 → 3.2.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 +16 -4
- package/DISCOVERY.md +2 -2
- package/README.md +9 -9
- package/SUPPORT.md +2 -2
- package/dist/{chunk-C3RJ7ZXT.js → chunk-5F5ADB6E.js} +260 -172
- package/dist/chunk-5F5ADB6E.js.map +7 -0
- package/dist/{chunk-UQTTYH3E.js → chunk-TJ67L2DI.js} +8 -6
- package/dist/chunk-TJ67L2DI.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +84 -69
- package/dist/index.js +1 -1
- package/dist/server.d.ts +129 -96
- package/dist/server.js +2 -2
- package/openapi.yaml +1 -1
- package/package.json +3 -3
- package/dist/chunk-C3RJ7ZXT.js.map +0 -7
- package/dist/chunk-UQTTYH3E.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-caretalk
|
|
2
2
|
|
|
3
|
+
## 3.2.0 (2026-10-09)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- match Emulate provider coverage ([16b65ce](https://github.com/crvouga/mockingbird/commit/16b65ce791fa216f28ec1521df636f57771d9c5e))
|
|
8
|
+
|
|
9
|
+
### Dependencies
|
|
10
|
+
|
|
11
|
+
- `@crvouga/mockingbird-service-sqlite`
|
|
12
|
+
|
|
13
|
+
## 3.1.0 (2026-10-08)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- redesign emulator experience ([d6038c2](https://github.com/crvouga/mockingbird/commit/d6038c27eebbaa1751f02bc9305002a5b1304779))
|
|
18
|
+
|
|
3
19
|
## 3.0.0 (2026-10-07)
|
|
4
20
|
|
|
5
21
|
### ⚠️ Breaking changes
|
|
@@ -14,10 +30,6 @@
|
|
|
14
30
|
- typecheck the brand gate before builds ([fc36095](https://github.com/crvouga/mockingbird/commit/fc3609514de70ffe3170a5d216fb8a49f9ce7cbb))
|
|
15
31
|
- format the emulates records query ([8698872](https://github.com/crvouga/mockingbird/commit/8698872509d06002be5a8fcdc85d79f8462320c3))
|
|
16
32
|
|
|
17
|
-
### Dependencies
|
|
18
|
-
|
|
19
|
-
- `@crvouga/mockingbird-service-sqlite`
|
|
20
|
-
|
|
21
33
|
## 2.3.0 (2026-10-04)
|
|
22
34
|
|
|
23
35
|
### Features
|
package/DISCOVERY.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @crvouga/mockingbird-service-caretalk discovery
|
|
2
2
|
|
|
3
3
|
This is the installed-package index for coding agents and tooling. All relative links resolve
|
|
4
|
-
inside `node_modules/@crvouga/mockingbird-service-caretalk/`; no repository checkout is needed to discover the
|
|
4
|
+
inside `node_modules/@crvouga/mockingbird-service-caretalk/`; no repository checkout is needed to discover the emulator's
|
|
5
5
|
supported surface or documented behavior.
|
|
6
6
|
|
|
7
7
|
## Capability and behavior sources
|
|
@@ -48,7 +48,7 @@ designed for assertions and diagnosis by consuming test suites.
|
|
|
48
48
|
## Report a mismatch or missing capability
|
|
49
49
|
|
|
50
50
|
Follow the [agent reporting contract](https://github.com/crvouga/mockingbird/blob/main/docs/REPORTING_ISSUES.md). Include package version,
|
|
51
|
-
operation/command, a minimal redacted request, actual
|
|
51
|
+
operation/command, a minimal redacted request, actual emulator result, expected oracle result or vendor
|
|
52
52
|
documentation, and whether the mismatch appears in the matrix. Never include keys, tokens,
|
|
53
53
|
customer data, prompts, PHI, card data, or unredacted recordings.
|
|
54
54
|
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# @crvouga/mockingbird-service-caretalk
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Local emulators. Real API contracts. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
|
|
4
4
|
|
|
5
|
-
Stateful
|
|
5
|
+
Stateful emulator of **CareTalk**'s external API (`/externalapi`) for test suites: client login,
|
|
6
6
|
form definitions (`GetForm`) and saved form rounds (`SavePatientForm`, the form-submission
|
|
7
7
|
queue's call), patient search and insert (the account backfill), states, free slots and
|
|
8
|
-
appointments. The backend requires CareTalk keys at boot, so the
|
|
8
|
+
appointments. The backend requires CareTalk keys at boot, so the emulator lets a stack boot and run
|
|
9
9
|
the CareTalk paths without the beta environment.
|
|
10
10
|
|
|
11
11
|
- Operation coverage: [SUPPORT.md](https://github.com/crvouga/mockingbird/blob/main/packages/service/caretalk/SUPPORT.md)
|
|
@@ -24,8 +24,8 @@ with any Fetch server.
|
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
27
|
-
Point `CARETALK_API_URL` at the
|
|
28
|
-
for loopback or front the
|
|
27
|
+
Point `CARETALK_API_URL` at the emulator (the backend validates it as **https-only**, so relax that
|
|
28
|
+
for loopback or front the emulator with TLS). `getFormData` hardcodes
|
|
29
29
|
`https://api.caretalkbeta.com` (seam **G-Y1**). `CARETALK_USERNAME`, `CARETALK_PASSWORD` and
|
|
30
30
|
`CARETALK_API_KEY` can be any values unless `--api-user` / `--api-key` pin them.
|
|
31
31
|
|
|
@@ -63,7 +63,7 @@ const { submissions } = (await (await call("/__admin/form-submissions")).json())
|
|
|
63
63
|
|
|
64
64
|
| Route | Behaviour |
|
|
65
65
|
| --- | --- |
|
|
66
|
-
| `POST /externalapi/Auth/client-login` | `{userName, password}` → `{token, expiration}`. Tokens last `tokenTtlSeconds` (default 3600, what our client caches for) on the
|
|
66
|
+
| `POST /externalapi/Auth/client-login` | `{userName, password}` → `{token, expiration}`. Tokens last `tokenTtlSeconds` (default 3600, what our client caches for) on the emulator clock. |
|
|
67
67
|
| `GET /externalapi/Forms/GetForm/{formName}` | By name or slug, case-insensitive: `[{formRoundId, patientAppointmentId, submitDate, fullFormDto}]`; an unknown form is `[]`. With `PatientId` (and `AppointmentId`), the patient's latest saved round: chosen answers `isChecked`, free text echoed. Accepts a login token or a static API key. |
|
|
68
68
|
| `POST /externalapi/Forms/SavePatientForm?patientId=&patientAppointmentId=` | The submission (`fullFormDto.groups[].groupQuestions[]`). Question ids must belong to the form, answer ids to the question (text questions take `id: 0` with the typed value), single-choice questions one answer; violations are 400 ProblemDetails, an unknown patient or form 404. → `{success: true, message}`. |
|
|
69
69
|
| `GET /externalapi/Patients/SearchForPatient?FirstName&LastName&zipCode&DateOfBirth` | Case-insensitive names, ZIP, and the date in any of `YYYY-MM-DD`, `MM/DD/YYYY`, ISO → `{isExists: true, eligibleId, programId}`; no match is **400** `{isExists: false, message}` (our client reads 400 as "no such patient"). |
|
|
@@ -104,14 +104,14 @@ carry the API user they were issued to, so `PUT /__admin/credentials {"credentia
|
|
|
104
104
|
eligibility files, Health Gorilla retrieval, medications and diagnostics.
|
|
105
105
|
- Real physician calendars: slots are synthesised; time zones are fixed to Mountain.
|
|
106
106
|
- The live form catalogue: `DEFAULT_FORMS` is synthesised in CareTalk's shape (the live-parity
|
|
107
|
-
script seeds the
|
|
107
|
+
script seeds the emulator from the beta environment's forms instead).
|
|
108
108
|
|
|
109
109
|
## API
|
|
110
110
|
|
|
111
111
|
| Export | Kind | Description |
|
|
112
112
|
| --- | --- | --- |
|
|
113
|
-
| `CareTalkAPI` | class | The in-process
|
|
114
|
-
| `createRuntime` | function | The
|
|
113
|
+
| `CareTalkAPI` | class | The in-process emulator: `fetch(request)`, `reset()`, `addPatient(body)`, `slots(date)`, `setAppointmentStatus(id, status)`, `upsertForm(form)`, `rounds()`, `patients()`. Options: `sqlite`, `now`, `namespace`, `forms`, `settings`. |
|
|
114
|
+
| `createRuntime` | function | The emulator with the full service contract (health, admin, namespaces, credentials, presets). Options: `forms`, `settings`, `clock`, `seed`, `adminKey`, `onLog`, `sqlite`. |
|
|
115
115
|
| `CARETALK_PRESETS` | object | Every named fault preset. |
|
|
116
116
|
| `CARETALK_NAMESPACE` | string | The service name, `"caretalk"`. |
|
|
117
117
|
| `DEFAULT_FORMS` | array | The seeded form definitions (Health History 101, AOE Questions 102). |
|
package/SUPPORT.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Generated from `openapi.yaml`; do not edit by hand.
|
|
4
4
|
|
|
5
5
|
- operations in spec: **9**
|
|
6
|
-
- supported by the
|
|
6
|
+
- supported by the emulator: **9**
|
|
7
7
|
- parity enabled: **9**
|
|
8
8
|
|
|
9
|
-
| operationId | route |
|
|
9
|
+
| operationId | route | emulator | parity | notes |
|
|
10
10
|
| --- | --- | --- | --- | --- |
|
|
11
11
|
| `ClientLogin` | `POST /externalapi/Auth/client-login` | ✅ supported | ✅ | |
|
|
12
12
|
| `GetForm` | `GET /externalapi/Forms/GetForm/{formName}` | ✅ supported | ✅ | |
|