@atproto/bsky 0.0.30 → 0.0.31

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.
@@ -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/bsky",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of app.bsky App View (Bluesky API)",
6
6
  "keywords": [
@@ -40,11 +40,11 @@
40
40
  "sharp": "^0.32.6",
41
41
  "typed-emitter": "^2.1.0",
42
42
  "uint8arrays": "3.0.0",
43
- "@atproto/api": "^0.9.7",
43
+ "@atproto/api": "^0.9.8",
44
44
  "@atproto/common": "^0.3.3",
45
45
  "@atproto/crypto": "^0.3.0",
46
- "@atproto/identity": "^0.3.2",
47
46
  "@atproto/lexicon": "^0.3.1",
47
+ "@atproto/identity": "^0.3.2",
48
48
  "@atproto/repo": "^0.3.7",
49
49
  "@atproto/syntax": "^0.1.5",
50
50
  "@atproto/xrpc-server": "^0.4.2"
@@ -60,10 +60,10 @@
60
60
  "@types/pg": "^8.6.6",
61
61
  "@types/qs": "^6.9.7",
62
62
  "axios": "^0.27.2",
63
- "@atproto/api": "^0.9.7",
64
- "@atproto/dev-env": "^0.2.30",
63
+ "@atproto/api": "^0.9.8",
64
+ "@atproto/dev-env": "^0.2.31",
65
+ "@atproto/pds": "^0.3.19",
65
66
  "@atproto/lex-cli": "^0.3.0",
66
- "@atproto/pds": "^0.3.18",
67
67
  "@atproto/xrpc": "^0.4.1"
68
68
  },
69
69
  "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
 
@@ -105,6 +105,8 @@ describe('labeler', () => {
105
105
  types: [],
106
106
  addedLabels: [],
107
107
  removedLabels: [],
108
+ addedTags: [],
109
+ removedTags: [],
108
110
  })
109
111
  expect(events.length).toBe(1)
110
112
  expect(events[0]).toMatchObject({