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