@atproto/pds 0.4.188 → 0.4.190

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 (28) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/lexicon/lexicons.d.ts +208 -0
  3. package/dist/lexicon/lexicons.d.ts.map +1 -1
  4. package/dist/lexicon/lexicons.js +104 -0
  5. package/dist/lexicon/lexicons.js.map +1 -1
  6. package/dist/lexicon/types/app/bsky/actor/defs.d.ts +12 -0
  7. package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
  8. package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
  9. package/dist/lexicon/types/app/bsky/feed/defs.d.ts +4 -0
  10. package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
  11. package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
  12. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +35 -0
  13. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
  14. package/dist/lexicon/types/tools/ozone/moderation/defs.js +9 -0
  15. package/dist/lexicon/types/tools/ozone/moderation/defs.js.map +1 -1
  16. package/dist/lexicon/types/tools/ozone/moderation/queryEvents.d.ts +2 -0
  17. package/dist/lexicon/types/tools/ozone/moderation/queryEvents.d.ts.map +1 -1
  18. package/dist/lexicon/types/tools/ozone/moderation/queryEvents.js.map +1 -1
  19. package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts +2 -0
  20. package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
  21. package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.js.map +1 -1
  22. package/package.json +5 -5
  23. package/src/lexicon/lexicons.ts +119 -0
  24. package/src/lexicon/types/app/bsky/actor/defs.ts +6 -0
  25. package/src/lexicon/types/app/bsky/feed/defs.ts +2 -0
  26. package/src/lexicon/types/tools/ozone/moderation/defs.ts +44 -0
  27. package/src/lexicon/types/tools/ozone/moderation/queryEvents.ts +2 -0
  28. package/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts +2 -0
@@ -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'
@@ -59,6 +59,8 @@ export type QueryParams = {
59
59
  | 'reset'
60
60
  | 'blocked'
61
61
  | (string & {})
62
+ /** If specified, only events where strikeCount value is set are returned. */
63
+ withStrike?: boolean
62
64
  cursor?: string
63
65
  }
64
66
  export type InputSchema = undefined
@@ -82,6 +82,8 @@ export type QueryParams = {
82
82
  minTakendownRecordsCount?: number
83
83
  /** If specified, only subjects that have priority score value above the given value will be returned. */
84
84
  minPriorityScore?: number
85
+ /** If specified, only subjects that belong to an account that has at least this many active strikes will be returned. */
86
+ minStrikeCount?: number
85
87
  /** If specified, only subjects with the given age assurance state will be returned. */
86
88
  ageAssuranceState?:
87
89
  | 'pending'