@atproto/pds 0.4.187 → 0.4.189

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.
@@ -14630,6 +14630,12 @@ export const schemaDict = {
14630
14630
  type: 'ref',
14631
14631
  ref: 'lex:tools.ozone.moderation.defs#recordsStats',
14632
14632
  },
14633
+ accountStrike: {
14634
+ description:
14635
+ 'Strike information for the account (account-level only)',
14636
+ type: 'ref',
14637
+ ref: 'lex:tools.ozone.moderation.defs#accountStrike',
14638
+ },
14633
14639
  ageAssuranceState: {
14634
14640
  type: 'string',
14635
14641
  description: 'Current age assurance state of the subject.',
@@ -14742,6 +14748,32 @@ export const schemaDict = {
14742
14748
  },
14743
14749
  },
14744
14750
  },
14751
+ accountStrike: {
14752
+ description: 'Strike information for an account',
14753
+ type: 'object',
14754
+ properties: {
14755
+ activeStrikeCount: {
14756
+ description:
14757
+ 'Current number of active strikes (excluding expired strikes)',
14758
+ type: 'integer',
14759
+ },
14760
+ totalStrikeCount: {
14761
+ description:
14762
+ 'Total number of strikes ever received (including expired strikes)',
14763
+ type: 'integer',
14764
+ },
14765
+ firstStrikeAt: {
14766
+ description: 'Timestamp of the first strike received',
14767
+ type: 'string',
14768
+ format: 'datetime',
14769
+ },
14770
+ lastStrikeAt: {
14771
+ description: 'Timestamp of the most recent strike received',
14772
+ type: 'string',
14773
+ format: 'datetime',
14774
+ },
14775
+ },
14776
+ },
14745
14777
  subjectReviewState: {
14746
14778
  type: 'string',
14747
14779
  knownValues: [
@@ -14797,6 +14829,22 @@ export const schemaDict = {
14797
14829
  description:
14798
14830
  'Names/Keywords of the policies that drove the decision.',
14799
14831
  },
14832
+ severityLevel: {
14833
+ type: 'string',
14834
+ description:
14835
+ "Severity level of the violation (e.g., 'sev-0', 'sev-1', 'sev-2', etc.).",
14836
+ },
14837
+ strikeCount: {
14838
+ type: 'integer',
14839
+ description:
14840
+ 'Number of strikes to assign to the user for this violation.',
14841
+ },
14842
+ strikeExpiresAt: {
14843
+ type: 'string',
14844
+ format: 'datetime',
14845
+ description:
14846
+ 'When the strike should expire. If not provided, the strike never expires.',
14847
+ },
14800
14848
  },
14801
14849
  },
14802
14850
  modEventReverseTakedown: {
@@ -14807,6 +14855,25 @@ export const schemaDict = {
14807
14855
  type: 'string',
14808
14856
  description: 'Describe reasoning behind the reversal.',
14809
14857
  },
14858
+ policies: {
14859
+ type: 'array',
14860
+ maxLength: 5,
14861
+ items: {
14862
+ type: 'string',
14863
+ },
14864
+ description:
14865
+ 'Names/Keywords of the policy infraction for which takedown is being reversed.',
14866
+ },
14867
+ severityLevel: {
14868
+ type: 'string',
14869
+ description:
14870
+ "Severity level of the violation. Usually set from the last policy infraction's severity.",
14871
+ },
14872
+ strikeCount: {
14873
+ type: 'integer',
14874
+ description:
14875
+ "Number of strikes to subtract from the user's strike count. Usually set from the last policy infraction's severity.",
14876
+ },
14810
14877
  },
14811
14878
  },
14812
14879
  modEventResolveAppeal: {
@@ -15050,6 +15117,31 @@ export const schemaDict = {
15050
15117
  type: 'string',
15051
15118
  description: 'Additional comment about the outgoing comm.',
15052
15119
  },
15120
+ policies: {
15121
+ type: 'array',
15122
+ maxLength: 5,
15123
+ items: {
15124
+ type: 'string',
15125
+ },
15126
+ description:
15127
+ 'Names/Keywords of the policies that necessitated the email.',
15128
+ },
15129
+ severityLevel: {
15130
+ type: 'string',
15131
+ description:
15132
+ "Severity level of the violation. Normally 'sev-1' that adds strike on repeat offense",
15133
+ },
15134
+ strikeCount: {
15135
+ type: 'integer',
15136
+ description:
15137
+ '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.',
15138
+ },
15139
+ strikeExpiresAt: {
15140
+ type: 'string',
15141
+ format: 'datetime',
15142
+ description:
15143
+ 'When the strike should expire. If not provided, the strike never expires.',
15144
+ },
15053
15145
  },
15054
15146
  },
15055
15147
  modEventDivert: {
@@ -16448,6 +16540,11 @@ export const schemaDict = {
16448
16540
  'blocked',
16449
16541
  ],
16450
16542
  },
16543
+ withStrike: {
16544
+ type: 'boolean',
16545
+ description:
16546
+ 'If specified, only events where strikeCount value is set are returned.',
16547
+ },
16451
16548
  cursor: {
16452
16549
  type: 'string',
16453
16550
  },
@@ -16678,6 +16775,12 @@ export const schemaDict = {
16678
16775
  description:
16679
16776
  'If specified, only subjects that have priority score value above the given value will be returned.',
16680
16777
  },
16778
+ minStrikeCount: {
16779
+ type: 'integer',
16780
+ minimum: 1,
16781
+ description:
16782
+ 'If specified, only subjects that belong to an account that has at least this many active strikes will be returned.',
16783
+ },
16681
16784
  ageAssuranceState: {
16682
16785
  type: 'string',
16683
16786
  description:
@@ -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'