@atproto/api 0.17.3 → 0.17.5

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.
Files changed (117) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/client/lexicons.d.ts +176 -0
  3. package/dist/client/lexicons.d.ts.map +1 -1
  4. package/dist/client/lexicons.js +88 -0
  5. package/dist/client/lexicons.js.map +1 -1
  6. package/dist/client/types/app/bsky/actor/profile.d.ts +4 -3
  7. package/dist/client/types/app/bsky/actor/profile.d.ts.map +1 -1
  8. package/dist/client/types/app/bsky/actor/profile.js +9 -7
  9. package/dist/client/types/app/bsky/actor/profile.js.map +1 -1
  10. package/dist/client/types/app/bsky/actor/status.d.ts +4 -3
  11. package/dist/client/types/app/bsky/actor/status.d.ts.map +1 -1
  12. package/dist/client/types/app/bsky/actor/status.js +9 -7
  13. package/dist/client/types/app/bsky/actor/status.js.map +1 -1
  14. package/dist/client/types/app/bsky/feed/generator.d.ts +4 -3
  15. package/dist/client/types/app/bsky/feed/generator.d.ts.map +1 -1
  16. package/dist/client/types/app/bsky/feed/generator.js +9 -7
  17. package/dist/client/types/app/bsky/feed/generator.js.map +1 -1
  18. package/dist/client/types/app/bsky/feed/like.d.ts +4 -3
  19. package/dist/client/types/app/bsky/feed/like.d.ts.map +1 -1
  20. package/dist/client/types/app/bsky/feed/like.js +9 -7
  21. package/dist/client/types/app/bsky/feed/like.js.map +1 -1
  22. package/dist/client/types/app/bsky/feed/post.d.ts +4 -3
  23. package/dist/client/types/app/bsky/feed/post.d.ts.map +1 -1
  24. package/dist/client/types/app/bsky/feed/post.js +9 -7
  25. package/dist/client/types/app/bsky/feed/post.js.map +1 -1
  26. package/dist/client/types/app/bsky/feed/postgate.d.ts +4 -3
  27. package/dist/client/types/app/bsky/feed/postgate.d.ts.map +1 -1
  28. package/dist/client/types/app/bsky/feed/postgate.js +9 -7
  29. package/dist/client/types/app/bsky/feed/postgate.js.map +1 -1
  30. package/dist/client/types/app/bsky/feed/repost.d.ts +4 -3
  31. package/dist/client/types/app/bsky/feed/repost.d.ts.map +1 -1
  32. package/dist/client/types/app/bsky/feed/repost.js +9 -7
  33. package/dist/client/types/app/bsky/feed/repost.js.map +1 -1
  34. package/dist/client/types/app/bsky/feed/threadgate.d.ts +4 -3
  35. package/dist/client/types/app/bsky/feed/threadgate.d.ts.map +1 -1
  36. package/dist/client/types/app/bsky/feed/threadgate.js +9 -7
  37. package/dist/client/types/app/bsky/feed/threadgate.js.map +1 -1
  38. package/dist/client/types/app/bsky/graph/block.d.ts +4 -3
  39. package/dist/client/types/app/bsky/graph/block.d.ts.map +1 -1
  40. package/dist/client/types/app/bsky/graph/block.js +9 -7
  41. package/dist/client/types/app/bsky/graph/block.js.map +1 -1
  42. package/dist/client/types/app/bsky/graph/follow.d.ts +4 -3
  43. package/dist/client/types/app/bsky/graph/follow.d.ts.map +1 -1
  44. package/dist/client/types/app/bsky/graph/follow.js +9 -7
  45. package/dist/client/types/app/bsky/graph/follow.js.map +1 -1
  46. package/dist/client/types/app/bsky/graph/list.d.ts +4 -3
  47. package/dist/client/types/app/bsky/graph/list.d.ts.map +1 -1
  48. package/dist/client/types/app/bsky/graph/list.js +9 -7
  49. package/dist/client/types/app/bsky/graph/list.js.map +1 -1
  50. package/dist/client/types/app/bsky/graph/listblock.d.ts +4 -3
  51. package/dist/client/types/app/bsky/graph/listblock.d.ts.map +1 -1
  52. package/dist/client/types/app/bsky/graph/listblock.js +9 -7
  53. package/dist/client/types/app/bsky/graph/listblock.js.map +1 -1
  54. package/dist/client/types/app/bsky/graph/listitem.d.ts +4 -3
  55. package/dist/client/types/app/bsky/graph/listitem.d.ts.map +1 -1
  56. package/dist/client/types/app/bsky/graph/listitem.js +9 -7
  57. package/dist/client/types/app/bsky/graph/listitem.js.map +1 -1
  58. package/dist/client/types/app/bsky/graph/starterpack.d.ts +4 -3
  59. package/dist/client/types/app/bsky/graph/starterpack.d.ts.map +1 -1
  60. package/dist/client/types/app/bsky/graph/starterpack.js +9 -7
  61. package/dist/client/types/app/bsky/graph/starterpack.js.map +1 -1
  62. package/dist/client/types/app/bsky/graph/verification.d.ts +4 -3
  63. package/dist/client/types/app/bsky/graph/verification.d.ts.map +1 -1
  64. package/dist/client/types/app/bsky/graph/verification.js +9 -7
  65. package/dist/client/types/app/bsky/graph/verification.js.map +1 -1
  66. package/dist/client/types/app/bsky/labeler/service.d.ts +4 -3
  67. package/dist/client/types/app/bsky/labeler/service.d.ts.map +1 -1
  68. package/dist/client/types/app/bsky/labeler/service.js +9 -7
  69. package/dist/client/types/app/bsky/labeler/service.js.map +1 -1
  70. package/dist/client/types/app/bsky/notification/declaration.d.ts +4 -3
  71. package/dist/client/types/app/bsky/notification/declaration.d.ts.map +1 -1
  72. package/dist/client/types/app/bsky/notification/declaration.js +9 -7
  73. package/dist/client/types/app/bsky/notification/declaration.js.map +1 -1
  74. package/dist/client/types/chat/bsky/actor/declaration.d.ts +4 -3
  75. package/dist/client/types/chat/bsky/actor/declaration.d.ts.map +1 -1
  76. package/dist/client/types/chat/bsky/actor/declaration.js +9 -7
  77. package/dist/client/types/chat/bsky/actor/declaration.js.map +1 -1
  78. package/dist/client/types/com/atproto/lexicon/schema.d.ts +4 -3
  79. package/dist/client/types/com/atproto/lexicon/schema.d.ts.map +1 -1
  80. package/dist/client/types/com/atproto/lexicon/schema.js +9 -7
  81. package/dist/client/types/com/atproto/lexicon/schema.js.map +1 -1
  82. package/dist/client/types/tools/ozone/moderation/defs.d.ts +35 -0
  83. package/dist/client/types/tools/ozone/moderation/defs.d.ts.map +1 -1
  84. package/dist/client/types/tools/ozone/moderation/defs.js +9 -0
  85. package/dist/client/types/tools/ozone/moderation/defs.js.map +1 -1
  86. package/dist/client/types/tools/ozone/moderation/queryEvents.d.ts +2 -0
  87. package/dist/client/types/tools/ozone/moderation/queryEvents.d.ts.map +1 -1
  88. package/dist/client/types/tools/ozone/moderation/queryEvents.js.map +1 -1
  89. package/dist/client/types/tools/ozone/moderation/queryStatuses.d.ts +2 -0
  90. package/dist/client/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
  91. package/dist/client/types/tools/ozone/moderation/queryStatuses.js.map +1 -1
  92. package/dist/predicate.d.ts +1 -1
  93. package/dist/predicate.d.ts.map +1 -1
  94. package/package.json +2 -2
  95. package/src/client/lexicons.ts +103 -0
  96. package/src/client/types/app/bsky/actor/profile.ts +12 -6
  97. package/src/client/types/app/bsky/actor/status.ts +12 -6
  98. package/src/client/types/app/bsky/feed/generator.ts +12 -6
  99. package/src/client/types/app/bsky/feed/like.ts +12 -6
  100. package/src/client/types/app/bsky/feed/post.ts +12 -6
  101. package/src/client/types/app/bsky/feed/postgate.ts +12 -6
  102. package/src/client/types/app/bsky/feed/repost.ts +12 -6
  103. package/src/client/types/app/bsky/feed/threadgate.ts +12 -6
  104. package/src/client/types/app/bsky/graph/block.ts +12 -6
  105. package/src/client/types/app/bsky/graph/follow.ts +12 -6
  106. package/src/client/types/app/bsky/graph/list.ts +12 -6
  107. package/src/client/types/app/bsky/graph/listblock.ts +12 -6
  108. package/src/client/types/app/bsky/graph/listitem.ts +12 -6
  109. package/src/client/types/app/bsky/graph/starterpack.ts +12 -6
  110. package/src/client/types/app/bsky/graph/verification.ts +12 -6
  111. package/src/client/types/app/bsky/labeler/service.ts +12 -6
  112. package/src/client/types/app/bsky/notification/declaration.ts +12 -6
  113. package/src/client/types/chat/bsky/actor/declaration.ts +12 -6
  114. package/src/client/types/com/atproto/lexicon/schema.ts +12 -6
  115. package/src/client/types/tools/ozone/moderation/defs.ts +44 -0
  116. package/src/client/types/tools/ozone/moderation/queryEvents.ts +2 -0
  117. package/src/client/types/tools/ozone/moderation/queryStatuses.ts +2 -0
@@ -14,7 +14,7 @@ const is$typed = _is$typed,
14
14
  validate = _validate
15
15
  const id = 'app.bsky.graph.listblock'
16
16
 
17
- export interface Record {
17
+ export interface Main {
18
18
  $type: 'app.bsky.graph.listblock'
19
19
  /** Reference (AT-URI) to the mod list record. */
20
20
  subject: string
@@ -22,12 +22,18 @@ export interface Record {
22
22
  [k: string]: unknown
23
23
  }
24
24
 
25
- const hashRecord = 'main'
25
+ const hashMain = 'main'
26
26
 
27
- export function isRecord<V>(v: V) {
28
- return is$typed(v, id, hashRecord)
27
+ export function isMain<V>(v: V) {
28
+ return is$typed(v, id, hashMain)
29
29
  }
30
30
 
31
- export function validateRecord<V>(v: V) {
32
- return validate<Record & V>(v, id, hashRecord, true)
31
+ export function validateMain<V>(v: V) {
32
+ return validate<Main & V>(v, id, hashMain, true)
33
+ }
34
+
35
+ export {
36
+ type Main as Record,
37
+ isMain as isRecord,
38
+ validateMain as validateRecord,
33
39
  }
@@ -14,7 +14,7 @@ const is$typed = _is$typed,
14
14
  validate = _validate
15
15
  const id = 'app.bsky.graph.listitem'
16
16
 
17
- export interface Record {
17
+ export interface Main {
18
18
  $type: 'app.bsky.graph.listitem'
19
19
  /** The account which is included on the list. */
20
20
  subject: string
@@ -24,12 +24,18 @@ export interface Record {
24
24
  [k: string]: unknown
25
25
  }
26
26
 
27
- const hashRecord = 'main'
27
+ const hashMain = 'main'
28
28
 
29
- export function isRecord<V>(v: V) {
30
- return is$typed(v, id, hashRecord)
29
+ export function isMain<V>(v: V) {
30
+ return is$typed(v, id, hashMain)
31
31
  }
32
32
 
33
- export function validateRecord<V>(v: V) {
34
- return validate<Record & V>(v, id, hashRecord, true)
33
+ export function validateMain<V>(v: V) {
34
+ return validate<Main & V>(v, id, hashMain, true)
35
+ }
36
+
37
+ export {
38
+ type Main as Record,
39
+ isMain as isRecord,
40
+ validateMain as validateRecord,
35
41
  }
@@ -15,7 +15,7 @@ const is$typed = _is$typed,
15
15
  validate = _validate
16
16
  const id = 'app.bsky.graph.starterpack'
17
17
 
18
- export interface Record {
18
+ export interface Main {
19
19
  $type: 'app.bsky.graph.starterpack'
20
20
  /** Display name for starter pack; can not be empty. */
21
21
  name: string
@@ -28,14 +28,20 @@ export interface Record {
28
28
  [k: string]: unknown
29
29
  }
30
30
 
31
- const hashRecord = 'main'
31
+ const hashMain = 'main'
32
32
 
33
- export function isRecord<V>(v: V) {
34
- return is$typed(v, id, hashRecord)
33
+ export function isMain<V>(v: V) {
34
+ return is$typed(v, id, hashMain)
35
35
  }
36
36
 
37
- export function validateRecord<V>(v: V) {
38
- return validate<Record & V>(v, id, hashRecord, true)
37
+ export function validateMain<V>(v: V) {
38
+ return validate<Main & V>(v, id, hashMain, true)
39
+ }
40
+
41
+ export {
42
+ type Main as Record,
43
+ isMain as isRecord,
44
+ validateMain as validateRecord,
39
45
  }
40
46
 
41
47
  export interface FeedItem {
@@ -14,7 +14,7 @@ const is$typed = _is$typed,
14
14
  validate = _validate
15
15
  const id = 'app.bsky.graph.verification'
16
16
 
17
- export interface Record {
17
+ export interface Main {
18
18
  $type: 'app.bsky.graph.verification'
19
19
  /** DID of the subject the verification applies to. */
20
20
  subject: string
@@ -27,12 +27,18 @@ export interface Record {
27
27
  [k: string]: unknown
28
28
  }
29
29
 
30
- const hashRecord = 'main'
30
+ const hashMain = 'main'
31
31
 
32
- export function isRecord<V>(v: V) {
33
- return is$typed(v, id, hashRecord)
32
+ export function isMain<V>(v: V) {
33
+ return is$typed(v, id, hashMain)
34
34
  }
35
35
 
36
- export function validateRecord<V>(v: V) {
37
- return validate<Record & V>(v, id, hashRecord, true)
36
+ export function validateMain<V>(v: V) {
37
+ return validate<Main & V>(v, id, hashMain, true)
38
+ }
39
+
40
+ export {
41
+ type Main as Record,
42
+ isMain as isRecord,
43
+ validateMain as validateRecord,
38
44
  }
@@ -17,7 +17,7 @@ const is$typed = _is$typed,
17
17
  validate = _validate
18
18
  const id = 'app.bsky.labeler.service'
19
19
 
20
- export interface Record {
20
+ export interface Main {
21
21
  $type: 'app.bsky.labeler.service'
22
22
  policies: AppBskyLabelerDefs.LabelerPolicies
23
23
  labels?: $Typed<ComAtprotoLabelDefs.SelfLabels> | { $type: string }
@@ -31,12 +31,18 @@ export interface Record {
31
31
  [k: string]: unknown
32
32
  }
33
33
 
34
- const hashRecord = 'main'
34
+ const hashMain = 'main'
35
35
 
36
- export function isRecord<V>(v: V) {
37
- return is$typed(v, id, hashRecord)
36
+ export function isMain<V>(v: V) {
37
+ return is$typed(v, id, hashMain)
38
38
  }
39
39
 
40
- export function validateRecord<V>(v: V) {
41
- return validate<Record & V>(v, id, hashRecord, true)
40
+ export function validateMain<V>(v: V) {
41
+ return validate<Main & V>(v, id, hashMain, true)
42
+ }
43
+
44
+ export {
45
+ type Main as Record,
46
+ isMain as isRecord,
47
+ validateMain as validateRecord,
42
48
  }
@@ -14,19 +14,25 @@ const is$typed = _is$typed,
14
14
  validate = _validate
15
15
  const id = 'app.bsky.notification.declaration'
16
16
 
17
- export interface Record {
17
+ export interface Main {
18
18
  $type: 'app.bsky.notification.declaration'
19
19
  /** A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. */
20
20
  allowSubscriptions: 'followers' | 'mutuals' | 'none' | (string & {})
21
21
  [k: string]: unknown
22
22
  }
23
23
 
24
- const hashRecord = 'main'
24
+ const hashMain = 'main'
25
25
 
26
- export function isRecord<V>(v: V) {
27
- return is$typed(v, id, hashRecord)
26
+ export function isMain<V>(v: V) {
27
+ return is$typed(v, id, hashMain)
28
28
  }
29
29
 
30
- export function validateRecord<V>(v: V) {
31
- return validate<Record & V>(v, id, hashRecord, true)
30
+ export function validateMain<V>(v: V) {
31
+ return validate<Main & V>(v, id, hashMain, true)
32
+ }
33
+
34
+ export {
35
+ type Main as Record,
36
+ isMain as isRecord,
37
+ validateMain as validateRecord,
32
38
  }
@@ -14,18 +14,24 @@ const is$typed = _is$typed,
14
14
  validate = _validate
15
15
  const id = 'chat.bsky.actor.declaration'
16
16
 
17
- export interface Record {
17
+ export interface Main {
18
18
  $type: 'chat.bsky.actor.declaration'
19
19
  allowIncoming: 'all' | 'none' | 'following' | (string & {})
20
20
  [k: string]: unknown
21
21
  }
22
22
 
23
- const hashRecord = 'main'
23
+ const hashMain = 'main'
24
24
 
25
- export function isRecord<V>(v: V) {
26
- return is$typed(v, id, hashRecord)
25
+ export function isMain<V>(v: V) {
26
+ return is$typed(v, id, hashMain)
27
27
  }
28
28
 
29
- export function validateRecord<V>(v: V) {
30
- return validate<Record & V>(v, id, hashRecord, true)
29
+ export function validateMain<V>(v: V) {
30
+ return validate<Main & V>(v, id, hashMain, true)
31
+ }
32
+
33
+ export {
34
+ type Main as Record,
35
+ isMain as isRecord,
36
+ validateMain as validateRecord,
31
37
  }
@@ -14,19 +14,25 @@ const is$typed = _is$typed,
14
14
  validate = _validate
15
15
  const id = 'com.atproto.lexicon.schema'
16
16
 
17
- export interface Record {
17
+ export interface Main {
18
18
  $type: 'com.atproto.lexicon.schema'
19
19
  /** Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system. */
20
20
  lexicon: number
21
21
  [k: string]: unknown
22
22
  }
23
23
 
24
- const hashRecord = 'main'
24
+ const hashMain = 'main'
25
25
 
26
- export function isRecord<V>(v: V) {
27
- return is$typed(v, id, hashRecord)
26
+ export function isMain<V>(v: V) {
27
+ return is$typed(v, id, hashMain)
28
28
  }
29
29
 
30
- export function validateRecord<V>(v: V) {
31
- return validate<Record & V>(v, id, hashRecord, true)
30
+ export function validateMain<V>(v: V) {
31
+ return validate<Main & V>(v, id, hashMain, true)
32
+ }
33
+
34
+ export {
35
+ type Main as Record,
36
+ isMain as isRecord,
37
+ validateMain as validateRecord,
32
38
  }
@@ -157,6 +157,7 @@ export interface SubjectStatusView {
157
157
  tags?: string[]
158
158
  accountStats?: AccountStats
159
159
  recordsStats?: RecordsStats
160
+ accountStrike?: AccountStrike
160
161
  /** Current age assurance state of the subject. */
161
162
  ageAssuranceState?:
162
163
  | 'pending'
@@ -256,6 +257,29 @@ export function validateRecordsStats<V>(v: V) {
256
257
  return validate<RecordsStats & V>(v, id, hashRecordsStats)
257
258
  }
258
259
 
260
+ /** Strike information for an account */
261
+ export interface AccountStrike {
262
+ $type?: 'tools.ozone.moderation.defs#accountStrike'
263
+ /** Current number of active strikes (excluding expired strikes) */
264
+ activeStrikeCount?: number
265
+ /** Total number of strikes ever received (including expired strikes) */
266
+ totalStrikeCount?: number
267
+ /** Timestamp of the first strike received */
268
+ firstStrikeAt?: string
269
+ /** Timestamp of the most recent strike received */
270
+ lastStrikeAt?: string
271
+ }
272
+
273
+ const hashAccountStrike = 'accountStrike'
274
+
275
+ export function isAccountStrike<V>(v: V) {
276
+ return is$typed(v, id, hashAccountStrike)
277
+ }
278
+
279
+ export function validateAccountStrike<V>(v: V) {
280
+ return validate<AccountStrike & V>(v, id, hashAccountStrike)
281
+ }
282
+
259
283
  export type SubjectReviewState =
260
284
  | 'lex:tools.ozone.moderation.defs#reviewOpen'
261
285
  | 'lex:tools.ozone.moderation.defs#reviewEscalated'
@@ -282,6 +306,12 @@ export interface ModEventTakedown {
282
306
  acknowledgeAccountSubjects?: boolean
283
307
  /** Names/Keywords of the policies that drove the decision. */
284
308
  policies?: string[]
309
+ /** Severity level of the violation (e.g., 'sev-0', 'sev-1', 'sev-2', etc.). */
310
+ severityLevel?: string
311
+ /** Number of strikes to assign to the user for this violation. */
312
+ strikeCount?: number
313
+ /** When the strike should expire. If not provided, the strike never expires. */
314
+ strikeExpiresAt?: string
285
315
  }
286
316
 
287
317
  const hashModEventTakedown = 'modEventTakedown'
@@ -299,6 +329,12 @@ export interface ModEventReverseTakedown {
299
329
  $type?: 'tools.ozone.moderation.defs#modEventReverseTakedown'
300
330
  /** Describe reasoning behind the reversal. */
301
331
  comment?: string
332
+ /** Names/Keywords of the policy infraction for which takedown is being reversed. */
333
+ policies?: string[]
334
+ /** Severity level of the violation. Usually set from the last policy infraction's severity. */
335
+ severityLevel?: string
336
+ /** Number of strikes to subtract from the user's strike count. Usually set from the last policy infraction's severity. */
337
+ strikeCount?: number
302
338
  }
303
339
 
304
340
  const hashModEventReverseTakedown = 'modEventReverseTakedown'
@@ -590,6 +626,14 @@ export interface ModEventEmail {
590
626
  content?: string
591
627
  /** Additional comment about the outgoing comm. */
592
628
  comment?: string
629
+ /** Names/Keywords of the policies that necessitated the email. */
630
+ policies?: string[]
631
+ /** Severity level of the violation. Normally 'sev-1' that adds strike on repeat offense */
632
+ severityLevel?: string
633
+ /** Number of strikes to assign to the user for this violation. Normally 0 as an indicator of a warning and only added as a strike on a repeat offense. */
634
+ strikeCount?: number
635
+ /** When the strike should expire. If not provided, the strike never expires. */
636
+ strikeExpiresAt?: string
593
637
  }
594
638
 
595
639
  const hashModEventEmail = 'modEventEmail'
@@ -60,6 +60,8 @@ export type QueryParams = {
60
60
  | 'reset'
61
61
  | 'blocked'
62
62
  | (string & {})
63
+ /** If specified, only events where strikeCount value is set are returned. */
64
+ withStrike?: boolean
63
65
  cursor?: string
64
66
  }
65
67
  export type InputSchema = undefined
@@ -83,6 +83,8 @@ export type QueryParams = {
83
83
  minTakendownRecordsCount?: number
84
84
  /** If specified, only subjects that have priority score value above the given value will be returned. */
85
85
  minPriorityScore?: number
86
+ /** If specified, only subjects that belong to an account that has at least this many active strikes will be returned. */
87
+ minStrikeCount?: number
86
88
  /** If specified, only subjects with the given age assurance state will be returned. */
87
89
  ageAssuranceState?:
88
90
  | 'pending'