@crvouga/mockingbird-service-customerio 3.14.0 → 3.16.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 +12 -0
- package/README.md +30 -3
- package/SUPPORT.md +12 -3
- package/dist/{chunk-4VQ5B5PF.js → chunk-2NI5BGYW.js} +3 -3
- package/dist/{chunk-MMOXP3DX.js → chunk-AECCAFDC.js} +286 -16
- package/dist/{chunk-MMOXP3DX.js.map → chunk-AECCAFDC.js.map} +3 -3
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +57 -6
- package/dist/index.js +3 -1
- package/dist/server.js +2 -2
- package/openapi.yaml +363 -0
- package/package.json +1 -1
- /package/dist/{chunk-4VQ5B5PF.js.map → chunk-2NI5BGYW.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-customerio
|
|
2
2
|
|
|
3
|
+
## 3.16.0 (2026-11-14)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add transcript storage, signature and meetings; tags, teams, messages, macros and calls ([ee21e12](https://github.com/crvouga/mockingbird/commit/ee21e12024768bd52c6902b1722fb35a94d2444b))
|
|
8
|
+
|
|
9
|
+
## 3.15.0 (2026-11-13)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- add customerio, firstpromoter and healthie routes from agent reports ([6873133](https://github.com/crvouga/mockingbird/commit/68731332f83a8a347d2cafc17b8f9fed9b6a492a))
|
|
14
|
+
|
|
3
15
|
## 3.14.0 (2026-11-12)
|
|
4
16
|
|
|
5
17
|
### Features
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Stateful emulator 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
|
-
push, inbox message), message catalog, profile attribute reads with device lists, sender opt-out reconciliation,
|
|
8
|
+
push, inbox message), message catalog, profile attribute reads with device lists, sender opt-out reconciliation, delivery-status reads, read-only workspace lists and customer exports, 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.
|
|
@@ -97,6 +97,10 @@ await cio.close()
|
|
|
97
97
|
| `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. |
|
|
98
98
|
| `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. |
|
|
99
99
|
| `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`. |
|
|
100
|
+
| `GET /v1/reporting_webhooks`, `/v1/subscription_topics`, `/v1/snippets`, `/v1/campaigns` | Bearer auth as above. `{reporting_webhooks: [...]}`, `{topics: [...]}`, `{snippets: [...]}`, `{campaigns: [...]}`: whatever `PUT /__admin/content` seeded, empty by default. Read-only. See [Workspace reads and exports](#workspace-reads-and-exports-best-guess-not-oracle-verified). |
|
|
101
|
+
| `GET /v1/newsletters`, `/v1/sender_identities?limit=&sort=asc\|desc&start=&hidden=` | `{newsletters: [...], next?}`, `{sender_identities: [...], next?}` from seeded content. `limit` (positive integer) pages; follow `next` with `start`; `sort=desc` reverses the seeded order. Senders with `hidden: true` are listed only with `hidden=true`. A bad `limit`, `sort` or cursor is 400. |
|
|
102
|
+
| `POST /v1/exports/customers` | `{filters, attributes?}` → `{export: {id, type: "customers", status: "done", failed: false, total, downloads, created_at, updated_at, deduplicate_id}}`. `filters` is one node: `{and: [...]}`, `{or: [...]}`, `{not: {...}}` or `{attribute: {field, operator: "eq"\|"exists", value?, inverse?}}`, evaluated against the emulator's profiles (stored traits plus `id`, `cio_id`, `email`, `unsubscribed`; `eq` compares as strings). Ids count from 1 per namespace. A missing or malformed filter is 400 and creates nothing; `{segment: {...}}` is 400 `filters: segment filters are not supported by the emulator` (no segments are modelled). |
|
|
103
|
+
| `GET /v1/exports/{export_id}`, `/v1/exports/{export_id}/download` | `{export: {...}}`, or `{url}` pointing at the runtime's `GET /__admin/exports/{id}/file` (with the `/__admin/ns/<name>` prefix outside the default namespace), which serves the CSV: header `id,cio_id,email,<attributes…>`, one row per matching person, frozen at creation. Each download request adds 1 to `downloads`. Unknown ids are 404 `{meta: {error: "not found"}}`. |
|
|
100
104
|
| `POST /click/{linkId}` | Our backend's click report (unauthenticated) → 200, counts the click and posts a `clicked` reporting event. Unknown link: plain-text 404. |
|
|
101
105
|
| `GET /click/{linkId}` | A browser following a tracked link → 302 to the original URL. |
|
|
102
106
|
|
|
@@ -123,6 +127,8 @@ is the JSON string of subscription preferences. `timestamp` never runs ahead of
|
|
|
123
127
|
| `POST /__admin/namespace-clock` | `{"advance": <ms>}` adds to this namespace's clock offset only. |
|
|
124
128
|
| `GET\|PUT /__admin/transactional` | Read or replace the workspace's transactional messages (`[{id?, name?, trigger_name, link_tracking?, send_to_unsubscribed?}]`). |
|
|
125
129
|
| `GET /__admin/devices/:id`, `PUT /__admin/devices/:id` | Read or replace a person's device list: `{devices: [{token, platform, last_used?, attributes?}]}` (at most 25; `last_used` defaults to now). Creates the person when missing and applies `deviceTokenOwnership` to the tokens. |
|
|
130
|
+
| `GET\|PUT /__admin/content` | Read or replace the read-only workspace lists: `{reporting_webhooks?, topics?, snippets?, campaigns?, newsletters?, sender_identities?}`, each an array of vendor-shaped objects that replaces that list (lists left out stay). Missing `id`s count from 1; reporting webhooks need `name`, `endpoint` and `events` (defaults `type: "webhook"`, `disabled: false`, `full_resolution: true`, `with_content: false`), snippets need `name` and `value` (`updated_at` defaults to now), topics default `identifier` to `topic_<id>`. Any invalid item is 400 and nothing changes. |
|
|
131
|
+
| `GET /__admin/exports/:id/file` | The export's CSV (the link `GET /v1/exports/{id}/download` returns). Behind `adminKey` when one is set. |
|
|
126
132
|
| `GET\|PUT /__admin/settings` | `{strictMessages?, trackingBase?, keys?, statusVisibleAfterMs?, clockOffsetMs?, retainMessageDataForTests?, transactionalListKey?, pushUnknownTargets?: "accept"\|"reject", deviceTokenOwnership?: "move"\|"share"}` (`keys` restricts accepted write / App API keys). |
|
|
127
133
|
|
|
128
134
|
Fault presets (`POST /__admin/faults {"preset": "<name>", "count"?: n}`; `GET /__admin/faults/presets`):
|
|
@@ -175,11 +181,31 @@ Each of these is a **best guess, not oracle-verified**:
|
|
|
175
181
|
- Error texts for these cases (`platform: values other than all require web push`,
|
|
176
182
|
`to: device not found on profile`, …) are emulator wording.
|
|
177
183
|
|
|
184
|
+
### Workspace reads and exports (best guess, not oracle-verified)
|
|
185
|
+
|
|
186
|
+
Added for [#759](https://github.com/crvouga/mockingbird/issues/759). No live Customer.io workspace
|
|
187
|
+
backs these routes (no parity keys); the shapes follow the vendor's published App API OpenAPI
|
|
188
|
+
document (<https://docs.customer.io/files/journeys-app.json>, operations `listWebhooks`,
|
|
189
|
+
`getTopics`, `exportPeopleData`, `getExport`, `downloadExport`, `listSnippets`, `listCampaigns`,
|
|
190
|
+
`listNewsletters`, `listSenders`; reference: <https://docs.customer.io/api/app/>). Each of these is
|
|
191
|
+
a **best guess, not oracle-verified**:
|
|
192
|
+
|
|
193
|
+
- The lists hold only what `PUT /__admin/content` seeded; nothing the emulator does (sends,
|
|
194
|
+
reporting webhooks it posts, subscription preferences) adds to them.
|
|
195
|
+
- Pagination for newsletters and senders: the cursor encoding, `asc` as the default `sort`, and no
|
|
196
|
+
page-size cap are emulator choices. The other lists are not paginated.
|
|
197
|
+
- Exports finish at once (`status: "done"`); the vendor builds them asynchronously. The CSV columns
|
|
198
|
+
and layout are unobserved; `downloads` counting each link request is a guess. The vendor's link is
|
|
199
|
+
a signed URL that expires after 15 minutes; the emulator's does not expire.
|
|
200
|
+
- Error texts for these routes are emulator wording in the App API `{meta: {error}}` shape.
|
|
201
|
+
|
|
178
202
|
### Deliberately not modelled
|
|
179
203
|
|
|
180
204
|
- 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.
|
|
181
205
|
- Rendering: templates are not rendered; the outbox holds `message_data`, not HTML.
|
|
182
|
-
-
|
|
206
|
+
- Segments, journeys, broadcasts, writes to campaigns / newsletters / snippets / reporting
|
|
207
|
+
webhooks / sender identities, delivery exports, and the Track API (`track.customer.io`). Campaign,
|
|
208
|
+
newsletter and the other workspace lists are read-only seeded content.
|
|
183
209
|
- CDP `page`, `screen`, `group` and `alias` calls (our consumers send none).
|
|
184
210
|
- Push delivery itself (no APNs/FCM calls), push reporting webhooks are not emitted automatically
|
|
185
211
|
(post `delivered` / `opened` / `failed` with `POST /__admin/reporting-events`), web push
|
|
@@ -194,7 +220,7 @@ Each of these is a **best guess, not oracle-verified**:
|
|
|
194
220
|
|
|
195
221
|
| Export | Kind | Description |
|
|
196
222
|
| --- | --- | --- |
|
|
197
|
-
| `CustomerIoAPI` | class | The in-process emulator: `fetch(request)`, `reset()`, `report(input)`, `profiles()`, `mergeProfile(id, patch)`, `transitionDelivery(id, state)`, `advanceClock(ms)`, `state`. Options: `sqlite`, `now`, `wallClock`, `namespace`, `messages`, `settings`, `onReport`. |
|
|
223
|
+
| `CustomerIoAPI` | class | The in-process emulator: `fetch(request)`, `reset()`, `report(input)`, `profiles()`, `mergeProfile(id, patch)`, `transitionDelivery(id, state)`, `advanceClock(ms)`, `setContent(body)`, `content()`, `exportFile(id)`, `state`. Options: `sqlite`, `now`, `wallClock`, `namespace`, `publicNamespace`, `adminPrefix`, `messages`, `settings`, `onReport`. |
|
|
198
224
|
| `createRuntime` | function | The emulator with the full service contract (health, admin, namespaces, credentials, presets, outbox, reporting webhooks). Options: `webhooks: {url, secret, retryDelaysMs?, fetch?}`, `messages`, `settings`, `clock`, `wallClock`, `seed`, `adminKey`, `onLog`, `sqlite`. |
|
|
199
225
|
| `CUSTOMERIO_PRESETS` | object | Every named fault preset. |
|
|
200
226
|
| `CUSTOMERIO_NAMESPACE` | string | The service name, `"customerio"`. |
|
|
@@ -202,6 +228,7 @@ Each of these is a **best guess, not oracle-verified**:
|
|
|
202
228
|
| `signReporting` | function | `(secret, timestampSeconds, body)` → the hex `x-cio-signature`. |
|
|
203
229
|
| `customerIoCredential` | function | The write key or App API key a request carries. |
|
|
204
230
|
| `DEFAULT_TRANSACTIONAL_MESSAGES`, `DEFAULT_SETTINGS`, `TRANSACTIONAL_EMAIL_KEYS` | values | The seeded catalog, settings, and our backend's legacy email keys. |
|
|
231
|
+
| `CONTENT_LISTS` | values | The workspace content lists `PUT /__admin/content` seeds. |
|
|
205
232
|
| `DEVICE_UPSERT_EVENT`, `DEVICE_DELETE_EVENT`, `MAX_DEVICES_PER_PERSON` | values | The `Device Created or Updated` / `Device Deleted` event names that maintain a person's device list, and its cap (25; a 26th device drops the oldest). |
|
|
206
233
|
| `DELIVERY_STATES` | values | Delivery lifecycle states. An accepted send starts at `pending`. |
|
|
207
234
|
| `FAILURE_STATES` | values | Terminal failure states: `bounced`, `dropped`, `failed`, `spammed`, `undeliverable`, `suppressed`. `delivered` is success; `sent` stays open. |
|
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 emulator: **
|
|
7
|
-
- parity enabled: **
|
|
5
|
+
- operations in spec: **24**
|
|
6
|
+
- supported by the emulator: **24**
|
|
7
|
+
- parity enabled: **24**
|
|
8
8
|
|
|
9
9
|
| operationId | route | emulator | parity | notes |
|
|
10
10
|
| --- | --- | --- | --- | --- |
|
|
@@ -21,5 +21,14 @@ Generated from `openapi.yaml`; do not edit by hand.
|
|
|
21
21
|
| `ListOptOuts` | `GET /v1/optouts` | ✅ supported | ✅ | |
|
|
22
22
|
| `GetCustomerOptOuts` | `GET /v1/customers/{customer_id}/optouts` | ✅ supported | ✅ | |
|
|
23
23
|
| `GetMessage` | `GET /v1/messages/{message_id}` | ✅ supported | ✅ | |
|
|
24
|
+
| `ListReportingWebhooks` | `GET /v1/reporting_webhooks` | ✅ supported | ✅ | Best guess from vendor docs, not oracle-verified. |
|
|
25
|
+
| `ListSubscriptionTopics` | `GET /v1/subscription_topics` | ✅ supported | ✅ | Best guess from vendor docs, not oracle-verified. |
|
|
26
|
+
| `ExportCustomers` | `POST /v1/exports/customers` | ✅ supported | ⚠️ unsafe (opt-in) | Best guess from vendor docs, not oracle-verified. |
|
|
27
|
+
| `GetExport` | `GET /v1/exports/{export_id}` | ✅ supported | ✅ | Best guess from vendor docs, not oracle-verified. |
|
|
28
|
+
| `DownloadExport` | `GET /v1/exports/{export_id}/download` | ✅ supported | ✅ | Best guess from vendor docs, not oracle-verified. |
|
|
29
|
+
| `ListSnippets` | `GET /v1/snippets` | ✅ supported | ✅ | Best guess from vendor docs, not oracle-verified. |
|
|
30
|
+
| `ListCampaigns` | `GET /v1/campaigns` | ✅ supported | ✅ | Best guess from vendor docs, not oracle-verified. |
|
|
31
|
+
| `ListNewsletters` | `GET /v1/newsletters` | ✅ supported | ✅ | Best guess from vendor docs, not oracle-verified. |
|
|
32
|
+
| `ListSenderIdentities` | `GET /v1/sender_identities` | ✅ supported | ✅ | Best guess from vendor docs, not oracle-verified. |
|
|
24
33
|
| `FollowClick` | `GET /click/{linkId}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
25
34
|
| `ReportClick` | `POST /click/{linkId}` | ✅ supported | ⚠️ unsafe (opt-in) | |
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
parseFaultHeader,
|
|
10
10
|
resolveAdminPrefix,
|
|
11
11
|
restoreClock
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AECCAFDC.js";
|
|
13
13
|
|
|
14
14
|
// ../../adapters/node/dist/cli.js
|
|
15
15
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
@@ -3079,7 +3079,7 @@ async function preflightFleet(config, options) {
|
|
|
3079
3079
|
break;
|
|
3080
3080
|
}
|
|
3081
3081
|
}
|
|
3082
|
-
targets.set(name, { ...target, packageVersion: packageVersion ?? "3.
|
|
3082
|
+
targets.set(name, { ...target, packageVersion: packageVersion ?? "3.16.0" });
|
|
3083
3083
|
} catch (error) {
|
|
3084
3084
|
throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
3085
3085
|
}
|
|
@@ -5115,4 +5115,4 @@ export {
|
|
|
5115
5115
|
createServer2 as createServer,
|
|
5116
5116
|
serveTarget
|
|
5117
5117
|
};
|
|
5118
|
-
//# sourceMappingURL=chunk-
|
|
5118
|
+
//# sourceMappingURL=chunk-2NI5BGYW.js.map
|