@crvouga/mockingbird-service-pharmetika 2.3.0 → 3.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/CHANGELOG.md +25 -5
- package/DISCOVERY.md +2 -2
- package/README.md +8 -8
- package/SUPPORT.md +2 -2
- package/dist/{chunk-WUZ5AD3W.js → chunk-MC6F5BUP.js} +34 -4
- package/dist/chunk-MC6F5BUP.js.map +7 -0
- package/dist/{chunk-IDPKRMD4.js → chunk-QO5TUOCB.js} +5 -5
- package/dist/chunk-QO5TUOCB.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/server.js +2 -2
- package/openapi.yaml +3 -3
- package/package.json +3 -3
- package/dist/chunk-IDPKRMD4.js.map +0 -7
- package/dist/chunk-WUZ5AD3W.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-pharmetika
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 3.1.0 (2026-10-08)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- redesign emulator experience ([d6038c2](https://github.com/crvouga/mockingbird/commit/d6038c27eebbaa1751f02bc9305002a5b1304779))
|
|
8
|
+
|
|
9
|
+
### Dependencies
|
|
10
|
+
|
|
11
|
+
- `@crvouga/mockingbird-service-sqlite`
|
|
12
|
+
|
|
13
|
+
## 3.0.0 (2026-10-07)
|
|
14
|
+
|
|
15
|
+
### ⚠️ Breaking changes
|
|
16
|
+
|
|
17
|
+
- point the repo at crvouga/mockingbird ([1bf35a4](https://github.com/crvouga/mockingbird/commit/1bf35a422b84a85b50b09b72bd7cc7093082a86e))
|
|
18
|
+
- point the repo at crvouga/emulates ([cdb5e53](https://github.com/crvouga/mockingbird/commit/cdb5e536ed8c1f52345e3984f089001c25fdb08a))
|
|
19
|
+
- rename Emulators to Emulates ([2e10d9c](https://github.com/crvouga/mockingbird/commit/2e10d9cff84c54ac37768fc9a19d1aefd3943744))
|
|
20
|
+
- rebrand Mockingbird to Emulators ([1adca65](https://github.com/crvouga/mockingbird/commit/1adca65ce28242f11cff98eac05d2be88f680cbe))
|
|
21
|
+
|
|
22
|
+
### Fixes and improvements
|
|
23
|
+
|
|
24
|
+
- typecheck the brand gate before builds ([fc36095](https://github.com/crvouga/mockingbird/commit/fc3609514de70ffe3170a5d216fb8a49f9ce7cbb))
|
|
25
|
+
- format the emulates records query ([8698872](https://github.com/crvouga/mockingbird/commit/8698872509d06002be5a8fcdc85d79f8462320c3))
|
|
26
|
+
|
|
27
|
+
## 2.3.0 (2026-10-04)
|
|
4
28
|
|
|
5
29
|
### Features
|
|
6
30
|
|
|
@@ -17,10 +41,6 @@
|
|
|
17
41
|
- reconcile combined PR integration ([124d5be](https://github.com/crvouga/mockingbird/commit/124d5bed7576535ff481ce6da7d2369957799665))
|
|
18
42
|
- preserve inferred form headers ([02bdd28](https://github.com/crvouga/mockingbird/commit/02bdd2806a9a934607ecd7ffd0cfbe4f6ba80c91))
|
|
19
43
|
|
|
20
|
-
### Dependencies
|
|
21
|
-
|
|
22
|
-
- `@crvouga/mockingbird-service-sqlite`
|
|
23
|
-
|
|
24
44
|
## 2.2.0 (2026-10-04)
|
|
25
45
|
|
|
26
46
|
### Features
|
package/DISCOVERY.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @crvouga/mockingbird-service-pharmetika 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-pharmetika/`; no repository checkout is needed to discover the
|
|
4
|
+
inside `node_modules/@crvouga/mockingbird-service-pharmetika/`; 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,19 +1,19 @@
|
|
|
1
1
|
# @crvouga/mockingbird-service-pharmetika
|
|
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 the **Pharmetika** compounding-pharmacy provider portal for test suites:
|
|
6
6
|
clinic and patient lookup, patient create, medication-order validate / EPCS prepare / submit /
|
|
7
7
|
lookup, the v7 cancel, the medication-template catalog, and the status webhooks the pharmacy
|
|
8
8
|
posts back. Orders move only when a test says so (an admin transition or an auto-advance path on
|
|
9
|
-
the
|
|
9
|
+
the emulator clock).
|
|
10
10
|
|
|
11
11
|
- Operation coverage: [SUPPORT.md](https://github.com/crvouga/mockingbird/blob/main/packages/service/pharmetika/SUPPORT.md)
|
|
12
12
|
- The vendor publishes no spec: the contract (`openapi.yaml`) is hand-authored from the wire
|
|
13
13
|
shapes our consumer reads and writes (`pharmetika-fulfillment.adapter.ts`,
|
|
14
14
|
`pharmetika-live.client.ts`, and the bodies recorded in the adapter's spec).
|
|
15
15
|
- **The success rule.** Every body carries Pharmetika's `success` flag. Only `true` or `1` is
|
|
16
|
-
success: the
|
|
16
|
+
success: the emulator answers business failures (unknown patient, controlled substance on submit,
|
|
17
17
|
a reused order id, …) as **HTTP 200 with `success: 0`** and `messages: [{message, type}]`, the
|
|
18
18
|
case our adapter guards against.
|
|
19
19
|
|
|
@@ -29,7 +29,7 @@ any Fetch server.
|
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
31
31
|
|
|
32
|
-
Point `PHARMETIKA_API_URL` at the
|
|
32
|
+
Point `PHARMETIKA_API_URL` at the emulator and give the app any `PHARMETIKA_API_TOKEN` (or pin one
|
|
33
33
|
with `--api-token`). Set `PHARMETIKA_WEBHOOK_SECRET` in the app and pass the same value as
|
|
34
34
|
`--webhook-secret`. `PHARMETIKA_PRACTITIONER_IDENTIFIER` can be any string;
|
|
35
35
|
`PHARMETIKA_CLINIC_NAME=Acme` picks the seeded clinic.
|
|
@@ -122,7 +122,7 @@ submitted/processing to shipped in our receiver.
|
|
|
122
122
|
| `GET /__admin/patients`, `POST /__admin/patients` | Read or seed the roster: `{patient_id?, clinic_identifier?, demographics: {first_name, last_name, DOB, …}}`. |
|
|
123
123
|
| `PUT /__admin/templates` | Replace the medication templates (`{templates: [...]}`). |
|
|
124
124
|
| `GET`/`PUT /__admin/settings` | `{tokens?, basic?, anonymousCatalog?, webhookVariant?, autoAdvance?: {afterMs, path} \| null}` for the calling namespace. |
|
|
125
|
-
| `POST /__admin/tick` | Apply due auto-advance steps (the served
|
|
125
|
+
| `POST /__admin/tick` | Apply due auto-advance steps (the served emulator ticks every 100 ms). Orders awaiting prescriber approval never auto-advance. |
|
|
126
126
|
|
|
127
127
|
Fault presets (`POST /__admin/faults {"preset": "<name>", "count"?: n}`; `GET /__admin/faults/presets`):
|
|
128
128
|
|
|
@@ -162,8 +162,8 @@ username works the same way for the catalog client).
|
|
|
162
162
|
|
|
163
163
|
| Export | Kind | Description |
|
|
164
164
|
| --- | --- | --- |
|
|
165
|
-
| `PharmetikaAPI` | class | The in-process
|
|
166
|
-
| `createRuntime` | function | The
|
|
165
|
+
| `PharmetikaAPI` | class | The in-process emulator: `fetch(request)`, `reset()`, `transition(uuid, {to, tracking_id?})`, `tick()`, `orders()`, `webhookBody(order)`. Options: `sqlite`, `now`, `namespace`, `templates`, `clinics`, `patients`, `settings`, `onWebhook`. |
|
|
166
|
+
| `createRuntime` | function | The emulator with the full service contract (health, admin, namespaces, credentials, presets, webhooks). Options: `webhooks: {url, secret, retryDelaysMs?, fetch?}`, `settings`, `templates`, `clinics`, `patients`, `tickMs`, `clock`, `seed`, `adminKey`, `onLog`. |
|
|
167
167
|
| `PHARMETIKA_PRESETS` | object | Every named fault preset. |
|
|
168
168
|
| `PHARMETIKA_NAMESPACE` | string | The service name, `"pharmetika"`. |
|
|
169
169
|
| `TOKEN_HEADER` | string | `"x-pmk-authentication-token"`. |
|
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
|
| `ListClinics` | `GET /api/v5/provider_portal/clinic/clinic_list` | ✅ supported | ✅ | |
|
|
12
12
|
| `ListPatients` | `GET /api/v5/provider_portal/provider/patient_list` | ✅ supported | ✅ | |
|