@atproto/ozone 0.1.125 → 0.1.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +10 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/safelink/addRule.d.ts +4 -0
- package/dist/api/safelink/addRule.d.ts.map +1 -0
- package/dist/api/safelink/addRule.js +37 -0
- package/dist/api/safelink/addRule.js.map +1 -0
- package/dist/api/safelink/queryEvents.d.ts +4 -0
- package/dist/api/safelink/queryEvents.d.ts.map +1 -0
- package/dist/api/safelink/queryEvents.js +29 -0
- package/dist/api/safelink/queryEvents.js.map +1 -0
- package/dist/api/safelink/queryRules.d.ts +4 -0
- package/dist/api/safelink/queryRules.d.ts.map +1 -0
- package/dist/api/safelink/queryRules.js +43 -0
- package/dist/api/safelink/queryRules.js.map +1 -0
- package/dist/api/safelink/removeRule.d.ts +4 -0
- package/dist/api/safelink/removeRule.d.ts.map +1 -0
- package/dist/api/safelink/removeRule.js +35 -0
- package/dist/api/safelink/removeRule.js.map +1 -0
- package/dist/api/safelink/updateRule.d.ts +4 -0
- package/dist/api/safelink/updateRule.d.ts.map +1 -0
- package/dist/api/safelink/updateRule.js +37 -0
- package/dist/api/safelink/updateRule.js.map +1 -0
- package/dist/api/util.d.ts +8 -0
- package/dist/api/util.d.ts.map +1 -1
- package/dist/api/util.js +33 -1
- package/dist/api/util.js.map +1 -1
- package/dist/context.d.ts +3 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +12 -6
- package/dist/context.js.map +1 -1
- package/dist/db/migrations/20250609T110704000Z-safelink.d.ts +4 -0
- package/dist/db/migrations/20250609T110704000Z-safelink.d.ts.map +1 -0
- package/dist/db/migrations/20250609T110704000Z-safelink.js +51 -0
- package/dist/db/migrations/20250609T110704000Z-safelink.js.map +1 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/db/migrations/index.d.ts.map +1 -1
- package/dist/db/migrations/index.js +2 -1
- package/dist/db/migrations/index.js.map +1 -1
- package/dist/db/schema/index.d.ts +2 -1
- package/dist/db/schema/index.d.ts.map +1 -1
- package/dist/db/schema/safelink.d.ts +31 -0
- package/dist/db/schema/safelink.d.ts.map +1 -0
- package/dist/db/schema/safelink.js +6 -0
- package/dist/db/schema/safelink.js.map +1 -0
- package/dist/lexicon/index.d.ts +15 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +40 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +11024 -10188
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +448 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/safelink/addRule.d.ts +47 -0
- package/dist/lexicon/types/tools/ozone/safelink/addRule.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/addRule.js +7 -0
- package/dist/lexicon/types/tools/ozone/safelink/addRule.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/defs.d.ts +47 -0
- package/dist/lexicon/types/tools/ozone/safelink/defs.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/defs.js +25 -0
- package/dist/lexicon/types/tools/ozone/safelink/defs.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryEvents.d.ts +51 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryEvents.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryEvents.js +7 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryEvents.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryRules.d.ts +57 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryRules.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryRules.js +7 -0
- package/dist/lexicon/types/tools/ozone/safelink/queryRules.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/removeRule.d.ts +45 -0
- package/dist/lexicon/types/tools/ozone/safelink/removeRule.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/removeRule.js +7 -0
- package/dist/lexicon/types/tools/ozone/safelink/removeRule.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/updateRule.d.ts +47 -0
- package/dist/lexicon/types/tools/ozone/safelink/updateRule.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/safelink/updateRule.js +7 -0
- package/dist/lexicon/types/tools/ozone/safelink/updateRule.js.map +1 -0
- package/dist/mod-service/status.d.ts +6 -0
- package/dist/mod-service/status.d.ts.map +1 -1
- package/dist/safelink/service.d.ts +69 -0
- package/dist/safelink/service.d.ts.map +1 -0
- package/dist/safelink/service.js +179 -0
- package/dist/safelink/service.js.map +1 -0
- package/package.json +3 -3
- package/src/api/index.ts +10 -0
- package/src/api/safelink/addRule.ts +48 -0
- package/src/api/safelink/queryEvents.ts +32 -0
- package/src/api/safelink/queryRules.ts +58 -0
- package/src/api/safelink/removeRule.ts +42 -0
- package/src/api/safelink/updateRule.ts +48 -0
- package/src/api/util.ts +38 -0
- package/src/context.ts +11 -0
- package/src/db/migrations/20250609T110704000Z-safelink.ts +53 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/db/schema/index.ts +3 -1
- package/src/db/schema/safelink.ts +39 -0
- package/src/lexicon/index.ts +70 -0
- package/src/lexicon/lexicons.ts +455 -0
- package/src/lexicon/types/tools/ozone/safelink/addRule.ts +64 -0
- package/src/lexicon/types/tools/ozone/safelink/defs.ts +76 -0
- package/src/lexicon/types/tools/ozone/safelink/queryEvents.ts +68 -0
- package/src/lexicon/types/tools/ozone/safelink/queryRules.ts +74 -0
- package/src/lexicon/types/tools/ozone/safelink/removeRule.ts +62 -0
- package/src/lexicon/types/tools/ozone/safelink/updateRule.ts +64 -0
- package/src/safelink/service.ts +304 -0
- package/tests/__snapshots__/get-starter-pack.test.ts.snap +69 -0
- package/tests/__snapshots__/get-subjects.test.ts.snap +6 -0
- package/tests/__snapshots__/safelink.test.ts.snap +179 -0
- package/tests/__snapshots__/team.test.ts.snap +24 -0
- package/tests/__snapshots__/verification-listener.test.ts.snap +6 -0
- package/tests/__snapshots__/verification.test.ts.snap +12 -0
- package/tests/communication-templates.test.ts +7 -7
- package/tests/safelink.test.ts +534 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.tests.tsbuildinfo +1 -1
|
@@ -5,6 +5,11 @@ Object {
|
|
|
5
5
|
"starterPack": Object {
|
|
6
6
|
"cid": "cids(0)",
|
|
7
7
|
"creator": Object {
|
|
8
|
+
"associated": Object {
|
|
9
|
+
"activitySubscription": Object {
|
|
10
|
+
"allowSubscriptions": "followers",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
8
13
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
9
14
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
10
15
|
"did": "user(0)",
|
|
@@ -35,6 +40,11 @@ Object {
|
|
|
35
40
|
Object {
|
|
36
41
|
"cid": "cids(3)",
|
|
37
42
|
"creator": Object {
|
|
43
|
+
"associated": Object {
|
|
44
|
+
"activitySubscription": Object {
|
|
45
|
+
"allowSubscriptions": "followers",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
38
48
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
39
49
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
40
50
|
"description": "its me!",
|
|
@@ -91,6 +101,11 @@ Object {
|
|
|
91
101
|
"listItemsSample": Array [
|
|
92
102
|
Object {
|
|
93
103
|
"subject": Object {
|
|
104
|
+
"associated": Object {
|
|
105
|
+
"activitySubscription": Object {
|
|
106
|
+
"allowSubscriptions": "followers",
|
|
107
|
+
},
|
|
108
|
+
},
|
|
94
109
|
"did": "user(2)",
|
|
95
110
|
"handle": "carol.test",
|
|
96
111
|
"labels": Array [],
|
|
@@ -103,6 +118,11 @@ Object {
|
|
|
103
118
|
},
|
|
104
119
|
Object {
|
|
105
120
|
"subject": Object {
|
|
121
|
+
"associated": Object {
|
|
122
|
+
"activitySubscription": Object {
|
|
123
|
+
"allowSubscriptions": "followers",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
106
126
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(1)@jpeg",
|
|
107
127
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
108
128
|
"description": "hi im bob label_me",
|
|
@@ -121,6 +141,9 @@ Object {
|
|
|
121
141
|
Object {
|
|
122
142
|
"subject": Object {
|
|
123
143
|
"associated": Object {
|
|
144
|
+
"activitySubscription": Object {
|
|
145
|
+
"allowSubscriptions": "followers",
|
|
146
|
+
},
|
|
124
147
|
"chat": Object {
|
|
125
148
|
"allowIncoming": "none",
|
|
126
149
|
},
|
|
@@ -156,6 +179,11 @@ exports[`admin get starter pack view getStarterPack() gets a starterpack while t
|
|
|
156
179
|
Object {
|
|
157
180
|
"cid": "cids(0)",
|
|
158
181
|
"creator": Object {
|
|
182
|
+
"associated": Object {
|
|
183
|
+
"activitySubscription": Object {
|
|
184
|
+
"allowSubscriptions": "followers",
|
|
185
|
+
},
|
|
186
|
+
},
|
|
159
187
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
160
188
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
161
189
|
"did": "user(0)",
|
|
@@ -186,6 +214,11 @@ Object {
|
|
|
186
214
|
Object {
|
|
187
215
|
"cid": "cids(3)",
|
|
188
216
|
"creator": Object {
|
|
217
|
+
"associated": Object {
|
|
218
|
+
"activitySubscription": Object {
|
|
219
|
+
"allowSubscriptions": "followers",
|
|
220
|
+
},
|
|
221
|
+
},
|
|
189
222
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
190
223
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
191
224
|
"description": "its me!",
|
|
@@ -242,6 +275,11 @@ Object {
|
|
|
242
275
|
"listItemsSample": Array [
|
|
243
276
|
Object {
|
|
244
277
|
"subject": Object {
|
|
278
|
+
"associated": Object {
|
|
279
|
+
"activitySubscription": Object {
|
|
280
|
+
"allowSubscriptions": "followers",
|
|
281
|
+
},
|
|
282
|
+
},
|
|
245
283
|
"did": "user(2)",
|
|
246
284
|
"handle": "carol.test",
|
|
247
285
|
"labels": Array [],
|
|
@@ -256,6 +294,11 @@ Object {
|
|
|
256
294
|
},
|
|
257
295
|
Object {
|
|
258
296
|
"subject": Object {
|
|
297
|
+
"associated": Object {
|
|
298
|
+
"activitySubscription": Object {
|
|
299
|
+
"allowSubscriptions": "followers",
|
|
300
|
+
},
|
|
301
|
+
},
|
|
259
302
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(1)@jpeg",
|
|
260
303
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
261
304
|
"description": "hi im bob label_me",
|
|
@@ -276,6 +319,9 @@ Object {
|
|
|
276
319
|
Object {
|
|
277
320
|
"subject": Object {
|
|
278
321
|
"associated": Object {
|
|
322
|
+
"activitySubscription": Object {
|
|
323
|
+
"allowSubscriptions": "followers",
|
|
324
|
+
},
|
|
279
325
|
"chat": Object {
|
|
280
326
|
"allowIncoming": "none",
|
|
281
327
|
},
|
|
@@ -311,6 +357,11 @@ exports[`admin get starter pack view getStarterPack() gets a starterpack while t
|
|
|
311
357
|
Object {
|
|
312
358
|
"cid": "cids(0)",
|
|
313
359
|
"creator": Object {
|
|
360
|
+
"associated": Object {
|
|
361
|
+
"activitySubscription": Object {
|
|
362
|
+
"allowSubscriptions": "followers",
|
|
363
|
+
},
|
|
364
|
+
},
|
|
314
365
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
315
366
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
316
367
|
"did": "user(0)",
|
|
@@ -341,6 +392,11 @@ Object {
|
|
|
341
392
|
Object {
|
|
342
393
|
"cid": "cids(3)",
|
|
343
394
|
"creator": Object {
|
|
395
|
+
"associated": Object {
|
|
396
|
+
"activitySubscription": Object {
|
|
397
|
+
"allowSubscriptions": "followers",
|
|
398
|
+
},
|
|
399
|
+
},
|
|
344
400
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
345
401
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
346
402
|
"description": "its me!",
|
|
@@ -405,6 +461,11 @@ Object {
|
|
|
405
461
|
"listItemsSample": Array [
|
|
406
462
|
Object {
|
|
407
463
|
"subject": Object {
|
|
464
|
+
"associated": Object {
|
|
465
|
+
"activitySubscription": Object {
|
|
466
|
+
"allowSubscriptions": "followers",
|
|
467
|
+
},
|
|
468
|
+
},
|
|
408
469
|
"did": "user(3)",
|
|
409
470
|
"handle": "carol.test",
|
|
410
471
|
"labels": Array [],
|
|
@@ -417,6 +478,11 @@ Object {
|
|
|
417
478
|
},
|
|
418
479
|
Object {
|
|
419
480
|
"subject": Object {
|
|
481
|
+
"associated": Object {
|
|
482
|
+
"activitySubscription": Object {
|
|
483
|
+
"allowSubscriptions": "followers",
|
|
484
|
+
},
|
|
485
|
+
},
|
|
420
486
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(5)/cids(1)@jpeg",
|
|
421
487
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
422
488
|
"description": "hi im bob label_me",
|
|
@@ -435,6 +501,9 @@ Object {
|
|
|
435
501
|
Object {
|
|
436
502
|
"subject": Object {
|
|
437
503
|
"associated": Object {
|
|
504
|
+
"activitySubscription": Object {
|
|
505
|
+
"allowSubscriptions": "followers",
|
|
506
|
+
},
|
|
438
507
|
"chat": Object {
|
|
439
508
|
"allowIncoming": "none",
|
|
440
509
|
},
|
|
@@ -6,6 +6,9 @@ Array [
|
|
|
6
6
|
"profile": Object {
|
|
7
7
|
"$type": "app.bsky.actor.defs#profileViewDetailed",
|
|
8
8
|
"associated": Object {
|
|
9
|
+
"activitySubscription": Object {
|
|
10
|
+
"allowSubscriptions": "followers",
|
|
11
|
+
},
|
|
9
12
|
"feedgens": 0,
|
|
10
13
|
"labeler": false,
|
|
11
14
|
"lists": 0,
|
|
@@ -186,6 +189,9 @@ Array [
|
|
|
186
189
|
"profile": Object {
|
|
187
190
|
"$type": "app.bsky.actor.defs#profileViewDetailed",
|
|
188
191
|
"associated": Object {
|
|
192
|
+
"activitySubscription": Object {
|
|
193
|
+
"allowSubscriptions": "followers",
|
|
194
|
+
},
|
|
189
195
|
"feedgens": 0,
|
|
190
196
|
"labeler": false,
|
|
191
197
|
"lists": 0,
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`safelink management addRule allows admins to add rules 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"action": "block",
|
|
6
|
+
"comment": "Known phishing domain targeting users",
|
|
7
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
8
|
+
"createdBy": "user(0)",
|
|
9
|
+
"eventType": "addRule",
|
|
10
|
+
"id": 1,
|
|
11
|
+
"pattern": "domain",
|
|
12
|
+
"reason": "phishing",
|
|
13
|
+
"url": "https://malicious-site.com",
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
exports[`safelink management queryEvents allows querying safelink events 1`] = `
|
|
18
|
+
Array [
|
|
19
|
+
Object {
|
|
20
|
+
"action": "block",
|
|
21
|
+
"comment": "Escalated to block",
|
|
22
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
23
|
+
"createdBy": "user(0)",
|
|
24
|
+
"eventType": "updateRule",
|
|
25
|
+
"id": 10,
|
|
26
|
+
"pattern": "domain",
|
|
27
|
+
"reason": "phishing",
|
|
28
|
+
"url": "https://events-test.com",
|
|
29
|
+
},
|
|
30
|
+
Object {
|
|
31
|
+
"action": "warn",
|
|
32
|
+
"comment": "Initial rule creation",
|
|
33
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
34
|
+
"createdBy": "user(0)",
|
|
35
|
+
"eventType": "addRule",
|
|
36
|
+
"id": 9,
|
|
37
|
+
"pattern": "domain",
|
|
38
|
+
"reason": "spam",
|
|
39
|
+
"url": "https://events-test.com",
|
|
40
|
+
},
|
|
41
|
+
Object {
|
|
42
|
+
"action": "warn",
|
|
43
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
44
|
+
"createdBy": "user(0)",
|
|
45
|
+
"eventType": "addRule",
|
|
46
|
+
"id": 8,
|
|
47
|
+
"pattern": "url",
|
|
48
|
+
"reason": "spam",
|
|
49
|
+
"url": "https://query-test2.com/specific-path",
|
|
50
|
+
},
|
|
51
|
+
Object {
|
|
52
|
+
"action": "block",
|
|
53
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
54
|
+
"createdBy": "user(0)",
|
|
55
|
+
"eventType": "addRule",
|
|
56
|
+
"id": 7,
|
|
57
|
+
"pattern": "domain",
|
|
58
|
+
"reason": "phishing",
|
|
59
|
+
"url": "https://query-test1.com",
|
|
60
|
+
},
|
|
61
|
+
Object {
|
|
62
|
+
"action": "block",
|
|
63
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
64
|
+
"createdBy": "user(0)",
|
|
65
|
+
"eventType": "addRule",
|
|
66
|
+
"id": 6,
|
|
67
|
+
"pattern": "domain",
|
|
68
|
+
"reason": "spam",
|
|
69
|
+
"url": "https://remove-test2.com",
|
|
70
|
+
},
|
|
71
|
+
Object {
|
|
72
|
+
"action": "block",
|
|
73
|
+
"comment": "Removing rule - false positive",
|
|
74
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
75
|
+
"createdBy": "user(0)",
|
|
76
|
+
"eventType": "removeRule",
|
|
77
|
+
"id": 5,
|
|
78
|
+
"pattern": "url",
|
|
79
|
+
"reason": "csam",
|
|
80
|
+
"url": "https://remove-test.com",
|
|
81
|
+
},
|
|
82
|
+
Object {
|
|
83
|
+
"action": "block",
|
|
84
|
+
"comment": "Rule to be removed",
|
|
85
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
86
|
+
"createdBy": "user(0)",
|
|
87
|
+
"eventType": "addRule",
|
|
88
|
+
"id": 4,
|
|
89
|
+
"pattern": "url",
|
|
90
|
+
"reason": "csam",
|
|
91
|
+
"url": "https://remove-test.com",
|
|
92
|
+
},
|
|
93
|
+
Object {
|
|
94
|
+
"action": "block",
|
|
95
|
+
"comment": "Updated: confirmed phishing site",
|
|
96
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
97
|
+
"createdBy": "user(0)",
|
|
98
|
+
"eventType": "updateRule",
|
|
99
|
+
"id": 3,
|
|
100
|
+
"pattern": "domain",
|
|
101
|
+
"reason": "phishing",
|
|
102
|
+
"url": "https://update-test.com",
|
|
103
|
+
},
|
|
104
|
+
Object {
|
|
105
|
+
"action": "warn",
|
|
106
|
+
"comment": "Initially marked as spam",
|
|
107
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
108
|
+
"createdBy": "user(0)",
|
|
109
|
+
"eventType": "addRule",
|
|
110
|
+
"id": 2,
|
|
111
|
+
"pattern": "domain",
|
|
112
|
+
"reason": "spam",
|
|
113
|
+
"url": "https://update-test.com",
|
|
114
|
+
},
|
|
115
|
+
Object {
|
|
116
|
+
"action": "block",
|
|
117
|
+
"comment": "Known phishing domain targeting users",
|
|
118
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
119
|
+
"createdBy": "user(0)",
|
|
120
|
+
"eventType": "addRule",
|
|
121
|
+
"id": 1,
|
|
122
|
+
"pattern": "domain",
|
|
123
|
+
"reason": "phishing",
|
|
124
|
+
"url": "https://malicious-site.com",
|
|
125
|
+
},
|
|
126
|
+
]
|
|
127
|
+
`;
|
|
128
|
+
|
|
129
|
+
exports[`safelink management queryRules allows querying all active rules 1`] = `
|
|
130
|
+
Array [
|
|
131
|
+
Object {
|
|
132
|
+
"action": "warn",
|
|
133
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
134
|
+
"createdBy": "user(0)",
|
|
135
|
+
"pattern": "url",
|
|
136
|
+
"reason": "spam",
|
|
137
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
138
|
+
"url": "https://query-test2.com/specific-path",
|
|
139
|
+
},
|
|
140
|
+
Object {
|
|
141
|
+
"action": "block",
|
|
142
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
143
|
+
"createdBy": "user(0)",
|
|
144
|
+
"pattern": "domain",
|
|
145
|
+
"reason": "phishing",
|
|
146
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
147
|
+
"url": "https://query-test1.com",
|
|
148
|
+
},
|
|
149
|
+
Object {
|
|
150
|
+
"action": "block",
|
|
151
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
152
|
+
"createdBy": "user(0)",
|
|
153
|
+
"pattern": "domain",
|
|
154
|
+
"reason": "spam",
|
|
155
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
156
|
+
"url": "https://remove-test2.com",
|
|
157
|
+
},
|
|
158
|
+
Object {
|
|
159
|
+
"action": "block",
|
|
160
|
+
"comment": "Updated: confirmed phishing site",
|
|
161
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
162
|
+
"createdBy": "user(0)",
|
|
163
|
+
"pattern": "domain",
|
|
164
|
+
"reason": "phishing",
|
|
165
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
166
|
+
"url": "https://update-test.com",
|
|
167
|
+
},
|
|
168
|
+
Object {
|
|
169
|
+
"action": "block",
|
|
170
|
+
"comment": "Known phishing domain targeting users",
|
|
171
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
172
|
+
"createdBy": "user(0)",
|
|
173
|
+
"pattern": "domain",
|
|
174
|
+
"reason": "phishing",
|
|
175
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
176
|
+
"url": "https://malicious-site.com",
|
|
177
|
+
},
|
|
178
|
+
]
|
|
179
|
+
`;
|
|
@@ -52,6 +52,9 @@ Array [
|
|
|
52
52
|
"lastUpdatedBy": "user(1)",
|
|
53
53
|
"profile": Object {
|
|
54
54
|
"associated": Object {
|
|
55
|
+
"activitySubscription": Object {
|
|
56
|
+
"allowSubscriptions": "followers",
|
|
57
|
+
},
|
|
55
58
|
"feedgens": 0,
|
|
56
59
|
"labeler": true,
|
|
57
60
|
"lists": 0,
|
|
@@ -81,6 +84,9 @@ Array [
|
|
|
81
84
|
"lastUpdatedBy": "user(1)",
|
|
82
85
|
"profile": Object {
|
|
83
86
|
"associated": Object {
|
|
87
|
+
"activitySubscription": Object {
|
|
88
|
+
"allowSubscriptions": "followers",
|
|
89
|
+
},
|
|
84
90
|
"feedgens": 0,
|
|
85
91
|
"labeler": false,
|
|
86
92
|
"lists": 0,
|
|
@@ -127,6 +133,9 @@ Array [
|
|
|
127
133
|
"lastUpdatedBy": "user(1)",
|
|
128
134
|
"profile": Object {
|
|
129
135
|
"associated": Object {
|
|
136
|
+
"activitySubscription": Object {
|
|
137
|
+
"allowSubscriptions": "followers",
|
|
138
|
+
},
|
|
130
139
|
"feedgens": 0,
|
|
131
140
|
"labeler": false,
|
|
132
141
|
"lists": 0,
|
|
@@ -158,6 +167,9 @@ Array [
|
|
|
158
167
|
"lastUpdatedBy": "user(1)",
|
|
159
168
|
"profile": Object {
|
|
160
169
|
"associated": Object {
|
|
170
|
+
"activitySubscription": Object {
|
|
171
|
+
"allowSubscriptions": "followers",
|
|
172
|
+
},
|
|
161
173
|
"feedgens": 0,
|
|
162
174
|
"labeler": false,
|
|
163
175
|
"lists": 0,
|
|
@@ -221,6 +233,9 @@ Array [
|
|
|
221
233
|
"lastUpdatedBy": "user(1)",
|
|
222
234
|
"profile": Object {
|
|
223
235
|
"associated": Object {
|
|
236
|
+
"activitySubscription": Object {
|
|
237
|
+
"allowSubscriptions": "followers",
|
|
238
|
+
},
|
|
224
239
|
"feedgens": 0,
|
|
225
240
|
"labeler": true,
|
|
226
241
|
"lists": 0,
|
|
@@ -250,6 +265,9 @@ Array [
|
|
|
250
265
|
"lastUpdatedBy": "user(1)",
|
|
251
266
|
"profile": Object {
|
|
252
267
|
"associated": Object {
|
|
268
|
+
"activitySubscription": Object {
|
|
269
|
+
"allowSubscriptions": "followers",
|
|
270
|
+
},
|
|
253
271
|
"feedgens": 0,
|
|
254
272
|
"labeler": false,
|
|
255
273
|
"lists": 0,
|
|
@@ -296,6 +314,9 @@ Array [
|
|
|
296
314
|
"lastUpdatedBy": "user(1)",
|
|
297
315
|
"profile": Object {
|
|
298
316
|
"associated": Object {
|
|
317
|
+
"activitySubscription": Object {
|
|
318
|
+
"allowSubscriptions": "followers",
|
|
319
|
+
},
|
|
299
320
|
"feedgens": 0,
|
|
300
321
|
"labeler": false,
|
|
301
322
|
"lists": 0,
|
|
@@ -327,6 +348,9 @@ Array [
|
|
|
327
348
|
"lastUpdatedBy": "user(1)",
|
|
328
349
|
"profile": Object {
|
|
329
350
|
"associated": Object {
|
|
351
|
+
"activitySubscription": Object {
|
|
352
|
+
"allowSubscriptions": "followers",
|
|
353
|
+
},
|
|
330
354
|
"feedgens": 0,
|
|
331
355
|
"labeler": false,
|
|
332
356
|
"lists": 0,
|
|
@@ -11,6 +11,9 @@ Array [
|
|
|
11
11
|
"issuerProfile": Object {
|
|
12
12
|
"$type": "app.bsky.actor.defs#profileViewDetailed",
|
|
13
13
|
"associated": Object {
|
|
14
|
+
"activitySubscription": Object {
|
|
15
|
+
"allowSubscriptions": "followers",
|
|
16
|
+
},
|
|
14
17
|
"feedgens": 0,
|
|
15
18
|
"labeler": false,
|
|
16
19
|
"lists": 0,
|
|
@@ -65,6 +68,9 @@ Array [
|
|
|
65
68
|
"subjectProfile": Object {
|
|
66
69
|
"$type": "app.bsky.actor.defs#profileViewDetailed",
|
|
67
70
|
"associated": Object {
|
|
71
|
+
"activitySubscription": Object {
|
|
72
|
+
"allowSubscriptions": "followers",
|
|
73
|
+
},
|
|
68
74
|
"feedgens": 0,
|
|
69
75
|
"labeler": false,
|
|
70
76
|
"lists": 0,
|
|
@@ -10,6 +10,9 @@ Object {
|
|
|
10
10
|
"issuerProfile": Object {
|
|
11
11
|
"$type": "app.bsky.actor.defs#profileViewDetailed",
|
|
12
12
|
"associated": Object {
|
|
13
|
+
"activitySubscription": Object {
|
|
14
|
+
"allowSubscriptions": "followers",
|
|
15
|
+
},
|
|
13
16
|
"feedgens": 0,
|
|
14
17
|
"labeler": false,
|
|
15
18
|
"lists": 0,
|
|
@@ -93,6 +96,9 @@ Object {
|
|
|
93
96
|
"subjectProfile": Object {
|
|
94
97
|
"$type": "app.bsky.actor.defs#profileViewDetailed",
|
|
95
98
|
"associated": Object {
|
|
99
|
+
"activitySubscription": Object {
|
|
100
|
+
"allowSubscriptions": "followers",
|
|
101
|
+
},
|
|
96
102
|
"feedgens": 0,
|
|
97
103
|
"labeler": false,
|
|
98
104
|
"lists": 0,
|
|
@@ -168,6 +174,9 @@ Object {
|
|
|
168
174
|
"issuerProfile": Object {
|
|
169
175
|
"$type": "app.bsky.actor.defs#profileViewDetailed",
|
|
170
176
|
"associated": Object {
|
|
177
|
+
"activitySubscription": Object {
|
|
178
|
+
"allowSubscriptions": "followers",
|
|
179
|
+
},
|
|
171
180
|
"feedgens": 0,
|
|
172
181
|
"labeler": false,
|
|
173
182
|
"lists": 0,
|
|
@@ -254,6 +263,9 @@ Object {
|
|
|
254
263
|
"subjectProfile": Object {
|
|
255
264
|
"$type": "app.bsky.actor.defs#profileViewDetailed",
|
|
256
265
|
"associated": Object {
|
|
266
|
+
"activitySubscription": Object {
|
|
267
|
+
"allowSubscriptions": "followers",
|
|
268
|
+
},
|
|
257
269
|
"feedgens": 0,
|
|
258
270
|
"labeler": false,
|
|
259
271
|
"lists": 0,
|
|
@@ -28,7 +28,7 @@ describe('communication-templates', () => {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const listTemplates = async () => {
|
|
31
|
-
const { data } = await agent.
|
|
31
|
+
const { data } = await agent.tools.ozone.communication.listTemplates(
|
|
32
32
|
{},
|
|
33
33
|
{
|
|
34
34
|
headers: await network.ozone.modHeaders(
|
|
@@ -42,7 +42,7 @@ describe('communication-templates', () => {
|
|
|
42
42
|
|
|
43
43
|
describe('create templates', () => {
|
|
44
44
|
it('only allows admins to create new templates', async () => {
|
|
45
|
-
const moderatorReq = agent.
|
|
45
|
+
const moderatorReq = agent.tools.ozone.communication.createTemplate(
|
|
46
46
|
{ ...templateOne, createdBy: sc.dids.bob },
|
|
47
47
|
{
|
|
48
48
|
encoding: 'application/json',
|
|
@@ -55,7 +55,7 @@ describe('communication-templates', () => {
|
|
|
55
55
|
await expect(moderatorReq).rejects.toThrow(
|
|
56
56
|
'Must be a moderator to create a communication template',
|
|
57
57
|
)
|
|
58
|
-
const modReq = await agent.
|
|
58
|
+
const modReq = await agent.tools.ozone.communication.createTemplate(
|
|
59
59
|
{ ...templateOne, createdBy: sc.dids.bob },
|
|
60
60
|
{
|
|
61
61
|
encoding: 'application/json',
|
|
@@ -82,7 +82,7 @@ describe('communication-templates', () => {
|
|
|
82
82
|
...templateOne,
|
|
83
83
|
name: 'Test template 2',
|
|
84
84
|
}
|
|
85
|
-
await agent.
|
|
85
|
+
await agent.tools.ozone.communication.createTemplate(
|
|
86
86
|
{ ...templateTwo, createdBy: sc.dids.bob },
|
|
87
87
|
{
|
|
88
88
|
encoding: 'application/json',
|
|
@@ -100,7 +100,7 @@ describe('communication-templates', () => {
|
|
|
100
100
|
})
|
|
101
101
|
describe('update template', () => {
|
|
102
102
|
it('allows moderators to update a template by id', async () => {
|
|
103
|
-
const { data } = await agent.
|
|
103
|
+
const { data } = await agent.tools.ozone.communication.updateTemplate(
|
|
104
104
|
{ id: '1', updatedBy: sc.dids.bob, name: '1 Test template' },
|
|
105
105
|
{
|
|
106
106
|
encoding: 'application/json',
|
|
@@ -117,7 +117,7 @@ describe('communication-templates', () => {
|
|
|
117
117
|
})
|
|
118
118
|
describe('delete template', () => {
|
|
119
119
|
it('allows admins to remove a template by id', async () => {
|
|
120
|
-
const modReq = agent.
|
|
120
|
+
const modReq = agent.tools.ozone.communication.deleteTemplate(
|
|
121
121
|
{ id: '1' },
|
|
122
122
|
{
|
|
123
123
|
encoding: 'application/json',
|
|
@@ -132,7 +132,7 @@ describe('communication-templates', () => {
|
|
|
132
132
|
'Must be a moderator to delete a communication template',
|
|
133
133
|
)
|
|
134
134
|
|
|
135
|
-
await agent.
|
|
135
|
+
await agent.tools.ozone.communication.deleteTemplate(
|
|
136
136
|
{ id: '1' },
|
|
137
137
|
{
|
|
138
138
|
encoding: 'application/json',
|