@atproto/api 0.19.15 → 0.19.16

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 (128) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/client/index.d.ts +71 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +172 -3
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +17860 -14724
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +1753 -91
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts +16 -0
  11. package/dist/client/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
  12. package/dist/client/types/tools/ozone/moderation/emitEvent.js +9 -0
  13. package/dist/client/types/tools/ozone/moderation/emitEvent.js.map +1 -1
  14. package/dist/client/types/tools/ozone/queue/assignModerator.d.ts +29 -0
  15. package/dist/client/types/tools/ozone/queue/assignModerator.d.ts.map +1 -0
  16. package/dist/client/types/tools/ozone/queue/assignModerator.js +26 -0
  17. package/dist/client/types/tools/ozone/queue/assignModerator.js.map +1 -0
  18. package/dist/client/types/tools/ozone/queue/createQueue.d.ts +37 -0
  19. package/dist/client/types/tools/ozone/queue/createQueue.d.ts.map +1 -0
  20. package/dist/client/types/tools/ozone/queue/createQueue.js +26 -0
  21. package/dist/client/types/tools/ozone/queue/createQueue.js.map +1 -0
  22. package/dist/client/types/tools/ozone/queue/defs.d.ts +62 -0
  23. package/dist/client/types/tools/ozone/queue/defs.d.ts.map +1 -0
  24. package/dist/client/types/tools/ozone/queue/defs.js +34 -0
  25. package/dist/client/types/tools/ozone/queue/defs.js.map +1 -0
  26. package/dist/client/types/tools/ozone/queue/deleteQueue.d.ts +29 -0
  27. package/dist/client/types/tools/ozone/queue/deleteQueue.d.ts.map +1 -0
  28. package/dist/client/types/tools/ozone/queue/deleteQueue.js +11 -0
  29. package/dist/client/types/tools/ozone/queue/deleteQueue.js.map +1 -0
  30. package/dist/client/types/tools/ozone/queue/getAssignments.d.ts +31 -0
  31. package/dist/client/types/tools/ozone/queue/getAssignments.d.ts.map +1 -0
  32. package/dist/client/types/tools/ozone/queue/getAssignments.js +11 -0
  33. package/dist/client/types/tools/ozone/queue/getAssignments.js.map +1 -0
  34. package/dist/client/types/tools/ozone/queue/listQueues.d.ts +33 -0
  35. package/dist/client/types/tools/ozone/queue/listQueues.d.ts.map +1 -0
  36. package/dist/client/types/tools/ozone/queue/listQueues.js +11 -0
  37. package/dist/client/types/tools/ozone/queue/listQueues.js.map +1 -0
  38. package/dist/client/types/tools/ozone/queue/routeReports.d.ts +33 -0
  39. package/dist/client/types/tools/ozone/queue/routeReports.d.ts.map +1 -0
  40. package/dist/client/types/tools/ozone/queue/routeReports.js +26 -0
  41. package/dist/client/types/tools/ozone/queue/routeReports.js.map +1 -0
  42. package/dist/client/types/tools/ozone/queue/unassignModerator.d.ts +26 -0
  43. package/dist/client/types/tools/ozone/queue/unassignModerator.d.ts.map +1 -0
  44. package/dist/client/types/tools/ozone/queue/unassignModerator.js +26 -0
  45. package/dist/client/types/tools/ozone/queue/unassignModerator.js.map +1 -0
  46. package/dist/client/types/tools/ozone/queue/updateQueue.d.ts +32 -0
  47. package/dist/client/types/tools/ozone/queue/updateQueue.d.ts.map +1 -0
  48. package/dist/client/types/tools/ozone/queue/updateQueue.js +11 -0
  49. package/dist/client/types/tools/ozone/queue/updateQueue.js.map +1 -0
  50. package/dist/client/types/tools/ozone/report/assignModerator.d.ts +36 -0
  51. package/dist/client/types/tools/ozone/report/assignModerator.d.ts.map +1 -0
  52. package/dist/client/types/tools/ozone/report/assignModerator.js +34 -0
  53. package/dist/client/types/tools/ozone/report/assignModerator.js.map +1 -0
  54. package/dist/client/types/tools/ozone/report/createActivity.d.ts +45 -0
  55. package/dist/client/types/tools/ozone/report/createActivity.d.ts.map +1 -0
  56. package/dist/client/types/tools/ozone/report/createActivity.js +42 -0
  57. package/dist/client/types/tools/ozone/report/createActivity.js.map +1 -0
  58. package/dist/client/types/tools/ozone/report/defs.d.ts +185 -0
  59. package/dist/client/types/tools/ozone/report/defs.d.ts.map +1 -1
  60. package/dist/client/types/tools/ozone/report/defs.js +108 -0
  61. package/dist/client/types/tools/ozone/report/defs.js.map +1 -1
  62. package/dist/client/types/tools/ozone/report/getAssignments.d.ts +31 -0
  63. package/dist/client/types/tools/ozone/report/getAssignments.d.ts.map +1 -0
  64. package/dist/client/types/tools/ozone/report/getAssignments.js +11 -0
  65. package/dist/client/types/tools/ozone/report/getAssignments.js.map +1 -0
  66. package/dist/client/types/tools/ozone/report/getHistoricalStats.d.ts +37 -0
  67. package/dist/client/types/tools/ozone/report/getHistoricalStats.d.ts.map +1 -0
  68. package/dist/client/types/tools/ozone/report/getHistoricalStats.js +11 -0
  69. package/dist/client/types/tools/ozone/report/getHistoricalStats.js.map +1 -0
  70. package/dist/client/types/tools/ozone/report/getLatestReport.d.ts +24 -0
  71. package/dist/client/types/tools/ozone/report/getLatestReport.d.ts.map +1 -0
  72. package/dist/client/types/tools/ozone/report/getLatestReport.js +26 -0
  73. package/dist/client/types/tools/ozone/report/getLatestReport.js.map +1 -0
  74. package/dist/client/types/tools/ozone/report/getLiveStats.d.ts +28 -0
  75. package/dist/client/types/tools/ozone/report/getLiveStats.d.ts.map +1 -0
  76. package/dist/client/types/tools/ozone/report/getLiveStats.js +11 -0
  77. package/dist/client/types/tools/ozone/report/getLiveStats.js.map +1 -0
  78. package/dist/client/types/tools/ozone/report/getReport.d.ts +25 -0
  79. package/dist/client/types/tools/ozone/report/getReport.d.ts.map +1 -0
  80. package/dist/client/types/tools/ozone/report/getReport.js +26 -0
  81. package/dist/client/types/tools/ozone/report/getReport.js.map +1 -0
  82. package/dist/client/types/tools/ozone/report/listActivities.d.ts +27 -0
  83. package/dist/client/types/tools/ozone/report/listActivities.d.ts.map +1 -0
  84. package/dist/client/types/tools/ozone/report/listActivities.js +11 -0
  85. package/dist/client/types/tools/ozone/report/listActivities.js.map +1 -0
  86. package/dist/client/types/tools/ozone/report/queryReports.d.ts +49 -0
  87. package/dist/client/types/tools/ozone/report/queryReports.d.ts.map +1 -0
  88. package/dist/client/types/tools/ozone/report/queryReports.js +11 -0
  89. package/dist/client/types/tools/ozone/report/queryReports.js.map +1 -0
  90. package/dist/client/types/tools/ozone/report/reassignQueue.d.ts +45 -0
  91. package/dist/client/types/tools/ozone/report/reassignQueue.d.ts.map +1 -0
  92. package/dist/client/types/tools/ozone/report/reassignQueue.js +58 -0
  93. package/dist/client/types/tools/ozone/report/reassignQueue.js.map +1 -0
  94. package/dist/client/types/tools/ozone/report/refreshStats.d.ts +28 -0
  95. package/dist/client/types/tools/ozone/report/refreshStats.d.ts.map +1 -0
  96. package/dist/client/types/tools/ozone/report/refreshStats.js +11 -0
  97. package/dist/client/types/tools/ozone/report/refreshStats.js.map +1 -0
  98. package/dist/client/types/tools/ozone/report/unassignModerator.d.ts +27 -0
  99. package/dist/client/types/tools/ozone/report/unassignModerator.d.ts.map +1 -0
  100. package/dist/client/types/tools/ozone/report/unassignModerator.js +26 -0
  101. package/dist/client/types/tools/ozone/report/unassignModerator.js.map +1 -0
  102. package/package.json +2 -2
  103. package/src/client/index.ts +292 -0
  104. package/src/client/lexicons.ts +1908 -164
  105. package/src/client/types/tools/ozone/moderation/emitEvent.ts +24 -0
  106. package/src/client/types/tools/ozone/queue/assignModerator.ts +55 -0
  107. package/src/client/types/tools/ozone/queue/createQueue.ts +63 -0
  108. package/src/client/types/tools/ozone/queue/defs.ts +99 -0
  109. package/src/client/types/tools/ozone/queue/deleteQueue.ts +48 -0
  110. package/src/client/types/tools/ozone/queue/getAssignments.ts +49 -0
  111. package/src/client/types/tools/ozone/queue/listQueues.ts +51 -0
  112. package/src/client/types/tools/ozone/queue/routeReports.ts +59 -0
  113. package/src/client/types/tools/ozone/queue/unassignModerator.ts +51 -0
  114. package/src/client/types/tools/ozone/queue/updateQueue.ts +51 -0
  115. package/src/client/types/tools/ozone/report/assignModerator.ts +66 -0
  116. package/src/client/types/tools/ozone/report/createActivity.ts +85 -0
  117. package/src/client/types/tools/ozone/report/defs.ts +327 -0
  118. package/src/client/types/tools/ozone/report/getAssignments.ts +49 -0
  119. package/src/client/types/tools/ozone/report/getHistoricalStats.ts +55 -0
  120. package/src/client/types/tools/ozone/report/getLatestReport.ts +49 -0
  121. package/src/client/types/tools/ozone/report/getLiveStats.ts +46 -0
  122. package/src/client/types/tools/ozone/report/getReport.ts +49 -0
  123. package/src/client/types/tools/ozone/report/listActivities.ts +45 -0
  124. package/src/client/types/tools/ozone/report/queryReports.ts +73 -0
  125. package/src/client/types/tools/ozone/report/reassignQueue.ts +88 -0
  126. package/src/client/types/tools/ozone/report/refreshStats.ts +46 -0
  127. package/src/client/types/tools/ozone/report/unassignModerator.ts +53 -0
  128. package/tsconfig.build.tsbuildinfo +1 -1
@@ -19854,6 +19854,12 @@ export const schemaDict = {
19854
19854
  description:
19855
19855
  'An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject.',
19856
19856
  },
19857
+ reportAction: {
19858
+ type: 'ref',
19859
+ ref: 'lex:tools.ozone.moderation.emitEvent#reportAction',
19860
+ description:
19861
+ 'Optional report-level targeting. If provided, this event will be linked to specific reports and reporters may be notified.',
19862
+ },
19857
19863
  },
19858
19864
  },
19859
19865
  },
@@ -19875,6 +19881,36 @@ export const schemaDict = {
19875
19881
  },
19876
19882
  ],
19877
19883
  },
19884
+ reportAction: {
19885
+ type: 'object',
19886
+ description: 'Target specific reports when emitting a moderation event',
19887
+ properties: {
19888
+ ids: {
19889
+ type: 'array',
19890
+ items: {
19891
+ type: 'integer',
19892
+ },
19893
+ description: 'Target specific report IDs',
19894
+ },
19895
+ types: {
19896
+ type: 'array',
19897
+ items: {
19898
+ type: 'string',
19899
+ },
19900
+ description:
19901
+ 'Target reports matching these report types on the subject (fully qualified NSIDs)',
19902
+ },
19903
+ all: {
19904
+ type: 'boolean',
19905
+ description: 'Target ALL reports on the subject',
19906
+ },
19907
+ note: {
19908
+ type: 'string',
19909
+ description:
19910
+ 'Note to send to reporter(s) when actioning their report',
19911
+ },
19912
+ },
19913
+ },
19878
19914
  },
19879
19915
  },
19880
19916
  ToolsOzoneModerationGetAccountTimeline: {
@@ -20975,210 +21011,929 @@ export const schemaDict = {
20975
21011
  },
20976
21012
  },
20977
21013
  },
20978
- ToolsOzoneReportDefs: {
21014
+ ToolsOzoneQueueAssignModerator: {
20979
21015
  lexicon: 1,
20980
- id: 'tools.ozone.report.defs',
21016
+ id: 'tools.ozone.queue.assignModerator',
20981
21017
  defs: {
20982
- reasonType: {
20983
- type: 'string',
20984
- knownValues: [
20985
- 'tools.ozone.report.defs#reasonAppeal',
20986
- 'tools.ozone.report.defs#reasonOther',
20987
- 'tools.ozone.report.defs#reasonViolenceAnimal',
20988
- 'tools.ozone.report.defs#reasonViolenceThreats',
20989
- 'tools.ozone.report.defs#reasonViolenceGraphicContent',
20990
- 'tools.ozone.report.defs#reasonViolenceGlorification',
20991
- 'tools.ozone.report.defs#reasonViolenceExtremistContent',
20992
- 'tools.ozone.report.defs#reasonViolenceTrafficking',
20993
- 'tools.ozone.report.defs#reasonViolenceOther',
20994
- 'tools.ozone.report.defs#reasonSexualAbuseContent',
20995
- 'tools.ozone.report.defs#reasonSexualNCII',
20996
- 'tools.ozone.report.defs#reasonSexualDeepfake',
20997
- 'tools.ozone.report.defs#reasonSexualAnimal',
20998
- 'tools.ozone.report.defs#reasonSexualUnlabeled',
20999
- 'tools.ozone.report.defs#reasonSexualOther',
21000
- 'tools.ozone.report.defs#reasonChildSafetyCSAM',
21001
- 'tools.ozone.report.defs#reasonChildSafetyGroom',
21002
- 'tools.ozone.report.defs#reasonChildSafetyPrivacy',
21003
- 'tools.ozone.report.defs#reasonChildSafetyHarassment',
21004
- 'tools.ozone.report.defs#reasonChildSafetyOther',
21005
- 'tools.ozone.report.defs#reasonHarassmentTroll',
21006
- 'tools.ozone.report.defs#reasonHarassmentTargeted',
21007
- 'tools.ozone.report.defs#reasonHarassmentHateSpeech',
21008
- 'tools.ozone.report.defs#reasonHarassmentDoxxing',
21009
- 'tools.ozone.report.defs#reasonHarassmentOther',
21010
- 'tools.ozone.report.defs#reasonMisleadingBot',
21011
- 'tools.ozone.report.defs#reasonMisleadingImpersonation',
21012
- 'tools.ozone.report.defs#reasonMisleadingSpam',
21013
- 'tools.ozone.report.defs#reasonMisleadingScam',
21014
- 'tools.ozone.report.defs#reasonMisleadingElections',
21015
- 'tools.ozone.report.defs#reasonMisleadingOther',
21016
- 'tools.ozone.report.defs#reasonRuleSiteSecurity',
21017
- 'tools.ozone.report.defs#reasonRuleProhibitedSales',
21018
- 'tools.ozone.report.defs#reasonRuleBanEvasion',
21019
- 'tools.ozone.report.defs#reasonRuleOther',
21020
- 'tools.ozone.report.defs#reasonSelfHarmContent',
21021
- 'tools.ozone.report.defs#reasonSelfHarmED',
21022
- 'tools.ozone.report.defs#reasonSelfHarmStunts',
21023
- 'tools.ozone.report.defs#reasonSelfHarmSubstances',
21024
- 'tools.ozone.report.defs#reasonSelfHarmOther',
21018
+ main: {
21019
+ type: 'procedure',
21020
+ description: 'Assign a user to a queue.',
21021
+ input: {
21022
+ encoding: 'application/json',
21023
+ schema: {
21024
+ type: 'object',
21025
+ required: ['queueId', 'did'],
21026
+ properties: {
21027
+ queueId: {
21028
+ type: 'integer',
21029
+ description: 'The ID of the queue to assign the user to.',
21030
+ },
21031
+ did: {
21032
+ type: 'string',
21033
+ description: 'DID to be assigned.',
21034
+ },
21035
+ },
21036
+ },
21037
+ },
21038
+ output: {
21039
+ encoding: 'application/json',
21040
+ schema: {
21041
+ type: 'ref',
21042
+ ref: 'lex:tools.ozone.queue.defs#assignmentView',
21043
+ },
21044
+ },
21045
+ errors: [
21046
+ {
21047
+ name: 'InvalidAssignment',
21048
+ description:
21049
+ 'The specified queue does not exist or is not enabled.',
21050
+ },
21025
21051
  ],
21026
21052
  },
21027
- reasonAppeal: {
21028
- type: 'token',
21029
- description: 'Appeal a previously taken moderation action',
21030
- },
21031
- reasonOther: {
21032
- type: 'token',
21033
- description: 'An issue not included in these options',
21034
- },
21035
- reasonViolenceAnimal: {
21036
- type: 'token',
21037
- description: 'Animal welfare violations',
21038
- },
21039
- reasonViolenceThreats: {
21040
- type: 'token',
21041
- description: 'Threats or incitement',
21042
- },
21043
- reasonViolenceGraphicContent: {
21044
- type: 'token',
21045
- description: 'Graphic violent content',
21046
- },
21047
- reasonViolenceGlorification: {
21048
- type: 'token',
21049
- description: 'Glorification of violence',
21050
- },
21051
- reasonViolenceExtremistContent: {
21052
- type: 'token',
21053
+ },
21054
+ },
21055
+ ToolsOzoneQueueCreateQueue: {
21056
+ lexicon: 1,
21057
+ id: 'tools.ozone.queue.createQueue',
21058
+ defs: {
21059
+ main: {
21060
+ type: 'procedure',
21053
21061
  description:
21054
- "Extremist content. These reports will be sent only be sent to the application's Moderation Authority.",
21055
- },
21056
- reasonViolenceTrafficking: {
21057
- type: 'token',
21058
- description: 'Human trafficking',
21059
- },
21060
- reasonViolenceOther: {
21061
- type: 'token',
21062
- description: 'Other violent content',
21063
- },
21064
- reasonSexualAbuseContent: {
21065
- type: 'token',
21066
- description: 'Adult sexual abuse content',
21067
- },
21068
- reasonSexualNCII: {
21069
- type: 'token',
21070
- description: 'Non-consensual intimate imagery',
21062
+ 'Create a new moderation queue. Will fail if the queue configuration conflicts with an existing queue.',
21063
+ input: {
21064
+ encoding: 'application/json',
21065
+ schema: {
21066
+ type: 'object',
21067
+ required: ['name', 'subjectTypes', 'reportTypes'],
21068
+ properties: {
21069
+ name: {
21070
+ type: 'string',
21071
+ description: 'Display name for the queue (must be unique)',
21072
+ },
21073
+ subjectTypes: {
21074
+ type: 'array',
21075
+ minLength: 1,
21076
+ items: {
21077
+ type: 'string',
21078
+ knownValues: ['account', 'record', 'message'],
21079
+ },
21080
+ description: 'Subject types this queue accepts',
21081
+ },
21082
+ collection: {
21083
+ type: 'string',
21084
+ format: 'nsid',
21085
+ description:
21086
+ "Collection name for record subjects. Required if subjectTypes includes 'record'.",
21087
+ },
21088
+ reportTypes: {
21089
+ type: 'array',
21090
+ items: {
21091
+ type: 'string',
21092
+ },
21093
+ minLength: 1,
21094
+ maxLength: 25,
21095
+ description: 'Report reason types (fully qualified NSIDs)',
21096
+ },
21097
+ description: {
21098
+ type: 'string',
21099
+ description: 'Optional description of the queue',
21100
+ },
21101
+ },
21102
+ },
21103
+ },
21104
+ output: {
21105
+ encoding: 'application/json',
21106
+ schema: {
21107
+ type: 'object',
21108
+ required: ['queue'],
21109
+ properties: {
21110
+ queue: {
21111
+ type: 'ref',
21112
+ ref: 'lex:tools.ozone.queue.defs#queueView',
21113
+ },
21114
+ },
21115
+ },
21116
+ },
21117
+ errors: [
21118
+ {
21119
+ name: 'ConflictingQueue',
21120
+ description:
21121
+ 'The queue configuration conflicts with an existing queue',
21122
+ },
21123
+ ],
21071
21124
  },
21072
- reasonSexualDeepfake: {
21073
- type: 'token',
21074
- description: 'Deepfake adult content',
21125
+ },
21126
+ },
21127
+ ToolsOzoneQueueDefs: {
21128
+ lexicon: 1,
21129
+ id: 'tools.ozone.queue.defs',
21130
+ defs: {
21131
+ queueView: {
21132
+ type: 'object',
21133
+ required: [
21134
+ 'id',
21135
+ 'name',
21136
+ 'subjectTypes',
21137
+ 'reportTypes',
21138
+ 'createdBy',
21139
+ 'createdAt',
21140
+ 'updatedAt',
21141
+ 'enabled',
21142
+ 'stats',
21143
+ ],
21144
+ properties: {
21145
+ id: {
21146
+ type: 'integer',
21147
+ description: 'Queue ID',
21148
+ },
21149
+ name: {
21150
+ type: 'string',
21151
+ description: 'Display name of the queue',
21152
+ },
21153
+ subjectTypes: {
21154
+ type: 'array',
21155
+ minLength: 1,
21156
+ items: {
21157
+ type: 'string',
21158
+ knownValues: ['account', 'record', 'message'],
21159
+ },
21160
+ description: 'Subject types this queue accepts.',
21161
+ },
21162
+ collection: {
21163
+ type: 'string',
21164
+ format: 'nsid',
21165
+ description:
21166
+ "Collection name for record subjects (e.g., 'app.bsky.feed.post')",
21167
+ },
21168
+ reportTypes: {
21169
+ type: 'array',
21170
+ items: {
21171
+ type: 'string',
21172
+ },
21173
+ minLength: 1,
21174
+ description:
21175
+ 'Report reason types this queue accepts (fully qualified NSIDs)',
21176
+ },
21177
+ description: {
21178
+ type: 'string',
21179
+ description: 'Optional description of the queue',
21180
+ },
21181
+ createdBy: {
21182
+ type: 'string',
21183
+ format: 'did',
21184
+ description: 'DID of moderator who created this queue',
21185
+ },
21186
+ createdAt: {
21187
+ type: 'string',
21188
+ format: 'datetime',
21189
+ },
21190
+ updatedAt: {
21191
+ type: 'string',
21192
+ format: 'datetime',
21193
+ },
21194
+ enabled: {
21195
+ type: 'boolean',
21196
+ description: 'Whether this queue is currently active',
21197
+ },
21198
+ deletedAt: {
21199
+ type: 'string',
21200
+ format: 'datetime',
21201
+ description: 'When the queue was deleted, if applicable',
21202
+ },
21203
+ stats: {
21204
+ type: 'ref',
21205
+ ref: 'lex:tools.ozone.queue.defs#queueStats',
21206
+ description: 'Statistics about this queue',
21207
+ },
21208
+ },
21075
21209
  },
21076
- reasonSexualAnimal: {
21077
- type: 'token',
21078
- description: 'Animal sexual abuse',
21079
- },
21080
- reasonSexualUnlabeled: {
21081
- type: 'token',
21082
- description: 'Unlabelled adult content',
21210
+ queueStats: {
21211
+ type: 'object',
21212
+ required: [],
21213
+ properties: {
21214
+ pendingCount: {
21215
+ type: 'integer',
21216
+ description: "Number of reports in 'open' status",
21217
+ },
21218
+ actionedCount: {
21219
+ type: 'integer',
21220
+ description: "Number of reports in 'closed' status",
21221
+ },
21222
+ escalatedCount: {
21223
+ type: 'integer',
21224
+ description: "Number of reports in 'escalated' status",
21225
+ },
21226
+ inboundCount: {
21227
+ type: 'integer',
21228
+ description: 'Reports received in this queue in the last 24 hours.',
21229
+ },
21230
+ actionRate: {
21231
+ type: 'integer',
21232
+ description:
21233
+ 'Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer. Absent when inboundCount is 0.',
21234
+ },
21235
+ avgHandlingTimeSec: {
21236
+ type: 'integer',
21237
+ description:
21238
+ 'Average time in seconds from report creation to close, for reports closed in this period.',
21239
+ },
21240
+ lastUpdated: {
21241
+ type: 'string',
21242
+ format: 'datetime',
21243
+ description: 'When these statistics were last computed',
21244
+ },
21245
+ },
21083
21246
  },
21084
- reasonSexualOther: {
21085
- type: 'token',
21086
- description: 'Other sexual violence content',
21247
+ assignmentView: {
21248
+ type: 'object',
21249
+ required: ['id', 'did', 'queue', 'startAt'],
21250
+ properties: {
21251
+ id: {
21252
+ type: 'integer',
21253
+ },
21254
+ did: {
21255
+ type: 'string',
21256
+ format: 'did',
21257
+ },
21258
+ moderator: {
21259
+ type: 'ref',
21260
+ ref: 'lex:tools.ozone.team.defs#member',
21261
+ description: 'The moderator assigned to this queue',
21262
+ },
21263
+ queue: {
21264
+ type: 'ref',
21265
+ ref: 'lex:tools.ozone.queue.defs#queueView',
21266
+ },
21267
+ startAt: {
21268
+ type: 'string',
21269
+ format: 'datetime',
21270
+ },
21271
+ endAt: {
21272
+ type: 'string',
21273
+ format: 'datetime',
21274
+ },
21275
+ },
21087
21276
  },
21088
- reasonChildSafetyCSAM: {
21089
- type: 'token',
21277
+ },
21278
+ },
21279
+ ToolsOzoneQueueDeleteQueue: {
21280
+ lexicon: 1,
21281
+ id: 'tools.ozone.queue.deleteQueue',
21282
+ defs: {
21283
+ main: {
21284
+ type: 'procedure',
21090
21285
  description:
21091
- "Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority.",
21286
+ 'Delete a moderation queue. Optionally migrate reports to another queue.',
21287
+ input: {
21288
+ encoding: 'application/json',
21289
+ schema: {
21290
+ type: 'object',
21291
+ required: ['queueId'],
21292
+ properties: {
21293
+ queueId: {
21294
+ type: 'integer',
21295
+ description: 'ID of the queue to delete',
21296
+ },
21297
+ migrateToQueueId: {
21298
+ type: 'integer',
21299
+ description:
21300
+ 'Optional: migrate all reports to this queue. If not specified, reports will be set to unassigned (-1).',
21301
+ },
21302
+ },
21303
+ },
21304
+ },
21305
+ output: {
21306
+ encoding: 'application/json',
21307
+ schema: {
21308
+ type: 'object',
21309
+ required: ['deleted'],
21310
+ properties: {
21311
+ deleted: {
21312
+ type: 'boolean',
21313
+ },
21314
+ reportsMigrated: {
21315
+ type: 'integer',
21316
+ description:
21317
+ 'Number of reports that were migrated (if migration occurred)',
21318
+ },
21319
+ },
21320
+ },
21321
+ },
21092
21322
  },
21093
- reasonChildSafetyGroom: {
21094
- type: 'token',
21323
+ },
21324
+ },
21325
+ ToolsOzoneQueueGetAssignments: {
21326
+ lexicon: 1,
21327
+ id: 'tools.ozone.queue.getAssignments',
21328
+ defs: {
21329
+ main: {
21330
+ type: 'query',
21095
21331
  description:
21096
- "Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority.",
21097
- },
21098
- reasonChildSafetyPrivacy: {
21099
- type: 'token',
21100
- description: 'Privacy violation involving a minor',
21332
+ 'Get moderator assignments, optionally filtered by active status, queue, or moderator.',
21333
+ parameters: {
21334
+ type: 'params',
21335
+ properties: {
21336
+ onlyActive: {
21337
+ type: 'boolean',
21338
+ default: true,
21339
+ description: 'When true, only returns active assignments.',
21340
+ },
21341
+ queueIds: {
21342
+ type: 'array',
21343
+ items: {
21344
+ type: 'integer',
21345
+ },
21346
+ description:
21347
+ 'If specified, returns assignments for these queues only.',
21348
+ },
21349
+ dids: {
21350
+ type: 'array',
21351
+ items: {
21352
+ type: 'string',
21353
+ format: 'did',
21354
+ },
21355
+ description:
21356
+ 'If specified, returns assignments for these moderators only.',
21357
+ },
21358
+ limit: {
21359
+ type: 'integer',
21360
+ minimum: 1,
21361
+ maximum: 100,
21362
+ default: 50,
21363
+ },
21364
+ cursor: {
21365
+ type: 'string',
21366
+ },
21367
+ },
21368
+ },
21369
+ output: {
21370
+ encoding: 'application/json',
21371
+ schema: {
21372
+ type: 'object',
21373
+ required: ['assignments'],
21374
+ properties: {
21375
+ cursor: {
21376
+ type: 'string',
21377
+ },
21378
+ assignments: {
21379
+ type: 'array',
21380
+ items: {
21381
+ type: 'ref',
21382
+ ref: 'lex:tools.ozone.queue.defs#assignmentView',
21383
+ },
21384
+ },
21385
+ },
21386
+ },
21387
+ },
21101
21388
  },
21102
- reasonChildSafetyHarassment: {
21103
- type: 'token',
21104
- description: 'Harassment or bullying of minors',
21389
+ },
21390
+ },
21391
+ ToolsOzoneQueueListQueues: {
21392
+ lexicon: 1,
21393
+ id: 'tools.ozone.queue.listQueues',
21394
+ defs: {
21395
+ main: {
21396
+ type: 'query',
21397
+ description: 'List all configured moderation queues with statistics.',
21398
+ parameters: {
21399
+ type: 'params',
21400
+ properties: {
21401
+ enabled: {
21402
+ type: 'boolean',
21403
+ description:
21404
+ 'Filter by enabled status. If not specified, returns all queues.',
21405
+ },
21406
+ subjectType: {
21407
+ type: 'string',
21408
+ description:
21409
+ "Filter queues that handle this subject type ('account' or 'record').",
21410
+ },
21411
+ collection: {
21412
+ type: 'string',
21413
+ description:
21414
+ "Filter queues by collection name (e.g. 'app.bsky.feed.post').",
21415
+ },
21416
+ reportTypes: {
21417
+ type: 'array',
21418
+ items: {
21419
+ type: 'string',
21420
+ },
21421
+ maxLength: 10,
21422
+ description:
21423
+ 'Filter queues that handle any of these report reason types.',
21424
+ },
21425
+ limit: {
21426
+ type: 'integer',
21427
+ minimum: 1,
21428
+ maximum: 100,
21429
+ default: 50,
21430
+ },
21431
+ cursor: {
21432
+ type: 'string',
21433
+ },
21434
+ },
21435
+ },
21436
+ output: {
21437
+ encoding: 'application/json',
21438
+ schema: {
21439
+ type: 'object',
21440
+ required: ['queues'],
21441
+ properties: {
21442
+ cursor: {
21443
+ type: 'string',
21444
+ },
21445
+ queues: {
21446
+ type: 'array',
21447
+ items: {
21448
+ type: 'ref',
21449
+ ref: 'lex:tools.ozone.queue.defs#queueView',
21450
+ },
21451
+ },
21452
+ },
21453
+ },
21454
+ },
21105
21455
  },
21106
- reasonChildSafetyOther: {
21107
- type: 'token',
21456
+ },
21457
+ },
21458
+ ToolsOzoneQueueRouteReports: {
21459
+ lexicon: 1,
21460
+ id: 'tools.ozone.queue.routeReports',
21461
+ defs: {
21462
+ main: {
21463
+ type: 'procedure',
21108
21464
  description:
21109
- "Other child safety. These reports will be sent only be sent to the application's Moderation Authority.",
21110
- },
21111
- reasonHarassmentTroll: {
21112
- type: 'token',
21113
- description: 'Trolling',
21114
- },
21115
- reasonHarassmentTargeted: {
21116
- type: 'token',
21117
- description: 'Targeted harassment',
21118
- },
21119
- reasonHarassmentHateSpeech: {
21120
- type: 'token',
21121
- description: 'Hate speech',
21465
+ 'Route reports within an ID range to matching queues based.',
21466
+ input: {
21467
+ encoding: 'application/json',
21468
+ schema: {
21469
+ type: 'object',
21470
+ required: ['startReportId', 'endReportId'],
21471
+ properties: {
21472
+ startReportId: {
21473
+ type: 'integer',
21474
+ description: 'Start of report ID range (inclusive).',
21475
+ },
21476
+ endReportId: {
21477
+ type: 'integer',
21478
+ description:
21479
+ 'End of report ID range (inclusive). Difference between start and end must be less than 5,000.',
21480
+ },
21481
+ },
21482
+ },
21483
+ },
21484
+ output: {
21485
+ encoding: 'application/json',
21486
+ schema: {
21487
+ type: 'object',
21488
+ required: ['assigned', 'unmatched'],
21489
+ properties: {
21490
+ assigned: {
21491
+ type: 'integer',
21492
+ description: 'The number of reports assigned to a queue.',
21493
+ },
21494
+ unmatched: {
21495
+ type: 'integer',
21496
+ description: 'The number of reports with no matching queue.',
21497
+ },
21498
+ },
21499
+ },
21500
+ },
21501
+ errors: [
21502
+ {
21503
+ name: 'OutOfRange',
21504
+ description:
21505
+ 'The request is invalid, such as missing required fields or invalid field values.',
21506
+ },
21507
+ ],
21122
21508
  },
21123
- reasonHarassmentDoxxing: {
21124
- type: 'token',
21125
- description: 'Doxxing',
21509
+ },
21510
+ },
21511
+ ToolsOzoneQueueUnassignModerator: {
21512
+ lexicon: 1,
21513
+ id: 'tools.ozone.queue.unassignModerator',
21514
+ defs: {
21515
+ main: {
21516
+ type: 'procedure',
21517
+ description: "Remove a user's assignment from a queue.",
21518
+ input: {
21519
+ encoding: 'application/json',
21520
+ schema: {
21521
+ type: 'object',
21522
+ required: ['queueId', 'did'],
21523
+ properties: {
21524
+ queueId: {
21525
+ type: 'integer',
21526
+ description: 'The ID of the queue to unassign the user from.',
21527
+ },
21528
+ did: {
21529
+ type: 'string',
21530
+ format: 'did',
21531
+ description: 'DID to be unassigned.',
21532
+ },
21533
+ },
21534
+ },
21535
+ },
21536
+ errors: [
21537
+ {
21538
+ name: 'InvalidAssignment',
21539
+ description:
21540
+ 'No active assignment exists for the given queue and user.',
21541
+ },
21542
+ ],
21126
21543
  },
21127
- reasonHarassmentOther: {
21128
- type: 'token',
21129
- description: 'Other harassing or hateful content',
21544
+ },
21545
+ },
21546
+ ToolsOzoneQueueUpdateQueue: {
21547
+ lexicon: 1,
21548
+ id: 'tools.ozone.queue.updateQueue',
21549
+ defs: {
21550
+ main: {
21551
+ type: 'procedure',
21552
+ description:
21553
+ 'Update queue properties. Currently only supports updating the name and enabled status to prevent configuration conflicts.',
21554
+ input: {
21555
+ encoding: 'application/json',
21556
+ schema: {
21557
+ type: 'object',
21558
+ required: ['queueId'],
21559
+ properties: {
21560
+ queueId: {
21561
+ type: 'integer',
21562
+ description: 'ID of the queue to update',
21563
+ },
21564
+ name: {
21565
+ type: 'string',
21566
+ description: 'New display name for the queue',
21567
+ },
21568
+ enabled: {
21569
+ type: 'boolean',
21570
+ description: 'Enable or disable the queue',
21571
+ },
21572
+ description: {
21573
+ type: 'string',
21574
+ description: 'Optional description of the queue',
21575
+ },
21576
+ },
21577
+ },
21578
+ },
21579
+ output: {
21580
+ encoding: 'application/json',
21581
+ schema: {
21582
+ type: 'object',
21583
+ required: ['queue'],
21584
+ properties: {
21585
+ queue: {
21586
+ type: 'ref',
21587
+ ref: 'lex:tools.ozone.queue.defs#queueView',
21588
+ },
21589
+ },
21590
+ },
21591
+ },
21130
21592
  },
21131
- reasonMisleadingBot: {
21132
- type: 'token',
21133
- description: 'Fake account or bot',
21593
+ },
21594
+ },
21595
+ ToolsOzoneReportAssignModerator: {
21596
+ lexicon: 1,
21597
+ id: 'tools.ozone.report.assignModerator',
21598
+ defs: {
21599
+ main: {
21600
+ type: 'procedure',
21601
+ description:
21602
+ 'Assign a report to a user. Defaults to the caller. Admins may assign to any moderator.',
21603
+ input: {
21604
+ encoding: 'application/json',
21605
+ schema: {
21606
+ type: 'object',
21607
+ required: ['reportId'],
21608
+ properties: {
21609
+ reportId: {
21610
+ type: 'integer',
21611
+ description: 'The ID of the report to assign.',
21612
+ },
21613
+ queueId: {
21614
+ type: 'integer',
21615
+ description:
21616
+ 'Optional queue ID to associate the assignment with. If not provided and the report has been assigned on a queue before, it will stay on that queue.',
21617
+ },
21618
+ did: {
21619
+ type: 'string',
21620
+ format: 'did',
21621
+ description:
21622
+ "DID to be assigned. Defaults to the caller's DID. Admins may assign to any moderator.",
21623
+ },
21624
+ isPermanent: {
21625
+ type: 'boolean',
21626
+ description:
21627
+ 'When true, the assignment has no expiry (endAt is null). Throws AlreadyAssigned if another user already has a permanent assignment on this report.',
21628
+ },
21629
+ },
21630
+ },
21631
+ },
21632
+ output: {
21633
+ encoding: 'application/json',
21634
+ schema: {
21635
+ type: 'ref',
21636
+ ref: 'lex:tools.ozone.report.defs#assignmentView',
21637
+ },
21638
+ },
21639
+ errors: [
21640
+ {
21641
+ name: 'AlreadyAssigned',
21642
+ description: 'The report is already assigned to another user.',
21643
+ },
21644
+ {
21645
+ name: 'InvalidAssignment',
21646
+ description: 'The report ID or queue ID is invalid.',
21647
+ },
21648
+ ],
21134
21649
  },
21135
- reasonMisleadingImpersonation: {
21136
- type: 'token',
21137
- description: 'Impersonation',
21650
+ },
21651
+ },
21652
+ ToolsOzoneReportCreateActivity: {
21653
+ lexicon: 1,
21654
+ id: 'tools.ozone.report.createActivity',
21655
+ defs: {
21656
+ main: {
21657
+ type: 'procedure',
21658
+ description:
21659
+ 'Register an activity on a report. For state-change activity types, validates the transition and updates report.status atomically.',
21660
+ input: {
21661
+ encoding: 'application/json',
21662
+ schema: {
21663
+ type: 'object',
21664
+ required: ['reportId', 'activity'],
21665
+ properties: {
21666
+ reportId: {
21667
+ type: 'integer',
21668
+ description: 'ID of the report to record activity on',
21669
+ },
21670
+ activity: {
21671
+ type: 'union',
21672
+ refs: [
21673
+ 'lex:tools.ozone.report.defs#queueActivity',
21674
+ 'lex:tools.ozone.report.defs#assignmentActivity',
21675
+ 'lex:tools.ozone.report.defs#escalationActivity',
21676
+ 'lex:tools.ozone.report.defs#closeActivity',
21677
+ 'lex:tools.ozone.report.defs#reopenActivity',
21678
+ 'lex:tools.ozone.report.defs#noteActivity',
21679
+ ],
21680
+ description: 'The type of activity to record.',
21681
+ },
21682
+ internalNote: {
21683
+ type: 'string',
21684
+ description:
21685
+ 'Optional moderator-only note. Not visible to reporters.',
21686
+ },
21687
+ publicNote: {
21688
+ type: 'string',
21689
+ description:
21690
+ 'Optional public-facing note, potentially visible to the reporter.',
21691
+ },
21692
+ isAutomated: {
21693
+ type: 'boolean',
21694
+ description:
21695
+ 'Set true when this activity is triggered by an automated process. Defaults to false.',
21696
+ default: false,
21697
+ },
21698
+ },
21699
+ },
21700
+ },
21701
+ output: {
21702
+ encoding: 'application/json',
21703
+ schema: {
21704
+ type: 'object',
21705
+ required: ['activity'],
21706
+ properties: {
21707
+ activity: {
21708
+ type: 'ref',
21709
+ ref: 'lex:tools.ozone.report.defs#reportActivityView',
21710
+ },
21711
+ },
21712
+ },
21713
+ },
21714
+ errors: [
21715
+ {
21716
+ name: 'ReportNotFound',
21717
+ description: 'No report exists with the given reportId',
21718
+ },
21719
+ {
21720
+ name: 'InvalidStateTransition',
21721
+ description:
21722
+ "The requested state transition is not permitted from the report's current status",
21723
+ },
21724
+ {
21725
+ name: 'AlreadyInTargetState',
21726
+ description:
21727
+ 'The report is already in the status implied by this activity type',
21728
+ },
21729
+ ],
21138
21730
  },
21139
- reasonMisleadingSpam: {
21140
- type: 'token',
21141
- description: 'Spam',
21731
+ },
21732
+ },
21733
+ ToolsOzoneReportDefs: {
21734
+ lexicon: 1,
21735
+ id: 'tools.ozone.report.defs',
21736
+ defs: {
21737
+ reasonType: {
21738
+ type: 'string',
21739
+ knownValues: [
21740
+ 'tools.ozone.report.defs#reasonAppeal',
21741
+ 'tools.ozone.report.defs#reasonOther',
21742
+ 'tools.ozone.report.defs#reasonViolenceAnimal',
21743
+ 'tools.ozone.report.defs#reasonViolenceThreats',
21744
+ 'tools.ozone.report.defs#reasonViolenceGraphicContent',
21745
+ 'tools.ozone.report.defs#reasonViolenceGlorification',
21746
+ 'tools.ozone.report.defs#reasonViolenceExtremistContent',
21747
+ 'tools.ozone.report.defs#reasonViolenceTrafficking',
21748
+ 'tools.ozone.report.defs#reasonViolenceOther',
21749
+ 'tools.ozone.report.defs#reasonSexualAbuseContent',
21750
+ 'tools.ozone.report.defs#reasonSexualNCII',
21751
+ 'tools.ozone.report.defs#reasonSexualDeepfake',
21752
+ 'tools.ozone.report.defs#reasonSexualAnimal',
21753
+ 'tools.ozone.report.defs#reasonSexualUnlabeled',
21754
+ 'tools.ozone.report.defs#reasonSexualOther',
21755
+ 'tools.ozone.report.defs#reasonChildSafetyCSAM',
21756
+ 'tools.ozone.report.defs#reasonChildSafetyGroom',
21757
+ 'tools.ozone.report.defs#reasonChildSafetyPrivacy',
21758
+ 'tools.ozone.report.defs#reasonChildSafetyHarassment',
21759
+ 'tools.ozone.report.defs#reasonChildSafetyOther',
21760
+ 'tools.ozone.report.defs#reasonHarassmentTroll',
21761
+ 'tools.ozone.report.defs#reasonHarassmentTargeted',
21762
+ 'tools.ozone.report.defs#reasonHarassmentHateSpeech',
21763
+ 'tools.ozone.report.defs#reasonHarassmentDoxxing',
21764
+ 'tools.ozone.report.defs#reasonHarassmentOther',
21765
+ 'tools.ozone.report.defs#reasonMisleadingBot',
21766
+ 'tools.ozone.report.defs#reasonMisleadingImpersonation',
21767
+ 'tools.ozone.report.defs#reasonMisleadingSpam',
21768
+ 'tools.ozone.report.defs#reasonMisleadingScam',
21769
+ 'tools.ozone.report.defs#reasonMisleadingElections',
21770
+ 'tools.ozone.report.defs#reasonMisleadingOther',
21771
+ 'tools.ozone.report.defs#reasonRuleSiteSecurity',
21772
+ 'tools.ozone.report.defs#reasonRuleProhibitedSales',
21773
+ 'tools.ozone.report.defs#reasonRuleBanEvasion',
21774
+ 'tools.ozone.report.defs#reasonRuleOther',
21775
+ 'tools.ozone.report.defs#reasonSelfHarmContent',
21776
+ 'tools.ozone.report.defs#reasonSelfHarmED',
21777
+ 'tools.ozone.report.defs#reasonSelfHarmStunts',
21778
+ 'tools.ozone.report.defs#reasonSelfHarmSubstances',
21779
+ 'tools.ozone.report.defs#reasonSelfHarmOther',
21780
+ ],
21142
21781
  },
21143
- reasonMisleadingScam: {
21782
+ reasonAppeal: {
21144
21783
  type: 'token',
21145
- description: 'Scam',
21784
+ description: 'Appeal a previously taken moderation action',
21146
21785
  },
21147
- reasonMisleadingElections: {
21786
+ reasonOther: {
21148
21787
  type: 'token',
21149
- description: 'False information about elections',
21788
+ description: 'An issue not included in these options',
21150
21789
  },
21151
- reasonMisleadingOther: {
21790
+ reasonViolenceAnimal: {
21152
21791
  type: 'token',
21153
- description: 'Other misleading content',
21792
+ description: 'Animal welfare violations',
21154
21793
  },
21155
- reasonRuleSiteSecurity: {
21794
+ reasonViolenceThreats: {
21156
21795
  type: 'token',
21157
- description: 'Hacking or system attacks',
21796
+ description: 'Threats or incitement',
21158
21797
  },
21159
- reasonRuleProhibitedSales: {
21798
+ reasonViolenceGraphicContent: {
21160
21799
  type: 'token',
21161
- description: 'Promoting or selling prohibited items or services',
21800
+ description: 'Graphic violent content',
21162
21801
  },
21163
- reasonRuleBanEvasion: {
21802
+ reasonViolenceGlorification: {
21164
21803
  type: 'token',
21165
- description: 'Banned user returning',
21804
+ description: 'Glorification of violence',
21166
21805
  },
21167
- reasonRuleOther: {
21806
+ reasonViolenceExtremistContent: {
21168
21807
  type: 'token',
21169
- description: 'Other',
21808
+ description:
21809
+ "Extremist content. These reports will be sent only be sent to the application's Moderation Authority.",
21170
21810
  },
21171
- reasonSelfHarmContent: {
21811
+ reasonViolenceTrafficking: {
21172
21812
  type: 'token',
21173
- description: 'Content promoting or depicting self-harm',
21813
+ description: 'Human trafficking',
21174
21814
  },
21175
- reasonSelfHarmED: {
21815
+ reasonViolenceOther: {
21176
21816
  type: 'token',
21177
- description: 'Eating disorders',
21817
+ description: 'Other violent content',
21178
21818
  },
21179
- reasonSelfHarmStunts: {
21819
+ reasonSexualAbuseContent: {
21180
21820
  type: 'token',
21181
- description: 'Dangerous challenges or activities',
21821
+ description: 'Adult sexual abuse content',
21822
+ },
21823
+ reasonSexualNCII: {
21824
+ type: 'token',
21825
+ description: 'Non-consensual intimate imagery',
21826
+ },
21827
+ reasonSexualDeepfake: {
21828
+ type: 'token',
21829
+ description: 'Deepfake adult content',
21830
+ },
21831
+ reasonSexualAnimal: {
21832
+ type: 'token',
21833
+ description: 'Animal sexual abuse',
21834
+ },
21835
+ reasonSexualUnlabeled: {
21836
+ type: 'token',
21837
+ description: 'Unlabelled adult content',
21838
+ },
21839
+ reasonSexualOther: {
21840
+ type: 'token',
21841
+ description: 'Other sexual violence content',
21842
+ },
21843
+ reasonChildSafetyCSAM: {
21844
+ type: 'token',
21845
+ description:
21846
+ "Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority.",
21847
+ },
21848
+ reasonChildSafetyGroom: {
21849
+ type: 'token',
21850
+ description:
21851
+ "Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority.",
21852
+ },
21853
+ reasonChildSafetyPrivacy: {
21854
+ type: 'token',
21855
+ description: 'Privacy violation involving a minor',
21856
+ },
21857
+ reasonChildSafetyHarassment: {
21858
+ type: 'token',
21859
+ description: 'Harassment or bullying of minors',
21860
+ },
21861
+ reasonChildSafetyOther: {
21862
+ type: 'token',
21863
+ description:
21864
+ "Other child safety. These reports will be sent only be sent to the application's Moderation Authority.",
21865
+ },
21866
+ reasonHarassmentTroll: {
21867
+ type: 'token',
21868
+ description: 'Trolling',
21869
+ },
21870
+ reasonHarassmentTargeted: {
21871
+ type: 'token',
21872
+ description: 'Targeted harassment',
21873
+ },
21874
+ reasonHarassmentHateSpeech: {
21875
+ type: 'token',
21876
+ description: 'Hate speech',
21877
+ },
21878
+ reasonHarassmentDoxxing: {
21879
+ type: 'token',
21880
+ description: 'Doxxing',
21881
+ },
21882
+ reasonHarassmentOther: {
21883
+ type: 'token',
21884
+ description: 'Other harassing or hateful content',
21885
+ },
21886
+ reasonMisleadingBot: {
21887
+ type: 'token',
21888
+ description: 'Fake account or bot',
21889
+ },
21890
+ reasonMisleadingImpersonation: {
21891
+ type: 'token',
21892
+ description: 'Impersonation',
21893
+ },
21894
+ reasonMisleadingSpam: {
21895
+ type: 'token',
21896
+ description: 'Spam',
21897
+ },
21898
+ reasonMisleadingScam: {
21899
+ type: 'token',
21900
+ description: 'Scam',
21901
+ },
21902
+ reasonMisleadingElections: {
21903
+ type: 'token',
21904
+ description: 'False information about elections',
21905
+ },
21906
+ reasonMisleadingOther: {
21907
+ type: 'token',
21908
+ description: 'Other misleading content',
21909
+ },
21910
+ reasonRuleSiteSecurity: {
21911
+ type: 'token',
21912
+ description: 'Hacking or system attacks',
21913
+ },
21914
+ reasonRuleProhibitedSales: {
21915
+ type: 'token',
21916
+ description: 'Promoting or selling prohibited items or services',
21917
+ },
21918
+ reasonRuleBanEvasion: {
21919
+ type: 'token',
21920
+ description: 'Banned user returning',
21921
+ },
21922
+ reasonRuleOther: {
21923
+ type: 'token',
21924
+ description: 'Other',
21925
+ },
21926
+ reasonSelfHarmContent: {
21927
+ type: 'token',
21928
+ description: 'Content promoting or depicting self-harm',
21929
+ },
21930
+ reasonSelfHarmED: {
21931
+ type: 'token',
21932
+ description: 'Eating disorders',
21933
+ },
21934
+ reasonSelfHarmStunts: {
21935
+ type: 'token',
21936
+ description: 'Dangerous challenges or activities',
21182
21937
  },
21183
21938
  reasonSelfHarmSubstances: {
21184
21939
  type: 'token',
@@ -21188,6 +21943,974 @@ export const schemaDict = {
21188
21943
  type: 'token',
21189
21944
  description: 'Other dangerous content',
21190
21945
  },
21946
+ reportAssignment: {
21947
+ type: 'object',
21948
+ description:
21949
+ 'Information about the moderator currently assigned to a report.',
21950
+ required: ['did', 'assignedAt'],
21951
+ properties: {
21952
+ did: {
21953
+ type: 'string',
21954
+ format: 'did',
21955
+ description: 'DID of the assigned moderator',
21956
+ },
21957
+ moderator: {
21958
+ type: 'ref',
21959
+ ref: 'lex:tools.ozone.team.defs#member',
21960
+ description: 'Full member record of the assigned moderator',
21961
+ },
21962
+ assignedAt: {
21963
+ type: 'string',
21964
+ format: 'datetime',
21965
+ description: 'When the report was assigned',
21966
+ },
21967
+ },
21968
+ },
21969
+ reportView: {
21970
+ type: 'object',
21971
+ required: [
21972
+ 'id',
21973
+ 'eventId',
21974
+ 'status',
21975
+ 'subject',
21976
+ 'reportType',
21977
+ 'reportedBy',
21978
+ 'reporter',
21979
+ 'createdAt',
21980
+ ],
21981
+ properties: {
21982
+ id: {
21983
+ type: 'integer',
21984
+ description: 'Report ID',
21985
+ },
21986
+ eventId: {
21987
+ type: 'integer',
21988
+ description: 'ID of the moderation event that created this report',
21989
+ },
21990
+ status: {
21991
+ type: 'string',
21992
+ knownValues: ['open', 'closed', 'escalated', 'queued', 'assigned'],
21993
+ description: 'Current status of the report',
21994
+ },
21995
+ subject: {
21996
+ type: 'ref',
21997
+ ref: 'lex:tools.ozone.moderation.defs#subjectView',
21998
+ description: 'The subject that was reported with full details',
21999
+ },
22000
+ reportType: {
22001
+ type: 'ref',
22002
+ ref: 'lex:com.atproto.moderation.defs#reasonType',
22003
+ description: 'Type of report',
22004
+ },
22005
+ reportedBy: {
22006
+ type: 'string',
22007
+ format: 'did',
22008
+ description: 'DID of the user who made the report',
22009
+ },
22010
+ reporter: {
22011
+ type: 'ref',
22012
+ ref: 'lex:tools.ozone.moderation.defs#subjectView',
22013
+ description: 'Full subject view of the reporter account',
22014
+ },
22015
+ comment: {
22016
+ type: 'string',
22017
+ description: 'Comment provided by the reporter',
22018
+ },
22019
+ createdAt: {
22020
+ type: 'string',
22021
+ format: 'datetime',
22022
+ description: 'When the report was created',
22023
+ },
22024
+ updatedAt: {
22025
+ type: 'string',
22026
+ format: 'datetime',
22027
+ description: 'When the report was last updated',
22028
+ },
22029
+ queuedAt: {
22030
+ type: 'string',
22031
+ format: 'datetime',
22032
+ description: 'When the report was assigned to its current queue',
22033
+ },
22034
+ actionEventIds: {
22035
+ type: 'array',
22036
+ items: {
22037
+ type: 'integer',
22038
+ },
22039
+ description:
22040
+ 'Array of moderation event IDs representing actions taken on this report (sorted DESC, most recent first)',
22041
+ },
22042
+ actions: {
22043
+ type: 'array',
22044
+ items: {
22045
+ type: 'ref',
22046
+ ref: 'lex:tools.ozone.moderation.defs#modEventView',
22047
+ },
22048
+ description: 'Optional: expanded action events',
22049
+ },
22050
+ actionNote: {
22051
+ type: 'string',
22052
+ description: 'Note sent to reporter when report was actioned',
22053
+ },
22054
+ subjectStatus: {
22055
+ type: 'ref',
22056
+ ref: 'lex:tools.ozone.moderation.defs#subjectStatusView',
22057
+ description: 'Current status of the reported subject',
22058
+ },
22059
+ relatedReportCount: {
22060
+ type: 'integer',
22061
+ description: 'Number of other pending reports on the same subject',
22062
+ },
22063
+ assignment: {
22064
+ type: 'ref',
22065
+ ref: 'lex:tools.ozone.report.defs#reportAssignment',
22066
+ description:
22067
+ 'Information about moderator currently assigned to this report (if any)',
22068
+ },
22069
+ queue: {
22070
+ type: 'ref',
22071
+ ref: 'lex:tools.ozone.queue.defs#queueView',
22072
+ description: 'The queue this report is assigned to (if any)',
22073
+ },
22074
+ isMuted: {
22075
+ type: 'boolean',
22076
+ description:
22077
+ 'Whether this report is muted. A report is muted if the reporter was muted or the subject was muted at the time the report was created.',
22078
+ },
22079
+ },
22080
+ },
22081
+ queueActivity: {
22082
+ type: 'object',
22083
+ description: 'Activity recording a report being routed to a queue.',
22084
+ properties: {
22085
+ previousStatus: {
22086
+ type: 'string',
22087
+ knownValues: ['open', 'closed', 'escalated', 'queued', 'assigned'],
22088
+ description:
22089
+ "The report's status before this activity. Populated automatically from the report row; not required in input.",
22090
+ },
22091
+ },
22092
+ },
22093
+ assignmentActivity: {
22094
+ type: 'object',
22095
+ description:
22096
+ 'Activity recording a moderator being assigned to a report.',
22097
+ properties: {
22098
+ previousStatus: {
22099
+ type: 'string',
22100
+ knownValues: ['open', 'closed', 'escalated', 'queued', 'assigned'],
22101
+ description:
22102
+ "The report's status before this activity. Populated automatically from the report row; not required in input.",
22103
+ },
22104
+ },
22105
+ },
22106
+ escalationActivity: {
22107
+ type: 'object',
22108
+ description: 'Activity recording a report being escalated.',
22109
+ properties: {
22110
+ previousStatus: {
22111
+ type: 'string',
22112
+ knownValues: ['open', 'closed', 'escalated', 'queued', 'assigned'],
22113
+ description:
22114
+ "The report's status before this activity. Populated automatically from the report row; not required in input.",
22115
+ },
22116
+ },
22117
+ },
22118
+ closeActivity: {
22119
+ type: 'object',
22120
+ description: 'Activity recording a report being closed.',
22121
+ properties: {
22122
+ previousStatus: {
22123
+ type: 'string',
22124
+ knownValues: ['open', 'closed', 'escalated', 'queued', 'assigned'],
22125
+ description:
22126
+ "The report's status before this activity. Populated automatically from the report row; not required in input.",
22127
+ },
22128
+ },
22129
+ },
22130
+ reopenActivity: {
22131
+ type: 'object',
22132
+ description:
22133
+ "Activity recording a closed report being reopened. Only valid when the report is in 'closed' status.",
22134
+ properties: {
22135
+ previousStatus: {
22136
+ type: 'string',
22137
+ knownValues: ['open', 'closed', 'escalated', 'queued', 'assigned'],
22138
+ description:
22139
+ "The report's status before this activity. Populated automatically from the report row; not required in input.",
22140
+ },
22141
+ },
22142
+ },
22143
+ noteActivity: {
22144
+ type: 'object',
22145
+ description:
22146
+ 'Activity recording a note on a report. Use internalNote for moderator-only notes or publicNote for reporter-visible notes (or both).',
22147
+ properties: {},
22148
+ },
22149
+ reportActivityView: {
22150
+ type: 'object',
22151
+ description: 'A single activity entry on a report.',
22152
+ required: [
22153
+ 'id',
22154
+ 'reportId',
22155
+ 'activity',
22156
+ 'isAutomated',
22157
+ 'createdBy',
22158
+ 'createdAt',
22159
+ ],
22160
+ properties: {
22161
+ id: {
22162
+ type: 'integer',
22163
+ description: 'Activity ID',
22164
+ },
22165
+ reportId: {
22166
+ type: 'integer',
22167
+ description: 'ID of the report this activity belongs to',
22168
+ },
22169
+ activity: {
22170
+ type: 'union',
22171
+ refs: [
22172
+ 'lex:tools.ozone.report.defs#queueActivity',
22173
+ 'lex:tools.ozone.report.defs#assignmentActivity',
22174
+ 'lex:tools.ozone.report.defs#escalationActivity',
22175
+ 'lex:tools.ozone.report.defs#closeActivity',
22176
+ 'lex:tools.ozone.report.defs#reopenActivity',
22177
+ 'lex:tools.ozone.report.defs#noteActivity',
22178
+ ],
22179
+ description: 'The typed activity object describing what occurred.',
22180
+ },
22181
+ internalNote: {
22182
+ type: 'string',
22183
+ description:
22184
+ 'Optional moderator-only note. Not visible to reporters.',
22185
+ },
22186
+ publicNote: {
22187
+ type: 'string',
22188
+ description:
22189
+ 'Optional public note, potentially visible to the reporter.',
22190
+ },
22191
+ meta: {
22192
+ type: 'unknown',
22193
+ description:
22194
+ 'Extensible JSON payload for loose activity-specific metadata (e.g. assignmentId).',
22195
+ },
22196
+ isAutomated: {
22197
+ type: 'boolean',
22198
+ description:
22199
+ 'True if this activity was created by an automated process (e.g. queue router) rather than a direct human action.',
22200
+ },
22201
+ createdBy: {
22202
+ type: 'string',
22203
+ format: 'did',
22204
+ description:
22205
+ 'DID of the actor who created this activity, or the service DID for automated activities.',
22206
+ },
22207
+ moderator: {
22208
+ type: 'ref',
22209
+ ref: 'lex:tools.ozone.team.defs#member',
22210
+ description:
22211
+ 'Full member record of the moderator who created this activity',
22212
+ },
22213
+ createdAt: {
22214
+ type: 'string',
22215
+ format: 'datetime',
22216
+ description: 'When this activity was created',
22217
+ },
22218
+ },
22219
+ },
22220
+ liveStats: {
22221
+ description:
22222
+ 'Live statistics for reports for the current calendar day, filterable by queue, moderator, or report type.',
22223
+ type: 'object',
22224
+ properties: {
22225
+ pendingCount: {
22226
+ type: 'integer',
22227
+ description: 'Number of reports currently not closed.',
22228
+ },
22229
+ actionedCount: {
22230
+ type: 'integer',
22231
+ description: 'Number of reports closed today.',
22232
+ },
22233
+ escalatedCount: {
22234
+ type: 'integer',
22235
+ description: 'Number of reports escalated today.',
22236
+ },
22237
+ inboundCount: {
22238
+ type: 'integer',
22239
+ description: 'Reports received today.',
22240
+ },
22241
+ actionRate: {
22242
+ type: 'integer',
22243
+ description:
22244
+ 'Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer.',
22245
+ },
22246
+ avgHandlingTimeSec: {
22247
+ type: 'integer',
22248
+ description:
22249
+ 'Average time in seconds from report creation (or moderator assignment) to close.',
22250
+ },
22251
+ lastUpdated: {
22252
+ type: 'string',
22253
+ format: 'datetime',
22254
+ description: 'When these statistics were last computed.',
22255
+ },
22256
+ },
22257
+ },
22258
+ historicalStats: {
22259
+ description:
22260
+ 'A single daily snapshot of report statistics for a calendar date.',
22261
+ type: 'object',
22262
+ required: ['date'],
22263
+ properties: {
22264
+ date: {
22265
+ type: 'string',
22266
+ description: 'The calendar date this snapshot covers (YYYY-MM-DD).',
22267
+ },
22268
+ computedAt: {
22269
+ type: 'string',
22270
+ format: 'datetime',
22271
+ description: 'When this snapshot was last computed.',
22272
+ },
22273
+ pendingCount: {
22274
+ type: 'integer',
22275
+ description: 'Number of reports not closed at time of computation.',
22276
+ },
22277
+ actionedCount: {
22278
+ type: 'integer',
22279
+ description: 'Number of reports closed during this day.',
22280
+ },
22281
+ escalatedCount: {
22282
+ type: 'integer',
22283
+ description: 'Number of reports escalated during this day.',
22284
+ },
22285
+ inboundCount: {
22286
+ type: 'integer',
22287
+ description: 'Reports received during this day.',
22288
+ },
22289
+ actionRate: {
22290
+ type: 'integer',
22291
+ description:
22292
+ 'Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer.',
22293
+ },
22294
+ avgHandlingTimeSec: {
22295
+ type: 'integer',
22296
+ description:
22297
+ 'Average time in seconds from report creation (or moderator assignment) to close.',
22298
+ },
22299
+ },
22300
+ },
22301
+ assignmentView: {
22302
+ type: 'object',
22303
+ required: ['id', 'did', 'reportId', 'startAt'],
22304
+ properties: {
22305
+ id: {
22306
+ type: 'integer',
22307
+ },
22308
+ did: {
22309
+ type: 'string',
22310
+ format: 'did',
22311
+ },
22312
+ moderator: {
22313
+ type: 'ref',
22314
+ ref: 'lex:tools.ozone.team.defs#member',
22315
+ description: 'The moderator assigned to this report',
22316
+ },
22317
+ queue: {
22318
+ type: 'ref',
22319
+ ref: 'lex:tools.ozone.queue.defs#queueView',
22320
+ },
22321
+ reportId: {
22322
+ type: 'integer',
22323
+ },
22324
+ startAt: {
22325
+ type: 'string',
22326
+ format: 'datetime',
22327
+ },
22328
+ endAt: {
22329
+ type: 'string',
22330
+ format: 'datetime',
22331
+ },
22332
+ },
22333
+ },
22334
+ },
22335
+ },
22336
+ ToolsOzoneReportGetAssignments: {
22337
+ lexicon: 1,
22338
+ id: 'tools.ozone.report.getAssignments',
22339
+ defs: {
22340
+ main: {
22341
+ type: 'query',
22342
+ description: 'Get assignments for reports.',
22343
+ parameters: {
22344
+ type: 'params',
22345
+ properties: {
22346
+ onlyActive: {
22347
+ type: 'boolean',
22348
+ default: true,
22349
+ description: 'When true, only returns active assignments.',
22350
+ },
22351
+ reportIds: {
22352
+ type: 'array',
22353
+ items: {
22354
+ type: 'integer',
22355
+ },
22356
+ maxLength: 50,
22357
+ description:
22358
+ 'If specified, returns assignments for these reports only.',
22359
+ },
22360
+ dids: {
22361
+ type: 'array',
22362
+ items: {
22363
+ type: 'string',
22364
+ format: 'did',
22365
+ },
22366
+ maxLength: 50,
22367
+ description:
22368
+ 'If specified, returns assignments for these moderators only.',
22369
+ },
22370
+ limit: {
22371
+ type: 'integer',
22372
+ minimum: 1,
22373
+ maximum: 100,
22374
+ default: 50,
22375
+ },
22376
+ cursor: {
22377
+ type: 'string',
22378
+ },
22379
+ },
22380
+ },
22381
+ output: {
22382
+ encoding: 'application/json',
22383
+ schema: {
22384
+ type: 'object',
22385
+ required: ['assignments'],
22386
+ properties: {
22387
+ cursor: {
22388
+ type: 'string',
22389
+ },
22390
+ assignments: {
22391
+ type: 'array',
22392
+ items: {
22393
+ type: 'ref',
22394
+ ref: 'lex:tools.ozone.report.defs#assignmentView',
22395
+ },
22396
+ },
22397
+ },
22398
+ },
22399
+ },
22400
+ },
22401
+ },
22402
+ },
22403
+ ToolsOzoneReportGetHistoricalStats: {
22404
+ lexicon: 1,
22405
+ id: 'tools.ozone.report.getHistoricalStats',
22406
+ defs: {
22407
+ main: {
22408
+ type: 'query',
22409
+ description:
22410
+ 'Get historical daily report statistics. Returns a paginated list of daily stat snapshots, newest first. Filter by queue, moderator, or report type.',
22411
+ parameters: {
22412
+ type: 'params',
22413
+ properties: {
22414
+ queueId: {
22415
+ type: 'integer',
22416
+ description:
22417
+ 'Filter stats by queue. Use -1 for unqueued reports.',
22418
+ },
22419
+ moderatorDid: {
22420
+ type: 'string',
22421
+ format: 'did',
22422
+ description: 'Filter stats by moderator DID.',
22423
+ },
22424
+ reportTypes: {
22425
+ type: 'array',
22426
+ items: {
22427
+ type: 'string',
22428
+ },
22429
+ description: 'Filter stats by report types.',
22430
+ },
22431
+ startDate: {
22432
+ type: 'string',
22433
+ format: 'datetime',
22434
+ description: 'Earliest date to include (inclusive).',
22435
+ },
22436
+ endDate: {
22437
+ type: 'string',
22438
+ format: 'datetime',
22439
+ description: 'Latest date to include (inclusive).',
22440
+ },
22441
+ limit: {
22442
+ type: 'integer',
22443
+ minimum: 1,
22444
+ maximum: 100,
22445
+ default: 30,
22446
+ description: 'Maximum number of entries to return.',
22447
+ },
22448
+ cursor: {
22449
+ type: 'string',
22450
+ description: 'Pagination cursor.',
22451
+ },
22452
+ },
22453
+ },
22454
+ output: {
22455
+ encoding: 'application/json',
22456
+ schema: {
22457
+ type: 'object',
22458
+ required: ['stats'],
22459
+ properties: {
22460
+ stats: {
22461
+ type: 'array',
22462
+ items: {
22463
+ type: 'ref',
22464
+ ref: 'lex:tools.ozone.report.defs#historicalStats',
22465
+ },
22466
+ },
22467
+ cursor: {
22468
+ type: 'string',
22469
+ },
22470
+ },
22471
+ },
22472
+ },
22473
+ },
22474
+ },
22475
+ },
22476
+ ToolsOzoneReportGetLatestReport: {
22477
+ lexicon: 1,
22478
+ id: 'tools.ozone.report.getLatestReport',
22479
+ defs: {
22480
+ main: {
22481
+ type: 'query',
22482
+ description: 'Get the most recent report.',
22483
+ parameters: {
22484
+ type: 'params',
22485
+ properties: {},
22486
+ },
22487
+ output: {
22488
+ encoding: 'application/json',
22489
+ schema: {
22490
+ type: 'object',
22491
+ required: ['report'],
22492
+ properties: {
22493
+ report: {
22494
+ type: 'ref',
22495
+ ref: 'lex:tools.ozone.report.defs#reportView',
22496
+ },
22497
+ },
22498
+ },
22499
+ },
22500
+ errors: [
22501
+ {
22502
+ name: 'NotFound',
22503
+ description: 'No report found.',
22504
+ },
22505
+ ],
22506
+ },
22507
+ },
22508
+ },
22509
+ ToolsOzoneReportGetLiveStats: {
22510
+ lexicon: 1,
22511
+ id: 'tools.ozone.report.getLiveStats',
22512
+ defs: {
22513
+ main: {
22514
+ type: 'query',
22515
+ description:
22516
+ 'Get live report statistics from the past 24 hours. Filter by queue, moderator, or report type. Omit all parameters for aggregate stats.',
22517
+ parameters: {
22518
+ type: 'params',
22519
+ properties: {
22520
+ queueId: {
22521
+ type: 'integer',
22522
+ description:
22523
+ 'Filter stats by queue. Use -1 for unqueued reports.',
22524
+ },
22525
+ moderatorDid: {
22526
+ type: 'string',
22527
+ format: 'did',
22528
+ description: 'Filter stats by moderator DID.',
22529
+ },
22530
+ reportTypes: {
22531
+ type: 'array',
22532
+ items: {
22533
+ type: 'string',
22534
+ },
22535
+ description: 'Filter stats by report types.',
22536
+ },
22537
+ },
22538
+ },
22539
+ output: {
22540
+ encoding: 'application/json',
22541
+ schema: {
22542
+ type: 'object',
22543
+ required: ['stats'],
22544
+ properties: {
22545
+ stats: {
22546
+ type: 'ref',
22547
+ ref: 'lex:tools.ozone.report.defs#liveStats',
22548
+ description: 'Statistics for the requested filter.',
22549
+ },
22550
+ },
22551
+ },
22552
+ },
22553
+ },
22554
+ },
22555
+ },
22556
+ ToolsOzoneReportGetReport: {
22557
+ lexicon: 1,
22558
+ id: 'tools.ozone.report.getReport',
22559
+ defs: {
22560
+ main: {
22561
+ type: 'query',
22562
+ description: 'Get details about a single moderation report by ID.',
22563
+ parameters: {
22564
+ type: 'params',
22565
+ required: ['id'],
22566
+ properties: {
22567
+ id: {
22568
+ type: 'integer',
22569
+ description: 'The ID of the report to retrieve.',
22570
+ },
22571
+ },
22572
+ },
22573
+ output: {
22574
+ encoding: 'application/json',
22575
+ schema: {
22576
+ type: 'ref',
22577
+ ref: 'lex:tools.ozone.report.defs#reportView',
22578
+ },
22579
+ },
22580
+ errors: [
22581
+ {
22582
+ name: 'NotFound',
22583
+ description: 'No report found.',
22584
+ },
22585
+ ],
22586
+ },
22587
+ },
22588
+ },
22589
+ ToolsOzoneReportListActivities: {
22590
+ lexicon: 1,
22591
+ id: 'tools.ozone.report.listActivities',
22592
+ defs: {
22593
+ main: {
22594
+ type: 'query',
22595
+ description:
22596
+ 'List all activities for a report, sorted most-recent-first.',
22597
+ parameters: {
22598
+ type: 'params',
22599
+ required: ['reportId'],
22600
+ properties: {
22601
+ reportId: {
22602
+ type: 'integer',
22603
+ description: 'ID of the report whose activities to list',
22604
+ },
22605
+ limit: {
22606
+ type: 'integer',
22607
+ minimum: 1,
22608
+ maximum: 100,
22609
+ default: 50,
22610
+ },
22611
+ cursor: {
22612
+ type: 'string',
22613
+ },
22614
+ },
22615
+ },
22616
+ output: {
22617
+ encoding: 'application/json',
22618
+ schema: {
22619
+ type: 'object',
22620
+ required: ['activities'],
22621
+ properties: {
22622
+ activities: {
22623
+ type: 'array',
22624
+ items: {
22625
+ type: 'ref',
22626
+ ref: 'lex:tools.ozone.report.defs#reportActivityView',
22627
+ },
22628
+ },
22629
+ cursor: {
22630
+ type: 'string',
22631
+ },
22632
+ },
22633
+ },
22634
+ },
22635
+ },
22636
+ },
22637
+ },
22638
+ ToolsOzoneReportQueryReports: {
22639
+ lexicon: 1,
22640
+ id: 'tools.ozone.report.queryReports',
22641
+ defs: {
22642
+ main: {
22643
+ type: 'query',
22644
+ description:
22645
+ 'View moderation reports. Reports are individual instances of content being reported, as opposed to subject statuses which aggregate reports at the subject level.',
22646
+ parameters: {
22647
+ type: 'params',
22648
+ required: ['status'],
22649
+ properties: {
22650
+ queueId: {
22651
+ type: 'integer',
22652
+ description: 'Filter by queue ID. Use -1 for unassigned reports.',
22653
+ },
22654
+ reportTypes: {
22655
+ type: 'array',
22656
+ items: {
22657
+ type: 'string',
22658
+ },
22659
+ description:
22660
+ 'Filter by report types (fully qualified string in the format of com.atproto.moderation.defs#reason<name>).',
22661
+ },
22662
+ status: {
22663
+ type: 'string',
22664
+ knownValues: [
22665
+ 'open',
22666
+ 'closed',
22667
+ 'escalated',
22668
+ 'queued',
22669
+ 'assigned',
22670
+ ],
22671
+ description: 'Filter by report status.',
22672
+ },
22673
+ subject: {
22674
+ type: 'string',
22675
+ format: 'uri',
22676
+ description: 'Filter by subject DID or AT-URI.',
22677
+ },
22678
+ did: {
22679
+ type: 'string',
22680
+ format: 'did',
22681
+ description:
22682
+ 'Filter to reports where the subject is this DID or any record owned by this DID. Unlike `subject` (which scopes to a specific account or record), this returns all reports tied to the DID across both account-level and record-level subjects.',
22683
+ },
22684
+ subjectType: {
22685
+ type: 'string',
22686
+ description:
22687
+ 'If specified, reports of the given type (account or record) will be returned.',
22688
+ knownValues: ['account', 'record'],
22689
+ },
22690
+ collections: {
22691
+ type: 'array',
22692
+ maxLength: 20,
22693
+ description:
22694
+ "If specified, reports where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
22695
+ items: {
22696
+ type: 'string',
22697
+ format: 'nsid',
22698
+ },
22699
+ },
22700
+ reportedAfter: {
22701
+ type: 'string',
22702
+ format: 'datetime',
22703
+ description: 'Retrieve reports created after a given timestamp',
22704
+ },
22705
+ reportedBefore: {
22706
+ type: 'string',
22707
+ format: 'datetime',
22708
+ description: 'Retrieve reports created before a given timestamp',
22709
+ },
22710
+ isMuted: {
22711
+ type: 'boolean',
22712
+ default: false,
22713
+ description:
22714
+ 'Filter by muted status. true returns only muted reports, false returns only unmuted reports. Defaults to false.',
22715
+ },
22716
+ assignedTo: {
22717
+ type: 'string',
22718
+ format: 'did',
22719
+ description:
22720
+ 'Filter by the DID of the moderator permanently assigned to the report.',
22721
+ },
22722
+ sortField: {
22723
+ type: 'string',
22724
+ default: 'createdAt',
22725
+ enum: ['createdAt', 'updatedAt'],
22726
+ },
22727
+ sortDirection: {
22728
+ type: 'string',
22729
+ default: 'desc',
22730
+ enum: ['asc', 'desc'],
22731
+ },
22732
+ limit: {
22733
+ type: 'integer',
22734
+ minimum: 1,
22735
+ maximum: 100,
22736
+ default: 50,
22737
+ },
22738
+ cursor: {
22739
+ type: 'string',
22740
+ },
22741
+ },
22742
+ },
22743
+ output: {
22744
+ encoding: 'application/json',
22745
+ schema: {
22746
+ type: 'object',
22747
+ required: ['reports'],
22748
+ properties: {
22749
+ cursor: {
22750
+ type: 'string',
22751
+ },
22752
+ reports: {
22753
+ type: 'array',
22754
+ items: {
22755
+ type: 'ref',
22756
+ ref: 'lex:tools.ozone.report.defs#reportView',
22757
+ },
22758
+ },
22759
+ },
22760
+ },
22761
+ },
22762
+ },
22763
+ },
22764
+ },
22765
+ ToolsOzoneReportReassignQueue: {
22766
+ lexicon: 1,
22767
+ id: 'tools.ozone.report.reassignQueue',
22768
+ defs: {
22769
+ main: {
22770
+ type: 'procedure',
22771
+ description:
22772
+ 'Manually reassign a report to a different queue (or unassign it). Records a queueActivity entry on the report.',
22773
+ input: {
22774
+ encoding: 'application/json',
22775
+ schema: {
22776
+ type: 'object',
22777
+ required: ['reportId', 'queueId'],
22778
+ properties: {
22779
+ reportId: {
22780
+ type: 'integer',
22781
+ description: 'ID of the report to reassign',
22782
+ },
22783
+ queueId: {
22784
+ type: 'integer',
22785
+ description:
22786
+ 'Target queue ID. Use -1 to unassign from any queue.',
22787
+ },
22788
+ comment: {
22789
+ type: 'string',
22790
+ description:
22791
+ 'Optional moderator-only note recorded on the resulting queueActivity as internalNote.',
22792
+ },
22793
+ },
22794
+ },
22795
+ },
22796
+ output: {
22797
+ encoding: 'application/json',
22798
+ schema: {
22799
+ type: 'object',
22800
+ required: ['report'],
22801
+ properties: {
22802
+ report: {
22803
+ type: 'ref',
22804
+ ref: 'lex:tools.ozone.report.defs#reportView',
22805
+ },
22806
+ },
22807
+ },
22808
+ },
22809
+ errors: [
22810
+ {
22811
+ name: 'ReportNotFound',
22812
+ description: 'No report exists with the given reportId',
22813
+ },
22814
+ {
22815
+ name: 'ReportClosed',
22816
+ description: 'The report is closed and cannot be reassigned',
22817
+ },
22818
+ {
22819
+ name: 'AlreadyInTargetQueue',
22820
+ description: 'The report is already assigned to the target queue',
22821
+ },
22822
+ {
22823
+ name: 'QueueNotFound',
22824
+ description: 'No active queue exists with the given queueId',
22825
+ },
22826
+ {
22827
+ name: 'QueueDisabled',
22828
+ description:
22829
+ 'The target queue is disabled and cannot receive new assignments',
22830
+ },
22831
+ ],
22832
+ },
22833
+ },
22834
+ },
22835
+ ToolsOzoneReportRefreshStats: {
22836
+ lexicon: 1,
22837
+ id: 'tools.ozone.report.refreshStats',
22838
+ defs: {
22839
+ main: {
22840
+ type: 'procedure',
22841
+ description:
22842
+ 'Recompute report statistics for a date range. Useful for backfilling after failures or data corrections.',
22843
+ input: {
22844
+ encoding: 'application/json',
22845
+ schema: {
22846
+ type: 'object',
22847
+ required: ['startDate', 'endDate'],
22848
+ properties: {
22849
+ startDate: {
22850
+ type: 'string',
22851
+ description:
22852
+ 'Start date for recomputation, inclusive (YYYY-MM-DD).',
22853
+ },
22854
+ endDate: {
22855
+ type: 'string',
22856
+ description:
22857
+ 'End date for recomputation, inclusive (YYYY-MM-DD).',
22858
+ },
22859
+ queueIds: {
22860
+ type: 'array',
22861
+ items: {
22862
+ type: 'integer',
22863
+ },
22864
+ description:
22865
+ 'Optional list of queue IDs to recompute. Omit to recompute all groups.',
22866
+ },
22867
+ },
22868
+ },
22869
+ },
22870
+ output: {
22871
+ encoding: 'application/json',
22872
+ schema: {
22873
+ type: 'object',
22874
+ properties: {},
22875
+ },
22876
+ },
22877
+ },
22878
+ },
22879
+ },
22880
+ ToolsOzoneReportUnassignModerator: {
22881
+ lexicon: 1,
22882
+ id: 'tools.ozone.report.unassignModerator',
22883
+ defs: {
22884
+ main: {
22885
+ type: 'procedure',
22886
+ description: 'Remove report assignment.',
22887
+ input: {
22888
+ encoding: 'application/json',
22889
+ schema: {
22890
+ type: 'object',
22891
+ required: ['reportId'],
22892
+ properties: {
22893
+ reportId: {
22894
+ type: 'integer',
22895
+ description: 'The ID of the report to unassign.',
22896
+ },
22897
+ },
22898
+ },
22899
+ },
22900
+ output: {
22901
+ encoding: 'application/json',
22902
+ schema: {
22903
+ type: 'ref',
22904
+ ref: 'lex:tools.ozone.report.defs#assignmentView',
22905
+ },
22906
+ },
22907
+ errors: [
22908
+ {
22909
+ name: 'InvalidAssignment',
22910
+ description: 'The report ID is invalid.',
22911
+ },
22912
+ ],
22913
+ },
21191
22914
  },
21192
22915
  },
21193
22916
  ToolsOzoneSafelinkAddRule: {
@@ -23374,7 +25097,28 @@ export const ids = {
23374
25097
  ToolsOzoneModerationQueryStatuses: 'tools.ozone.moderation.queryStatuses',
23375
25098
  ToolsOzoneModerationScheduleAction: 'tools.ozone.moderation.scheduleAction',
23376
25099
  ToolsOzoneModerationSearchRepos: 'tools.ozone.moderation.searchRepos',
25100
+ ToolsOzoneQueueAssignModerator: 'tools.ozone.queue.assignModerator',
25101
+ ToolsOzoneQueueCreateQueue: 'tools.ozone.queue.createQueue',
25102
+ ToolsOzoneQueueDefs: 'tools.ozone.queue.defs',
25103
+ ToolsOzoneQueueDeleteQueue: 'tools.ozone.queue.deleteQueue',
25104
+ ToolsOzoneQueueGetAssignments: 'tools.ozone.queue.getAssignments',
25105
+ ToolsOzoneQueueListQueues: 'tools.ozone.queue.listQueues',
25106
+ ToolsOzoneQueueRouteReports: 'tools.ozone.queue.routeReports',
25107
+ ToolsOzoneQueueUnassignModerator: 'tools.ozone.queue.unassignModerator',
25108
+ ToolsOzoneQueueUpdateQueue: 'tools.ozone.queue.updateQueue',
25109
+ ToolsOzoneReportAssignModerator: 'tools.ozone.report.assignModerator',
25110
+ ToolsOzoneReportCreateActivity: 'tools.ozone.report.createActivity',
23377
25111
  ToolsOzoneReportDefs: 'tools.ozone.report.defs',
25112
+ ToolsOzoneReportGetAssignments: 'tools.ozone.report.getAssignments',
25113
+ ToolsOzoneReportGetHistoricalStats: 'tools.ozone.report.getHistoricalStats',
25114
+ ToolsOzoneReportGetLatestReport: 'tools.ozone.report.getLatestReport',
25115
+ ToolsOzoneReportGetLiveStats: 'tools.ozone.report.getLiveStats',
25116
+ ToolsOzoneReportGetReport: 'tools.ozone.report.getReport',
25117
+ ToolsOzoneReportListActivities: 'tools.ozone.report.listActivities',
25118
+ ToolsOzoneReportQueryReports: 'tools.ozone.report.queryReports',
25119
+ ToolsOzoneReportReassignQueue: 'tools.ozone.report.reassignQueue',
25120
+ ToolsOzoneReportRefreshStats: 'tools.ozone.report.refreshStats',
25121
+ ToolsOzoneReportUnassignModerator: 'tools.ozone.report.unassignModerator',
23378
25122
  ToolsOzoneSafelinkAddRule: 'tools.ozone.safelink.addRule',
23379
25123
  ToolsOzoneSafelinkDefs: 'tools.ozone.safelink.defs',
23380
25124
  ToolsOzoneSafelinkQueryEvents: 'tools.ozone.safelink.queryEvents',