@productcraft/social 1.0.4 → 1.1.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.
@@ -0,0 +1,3224 @@
1
+ // src/_generated/testing.ts
2
+ var ROUTES = [
3
+ { op: "conversations.unreadCount", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/unread-count$/, status: 200, contentType: "application/json", body: { count: 7 } },
4
+ { op: "actors.byExternal.batch", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/actors\/by-external\/batch$/, status: 200, contentType: "application/json", body: {
5
+ data: [
6
+ {
7
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
8
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
9
+ created_at: "2026-05-01T12:00:00.000Z",
10
+ display_name: "Ada Lovelace",
11
+ external_id: "user_abc123",
12
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
13
+ is_private: false,
14
+ metadata: { tier: "pro" },
15
+ status: "active",
16
+ updated_at: "2026-05-01T12:00:00.000Z"
17
+ }
18
+ ],
19
+ missing: ["user_ghost"]
20
+ } },
21
+ { op: "dismissedSuggestions.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/dismissed-suggestions$/, status: 201, contentType: "application/json", body: {
22
+ created: true,
23
+ edge: {
24
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
25
+ created_at: "2026-05-01T12:00:00.000Z",
26
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
27
+ dst_post_id: null,
28
+ id: "eeeeeeee-0000-0000-0000-000000000001",
29
+ kind: "follow",
30
+ payload: {},
31
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
32
+ }
33
+ } },
34
+ { op: "webhooks.eventTypes.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/event-types$/, status: 200, contentType: "application/json", body: {
35
+ data: [
36
+ {
37
+ category: "Users",
38
+ description: "A user signed up or was created by an admin.",
39
+ example: {},
40
+ type: "post.created"
41
+ }
42
+ ]
43
+ } },
44
+ { op: "webhooks.eventTypes.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/event-types$/, status: 200, contentType: "application/json", body: {
45
+ data: [
46
+ {
47
+ category: "Users",
48
+ description: "A user signed up or was created by an admin.",
49
+ example: {},
50
+ type: "post.created"
51
+ }
52
+ ]
53
+ } },
54
+ { op: "webhooks.endpoints.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/endpoints$/, status: 201, contentType: "application/json", body: {
55
+ consecutive_failures: 1,
56
+ created_at: "2026-01-01T00:00:00.000Z",
57
+ description: "Production receiver",
58
+ disabled_at: "2026-01-01T00:00:00.000Z",
59
+ disabled_reason: "manual",
60
+ enabled: true,
61
+ event_types: [],
62
+ first_failure_at: "2026-01-01T00:00:00.000Z",
63
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
64
+ legacy_signature: true,
65
+ prev_signing_secret_active: true,
66
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
67
+ scope_id: "string",
68
+ scope_type: "workspace",
69
+ signing_secret: "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
70
+ signing_secret_hint: "x9Q=",
71
+ status: "enabled",
72
+ updated_at: "2026-01-01T00:00:00.000Z",
73
+ url: "https://api.acme.com/webhooks"
74
+ } },
75
+ { op: "webhooks.endpoints.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/endpoints$/, status: 200, contentType: "application/json", body: {
76
+ data: [
77
+ {
78
+ consecutive_failures: 1,
79
+ created_at: "2026-01-01T00:00:00.000Z",
80
+ description: "Production receiver",
81
+ disabled_at: "2026-01-01T00:00:00.000Z",
82
+ disabled_reason: "manual",
83
+ enabled: true,
84
+ event_types: [],
85
+ first_failure_at: "2026-01-01T00:00:00.000Z",
86
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
87
+ legacy_signature: true,
88
+ prev_signing_secret_active: true,
89
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
90
+ scope_id: "string",
91
+ scope_type: "workspace",
92
+ signing_secret_hint: "x9Q=",
93
+ status: "enabled",
94
+ updated_at: "2026-01-01T00:00:00.000Z",
95
+ url: "https://api.acme.com/webhooks"
96
+ }
97
+ ],
98
+ pagination: { next_cursor: null, has_more: false }
99
+ } },
100
+ { op: "posts.recordImpressions", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/impressions$/, status: 204, contentType: null, body: null },
101
+ { op: "webhooks.endpoints.create", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/endpoints$/, status: 201, contentType: "application/json", body: {
102
+ consecutive_failures: 1,
103
+ created_at: "2026-01-01T00:00:00.000Z",
104
+ description: "Production receiver",
105
+ disabled_at: "2026-01-01T00:00:00.000Z",
106
+ disabled_reason: "manual",
107
+ enabled: true,
108
+ event_types: [],
109
+ first_failure_at: "2026-01-01T00:00:00.000Z",
110
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
111
+ legacy_signature: true,
112
+ prev_signing_secret_active: true,
113
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
114
+ scope_id: "string",
115
+ scope_type: "workspace",
116
+ signing_secret: "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
117
+ signing_secret_hint: "x9Q=",
118
+ status: "enabled",
119
+ updated_at: "2026-01-01T00:00:00.000Z",
120
+ url: "https://api.acme.com/webhooks"
121
+ } },
122
+ { op: "webhooks.endpoints.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/endpoints$/, status: 200, contentType: "application/json", body: {
123
+ data: [
124
+ {
125
+ consecutive_failures: 1,
126
+ created_at: "2026-01-01T00:00:00.000Z",
127
+ description: "Production receiver",
128
+ disabled_at: "2026-01-01T00:00:00.000Z",
129
+ disabled_reason: "manual",
130
+ enabled: true,
131
+ event_types: [],
132
+ first_failure_at: "2026-01-01T00:00:00.000Z",
133
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
134
+ legacy_signature: true,
135
+ prev_signing_secret_active: true,
136
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
137
+ scope_id: "string",
138
+ scope_type: "workspace",
139
+ signing_secret_hint: "x9Q=",
140
+ status: "enabled",
141
+ updated_at: "2026-01-01T00:00:00.000Z",
142
+ url: "https://api.acme.com/webhooks"
143
+ }
144
+ ],
145
+ pagination: { next_cursor: null, has_more: false }
146
+ } },
147
+ { op: "search.hashtags.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/search\/hashtags$/, status: 200, contentType: "application/json", body: {
148
+ data: [
149
+ {
150
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
151
+ first_used_at: "2026-05-01T12:00:00.000Z",
152
+ tag: "storymode",
153
+ window_post_count: null
154
+ }
155
+ ],
156
+ pagination: { next_cursor: null, has_more: false }
157
+ } },
158
+ { op: "webhooks.events.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/events$/, status: 200, contentType: "application/json", body: {
159
+ data: [
160
+ {
161
+ created_at: "2026-01-01T00:00:00.000Z",
162
+ deliveries: [
163
+ {
164
+ attempt_number: 1,
165
+ attempted_at: "2026-01-01T00:00:00.000Z",
166
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
167
+ next_attempt_at: "2026-01-01T00:00:00.000Z",
168
+ status_code: 1,
169
+ succeeded: true
170
+ }
171
+ ],
172
+ id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
173
+ payload: {},
174
+ status: "pending",
175
+ test: true,
176
+ type: "post.created"
177
+ }
178
+ ],
179
+ pagination: { next_cursor: null, has_more: false }
180
+ } },
181
+ { op: "webhooks.events.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/events$/, status: 200, contentType: "application/json", body: {
182
+ data: [
183
+ {
184
+ created_at: "2026-01-01T00:00:00.000Z",
185
+ deliveries: [
186
+ {
187
+ attempt_number: 1,
188
+ attempted_at: "2026-01-01T00:00:00.000Z",
189
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
190
+ next_attempt_at: "2026-01-01T00:00:00.000Z",
191
+ status_code: 1,
192
+ succeeded: true
193
+ }
194
+ ],
195
+ id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
196
+ payload: {},
197
+ status: "pending",
198
+ test: true,
199
+ type: "post.created"
200
+ }
201
+ ],
202
+ pagination: { next_cursor: null, has_more: false }
203
+ } },
204
+ { op: "closeFriends.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/close-friends$/, status: 204, contentType: null, body: null },
205
+ { op: "conversations.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/conversations$/, status: 201, contentType: "application/json", body: {
206
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
207
+ created_at: "2026-05-01T12:00:00.000Z",
208
+ created_by: null,
209
+ id: "11111111-2222-3333-4444-555555555555",
210
+ kind: "direct",
211
+ last_message_at: "2026-05-01T12:00:00.000Z",
212
+ name: null,
213
+ participants: [
214
+ {
215
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
216
+ joined_at: "2026-05-01T12:00:00.000Z",
217
+ last_read_at: null,
218
+ muted: false,
219
+ muted_until: null,
220
+ pinned: false,
221
+ role: "member"
222
+ }
223
+ ],
224
+ unread_count: 0,
225
+ updated_at: "2026-05-01T12:00:00.000Z"
226
+ } },
227
+ { op: "conversations.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/conversations$/, status: 200, contentType: "application/json", body: {
228
+ data: [
229
+ {
230
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
231
+ created_at: "2026-05-01T12:00:00.000Z",
232
+ created_by: null,
233
+ id: "11111111-2222-3333-4444-555555555555",
234
+ kind: "direct",
235
+ last_message_at: "2026-05-01T12:00:00.000Z",
236
+ name: null,
237
+ participants: [
238
+ {
239
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
240
+ joined_at: "2026-05-01T12:00:00.000Z",
241
+ last_read_at: null,
242
+ muted: false,
243
+ muted_until: null,
244
+ pinned: false,
245
+ role: "member"
246
+ }
247
+ ],
248
+ unread_count: 0,
249
+ updated_at: "2026-05-01T12:00:00.000Z"
250
+ }
251
+ ],
252
+ pagination: { next_cursor: null, has_more: false }
253
+ } },
254
+ { op: "discoverFeed.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/discover-feed$/, status: 200, contentType: "application/json", body: {
255
+ data: [
256
+ {
257
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
258
+ assets: [
259
+ {
260
+ alt_text: "A golden retriever on a beach",
261
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
262
+ }
263
+ ],
264
+ attributes: {},
265
+ body: "Stories are live!",
266
+ comment_count: 4,
267
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
268
+ created_at: "2026-05-01T12:00:00.000Z",
269
+ edit_count: 0,
270
+ edited_at: null,
271
+ expires_at: null,
272
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
273
+ kind: "text",
274
+ pinned: false,
275
+ quote_count: 0,
276
+ reaction_counts: { fire: 3, like: 12 },
277
+ repost_count: 0,
278
+ scheduled_for: null,
279
+ settings: {
280
+ allow_quote: true,
281
+ allow_repost: true,
282
+ comments: "everyone",
283
+ hide_reaction_counts: false
284
+ },
285
+ source_post_id: null,
286
+ status: "published",
287
+ title: "Shipping Phase 8",
288
+ updated_at: "2026-05-01T12:00:00.000Z",
289
+ url: "https://cdn.example.com/img.png",
290
+ view_count: 0,
291
+ visibility: "public"
292
+ }
293
+ ],
294
+ pagination: { next_cursor: null, has_more: false }
295
+ } },
296
+ { op: "follows.batch", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/follows\/batch$/, status: 201, contentType: "application/json", body: {
297
+ data: [
298
+ {
299
+ created: true,
300
+ edge: {
301
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
302
+ created_at: "2026-05-01T12:00:00.000Z",
303
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
304
+ dst_post_id: null,
305
+ id: "eeeeeeee-0000-0000-0000-000000000001",
306
+ kind: "follow",
307
+ payload: {},
308
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
309
+ },
310
+ error: { code: "NOT_FOUND", message: "Actor not found", statusCode: 404, status_code: 404 },
311
+ index: 0,
312
+ success: true
313
+ }
314
+ ],
315
+ failed: 1,
316
+ succeeded: 4999
317
+ } },
318
+ { op: "search.actors.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/search\/actors$/, status: 200, contentType: "application/json", body: {
319
+ data: [
320
+ {
321
+ actor: {
322
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
323
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
324
+ created_at: "2026-05-01T12:00:00.000Z",
325
+ display_name: "Ada Lovelace",
326
+ external_id: "user_abc123",
327
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
328
+ is_private: false,
329
+ metadata: { tier: "pro" },
330
+ status: "active",
331
+ updated_at: "2026-05-01T12:00:00.000Z"
332
+ },
333
+ rank: 0.6079
334
+ }
335
+ ],
336
+ pagination: { next_cursor: null, has_more: false }
337
+ } },
338
+ { op: "actors.batch", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/actors\/batch$/, status: 201, contentType: "application/json", body: {
339
+ data: [
340
+ {
341
+ actor: {
342
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
343
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
344
+ created_at: "2026-05-01T12:00:00.000Z",
345
+ display_name: "Ada Lovelace",
346
+ external_id: "user_abc123",
347
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
348
+ is_private: false,
349
+ metadata: { tier: "pro" },
350
+ status: "active",
351
+ updated_at: "2026-05-01T12:00:00.000Z"
352
+ },
353
+ created: true,
354
+ error: { code: "NOT_FOUND", message: "Actor not found", statusCode: 404, status_code: 404 },
355
+ index: 0,
356
+ success: true
357
+ }
358
+ ],
359
+ failed: 1,
360
+ succeeded: 199
361
+ } },
362
+ { op: "search.posts.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/search\/posts$/, status: 200, contentType: "application/json", body: {
363
+ data: [
364
+ {
365
+ post: {
366
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
367
+ assets: [
368
+ {
369
+ alt_text: "A golden retriever on a beach",
370
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
371
+ }
372
+ ],
373
+ attributes: {},
374
+ body: "Stories are live!",
375
+ comment_count: 4,
376
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
377
+ created_at: "2026-05-01T12:00:00.000Z",
378
+ edit_count: 0,
379
+ edited_at: null,
380
+ expires_at: null,
381
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
382
+ kind: "text",
383
+ pinned: false,
384
+ quote_count: 0,
385
+ reaction_counts: { fire: 3, like: 12 },
386
+ repost_count: 0,
387
+ scheduled_for: null,
388
+ settings: {
389
+ allow_quote: true,
390
+ allow_repost: true,
391
+ comments: "everyone",
392
+ hide_reaction_counts: false
393
+ },
394
+ source_post_id: null,
395
+ status: "published",
396
+ title: "Shipping Phase 8",
397
+ updated_at: "2026-05-01T12:00:00.000Z",
398
+ url: "https://cdn.example.com/img.png",
399
+ view_count: 0,
400
+ visibility: "public"
401
+ },
402
+ rank: 0.6079
403
+ }
404
+ ],
405
+ pagination: { next_cursor: null, has_more: false }
406
+ } },
407
+ { op: "collections.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/collections$/, status: 201, contentType: "application/json", body: {
408
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
409
+ cover_asset_id: null,
410
+ cover_url: null,
411
+ created_at: "2026-05-01T12:00:00.000Z",
412
+ id: "99999999-0000-0000-0000-000000000001",
413
+ item_count: 12,
414
+ kind: "bookmark",
415
+ name: "Travel",
416
+ owner_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
417
+ position: 0,
418
+ updated_at: "2026-05-01T12:00:00.000Z",
419
+ visibility: "private"
420
+ } },
421
+ { op: "collections.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/collections$/, status: 200, contentType: "application/json", body: {
422
+ data: [
423
+ {
424
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
425
+ cover_asset_id: null,
426
+ cover_url: null,
427
+ created_at: "2026-05-01T12:00:00.000Z",
428
+ id: "99999999-0000-0000-0000-000000000001",
429
+ item_count: 12,
430
+ kind: "bookmark",
431
+ name: "Travel",
432
+ owner_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
433
+ position: 0,
434
+ updated_at: "2026-05-01T12:00:00.000Z",
435
+ visibility: "private"
436
+ }
437
+ ],
438
+ pagination: { next_cursor: null, has_more: false }
439
+ } },
440
+ { op: "connections.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/connections$/, status: 201, contentType: "application/json", body: { created: true, status: "pending" } },
441
+ { op: "communities.create", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/communities$/, status: 201, contentType: "application/json", body: {
442
+ app_id: "33333333-3333-3333-3333-333333333333",
443
+ created_at: "2026-05-01T12:00:00.000Z",
444
+ created_by: "aaaaaaaa-0000-0000-0000-000000000001",
445
+ description: null,
446
+ display_name: "My Product Community",
447
+ id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
448
+ settings: { max_comment_depth: 3 },
449
+ slug: "my-product-community",
450
+ status: "active",
451
+ updated_at: "2026-05-01T12:00:00.000Z",
452
+ workspace_id: "11111111-1111-1111-1111-111111111111"
453
+ } },
454
+ { op: "communities.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities$/, status: 200, contentType: "application/json", body: {
455
+ data: [
456
+ {
457
+ app_id: "33333333-3333-3333-3333-333333333333",
458
+ created_at: "2026-05-01T12:00:00.000Z",
459
+ created_by: "aaaaaaaa-0000-0000-0000-000000000001",
460
+ description: null,
461
+ display_name: "My Product Community",
462
+ id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
463
+ settings: { max_comment_depth: 3 },
464
+ slug: "my-product-community",
465
+ status: "active",
466
+ updated_at: "2026-05-01T12:00:00.000Z",
467
+ workspace_id: "11111111-1111-1111-1111-111111111111"
468
+ }
469
+ ],
470
+ pagination: { next_cursor: null, has_more: false }
471
+ } },
472
+ { op: "restricts.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/restricts$/, status: 201, contentType: "application/json", body: {
473
+ created: true,
474
+ edge: {
475
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
476
+ created_at: "2026-05-01T12:00:00.000Z",
477
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
478
+ dst_post_id: null,
479
+ id: "eeeeeeee-0000-0000-0000-000000000001",
480
+ kind: "follow",
481
+ payload: {},
482
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
483
+ }
484
+ } },
485
+ { op: "counters.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/counters$/, status: 200, contentType: "application/json", body: {
486
+ data: [
487
+ {
488
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
489
+ blocks_count: 0,
490
+ comment_count: 12,
491
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
492
+ follower_count: 42,
493
+ following_count: 17,
494
+ post_count: 5,
495
+ updated_at: "2026-05-01T12:00:00.000Z"
496
+ }
497
+ ],
498
+ missing: []
499
+ } },
500
+ { op: "hashtags.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/hashtags$/, status: 200, contentType: "application/json", body: {
501
+ data: [
502
+ {
503
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
504
+ first_used_at: "2026-05-01T12:00:00.000Z",
505
+ tag: "storymode",
506
+ window_post_count: null
507
+ }
508
+ ],
509
+ pagination: { next_cursor: null, has_more: false }
510
+ } },
511
+ { op: "follows.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/follows$/, status: 201, contentType: "application/json", body: {
512
+ created: true,
513
+ edge: {
514
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
515
+ created_at: "2026-05-01T12:00:00.000Z",
516
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
517
+ dst_post_id: null,
518
+ id: "eeeeeeee-0000-0000-0000-000000000001",
519
+ kind: "follow",
520
+ payload: {},
521
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
522
+ },
523
+ status: "followed"
524
+ } },
525
+ { op: "actors.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/actors$/, status: 201, contentType: "application/json", body: {
526
+ actor: {
527
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
528
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
529
+ created_at: "2026-05-01T12:00:00.000Z",
530
+ display_name: "Ada Lovelace",
531
+ external_id: "user_abc123",
532
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
533
+ is_private: false,
534
+ metadata: { tier: "pro" },
535
+ status: "active",
536
+ updated_at: "2026-05-01T12:00:00.000Z"
537
+ },
538
+ created: true
539
+ } },
540
+ { op: "actors.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors$/, status: 200, contentType: "application/json", body: {
541
+ data: [
542
+ {
543
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
544
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
545
+ created_at: "2026-05-01T12:00:00.000Z",
546
+ display_name: "Ada Lovelace",
547
+ external_id: "user_abc123",
548
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
549
+ is_private: false,
550
+ metadata: { tier: "pro" },
551
+ status: "active",
552
+ updated_at: "2026-05-01T12:00:00.000Z"
553
+ }
554
+ ],
555
+ pagination: { next_cursor: null, has_more: false }
556
+ } },
557
+ { op: "assets.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/assets$/, status: 201, contentType: "application/json", body: {
558
+ id: "eeeeeeee-0000-0000-0000-000000000001",
559
+ status: "ready",
560
+ upload: {
561
+ expires_at: "2026-05-01T12:15:00.000Z",
562
+ headers: { "content-length": "10485760", "content-type": "video/mp4" },
563
+ method: "PUT",
564
+ url: "https://\u2026r2.cloudflarestorage.com/\u2026?X-Amz-Signature=\u2026"
565
+ }
566
+ } },
567
+ { op: "blocks.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/blocks$/, status: 201, contentType: "application/json", body: {
568
+ created: true,
569
+ edge: {
570
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
571
+ created_at: "2026-05-01T12:00:00.000Z",
572
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
573
+ dst_post_id: null,
574
+ id: "eeeeeeee-0000-0000-0000-000000000001",
575
+ kind: "follow",
576
+ payload: {},
577
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
578
+ }
579
+ } },
580
+ { op: "flags.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/flags$/, status: 201, contentType: "application/json", body: {
581
+ auto_hidden: false,
582
+ created: true,
583
+ flag: {
584
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
585
+ created_at: "2026-05-01T12:00:00.000Z",
586
+ id: "ffffffff-0000-0000-0000-000000000001",
587
+ reason: "Spam \u2014 same link posted 6 times in 5 minutes.",
588
+ reporter_actor: {
589
+ avatar_url: "https://cdn.productcraft.co/actors/aaaa.png",
590
+ display_name: "Alice Nguyen",
591
+ id: "aaaaaaaa-0000-0000-0000-000000000001",
592
+ status: "active"
593
+ },
594
+ reporter_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
595
+ status: "open",
596
+ target_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
597
+ target_kind: "post",
598
+ updated_at: "2026-05-01T12:00:00.000Z"
599
+ }
600
+ } },
601
+ { op: "flags.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/flags$/, status: 200, contentType: "application/json", body: {
602
+ data: [
603
+ {
604
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
605
+ created_at: "2026-05-01T12:00:00.000Z",
606
+ id: "ffffffff-0000-0000-0000-000000000001",
607
+ reason: "Spam \u2014 same link posted 6 times in 5 minutes.",
608
+ reporter_actor: {
609
+ avatar_url: "https://cdn.productcraft.co/actors/aaaa.png",
610
+ display_name: "Alice Nguyen",
611
+ id: "aaaaaaaa-0000-0000-0000-000000000001",
612
+ status: "active"
613
+ },
614
+ reporter_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
615
+ status: "open",
616
+ target_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
617
+ target_kind: "post",
618
+ updated_at: "2026-05-01T12:00:00.000Z"
619
+ }
620
+ ],
621
+ pagination: { next_cursor: null, has_more: false }
622
+ } },
623
+ { op: "hides.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/hides$/, status: 201, contentType: "application/json", body: { created: true } },
624
+ { op: "lists.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/lists$/, status: 201, contentType: "application/json", body: {
625
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
626
+ created_at: "2026-05-01T12:00:00.000Z",
627
+ description: "Curated tech accounts I follow.",
628
+ id: "11111111-0000-0000-0000-000000000001",
629
+ member_count: 12,
630
+ name: "Tech news",
631
+ owner_id: "aaaaaaaa-0000-0000-0000-000000000001",
632
+ updated_at: "2026-05-01T12:00:00.000Z",
633
+ visibility: "public"
634
+ } },
635
+ { op: "lists.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/lists$/, status: 200, contentType: "application/json", body: {
636
+ data: [
637
+ {
638
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
639
+ created_at: "2026-05-01T12:00:00.000Z",
640
+ description: "Curated tech accounts I follow.",
641
+ id: "11111111-0000-0000-0000-000000000001",
642
+ member_count: 12,
643
+ name: "Tech news",
644
+ owner_id: "aaaaaaaa-0000-0000-0000-000000000001",
645
+ updated_at: "2026-05-01T12:00:00.000Z",
646
+ visibility: "public"
647
+ }
648
+ ],
649
+ pagination: { next_cursor: null, has_more: false }
650
+ } },
651
+ { op: "mutes.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/mutes$/, status: 201, contentType: "application/json", body: {
652
+ created: true,
653
+ edge: {
654
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
655
+ created_at: "2026-05-01T12:00:00.000Z",
656
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
657
+ dst_post_id: null,
658
+ id: "eeeeeeee-0000-0000-0000-000000000001",
659
+ kind: "follow",
660
+ payload: {},
661
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
662
+ }
663
+ } },
664
+ { op: "posts.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts$/, status: 201, contentType: "application/json", body: {
665
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
666
+ assets: [
667
+ {
668
+ alt_text: "A golden retriever on a beach",
669
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
670
+ }
671
+ ],
672
+ attributes: {},
673
+ body: "Stories are live!",
674
+ comment_count: 4,
675
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
676
+ created_at: "2026-05-01T12:00:00.000Z",
677
+ edit_count: 0,
678
+ edited_at: null,
679
+ expires_at: null,
680
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
681
+ kind: "text",
682
+ pinned: false,
683
+ quote_count: 0,
684
+ reaction_counts: { fire: 3, like: 12 },
685
+ repost_count: 0,
686
+ scheduled_for: null,
687
+ settings: {
688
+ allow_quote: true,
689
+ allow_repost: true,
690
+ comments: "everyone",
691
+ hide_reaction_counts: false
692
+ },
693
+ source_post_id: null,
694
+ status: "published",
695
+ title: "Shipping Phase 8",
696
+ updated_at: "2026-05-01T12:00:00.000Z",
697
+ url: "https://cdn.example.com/img.png",
698
+ view_count: 0,
699
+ visibility: "public"
700
+ } },
701
+ { op: "posts.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts$/, status: 200, contentType: "application/json", body: {
702
+ data: [
703
+ {
704
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
705
+ assets: [
706
+ {
707
+ alt_text: "A golden retriever on a beach",
708
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
709
+ }
710
+ ],
711
+ attributes: {},
712
+ body: "Stories are live!",
713
+ comment_count: 4,
714
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
715
+ created_at: "2026-05-01T12:00:00.000Z",
716
+ edit_count: 0,
717
+ edited_at: null,
718
+ expires_at: null,
719
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
720
+ kind: "text",
721
+ pinned: false,
722
+ quote_count: 0,
723
+ reaction_counts: { fire: 3, like: 12 },
724
+ repost_count: 0,
725
+ scheduled_for: null,
726
+ settings: {
727
+ allow_quote: true,
728
+ allow_repost: true,
729
+ comments: "everyone",
730
+ hide_reaction_counts: false
731
+ },
732
+ source_post_id: null,
733
+ status: "published",
734
+ title: "Shipping Phase 8",
735
+ updated_at: "2026-05-01T12:00:00.000Z",
736
+ url: "https://cdn.example.com/img.png",
737
+ view_count: 0,
738
+ visibility: "public"
739
+ }
740
+ ],
741
+ pagination: { next_cursor: null, has_more: false }
742
+ } },
743
+ { op: "stats.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/stats$/, status: 200, contentType: "application/json", body: {
744
+ generated_at: "2026-10-07T09:00:00.000Z",
745
+ in_window: { active_members: 57, comments: 430, posts: 112, reactions: 1904 },
746
+ last_activity_at: "2026-10-07T08:41:12.000Z",
747
+ series: {
748
+ granularity: "day",
749
+ metric: "active_members",
750
+ points: [{ date: "2026-10-07", value: 4 }]
751
+ },
752
+ totals: { communities: 3, published_posts: 1280 },
753
+ window: "30d"
754
+ } },
755
+ { op: "communities.moderation.blockedTerms.create", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/blocked-terms$/, status: 201, contentType: "application/json", body: {
756
+ action: "hide",
757
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
758
+ created_at: "2026-05-01T12:00:00.000Z",
759
+ id: "ffffffff-2222-0000-0000-000000000001",
760
+ term: "spoiler"
761
+ } },
762
+ { op: "communities.moderation.blockedTerms.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/blocked-terms$/, status: 200, contentType: "application/json", body: {
763
+ data: [
764
+ {
765
+ action: "hide",
766
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
767
+ created_at: "2026-05-01T12:00:00.000Z",
768
+ id: "ffffffff-2222-0000-0000-000000000001",
769
+ term: "spoiler"
770
+ }
771
+ ],
772
+ pagination: { next_cursor: null, has_more: false }
773
+ } },
774
+ { op: "communities.moderation.conversations.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/conversations$/, status: 200, contentType: "application/json", body: {
775
+ data: [
776
+ {
777
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
778
+ created_at: "2026-05-01T12:00:00.000Z",
779
+ id: "11111111-2222-3333-4444-555555555555",
780
+ kind: "direct",
781
+ last_message_at: "2026-05-01T12:00:00.000Z",
782
+ name: "Release crew",
783
+ participants: [
784
+ {
785
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
786
+ avatar_url: "https://cdn.productcraft.co/actors/aaaa.png",
787
+ display_name: "Alice Nguyen",
788
+ joined_at: "2026-05-01T12:00:00.000Z",
789
+ last_read_at: null,
790
+ muted: false
791
+ }
792
+ ],
793
+ updated_at: "2026-05-01T12:00:00.000Z"
794
+ }
795
+ ],
796
+ pagination: { next_cursor: null, has_more: false }
797
+ } },
798
+ { op: "communities.moderation.shadowBanned.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/shadow-banned$/, status: 200, contentType: "application/json", body: {
799
+ data: [
800
+ {
801
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
802
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
803
+ created_at: "2026-05-01T12:00:00.000Z",
804
+ display_name: "Ada Lovelace",
805
+ external_id: "user_abc123",
806
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
807
+ is_private: false,
808
+ metadata: { tier: "pro" },
809
+ shadow_banned_at: "2026-01-01T00:00:00.000Z",
810
+ shadow_banned_reason: "string",
811
+ shadow_banned_until: "string",
812
+ status: "active",
813
+ updated_at: "2026-05-01T12:00:00.000Z"
814
+ }
815
+ ],
816
+ pagination: { next_cursor: null, has_more: false }
817
+ } },
818
+ { op: "actors.notifications.unreadCount", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/notifications\/unread-count$/, status: 200, contentType: "application/json", body: { count: 7 } },
819
+ { op: "webhooks.endpoints.rotateSecret", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/endpoints\/[^\/]+\/rotate-secret$/, status: 200, contentType: "application/json", body: {
820
+ consecutive_failures: 1,
821
+ created_at: "2026-01-01T00:00:00.000Z",
822
+ description: "Production receiver",
823
+ disabled_at: "2026-01-01T00:00:00.000Z",
824
+ disabled_reason: "manual",
825
+ enabled: true,
826
+ event_types: [],
827
+ first_failure_at: "2026-01-01T00:00:00.000Z",
828
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
829
+ legacy_signature: true,
830
+ prev_signing_secret_active: true,
831
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
832
+ scope_id: "string",
833
+ scope_type: "workspace",
834
+ signing_secret: "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
835
+ signing_secret_hint: "x9Q=",
836
+ status: "enabled",
837
+ updated_at: "2026-01-01T00:00:00.000Z",
838
+ url: "https://api.acme.com/webhooks"
839
+ } },
840
+ { op: "communities.webhooks.eventTypes.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/event-types$/, status: 200, contentType: "application/json", body: {
841
+ data: [
842
+ {
843
+ category: "Users",
844
+ description: "A user signed up or was created by an admin.",
845
+ example: {},
846
+ type: "post.created"
847
+ }
848
+ ]
849
+ } },
850
+ { op: "webhooks.endpoints.rotateSecret", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/endpoints\/[^\/]+\/rotate-secret$/, status: 200, contentType: "application/json", body: {
851
+ consecutive_failures: 1,
852
+ created_at: "2026-01-01T00:00:00.000Z",
853
+ description: "Production receiver",
854
+ disabled_at: "2026-01-01T00:00:00.000Z",
855
+ disabled_reason: "manual",
856
+ enabled: true,
857
+ event_types: [],
858
+ first_failure_at: "2026-01-01T00:00:00.000Z",
859
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
860
+ legacy_signature: true,
861
+ prev_signing_secret_active: true,
862
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
863
+ scope_id: "string",
864
+ scope_type: "workspace",
865
+ signing_secret: "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
866
+ signing_secret_hint: "x9Q=",
867
+ status: "enabled",
868
+ updated_at: "2026-01-01T00:00:00.000Z",
869
+ url: "https://api.acme.com/webhooks"
870
+ } },
871
+ { op: "actors.notifications.markAllRead", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/notifications\/read-all$/, status: 200, contentType: "application/json", body: { updated: 12 } },
872
+ { op: "communities.moderation.actions.create", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/actions$/, status: 201, contentType: "application/json", body: {
873
+ action: "hide",
874
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
875
+ created_at: "2026-05-01T12:00:00.000Z",
876
+ flag_id: "ffffffff-0000-0000-0000-000000000001",
877
+ id: "eeeeeeee-0000-0000-0000-000000000001",
878
+ moderator_account_id: "99999999-0000-0000-0000-000000000001",
879
+ notes: "Spam confirmed.",
880
+ target_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
881
+ target_kind: "post"
882
+ } },
883
+ { op: "communities.webhooks.endpoints.create", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/endpoints$/, status: 201, contentType: "application/json", body: {
884
+ consecutive_failures: 1,
885
+ created_at: "2026-01-01T00:00:00.000Z",
886
+ description: "Production receiver",
887
+ disabled_at: "2026-01-01T00:00:00.000Z",
888
+ disabled_reason: "manual",
889
+ enabled: true,
890
+ event_types: [],
891
+ first_failure_at: "2026-01-01T00:00:00.000Z",
892
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
893
+ legacy_signature: true,
894
+ prev_signing_secret_active: true,
895
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
896
+ scope_id: "string",
897
+ scope_type: "workspace",
898
+ signing_secret: "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
899
+ signing_secret_hint: "x9Q=",
900
+ status: "enabled",
901
+ updated_at: "2026-01-01T00:00:00.000Z",
902
+ url: "https://api.acme.com/webhooks"
903
+ } },
904
+ { op: "communities.webhooks.endpoints.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/endpoints$/, status: 200, contentType: "application/json", body: {
905
+ data: [
906
+ {
907
+ consecutive_failures: 1,
908
+ created_at: "2026-01-01T00:00:00.000Z",
909
+ description: "Production receiver",
910
+ disabled_at: "2026-01-01T00:00:00.000Z",
911
+ disabled_reason: "manual",
912
+ enabled: true,
913
+ event_types: [],
914
+ first_failure_at: "2026-01-01T00:00:00.000Z",
915
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
916
+ legacy_signature: true,
917
+ prev_signing_secret_active: true,
918
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
919
+ scope_id: "string",
920
+ scope_type: "workspace",
921
+ signing_secret_hint: "x9Q=",
922
+ status: "enabled",
923
+ updated_at: "2026-01-01T00:00:00.000Z",
924
+ url: "https://api.acme.com/webhooks"
925
+ }
926
+ ],
927
+ pagination: { next_cursor: null, has_more: false }
928
+ } },
929
+ { op: "actors.dismissedSuggestions.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/dismissed-suggestions$/, status: 200, contentType: "application/json", body: {
930
+ data: [
931
+ {
932
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
933
+ created_at: "2026-05-01T12:00:00.000Z",
934
+ dst_actor: {
935
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
936
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
937
+ created_at: "2026-05-01T12:00:00.000Z",
938
+ display_name: "Ada Lovelace",
939
+ external_id: "user_abc123",
940
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
941
+ is_private: false,
942
+ metadata: { tier: "pro" },
943
+ status: "active",
944
+ updated_at: "2026-05-01T12:00:00.000Z"
945
+ },
946
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
947
+ dst_post_id: null,
948
+ id: "eeeeeeee-0000-0000-0000-000000000001",
949
+ kind: "follow",
950
+ payload: {},
951
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
952
+ }
953
+ ],
954
+ pagination: { next_cursor: null, has_more: false }
955
+ } },
956
+ { op: "communities.moderation.audit.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/audit$/, status: 200, contentType: "application/json", body: {
957
+ data: [
958
+ {
959
+ action: "hide",
960
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
961
+ created_at: "2026-05-01T12:00:00.000Z",
962
+ flag_id: "ffffffff-0000-0000-0000-000000000001",
963
+ id: "eeeeeeee-0000-0000-0000-000000000001",
964
+ moderator_account_id: "99999999-0000-0000-0000-000000000001",
965
+ notes: "Spam confirmed.",
966
+ target_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
967
+ target_kind: "post"
968
+ }
969
+ ],
970
+ pagination: { next_cursor: null, has_more: false }
971
+ } },
972
+ { op: "communities.moderation.flags.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/flags$/, status: 200, contentType: "application/json", body: {
973
+ data: [
974
+ {
975
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
976
+ created_at: "2026-05-01T12:00:00.000Z",
977
+ id: "ffffffff-0000-0000-0000-000000000001",
978
+ reason: "Spam \u2014 same link posted 6 times in 5 minutes.",
979
+ reporter_actor: {
980
+ avatar_url: "https://cdn.productcraft.co/actors/aaaa.png",
981
+ display_name: "Alice Nguyen",
982
+ id: "aaaaaaaa-0000-0000-0000-000000000001",
983
+ status: "active"
984
+ },
985
+ reporter_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
986
+ status: "open",
987
+ target_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
988
+ target_kind: "post",
989
+ updated_at: "2026-05-01T12:00:00.000Z"
990
+ }
991
+ ],
992
+ pagination: { next_cursor: null, has_more: false }
993
+ } },
994
+ { op: "communities.webhooks.events.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/events$/, status: 200, contentType: "application/json", body: {
995
+ data: [
996
+ {
997
+ created_at: "2026-01-01T00:00:00.000Z",
998
+ deliveries: [
999
+ {
1000
+ attempt_number: 1,
1001
+ attempted_at: "2026-01-01T00:00:00.000Z",
1002
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1003
+ next_attempt_at: "2026-01-01T00:00:00.000Z",
1004
+ status_code: 1,
1005
+ succeeded: true
1006
+ }
1007
+ ],
1008
+ id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
1009
+ payload: {},
1010
+ status: "pending",
1011
+ test: true,
1012
+ type: "post.created"
1013
+ }
1014
+ ],
1015
+ pagination: { next_cursor: null, has_more: false }
1016
+ } },
1017
+ { op: "actors.notificationPrefs.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/notification-prefs$/, status: 200, contentType: "application/json", body: {
1018
+ data: [
1019
+ {
1020
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1021
+ enabled: true,
1022
+ kind: "follow",
1023
+ updated_at: "2026-05-01T12:00:00.000Z"
1024
+ }
1025
+ ]
1026
+ } },
1027
+ { op: "actors.suggestedFollows.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/suggested-follows$/, status: 200, contentType: "application/json", body: {
1028
+ data: [
1029
+ {
1030
+ actor: {
1031
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
1032
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1033
+ created_at: "2026-05-01T12:00:00.000Z",
1034
+ display_name: "Ada Lovelace",
1035
+ external_id: "user_abc123",
1036
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1037
+ is_private: false,
1038
+ metadata: { tier: "pro" },
1039
+ status: "active",
1040
+ updated_at: "2026-05-01T12:00:00.000Z"
1041
+ },
1042
+ reason: "followed_by_friends",
1043
+ score: 4
1044
+ }
1045
+ ],
1046
+ pagination: { next_cursor: null, has_more: false }
1047
+ } },
1048
+ { op: "webhooks.endpoints.test", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/endpoints\/[^\/]+\/test$/, status: 200, contentType: "application/json", body: {
1049
+ attempt_number: 1,
1050
+ attempted_at: "2026-01-01T00:00:00.000Z",
1051
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1052
+ error_message: "request timed out",
1053
+ event_id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
1054
+ event_type: "user.created",
1055
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1056
+ latency_ms: 1,
1057
+ response_body: "string",
1058
+ status_code: 1,
1059
+ succeeded: true,
1060
+ trigger: "automatic",
1061
+ url: "https://example.com"
1062
+ } },
1063
+ { op: "actors.followRequests.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/follow-requests$/, status: 200, contentType: "application/json", body: {
1064
+ data: [
1065
+ {
1066
+ created_at: "2026-05-01T12:00:00.000Z",
1067
+ request_id: "ffffffff-1111-0000-0000-000000000001",
1068
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
1069
+ src_avatar_url: null,
1070
+ src_display_name: "Bob",
1071
+ src_external_id: "bob"
1072
+ }
1073
+ ],
1074
+ pagination: { next_cursor: null, has_more: false }
1075
+ } },
1076
+ { op: "actors.hashtagFollows.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/hashtag-follows$/, status: 201, contentType: "application/json", body: {
1077
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1078
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1079
+ followed_at: "2026-05-01T12:00:00.000Z",
1080
+ tag: "storymode"
1081
+ } },
1082
+ { op: "actors.hashtagFollows.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/hashtag-follows$/, status: 200, contentType: "application/json", body: {
1083
+ data: [
1084
+ {
1085
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1086
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1087
+ followed_at: "2026-05-01T12:00:00.000Z",
1088
+ tag: "storymode"
1089
+ }
1090
+ ],
1091
+ pagination: { next_cursor: null, has_more: false }
1092
+ } },
1093
+ { op: "actors.scheduledPosts.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/scheduled-posts$/, status: 200, contentType: "application/json", body: {
1094
+ data: [
1095
+ {
1096
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1097
+ assets: [
1098
+ {
1099
+ alt_text: "A golden retriever on a beach",
1100
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
1101
+ }
1102
+ ],
1103
+ attributes: {},
1104
+ body: "Stories are live!",
1105
+ comment_count: 4,
1106
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1107
+ created_at: "2026-05-01T12:00:00.000Z",
1108
+ edit_count: 0,
1109
+ edited_at: null,
1110
+ expires_at: null,
1111
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1112
+ kind: "text",
1113
+ pinned: false,
1114
+ quote_count: 0,
1115
+ reaction_counts: { fire: 3, like: 12 },
1116
+ repost_count: 0,
1117
+ scheduled_for: null,
1118
+ settings: {
1119
+ allow_quote: true,
1120
+ allow_repost: true,
1121
+ comments: "everyone",
1122
+ hide_reaction_counts: false
1123
+ },
1124
+ source_post_id: null,
1125
+ status: "published",
1126
+ title: "Shipping Phase 8",
1127
+ updated_at: "2026-05-01T12:00:00.000Z",
1128
+ url: "https://cdn.example.com/img.png",
1129
+ view_count: 0,
1130
+ visibility: "public"
1131
+ }
1132
+ ],
1133
+ pagination: { next_cursor: null, has_more: false }
1134
+ } },
1135
+ { op: "conversations.messages.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/messages$/, status: 201, contentType: "application/json", body: {
1136
+ assets: [
1137
+ {
1138
+ alt_text: "A golden retriever on a beach",
1139
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
1140
+ }
1141
+ ],
1142
+ attachments: [{ kind: "image", url: "https://cdn.example/attachments/abc.png" }],
1143
+ body: "Hey there.",
1144
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1145
+ conversation_id: "11111111-2222-3333-4444-555555555555",
1146
+ created_at: "2026-05-01T12:00:00.000Z",
1147
+ deleted_at: null,
1148
+ edited_at: null,
1149
+ id: "eeeeeeee-0000-0000-0000-000000000001",
1150
+ kind: "text",
1151
+ reaction_counts: { like: 1 },
1152
+ reply_to_id: null,
1153
+ sender_id: "aaaaaaaa-0000-0000-0000-000000000001"
1154
+ } },
1155
+ { op: "conversations.messages.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/messages$/, status: 200, contentType: "application/json", body: {
1156
+ data: [
1157
+ {
1158
+ assets: [
1159
+ {
1160
+ alt_text: "A golden retriever on a beach",
1161
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
1162
+ }
1163
+ ],
1164
+ attachments: [{ kind: "image", url: "https://cdn.example/attachments/abc.png" }],
1165
+ body: "Hey there.",
1166
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1167
+ conversation_id: "11111111-2222-3333-4444-555555555555",
1168
+ created_at: "2026-05-01T12:00:00.000Z",
1169
+ deleted_at: null,
1170
+ edited_at: null,
1171
+ id: "eeeeeeee-0000-0000-0000-000000000001",
1172
+ kind: "text",
1173
+ reaction_counts: { like: 1 },
1174
+ reply_to_id: null,
1175
+ sender_id: "aaaaaaaa-0000-0000-0000-000000000001"
1176
+ }
1177
+ ],
1178
+ pagination: { next_cursor: null, has_more: false }
1179
+ } },
1180
+ { op: "webhooks.endpoints.test", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/endpoints\/[^\/]+\/test$/, status: 200, contentType: "application/json", body: {
1181
+ attempt_number: 1,
1182
+ attempted_at: "2026-01-01T00:00:00.000Z",
1183
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1184
+ error_message: "request timed out",
1185
+ event_id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
1186
+ event_type: "user.created",
1187
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1188
+ latency_ms: 1,
1189
+ response_body: "string",
1190
+ status_code: 1,
1191
+ succeeded: true,
1192
+ trigger: "automatic",
1193
+ url: "https://example.com"
1194
+ } },
1195
+ { op: "webhooks.events.replay", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/events\/[^\/]+\/replay$/, status: 200, contentType: "application/json", body: {
1196
+ attempts: [
1197
+ {
1198
+ attempt_number: 1,
1199
+ attempted_at: "2026-01-01T00:00:00.000Z",
1200
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1201
+ error_message: "request timed out",
1202
+ event_id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
1203
+ event_type: "user.created",
1204
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1205
+ latency_ms: 1,
1206
+ response_body: "string",
1207
+ status_code: 1,
1208
+ succeeded: true,
1209
+ trigger: "automatic",
1210
+ url: "https://example.com"
1211
+ }
1212
+ ],
1213
+ event_id: "string"
1214
+ } },
1215
+ { op: "conversations.members.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/members$/, status: 201, contentType: "application/json", body: {
1216
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1217
+ created_at: "2026-05-01T12:00:00.000Z",
1218
+ created_by: null,
1219
+ id: "11111111-2222-3333-4444-555555555555",
1220
+ kind: "direct",
1221
+ last_message_at: "2026-05-01T12:00:00.000Z",
1222
+ name: null,
1223
+ participants: [
1224
+ {
1225
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1226
+ joined_at: "2026-05-01T12:00:00.000Z",
1227
+ last_read_at: null,
1228
+ muted: false,
1229
+ muted_until: null,
1230
+ pinned: false,
1231
+ role: "member"
1232
+ }
1233
+ ],
1234
+ unread_count: 0,
1235
+ updated_at: "2026-05-01T12:00:00.000Z"
1236
+ } },
1237
+ { op: "webhooks.events.replay", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/events\/[^\/]+\/replay$/, status: 200, contentType: "application/json", body: {
1238
+ attempts: [
1239
+ {
1240
+ attempt_number: 1,
1241
+ attempted_at: "2026-01-01T00:00:00.000Z",
1242
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1243
+ error_message: "request timed out",
1244
+ event_id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
1245
+ event_type: "user.created",
1246
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1247
+ latency_ms: 1,
1248
+ response_body: "string",
1249
+ status_code: 1,
1250
+ succeeded: true,
1251
+ trigger: "automatic",
1252
+ url: "https://example.com"
1253
+ }
1254
+ ],
1255
+ event_id: "string"
1256
+ } },
1257
+ { op: "actors.closeFriends.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/close-friends$/, status: 200, contentType: "application/json", body: {
1258
+ data: [
1259
+ {
1260
+ created_at: "2026-05-01T11:00:00.000Z",
1261
+ member_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
1262
+ member_avatar_url: "https://...",
1263
+ member_display_name: "Bob",
1264
+ member_external_id: "bob",
1265
+ owner_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
1266
+ }
1267
+ ],
1268
+ pagination: { next_cursor: null, has_more: false }
1269
+ } },
1270
+ { op: "actors.notifications.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/notifications$/, status: 200, contentType: "application/json", body: {
1271
+ data: [
1272
+ {
1273
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
1274
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1275
+ created_at: "2026-05-01T12:00:00.000Z",
1276
+ id: "11111111-1111-1111-1111-111111111111",
1277
+ kind: "reaction",
1278
+ payload: { type: "like" },
1279
+ read_at: null,
1280
+ recipient_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1281
+ suppressed: false,
1282
+ target_id: "bbbbbbbb-0000-0000-0000-000000000001",
1283
+ target_kind: "post"
1284
+ }
1285
+ ],
1286
+ pagination: { next_cursor: null, has_more: false }
1287
+ } },
1288
+ { op: "actors.relationships.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/relationships$/, status: 200, contentType: "application/json", body: {
1289
+ data: [
1290
+ {
1291
+ blocked_by: false,
1292
+ blocking: false,
1293
+ close_friend: false,
1294
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
1295
+ follow_pending: false,
1296
+ followed_by: false,
1297
+ following: true,
1298
+ muting: false,
1299
+ restricting: false
1300
+ }
1301
+ ]
1302
+ } },
1303
+ { op: "communities.analytics", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/analytics$/, status: 200, contentType: "application/json", body: {
1304
+ actors_last_7d: 12,
1305
+ comments_last_7d: 88,
1306
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1307
+ computed_at: "2026-05-01T12:00:00.000Z",
1308
+ posts_last_7d: 42,
1309
+ total_actors: 1234,
1310
+ total_comments: 9876,
1311
+ total_open_flags: 3,
1312
+ total_posts: 5678
1313
+ } },
1314
+ { op: "actors.byExternal.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/by-external\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1315
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
1316
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1317
+ created_at: "2026-05-01T12:00:00.000Z",
1318
+ display_name: "Ada Lovelace",
1319
+ external_id: "user_abc123",
1320
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1321
+ is_private: false,
1322
+ metadata: { tier: "pro" },
1323
+ status: "active",
1324
+ updated_at: "2026-05-01T12:00:00.000Z"
1325
+ } },
1326
+ { op: "actors.mutedTerms.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/muted-terms$/, status: 201, contentType: "application/json", body: {
1327
+ action: "mute",
1328
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1329
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1330
+ created_at: "2026-05-01T12:00:00.000Z",
1331
+ expires_at: null,
1332
+ scope: "all",
1333
+ term: "spoiler"
1334
+ } },
1335
+ { op: "actors.mutedTerms.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/muted-terms$/, status: 200, contentType: "application/json", body: {
1336
+ data: [
1337
+ {
1338
+ action: "mute",
1339
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1340
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1341
+ created_at: "2026-05-01T12:00:00.000Z",
1342
+ expires_at: null,
1343
+ scope: "all",
1344
+ term: "spoiler"
1345
+ }
1346
+ ],
1347
+ pagination: { next_cursor: null, has_more: false }
1348
+ } },
1349
+ { op: "conversations.markRead", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/read$/, status: 204, contentType: null, body: null },
1350
+ { op: "posts.pollResults", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/poll-results$/, status: 200, contentType: "application/json", body: {
1351
+ options: [{ count: 42, index: 0, label: "VS Code" }],
1352
+ post_id: "bbbbbbbb-0000-0000-0000-000000000001",
1353
+ question: "Best dev tool?",
1354
+ total_votes: 67
1355
+ } },
1356
+ { op: "webhooks.endpoints.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 204, contentType: null, body: null },
1357
+ { op: "webhooks.endpoints.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1358
+ consecutive_failures: 1,
1359
+ created_at: "2026-01-01T00:00:00.000Z",
1360
+ description: "Production receiver",
1361
+ disabled_at: "2026-01-01T00:00:00.000Z",
1362
+ disabled_reason: "manual",
1363
+ enabled: true,
1364
+ event_types: [],
1365
+ first_failure_at: "2026-01-01T00:00:00.000Z",
1366
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1367
+ legacy_signature: true,
1368
+ prev_signing_secret_active: true,
1369
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
1370
+ scope_id: "string",
1371
+ scope_type: "workspace",
1372
+ signing_secret_hint: "x9Q=",
1373
+ status: "enabled",
1374
+ updated_at: "2026-01-01T00:00:00.000Z",
1375
+ url: "https://api.acme.com/webhooks"
1376
+ } },
1377
+ { op: "webhooks.endpoints.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1378
+ consecutive_failures: 1,
1379
+ created_at: "2026-01-01T00:00:00.000Z",
1380
+ description: "Production receiver",
1381
+ disabled_at: "2026-01-01T00:00:00.000Z",
1382
+ disabled_reason: "manual",
1383
+ enabled: true,
1384
+ event_types: [],
1385
+ first_failure_at: "2026-01-01T00:00:00.000Z",
1386
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1387
+ legacy_signature: true,
1388
+ prev_signing_secret_active: true,
1389
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
1390
+ scope_id: "string",
1391
+ scope_type: "workspace",
1392
+ signing_secret_hint: "x9Q=",
1393
+ status: "enabled",
1394
+ updated_at: "2026-01-01T00:00:00.000Z",
1395
+ url: "https://api.acme.com/webhooks"
1396
+ } },
1397
+ { op: "actors.highlights.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/highlights$/, status: 200, contentType: "application/json", body: {
1398
+ data: [
1399
+ {
1400
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1401
+ assets: [
1402
+ {
1403
+ alt_text: "A golden retriever on a beach",
1404
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
1405
+ }
1406
+ ],
1407
+ attributes: {},
1408
+ body: "Stories are live!",
1409
+ comment_count: 4,
1410
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1411
+ created_at: "2026-05-01T12:00:00.000Z",
1412
+ edit_count: 0,
1413
+ edited_at: null,
1414
+ expires_at: null,
1415
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1416
+ kind: "text",
1417
+ pinned: false,
1418
+ quote_count: 0,
1419
+ reaction_counts: { fire: 3, like: 12 },
1420
+ repost_count: 0,
1421
+ scheduled_for: null,
1422
+ settings: {
1423
+ allow_quote: true,
1424
+ allow_repost: true,
1425
+ comments: "everyone",
1426
+ hide_reaction_counts: false
1427
+ },
1428
+ source_post_id: null,
1429
+ status: "published",
1430
+ title: "Shipping Phase 8",
1431
+ updated_at: "2026-05-01T12:00:00.000Z",
1432
+ url: "https://cdn.example.com/img.png",
1433
+ view_count: 0,
1434
+ visibility: "public"
1435
+ }
1436
+ ],
1437
+ pagination: { next_cursor: null, has_more: false }
1438
+ } },
1439
+ { op: "actors.postState", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/post-state$/, status: 200, contentType: "application/json", body: {
1440
+ data: [
1441
+ {
1442
+ bookmarked: true,
1443
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1444
+ reacted_types: ["fire", "like"],
1445
+ reposted: false,
1446
+ voted_option: null
1447
+ }
1448
+ ]
1449
+ } },
1450
+ { op: "actors.storyTray.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/story-tray$/, status: 200, contentType: "application/json", body: {
1451
+ data: [
1452
+ {
1453
+ actor_avatar_url: "https://...",
1454
+ actor_display_name: "Alice",
1455
+ actor_external_id: "alice",
1456
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1457
+ has_unviewed: true,
1458
+ latest_story_created_at: "2026-05-01T11:00:00.000Z",
1459
+ story_count: 3
1460
+ }
1461
+ ],
1462
+ pagination: { next_cursor: null, has_more: false }
1463
+ } },
1464
+ { op: "collections.items.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/collections\/[^\/]+\/items$/, status: 201, contentType: "application/json", body: {
1465
+ added_at: "2026-05-01T12:00:00.000Z",
1466
+ collection_id: "99999999-0000-0000-0000-000000000001",
1467
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1468
+ position: 0,
1469
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
1470
+ } },
1471
+ { op: "collections.items.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/collections\/[^\/]+\/items$/, status: 200, contentType: "application/json", body: {
1472
+ data: [
1473
+ {
1474
+ added_at: "2026-05-01T12:00:00.000Z",
1475
+ collection_id: "99999999-0000-0000-0000-000000000001",
1476
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1477
+ position: 0,
1478
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
1479
+ }
1480
+ ],
1481
+ pagination: { next_cursor: null, has_more: false }
1482
+ } },
1483
+ { op: "webhooks.endpoints.delete", method: "DELETE", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 204, contentType: null, body: null },
1484
+ { op: "webhooks.endpoints.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1485
+ consecutive_failures: 1,
1486
+ created_at: "2026-01-01T00:00:00.000Z",
1487
+ description: "Production receiver",
1488
+ disabled_at: "2026-01-01T00:00:00.000Z",
1489
+ disabled_reason: "manual",
1490
+ enabled: true,
1491
+ event_types: [],
1492
+ first_failure_at: "2026-01-01T00:00:00.000Z",
1493
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1494
+ legacy_signature: true,
1495
+ prev_signing_secret_active: true,
1496
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
1497
+ scope_id: "string",
1498
+ scope_type: "workspace",
1499
+ signing_secret_hint: "x9Q=",
1500
+ status: "enabled",
1501
+ updated_at: "2026-01-01T00:00:00.000Z",
1502
+ url: "https://api.acme.com/webhooks"
1503
+ } },
1504
+ { op: "webhooks.endpoints.update", method: "PATCH", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1505
+ consecutive_failures: 1,
1506
+ created_at: "2026-01-01T00:00:00.000Z",
1507
+ description: "Production receiver",
1508
+ disabled_at: "2026-01-01T00:00:00.000Z",
1509
+ disabled_reason: "manual",
1510
+ enabled: true,
1511
+ event_types: [],
1512
+ first_failure_at: "2026-01-01T00:00:00.000Z",
1513
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1514
+ legacy_signature: true,
1515
+ prev_signing_secret_active: true,
1516
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
1517
+ scope_id: "string",
1518
+ scope_type: "workspace",
1519
+ signing_secret_hint: "x9Q=",
1520
+ status: "enabled",
1521
+ updated_at: "2026-01-01T00:00:00.000Z",
1522
+ url: "https://api.acme.com/webhooks"
1523
+ } },
1524
+ { op: "actors.bookmarks.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/bookmarks$/, status: 200, contentType: "application/json", body: {
1525
+ data: [
1526
+ {
1527
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1528
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1529
+ created_at: "2026-05-01T12:00:00.000Z",
1530
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
1531
+ }
1532
+ ],
1533
+ pagination: { next_cursor: null, has_more: false }
1534
+ } },
1535
+ { op: "actors.followers.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/followers$/, status: 200, contentType: "application/json", body: {
1536
+ data: [
1537
+ {
1538
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1539
+ created_at: "2026-05-01T12:00:00.000Z",
1540
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
1541
+ dst_post_id: null,
1542
+ id: "eeeeeeee-0000-0000-0000-000000000001",
1543
+ kind: "follow",
1544
+ payload: {},
1545
+ src_actor: {
1546
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
1547
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1548
+ created_at: "2026-05-01T12:00:00.000Z",
1549
+ display_name: "Ada Lovelace",
1550
+ external_id: "user_abc123",
1551
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1552
+ is_private: false,
1553
+ metadata: { tier: "pro" },
1554
+ status: "active",
1555
+ updated_at: "2026-05-01T12:00:00.000Z"
1556
+ },
1557
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
1558
+ }
1559
+ ],
1560
+ pagination: { next_cursor: null, has_more: false }
1561
+ } },
1562
+ { op: "actors.following.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/following$/, status: 200, contentType: "application/json", body: {
1563
+ data: [
1564
+ {
1565
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1566
+ created_at: "2026-05-01T12:00:00.000Z",
1567
+ dst_actor: {
1568
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
1569
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1570
+ created_at: "2026-05-01T12:00:00.000Z",
1571
+ display_name: "Ada Lovelace",
1572
+ external_id: "user_abc123",
1573
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1574
+ is_private: false,
1575
+ metadata: { tier: "pro" },
1576
+ status: "active",
1577
+ updated_at: "2026-05-01T12:00:00.000Z"
1578
+ },
1579
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
1580
+ dst_post_id: null,
1581
+ id: "eeeeeeee-0000-0000-0000-000000000001",
1582
+ kind: "follow",
1583
+ payload: {},
1584
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
1585
+ }
1586
+ ],
1587
+ pagination: { next_cursor: null, has_more: false }
1588
+ } },
1589
+ { op: "actors.restricts.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/restricts$/, status: 200, contentType: "application/json", body: {
1590
+ data: [
1591
+ {
1592
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1593
+ created_at: "2026-05-01T12:00:00.000Z",
1594
+ dst_actor: {
1595
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
1596
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1597
+ created_at: "2026-05-01T12:00:00.000Z",
1598
+ display_name: "Ada Lovelace",
1599
+ external_id: "user_abc123",
1600
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1601
+ is_private: false,
1602
+ metadata: { tier: "pro" },
1603
+ status: "active",
1604
+ updated_at: "2026-05-01T12:00:00.000Z"
1605
+ },
1606
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
1607
+ dst_post_id: null,
1608
+ id: "eeeeeeee-0000-0000-0000-000000000001",
1609
+ kind: "follow",
1610
+ payload: {},
1611
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
1612
+ }
1613
+ ],
1614
+ pagination: { next_cursor: null, has_more: false }
1615
+ } },
1616
+ { op: "actors.archived.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/archived$/, status: 200, contentType: "application/json", body: {
1617
+ data: [
1618
+ {
1619
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1620
+ assets: [
1621
+ {
1622
+ alt_text: "A golden retriever on a beach",
1623
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
1624
+ }
1625
+ ],
1626
+ attributes: {},
1627
+ body: "Stories are live!",
1628
+ comment_count: 4,
1629
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1630
+ created_at: "2026-05-01T12:00:00.000Z",
1631
+ edit_count: 0,
1632
+ edited_at: null,
1633
+ expires_at: null,
1634
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1635
+ kind: "text",
1636
+ pinned: false,
1637
+ quote_count: 0,
1638
+ reaction_counts: { fire: 3, like: 12 },
1639
+ repost_count: 0,
1640
+ scheduled_for: null,
1641
+ settings: {
1642
+ allow_quote: true,
1643
+ allow_repost: true,
1644
+ comments: "everyone",
1645
+ hide_reaction_counts: false
1646
+ },
1647
+ source_post_id: null,
1648
+ status: "published",
1649
+ title: "Shipping Phase 8",
1650
+ updated_at: "2026-05-01T12:00:00.000Z",
1651
+ url: "https://cdn.example.com/img.png",
1652
+ view_count: 0,
1653
+ visibility: "public"
1654
+ }
1655
+ ],
1656
+ pagination: { next_cursor: null, has_more: false }
1657
+ } },
1658
+ { op: "actors.counters", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/counters$/, status: 200, contentType: "application/json", body: {
1659
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1660
+ blocks_count: 0,
1661
+ comment_count: 12,
1662
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1663
+ follower_count: 42,
1664
+ following_count: 17,
1665
+ post_count: 5,
1666
+ updated_at: "2026-05-01T12:00:00.000Z"
1667
+ } },
1668
+ { op: "actors.insights", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/insights$/, status: 200, contentType: "application/json", body: {
1669
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1670
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1671
+ daily: [{ day: "2026-05-01", follower_count: 1240 }],
1672
+ follower_count: 1240
1673
+ } },
1674
+ { op: "actors.mentions.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/mentions$/, status: 200, contentType: "application/json", body: {
1675
+ data: [
1676
+ {
1677
+ created_at: "2026-05-01T12:00:00.000Z",
1678
+ mentioned_id: "aaaaaaaa-0000-0000-0000-000000000001",
1679
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1680
+ source: "post",
1681
+ source_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
1682
+ }
1683
+ ],
1684
+ pagination: { next_cursor: null, has_more: false }
1685
+ } },
1686
+ { op: "assets.complete", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/assets\/[^\/]+\/complete$/, status: 200, contentType: "application/json", body: {
1687
+ id: "eeeeeeee-0000-0000-0000-000000000001",
1688
+ status: "ready",
1689
+ upload: {
1690
+ expires_at: "2026-05-01T12:15:00.000Z",
1691
+ headers: { "content-length": "10485760", "content-type": "video/mp4" },
1692
+ method: "PUT",
1693
+ url: "https://\u2026r2.cloudflarestorage.com/\u2026?X-Amz-Signature=\u2026"
1694
+ }
1695
+ } },
1696
+ { op: "posts.reactions.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/reactions$/, status: 201, contentType: "application/json", body: {
1697
+ created: true,
1698
+ edge: {
1699
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1700
+ created_at: "2026-05-01T12:00:00.000Z",
1701
+ dst_actor_id: null,
1702
+ dst_post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1703
+ id: "eeeeeeee-0000-0000-0000-000000000001",
1704
+ kind: "reaction:like",
1705
+ payload: {},
1706
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
1707
+ },
1708
+ reaction_counts: { fire: 3, like: 13 }
1709
+ } },
1710
+ { op: "posts.reactions.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/reactions$/, status: 200, contentType: "application/json", body: {
1711
+ data: [
1712
+ {
1713
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1714
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1715
+ created_at: "2026-05-01T12:00:00.000Z",
1716
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1717
+ type: "like"
1718
+ }
1719
+ ],
1720
+ pagination: { next_cursor: null, has_more: false }
1721
+ } },
1722
+ { op: "posts.revisions.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/revisions$/, status: 200, contentType: "application/json", body: {
1723
+ data: [
1724
+ {
1725
+ attributes: {},
1726
+ body: "shipping today.",
1727
+ edited_at: "2026-05-01T12:15:00.000Z",
1728
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1729
+ revision_n: 1,
1730
+ title: "Phase 8"
1731
+ }
1732
+ ],
1733
+ pagination: { next_cursor: null, has_more: false }
1734
+ } },
1735
+ { op: "webhooks.events.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/webhooks\/events\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1736
+ attempts: [
1737
+ {
1738
+ attempt_number: 1,
1739
+ attempted_at: "2026-01-01T00:00:00.000Z",
1740
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1741
+ error_message: "request timed out",
1742
+ event_id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
1743
+ event_type: "user.created",
1744
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1745
+ latency_ms: 1,
1746
+ response_body: "string",
1747
+ status_code: 1,
1748
+ succeeded: true,
1749
+ trigger: "automatic",
1750
+ url: "https://example.com"
1751
+ }
1752
+ ],
1753
+ created_at: "2026-01-01T00:00:00.000Z",
1754
+ deliveries: [
1755
+ {
1756
+ attempt_number: 1,
1757
+ attempted_at: "2026-01-01T00:00:00.000Z",
1758
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1759
+ next_attempt_at: "2026-01-01T00:00:00.000Z",
1760
+ status_code: 1,
1761
+ succeeded: true
1762
+ }
1763
+ ],
1764
+ id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
1765
+ payload: {},
1766
+ status: "pending",
1767
+ test: true,
1768
+ type: "post.created"
1769
+ } },
1770
+ { op: "hashtags.posts.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/hashtags\/[^\/]+\/posts$/, status: 200, contentType: "application/json", body: {
1771
+ data: [
1772
+ {
1773
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1774
+ assets: [
1775
+ {
1776
+ alt_text: "A golden retriever on a beach",
1777
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
1778
+ }
1779
+ ],
1780
+ attributes: {},
1781
+ body: "Stories are live!",
1782
+ comment_count: 4,
1783
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1784
+ created_at: "2026-05-01T12:00:00.000Z",
1785
+ edit_count: 0,
1786
+ edited_at: null,
1787
+ expires_at: null,
1788
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1789
+ kind: "text",
1790
+ pinned: false,
1791
+ quote_count: 0,
1792
+ reaction_counts: { fire: 3, like: 12 },
1793
+ repost_count: 0,
1794
+ scheduled_for: null,
1795
+ settings: {
1796
+ allow_quote: true,
1797
+ allow_repost: true,
1798
+ comments: "everyone",
1799
+ hide_reaction_counts: false
1800
+ },
1801
+ source_post_id: null,
1802
+ status: "published",
1803
+ title: "Shipping Phase 8",
1804
+ updated_at: "2026-05-01T12:00:00.000Z",
1805
+ url: "https://cdn.example.com/img.png",
1806
+ view_count: 0,
1807
+ visibility: "public"
1808
+ }
1809
+ ],
1810
+ pagination: { next_cursor: null, has_more: false }
1811
+ } },
1812
+ { op: "posts.bookmark", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/bookmark$/, status: 201, contentType: "application/json", body: {
1813
+ bookmark: {
1814
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1815
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1816
+ created_at: "2026-05-01T12:00:00.000Z",
1817
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
1818
+ },
1819
+ created: true
1820
+ } },
1821
+ { op: "posts.comments.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments$/, status: 201, contentType: "application/json", body: {
1822
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1823
+ assets: [
1824
+ {
1825
+ alt_text: "A golden retriever on a beach",
1826
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
1827
+ }
1828
+ ],
1829
+ body: "Looks great, shipping today.",
1830
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1831
+ created_at: "2026-05-01T12:00:00.000Z",
1832
+ depth: 0,
1833
+ id: "bbbbbbbb-0000-0000-0000-000000000001",
1834
+ parent_id: null,
1835
+ pinned: false,
1836
+ pinned_at: null,
1837
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1838
+ reaction_counts: { like: 2 },
1839
+ status: "published",
1840
+ updated_at: "2026-05-01T12:00:00.000Z",
1841
+ visibility: "public"
1842
+ } },
1843
+ { op: "posts.comments.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments$/, status: 200, contentType: "application/json", body: {
1844
+ data: [
1845
+ {
1846
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1847
+ assets: [
1848
+ {
1849
+ alt_text: "A golden retriever on a beach",
1850
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
1851
+ }
1852
+ ],
1853
+ body: "Looks great, shipping today.",
1854
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1855
+ created_at: "2026-05-01T12:00:00.000Z",
1856
+ depth: 0,
1857
+ id: "bbbbbbbb-0000-0000-0000-000000000001",
1858
+ parent_id: null,
1859
+ pinned: false,
1860
+ pinned_at: null,
1861
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1862
+ reaction_counts: { like: 2 },
1863
+ status: "published",
1864
+ updated_at: "2026-05-01T12:00:00.000Z",
1865
+ visibility: "public"
1866
+ }
1867
+ ],
1868
+ pagination: { next_cursor: null, has_more: false }
1869
+ } },
1870
+ { op: "posts.insights", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/insights$/, status: 200, contentType: "application/json", body: {
1871
+ comment_count: 34,
1872
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1873
+ daily: [{ day: "2026-05-01", reach: 210, views: 340 }],
1874
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1875
+ quote_count: 4,
1876
+ reaction_count: 128,
1877
+ repost_count: 9,
1878
+ unique_reach: 3110,
1879
+ views: 4820
1880
+ } },
1881
+ { op: "posts.unbookmark", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/bookmark$/, status: 204, contentType: null, body: null },
1882
+ { op: "webhooks.events.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/webhooks\/events\/[^\/]+$/, status: 200, contentType: "application/json", body: {
1883
+ attempts: [
1884
+ {
1885
+ attempt_number: 1,
1886
+ attempted_at: "2026-01-01T00:00:00.000Z",
1887
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1888
+ error_message: "request timed out",
1889
+ event_id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
1890
+ event_type: "user.created",
1891
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1892
+ latency_ms: 1,
1893
+ response_body: "string",
1894
+ status_code: 1,
1895
+ succeeded: true,
1896
+ trigger: "automatic",
1897
+ url: "https://example.com"
1898
+ }
1899
+ ],
1900
+ created_at: "2026-01-01T00:00:00.000Z",
1901
+ deliveries: [
1902
+ {
1903
+ attempt_number: 1,
1904
+ attempted_at: "2026-01-01T00:00:00.000Z",
1905
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
1906
+ next_attempt_at: "2026-01-01T00:00:00.000Z",
1907
+ status_code: 1,
1908
+ succeeded: true
1909
+ }
1910
+ ],
1911
+ id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
1912
+ payload: {},
1913
+ status: "pending",
1914
+ test: true,
1915
+ type: "post.created"
1916
+ } },
1917
+ { op: "actors.assets.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/assets$/, status: 200, contentType: "application/json", body: {
1918
+ data: [
1919
+ {
1920
+ byte_size: 512e3,
1921
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1922
+ content_type: "image/jpeg",
1923
+ created_at: "2026-05-01T12:00:00.000Z",
1924
+ duration_s: 12.48,
1925
+ failure_reason: null,
1926
+ height: 4032,
1927
+ id: "eeeeeeee-0000-0000-0000-000000000001",
1928
+ kind: "image",
1929
+ owner_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
1930
+ renditions: [
1931
+ {
1932
+ byte_size: 184320,
1933
+ content_type: "image/jpeg",
1934
+ height: 960,
1935
+ name: "medium",
1936
+ url: "https://\u2026r2.cloudflarestorage.com/\u2026?X-Amz-Signature=\u2026",
1937
+ width: 1280
1938
+ }
1939
+ ],
1940
+ status: "ready",
1941
+ updated_at: "2026-05-01T12:00:00.000Z",
1942
+ width: 3024
1943
+ }
1944
+ ],
1945
+ pagination: { next_cursor: null, has_more: false }
1946
+ } },
1947
+ { op: "actors.blocks.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/blocks$/, status: 200, contentType: "application/json", body: {
1948
+ data: [
1949
+ {
1950
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1951
+ created_at: "2026-05-01T12:00:00.000Z",
1952
+ dst_actor: {
1953
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
1954
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1955
+ created_at: "2026-05-01T12:00:00.000Z",
1956
+ display_name: "Ada Lovelace",
1957
+ external_id: "user_abc123",
1958
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1959
+ is_private: false,
1960
+ metadata: { tier: "pro" },
1961
+ status: "active",
1962
+ updated_at: "2026-05-01T12:00:00.000Z"
1963
+ },
1964
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
1965
+ dst_post_id: null,
1966
+ id: "eeeeeeee-0000-0000-0000-000000000001",
1967
+ kind: "follow",
1968
+ payload: {},
1969
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
1970
+ }
1971
+ ],
1972
+ pagination: { next_cursor: null, has_more: false }
1973
+ } },
1974
+ { op: "actors.drafts.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/drafts$/, status: 200, contentType: "application/json", body: {
1975
+ data: [
1976
+ {
1977
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
1978
+ assets: [
1979
+ {
1980
+ alt_text: "A golden retriever on a beach",
1981
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
1982
+ }
1983
+ ],
1984
+ attributes: {},
1985
+ body: "Stories are live!",
1986
+ comment_count: 4,
1987
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
1988
+ created_at: "2026-05-01T12:00:00.000Z",
1989
+ edit_count: 0,
1990
+ edited_at: null,
1991
+ expires_at: null,
1992
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
1993
+ kind: "text",
1994
+ pinned: false,
1995
+ quote_count: 0,
1996
+ reaction_counts: { fire: 3, like: 12 },
1997
+ repost_count: 0,
1998
+ scheduled_for: null,
1999
+ settings: {
2000
+ allow_quote: true,
2001
+ allow_repost: true,
2002
+ comments: "everyone",
2003
+ hide_reaction_counts: false
2004
+ },
2005
+ source_post_id: null,
2006
+ status: "published",
2007
+ title: "Shipping Phase 8",
2008
+ updated_at: "2026-05-01T12:00:00.000Z",
2009
+ url: "https://cdn.example.com/img.png",
2010
+ view_count: 0,
2011
+ visibility: "public"
2012
+ }
2013
+ ],
2014
+ pagination: { next_cursor: null, has_more: false }
2015
+ } },
2016
+ { op: "actors.tagged.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/tagged$/, status: 200, contentType: "application/json", body: {
2017
+ data: [
2018
+ {
2019
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2020
+ assets: [
2021
+ {
2022
+ alt_text: "A golden retriever on a beach",
2023
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2024
+ }
2025
+ ],
2026
+ attributes: {},
2027
+ body: "Stories are live!",
2028
+ comment_count: 4,
2029
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2030
+ created_at: "2026-05-01T12:00:00.000Z",
2031
+ edit_count: 0,
2032
+ edited_at: null,
2033
+ expires_at: null,
2034
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2035
+ kind: "text",
2036
+ pinned: false,
2037
+ quote_count: 0,
2038
+ reaction_counts: { fire: 3, like: 12 },
2039
+ repost_count: 0,
2040
+ scheduled_for: null,
2041
+ settings: {
2042
+ allow_quote: true,
2043
+ allow_repost: true,
2044
+ comments: "everyone",
2045
+ hide_reaction_counts: false
2046
+ },
2047
+ source_post_id: null,
2048
+ status: "published",
2049
+ title: "Shipping Phase 8",
2050
+ updated_at: "2026-05-01T12:00:00.000Z",
2051
+ url: "https://cdn.example.com/img.png",
2052
+ view_count: 0,
2053
+ visibility: "public"
2054
+ }
2055
+ ],
2056
+ pagination: { next_cursor: null, has_more: false }
2057
+ } },
2058
+ { op: "conversations.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+$/, status: 204, contentType: null, body: null },
2059
+ { op: "conversations.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2060
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2061
+ created_at: "2026-05-01T12:00:00.000Z",
2062
+ created_by: null,
2063
+ id: "11111111-2222-3333-4444-555555555555",
2064
+ kind: "direct",
2065
+ last_message_at: "2026-05-01T12:00:00.000Z",
2066
+ name: null,
2067
+ participants: [
2068
+ {
2069
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2070
+ joined_at: "2026-05-01T12:00:00.000Z",
2071
+ last_read_at: null,
2072
+ muted: false,
2073
+ muted_until: null,
2074
+ pinned: false,
2075
+ role: "member"
2076
+ }
2077
+ ],
2078
+ unread_count: 0,
2079
+ updated_at: "2026-05-01T12:00:00.000Z"
2080
+ } },
2081
+ { op: "conversations.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2082
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2083
+ created_at: "2026-05-01T12:00:00.000Z",
2084
+ created_by: null,
2085
+ id: "11111111-2222-3333-4444-555555555555",
2086
+ kind: "direct",
2087
+ last_message_at: "2026-05-01T12:00:00.000Z",
2088
+ name: null,
2089
+ participants: [
2090
+ {
2091
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2092
+ joined_at: "2026-05-01T12:00:00.000Z",
2093
+ last_read_at: null,
2094
+ muted: false,
2095
+ muted_until: null,
2096
+ pinned: false,
2097
+ role: "member"
2098
+ }
2099
+ ],
2100
+ unread_count: 0,
2101
+ updated_at: "2026-05-01T12:00:00.000Z"
2102
+ } },
2103
+ { op: "lists.members.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/lists\/[^\/]+\/members$/, status: 201, contentType: "application/json", body: {
2104
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
2105
+ added_at: "2026-05-01T12:00:00.000Z",
2106
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2107
+ list_id: "11111111-0000-0000-0000-000000000001"
2108
+ } },
2109
+ { op: "lists.members.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/lists\/[^\/]+\/members$/, status: 200, contentType: "application/json", body: {
2110
+ data: [
2111
+ {
2112
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
2113
+ added_at: "2026-05-01T12:00:00.000Z",
2114
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2115
+ list_id: "11111111-0000-0000-0000-000000000001"
2116
+ }
2117
+ ],
2118
+ pagination: { next_cursor: null, has_more: false }
2119
+ } },
2120
+ { op: "posts.reposts.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/reposts$/, status: 200, contentType: "application/json", body: {
2121
+ data: [
2122
+ {
2123
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2124
+ assets: [
2125
+ {
2126
+ alt_text: "A golden retriever on a beach",
2127
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2128
+ }
2129
+ ],
2130
+ attributes: {},
2131
+ body: "Stories are live!",
2132
+ comment_count: 4,
2133
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2134
+ created_at: "2026-05-01T12:00:00.000Z",
2135
+ edit_count: 0,
2136
+ edited_at: null,
2137
+ expires_at: null,
2138
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2139
+ kind: "text",
2140
+ pinned: false,
2141
+ quote_count: 0,
2142
+ reaction_counts: { fire: 3, like: 12 },
2143
+ repost_count: 0,
2144
+ scheduled_for: null,
2145
+ settings: {
2146
+ allow_quote: true,
2147
+ allow_repost: true,
2148
+ comments: "everyone",
2149
+ hide_reaction_counts: false
2150
+ },
2151
+ source_post_id: null,
2152
+ status: "published",
2153
+ title: "Shipping Phase 8",
2154
+ updated_at: "2026-05-01T12:00:00.000Z",
2155
+ url: "https://cdn.example.com/img.png",
2156
+ view_count: 0,
2157
+ visibility: "public"
2158
+ }
2159
+ ],
2160
+ pagination: { next_cursor: null, has_more: false }
2161
+ } },
2162
+ { op: "posts.viewers.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/viewers$/, status: 200, contentType: "application/json", body: {
2163
+ data: [
2164
+ {
2165
+ viewed_at: "2026-05-01T11:30:00.000Z",
2166
+ viewer_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
2167
+ viewer_avatar_url: "https://...",
2168
+ viewer_display_name: "Bob",
2169
+ viewer_external_id: "bob"
2170
+ }
2171
+ ],
2172
+ pagination: { next_cursor: null, has_more: false }
2173
+ } },
2174
+ { op: "actors.hides.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/hides$/, status: 200, contentType: "application/json", body: {
2175
+ data: [
2176
+ {
2177
+ created_at: "2026-05-01T12:00:00.000Z",
2178
+ post_id: "bbbbbbbb-0000-0000-0000-000000000001"
2179
+ }
2180
+ ],
2181
+ pagination: { next_cursor: null, has_more: false }
2182
+ } },
2183
+ { op: "actors.mutes.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/mutes$/, status: 200, contentType: "application/json", body: {
2184
+ data: [
2185
+ {
2186
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2187
+ created_at: "2026-05-01T12:00:00.000Z",
2188
+ dst_actor: {
2189
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
2190
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2191
+ created_at: "2026-05-01T12:00:00.000Z",
2192
+ display_name: "Ada Lovelace",
2193
+ external_id: "user_abc123",
2194
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2195
+ is_private: false,
2196
+ metadata: { tier: "pro" },
2197
+ status: "active",
2198
+ updated_at: "2026-05-01T12:00:00.000Z"
2199
+ },
2200
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
2201
+ dst_post_id: null,
2202
+ id: "eeeeeeee-0000-0000-0000-000000000001",
2203
+ kind: "follow",
2204
+ payload: {},
2205
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
2206
+ }
2207
+ ],
2208
+ pagination: { next_cursor: null, has_more: false }
2209
+ } },
2210
+ { op: "posts.quotes.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/quotes$/, status: 200, contentType: "application/json", body: {
2211
+ data: [
2212
+ {
2213
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2214
+ assets: [
2215
+ {
2216
+ alt_text: "A golden retriever on a beach",
2217
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2218
+ }
2219
+ ],
2220
+ attributes: {},
2221
+ body: "Stories are live!",
2222
+ comment_count: 4,
2223
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2224
+ created_at: "2026-05-01T12:00:00.000Z",
2225
+ edit_count: 0,
2226
+ edited_at: null,
2227
+ expires_at: null,
2228
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2229
+ kind: "text",
2230
+ pinned: false,
2231
+ quote_count: 0,
2232
+ reaction_counts: { fire: 3, like: 12 },
2233
+ repost_count: 0,
2234
+ scheduled_for: null,
2235
+ settings: {
2236
+ allow_quote: true,
2237
+ allow_repost: true,
2238
+ comments: "everyone",
2239
+ hide_reaction_counts: false
2240
+ },
2241
+ source_post_id: null,
2242
+ status: "published",
2243
+ title: "Shipping Phase 8",
2244
+ updated_at: "2026-05-01T12:00:00.000Z",
2245
+ url: "https://cdn.example.com/img.png",
2246
+ view_count: 0,
2247
+ visibility: "public"
2248
+ }
2249
+ ],
2250
+ pagination: { next_cursor: null, has_more: false }
2251
+ } },
2252
+ { op: "posts.repost", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/repost$/, status: 201, contentType: "application/json", body: {
2253
+ created: true,
2254
+ repost: {
2255
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2256
+ assets: [
2257
+ {
2258
+ alt_text: "A golden retriever on a beach",
2259
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2260
+ }
2261
+ ],
2262
+ attributes: {},
2263
+ body: "Stories are live!",
2264
+ comment_count: 4,
2265
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2266
+ created_at: "2026-05-01T12:00:00.000Z",
2267
+ edit_count: 0,
2268
+ edited_at: null,
2269
+ expires_at: null,
2270
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2271
+ kind: "text",
2272
+ pinned: false,
2273
+ quote_count: 0,
2274
+ reaction_counts: { fire: 3, like: 12 },
2275
+ repost_count: 0,
2276
+ scheduled_for: null,
2277
+ settings: {
2278
+ allow_quote: true,
2279
+ allow_repost: true,
2280
+ comments: "everyone",
2281
+ hide_reaction_counts: false
2282
+ },
2283
+ source_post_id: null,
2284
+ status: "published",
2285
+ title: "Shipping Phase 8",
2286
+ updated_at: "2026-05-01T12:00:00.000Z",
2287
+ url: "https://cdn.example.com/img.png",
2288
+ view_count: 0,
2289
+ visibility: "public"
2290
+ },
2291
+ source: {
2292
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2293
+ assets: [
2294
+ {
2295
+ alt_text: "A golden retriever on a beach",
2296
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2297
+ }
2298
+ ],
2299
+ attributes: {},
2300
+ body: "Stories are live!",
2301
+ comment_count: 4,
2302
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2303
+ created_at: "2026-05-01T12:00:00.000Z",
2304
+ edit_count: 0,
2305
+ edited_at: null,
2306
+ expires_at: null,
2307
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2308
+ kind: "text",
2309
+ pinned: false,
2310
+ quote_count: 0,
2311
+ reaction_counts: { fire: 3, like: 12 },
2312
+ repost_count: 0,
2313
+ scheduled_for: null,
2314
+ settings: {
2315
+ allow_quote: true,
2316
+ allow_repost: true,
2317
+ comments: "everyone",
2318
+ hide_reaction_counts: false
2319
+ },
2320
+ source_post_id: null,
2321
+ status: "published",
2322
+ title: "Shipping Phase 8",
2323
+ updated_at: "2026-05-01T12:00:00.000Z",
2324
+ url: "https://cdn.example.com/img.png",
2325
+ view_count: 0,
2326
+ visibility: "public"
2327
+ }
2328
+ } },
2329
+ { op: "posts.unrepost", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/repost$/, status: 204, contentType: null, body: null },
2330
+ { op: "posts.voters.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/voters$/, status: 200, contentType: "application/json", body: {
2331
+ data: [
2332
+ {
2333
+ option_index: 1,
2334
+ voted_at: "2026-05-01T11:30:00.000Z",
2335
+ voter_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
2336
+ voter_avatar_url: "https://...",
2337
+ voter_display_name: "Bob",
2338
+ voter_external_id: "bob"
2339
+ }
2340
+ ],
2341
+ pagination: { next_cursor: null, has_more: false }
2342
+ } },
2343
+ { op: "actors.feed.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/feed$/, status: 200, contentType: "application/json", body: {
2344
+ data: [
2345
+ {
2346
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2347
+ assets: [
2348
+ {
2349
+ alt_text: "A golden retriever on a beach",
2350
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2351
+ }
2352
+ ],
2353
+ attributes: {},
2354
+ body: "Stories are live!",
2355
+ comment_count: 4,
2356
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2357
+ created_at: "2026-05-01T12:00:00.000Z",
2358
+ edit_count: 0,
2359
+ edited_at: null,
2360
+ expires_at: null,
2361
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2362
+ kind: "text",
2363
+ pinned: false,
2364
+ quote_count: 0,
2365
+ reaction_counts: { fire: 3, like: 12 },
2366
+ repost_count: 0,
2367
+ scheduled_for: null,
2368
+ settings: {
2369
+ allow_quote: true,
2370
+ allow_repost: true,
2371
+ comments: "everyone",
2372
+ hide_reaction_counts: false
2373
+ },
2374
+ source_post_id: null,
2375
+ status: "published",
2376
+ title: "Shipping Phase 8",
2377
+ updated_at: "2026-05-01T12:00:00.000Z",
2378
+ url: "https://cdn.example.com/img.png",
2379
+ view_count: 0,
2380
+ visibility: "public"
2381
+ }
2382
+ ],
2383
+ pagination: { next_cursor: null, has_more: false }
2384
+ } },
2385
+ { op: "collections.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/collections\/[^\/]+$/, status: 204, contentType: null, body: null },
2386
+ { op: "collections.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/collections\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2387
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2388
+ cover_asset_id: null,
2389
+ cover_url: null,
2390
+ created_at: "2026-05-01T12:00:00.000Z",
2391
+ id: "99999999-0000-0000-0000-000000000001",
2392
+ item_count: 12,
2393
+ kind: "bookmark",
2394
+ name: "Travel",
2395
+ owner_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2396
+ position: 0,
2397
+ updated_at: "2026-05-01T12:00:00.000Z",
2398
+ visibility: "private"
2399
+ } },
2400
+ { op: "collections.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/collections\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2401
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2402
+ cover_asset_id: null,
2403
+ cover_url: null,
2404
+ created_at: "2026-05-01T12:00:00.000Z",
2405
+ id: "99999999-0000-0000-0000-000000000001",
2406
+ item_count: 12,
2407
+ kind: "bookmark",
2408
+ name: "Travel",
2409
+ owner_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2410
+ position: 0,
2411
+ updated_at: "2026-05-01T12:00:00.000Z",
2412
+ visibility: "private"
2413
+ } },
2414
+ { op: "posts.recordView", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/views$/, status: 204, contentType: null, body: null },
2415
+ { op: "posts.votes.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/votes$/, status: 204, contentType: null, body: null },
2416
+ { op: "communities.delete", method: "DELETE", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+$/, status: 204, contentType: null, body: null },
2417
+ { op: "communities.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2418
+ app_id: "33333333-3333-3333-3333-333333333333",
2419
+ created_at: "2026-05-01T12:00:00.000Z",
2420
+ created_by: "aaaaaaaa-0000-0000-0000-000000000001",
2421
+ description: null,
2422
+ display_name: "My Product Community",
2423
+ id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2424
+ settings: { max_comment_depth: 3 },
2425
+ slug: "my-product-community",
2426
+ status: "active",
2427
+ updated_at: "2026-05-01T12:00:00.000Z",
2428
+ workspace_id: "11111111-1111-1111-1111-111111111111"
2429
+ } },
2430
+ { op: "communities.update", method: "PATCH", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2431
+ app_id: "33333333-3333-3333-3333-333333333333",
2432
+ created_at: "2026-05-01T12:00:00.000Z",
2433
+ created_by: "aaaaaaaa-0000-0000-0000-000000000001",
2434
+ description: null,
2435
+ display_name: "My Product Community",
2436
+ id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2437
+ settings: { max_comment_depth: 3 },
2438
+ slug: "my-product-community",
2439
+ status: "active",
2440
+ updated_at: "2026-05-01T12:00:00.000Z",
2441
+ workspace_id: "11111111-1111-1111-1111-111111111111"
2442
+ } },
2443
+ { op: "lists.feed.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/lists\/[^\/]+\/feed$/, status: 200, contentType: "application/json", body: {
2444
+ data: [
2445
+ {
2446
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2447
+ assets: [
2448
+ {
2449
+ alt_text: "A golden retriever on a beach",
2450
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2451
+ }
2452
+ ],
2453
+ attributes: {},
2454
+ body: "Stories are live!",
2455
+ comment_count: 4,
2456
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2457
+ created_at: "2026-05-01T12:00:00.000Z",
2458
+ edit_count: 0,
2459
+ edited_at: null,
2460
+ expires_at: null,
2461
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2462
+ kind: "text",
2463
+ pinned: false,
2464
+ quote_count: 0,
2465
+ reaction_counts: { fire: 3, like: 12 },
2466
+ repost_count: 0,
2467
+ scheduled_for: null,
2468
+ settings: {
2469
+ allow_quote: true,
2470
+ allow_repost: true,
2471
+ comments: "everyone",
2472
+ hide_reaction_counts: false
2473
+ },
2474
+ source_post_id: null,
2475
+ status: "published",
2476
+ title: "Shipping Phase 8",
2477
+ updated_at: "2026-05-01T12:00:00.000Z",
2478
+ url: "https://cdn.example.com/img.png",
2479
+ view_count: 0,
2480
+ visibility: "public"
2481
+ }
2482
+ ],
2483
+ pagination: { next_cursor: null, has_more: false }
2484
+ } },
2485
+ { op: "hashtags.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/hashtags\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2486
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2487
+ first_used_at: "2026-05-01T12:00:00.000Z",
2488
+ post_count: 17,
2489
+ tag: "storymode",
2490
+ window_post_count: null
2491
+ } },
2492
+ { op: "actors.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+$/, status: 204, contentType: null, body: null },
2493
+ { op: "actors.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2494
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
2495
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2496
+ created_at: "2026-05-01T12:00:00.000Z",
2497
+ display_name: "Ada Lovelace",
2498
+ external_id: "user_abc123",
2499
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2500
+ is_private: false,
2501
+ metadata: { tier: "pro" },
2502
+ status: "active",
2503
+ updated_at: "2026-05-01T12:00:00.000Z"
2504
+ } },
2505
+ { op: "actors.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2506
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
2507
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2508
+ created_at: "2026-05-01T12:00:00.000Z",
2509
+ display_name: "Ada Lovelace",
2510
+ external_id: "user_abc123",
2511
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2512
+ is_private: false,
2513
+ metadata: { tier: "pro" },
2514
+ status: "active",
2515
+ updated_at: "2026-05-01T12:00:00.000Z"
2516
+ } },
2517
+ { op: "assets.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/assets\/[^\/]+$/, status: 204, contentType: null, body: null },
2518
+ { op: "assets.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/assets\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2519
+ byte_size: 512e3,
2520
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2521
+ content_type: "image/jpeg",
2522
+ created_at: "2026-05-01T12:00:00.000Z",
2523
+ duration_s: 12.48,
2524
+ failure_reason: null,
2525
+ height: 4032,
2526
+ id: "eeeeeeee-0000-0000-0000-000000000001",
2527
+ kind: "image",
2528
+ owner_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2529
+ renditions: [
2530
+ {
2531
+ byte_size: 184320,
2532
+ content_type: "image/jpeg",
2533
+ height: 960,
2534
+ name: "medium",
2535
+ url: "https://\u2026r2.cloudflarestorage.com/\u2026?X-Amz-Signature=\u2026",
2536
+ width: 1280
2537
+ }
2538
+ ],
2539
+ status: "ready",
2540
+ updated_at: "2026-05-01T12:00:00.000Z",
2541
+ width: 3024
2542
+ } },
2543
+ { op: "lists.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/lists\/[^\/]+$/, status: 204, contentType: null, body: null },
2544
+ { op: "lists.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/lists\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2545
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2546
+ created_at: "2026-05-01T12:00:00.000Z",
2547
+ description: "Curated tech accounts I follow.",
2548
+ id: "11111111-0000-0000-0000-000000000001",
2549
+ member_count: 12,
2550
+ name: "Tech news",
2551
+ owner_id: "aaaaaaaa-0000-0000-0000-000000000001",
2552
+ updated_at: "2026-05-01T12:00:00.000Z",
2553
+ visibility: "public"
2554
+ } },
2555
+ { op: "lists.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/lists\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2556
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2557
+ created_at: "2026-05-01T12:00:00.000Z",
2558
+ description: "Curated tech accounts I follow.",
2559
+ id: "11111111-0000-0000-0000-000000000001",
2560
+ member_count: 12,
2561
+ name: "Tech news",
2562
+ owner_id: "aaaaaaaa-0000-0000-0000-000000000001",
2563
+ updated_at: "2026-05-01T12:00:00.000Z",
2564
+ visibility: "public"
2565
+ } },
2566
+ { op: "posts.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+$/, status: 204, contentType: null, body: null },
2567
+ { op: "posts.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2568
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2569
+ assets: [
2570
+ {
2571
+ alt_text: "A golden retriever on a beach",
2572
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2573
+ }
2574
+ ],
2575
+ attributes: {},
2576
+ body: "Stories are live!",
2577
+ comment_count: 4,
2578
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2579
+ created_at: "2026-05-01T12:00:00.000Z",
2580
+ edit_count: 0,
2581
+ edited_at: null,
2582
+ expires_at: null,
2583
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2584
+ kind: "text",
2585
+ pinned: false,
2586
+ quote_count: 0,
2587
+ reaction_counts: { fire: 3, like: 12 },
2588
+ repost_count: 0,
2589
+ scheduled_for: null,
2590
+ settings: {
2591
+ allow_quote: true,
2592
+ allow_repost: true,
2593
+ comments: "everyone",
2594
+ hide_reaction_counts: false
2595
+ },
2596
+ source_post_id: null,
2597
+ status: "published",
2598
+ title: "Shipping Phase 8",
2599
+ updated_at: "2026-05-01T12:00:00.000Z",
2600
+ url: "https://cdn.example.com/img.png",
2601
+ view_count: 0,
2602
+ visibility: "public"
2603
+ } },
2604
+ { op: "posts.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2605
+ actor_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2606
+ assets: [
2607
+ {
2608
+ alt_text: "A golden retriever on a beach",
2609
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2610
+ }
2611
+ ],
2612
+ attributes: {},
2613
+ body: "Stories are live!",
2614
+ comment_count: 4,
2615
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2616
+ created_at: "2026-05-01T12:00:00.000Z",
2617
+ edit_count: 0,
2618
+ edited_at: null,
2619
+ expires_at: null,
2620
+ id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2621
+ kind: "text",
2622
+ pinned: false,
2623
+ quote_count: 0,
2624
+ reaction_counts: { fire: 3, like: 12 },
2625
+ repost_count: 0,
2626
+ scheduled_for: null,
2627
+ settings: {
2628
+ allow_quote: true,
2629
+ allow_repost: true,
2630
+ comments: "everyone",
2631
+ hide_reaction_counts: false
2632
+ },
2633
+ source_post_id: null,
2634
+ status: "published",
2635
+ title: "Shipping Phase 8",
2636
+ updated_at: "2026-05-01T12:00:00.000Z",
2637
+ url: "https://cdn.example.com/img.png",
2638
+ view_count: 0,
2639
+ visibility: "public"
2640
+ } },
2641
+ { op: "communities.moderation.conversations.messages.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/conversations\/[^\/]+\/messages$/, status: 200, contentType: "application/json", body: {
2642
+ data: [
2643
+ {
2644
+ assets: [],
2645
+ attachments: [],
2646
+ body: "Hey there.",
2647
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2648
+ conversation_id: "11111111-2222-3333-4444-555555555555",
2649
+ created_at: "2026-05-01T12:00:00.000Z",
2650
+ deleted_at: null,
2651
+ edited_at: null,
2652
+ id: "eeeeeeee-0000-0000-0000-000000000001",
2653
+ kind: "text",
2654
+ reaction_counts: { like: 1 },
2655
+ reply_to_id: null,
2656
+ sender: {
2657
+ avatar_url: "https://cdn.productcraft.co/actors/aaaa.png",
2658
+ display_name: "Alice Nguyen",
2659
+ id: "aaaaaaaa-0000-0000-0000-000000000001",
2660
+ status: "active"
2661
+ },
2662
+ sender_id: "aaaaaaaa-0000-0000-0000-000000000001"
2663
+ }
2664
+ ],
2665
+ pagination: { next_cursor: null, has_more: false }
2666
+ } },
2667
+ { op: "communities.webhooks.endpoints.rotateSecret", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/endpoints\/[^\/]+\/rotate-secret$/, status: 200, contentType: "application/json", body: {
2668
+ consecutive_failures: 1,
2669
+ created_at: "2026-01-01T00:00:00.000Z",
2670
+ description: "Production receiver",
2671
+ disabled_at: "2026-01-01T00:00:00.000Z",
2672
+ disabled_reason: "manual",
2673
+ enabled: true,
2674
+ event_types: [],
2675
+ first_failure_at: "2026-01-01T00:00:00.000Z",
2676
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2677
+ legacy_signature: true,
2678
+ prev_signing_secret_active: true,
2679
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
2680
+ scope_id: "string",
2681
+ scope_type: "workspace",
2682
+ signing_secret: "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
2683
+ signing_secret_hint: "x9Q=",
2684
+ status: "enabled",
2685
+ updated_at: "2026-01-01T00:00:00.000Z",
2686
+ url: "https://api.acme.com/webhooks"
2687
+ } },
2688
+ { op: "communities.moderation.actors.shadowBan", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/actors\/[^\/]+\/shadow-ban$/, status: 200, contentType: "application/json", body: {
2689
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
2690
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2691
+ created_at: "2026-05-01T12:00:00.000Z",
2692
+ display_name: "Ada Lovelace",
2693
+ external_id: "user_abc123",
2694
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2695
+ is_private: false,
2696
+ metadata: { tier: "pro" },
2697
+ shadow_banned_at: "2026-01-01T00:00:00.000Z",
2698
+ shadow_banned_reason: "string",
2699
+ shadow_banned_until: "string",
2700
+ status: "active",
2701
+ updated_at: "2026-05-01T12:00:00.000Z"
2702
+ } },
2703
+ { op: "communities.moderation.actors.unshadowBan", method: "DELETE", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/actors\/[^\/]+\/shadow-ban$/, status: 200, contentType: "application/json", body: {
2704
+ avatar_url: "https://cdn.example.com/avatars/ada.png",
2705
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2706
+ created_at: "2026-05-01T12:00:00.000Z",
2707
+ display_name: "Ada Lovelace",
2708
+ external_id: "user_abc123",
2709
+ id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
2710
+ is_private: false,
2711
+ metadata: { tier: "pro" },
2712
+ shadow_banned_at: "2026-01-01T00:00:00.000Z",
2713
+ shadow_banned_reason: "string",
2714
+ shadow_banned_until: "string",
2715
+ status: "active",
2716
+ updated_at: "2026-05-01T12:00:00.000Z"
2717
+ } },
2718
+ { op: "communities.moderation.blockedTerms.delete", method: "DELETE", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/blocked-terms\/[^\/]+$/, status: 204, contentType: null, body: null },
2719
+ { op: "communities.moderation.flags.resolve", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/moderation\/flags\/[^\/]+\/actions$/, status: 201, contentType: "application/json", body: {
2720
+ flag: {
2721
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2722
+ created_at: "2026-05-01T12:00:00.000Z",
2723
+ id: "ffffffff-0000-0000-0000-000000000001",
2724
+ reason: "Spam \u2014 same link posted 6 times in 5 minutes.",
2725
+ reporter_actor: {
2726
+ avatar_url: "https://cdn.productcraft.co/actors/aaaa.png",
2727
+ display_name: "Alice Nguyen",
2728
+ id: "aaaaaaaa-0000-0000-0000-000000000001",
2729
+ status: "active"
2730
+ },
2731
+ reporter_actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2732
+ status: "open",
2733
+ target_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2734
+ target_kind: "post",
2735
+ updated_at: "2026-05-01T12:00:00.000Z"
2736
+ },
2737
+ moderation_action: {
2738
+ action: "hide",
2739
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2740
+ created_at: "2026-05-01T12:00:00.000Z",
2741
+ flag_id: "ffffffff-0000-0000-0000-000000000001",
2742
+ id: "eeeeeeee-0000-0000-0000-000000000001",
2743
+ moderator_account_id: "99999999-0000-0000-0000-000000000001",
2744
+ notes: "Spam confirmed.",
2745
+ target_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2746
+ target_kind: "post"
2747
+ }
2748
+ } },
2749
+ { op: "communities.webhooks.endpoints.test", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/endpoints\/[^\/]+\/test$/, status: 200, contentType: "application/json", body: {
2750
+ attempt_number: 1,
2751
+ attempted_at: "2026-01-01T00:00:00.000Z",
2752
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2753
+ error_message: "request timed out",
2754
+ event_id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
2755
+ event_type: "user.created",
2756
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2757
+ latency_ms: 1,
2758
+ response_body: "string",
2759
+ status_code: 1,
2760
+ succeeded: true,
2761
+ trigger: "automatic",
2762
+ url: "https://example.com"
2763
+ } },
2764
+ { op: "communities.webhooks.events.replay", method: "POST", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/events\/[^\/]+\/replay$/, status: 200, contentType: "application/json", body: {
2765
+ attempts: [
2766
+ {
2767
+ attempt_number: 1,
2768
+ attempted_at: "2026-01-01T00:00:00.000Z",
2769
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2770
+ error_message: "request timed out",
2771
+ event_id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
2772
+ event_type: "user.created",
2773
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2774
+ latency_ms: 1,
2775
+ response_body: "string",
2776
+ status_code: 1,
2777
+ succeeded: true,
2778
+ trigger: "automatic",
2779
+ url: "https://example.com"
2780
+ }
2781
+ ],
2782
+ event_id: "string"
2783
+ } },
2784
+ { op: "conversations.messages.reactions.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/messages\/[^\/]+\/reactions$/, status: 201, contentType: "application/json", body: {
2785
+ created: true,
2786
+ reaction: {
2787
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2788
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2789
+ created_at: "2026-05-01T12:00:00.000Z",
2790
+ message_id: "eeeeeeee-0000-0000-0000-000000000001",
2791
+ type: "heart"
2792
+ },
2793
+ reaction_counts: { heart: 3, laugh: 1 }
2794
+ } },
2795
+ { op: "conversations.messages.reactions.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/messages\/[^\/]+\/reactions$/, status: 200, contentType: "application/json", body: {
2796
+ data: [
2797
+ {
2798
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2799
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2800
+ created_at: "2026-05-01T12:00:00.000Z",
2801
+ message_id: "eeeeeeee-0000-0000-0000-000000000001",
2802
+ type: "heart"
2803
+ }
2804
+ ],
2805
+ pagination: { next_cursor: null, has_more: false }
2806
+ } },
2807
+ { op: "communities.webhooks.endpoints.delete", method: "DELETE", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 204, contentType: null, body: null },
2808
+ { op: "communities.webhooks.endpoints.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2809
+ consecutive_failures: 1,
2810
+ created_at: "2026-01-01T00:00:00.000Z",
2811
+ description: "Production receiver",
2812
+ disabled_at: "2026-01-01T00:00:00.000Z",
2813
+ disabled_reason: "manual",
2814
+ enabled: true,
2815
+ event_types: [],
2816
+ first_failure_at: "2026-01-01T00:00:00.000Z",
2817
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2818
+ legacy_signature: true,
2819
+ prev_signing_secret_active: true,
2820
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
2821
+ scope_id: "string",
2822
+ scope_type: "workspace",
2823
+ signing_secret_hint: "x9Q=",
2824
+ status: "enabled",
2825
+ updated_at: "2026-01-01T00:00:00.000Z",
2826
+ url: "https://api.acme.com/webhooks"
2827
+ } },
2828
+ { op: "communities.webhooks.endpoints.update", method: "PATCH", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/endpoints\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2829
+ consecutive_failures: 1,
2830
+ created_at: "2026-01-01T00:00:00.000Z",
2831
+ description: "Production receiver",
2832
+ disabled_at: "2026-01-01T00:00:00.000Z",
2833
+ disabled_reason: "manual",
2834
+ enabled: true,
2835
+ event_types: [],
2836
+ first_failure_at: "2026-01-01T00:00:00.000Z",
2837
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2838
+ legacy_signature: true,
2839
+ prev_signing_secret_active: true,
2840
+ prev_signing_secret_expires_at: "2026-01-01T00:00:00.000Z",
2841
+ scope_id: "string",
2842
+ scope_type: "workspace",
2843
+ signing_secret_hint: "x9Q=",
2844
+ status: "enabled",
2845
+ updated_at: "2026-01-01T00:00:00.000Z",
2846
+ url: "https://api.acme.com/webhooks"
2847
+ } },
2848
+ { op: "communities.actors.reactions.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/actors\/[^\/]+\/reactions$/, status: 200, contentType: "application/json", body: {
2849
+ data: [
2850
+ {
2851
+ created_at: "2026-05-01T12:00:00.000Z",
2852
+ target_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2853
+ target_type: "post",
2854
+ type: "like"
2855
+ }
2856
+ ],
2857
+ pagination: { next_cursor: null, has_more: false }
2858
+ } },
2859
+ { op: "communities.actors.comments.list", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/actors\/[^\/]+\/comments$/, status: 200, contentType: "application/json", body: {
2860
+ data: [
2861
+ {
2862
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2863
+ assets: [
2864
+ {
2865
+ alt_text: "A golden retriever on a beach",
2866
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2867
+ }
2868
+ ],
2869
+ body: "Looks great, shipping today.",
2870
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2871
+ created_at: "2026-05-01T12:00:00.000Z",
2872
+ depth: 0,
2873
+ id: "bbbbbbbb-0000-0000-0000-000000000001",
2874
+ parent_id: null,
2875
+ pinned: false,
2876
+ pinned_at: null,
2877
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
2878
+ reaction_counts: { like: 2 },
2879
+ status: "published",
2880
+ updated_at: "2026-05-01T12:00:00.000Z",
2881
+ visibility: "public"
2882
+ }
2883
+ ],
2884
+ pagination: { next_cursor: null, has_more: false }
2885
+ } },
2886
+ { op: "communities.webhooks.events.retrieve", method: "GET", pattern: /^\/v1\/workspaces\/[^\/]+\/communities\/[^\/]+\/webhooks\/events\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2887
+ attempts: [
2888
+ {
2889
+ attempt_number: 1,
2890
+ attempted_at: "2026-01-01T00:00:00.000Z",
2891
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2892
+ error_message: "request timed out",
2893
+ event_id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
2894
+ event_type: "user.created",
2895
+ id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2896
+ latency_ms: 1,
2897
+ response_body: "string",
2898
+ status_code: 1,
2899
+ succeeded: true,
2900
+ trigger: "automatic",
2901
+ url: "https://example.com"
2902
+ }
2903
+ ],
2904
+ created_at: "2026-01-01T00:00:00.000Z",
2905
+ deliveries: [
2906
+ {
2907
+ attempt_number: 1,
2908
+ attempted_at: "2026-01-01T00:00:00.000Z",
2909
+ endpoint_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b",
2910
+ next_attempt_at: "2026-01-01T00:00:00.000Z",
2911
+ status_code: 1,
2912
+ succeeded: true
2913
+ }
2914
+ ],
2915
+ id: "evt_3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f",
2916
+ payload: {},
2917
+ status: "pending",
2918
+ test: true,
2919
+ type: "post.created"
2920
+ } },
2921
+ { op: "actors.notificationPrefs.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/notification-prefs\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2922
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2923
+ enabled: true,
2924
+ kind: "follow",
2925
+ updated_at: "2026-05-01T12:00:00.000Z"
2926
+ } },
2927
+ { op: "posts.comments.reactions.create", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments\/[^\/]+\/reactions$/, status: 201, contentType: "application/json", body: {
2928
+ created: true,
2929
+ reaction: {
2930
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2931
+ comment_id: "bbbbbbbb-0000-0000-0000-000000000001",
2932
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2933
+ created_at: "2026-05-01T12:00:00.000Z",
2934
+ type: "like"
2935
+ },
2936
+ reaction_counts: { like: 4 }
2937
+ } },
2938
+ { op: "posts.comments.reactions.list", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments\/[^\/]+\/reactions$/, status: 200, contentType: "application/json", body: {
2939
+ data: [
2940
+ {
2941
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
2942
+ comment_id: "bbbbbbbb-0000-0000-0000-000000000001",
2943
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2944
+ created_at: "2026-05-01T12:00:00.000Z",
2945
+ type: "like"
2946
+ }
2947
+ ],
2948
+ pagination: { next_cursor: null, has_more: false }
2949
+ } },
2950
+ { op: "followRequests.approve", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/follow-requests\/[^\/]+\/[^\/]+\/approve$/, status: 201, contentType: "application/json", body: {
2951
+ created: true,
2952
+ edge: {
2953
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2954
+ created_at: "2026-05-01T12:00:00.000Z",
2955
+ dst_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
2956
+ dst_post_id: null,
2957
+ id: "eeeeeeee-0000-0000-0000-000000000001",
2958
+ kind: "follow",
2959
+ payload: {},
2960
+ src_actor_id: "aaaaaaaa-0000-0000-0000-000000000001"
2961
+ }
2962
+ } },
2963
+ { op: "actors.hashtagFollows.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/hashtag-follows\/[^\/]+$/, status: 204, contentType: null, body: null },
2964
+ { op: "conversations.messages.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/messages\/[^\/]+$/, status: 204, contentType: null, body: null },
2965
+ { op: "conversations.messages.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/messages\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2966
+ assets: [
2967
+ {
2968
+ alt_text: "A golden retriever on a beach",
2969
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2970
+ }
2971
+ ],
2972
+ attachments: [{ kind: "image", url: "https://cdn.example/attachments/abc.png" }],
2973
+ body: "Hey there.",
2974
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2975
+ conversation_id: "11111111-2222-3333-4444-555555555555",
2976
+ created_at: "2026-05-01T12:00:00.000Z",
2977
+ deleted_at: null,
2978
+ edited_at: null,
2979
+ id: "eeeeeeee-0000-0000-0000-000000000001",
2980
+ kind: "text",
2981
+ reaction_counts: { like: 1 },
2982
+ reply_to_id: null,
2983
+ sender_id: "aaaaaaaa-0000-0000-0000-000000000001"
2984
+ } },
2985
+ { op: "conversations.messages.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/messages\/[^\/]+$/, status: 200, contentType: "application/json", body: {
2986
+ assets: [
2987
+ {
2988
+ alt_text: "A golden retriever on a beach",
2989
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
2990
+ }
2991
+ ],
2992
+ attachments: [{ kind: "image", url: "https://cdn.example/attachments/abc.png" }],
2993
+ body: "Hey there.",
2994
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
2995
+ conversation_id: "11111111-2222-3333-4444-555555555555",
2996
+ created_at: "2026-05-01T12:00:00.000Z",
2997
+ deleted_at: null,
2998
+ edited_at: null,
2999
+ id: "eeeeeeee-0000-0000-0000-000000000001",
3000
+ kind: "text",
3001
+ reaction_counts: { like: 1 },
3002
+ reply_to_id: null,
3003
+ sender_id: "aaaaaaaa-0000-0000-0000-000000000001"
3004
+ } },
3005
+ { op: "posts.comments.approve", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments\/[^\/]+\/approve$/, status: 200, contentType: "application/json", body: {
3006
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
3007
+ assets: [
3008
+ {
3009
+ alt_text: "A golden retriever on a beach",
3010
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
3011
+ }
3012
+ ],
3013
+ body: "Looks great, shipping today.",
3014
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
3015
+ created_at: "2026-05-01T12:00:00.000Z",
3016
+ depth: 0,
3017
+ id: "bbbbbbbb-0000-0000-0000-000000000001",
3018
+ parent_id: null,
3019
+ pinned: false,
3020
+ pinned_at: null,
3021
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
3022
+ reaction_counts: { like: 2 },
3023
+ status: "published",
3024
+ updated_at: "2026-05-01T12:00:00.000Z",
3025
+ visibility: "public"
3026
+ } },
3027
+ { op: "conversations.members.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/members\/[^\/]+$/, status: 204, contentType: null, body: null },
3028
+ { op: "conversations.members.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/members\/[^\/]+$/, status: 200, contentType: "application/json", body: {
3029
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
3030
+ created_at: "2026-05-01T12:00:00.000Z",
3031
+ created_by: null,
3032
+ id: "11111111-2222-3333-4444-555555555555",
3033
+ kind: "direct",
3034
+ last_message_at: "2026-05-01T12:00:00.000Z",
3035
+ name: null,
3036
+ participants: [
3037
+ {
3038
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
3039
+ joined_at: "2026-05-01T12:00:00.000Z",
3040
+ last_read_at: null,
3041
+ muted: false,
3042
+ muted_until: null,
3043
+ pinned: false,
3044
+ role: "member"
3045
+ }
3046
+ ],
3047
+ unread_count: 0,
3048
+ updated_at: "2026-05-01T12:00:00.000Z"
3049
+ } },
3050
+ { op: "dismissedSuggestions.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/dismissed-suggestions\/[^\/]+\/[^\/]+$/, status: 204, contentType: null, body: null },
3051
+ { op: "actors.notifications.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/notifications\/[^\/]+$/, status: 204, contentType: null, body: null },
3052
+ { op: "actors.mutedTerms.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/actors\/[^\/]+\/muted-terms\/[^\/]+$/, status: 204, contentType: null, body: null },
3053
+ { op: "connections.accept", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/connections\/[^\/]+\/[^\/]+\/accept$/, status: 201, contentType: "application/json", body: { created: true, status: "pending" } },
3054
+ { op: "posts.comments.pin", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments\/[^\/]+\/pin$/, status: 201, contentType: "application/json", body: {
3055
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
3056
+ assets: [
3057
+ {
3058
+ alt_text: "A golden retriever on a beach",
3059
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
3060
+ }
3061
+ ],
3062
+ body: "Looks great, shipping today.",
3063
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
3064
+ created_at: "2026-05-01T12:00:00.000Z",
3065
+ depth: 0,
3066
+ id: "bbbbbbbb-0000-0000-0000-000000000001",
3067
+ parent_id: null,
3068
+ pinned: false,
3069
+ pinned_at: null,
3070
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
3071
+ reaction_counts: { like: 2 },
3072
+ status: "published",
3073
+ updated_at: "2026-05-01T12:00:00.000Z",
3074
+ visibility: "public"
3075
+ } },
3076
+ { op: "posts.comments.unpin", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments\/[^\/]+\/pin$/, status: 200, contentType: "application/json", body: {
3077
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
3078
+ assets: [
3079
+ {
3080
+ alt_text: "A golden retriever on a beach",
3081
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
3082
+ }
3083
+ ],
3084
+ body: "Looks great, shipping today.",
3085
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
3086
+ created_at: "2026-05-01T12:00:00.000Z",
3087
+ depth: 0,
3088
+ id: "bbbbbbbb-0000-0000-0000-000000000001",
3089
+ parent_id: null,
3090
+ pinned: false,
3091
+ pinned_at: null,
3092
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
3093
+ reaction_counts: { like: 2 },
3094
+ status: "published",
3095
+ updated_at: "2026-05-01T12:00:00.000Z",
3096
+ visibility: "public"
3097
+ } },
3098
+ { op: "posts.tags.approve", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/tags\/[^\/]+\/approve$/, status: 201, contentType: "application/json", body: {
3099
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
3100
+ created_at: "2026-05-01T12:00:00.000Z",
3101
+ id: "ffffffff-0000-0000-0000-000000000001",
3102
+ metadata: null,
3103
+ post_id: "bbbbbbbb-0000-0000-0000-000000000001",
3104
+ state: "approved",
3105
+ tagged_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
3106
+ updated_at: "2026-05-01T12:05:00.000Z"
3107
+ } },
3108
+ { op: "collections.items.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/collections\/[^\/]+\/items\/[^\/]+$/, status: 204, contentType: null, body: null },
3109
+ { op: "collections.items.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/collections\/[^\/]+\/items\/[^\/]+$/, status: 200, contentType: "application/json", body: {
3110
+ added_at: "2026-05-01T12:00:00.000Z",
3111
+ collection_id: "99999999-0000-0000-0000-000000000001",
3112
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
3113
+ position: 0,
3114
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
3115
+ } },
3116
+ { op: "posts.tags.delete", method: "POST", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/tags\/[^\/]+\/remove$/, status: 201, contentType: "application/json", body: {
3117
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
3118
+ created_at: "2026-05-01T12:00:00.000Z",
3119
+ id: "ffffffff-0000-0000-0000-000000000001",
3120
+ metadata: null,
3121
+ post_id: "bbbbbbbb-0000-0000-0000-000000000001",
3122
+ state: "approved",
3123
+ tagged_actor_id: "aaaaaaaa-0000-0000-0000-000000000002",
3124
+ updated_at: "2026-05-01T12:05:00.000Z"
3125
+ } },
3126
+ { op: "followRequests.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/follow-requests\/[^\/]+\/[^\/]+$/, status: 204, contentType: null, body: null },
3127
+ { op: "posts.comments.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments\/[^\/]+$/, status: 204, contentType: null, body: null },
3128
+ { op: "posts.comments.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments\/[^\/]+$/, status: 200, contentType: "application/json", body: {
3129
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
3130
+ assets: [
3131
+ {
3132
+ alt_text: "A golden retriever on a beach",
3133
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
3134
+ }
3135
+ ],
3136
+ body: "Looks great, shipping today.",
3137
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
3138
+ created_at: "2026-05-01T12:00:00.000Z",
3139
+ depth: 0,
3140
+ id: "bbbbbbbb-0000-0000-0000-000000000001",
3141
+ parent_id: null,
3142
+ pinned: false,
3143
+ pinned_at: null,
3144
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
3145
+ reaction_counts: { like: 2 },
3146
+ status: "published",
3147
+ updated_at: "2026-05-01T12:00:00.000Z",
3148
+ visibility: "public"
3149
+ } },
3150
+ { op: "posts.comments.update", method: "PATCH", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments\/[^\/]+$/, status: 200, contentType: "application/json", body: {
3151
+ actor_id: "aaaaaaaa-0000-0000-0000-000000000001",
3152
+ assets: [
3153
+ {
3154
+ alt_text: "A golden retriever on a beach",
3155
+ asset_id: "eeeeeeee-0000-0000-0000-000000000001"
3156
+ }
3157
+ ],
3158
+ body: "Looks great, shipping today.",
3159
+ community_id: "cccccccc-cccc-cccc-cccc-cccccccccccc",
3160
+ created_at: "2026-05-01T12:00:00.000Z",
3161
+ depth: 0,
3162
+ id: "bbbbbbbb-0000-0000-0000-000000000001",
3163
+ parent_id: null,
3164
+ pinned: false,
3165
+ pinned_at: null,
3166
+ post_id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
3167
+ reaction_counts: { like: 2 },
3168
+ status: "published",
3169
+ updated_at: "2026-05-01T12:00:00.000Z",
3170
+ visibility: "public"
3171
+ } },
3172
+ { op: "closeFriends.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/close-friends\/[^\/]+\/[^\/]+$/, status: 204, contentType: null, body: null },
3173
+ { op: "lists.members.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/lists\/[^\/]+\/members\/[^\/]+$/, status: 204, contentType: null, body: null },
3174
+ { op: "connections.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/connections\/[^\/]+\/[^\/]+$/, status: 204, contentType: null, body: null },
3175
+ { op: "posts.votes.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/votes\/[^\/]+$/, status: 204, contentType: null, body: null },
3176
+ { op: "posts.votes.retrieve", method: "GET", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/votes\/[^\/]+$/, status: 200, contentType: "application/json", body: { created_at: "2026-05-01T11:30:00.000Z", option_index: 1 } },
3177
+ { op: "restricts.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/restricts\/[^\/]+\/[^\/]+$/, status: 204, contentType: null, body: null },
3178
+ { op: "follows.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/follows\/[^\/]+\/[^\/]+$/, status: 204, contentType: null, body: null },
3179
+ { op: "blocks.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/blocks\/[^\/]+\/[^\/]+$/, status: 204, contentType: null, body: null },
3180
+ { op: "hides.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/hides\/[^\/]+\/[^\/]+$/, status: 204, contentType: null, body: null },
3181
+ { op: "mutes.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/mutes\/[^\/]+\/[^\/]+$/, status: 204, contentType: null, body: null },
3182
+ { op: "posts.reactions.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/reactions\/[^\/]+\/[^\/]+$/, status: 200, contentType: "application/json", body: { reaction_counts: { like: 12 } } },
3183
+ { op: "conversations.messages.reactions.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/conversations\/[^\/]+\/messages\/[^\/]+\/reactions\/[^\/]+\/[^\/]+$/, status: 200, contentType: "application/json", body: { reaction_counts: { heart: 2 } } },
3184
+ { op: "posts.comments.reactions.delete", method: "DELETE", pattern: /^\/v1\/communities\/[^\/]+\/posts\/[^\/]+\/comments\/[^\/]+\/reactions\/[^\/]+\/[^\/]+$/, status: 200, contentType: "application/json", body: { reaction_counts: { like: 3 } } }
3185
+ ];
3186
+ function createMockFetch(overrides = {}) {
3187
+ const calls = [];
3188
+ const mock = async (input, init) => {
3189
+ const request = input instanceof Request ? input : void 0;
3190
+ const url = new URL(request ? request.url : String(input));
3191
+ const method = (init?.method ?? request?.method ?? "GET").toUpperCase();
3192
+ const headers = new Headers(init?.headers ?? request?.headers);
3193
+ const raw = init?.body ?? (request ? await request.text() : void 0);
3194
+ let body = raw;
3195
+ if (typeof raw === "string") {
3196
+ try {
3197
+ body = JSON.parse(raw);
3198
+ } catch {
3199
+ body = raw;
3200
+ }
3201
+ }
3202
+ const route = ROUTES.find((r) => r.method === method && r.pattern.test(url.pathname));
3203
+ const call = { operation: route?.op, method, url, headers, body };
3204
+ calls.push(call);
3205
+ const requestId = `req_mock_${calls.length}`;
3206
+ if (!route) {
3207
+ return Response.json({ statusCode: 404, code: "NOT_FOUND", message: `No mock for ${method} ${url.pathname}` }, { status: 404, headers: { "x-request-id": requestId } });
3208
+ }
3209
+ let value = route.body;
3210
+ if (route.op in overrides) {
3211
+ const o = overrides[route.op];
3212
+ value = typeof o === "function" ? await o(call) : o;
3213
+ if (value instanceof Response) return value;
3214
+ }
3215
+ if (route.contentType === null || route.status === 204) return new Response(null, { status: route.status, headers: { "x-request-id": requestId } });
3216
+ const text = route.contentType === "application/json" ? JSON.stringify(value) : String(value);
3217
+ return new Response(text, { status: route.status, headers: { "content-type": route.contentType, "x-request-id": requestId } });
3218
+ };
3219
+ return Object.assign(mock, { calls });
3220
+ }
3221
+
3222
+ export { createMockFetch };
3223
+ //# sourceMappingURL=testing.js.map
3224
+ //# sourceMappingURL=testing.js.map