@atproto/pds 0.4.156 → 0.4.158

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 (62) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/lexicon/index.d.ts +15 -0
  3. package/dist/lexicon/index.d.ts.map +1 -1
  4. package/dist/lexicon/index.js +40 -1
  5. package/dist/lexicon/index.js.map +1 -1
  6. package/dist/lexicon/lexicons.d.ts +3427 -2489
  7. package/dist/lexicon/lexicons.d.ts.map +1 -1
  8. package/dist/lexicon/lexicons.js +499 -0
  9. package/dist/lexicon/lexicons.js.map +1 -1
  10. package/dist/lexicon/types/com/atproto/moderation/createReport.d.ts +14 -0
  11. package/dist/lexicon/types/com/atproto/moderation/createReport.d.ts.map +1 -1
  12. package/dist/lexicon/types/com/atproto/moderation/createReport.js +9 -0
  13. package/dist/lexicon/types/com/atproto/moderation/createReport.js.map +1 -1
  14. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +14 -0
  15. package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
  16. package/dist/lexicon/types/tools/ozone/moderation/defs.js +9 -0
  17. package/dist/lexicon/types/tools/ozone/moderation/defs.js.map +1 -1
  18. package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +1 -0
  19. package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
  20. package/dist/lexicon/types/tools/ozone/moderation/queryEvents.d.ts +2 -0
  21. package/dist/lexicon/types/tools/ozone/moderation/queryEvents.d.ts.map +1 -1
  22. package/dist/lexicon/types/tools/ozone/safelink/addRule.d.ts +47 -0
  23. package/dist/lexicon/types/tools/ozone/safelink/addRule.d.ts.map +1 -0
  24. package/dist/lexicon/types/tools/ozone/safelink/addRule.js +7 -0
  25. package/dist/lexicon/types/tools/ozone/safelink/addRule.js.map +1 -0
  26. package/dist/lexicon/types/tools/ozone/safelink/defs.d.ts +47 -0
  27. package/dist/lexicon/types/tools/ozone/safelink/defs.d.ts.map +1 -0
  28. package/dist/lexicon/types/tools/ozone/safelink/defs.js +25 -0
  29. package/dist/lexicon/types/tools/ozone/safelink/defs.js.map +1 -0
  30. package/dist/lexicon/types/tools/ozone/safelink/queryEvents.d.ts +51 -0
  31. package/dist/lexicon/types/tools/ozone/safelink/queryEvents.d.ts.map +1 -0
  32. package/dist/lexicon/types/tools/ozone/safelink/queryEvents.js +7 -0
  33. package/dist/lexicon/types/tools/ozone/safelink/queryEvents.js.map +1 -0
  34. package/dist/lexicon/types/tools/ozone/safelink/queryRules.d.ts +57 -0
  35. package/dist/lexicon/types/tools/ozone/safelink/queryRules.d.ts.map +1 -0
  36. package/dist/lexicon/types/tools/ozone/safelink/queryRules.js +7 -0
  37. package/dist/lexicon/types/tools/ozone/safelink/queryRules.js.map +1 -0
  38. package/dist/lexicon/types/tools/ozone/safelink/removeRule.d.ts +45 -0
  39. package/dist/lexicon/types/tools/ozone/safelink/removeRule.d.ts.map +1 -0
  40. package/dist/lexicon/types/tools/ozone/safelink/removeRule.js +7 -0
  41. package/dist/lexicon/types/tools/ozone/safelink/removeRule.js.map +1 -0
  42. package/dist/lexicon/types/tools/ozone/safelink/updateRule.d.ts +47 -0
  43. package/dist/lexicon/types/tools/ozone/safelink/updateRule.d.ts.map +1 -0
  44. package/dist/lexicon/types/tools/ozone/safelink/updateRule.js +7 -0
  45. package/dist/lexicon/types/tools/ozone/safelink/updateRule.js.map +1 -0
  46. package/dist/pipethrough.js +5 -0
  47. package/dist/pipethrough.js.map +1 -1
  48. package/package.json +5 -5
  49. package/src/lexicon/index.ts +70 -0
  50. package/src/lexicon/lexicons.ts +509 -0
  51. package/src/lexicon/types/com/atproto/moderation/createReport.ts +20 -0
  52. package/src/lexicon/types/tools/ozone/moderation/defs.ts +21 -0
  53. package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +1 -0
  54. package/src/lexicon/types/tools/ozone/moderation/queryEvents.ts +2 -0
  55. package/src/lexicon/types/tools/ozone/safelink/addRule.ts +64 -0
  56. package/src/lexicon/types/tools/ozone/safelink/defs.ts +76 -0
  57. package/src/lexicon/types/tools/ozone/safelink/queryEvents.ts +68 -0
  58. package/src/lexicon/types/tools/ozone/safelink/queryRules.ts +74 -0
  59. package/src/lexicon/types/tools/ozone/safelink/removeRule.ts +62 -0
  60. package/src/lexicon/types/tools/ozone/safelink/updateRule.ts +64 -0
  61. package/src/pipethrough.ts +5 -0
  62. package/tsconfig.build.tsbuildinfo +1 -1
@@ -1389,6 +1389,10 @@ export const schemaDict = {
1389
1389
  'lex:com.atproto.repo.strongRef',
1390
1390
  ],
1391
1391
  },
1392
+ modTool: {
1393
+ type: 'ref',
1394
+ ref: 'lex:com.atproto.moderation.createReport#modTool',
1395
+ },
1392
1396
  },
1393
1397
  },
1394
1398
  },
@@ -1435,6 +1439,23 @@ export const schemaDict = {
1435
1439
  },
1436
1440
  },
1437
1441
  },
1442
+ modTool: {
1443
+ type: 'object',
1444
+ description:
1445
+ 'Moderation tool information for tracing the source of the action',
1446
+ required: ['name'],
1447
+ properties: {
1448
+ name: {
1449
+ type: 'string',
1450
+ description:
1451
+ "Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome')",
1452
+ },
1453
+ meta: {
1454
+ type: 'unknown',
1455
+ description: 'Additional arbitrary metadata about the source',
1456
+ },
1457
+ },
1458
+ },
1438
1459
  },
1439
1460
  },
1440
1461
  ComAtprotoModerationDefs: {
@@ -13541,6 +13562,10 @@ export const schemaDict = {
13541
13562
  subjectHandle: {
13542
13563
  type: 'string',
13543
13564
  },
13565
+ modTool: {
13566
+ type: 'ref',
13567
+ ref: 'lex:tools.ozone.moderation.defs#modTool',
13568
+ },
13544
13569
  },
13545
13570
  },
13546
13571
  modEventViewDetail: {
@@ -13605,6 +13630,10 @@ export const schemaDict = {
13605
13630
  type: 'string',
13606
13631
  format: 'datetime',
13607
13632
  },
13633
+ modTool: {
13634
+ type: 'ref',
13635
+ ref: 'lex:tools.ozone.moderation.defs#modTool',
13636
+ },
13608
13637
  },
13609
13638
  },
13610
13639
  subjectStatusView: {
@@ -14621,6 +14650,23 @@ export const schemaDict = {
14621
14650
  },
14622
14651
  },
14623
14652
  },
14653
+ modTool: {
14654
+ type: 'object',
14655
+ description:
14656
+ 'Moderation tool information for tracing the source of the action',
14657
+ required: ['name'],
14658
+ properties: {
14659
+ name: {
14660
+ type: 'string',
14661
+ description:
14662
+ "Name/identifier of the source (e.g., 'automod', 'ozone/workspace')",
14663
+ },
14664
+ meta: {
14665
+ type: 'unknown',
14666
+ description: 'Additional arbitrary metadata about the source',
14667
+ },
14668
+ },
14669
+ },
14624
14670
  },
14625
14671
  },
14626
14672
  ToolsOzoneModerationEmitEvent: {
@@ -14678,6 +14724,10 @@ export const schemaDict = {
14678
14724
  type: 'string',
14679
14725
  format: 'did',
14680
14726
  },
14727
+ modTool: {
14728
+ type: 'ref',
14729
+ ref: 'lex:tools.ozone.moderation.defs#modTool',
14730
+ },
14681
14731
  },
14682
14732
  },
14683
14733
  },
@@ -15082,6 +15132,14 @@ export const schemaDict = {
15082
15132
  'If specified, only events where the action policies match any of the given policies are returned',
15083
15133
  },
15084
15134
  },
15135
+ modTool: {
15136
+ type: 'array',
15137
+ items: {
15138
+ type: 'string',
15139
+ },
15140
+ description:
15141
+ 'If specified, only events where the modTool name matches any of the given values are returned',
15142
+ },
15085
15143
  cursor: {
15086
15144
  type: 'string',
15087
15145
  },
@@ -15386,6 +15444,451 @@ export const schemaDict = {
15386
15444
  },
15387
15445
  },
15388
15446
  },
15447
+ ToolsOzoneSafelinkAddRule: {
15448
+ lexicon: 1,
15449
+ id: 'tools.ozone.safelink.addRule',
15450
+ defs: {
15451
+ main: {
15452
+ type: 'procedure',
15453
+ description: 'Add a new URL safety rule',
15454
+ input: {
15455
+ encoding: 'application/json',
15456
+ schema: {
15457
+ type: 'object',
15458
+ required: ['url', 'pattern', 'action', 'reason'],
15459
+ properties: {
15460
+ url: {
15461
+ type: 'string',
15462
+ description: 'The URL or domain to apply the rule to',
15463
+ },
15464
+ pattern: {
15465
+ type: 'ref',
15466
+ ref: 'lex:tools.ozone.safelink.defs#patternType',
15467
+ },
15468
+ action: {
15469
+ type: 'ref',
15470
+ ref: 'lex:tools.ozone.safelink.defs#actionType',
15471
+ },
15472
+ reason: {
15473
+ type: 'ref',
15474
+ ref: 'lex:tools.ozone.safelink.defs#reasonType',
15475
+ },
15476
+ comment: {
15477
+ type: 'string',
15478
+ description: 'Optional comment about the decision',
15479
+ },
15480
+ createdBy: {
15481
+ type: 'string',
15482
+ format: 'did',
15483
+ description: 'Author DID. Only respected when using admin auth',
15484
+ },
15485
+ },
15486
+ },
15487
+ },
15488
+ output: {
15489
+ encoding: 'application/json',
15490
+ schema: {
15491
+ type: 'ref',
15492
+ ref: 'lex:tools.ozone.safelink.defs#event',
15493
+ },
15494
+ },
15495
+ errors: [
15496
+ {
15497
+ name: 'InvalidUrl',
15498
+ description: 'The provided URL is invalid',
15499
+ },
15500
+ {
15501
+ name: 'RuleAlreadyExists',
15502
+ description: 'A rule for this URL/domain already exists',
15503
+ },
15504
+ ],
15505
+ },
15506
+ },
15507
+ },
15508
+ ToolsOzoneSafelinkDefs: {
15509
+ lexicon: 1,
15510
+ id: 'tools.ozone.safelink.defs',
15511
+ defs: {
15512
+ event: {
15513
+ type: 'object',
15514
+ description: 'An event for URL safety decisions',
15515
+ required: [
15516
+ 'id',
15517
+ 'eventType',
15518
+ 'url',
15519
+ 'pattern',
15520
+ 'action',
15521
+ 'reason',
15522
+ 'createdBy',
15523
+ 'createdAt',
15524
+ ],
15525
+ properties: {
15526
+ id: {
15527
+ type: 'integer',
15528
+ description: 'Auto-incrementing row ID',
15529
+ },
15530
+ eventType: {
15531
+ type: 'ref',
15532
+ ref: 'lex:tools.ozone.safelink.defs#eventType',
15533
+ },
15534
+ url: {
15535
+ type: 'string',
15536
+ description: 'The URL that this rule applies to',
15537
+ },
15538
+ pattern: {
15539
+ type: 'ref',
15540
+ ref: 'lex:tools.ozone.safelink.defs#patternType',
15541
+ },
15542
+ action: {
15543
+ type: 'ref',
15544
+ ref: 'lex:tools.ozone.safelink.defs#actionType',
15545
+ },
15546
+ reason: {
15547
+ type: 'ref',
15548
+ ref: 'lex:tools.ozone.safelink.defs#reasonType',
15549
+ },
15550
+ createdBy: {
15551
+ type: 'string',
15552
+ format: 'did',
15553
+ description: 'DID of the user who created this rule',
15554
+ },
15555
+ createdAt: {
15556
+ type: 'string',
15557
+ format: 'datetime',
15558
+ },
15559
+ comment: {
15560
+ type: 'string',
15561
+ description: 'Optional comment about the decision',
15562
+ },
15563
+ },
15564
+ },
15565
+ eventType: {
15566
+ type: 'string',
15567
+ knownValues: ['addRule', 'updateRule', 'removeRule'],
15568
+ },
15569
+ patternType: {
15570
+ type: 'string',
15571
+ knownValues: ['domain', 'url'],
15572
+ },
15573
+ actionType: {
15574
+ type: 'string',
15575
+ knownValues: ['block', 'warn', 'whitelist'],
15576
+ },
15577
+ reasonType: {
15578
+ type: 'string',
15579
+ knownValues: ['csam', 'spam', 'phishing', 'none'],
15580
+ },
15581
+ urlRule: {
15582
+ type: 'object',
15583
+ description: 'Input for creating a URL safety rule',
15584
+ required: [
15585
+ 'url',
15586
+ 'pattern',
15587
+ 'action',
15588
+ 'reason',
15589
+ 'createdBy',
15590
+ 'createdAt',
15591
+ 'updatedAt',
15592
+ ],
15593
+ properties: {
15594
+ url: {
15595
+ type: 'string',
15596
+ description: 'The URL or domain to apply the rule to',
15597
+ },
15598
+ pattern: {
15599
+ type: 'ref',
15600
+ ref: 'lex:tools.ozone.safelink.defs#patternType',
15601
+ },
15602
+ action: {
15603
+ type: 'ref',
15604
+ ref: 'lex:tools.ozone.safelink.defs#actionType',
15605
+ },
15606
+ reason: {
15607
+ type: 'ref',
15608
+ ref: 'lex:tools.ozone.safelink.defs#reasonType',
15609
+ },
15610
+ comment: {
15611
+ type: 'string',
15612
+ description: 'Optional comment about the decision',
15613
+ },
15614
+ createdBy: {
15615
+ type: 'string',
15616
+ format: 'did',
15617
+ description: 'DID of the user added the rule.',
15618
+ },
15619
+ createdAt: {
15620
+ type: 'string',
15621
+ format: 'datetime',
15622
+ description: 'Timestamp when the rule was created',
15623
+ },
15624
+ updatedAt: {
15625
+ type: 'string',
15626
+ format: 'datetime',
15627
+ description: 'Timestamp when the rule was last updated',
15628
+ },
15629
+ },
15630
+ },
15631
+ },
15632
+ },
15633
+ ToolsOzoneSafelinkQueryEvents: {
15634
+ lexicon: 1,
15635
+ id: 'tools.ozone.safelink.queryEvents',
15636
+ defs: {
15637
+ main: {
15638
+ type: 'procedure',
15639
+ description: 'Query URL safety audit events',
15640
+ input: {
15641
+ encoding: 'application/json',
15642
+ schema: {
15643
+ type: 'object',
15644
+ properties: {
15645
+ cursor: {
15646
+ type: 'string',
15647
+ description: 'Cursor for pagination',
15648
+ },
15649
+ limit: {
15650
+ type: 'integer',
15651
+ minimum: 1,
15652
+ maximum: 100,
15653
+ default: 50,
15654
+ description: 'Maximum number of results to return',
15655
+ },
15656
+ urls: {
15657
+ type: 'array',
15658
+ items: {
15659
+ type: 'string',
15660
+ },
15661
+ description: 'Filter by specific URLs or domains',
15662
+ },
15663
+ patternType: {
15664
+ type: 'string',
15665
+ description: 'Filter by pattern type',
15666
+ },
15667
+ sortDirection: {
15668
+ type: 'string',
15669
+ knownValues: ['asc', 'desc'],
15670
+ default: 'desc',
15671
+ description: 'Sort direction',
15672
+ },
15673
+ },
15674
+ },
15675
+ },
15676
+ output: {
15677
+ encoding: 'application/json',
15678
+ schema: {
15679
+ type: 'object',
15680
+ required: ['events'],
15681
+ properties: {
15682
+ cursor: {
15683
+ type: 'string',
15684
+ description:
15685
+ 'Next cursor for pagination. Only present if there are more results.',
15686
+ },
15687
+ events: {
15688
+ type: 'array',
15689
+ items: {
15690
+ type: 'ref',
15691
+ ref: 'lex:tools.ozone.safelink.defs#event',
15692
+ },
15693
+ },
15694
+ },
15695
+ },
15696
+ },
15697
+ },
15698
+ },
15699
+ },
15700
+ ToolsOzoneSafelinkQueryRules: {
15701
+ lexicon: 1,
15702
+ id: 'tools.ozone.safelink.queryRules',
15703
+ defs: {
15704
+ main: {
15705
+ type: 'procedure',
15706
+ description: 'Query URL safety rules',
15707
+ input: {
15708
+ encoding: 'application/json',
15709
+ schema: {
15710
+ type: 'object',
15711
+ properties: {
15712
+ cursor: {
15713
+ type: 'string',
15714
+ description: 'Cursor for pagination',
15715
+ },
15716
+ limit: {
15717
+ type: 'integer',
15718
+ minimum: 1,
15719
+ maximum: 100,
15720
+ default: 50,
15721
+ description: 'Maximum number of results to return',
15722
+ },
15723
+ urls: {
15724
+ type: 'array',
15725
+ items: {
15726
+ type: 'string',
15727
+ },
15728
+ description: 'Filter by specific URLs or domains',
15729
+ },
15730
+ patternType: {
15731
+ type: 'string',
15732
+ description: 'Filter by pattern type',
15733
+ },
15734
+ actions: {
15735
+ type: 'array',
15736
+ items: {
15737
+ type: 'string',
15738
+ },
15739
+ description: 'Filter by action types',
15740
+ },
15741
+ reason: {
15742
+ type: 'string',
15743
+ description: 'Filter by reason type',
15744
+ },
15745
+ createdBy: {
15746
+ type: 'string',
15747
+ format: 'did',
15748
+ description: 'Filter by rule creator',
15749
+ },
15750
+ sortDirection: {
15751
+ type: 'string',
15752
+ knownValues: ['asc', 'desc'],
15753
+ default: 'desc',
15754
+ description: 'Sort direction',
15755
+ },
15756
+ },
15757
+ },
15758
+ },
15759
+ output: {
15760
+ encoding: 'application/json',
15761
+ schema: {
15762
+ type: 'object',
15763
+ required: ['rules'],
15764
+ properties: {
15765
+ cursor: {
15766
+ type: 'string',
15767
+ description:
15768
+ 'Next cursor for pagination. Only present if there are more results.',
15769
+ },
15770
+ rules: {
15771
+ type: 'array',
15772
+ items: {
15773
+ type: 'ref',
15774
+ ref: 'lex:tools.ozone.safelink.defs#urlRule',
15775
+ },
15776
+ },
15777
+ },
15778
+ },
15779
+ },
15780
+ },
15781
+ },
15782
+ },
15783
+ ToolsOzoneSafelinkRemoveRule: {
15784
+ lexicon: 1,
15785
+ id: 'tools.ozone.safelink.removeRule',
15786
+ defs: {
15787
+ main: {
15788
+ type: 'procedure',
15789
+ description: 'Remove an existing URL safety rule',
15790
+ input: {
15791
+ encoding: 'application/json',
15792
+ schema: {
15793
+ type: 'object',
15794
+ required: ['url', 'pattern'],
15795
+ properties: {
15796
+ url: {
15797
+ type: 'string',
15798
+ description: 'The URL or domain to remove the rule for',
15799
+ },
15800
+ pattern: {
15801
+ type: 'ref',
15802
+ ref: 'lex:tools.ozone.safelink.defs#patternType',
15803
+ },
15804
+ comment: {
15805
+ type: 'string',
15806
+ description:
15807
+ 'Optional comment about why the rule is being removed',
15808
+ },
15809
+ createdBy: {
15810
+ type: 'string',
15811
+ format: 'did',
15812
+ description:
15813
+ 'Optional DID of the user. Only respected when using admin auth.',
15814
+ },
15815
+ },
15816
+ },
15817
+ },
15818
+ output: {
15819
+ encoding: 'application/json',
15820
+ schema: {
15821
+ type: 'ref',
15822
+ ref: 'lex:tools.ozone.safelink.defs#event',
15823
+ },
15824
+ },
15825
+ errors: [
15826
+ {
15827
+ name: 'RuleNotFound',
15828
+ description: 'No active rule found for this URL/domain',
15829
+ },
15830
+ ],
15831
+ },
15832
+ },
15833
+ },
15834
+ ToolsOzoneSafelinkUpdateRule: {
15835
+ lexicon: 1,
15836
+ id: 'tools.ozone.safelink.updateRule',
15837
+ defs: {
15838
+ main: {
15839
+ type: 'procedure',
15840
+ description: 'Update an existing URL safety rule',
15841
+ input: {
15842
+ encoding: 'application/json',
15843
+ schema: {
15844
+ type: 'object',
15845
+ required: ['url', 'pattern', 'action', 'reason'],
15846
+ properties: {
15847
+ url: {
15848
+ type: 'string',
15849
+ description: 'The URL or domain to update the rule for',
15850
+ },
15851
+ pattern: {
15852
+ type: 'ref',
15853
+ ref: 'lex:tools.ozone.safelink.defs#patternType',
15854
+ },
15855
+ action: {
15856
+ type: 'ref',
15857
+ ref: 'lex:tools.ozone.safelink.defs#actionType',
15858
+ },
15859
+ reason: {
15860
+ type: 'ref',
15861
+ ref: 'lex:tools.ozone.safelink.defs#reasonType',
15862
+ },
15863
+ comment: {
15864
+ type: 'string',
15865
+ description: 'Optional comment about the update',
15866
+ },
15867
+ createdBy: {
15868
+ type: 'string',
15869
+ format: 'did',
15870
+ description:
15871
+ 'Optional DID to credit as the creator. Only respected for admin_token authentication.',
15872
+ },
15873
+ },
15874
+ },
15875
+ },
15876
+ output: {
15877
+ encoding: 'application/json',
15878
+ schema: {
15879
+ type: 'ref',
15880
+ ref: 'lex:tools.ozone.safelink.defs#event',
15881
+ },
15882
+ },
15883
+ errors: [
15884
+ {
15885
+ name: 'RuleNotFound',
15886
+ description: 'No active rule found for this URL/domain',
15887
+ },
15888
+ ],
15889
+ },
15890
+ },
15891
+ },
15389
15892
  ToolsOzoneServerGetConfig: {
15390
15893
  lexicon: 1,
15391
15894
  id: 'tools.ozone.server.getConfig',
@@ -17041,6 +17544,12 @@ export const ids = {
17041
17544
  ToolsOzoneModerationQueryEvents: 'tools.ozone.moderation.queryEvents',
17042
17545
  ToolsOzoneModerationQueryStatuses: 'tools.ozone.moderation.queryStatuses',
17043
17546
  ToolsOzoneModerationSearchRepos: 'tools.ozone.moderation.searchRepos',
17547
+ ToolsOzoneSafelinkAddRule: 'tools.ozone.safelink.addRule',
17548
+ ToolsOzoneSafelinkDefs: 'tools.ozone.safelink.defs',
17549
+ ToolsOzoneSafelinkQueryEvents: 'tools.ozone.safelink.queryEvents',
17550
+ ToolsOzoneSafelinkQueryRules: 'tools.ozone.safelink.queryRules',
17551
+ ToolsOzoneSafelinkRemoveRule: 'tools.ozone.safelink.removeRule',
17552
+ ToolsOzoneSafelinkUpdateRule: 'tools.ozone.safelink.updateRule',
17044
17553
  ToolsOzoneServerGetConfig: 'tools.ozone.server.getConfig',
17045
17554
  ToolsOzoneSetAddValues: 'tools.ozone.set.addValues',
17046
17555
  ToolsOzoneSetDefs: 'tools.ozone.set.defs',
@@ -29,6 +29,7 @@ export interface InputSchema {
29
29
  | $Typed<ComAtprotoAdminDefs.RepoRef>
30
30
  | $Typed<ComAtprotoRepoStrongRef.Main>
31
31
  | { $type: string }
32
+ modTool?: ModTool
32
33
  }
33
34
 
34
35
  export interface OutputSchema {
@@ -71,3 +72,22 @@ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
71
72
  export type Handler<HA extends HandlerAuth = never> = (
72
73
  ctx: HandlerReqCtx<HA>,
73
74
  ) => Promise<HandlerOutput> | HandlerOutput
75
+
76
+ /** Moderation tool information for tracing the source of the action */
77
+ export interface ModTool {
78
+ $type?: 'com.atproto.moderation.createReport#modTool'
79
+ /** Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome') */
80
+ name: string
81
+ /** Additional arbitrary metadata about the source */
82
+ meta?: { [_ in string]: unknown }
83
+ }
84
+
85
+ const hashModTool = 'modTool'
86
+
87
+ export function isModTool<V>(v: V) {
88
+ return is$typed(v, id, hashModTool)
89
+ }
90
+
91
+ export function validateModTool<V>(v: V) {
92
+ return validate<ModTool & V>(v, id, hashModTool)
93
+ }
@@ -54,6 +54,7 @@ export interface ModEventView {
54
54
  createdAt: string
55
55
  creatorHandle?: string
56
56
  subjectHandle?: string
57
+ modTool?: ModTool
57
58
  }
58
59
 
59
60
  const hashModEventView = 'modEventView'
@@ -99,6 +100,7 @@ export interface ModEventViewDetail {
99
100
  subjectBlobs: BlobView[]
100
101
  createdBy: string
101
102
  createdAt: string
103
+ modTool?: ModTool
102
104
  }
103
105
 
104
106
  const hashModEventViewDetail = 'modEventViewDetail'
@@ -893,3 +895,22 @@ export function isReporterStats<V>(v: V) {
893
895
  export function validateReporterStats<V>(v: V) {
894
896
  return validate<ReporterStats & V>(v, id, hashReporterStats)
895
897
  }
898
+
899
+ /** Moderation tool information for tracing the source of the action */
900
+ export interface ModTool {
901
+ $type?: 'tools.ozone.moderation.defs#modTool'
902
+ /** Name/identifier of the source (e.g., 'automod', 'ozone/workspace') */
903
+ name: string
904
+ /** Additional arbitrary metadata about the source */
905
+ meta?: { [_ in string]: unknown }
906
+ }
907
+
908
+ const hashModTool = 'modTool'
909
+
910
+ export function isModTool<V>(v: V) {
911
+ return is$typed(v, id, hashModTool)
912
+ }
913
+
914
+ export function validateModTool<V>(v: V) {
915
+ return validate<ModTool & V>(v, id, hashModTool)
916
+ }
@@ -49,6 +49,7 @@ export interface InputSchema {
49
49
  | { $type: string }
50
50
  subjectBlobCids?: string[]
51
51
  createdBy: string
52
+ modTool?: ToolsOzoneModerationDefs.ModTool
52
53
  }
53
54
 
54
55
  export type OutputSchema = ToolsOzoneModerationDefs.ModEventView
@@ -49,6 +49,8 @@ export interface QueryParams {
49
49
  removedTags?: string[]
50
50
  reportTypes?: string[]
51
51
  policies?: string[]
52
+ /** If specified, only events where the modTool name matches any of the given values are returned */
53
+ modTool?: string[]
52
54
  cursor?: string
53
55
  }
54
56