Commit b3d4132
fix(client): align webhook/schedule MCP calls with current api shape
Six contract mismatches discovered while running every advertised tool
against a live local api. After this commit the MCP exercises all
webhook + schedule CRUD endpoints without errors:
- createWebhook now sends {events: [event], url, signingSecret} so the
API-Platform-exposed POST /api/v1/webhooks accepts it. The single
user-facing event arg is expanded internally.
- updateWebhook expands {event} → {events: [event]} the same way.
- toggleWebhook switched POST → PATCH (API-Platform exposes only PATCH
on /webhooks/{uuid}/toggle).
- testWebhook now hits /zapier/webhooks/{uuid}/test — the main webhook
bundle has no /test endpoint; the Zapier-integration controller
accepts the same UUID.
- updateSchedule switched PATCH → PUT (API-Platform default for the
schedules resource).
- runSchedule path /schedules/{uuid}/run → /schedules/{uuid}/run-now.
Also: respect EXPORTCOMMENTS_API_BASE env var so the same client can be
pointed at a local api during development (defaults unchanged to
https://exportcomments.com).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 287778d commit b3d4132
1 file changed
Lines changed: 24 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
280 | 281 | | |
281 | 282 | | |
282 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
283 | 288 | | |
284 | 289 | | |
285 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
286 | 296 | | |
287 | 297 | | |
288 | 298 | | |
289 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
290 | 303 | | |
291 | 304 | | |
292 | 305 | | |
293 | 306 | | |
294 | 307 | | |
295 | 308 | | |
| 309 | + | |
296 | 310 | | |
297 | | - | |
| 311 | + | |
298 | 312 | | |
299 | 313 | | |
300 | | - | |
| 314 | + | |
| 315 | + | |
301 | 316 | | |
302 | | - | |
| 317 | + | |
303 | 318 | | |
304 | 319 | | |
305 | 320 | | |
| |||
318 | 333 | | |
319 | 334 | | |
320 | 335 | | |
321 | | - | |
| 336 | + | |
322 | 337 | | |
323 | 338 | | |
324 | 339 | | |
325 | 340 | | |
326 | 341 | | |
327 | 342 | | |
328 | 343 | | |
329 | | - | |
| 344 | + | |
330 | 345 | | |
331 | 346 | | |
332 | 347 | | |
| |||
0 commit comments