@atproto/api 0.9.7 → 0.9.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -28,7 +28,7 @@
28
28
  "devDependencies": {
29
29
  "common-tags": "^1.8.2",
30
30
  "@atproto/lex-cli": "^0.3.0",
31
- "@atproto/dev-env": "^0.2.30"
31
+ "@atproto/dev-env": "^0.2.31"
32
32
  },
33
33
  "scripts": {
34
34
  "codegen": "pnpm docgen && node ./scripts/generate-code.mjs && lex gen-api ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/*",
@@ -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. */
@@ -23,6 +23,7 @@ export interface InputSchema {
23
23
  | ComAtprotoAdminDefs.ModEventReverseTakedown
24
24
  | ComAtprotoAdminDefs.ModEventUnmute
25
25
  | ComAtprotoAdminDefs.ModEventEmail
26
+ | ComAtprotoAdminDefs.ModEventTag
26
27
  | { $type: string; [k: string]: unknown }
27
28
  subject:
28
29
  | ComAtprotoAdminDefs.RepoRef
@@ -30,6 +30,10 @@ export interface QueryParams {
30
30
  addedLabels?: string[]
31
31
  /** If specified, only events where all of these labels were removed are returned */
32
32
  removedLabels?: string[]
33
+ /** If specified, only events where all of these tags were added are returned */
34
+ addedTags?: string[]
35
+ /** If specified, only events where all of these tags were removed are returned */
36
+ removedTags?: string[]
33
37
  reportTypes?: string[]
34
38
  cursor?: string
35
39
  }
@@ -34,6 +34,8 @@ export interface QueryParams {
34
34
  /** Get subjects in unresolved appealed status */
35
35
  appealed?: boolean
36
36
  limit?: number
37
+ tags?: string[]
38
+ excludeTags?: string[]
37
39
  cursor?: string
38
40
  }
39
41