@atproto/pds 0.3.18 → 0.3.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -236,6 +236,12 @@ export declare const schemaDict: {
236
236
  type: string;
237
237
  format: string;
238
238
  };
239
+ tags: {
240
+ type: string;
241
+ items: {
242
+ type: string;
243
+ };
244
+ };
239
245
  };
240
246
  };
241
247
  reportViewDetail: {
@@ -779,6 +785,31 @@ export declare const schemaDict: {
779
785
  };
780
786
  };
781
787
  };
788
+ modEventTag: {
789
+ type: string;
790
+ description: string;
791
+ required: string[];
792
+ properties: {
793
+ add: {
794
+ type: string;
795
+ items: {
796
+ type: string;
797
+ };
798
+ description: string;
799
+ };
800
+ remove: {
801
+ type: string;
802
+ items: {
803
+ type: string;
804
+ };
805
+ description: string;
806
+ };
807
+ comment: {
808
+ type: string;
809
+ description: string;
810
+ };
811
+ };
812
+ };
782
813
  communicationTemplateView: {
783
814
  type: string;
784
815
  required: string[];
@@ -1343,6 +1374,20 @@ export declare const schemaDict: {
1343
1374
  };
1344
1375
  description: string;
1345
1376
  };
1377
+ addedTags: {
1378
+ type: string;
1379
+ items: {
1380
+ type: string;
1381
+ };
1382
+ description: string;
1383
+ };
1384
+ removedTags: {
1385
+ type: string;
1386
+ items: {
1387
+ type: string;
1388
+ };
1389
+ description: string;
1390
+ };
1346
1391
  reportTypes: {
1347
1392
  type: string;
1348
1393
  items: {
@@ -1458,6 +1503,18 @@ export declare const schemaDict: {
1458
1503
  maximum: number;
1459
1504
  default: number;
1460
1505
  };
1506
+ tags: {
1507
+ type: string;
1508
+ items: {
1509
+ type: string;
1510
+ };
1511
+ };
1512
+ excludeTags: {
1513
+ type: string;
1514
+ items: {
1515
+ type: string;
1516
+ };
1517
+ };
1461
1518
  cursor: {
1462
1519
  type: string;
1463
1520
  };
@@ -82,6 +82,7 @@ export interface SubjectStatusView {
82
82
  takendown?: boolean;
83
83
  appealed?: boolean;
84
84
  suspendUntil?: string;
85
+ tags?: string[];
85
86
  [k: string]: unknown;
86
87
  }
87
88
  export declare function isSubjectStatusView(v: unknown): v is SubjectStatusView;
@@ -317,6 +318,14 @@ export interface ModEventEmail {
317
318
  }
318
319
  export declare function isModEventEmail(v: unknown): v is ModEventEmail;
319
320
  export declare function validateModEventEmail(v: unknown): ValidationResult;
321
+ export interface ModEventTag {
322
+ add: string[];
323
+ remove: string[];
324
+ comment?: string;
325
+ [k: string]: unknown;
326
+ }
327
+ export declare function isModEventTag(v: unknown): v is ModEventTag;
328
+ export declare function validateModEventTag(v: unknown): ValidationResult;
320
329
  export interface CommunicationTemplateView {
321
330
  id: string;
322
331
  name: string;
@@ -5,7 +5,7 @@ import * as ComAtprotoRepoStrongRef from '../repo/strongRef';
5
5
  export interface QueryParams {
6
6
  }
7
7
  export interface InputSchema {
8
- event: ComAtprotoAdminDefs.ModEventTakedown | ComAtprotoAdminDefs.ModEventAcknowledge | ComAtprotoAdminDefs.ModEventEscalate | ComAtprotoAdminDefs.ModEventComment | ComAtprotoAdminDefs.ModEventLabel | ComAtprotoAdminDefs.ModEventReport | ComAtprotoAdminDefs.ModEventMute | ComAtprotoAdminDefs.ModEventReverseTakedown | ComAtprotoAdminDefs.ModEventUnmute | ComAtprotoAdminDefs.ModEventEmail | {
8
+ event: ComAtprotoAdminDefs.ModEventTakedown | ComAtprotoAdminDefs.ModEventAcknowledge | ComAtprotoAdminDefs.ModEventEscalate | ComAtprotoAdminDefs.ModEventComment | ComAtprotoAdminDefs.ModEventLabel | ComAtprotoAdminDefs.ModEventReport | ComAtprotoAdminDefs.ModEventMute | ComAtprotoAdminDefs.ModEventReverseTakedown | ComAtprotoAdminDefs.ModEventUnmute | ComAtprotoAdminDefs.ModEventEmail | ComAtprotoAdminDefs.ModEventTag | {
9
9
  $type: string;
10
10
  [k: string]: unknown;
11
11
  };
@@ -14,6 +14,8 @@ export interface QueryParams {
14
14
  comment?: string;
15
15
  addedLabels?: string[];
16
16
  removedLabels?: string[];
17
+ addedTags?: string[];
18
+ removedTags?: string[];
17
19
  reportTypes?: string[];
18
20
  cursor?: string;
19
21
  }
@@ -17,6 +17,8 @@ export interface QueryParams {
17
17
  takendown?: boolean;
18
18
  appealed?: boolean;
19
19
  limit: number;
20
+ tags?: string[];
21
+ excludeTags?: string[];
20
22
  cursor?: string;
21
23
  }
22
24
  export type InputSchema = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/pds",
3
- "version": "0.3.18",
3
+ "version": "0.3.19",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of atproto Personal Data Server (PDS)",
6
6
  "keywords": [
@@ -44,12 +44,12 @@
44
44
  "typed-emitter": "^2.1.0",
45
45
  "uint8arrays": "3.0.0",
46
46
  "zod": "^3.21.4",
47
+ "@atproto/api": "^0.9.8",
47
48
  "@atproto/aws": "^0.1.7",
48
- "@atproto/api": "^0.9.7",
49
49
  "@atproto/common": "^0.3.3",
50
50
  "@atproto/crypto": "^0.3.0",
51
- "@atproto/lexicon": "^0.3.1",
52
51
  "@atproto/identity": "^0.3.2",
52
+ "@atproto/lexicon": "^0.3.1",
53
53
  "@atproto/repo": "^0.3.7",
54
54
  "@atproto/syntax": "^0.1.5",
55
55
  "@atproto/xrpc": "^0.4.1",
@@ -68,9 +68,9 @@
68
68
  "axios": "^0.27.2",
69
69
  "get-port": "^6.1.2",
70
70
  "ws": "^8.12.0",
71
- "@atproto/api": "^0.9.7",
72
- "@atproto/bsky": "^0.0.30",
73
- "@atproto/dev-env": "^0.2.30",
71
+ "@atproto/api": "^0.9.8",
72
+ "@atproto/bsky": "^0.0.31",
73
+ "@atproto/dev-env": "^0.2.31",
74
74
  "@atproto/lex-cli": "^0.3.0"
75
75
  },
76
76
  "scripts": {
@@ -303,6 +303,12 @@ export const schemaDict = {
303
303
  type: 'string',
304
304
  format: 'datetime',
305
305
  },
306
+ tags: {
307
+ type: 'array',
308
+ items: {
309
+ type: 'string',
310
+ },
311
+ },
306
312
  },
307
313
  },
308
314
  reportViewDetail: {
@@ -897,6 +903,33 @@ export const schemaDict = {
897
903
  },
898
904
  },
899
905
  },
906
+ modEventTag: {
907
+ type: 'object',
908
+ description: 'Add/Remove a tag on a subject',
909
+ required: ['add', 'remove'],
910
+ properties: {
911
+ add: {
912
+ type: 'array',
913
+ items: {
914
+ type: 'string',
915
+ },
916
+ description:
917
+ "Tags to be added to the subject. If already exists, won't be duplicated.",
918
+ },
919
+ remove: {
920
+ type: 'array',
921
+ items: {
922
+ type: 'string',
923
+ },
924
+ description:
925
+ "Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated.",
926
+ },
927
+ comment: {
928
+ type: 'string',
929
+ description: 'Additional comment about added/removed tags.',
930
+ },
931
+ },
932
+ },
900
933
  communicationTemplateView: {
901
934
  type: 'object',
902
935
  required: [
@@ -1075,6 +1108,7 @@ export const schemaDict = {
1075
1108
  'lex:com.atproto.admin.defs#modEventReverseTakedown',
1076
1109
  'lex:com.atproto.admin.defs#modEventUnmute',
1077
1110
  'lex:com.atproto.admin.defs#modEventEmail',
1111
+ 'lex:com.atproto.admin.defs#modEventTag',
1078
1112
  ],
1079
1113
  },
1080
1114
  subject: {
@@ -1503,6 +1537,22 @@ export const schemaDict = {
1503
1537
  description:
1504
1538
  'If specified, only events where all of these labels were removed are returned',
1505
1539
  },
1540
+ addedTags: {
1541
+ type: 'array',
1542
+ items: {
1543
+ type: 'string',
1544
+ },
1545
+ description:
1546
+ 'If specified, only events where all of these tags were added are returned',
1547
+ },
1548
+ removedTags: {
1549
+ type: 'array',
1550
+ items: {
1551
+ type: 'string',
1552
+ },
1553
+ description:
1554
+ 'If specified, only events where all of these tags were removed are returned',
1555
+ },
1506
1556
  reportTypes: {
1507
1557
  type: 'array',
1508
1558
  items: {
@@ -1620,6 +1670,18 @@ export const schemaDict = {
1620
1670
  maximum: 100,
1621
1671
  default: 50,
1622
1672
  },
1673
+ tags: {
1674
+ type: 'array',
1675
+ items: {
1676
+ type: 'string',
1677
+ },
1678
+ },
1679
+ excludeTags: {
1680
+ type: 'array',
1681
+ items: {
1682
+ type: 'string',
1683
+ },
1684
+ },
1623
1685
  cursor: {
1624
1686
  type: 'string',
1625
1687
  },
@@ -156,6 +156,7 @@ export interface SubjectStatusView {
156
156
  /** True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators. */
157
157
  appealed?: boolean
158
158
  suspendUntil?: string
159
+ tags?: string[]
159
160
  [k: string]: unknown
160
161
  }
161
162
 
@@ -720,6 +721,29 @@ export function validateModEventEmail(v: unknown): ValidationResult {
720
721
  return lexicons.validate('com.atproto.admin.defs#modEventEmail', v)
721
722
  }
722
723
 
724
+ /** Add/Remove a tag on a subject */
725
+ export interface ModEventTag {
726
+ /** Tags to be added to the subject. If already exists, won't be duplicated. */
727
+ add: string[]
728
+ /** Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. */
729
+ remove: string[]
730
+ /** Additional comment about added/removed tags. */
731
+ comment?: string
732
+ [k: string]: unknown
733
+ }
734
+
735
+ export function isModEventTag(v: unknown): v is ModEventTag {
736
+ return (
737
+ isObj(v) &&
738
+ hasProp(v, '$type') &&
739
+ v.$type === 'com.atproto.admin.defs#modEventTag'
740
+ )
741
+ }
742
+
743
+ export function validateModEventTag(v: unknown): ValidationResult {
744
+ return lexicons.validate('com.atproto.admin.defs#modEventTag', v)
745
+ }
746
+
723
747
  export interface CommunicationTemplateView {
724
748
  id: string
725
749
  /** Name of the template. */
@@ -24,6 +24,7 @@ export interface InputSchema {
24
24
  | ComAtprotoAdminDefs.ModEventReverseTakedown
25
25
  | ComAtprotoAdminDefs.ModEventUnmute
26
26
  | ComAtprotoAdminDefs.ModEventEmail
27
+ | ComAtprotoAdminDefs.ModEventTag
27
28
  | { $type: string; [k: string]: unknown }
28
29
  subject:
29
30
  | ComAtprotoAdminDefs.RepoRef
@@ -31,6 +31,10 @@ export interface QueryParams {
31
31
  addedLabels?: string[]
32
32
  /** If specified, only events where all of these labels were removed are returned */
33
33
  removedLabels?: string[]
34
+ /** If specified, only events where all of these tags were added are returned */
35
+ addedTags?: string[]
36
+ /** If specified, only events where all of these tags were removed are returned */
37
+ removedTags?: string[]
34
38
  reportTypes?: string[]
35
39
  cursor?: string
36
40
  }
@@ -35,6 +35,8 @@ export interface QueryParams {
35
35
  /** Get subjects in unresolved appealed status */
36
36
  appealed?: boolean
37
37
  limit: number
38
+ tags?: string[]
39
+ excludeTags?: string[]
38
40
  cursor?: string
39
41
  }
40
42
 
@@ -14,7 +14,7 @@ Array [
14
14
  },
15
15
  Object {
16
16
  "createdAt": "1970-01-01T00:00:00.000Z",
17
- "id": 5,
17
+ "id": 6,
18
18
  "reason": "impersonation",
19
19
  "reasonType": "com.atproto.moderation.defs#reasonOther",
20
20
  "reportedBy": "user(2)",
@@ -34,7 +34,7 @@ Array [
34
34
  "event": Object {
35
35
  "$type": "com.atproto.admin.defs#modEventAcknowledge",
36
36
  },
37
- "id": 7,
37
+ "id": 9,
38
38
  "subject": Object {
39
39
  "$type": "com.atproto.admin.defs#repoRef",
40
40
  "did": "user(0)",
@@ -51,7 +51,7 @@ Array [
51
51
  "comment": "impersonation",
52
52
  "reportType": "com.atproto.moderation.defs#reasonOther",
53
53
  },
54
- "id": 5,
54
+ "id": 6,
55
55
  "subject": Object {
56
56
  "$type": "com.atproto.admin.defs#repoRef",
57
57
  "did": "user(0)",
@@ -62,6 +62,25 @@ Array [
62
62
  Object {
63
63
  "createdAt": "1970-01-01T00:00:00.000Z",
64
64
  "createdBy": "user(2)",
65
+ "event": Object {
66
+ "$type": "com.atproto.admin.defs#modEventTag",
67
+ "add": Array [
68
+ "lang:en",
69
+ "lang:i",
70
+ ],
71
+ "remove": Array [],
72
+ },
73
+ "id": 5,
74
+ "subject": Object {
75
+ "$type": "com.atproto.admin.defs#repoRef",
76
+ "did": "user(0)",
77
+ },
78
+ "subjectBlobCids": Array [],
79
+ "subjectHandle": "bob.test",
80
+ },
81
+ Object {
82
+ "createdAt": "1970-01-01T00:00:00.000Z",
83
+ "createdBy": "user(3)",
65
84
  "creatorHandle": "alice.test",
66
85
  "event": Object {
67
86
  "$type": "com.atproto.admin.defs#modEventReport",
@@ -118,6 +137,10 @@ Object {
118
137
  },
119
138
  "subjectBlobCids": Array [],
120
139
  "subjectRepoHandle": "bob.test",
140
+ "tags": Array [
141
+ "lang:en",
142
+ "lang:i",
143
+ ],
121
144
  "takendown": false,
122
145
  "updatedAt": "1970-01-01T00:00:00.000Z",
123
146
  },
@@ -178,13 +201,32 @@ Object {
178
201
 
179
202
  exports[`proxies admin requests fetches moderation events. 1`] = `
180
203
  Array [
204
+ Object {
205
+ "createdAt": "1970-01-01T00:00:00.000Z",
206
+ "createdBy": "user(0)",
207
+ "event": Object {
208
+ "$type": "com.atproto.admin.defs#modEventTag",
209
+ "add": Array [
210
+ "lang:und",
211
+ ],
212
+ "remove": Array [],
213
+ },
214
+ "id": 8,
215
+ "subject": Object {
216
+ "$type": "com.atproto.repo.strongRef",
217
+ "cid": "cids(0)",
218
+ "uri": "record(0)",
219
+ },
220
+ "subjectBlobCids": Array [],
221
+ "subjectHandle": "bob.test",
222
+ },
181
223
  Object {
182
224
  "createdAt": "1970-01-01T00:00:00.000Z",
183
225
  "createdBy": "did:example:admin",
184
226
  "event": Object {
185
227
  "$type": "com.atproto.admin.defs#modEventAcknowledge",
186
228
  },
187
- "id": 6,
229
+ "id": 7,
188
230
  "subject": Object {
189
231
  "$type": "com.atproto.repo.strongRef",
190
232
  "cid": "cids(0)",
@@ -206,7 +248,7 @@ Object {
206
248
  "moderation": Object {
207
249
  "subjectStatus": Object {
208
250
  "createdAt": "1970-01-01T00:00:00.000Z",
209
- "id": 3,
251
+ "id": 4,
210
252
  "lastReviewedAt": "1970-01-01T00:00:00.000Z",
211
253
  "lastReviewedBy": "did:example:admin",
212
254
  "reviewState": "com.atproto.admin.defs#reviewClosed",
@@ -217,6 +259,9 @@ Object {
217
259
  },
218
260
  "subjectBlobCids": Array [],
219
261
  "subjectRepoHandle": "bob.test",
262
+ "tags": Array [
263
+ "lang:und",
264
+ ],
220
265
  "takendown": false,
221
266
  "updatedAt": "1970-01-01T00:00:00.000Z",
222
267
  },
@@ -267,6 +312,10 @@ Object {
267
312
  },
268
313
  "subjectBlobCids": Array [],
269
314
  "subjectRepoHandle": "bob.test",
315
+ "tags": Array [
316
+ "lang:en",
317
+ "lang:i",
318
+ ],
270
319
  "takendown": false,
271
320
  "updatedAt": "1970-01-01T00:00:00.000Z",
272
321
  },
@@ -368,7 +417,7 @@ Object {
368
417
  "event": Object {
369
418
  "$type": "com.atproto.admin.defs#modEventAcknowledge",
370
419
  },
371
- "id": 6,
420
+ "id": 7,
372
421
  "subject": Object {
373
422
  "$type": "com.atproto.repo.strongRef",
374
423
  "cid": "cids(0)",
@@ -385,7 +434,7 @@ Object {
385
434
  "event": Object {
386
435
  "$type": "com.atproto.admin.defs#modEventAcknowledge",
387
436
  },
388
- "id": 7,
437
+ "id": 9,
389
438
  "subject": Object {
390
439
  "$type": "com.atproto.admin.defs#repoRef",
391
440
  "did": "user(0)",