@crvouga/mockingbird-service-intercom 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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog — @crvouga/mockingbird-service-intercom
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-intercom 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-intercom/`; no repository checkout is needed to discover the mock's
4
+ inside `node_modules/@crvouga/mockingbird-service-intercom/`; 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,8 +1,8 @@
1
1
  # @crvouga/mockingbird-service-intercom
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 **Intercom REST API (version 2.11)** for test suites. It serves the calls
5
+ Stateful emulator of the **Intercom REST API (version 2.11)** for test suites. It serves the calls
6
6
  our backend makes:
7
7
 
8
8
  - **contacts:** search, create (409 on duplicates, the way Intercom does), update and get;
@@ -125,7 +125,7 @@ A query is either a filter `{field, operator, value}` or a compound
125
125
 
126
126
  ### Webhooks
127
127
 
128
- The mock sends webhooks for these events:
128
+ The emulator sends webhooks for these events:
129
129
 
130
130
  | Event | Topic |
131
131
  | --- | --- |
@@ -156,7 +156,7 @@ Each delivery is a JSON body posted with `X-Hub-Signature: sha1=<hex HMAC-SHA1(s
156
156
  - **Only the new part.** `item.conversation_parts` holds just the part that caused the event,
157
157
  as in Intercom's own payloads.
158
158
  - **Wall-clock timestamps.** The part's timestamps and the envelope's `created_at` use real
159
- time, never the mock clock, because the EMR rejects parts more than 5 minutes old against its
159
+ time, never the emulator clock, because the EMR rejects parts more than 5 minutes old against its
160
160
  own clock.
161
161
  - **Stable id.** The notification `id` stays the same on retries and on `webhook_duplicate`, so
162
162
  the backend's `delivery_id ?? id` dedupe and the EMR's processed-marker dedupe both hold.
@@ -169,7 +169,7 @@ Each delivery is a JSON body posted with `X-Hub-Signature: sha1=<hex HMAC-SHA1(s
169
169
  | Route | Effect |
170
170
  | --- | --- |
171
171
  | `POST /__admin/conversations/:id/admin-reply` | `{adminId? \| admin_id? (default: first admin), body, messageType?: "comment" \| "note"}` appends an admin part ("the care team replied") and fires the webhook. |
172
- | `GET /__admin/outbox?since=&to=&limit=`, `GET /__admin/outbox/:id` | What the client sent through `POST /conversations` and `/reply`, oldest first: `{id, operation, conversationId, contactId, partId, partType ("source" for the opening message), authorType, authorId, hasBody, bodyLength, attachmentCount, at, createdAt}`. **Metadata only**: the body is never stored. `to=` matches the conversation or contact id; `since=` takes epoch ms or ISO-8601 on the mock clock. The admin plane's own replies are not listed. |
172
+ | `GET /__admin/outbox?since=&to=&limit=`, `GET /__admin/outbox/:id` | What the client sent through `POST /conversations` and `/reply`, oldest first: `{id, operation, conversationId, contactId, partId, partType ("source" for the opening message), authorType, authorId, hasBody, bodyLength, attachmentCount, at, createdAt}`. **Metadata only**: the body is never stored. `to=` matches the conversation or contact id; `since=` takes epoch ms or ISO-8601 on the emulator clock. The admin plane's own replies are not listed. |
173
173
  | `POST /__admin/conversations/:id/close`, `…/open` | `{adminId?}` closes or reopens as an admin and fires the webhook. |
174
174
  | `POST /__admin/conversations` | `{contactId \| externalId, adminId?, body}` creates an admin-initiated conversation. The EMR then looks the member up by `contacts[0].external_id`. |
175
175
  | `GET /__admin/conversations`, `GET /__admin/contacts` | The namespace's records. |
@@ -209,19 +209,19 @@ never records message bodies or contact details.
209
209
  - Tags, notes, companies, segments, tickets, articles, data-attribute management, teams and
210
210
  SLAs. These appear only as empty lists where a payload has them.
211
211
  - Rate-limit headers on normal responses. Only `rate_limited` sends them.
212
- - Intercom's exact wording for the idempotency conflict, which is unverified: the mock answers
212
+ - Intercom's exact wording for the idempotency conflict, which is unverified: the emulator answers
213
213
  409 `conflict`.
214
214
 
215
215
  ## API
216
216
 
217
217
  | Export | Kind | Description |
218
218
  | --- | --- | --- |
219
- | `IntercomAPI` | class | The in-process mock: `fetch(request)`, `reset()`, `appendPart(…)`, `manage(…)`, `startAdminConversation(…)`, `conversations()`, `contacts()`, `conversationBody(…)`, `contactBody(…)`, `error(…)`, `state`. Options: `sqlite`, `now`, `wallClock`, `namespace`, `admins`, `settings`, `onWebhook`. |
219
+ | `IntercomAPI` | class | The in-process emulator: `fetch(request)`, `reset()`, `appendPart(…)`, `manage(…)`, `startAdminConversation(…)`, `conversations()`, `contacts()`, `conversationBody(…)`, `contactBody(…)`, `error(…)`, `state`. Options: `sqlite`, `now`, `wallClock`, `namespace`, `admins`, `settings`, `onWebhook`. |
220
220
  | `IntercomError` | class | A vendor error (status, code, message) raised by the admin-facing methods. |
221
- | `createRuntime` | function | The mock with the full service contract (health, admin, namespaces, credentials, presets, webhooks). Options: `webhooks: {urls, secret?, events?, retryDelaysMs?, fetch?}` (a `urls` entry may be `{url, events}` to override `events` for that URL), `admins`, `settings`, `clock`, `wallClock`, `seed`, `adminKey`, `onLog`, `sqlite`. |
221
+ | `createRuntime` | function | The emulator with the full service contract (health, admin, namespaces, credentials, presets, webhooks). Options: `webhooks: {urls, secret?, events?, retryDelaysMs?, fetch?}` (a `urls` entry may be `{url, events}` to override `events` for that URL), `admins`, `settings`, `clock`, `wallClock`, `seed`, `adminKey`, `onLog`, `sqlite`. |
222
222
  | `INTERCOM_PRESETS` | object | Every named fault preset. |
223
223
  | `INTERCOM_NAMESPACE` | string | The service name, `"intercom"`. |
224
- | `INTERCOM_TOPICS` | array | Every webhook topic the mock can send, including the opt-in member topics. |
224
+ | `INTERCOM_TOPICS` | array | Every webhook topic the emulator can send, including the opt-in member topics. |
225
225
  | `HUB_SIGNATURE_HEADER`, `signHub` | values | `X-Hub-Signature` and the `sha1=<hex>` signer, for your own receivers. |
226
226
  | `DEFAULT_ADMINS`, `DEFAULT_SETTINGS` | values | The seeded admins and default settings. |
227
227
  | `toHtml`, `toPlaintext`, `encodeCursor`, `decodeCursor` | functions | Body rendering and the search cursor format. |
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: **14**
6
- - supported by the mock: **14**
6
+ - supported by the emulator: **14**
7
7
  - parity enabled: **14**
8
8
 
9
- | operationId | route | mock | parity | notes |
9
+ | operationId | route | emulator | parity | notes |
10
10
  | --- | --- | --- | --- | --- |
11
11
  | `SearchContacts` | `POST /contacts/search` | ✅ supported | ✅ | |
12
12
  | `ListContacts` | `GET /contacts` | ✅ supported | ✅ | |