Repository navigation
Commit fe05393
SDK 12.2.0: triggers.ensureBrewEvent for Brew-event triggers (brew-v2#2071) (#66)
* SDK 12.4.0: triggers.ensureBrewEvent for Brew-event triggers (brew-v2#2071)
GetBrew/brew-v2#2071 adds triggers Brew starts itself, the first being a
contact unsubscribing. This mirrors that API:
- `brew.automations.triggers.ensureBrewEvent({ event, scope, domainId? })`
wraps `POST /v1/automations/triggers/brew-events`, the get-or-create
for one scope, and returns the row plus `created`.
- Exports `EnsureBrewEventTriggerInput`, `EnsureBrewEventTriggerResponse`
and `BrewEventTriggerConfig`.
- The bundled spec takes exactly brew-v2#2071's spec change; the
consent-source sync stays with #62. Generated types are regenerated.
Trigger `provider` and instance `source` gain `brew_event`, and the error
codes gain `TRIGGER_NOT_FIREABLE`.
- `docs/automations.md` gets an "Unsubscribe triggers" section, and the
`fire` JSDoc names the 409.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Release as 12.2.0; spec delta for Brew-event test runs
- 12.2.0, the next free version: this lands before the open 12.2.0 and
12.3.0 branches, which renumber when they merge.
- Vendored spec delta from brew-v2#2071: the test operation says a
Brew-event automation's test runs on Brew's sample with passed fields
laid over it, and unsubscribe.reasons is required. Types regenerated.
- Docs and changelog: the sample overlay, and that mail from another
marketing domain reaches the contact only while they are still on it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 2f9d372 commit fe05393
12 files changed
Lines changed: 69471 additions & 82 deletions
File tree
- docs
- openapi
- src
- generated
- resources/automations/triggers
- tests/resources/automations/triggers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
3 | 27 | | |
4 | 28 | | |
5 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
171 | 220 | | |
172 | 221 | | |
173 | 222 | | |
| |||
193 | 242 | | |
194 | 243 | | |
195 | 244 | | |
196 | | - | |
| 245 | + | |
| 246 | + | |
197 | 247 | | |
198 | 248 | | |
199 | 249 | | |
| |||
0 commit comments