@crvouga/mockingbird-service-rxvortex 3.0.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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog — @crvouga/mockingbird-service-rxvortex
2
2
 
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
+
3
13
  ## 3.0.0 (2026-10-07)
4
14
 
5
15
  ### ⚠️ Breaking changes
@@ -14,10 +24,6 @@
14
24
  - typecheck the brand gate before builds ([fc36095](https://github.com/crvouga/mockingbird/commit/fc3609514de70ffe3170a5d216fb8a49f9ce7cbb))
15
25
  - format the emulates records query ([8698872](https://github.com/crvouga/mockingbird/commit/8698872509d06002be5a8fcdc85d79f8462320c3))
16
26
 
17
- ### Dependencies
18
-
19
- - `@crvouga/mockingbird-service-sqlite`
20
-
21
27
  ## 2.3.0 (2026-10-04)
22
28
 
23
29
  ### Features
package/DISCOVERY.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @crvouga/mockingbird-service-rxvortex 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-rxvortex/`; no repository checkout is needed to discover the mock's
4
+ inside `node_modules/@crvouga/mockingbird-service-rxvortex/`; 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 mock result, expected oracle result or vendor
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-rxvortex
2
2
 
3
- > Familiar calls. Faithful echoes. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
3
+ > Local emulators. Real API contracts. Part of [Mockingbird](https://github.com/crvouga/mockingbird).
4
4
 
5
- Stateful mock of the **RxVortex (Strive)** compounding-pharmacy API for test suites: the
5
+ Stateful emulator of the **RxVortex (Strive)** compounding-pharmacy API for test suites: the
6
6
  client-credentials token, order submit, status, cancel, the recovery lookup by sender order id,
7
7
  the preset catalog, and the signed status webhooks the pharmacy posts back. Orders move only
8
- when a test says so (an admin transition or an auto-advance path on the mock clock), so an eRx
8
+ when a test says so (an admin transition or an auto-advance path on the emulator clock), so an eRx
9
9
  suite that waited up to 60 s on the real sandbox resolves in milliseconds.
10
10
 
11
11
  - Operation coverage: [SUPPORT.md](https://github.com/crvouga/mockingbird/blob/main/packages/service/rxvortex/SUPPORT.md)
@@ -24,7 +24,7 @@ any Fetch server.
24
24
 
25
25
  ## Usage
26
26
 
27
- Point `RXVORTEX_API_URL` at the mock. Set `RXVORTEX_WEBHOOK_SECRET` in the app and pass the same
27
+ Point `RXVORTEX_API_URL` at the emulator. Set `RXVORTEX_WEBHOOK_SECRET` in the app and pass the same
28
28
  value as `--webhook-secret`.
29
29
 
30
30
  ```bash
@@ -69,7 +69,7 @@ await post("/__admin/orders/pay_123/transition", { to: "Delivered" })
69
69
 
70
70
  | Route | Behaviour |
71
71
  | --- | --- |
72
- | `POST /api/v1/generate-access-token` | JSON `{client_id, client_secret}` → `{access_token, token_type: "Bearer", expires_in: 86400}`. Any pair works unless `clients` is set (`PUT /__admin/settings`). Tokens stay valid 24 h on the mock clock; our client caches for 24 h and never refreshes on 401. |
72
+ | `POST /api/v1/generate-access-token` | JSON `{client_id, client_secret}` → `{access_token, token_type: "Bearer", expires_in: 86400}`. Any pair works unless `clients` is set (`PUT /__admin/settings`). Tokens stay valid 24 h on the emulator clock; our client caches for 24 h and never refreshes on 401. |
73
73
  | `POST /api/v1/orders` | Validates the submit payload against the contract; a violation is 422 `{message, errors: {"patient.phone": ["…"]}}`. An inactive or unknown `preset_catalog_id` is 422 (under `unknownPresets: "accept"` an unknown UUID becomes an active catalog row named after the request's `medication_name`). A repeated `order.sender_order_id` is 409. Success: `{success: true, order_tracking_id: "RXV-…", sender_order_id, status: "Created"}` (the tracking id is always a string). |
74
74
  | `GET /api/v1/orders/{id}` | `id` is the tracking id **or** the sender order id (our payment id, the recovery lookup). Returns `rxstatus`, `orderstatus`, `shipping_status`, `delivered_date`, `trackingnumber`, `shippingservice`, `shippingcarrier`, `shipmenttrackingurl`, `cancellable`, and the id under `order_tracking_id`, `tracking_id` and `orderReferenceID`. |
75
75
  | `DELETE /api/v1/orders/{id}` | Cancels while `cancellable` (until shipped), emitting the webhook; otherwise 409. |
@@ -93,7 +93,7 @@ now, and `PUT /__admin/webhook-endpoints` sets per-namespace receivers.
93
93
  | `PUT /__admin/catalog` | `{items: [{catalog_id, medication_name, medication_strength?, package_size?, quantity?, quantity_units?, medication_form?, route?, states?, status?}], mode?: "replace" \| "merge"}` for the calling namespace (`replace` is the default; `merge` upserts by `catalog_id`). Answers `{count}`, the namespace's row count. `items` may also be sent as `data`. |
94
94
  | `GET /__admin/catalog` | The namespace's rows, as `{data: [...]}`. |
95
95
  | `PUT /__admin/settings` | `{tokenTtlSeconds?, staticTokens?, clients?, autoAdvance?: {afterMs, path} \| null, unknownPresets?: "reject" \| "accept"}` for the calling namespace. `unknownPresets` defaults to `reject`, as the sandbox does. `staticTokens` admits `RXVORTEX_API_TOKEN` (the catalog client's static bearer). |
96
- | `POST /__admin/tick` | Apply every auto-advance step that is due on the mock clock (the served mock also ticks every 100 ms). |
96
+ | `POST /__admin/tick` | Apply every auto-advance step that is due on the emulator clock (the served emulator also ticks every 100 ms). |
97
97
  | `GET /__admin/orders` | The namespace's orders. |
98
98
 
99
99
  Fault presets (`POST /__admin/faults {"preset": "<name>", "count"?: n}`; `GET /__admin/faults/presets`):
@@ -122,8 +122,8 @@ the client id they were issued to).
122
122
 
123
123
  | Export | Kind | Description |
124
124
  | --- | --- | --- |
125
- | `RxVortexAPI` | class | The in-process mock: `fetch(request)`, `reset()`, `transition(id, {to, …})`, `tick()`, `orders()`. Options: `sqlite`, `now`, `namespace`, `catalog`, `settings`, `onWebhook`. |
126
- | `createRuntime` | function | The mock with the full service contract (health, admin, namespaces, credentials, presets, webhooks). Options: `webhooks: {url, secret, retryDelaysMs?, fetch?}`, `settings`, `catalog`, `tickMs`, `clock`, `seed`, `adminKey`, `onLog`. |
125
+ | `RxVortexAPI` | class | The in-process emulator: `fetch(request)`, `reset()`, `transition(id, {to, …})`, `tick()`, `orders()`. Options: `sqlite`, `now`, `namespace`, `catalog`, `settings`, `onWebhook`. |
126
+ | `createRuntime` | function | The emulator with the full service contract (health, admin, namespaces, credentials, presets, webhooks). Options: `webhooks: {url, secret, retryDelaysMs?, fetch?}`, `settings`, `catalog`, `tickMs`, `clock`, `seed`, `adminKey`, `onLog`. |
127
127
  | `RXVORTEX_PRESETS` | object | Every named fault preset. |
128
128
  | `RXVORTEX_NAMESPACE` | string | The service name, `"rxvortex"`. |
129
129
  | `tokenCredential` | function | The client id a bearer token was issued to (how credentials map to namespaces). |
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: **5**
6
- - supported by the mock: **5**
6
+ - supported by the emulator: **5**
7
7
  - parity enabled: **5**
8
8
 
9
- | operationId | route | mock | parity | notes |
9
+ | operationId | route | emulator | parity | notes |
10
10
  | --- | --- | --- | --- | --- |
11
11
  | `GenerateAccessToken` | `POST /api/v1/generate-access-token` | ✅ supported | ✅ | |
12
12
  | `CreateOrder` | `POST /api/v1/orders` | ✅ supported | ⚠️ unsafe (opt-in) | |