@crvouga/mockingbird-service-customerio 2.1.0 → 2.3.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 +33 -4
- package/README.md +5 -1
- package/SUPPORT.md +5 -3
- package/dist/{chunk-53O3NJZ5.js → chunk-E7RLJOZK.js} +2 -2
- package/dist/chunk-VG47BJN6.js +4769 -0
- package/dist/chunk-VG47BJN6.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +167 -150
- package/dist/index.js +1 -1
- package/dist/server.d.ts +353 -332
- package/dist/server.js +2 -2
- package/openapi.yaml +80 -0
- package/package.json +2 -2
- package/dist/chunk-LFEHF77A.js +0 -4577
- package/dist/chunk-LFEHF77A.js.map +0 -7
- /package/dist/{chunk-53O3NJZ5.js.map → chunk-E7RLJOZK.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-customerio
|
|
2
2
|
|
|
3
|
+
## 2.3.0 (2026-10-05)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- compose mock admin APIs ([952bd1f](https://github.com/crvouga/mockingbird/commit/952bd1f679bd442c9a5348a0d9c4d40ad0ac165c))
|
|
8
|
+
- add Fargate task acceptance mock ([f65fc3f](https://github.com/crvouga/mockingbird/commit/f65fc3f293b2fdb41fd45dd1693a5420c6a5109a))
|
|
9
|
+
- keep resource views live ([82c80e1](https://github.com/crvouga/mockingbird/commit/82c80e110b4aa551a17d0ee451c5d08167755267))
|
|
10
|
+
- add LocalStack free tier mocks ([84b7d0c](https://github.com/crvouga/mockingbird/commit/84b7d0ccf4acc7257bb3c3b466a38e30d5b4ab33))
|
|
11
|
+
- implement github reference semantics ([10143e8](https://github.com/crvouga/mockingbird/commit/10143e8364905d77ccfa188d8b6573b1f1003c56))
|
|
12
|
+
- implement docker attach upgrade handshake ([39ad1a3](https://github.com/crvouga/mockingbird/commit/39ad1a39b47aeb423b11bc96230d59f1f5985fa0))
|
|
13
|
+
- preserve accepted docker mutations across response loss ([c2b2d7d](https://github.com/crvouga/mockingbird/commit/c2b2d7dafffe653b3ae9667ec5019d342a68e802))
|
|
14
|
+
|
|
15
|
+
### Fixes and improvements
|
|
16
|
+
|
|
17
|
+
- reconcile combined PR integration ([124d5be](https://github.com/crvouga/mockingbird/commit/124d5bed7576535ff481ce6da7d2369957799665))
|
|
18
|
+
- preserve inferred form headers ([02bdd28](https://github.com/crvouga/mockingbird/commit/02bdd2806a9a934607ecd7ffd0cfbe4f6ba80c91))
|
|
19
|
+
|
|
20
|
+
### Dependencies
|
|
21
|
+
|
|
22
|
+
- `@crvouga/mockingbird-service-sqlite`
|
|
23
|
+
|
|
24
|
+
## 2.2.0 (2026-10-04)
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
- add scripted local API mock ([4a76a11](https://github.com/crvouga/mockingbird/commit/4a76a114e2efad45934e0a93cf29576fd418e15c))
|
|
29
|
+
- reconcile sender opt-outs ([43b7c8e](https://github.com/crvouga/mockingbird/commit/43b7c8e55ff8de7d15efe4db55beda80f01bcbd0))
|
|
30
|
+
|
|
31
|
+
### Fixes and improvements
|
|
32
|
+
|
|
33
|
+
- support embedded route parameters ([127cad9](https://github.com/crvouga/mockingbird/commit/127cad997ef106950c1b866070eea191ba54403f))
|
|
34
|
+
- preserve namespace URLs after main sync ([62a15ce](https://github.com/crvouga/mockingbird/commit/62a15ce9bd453069bde69e3a30c91efc01f8871b))
|
|
35
|
+
|
|
3
36
|
## 2.1.0 (2026-10-04)
|
|
4
37
|
|
|
5
38
|
### Features
|
|
@@ -12,10 +45,6 @@
|
|
|
12
45
|
- fill the embedded viewport ([c1a35a4](https://github.com/crvouga/mockingbird/commit/c1a35a4789389ee9cd06c286d09bd47c4d06c71e))
|
|
13
46
|
- make dialog cleanup immediate ([0c1a3c5](https://github.com/crvouga/mockingbird/commit/0c1a3c5b12584d50c19dcae595b951b8e5417b9c))
|
|
14
47
|
|
|
15
|
-
### Dependencies
|
|
16
|
-
|
|
17
|
-
- `@crvouga/mockingbird-service-sqlite`
|
|
18
|
-
|
|
19
48
|
## 2.0.0 (2026-10-04)
|
|
20
49
|
|
|
21
50
|
### ⚠️ Breaking changes
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Stateful mock of **Customer.io** for test suites, serving all three hosts our code talks to from
|
|
6
6
|
one process: the Segment-compatible **CDP** (`identify`, `track`, `batch`, exactly as
|
|
7
7
|
`@customerio/cdp-analytics-node` posts them), the **App API** transactional sends (email, SMS,
|
|
8
|
-
inbox message), message catalog, profile attribute reads, and delivery-status reads, and the
|
|
8
|
+
inbox message), message catalog, profile attribute reads, sender opt-out reconciliation, and delivery-status reads, and the
|
|
9
9
|
**link-tracking** click endpoint. Sends land in an outbox a suite asserts on (and reads links out
|
|
10
10
|
of); reporting events (`unsubscribed`, `subscribed`, `spammed`, subscription preferences,
|
|
11
11
|
`clicked`) are posted to our reporting webhook, signed the way Customer.io signs them.
|
|
@@ -81,6 +81,8 @@ await cio.close()
|
|
|
81
81
|
| `GET /v1/transactional` | `{messages: [{id, name, trigger_name, description, send_to_unsubscribed, link_tracking, …}]}`, no pagination (the whole catalog, including hundreds of rows). Seeded with `acme_<key>` for every legacy email key the consumer app has, plus `acme_inbox_message` and `acme_playground_notification` (ids 1–21). `transactionalListKey: "transactional"` renames the array key. |
|
|
82
82
|
| `GET /v1/transactional/{id}` | `{message: {...}}` by id or trigger name (case-insensitive), or 404. |
|
|
83
83
|
| `GET /v1/customers/{customer_id}/attributes?id_type=id\|email\|cio_id` | `{customer: {identifiers: {id, email?, cio_id}, attributes, devices}}`. Unknown `id_type` is 400; an unknown customer is 404. Attributes spread stored traits, then `id`, `cio_id`, `email`, and `unsubscribed` win. |
|
|
84
|
+
| `GET /v1/optouts?limit=&start=&from=` | Workspace sender opt-outs as `{optouts: [{customer_id, cio_id, optouts: [{channel, from}]}], next?}`. `limit` defaults to 100 (1–1000); follow `next` using `start` until it is absent. `from` filters sender/channel entries, omitting people with no matches. Sender values are trimmed and lowercased; E.164 numbers retain their form. |
|
|
85
|
+
| `GET /v1/customers/{customer_id}/optouts?id_type=id\|email\|cio_id` | `{optouts: [{channel, from}]}` for an existing profile, empty if none, 404 for unknown people. Uses the same identity state as CDP identify and profile updates. App API authentication applies to both reads. |
|
|
84
86
|
| `GET /v1/messages/{delivery_id}` | `{message: {id, type, recipient, customer_id, created, state, status, metrics}}`. `type` is `in_app` for inbox. No `message_data`. 404 when the id is missing or still inside `statusVisibleAfterMs`. Failure states add `failure_message`, `rejection_reason`, and `error`. |
|
|
85
87
|
| `POST /click/{linkId}` | Our backend's click report (unauthenticated) → 200, counts the click and posts a `clicked` reporting event. Unknown link: plain-text 404. |
|
|
86
88
|
| `GET /click/{linkId}` | A browser following a tracked link → 302 to the original URL. |
|
|
@@ -103,6 +105,7 @@ is the JSON string of subscription preferences. `timestamp` never runs ahead of
|
|
|
103
105
|
| `POST /__admin/reporting-events` | `{metric, userId? \| email? \| deliveryId?, objectType?, preferences?: {topics?, channels?}}`: apply it to the profile (`unsubscribed`, `subscribed`, `spammed`, `cio_subscription_preferences_changed`) and post the signed event. Any other metric (`delivered`, `opened`, `bounced`, …) is posted as-is. |
|
|
104
106
|
| `GET /__admin/cdp/events?userId=&type=&event=` | CDP calls received (with `duplicate`). |
|
|
105
107
|
| `GET /__admin/profiles`, `GET /__admin/profiles/:id`, `PUT /__admin/profiles/:id` | Profiles (traits, `cioId`, `unsubscribed`, `channelsOff`, `preferences`). PUT merges `{traits?, email?, unsubscribed?, preferences?}`. |
|
|
108
|
+
| `POST /__admin/optouts` | `{customerId, from, optout: boolean, channel?: "sms"\|"whatsapp"}` scripts STOP (`true`) or START (`false`) for an existing person; unknown people are 404. Only that sender/channel changes. Marketing preferences and reporting webhooks stay independent. State participates in namespaces, snapshots, Timeline, clocks and reset. |
|
|
106
109
|
| `POST /__admin/deliveries/:id` | `{"state": "pending"\|"sent"\|"delivered"\|"bounced"\|"dropped"\|"failed"\|"spammed"\|"undeliverable"\|"suppressed"}`. Stamps `metrics[state]` with unix seconds on the namespace clock. `delivered` is success; the failure states are terminal. |
|
|
107
110
|
| `POST /__admin/namespace-clock` | `{"advance": <ms>}` adds to this namespace's clock offset only. |
|
|
108
111
|
| `GET\|PUT /__admin/transactional` | Read or replace the workspace's transactional messages (`[{id?, name?, trigger_name, link_tracking?, send_to_unsubscribed?}]`). |
|
|
@@ -131,6 +134,7 @@ username) or the App API key (Bearer) through `PUT /__admin/credentials {"creden
|
|
|
131
134
|
|
|
132
135
|
### Deliberately not modelled
|
|
133
136
|
|
|
137
|
+
- Opt-out writes through the public PUT API, phone identifier workspace configuration, Twilio sender identity casing recovery, and automatic carrier STOP callbacks. Use the admin control to script reconciler state; it does not model carrier delivery enforcement.
|
|
134
138
|
- Rendering: templates are not rendered; the outbox holds `message_data`, not HTML.
|
|
135
139
|
- Campaigns, segments, journeys, broadcasts and the Track API (`track.customer.io`).
|
|
136
140
|
- CDP `page`, `screen`, `group` and `alias` calls (our consumers send none).
|
package/SUPPORT.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Generated from `openapi.yaml`; do not edit by hand.
|
|
4
4
|
|
|
5
|
-
- operations in spec: **
|
|
6
|
-
- supported by the mock: **
|
|
7
|
-
- parity enabled: **
|
|
5
|
+
- operations in spec: **14**
|
|
6
|
+
- supported by the mock: **14**
|
|
7
|
+
- parity enabled: **14**
|
|
8
8
|
|
|
9
9
|
| operationId | route | mock | parity | notes |
|
|
10
10
|
| --- | --- | --- | --- | --- |
|
|
@@ -17,6 +17,8 @@ Generated from `openapi.yaml`; do not edit by hand.
|
|
|
17
17
|
| `ListTransactionalMessages` | `GET /v1/transactional` | ✅ supported | ✅ | |
|
|
18
18
|
| `GetTransactionalMessage` | `GET /v1/transactional/{transactional_id}` | ✅ supported | ✅ | |
|
|
19
19
|
| `GetCustomerAttributes` | `GET /v1/customers/{customer_id}/attributes` | ✅ supported | ✅ | |
|
|
20
|
+
| `ListOptOuts` | `GET /v1/optouts` | ✅ supported | ✅ | |
|
|
21
|
+
| `GetCustomerOptOuts` | `GET /v1/customers/{customer_id}/optouts` | ✅ supported | ✅ | |
|
|
20
22
|
| `GetMessage` | `GET /v1/messages/{message_id}` | ✅ supported | ✅ | |
|
|
21
23
|
| `FollowClick` | `GET /click/{linkId}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
22
24
|
| `ReportClick` | `POST /click/{linkId}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createRuntime,
|
|
4
4
|
parseDuration,
|
|
5
5
|
resolveAdminPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VG47BJN6.js";
|
|
7
7
|
|
|
8
8
|
// ../../adapters/node/dist/cli.js
|
|
9
9
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
@@ -855,4 +855,4 @@ export {
|
|
|
855
855
|
createServer2 as createServer,
|
|
856
856
|
serveTarget
|
|
857
857
|
};
|
|
858
|
-
//# sourceMappingURL=chunk-
|
|
858
|
+
//# sourceMappingURL=chunk-E7RLJOZK.js.map
|