@atproto/pds 0.4.69 → 0.4.70

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
  3. package/dist/api/app/bsky/feed/getPostThread.js +11 -6
  4. package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
  5. package/dist/config/config.d.ts +1 -0
  6. package/dist/config/config.d.ts.map +1 -1
  7. package/dist/config/config.js +3 -0
  8. package/dist/config/config.js.map +1 -1
  9. package/dist/config/env.d.ts +1 -0
  10. package/dist/config/env.d.ts.map +1 -1
  11. package/dist/config/env.js +1 -0
  12. package/dist/config/env.js.map +1 -1
  13. package/dist/context.d.ts +2 -2
  14. package/dist/context.d.ts.map +1 -1
  15. package/dist/context.js +8 -1
  16. package/dist/context.js.map +1 -1
  17. package/dist/lexicon/index.d.ts +11 -0
  18. package/dist/lexicon/index.d.ts.map +1 -1
  19. package/dist/lexicon/index.js +32 -1
  20. package/dist/lexicon/index.js.map +1 -1
  21. package/dist/lexicon/lexicons.d.ts +359 -0
  22. package/dist/lexicon/lexicons.d.ts.map +1 -1
  23. package/dist/lexicon/lexicons.js +402 -3
  24. package/dist/lexicon/lexicons.js.map +1 -1
  25. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +58 -2
  26. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
  27. package/dist/lexicon/types/tools/ozone/moderation/defs.js +50 -0
  28. package/dist/lexicon/types/tools/ozone/moderation/defs.js.map +1 -1
  29. package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +1 -1
  30. package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
  31. package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts +10 -0
  32. package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
  33. package/dist/lexicon/types/tools/ozone/setting/defs.d.ts +20 -0
  34. package/dist/lexicon/types/tools/ozone/setting/defs.d.ts.map +1 -0
  35. package/dist/lexicon/types/tools/ozone/setting/defs.js +15 -0
  36. package/dist/lexicon/types/tools/ozone/setting/defs.js.map +1 -0
  37. package/dist/lexicon/types/tools/ozone/setting/listOptions.d.ts +43 -0
  38. package/dist/lexicon/types/tools/ozone/setting/listOptions.d.ts.map +1 -0
  39. package/dist/lexicon/types/tools/ozone/setting/listOptions.js +3 -0
  40. package/dist/lexicon/types/tools/ozone/setting/listOptions.js.map +1 -0
  41. package/dist/lexicon/types/tools/ozone/setting/removeOptions.d.ts +40 -0
  42. package/dist/lexicon/types/tools/ozone/setting/removeOptions.d.ts.map +1 -0
  43. package/dist/lexicon/types/tools/ozone/setting/removeOptions.js +3 -0
  44. package/dist/lexicon/types/tools/ozone/setting/removeOptions.js.map +1 -0
  45. package/dist/lexicon/types/tools/ozone/setting/upsertOption.d.ts +45 -0
  46. package/dist/lexicon/types/tools/ozone/setting/upsertOption.d.ts.map +1 -0
  47. package/dist/lexicon/types/tools/ozone/setting/upsertOption.js +3 -0
  48. package/dist/lexicon/types/tools/ozone/setting/upsertOption.js.map +1 -0
  49. package/dist/pipethrough.d.ts +0 -1
  50. package/dist/pipethrough.d.ts.map +1 -1
  51. package/dist/pipethrough.js +11 -10
  52. package/dist/pipethrough.js.map +1 -1
  53. package/example.env +1 -1
  54. package/package.json +11 -11
  55. package/src/api/app/bsky/feed/getPostThread.ts +15 -4
  56. package/src/config/config.ts +5 -0
  57. package/src/config/env.ts +2 -0
  58. package/src/context.ts +11 -3
  59. package/src/lexicon/index.ts +46 -0
  60. package/src/lexicon/lexicons.ts +412 -3
  61. package/src/lexicon/types/tools/ozone/moderation/defs.ts +130 -0
  62. package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +3 -0
  63. package/src/lexicon/types/tools/ozone/moderation/queryStatuses.ts +10 -0
  64. package/src/lexicon/types/tools/ozone/setting/defs.ts +37 -0
  65. package/src/lexicon/types/tools/ozone/setting/listOptions.ts +53 -0
  66. package/src/lexicon/types/tools/ozone/setting/removeOptions.ts +49 -0
  67. package/src/lexicon/types/tools/ozone/setting/upsertOption.ts +58 -0
  68. package/src/pipethrough.ts +13 -12
  69. package/tests/proxied/__snapshots__/admin.test.ts.snap +12 -0
  70. package/tests/proxied/proxy-catchall.test.ts +1 -1
  71. package/tests/proxied/read-after-write.test.ts +20 -1
  72. package/tsconfig.build.tsbuildinfo +1 -1
@@ -1341,7 +1341,7 @@ export const schemaDict = {
1341
1341
  },
1342
1342
  rkey: {
1343
1343
  type: 'string',
1344
- maxLength: 15,
1344
+ maxLength: 512,
1345
1345
  },
1346
1346
  value: {
1347
1347
  type: 'unknown',
@@ -1450,7 +1450,7 @@ export const schemaDict = {
1450
1450
  rkey: {
1451
1451
  type: 'string',
1452
1452
  description: 'The Record Key.',
1453
- maxLength: 15,
1453
+ maxLength: 512,
1454
1454
  },
1455
1455
  validate: {
1456
1456
  type: 'boolean',
@@ -1901,7 +1901,7 @@ export const schemaDict = {
1901
1901
  rkey: {
1902
1902
  type: 'string',
1903
1903
  description: 'The Record Key.',
1904
- maxLength: 15,
1904
+ maxLength: 512,
1905
1905
  },
1906
1906
  validate: {
1907
1907
  type: 'boolean',
@@ -10821,6 +10821,9 @@ export const schemaDict = {
10821
10821
  'lex:tools.ozone.moderation.defs#modEventResolveAppeal',
10822
10822
  'lex:tools.ozone.moderation.defs#modEventDivert',
10823
10823
  'lex:tools.ozone.moderation.defs#modEventTag',
10824
+ 'lex:tools.ozone.moderation.defs#accountEvent',
10825
+ 'lex:tools.ozone.moderation.defs#identityEvent',
10826
+ 'lex:tools.ozone.moderation.defs#recordEvent',
10824
10827
  ],
10825
10828
  },
10826
10829
  subject: {
@@ -10885,6 +10888,9 @@ export const schemaDict = {
10885
10888
  'lex:tools.ozone.moderation.defs#modEventResolveAppeal',
10886
10889
  'lex:tools.ozone.moderation.defs#modEventDivert',
10887
10890
  'lex:tools.ozone.moderation.defs#modEventTag',
10891
+ 'lex:tools.ozone.moderation.defs#accountEvent',
10892
+ 'lex:tools.ozone.moderation.defs#identityEvent',
10893
+ 'lex:tools.ozone.moderation.defs#recordEvent',
10888
10894
  ],
10889
10895
  },
10890
10896
  subject: {
@@ -10927,6 +10933,13 @@ export const schemaDict = {
10927
10933
  'lex:com.atproto.repo.strongRef',
10928
10934
  ],
10929
10935
  },
10936
+ hosting: {
10937
+ type: 'union',
10938
+ refs: [
10939
+ 'lex:tools.ozone.moderation.defs#accountHosting',
10940
+ 'lex:tools.ozone.moderation.defs#recordHosting',
10941
+ ],
10942
+ },
10930
10943
  subjectBlobCids: {
10931
10944
  type: 'array',
10932
10945
  items: {
@@ -11246,6 +11259,86 @@ export const schemaDict = {
11246
11259
  },
11247
11260
  },
11248
11261
  },
11262
+ accountEvent: {
11263
+ type: 'object',
11264
+ description:
11265
+ 'Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.',
11266
+ required: ['timestamp', 'active'],
11267
+ properties: {
11268
+ comment: {
11269
+ type: 'string',
11270
+ },
11271
+ active: {
11272
+ type: 'boolean',
11273
+ description:
11274
+ 'Indicates that the account has a repository which can be fetched from the host that emitted this event.',
11275
+ },
11276
+ status: {
11277
+ type: 'string',
11278
+ knownValues: [
11279
+ 'unknown',
11280
+ 'deactivated',
11281
+ 'deleted',
11282
+ 'takendown',
11283
+ 'suspended',
11284
+ 'tombstoned',
11285
+ ],
11286
+ },
11287
+ timestamp: {
11288
+ type: 'string',
11289
+ format: 'datetime',
11290
+ },
11291
+ },
11292
+ },
11293
+ identityEvent: {
11294
+ type: 'object',
11295
+ description:
11296
+ 'Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.',
11297
+ required: ['timestamp'],
11298
+ properties: {
11299
+ comment: {
11300
+ type: 'string',
11301
+ },
11302
+ handle: {
11303
+ type: 'string',
11304
+ format: 'handle',
11305
+ },
11306
+ pdsHost: {
11307
+ type: 'string',
11308
+ format: 'uri',
11309
+ },
11310
+ tombstone: {
11311
+ type: 'boolean',
11312
+ },
11313
+ timestamp: {
11314
+ type: 'string',
11315
+ format: 'datetime',
11316
+ },
11317
+ },
11318
+ },
11319
+ recordEvent: {
11320
+ type: 'object',
11321
+ description:
11322
+ 'Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.',
11323
+ required: ['timestamp', 'op'],
11324
+ properties: {
11325
+ comment: {
11326
+ type: 'string',
11327
+ },
11328
+ op: {
11329
+ type: 'string',
11330
+ knownValues: ['create', 'update', 'delete'],
11331
+ },
11332
+ cid: {
11333
+ type: 'string',
11334
+ format: 'cid',
11335
+ },
11336
+ timestamp: {
11337
+ type: 'string',
11338
+ format: 'datetime',
11339
+ },
11340
+ },
11341
+ },
11249
11342
  repoView: {
11250
11343
  type: 'object',
11251
11344
  required: [
@@ -11571,6 +11664,64 @@ export const schemaDict = {
11571
11664
  },
11572
11665
  },
11573
11666
  },
11667
+ accountHosting: {
11668
+ type: 'object',
11669
+ required: ['status'],
11670
+ properties: {
11671
+ status: {
11672
+ type: 'string',
11673
+ knownValues: [
11674
+ 'takendown',
11675
+ 'suspended',
11676
+ 'deleted',
11677
+ 'deactivated',
11678
+ 'unknown',
11679
+ ],
11680
+ },
11681
+ updatedAt: {
11682
+ type: 'string',
11683
+ format: 'datetime',
11684
+ },
11685
+ createdAt: {
11686
+ type: 'string',
11687
+ format: 'datetime',
11688
+ },
11689
+ deletedAt: {
11690
+ type: 'string',
11691
+ format: 'datetime',
11692
+ },
11693
+ deactivatedAt: {
11694
+ type: 'string',
11695
+ format: 'datetime',
11696
+ },
11697
+ reactivatedAt: {
11698
+ type: 'string',
11699
+ format: 'datetime',
11700
+ },
11701
+ },
11702
+ },
11703
+ recordHosting: {
11704
+ type: 'object',
11705
+ required: ['status'],
11706
+ properties: {
11707
+ status: {
11708
+ type: 'string',
11709
+ knownValues: ['deleted', 'unknown'],
11710
+ },
11711
+ updatedAt: {
11712
+ type: 'string',
11713
+ format: 'datetime',
11714
+ },
11715
+ createdAt: {
11716
+ type: 'string',
11717
+ format: 'datetime',
11718
+ },
11719
+ deletedAt: {
11720
+ type: 'string',
11721
+ format: 'datetime',
11722
+ },
11723
+ },
11724
+ },
11574
11725
  },
11575
11726
  },
11576
11727
  ToolsOzoneModerationEmitEvent: {
@@ -11603,6 +11754,9 @@ export const schemaDict = {
11603
11754
  'lex:tools.ozone.moderation.defs#modEventResolveAppeal',
11604
11755
  'lex:tools.ozone.moderation.defs#modEventEmail',
11605
11756
  'lex:tools.ozone.moderation.defs#modEventTag',
11757
+ 'lex:tools.ozone.moderation.defs#accountEvent',
11758
+ 'lex:tools.ozone.moderation.defs#identityEvent',
11759
+ 'lex:tools.ozone.moderation.defs#recordEvent',
11606
11760
  ],
11607
11761
  },
11608
11762
  subject: {
@@ -12005,6 +12159,38 @@ export const schemaDict = {
12005
12159
  format: 'datetime',
12006
12160
  description: 'Search subjects reviewed after a given timestamp',
12007
12161
  },
12162
+ hostingDeletedAfter: {
12163
+ type: 'string',
12164
+ format: 'datetime',
12165
+ description:
12166
+ 'Search subjects where the associated record/account was deleted after a given timestamp',
12167
+ },
12168
+ hostingDeletedBefore: {
12169
+ type: 'string',
12170
+ format: 'datetime',
12171
+ description:
12172
+ 'Search subjects where the associated record/account was deleted before a given timestamp',
12173
+ },
12174
+ hostingUpdatedAfter: {
12175
+ type: 'string',
12176
+ format: 'datetime',
12177
+ description:
12178
+ 'Search subjects where the associated record/account was updated after a given timestamp',
12179
+ },
12180
+ hostingUpdatedBefore: {
12181
+ type: 'string',
12182
+ format: 'datetime',
12183
+ description:
12184
+ 'Search subjects where the associated record/account was updated before a given timestamp',
12185
+ },
12186
+ hostingStatuses: {
12187
+ type: 'array',
12188
+ items: {
12189
+ type: 'string',
12190
+ },
12191
+ description:
12192
+ 'Search subjects by the status of the associated record/account',
12193
+ },
12008
12194
  reviewedBefore: {
12009
12195
  type: 'string',
12010
12196
  format: 'datetime',
@@ -12520,6 +12706,225 @@ export const schemaDict = {
12520
12706
  },
12521
12707
  },
12522
12708
  },
12709
+ ToolsOzoneSettingDefs: {
12710
+ lexicon: 1,
12711
+ id: 'tools.ozone.setting.defs',
12712
+ defs: {
12713
+ option: {
12714
+ type: 'object',
12715
+ required: [
12716
+ 'key',
12717
+ 'value',
12718
+ 'did',
12719
+ 'scope',
12720
+ 'createdBy',
12721
+ 'lastUpdatedBy',
12722
+ ],
12723
+ properties: {
12724
+ key: {
12725
+ type: 'string',
12726
+ format: 'nsid',
12727
+ },
12728
+ did: {
12729
+ type: 'string',
12730
+ format: 'did',
12731
+ },
12732
+ value: {
12733
+ type: 'unknown',
12734
+ },
12735
+ description: {
12736
+ type: 'string',
12737
+ maxGraphemes: 1024,
12738
+ maxLength: 10240,
12739
+ },
12740
+ createdAt: {
12741
+ type: 'string',
12742
+ format: 'datetime',
12743
+ },
12744
+ updatedAt: {
12745
+ type: 'string',
12746
+ format: 'datetime',
12747
+ },
12748
+ managerRole: {
12749
+ type: 'string',
12750
+ knownValues: [
12751
+ 'tools.ozone.team.defs#roleModerator',
12752
+ 'tools.ozone.team.defs#roleTriage',
12753
+ 'tools.ozone.team.defs#roleAdmin',
12754
+ ],
12755
+ },
12756
+ scope: {
12757
+ type: 'string',
12758
+ knownValues: ['instance', 'personal'],
12759
+ },
12760
+ createdBy: {
12761
+ type: 'string',
12762
+ format: 'did',
12763
+ },
12764
+ lastUpdatedBy: {
12765
+ type: 'string',
12766
+ format: 'did',
12767
+ },
12768
+ },
12769
+ },
12770
+ },
12771
+ },
12772
+ ToolsOzoneSettingListOptions: {
12773
+ lexicon: 1,
12774
+ id: 'tools.ozone.setting.listOptions',
12775
+ defs: {
12776
+ main: {
12777
+ type: 'query',
12778
+ description: 'List settings with optional filtering',
12779
+ parameters: {
12780
+ type: 'params',
12781
+ properties: {
12782
+ limit: {
12783
+ type: 'integer',
12784
+ minimum: 1,
12785
+ maximum: 100,
12786
+ default: 50,
12787
+ },
12788
+ cursor: {
12789
+ type: 'string',
12790
+ },
12791
+ scope: {
12792
+ type: 'string',
12793
+ knownValues: ['instance', 'personal'],
12794
+ default: 'instance',
12795
+ },
12796
+ prefix: {
12797
+ type: 'string',
12798
+ description: 'Filter keys by prefix',
12799
+ },
12800
+ keys: {
12801
+ type: 'array',
12802
+ maxLength: 100,
12803
+ items: {
12804
+ type: 'string',
12805
+ format: 'nsid',
12806
+ },
12807
+ description:
12808
+ 'Filter for only the specified keys. Ignored if prefix is provided',
12809
+ },
12810
+ },
12811
+ },
12812
+ output: {
12813
+ encoding: 'application/json',
12814
+ schema: {
12815
+ type: 'object',
12816
+ required: ['options'],
12817
+ properties: {
12818
+ cursor: {
12819
+ type: 'string',
12820
+ },
12821
+ options: {
12822
+ type: 'array',
12823
+ items: {
12824
+ type: 'ref',
12825
+ ref: 'lex:tools.ozone.setting.defs#option',
12826
+ },
12827
+ },
12828
+ },
12829
+ },
12830
+ },
12831
+ },
12832
+ },
12833
+ },
12834
+ ToolsOzoneSettingRemoveOptions: {
12835
+ lexicon: 1,
12836
+ id: 'tools.ozone.setting.removeOptions',
12837
+ defs: {
12838
+ main: {
12839
+ type: 'procedure',
12840
+ description: 'Delete settings by key',
12841
+ input: {
12842
+ encoding: 'application/json',
12843
+ schema: {
12844
+ type: 'object',
12845
+ required: ['keys', 'scope'],
12846
+ properties: {
12847
+ keys: {
12848
+ type: 'array',
12849
+ minLength: 1,
12850
+ maxLength: 200,
12851
+ items: {
12852
+ type: 'string',
12853
+ format: 'nsid',
12854
+ },
12855
+ },
12856
+ scope: {
12857
+ type: 'string',
12858
+ knownValues: ['instance', 'personal'],
12859
+ },
12860
+ },
12861
+ },
12862
+ },
12863
+ output: {
12864
+ encoding: 'application/json',
12865
+ schema: {
12866
+ type: 'object',
12867
+ properties: {},
12868
+ },
12869
+ },
12870
+ },
12871
+ },
12872
+ },
12873
+ ToolsOzoneSettingUpsertOption: {
12874
+ lexicon: 1,
12875
+ id: 'tools.ozone.setting.upsertOption',
12876
+ defs: {
12877
+ main: {
12878
+ type: 'procedure',
12879
+ description: 'Create or update setting option',
12880
+ input: {
12881
+ encoding: 'application/json',
12882
+ schema: {
12883
+ type: 'object',
12884
+ required: ['key', 'scope', 'value'],
12885
+ properties: {
12886
+ key: {
12887
+ type: 'string',
12888
+ format: 'nsid',
12889
+ },
12890
+ scope: {
12891
+ type: 'string',
12892
+ knownValues: ['instance', 'personal'],
12893
+ },
12894
+ value: {
12895
+ type: 'unknown',
12896
+ },
12897
+ description: {
12898
+ type: 'string',
12899
+ maxLength: 2000,
12900
+ },
12901
+ managerRole: {
12902
+ type: 'string',
12903
+ knownValues: [
12904
+ 'tools.ozone.team.defs#roleModerator',
12905
+ 'tools.ozone.team.defs#roleTriage',
12906
+ 'tools.ozone.team.defs#roleAdmin',
12907
+ ],
12908
+ },
12909
+ },
12910
+ },
12911
+ },
12912
+ output: {
12913
+ encoding: 'application/json',
12914
+ schema: {
12915
+ type: 'object',
12916
+ required: ['option'],
12917
+ properties: {
12918
+ option: {
12919
+ type: 'ref',
12920
+ ref: 'lex:tools.ozone.setting.defs#option',
12921
+ },
12922
+ },
12923
+ },
12924
+ },
12925
+ },
12926
+ },
12927
+ },
12523
12928
  ToolsOzoneSignatureDefs: {
12524
12929
  lexicon: 1,
12525
12930
  id: 'tools.ozone.signature.defs',
@@ -13153,6 +13558,10 @@ export const ids = {
13153
13558
  ToolsOzoneSetGetValues: 'tools.ozone.set.getValues',
13154
13559
  ToolsOzoneSetQuerySets: 'tools.ozone.set.querySets',
13155
13560
  ToolsOzoneSetUpsertSet: 'tools.ozone.set.upsertSet',
13561
+ ToolsOzoneSettingDefs: 'tools.ozone.setting.defs',
13562
+ ToolsOzoneSettingListOptions: 'tools.ozone.setting.listOptions',
13563
+ ToolsOzoneSettingRemoveOptions: 'tools.ozone.setting.removeOptions',
13564
+ ToolsOzoneSettingUpsertOption: 'tools.ozone.setting.upsertOption',
13156
13565
  ToolsOzoneSignatureDefs: 'tools.ozone.signature.defs',
13157
13566
  ToolsOzoneSignatureFindCorrelation: 'tools.ozone.signature.findCorrelation',
13158
13567
  ToolsOzoneSignatureFindRelatedAccounts:
@@ -30,6 +30,9 @@ export interface ModEventView {
30
30
  | ModEventResolveAppeal
31
31
  | ModEventDivert
32
32
  | ModEventTag
33
+ | AccountEvent
34
+ | IdentityEvent
35
+ | RecordEvent
33
36
  | { $type: string; [k: string]: unknown }
34
37
  subject:
35
38
  | ComAtprotoAdminDefs.RepoRef
@@ -74,6 +77,9 @@ export interface ModEventViewDetail {
74
77
  | ModEventResolveAppeal
75
78
  | ModEventDivert
76
79
  | ModEventTag
80
+ | AccountEvent
81
+ | IdentityEvent
82
+ | RecordEvent
77
83
  | { $type: string; [k: string]: unknown }
78
84
  subject:
79
85
  | RepoView
@@ -105,6 +111,10 @@ export interface SubjectStatusView {
105
111
  | ComAtprotoAdminDefs.RepoRef
106
112
  | ComAtprotoRepoStrongRef.Main
107
113
  | { $type: string; [k: string]: unknown }
114
+ hosting?:
115
+ | AccountHosting
116
+ | RecordHosting
117
+ | { $type: string; [k: string]: unknown }
108
118
  subjectBlobCids?: string[]
109
119
  subjectRepoHandle?: string
110
120
  /** Timestamp referencing when the last update was made to the moderation status of the subject */
@@ -472,6 +482,78 @@ export function validateModEventTag(v: unknown): ValidationResult {
472
482
  return lexicons.validate('tools.ozone.moderation.defs#modEventTag', v)
473
483
  }
474
484
 
485
+ /** Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */
486
+ export interface AccountEvent {
487
+ comment?: string
488
+ /** Indicates that the account has a repository which can be fetched from the host that emitted this event. */
489
+ active: boolean
490
+ status?:
491
+ | 'unknown'
492
+ | 'deactivated'
493
+ | 'deleted'
494
+ | 'takendown'
495
+ | 'suspended'
496
+ | 'tombstoned'
497
+ | (string & {})
498
+ timestamp: string
499
+ [k: string]: unknown
500
+ }
501
+
502
+ export function isAccountEvent(v: unknown): v is AccountEvent {
503
+ return (
504
+ isObj(v) &&
505
+ hasProp(v, '$type') &&
506
+ v.$type === 'tools.ozone.moderation.defs#accountEvent'
507
+ )
508
+ }
509
+
510
+ export function validateAccountEvent(v: unknown): ValidationResult {
511
+ return lexicons.validate('tools.ozone.moderation.defs#accountEvent', v)
512
+ }
513
+
514
+ /** Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */
515
+ export interface IdentityEvent {
516
+ comment?: string
517
+ handle?: string
518
+ pdsHost?: string
519
+ tombstone?: boolean
520
+ timestamp: string
521
+ [k: string]: unknown
522
+ }
523
+
524
+ export function isIdentityEvent(v: unknown): v is IdentityEvent {
525
+ return (
526
+ isObj(v) &&
527
+ hasProp(v, '$type') &&
528
+ v.$type === 'tools.ozone.moderation.defs#identityEvent'
529
+ )
530
+ }
531
+
532
+ export function validateIdentityEvent(v: unknown): ValidationResult {
533
+ return lexicons.validate('tools.ozone.moderation.defs#identityEvent', v)
534
+ }
535
+
536
+ /** Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. */
537
+ export interface RecordEvent {
538
+ comment?: string
539
+ op: 'create' | 'update' | 'delete' | (string & {})
540
+ cid?: string
541
+ timestamp: string
542
+ [k: string]: unknown
543
+ }
544
+
545
+ export function isRecordEvent(v: unknown): v is RecordEvent {
546
+ return (
547
+ isObj(v) &&
548
+ hasProp(v, '$type') &&
549
+ v.$type === 'tools.ozone.moderation.defs#recordEvent'
550
+ )
551
+ }
552
+
553
+ export function validateRecordEvent(v: unknown): ValidationResult {
554
+ return lexicons.validate('tools.ozone.moderation.defs#recordEvent', v)
555
+ }
556
+
475
557
  export interface RepoView {
476
558
  did: string
477
559
  handle: string
@@ -705,3 +787,51 @@ export function isVideoDetails(v: unknown): v is VideoDetails {
705
787
  export function validateVideoDetails(v: unknown): ValidationResult {
706
788
  return lexicons.validate('tools.ozone.moderation.defs#videoDetails', v)
707
789
  }
790
+
791
+ export interface AccountHosting {
792
+ status:
793
+ | 'takendown'
794
+ | 'suspended'
795
+ | 'deleted'
796
+ | 'deactivated'
797
+ | 'unknown'
798
+ | (string & {})
799
+ updatedAt?: string
800
+ createdAt?: string
801
+ deletedAt?: string
802
+ deactivatedAt?: string
803
+ reactivatedAt?: string
804
+ [k: string]: unknown
805
+ }
806
+
807
+ export function isAccountHosting(v: unknown): v is AccountHosting {
808
+ return (
809
+ isObj(v) &&
810
+ hasProp(v, '$type') &&
811
+ v.$type === 'tools.ozone.moderation.defs#accountHosting'
812
+ )
813
+ }
814
+
815
+ export function validateAccountHosting(v: unknown): ValidationResult {
816
+ return lexicons.validate('tools.ozone.moderation.defs#accountHosting', v)
817
+ }
818
+
819
+ export interface RecordHosting {
820
+ status: 'deleted' | 'unknown' | (string & {})
821
+ updatedAt?: string
822
+ createdAt?: string
823
+ deletedAt?: string
824
+ [k: string]: unknown
825
+ }
826
+
827
+ export function isRecordHosting(v: unknown): v is RecordHosting {
828
+ return (
829
+ isObj(v) &&
830
+ hasProp(v, '$type') &&
831
+ v.$type === 'tools.ozone.moderation.defs#recordHosting'
832
+ )
833
+ }
834
+
835
+ export function validateRecordHosting(v: unknown): ValidationResult {
836
+ return lexicons.validate('tools.ozone.moderation.defs#recordHosting', v)
837
+ }
@@ -29,6 +29,9 @@ export interface InputSchema {
29
29
  | ToolsOzoneModerationDefs.ModEventResolveAppeal
30
30
  | ToolsOzoneModerationDefs.ModEventEmail
31
31
  | ToolsOzoneModerationDefs.ModEventTag
32
+ | ToolsOzoneModerationDefs.AccountEvent
33
+ | ToolsOzoneModerationDefs.IdentityEvent
34
+ | ToolsOzoneModerationDefs.RecordEvent
32
35
  | { $type: string; [k: string]: unknown }
33
36
  subject:
34
37
  | ComAtprotoAdminDefs.RepoRef
@@ -22,6 +22,16 @@ export interface QueryParams {
22
22
  reportedBefore?: string
23
23
  /** Search subjects reviewed after a given timestamp */
24
24
  reviewedAfter?: string
25
+ /** Search subjects where the associated record/account was deleted after a given timestamp */
26
+ hostingDeletedAfter?: string
27
+ /** Search subjects where the associated record/account was deleted before a given timestamp */
28
+ hostingDeletedBefore?: string
29
+ /** Search subjects where the associated record/account was updated after a given timestamp */
30
+ hostingUpdatedAfter?: string
31
+ /** Search subjects where the associated record/account was updated before a given timestamp */
32
+ hostingUpdatedBefore?: string
33
+ /** Search subjects by the status of the associated record/account */
34
+ hostingStatuses?: string[]
25
35
  /** Search subjects reviewed before a given timestamp */
26
36
  reviewedBefore?: string
27
37
  /** By default, we don't include muted subjects in the results. Set this to true to include them. */