@atproto/ozone 0.1.173 → 0.1.174
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.
- package/CHANGELOG.md +9 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +40 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/moderation/emitEvent.d.ts.map +1 -1
- package/dist/api/moderation/emitEvent.js +31 -0
- package/dist/api/moderation/emitEvent.js.map +1 -1
- package/dist/api/queue/assignModerator.d.ts +4 -0
- package/dist/api/queue/assignModerator.d.ts.map +1 -0
- package/dist/api/queue/assignModerator.js +28 -0
- package/dist/api/queue/assignModerator.js.map +1 -0
- package/dist/api/queue/createQueue.d.ts +4 -0
- package/dist/api/queue/createQueue.d.ts.map +1 -0
- package/dist/api/queue/createQueue.js +44 -0
- package/dist/api/queue/createQueue.js.map +1 -0
- package/dist/api/queue/deleteQueue.d.ts +4 -0
- package/dist/api/queue/deleteQueue.d.ts.map +1 -0
- package/dist/api/queue/deleteQueue.js +40 -0
- package/dist/api/queue/deleteQueue.js.map +1 -0
- package/dist/api/queue/getAssignments.d.ts +4 -0
- package/dist/api/queue/getAssignments.d.ts.map +1 -0
- package/dist/api/queue/getAssignments.js +19 -0
- package/dist/api/queue/getAssignments.js.map +1 -0
- package/dist/api/queue/listQueues.d.ts +4 -0
- package/dist/api/queue/listQueues.d.ts.map +1 -0
- package/dist/api/queue/listQueues.js +29 -0
- package/dist/api/queue/listQueues.js.map +1 -0
- package/dist/api/queue/routeReports.d.ts +4 -0
- package/dist/api/queue/routeReports.d.ts.map +1 -0
- package/dist/api/queue/routeReports.js +33 -0
- package/dist/api/queue/routeReports.js.map +1 -0
- package/dist/api/queue/unassignModerator.d.ts +4 -0
- package/dist/api/queue/unassignModerator.d.ts.map +1 -0
- package/dist/api/queue/unassignModerator.js +24 -0
- package/dist/api/queue/unassignModerator.js.map +1 -0
- package/dist/api/queue/updateQueue.d.ts +4 -0
- package/dist/api/queue/updateQueue.d.ts.map +1 -0
- package/dist/api/queue/updateQueue.js +39 -0
- package/dist/api/queue/updateQueue.js.map +1 -0
- package/dist/api/report/assignModerator.d.ts +4 -0
- package/dist/api/report/assignModerator.d.ts.map +1 -0
- package/dist/api/report/assignModerator.js +33 -0
- package/dist/api/report/assignModerator.js.map +1 -0
- package/dist/api/report/createActivity.d.ts +4 -0
- package/dist/api/report/createActivity.d.ts.map +1 -0
- package/dist/api/report/createActivity.js +44 -0
- package/dist/api/report/createActivity.js.map +1 -0
- package/dist/api/report/getAssignments.d.ts +4 -0
- package/dist/api/report/getAssignments.d.ts.map +1 -0
- package/dist/api/report/getAssignments.js +19 -0
- package/dist/api/report/getAssignments.js.map +1 -0
- package/dist/api/report/getHistoricalStats.d.ts +4 -0
- package/dist/api/report/getHistoricalStats.d.ts.map +1 -0
- package/dist/api/report/getHistoricalStats.js +32 -0
- package/dist/api/report/getHistoricalStats.js.map +1 -0
- package/dist/api/report/getLatestReport.d.ts +4 -0
- package/dist/api/report/getLatestReport.d.ts.map +1 -0
- package/dist/api/report/getLatestReport.js +31 -0
- package/dist/api/report/getLatestReport.js.map +1 -0
- package/dist/api/report/getLiveStats.d.ts +4 -0
- package/dist/api/report/getLiveStats.d.ts.map +1 -0
- package/dist/api/report/getLiveStats.js +25 -0
- package/dist/api/report/getLiveStats.js.map +1 -0
- package/dist/api/report/getReport.d.ts +4 -0
- package/dist/api/report/getReport.d.ts.map +1 -0
- package/dist/api/report/getReport.js +35 -0
- package/dist/api/report/getReport.js.map +1 -0
- package/dist/api/report/listActivities.d.ts +4 -0
- package/dist/api/report/listActivities.d.ts.map +1 -0
- package/dist/api/report/listActivities.js +25 -0
- package/dist/api/report/listActivities.js.map +1 -0
- package/dist/api/report/queryReports.d.ts +4 -0
- package/dist/api/report/queryReports.d.ts.map +1 -0
- package/dist/api/report/queryReports.js +29 -0
- package/dist/api/report/queryReports.js.map +1 -0
- package/dist/api/report/reassignQueue.d.ts +4 -0
- package/dist/api/report/reassignQueue.d.ts.map +1 -0
- package/dist/api/report/reassignQueue.js +45 -0
- package/dist/api/report/reassignQueue.js.map +1 -0
- package/dist/api/report/refreshStats.d.ts +4 -0
- package/dist/api/report/refreshStats.d.ts.map +1 -0
- package/dist/api/report/refreshStats.js +26 -0
- package/dist/api/report/refreshStats.js.map +1 -0
- package/dist/api/report/unassignModerator.d.ts +4 -0
- package/dist/api/report/unassignModerator.d.ts.map +1 -0
- package/dist/api/report/unassignModerator.js +21 -0
- package/dist/api/report/unassignModerator.js.map +1 -0
- package/dist/api/util.d.ts +2 -0
- package/dist/api/util.d.ts.map +1 -1
- package/dist/api/util.js +9 -1
- package/dist/api/util.js.map +1 -1
- package/dist/assignment/index.d.ts +89 -0
- package/dist/assignment/index.d.ts.map +1 -0
- package/dist/assignment/index.js +537 -0
- package/dist/assignment/index.js.map +1 -0
- package/dist/config/config.d.ts +14 -0
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +9 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/env.d.ts +3 -0
- package/dist/config/env.d.ts.map +1 -1
- package/dist/config/env.js +3 -0
- package/dist/config/env.js.map +1 -1
- package/dist/context.d.ts +9 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +31 -10
- package/dist/context.js.map +1 -1
- package/dist/daemon/context.d.ts +6 -0
- package/dist/daemon/context.d.ts.map +1 -1
- package/dist/daemon/context.js +28 -4
- package/dist/daemon/context.js.map +1 -1
- package/dist/daemon/job-cursor.d.ts +5 -0
- package/dist/daemon/job-cursor.d.ts.map +1 -0
- package/dist/daemon/job-cursor.js +28 -0
- package/dist/daemon/job-cursor.js.map +1 -0
- package/dist/daemon/queue-router.d.ts +17 -0
- package/dist/daemon/queue-router.d.ts.map +1 -0
- package/dist/daemon/queue-router.js +114 -0
- package/dist/daemon/queue-router.js.map +1 -0
- package/dist/daemon/stats-computer.d.ts +51 -0
- package/dist/daemon/stats-computer.d.ts.map +1 -0
- package/dist/daemon/stats-computer.js +117 -0
- package/dist/daemon/stats-computer.js.map +1 -0
- package/dist/daemon/strike-expiry-processor.d.ts.map +1 -1
- package/dist/daemon/strike-expiry-processor.js +4 -19
- package/dist/daemon/strike-expiry-processor.js.map +1 -1
- package/dist/db/migrations/20260219T164523000Z-create-report-table.d.ts +4 -0
- package/dist/db/migrations/20260219T164523000Z-create-report-table.d.ts.map +1 -0
- package/dist/db/migrations/20260219T164523000Z-create-report-table.js +126 -0
- package/dist/db/migrations/20260219T164523000Z-create-report-table.js.map +1 -0
- package/dist/db/migrations/20260219T165302248Z-moderator-assignment.d.ts +4 -0
- package/dist/db/migrations/20260219T165302248Z-moderator-assignment.d.ts.map +1 -0
- package/dist/db/migrations/20260219T165302248Z-moderator-assignment.js +35 -0
- package/dist/db/migrations/20260219T165302248Z-moderator-assignment.js.map +1 -0
- package/dist/db/migrations/20260225T000000000Z-add-report-queue-table.d.ts +4 -0
- package/dist/db/migrations/20260225T000000000Z-add-report-queue-table.d.ts.map +1 -0
- package/dist/db/migrations/20260225T000000000Z-add-report-queue-table.js +36 -0
- package/dist/db/migrations/20260225T000000000Z-add-report-queue-table.js.map +1 -0
- package/dist/db/migrations/20260313T000000000Z-add-report-activity-table.d.ts +4 -0
- package/dist/db/migrations/20260313T000000000Z-add-report-activity-table.d.ts.map +1 -0
- package/dist/db/migrations/20260313T000000000Z-add-report-activity-table.js +39 -0
- package/dist/db/migrations/20260313T000000000Z-add-report-activity-table.js.map +1 -0
- package/dist/db/migrations/20260318T152058935Z-add-report-stat.d.ts +4 -0
- package/dist/db/migrations/20260318T152058935Z-add-report-stat.d.ts.map +1 -0
- package/dist/db/migrations/20260318T152058935Z-add-report-stat.js +34 -0
- package/dist/db/migrations/20260318T152058935Z-add-report-stat.js.map +1 -0
- package/dist/db/migrations/index.d.ts +5 -0
- package/dist/db/migrations/index.d.ts.map +1 -1
- package/dist/db/migrations/index.js +6 -1
- package/dist/db/migrations/index.js.map +1 -1
- package/dist/db/pagination.d.ts +31 -0
- package/dist/db/pagination.d.ts.map +1 -1
- package/dist/db/pagination.js +74 -1
- package/dist/db/pagination.js.map +1 -1
- package/dist/db/schema/index.d.ts +6 -1
- package/dist/db/schema/index.d.ts.map +1 -1
- package/dist/db/schema/index.js.map +1 -1
- package/dist/db/schema/moderator_assignment.d.ts +14 -0
- package/dist/db/schema/moderator_assignment.d.ts.map +1 -0
- package/dist/db/schema/moderator_assignment.js +5 -0
- package/dist/db/schema/moderator_assignment.js.map +1 -0
- package/dist/db/schema/report.d.ts +25 -0
- package/dist/db/schema/report.d.ts.map +1 -0
- package/dist/db/schema/report.js +5 -0
- package/dist/db/schema/report.js.map +1 -0
- package/dist/db/schema/report_activity.d.ts +18 -0
- package/dist/db/schema/report_activity.d.ts.map +1 -0
- package/dist/db/schema/report_activity.js +5 -0
- package/dist/db/schema/report_activity.js.map +1 -0
- package/dist/db/schema/report_queue.d.ts +19 -0
- package/dist/db/schema/report_queue.d.ts.map +1 -0
- package/dist/db/schema/report_queue.js +5 -0
- package/dist/db/schema/report_queue.js.map +1 -0
- package/dist/db/schema/report_stat.d.ts +20 -0
- package/dist/db/schema/report_stat.d.ts.map +1 -0
- package/dist/db/schema/report_stat.js +5 -0
- package/dist/db/schema/report_stat.js.map +1 -0
- package/dist/lexicon/index.d.ts +50 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +120 -2
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +10535 -7389
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +1789 -122
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/external.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/embed/external.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/external.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts +19 -0
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.js +9 -0
- package/dist/lexicon/types/tools/ozone/moderation/emitEvent.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/queue/assignModerator.d.ts +27 -0
- package/dist/lexicon/types/tools/ozone/queue/assignModerator.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/assignModerator.js +7 -0
- package/dist/lexicon/types/tools/ozone/queue/assignModerator.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/createQueue.d.ts +35 -0
- package/dist/lexicon/types/tools/ozone/queue/createQueue.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/createQueue.js +7 -0
- package/dist/lexicon/types/tools/ozone/queue/createQueue.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/defs.d.ts +62 -0
- package/dist/lexicon/types/tools/ozone/queue/defs.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/defs.js +34 -0
- package/dist/lexicon/types/tools/ozone/queue/defs.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/deleteQueue.d.ts +29 -0
- package/dist/lexicon/types/tools/ozone/queue/deleteQueue.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/deleteQueue.js +7 -0
- package/dist/lexicon/types/tools/ozone/queue/deleteQueue.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/getAssignments.d.ts +30 -0
- package/dist/lexicon/types/tools/ozone/queue/getAssignments.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/getAssignments.js +7 -0
- package/dist/lexicon/types/tools/ozone/queue/getAssignments.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/listQueues.d.ts +32 -0
- package/dist/lexicon/types/tools/ozone/queue/listQueues.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/listQueues.js +7 -0
- package/dist/lexicon/types/tools/ozone/queue/listQueues.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/routeReports.d.ts +31 -0
- package/dist/lexicon/types/tools/ozone/queue/routeReports.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/routeReports.js +7 -0
- package/dist/lexicon/types/tools/ozone/queue/routeReports.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/unassignModerator.d.ts +18 -0
- package/dist/lexicon/types/tools/ozone/queue/unassignModerator.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/unassignModerator.js +7 -0
- package/dist/lexicon/types/tools/ozone/queue/unassignModerator.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/updateQueue.d.ts +32 -0
- package/dist/lexicon/types/tools/ozone/queue/updateQueue.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/queue/updateQueue.js +7 -0
- package/dist/lexicon/types/tools/ozone/queue/updateQueue.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/assignModerator.d.ts +31 -0
- package/dist/lexicon/types/tools/ozone/report/assignModerator.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/assignModerator.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/assignModerator.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/createActivity.d.ts +37 -0
- package/dist/lexicon/types/tools/ozone/report/createActivity.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/createActivity.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/createActivity.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/defs.d.ts +185 -0
- package/dist/lexicon/types/tools/ozone/report/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/report/defs.js +108 -0
- package/dist/lexicon/types/tools/ozone/report/defs.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/report/getAssignments.d.ts +30 -0
- package/dist/lexicon/types/tools/ozone/report/getAssignments.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/getAssignments.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/getAssignments.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/getHistoricalStats.d.ts +36 -0
- package/dist/lexicon/types/tools/ozone/report/getHistoricalStats.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/getHistoricalStats.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/getHistoricalStats.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/getLatestReport.d.ts +21 -0
- package/dist/lexicon/types/tools/ozone/report/getLatestReport.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/getLatestReport.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/getLatestReport.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/getLiveStats.d.ts +27 -0
- package/dist/lexicon/types/tools/ozone/report/getLiveStats.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/getLiveStats.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/getLiveStats.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/getReport.d.ts +22 -0
- package/dist/lexicon/types/tools/ozone/report/getReport.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/getReport.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/getReport.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/listActivities.d.ts +26 -0
- package/dist/lexicon/types/tools/ozone/report/listActivities.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/listActivities.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/listActivities.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/queryReports.d.ts +48 -0
- package/dist/lexicon/types/tools/ozone/report/queryReports.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/queryReports.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/queryReports.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/reassignQueue.d.ts +31 -0
- package/dist/lexicon/types/tools/ozone/report/reassignQueue.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/reassignQueue.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/reassignQueue.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/refreshStats.d.ts +28 -0
- package/dist/lexicon/types/tools/ozone/report/refreshStats.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/refreshStats.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/refreshStats.js.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/unassignModerator.d.ts +25 -0
- package/dist/lexicon/types/tools/ozone/report/unassignModerator.d.ts.map +1 -0
- package/dist/lexicon/types/tools/ozone/report/unassignModerator.js +7 -0
- package/dist/lexicon/types/tools/ozone/report/unassignModerator.js.map +1 -0
- package/dist/mod-service/index.d.ts +3 -1
- package/dist/mod-service/index.d.ts.map +1 -1
- package/dist/mod-service/index.js +39 -2
- package/dist/mod-service/index.js.map +1 -1
- package/dist/mod-service/report.d.ts +64 -0
- package/dist/mod-service/report.d.ts.map +1 -0
- package/dist/mod-service/report.js +282 -0
- package/dist/mod-service/report.js.map +1 -0
- package/dist/mod-service/status.d.ts +20 -0
- package/dist/mod-service/status.d.ts.map +1 -1
- package/dist/queue/service.d.ts +86 -0
- package/dist/queue/service.d.ts.map +1 -0
- package/dist/queue/service.js +430 -0
- package/dist/queue/service.js.map +1 -0
- package/dist/report/activity.d.ts +77 -0
- package/dist/report/activity.d.ts.map +1 -0
- package/dist/report/activity.js +141 -0
- package/dist/report/activity.js.map +1 -0
- package/dist/report/handle-report-update.d.ts +47 -0
- package/dist/report/handle-report-update.d.ts.map +1 -0
- package/dist/report/handle-report-update.js +178 -0
- package/dist/report/handle-report-update.js.map +1 -0
- package/dist/report/reassign.d.ts +10 -0
- package/dist/report/reassign.d.ts.map +1 -0
- package/dist/report/reassign.js +75 -0
- package/dist/report/reassign.js.map +1 -0
- package/dist/report/stats.d.ts +105 -0
- package/dist/report/stats.d.ts.map +1 -0
- package/dist/report/stats.js +619 -0
- package/dist/report/stats.js.map +1 -0
- package/dist/report/views.d.ts +111 -0
- package/dist/report/views.d.ts.map +1 -0
- package/dist/report/views.js +156 -0
- package/dist/report/views.js.map +1 -0
- package/dist/team/index.d.ts +1 -0
- package/dist/team/index.d.ts.map +1 -1
- package/dist/team/index.js +11 -0
- package/dist/team/index.js.map +1 -1
- package/package.json +3 -3
- package/src/api/index.ts +40 -0
- package/src/api/moderation/emitEvent.ts +38 -0
- package/src/api/queue/assignModerator.ts +31 -0
- package/src/api/queue/createQueue.ts +62 -0
- package/src/api/queue/deleteQueue.ts +56 -0
- package/src/api/queue/getAssignments.ts +19 -0
- package/src/api/queue/listQueues.ts +39 -0
- package/src/api/queue/routeReports.ts +44 -0
- package/src/api/queue/unassignModerator.ts +26 -0
- package/src/api/queue/updateQueue.ts +54 -0
- package/src/api/report/assignModerator.ts +36 -0
- package/src/api/report/createActivity.ts +57 -0
- package/src/api/report/getAssignments.ts +20 -0
- package/src/api/report/getHistoricalStats.ts +41 -0
- package/src/api/report/getLatestReport.ts +44 -0
- package/src/api/report/getLiveStats.ts +26 -0
- package/src/api/report/getReport.ts +55 -0
- package/src/api/report/listActivities.ts +34 -0
- package/src/api/report/queryReports.ts +44 -0
- package/src/api/report/reassignQueue.ts +68 -0
- package/src/api/report/refreshStats.ts +27 -0
- package/src/api/report/unassignModerator.ts +21 -0
- package/src/api/util.ts +12 -0
- package/src/assignment/index.ts +731 -0
- package/src/config/config.ts +27 -0
- package/src/config/env.ts +8 -0
- package/src/context.ts +31 -0
- package/src/daemon/context.ts +34 -0
- package/src/daemon/job-cursor.ts +33 -0
- package/src/daemon/queue-router.ts +101 -0
- package/src/daemon/stats-computer.ts +101 -0
- package/src/daemon/strike-expiry-processor.ts +4 -20
- package/src/db/migrations/20260219T164523000Z-create-report-table.ts +155 -0
- package/src/db/migrations/20260219T165302248Z-moderator-assignment.ts +42 -0
- package/src/db/migrations/20260225T000000000Z-add-report-queue-table.ts +41 -0
- package/src/db/migrations/20260313T000000000Z-add-report-activity-table.ts +48 -0
- package/src/db/migrations/20260318T152058935Z-add-report-stat.ts +35 -0
- package/src/db/migrations/index.ts +5 -0
- package/src/db/pagination.ts +85 -0
- package/src/db/schema/index.ts +10 -0
- package/src/db/schema/moderator_assignment.ts +16 -0
- package/src/db/schema/report.ts +27 -0
- package/src/db/schema/report_activity.ts +22 -0
- package/src/db/schema/report_queue.ts +21 -0
- package/src/db/schema/report_stat.ts +27 -0
- package/src/lexicon/index.ts +280 -0
- package/src/lexicon/lexicons.ts +1910 -160
- package/src/lexicon/types/app/bsky/embed/external.ts +2 -0
- package/src/lexicon/types/tools/ozone/moderation/emitEvent.ts +24 -0
- package/src/lexicon/types/tools/ozone/queue/assignModerator.ts +46 -0
- package/src/lexicon/types/tools/ozone/queue/createQueue.ts +54 -0
- package/src/lexicon/types/tools/ozone/queue/defs.ts +99 -0
- package/src/lexicon/types/tools/ozone/queue/deleteQueue.ts +48 -0
- package/src/lexicon/types/tools/ozone/queue/getAssignments.ts +48 -0
- package/src/lexicon/types/tools/ozone/queue/listQueues.ts +50 -0
- package/src/lexicon/types/tools/ozone/queue/routeReports.ts +50 -0
- package/src/lexicon/types/tools/ozone/queue/unassignModerator.ts +37 -0
- package/src/lexicon/types/tools/ozone/queue/updateQueue.ts +51 -0
- package/src/lexicon/types/tools/ozone/report/assignModerator.ts +50 -0
- package/src/lexicon/types/tools/ozone/report/createActivity.ts +60 -0
- package/src/lexicon/types/tools/ozone/report/defs.ts +327 -0
- package/src/lexicon/types/tools/ozone/report/getAssignments.ts +48 -0
- package/src/lexicon/types/tools/ozone/report/getHistoricalStats.ts +54 -0
- package/src/lexicon/types/tools/ozone/report/getLatestReport.ts +39 -0
- package/src/lexicon/types/tools/ozone/report/getLiveStats.ts +45 -0
- package/src/lexicon/types/tools/ozone/report/getReport.ts +38 -0
- package/src/lexicon/types/tools/ozone/report/listActivities.ts +44 -0
- package/src/lexicon/types/tools/ozone/report/queryReports.ts +72 -0
- package/src/lexicon/types/tools/ozone/report/reassignQueue.ts +55 -0
- package/src/lexicon/types/tools/ozone/report/refreshStats.ts +46 -0
- package/src/lexicon/types/tools/ozone/report/unassignModerator.ts +44 -0
- package/src/mod-service/index.ts +45 -3
- package/src/mod-service/report.ts +408 -0
- package/src/queue/service.ts +599 -0
- package/src/report/activity.ts +234 -0
- package/src/report/handle-report-update.ts +209 -0
- package/src/report/reassign.ts +109 -0
- package/src/report/stats.ts +850 -0
- package/src/report/views.ts +241 -0
- package/src/team/index.ts +11 -0
- package/tests/get-report.test.ts +136 -0
- package/tests/query-reports.test.ts +608 -0
- package/tests/queue-assignment.test.ts +428 -0
- package/tests/queue-router.test.ts +306 -0
- package/tests/queues.test.ts +690 -0
- package/tests/report-action.test.ts +308 -0
- package/tests/report-activity.test.ts +567 -0
- package/tests/report-assignment.test.ts +517 -0
- package/tests/report-reassign-queue.test.ts +340 -0
- package/tests/report-routing.test.ts +245 -0
- package/tests/report-stats.test.ts +545 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -9,6 +9,10 @@ import {
|
|
|
9
9
|
is$typed as _is$typed,
|
|
10
10
|
type OmitKey,
|
|
11
11
|
} from '../../../../util'
|
|
12
|
+
import type * as ToolsOzoneTeamDefs from '../team/defs.js'
|
|
13
|
+
import type * as ToolsOzoneModerationDefs from '../moderation/defs.js'
|
|
14
|
+
import type * as ComAtprotoModerationDefs from '../../../com/atproto/moderation/defs.js'
|
|
15
|
+
import type * as ToolsOzoneQueueDefs from '../queue/defs.js'
|
|
12
16
|
|
|
13
17
|
const is$typed = _is$typed,
|
|
14
18
|
validate = _validate
|
|
@@ -137,3 +141,326 @@ export const REASONSELFHARMSTUNTS = `${id}#reasonSelfHarmStunts`
|
|
|
137
141
|
export const REASONSELFHARMSUBSTANCES = `${id}#reasonSelfHarmSubstances`
|
|
138
142
|
/** Other dangerous content */
|
|
139
143
|
export const REASONSELFHARMOTHER = `${id}#reasonSelfHarmOther`
|
|
144
|
+
|
|
145
|
+
/** Information about the moderator currently assigned to a report. */
|
|
146
|
+
export interface ReportAssignment {
|
|
147
|
+
$type?: 'tools.ozone.report.defs#reportAssignment'
|
|
148
|
+
/** DID of the assigned moderator */
|
|
149
|
+
did: string
|
|
150
|
+
moderator?: ToolsOzoneTeamDefs.Member
|
|
151
|
+
/** When the report was assigned */
|
|
152
|
+
assignedAt: string
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const hashReportAssignment = 'reportAssignment'
|
|
156
|
+
|
|
157
|
+
export function isReportAssignment<V>(v: V) {
|
|
158
|
+
return is$typed(v, id, hashReportAssignment)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function validateReportAssignment<V>(v: V) {
|
|
162
|
+
return validate<ReportAssignment & V>(v, id, hashReportAssignment)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface ReportView {
|
|
166
|
+
$type?: 'tools.ozone.report.defs#reportView'
|
|
167
|
+
/** Report ID */
|
|
168
|
+
id: number
|
|
169
|
+
/** ID of the moderation event that created this report */
|
|
170
|
+
eventId: number
|
|
171
|
+
/** Current status of the report */
|
|
172
|
+
status:
|
|
173
|
+
| 'open'
|
|
174
|
+
| 'closed'
|
|
175
|
+
| 'escalated'
|
|
176
|
+
| 'queued'
|
|
177
|
+
| 'assigned'
|
|
178
|
+
| (string & {})
|
|
179
|
+
subject: ToolsOzoneModerationDefs.SubjectView
|
|
180
|
+
reportType: ComAtprotoModerationDefs.ReasonType
|
|
181
|
+
/** DID of the user who made the report */
|
|
182
|
+
reportedBy: string
|
|
183
|
+
reporter: ToolsOzoneModerationDefs.SubjectView
|
|
184
|
+
/** Comment provided by the reporter */
|
|
185
|
+
comment?: string
|
|
186
|
+
/** When the report was created */
|
|
187
|
+
createdAt: string
|
|
188
|
+
/** When the report was last updated */
|
|
189
|
+
updatedAt?: string
|
|
190
|
+
/** When the report was assigned to its current queue */
|
|
191
|
+
queuedAt?: string
|
|
192
|
+
/** Array of moderation event IDs representing actions taken on this report (sorted DESC, most recent first) */
|
|
193
|
+
actionEventIds?: number[]
|
|
194
|
+
/** Optional: expanded action events */
|
|
195
|
+
actions?: ToolsOzoneModerationDefs.ModEventView[]
|
|
196
|
+
/** Note sent to reporter when report was actioned */
|
|
197
|
+
actionNote?: string
|
|
198
|
+
subjectStatus?: ToolsOzoneModerationDefs.SubjectStatusView
|
|
199
|
+
/** Number of other pending reports on the same subject */
|
|
200
|
+
relatedReportCount?: number
|
|
201
|
+
assignment?: ReportAssignment
|
|
202
|
+
queue?: ToolsOzoneQueueDefs.QueueView
|
|
203
|
+
/** 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. */
|
|
204
|
+
isMuted?: boolean
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const hashReportView = 'reportView'
|
|
208
|
+
|
|
209
|
+
export function isReportView<V>(v: V) {
|
|
210
|
+
return is$typed(v, id, hashReportView)
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function validateReportView<V>(v: V) {
|
|
214
|
+
return validate<ReportView & V>(v, id, hashReportView)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** Activity recording a report being routed to a queue. */
|
|
218
|
+
export interface QueueActivity {
|
|
219
|
+
$type?: 'tools.ozone.report.defs#queueActivity'
|
|
220
|
+
/** The report's status before this activity. Populated automatically from the report row; not required in input. */
|
|
221
|
+
previousStatus?:
|
|
222
|
+
| 'open'
|
|
223
|
+
| 'closed'
|
|
224
|
+
| 'escalated'
|
|
225
|
+
| 'queued'
|
|
226
|
+
| 'assigned'
|
|
227
|
+
| (string & {})
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const hashQueueActivity = 'queueActivity'
|
|
231
|
+
|
|
232
|
+
export function isQueueActivity<V>(v: V) {
|
|
233
|
+
return is$typed(v, id, hashQueueActivity)
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function validateQueueActivity<V>(v: V) {
|
|
237
|
+
return validate<QueueActivity & V>(v, id, hashQueueActivity)
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/** Activity recording a moderator being assigned to a report. */
|
|
241
|
+
export interface AssignmentActivity {
|
|
242
|
+
$type?: 'tools.ozone.report.defs#assignmentActivity'
|
|
243
|
+
/** The report's status before this activity. Populated automatically from the report row; not required in input. */
|
|
244
|
+
previousStatus?:
|
|
245
|
+
| 'open'
|
|
246
|
+
| 'closed'
|
|
247
|
+
| 'escalated'
|
|
248
|
+
| 'queued'
|
|
249
|
+
| 'assigned'
|
|
250
|
+
| (string & {})
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
const hashAssignmentActivity = 'assignmentActivity'
|
|
254
|
+
|
|
255
|
+
export function isAssignmentActivity<V>(v: V) {
|
|
256
|
+
return is$typed(v, id, hashAssignmentActivity)
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export function validateAssignmentActivity<V>(v: V) {
|
|
260
|
+
return validate<AssignmentActivity & V>(v, id, hashAssignmentActivity)
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/** Activity recording a report being escalated. */
|
|
264
|
+
export interface EscalationActivity {
|
|
265
|
+
$type?: 'tools.ozone.report.defs#escalationActivity'
|
|
266
|
+
/** The report's status before this activity. Populated automatically from the report row; not required in input. */
|
|
267
|
+
previousStatus?:
|
|
268
|
+
| 'open'
|
|
269
|
+
| 'closed'
|
|
270
|
+
| 'escalated'
|
|
271
|
+
| 'queued'
|
|
272
|
+
| 'assigned'
|
|
273
|
+
| (string & {})
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const hashEscalationActivity = 'escalationActivity'
|
|
277
|
+
|
|
278
|
+
export function isEscalationActivity<V>(v: V) {
|
|
279
|
+
return is$typed(v, id, hashEscalationActivity)
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export function validateEscalationActivity<V>(v: V) {
|
|
283
|
+
return validate<EscalationActivity & V>(v, id, hashEscalationActivity)
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/** Activity recording a report being closed. */
|
|
287
|
+
export interface CloseActivity {
|
|
288
|
+
$type?: 'tools.ozone.report.defs#closeActivity'
|
|
289
|
+
/** The report's status before this activity. Populated automatically from the report row; not required in input. */
|
|
290
|
+
previousStatus?:
|
|
291
|
+
| 'open'
|
|
292
|
+
| 'closed'
|
|
293
|
+
| 'escalated'
|
|
294
|
+
| 'queued'
|
|
295
|
+
| 'assigned'
|
|
296
|
+
| (string & {})
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
const hashCloseActivity = 'closeActivity'
|
|
300
|
+
|
|
301
|
+
export function isCloseActivity<V>(v: V) {
|
|
302
|
+
return is$typed(v, id, hashCloseActivity)
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export function validateCloseActivity<V>(v: V) {
|
|
306
|
+
return validate<CloseActivity & V>(v, id, hashCloseActivity)
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** Activity recording a closed report being reopened. Only valid when the report is in 'closed' status. */
|
|
310
|
+
export interface ReopenActivity {
|
|
311
|
+
$type?: 'tools.ozone.report.defs#reopenActivity'
|
|
312
|
+
/** The report's status before this activity. Populated automatically from the report row; not required in input. */
|
|
313
|
+
previousStatus?:
|
|
314
|
+
| 'open'
|
|
315
|
+
| 'closed'
|
|
316
|
+
| 'escalated'
|
|
317
|
+
| 'queued'
|
|
318
|
+
| 'assigned'
|
|
319
|
+
| (string & {})
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const hashReopenActivity = 'reopenActivity'
|
|
323
|
+
|
|
324
|
+
export function isReopenActivity<V>(v: V) {
|
|
325
|
+
return is$typed(v, id, hashReopenActivity)
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export function validateReopenActivity<V>(v: V) {
|
|
329
|
+
return validate<ReopenActivity & V>(v, id, hashReopenActivity)
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/** Activity recording a note on a report. Use internalNote for moderator-only notes or publicNote for reporter-visible notes (or both). */
|
|
333
|
+
export interface NoteActivity {
|
|
334
|
+
$type?: 'tools.ozone.report.defs#noteActivity'
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const hashNoteActivity = 'noteActivity'
|
|
338
|
+
|
|
339
|
+
export function isNoteActivity<V>(v: V) {
|
|
340
|
+
return is$typed(v, id, hashNoteActivity)
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
export function validateNoteActivity<V>(v: V) {
|
|
344
|
+
return validate<NoteActivity & V>(v, id, hashNoteActivity)
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/** A single activity entry on a report. */
|
|
348
|
+
export interface ReportActivityView {
|
|
349
|
+
$type?: 'tools.ozone.report.defs#reportActivityView'
|
|
350
|
+
/** Activity ID */
|
|
351
|
+
id: number
|
|
352
|
+
/** ID of the report this activity belongs to */
|
|
353
|
+
reportId: number
|
|
354
|
+
activity:
|
|
355
|
+
| $Typed<QueueActivity>
|
|
356
|
+
| $Typed<AssignmentActivity>
|
|
357
|
+
| $Typed<EscalationActivity>
|
|
358
|
+
| $Typed<CloseActivity>
|
|
359
|
+
| $Typed<ReopenActivity>
|
|
360
|
+
| $Typed<NoteActivity>
|
|
361
|
+
| { $type: string }
|
|
362
|
+
/** Optional moderator-only note. Not visible to reporters. */
|
|
363
|
+
internalNote?: string
|
|
364
|
+
/** Optional public note, potentially visible to the reporter. */
|
|
365
|
+
publicNote?: string
|
|
366
|
+
/** Extensible JSON payload for loose activity-specific metadata (e.g. assignmentId). */
|
|
367
|
+
meta?: { [_ in string]: unknown }
|
|
368
|
+
/** True if this activity was created by an automated process (e.g. queue router) rather than a direct human action. */
|
|
369
|
+
isAutomated: boolean
|
|
370
|
+
/** DID of the actor who created this activity, or the service DID for automated activities. */
|
|
371
|
+
createdBy: string
|
|
372
|
+
moderator?: ToolsOzoneTeamDefs.Member
|
|
373
|
+
/** When this activity was created */
|
|
374
|
+
createdAt: string
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const hashReportActivityView = 'reportActivityView'
|
|
378
|
+
|
|
379
|
+
export function isReportActivityView<V>(v: V) {
|
|
380
|
+
return is$typed(v, id, hashReportActivityView)
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export function validateReportActivityView<V>(v: V) {
|
|
384
|
+
return validate<ReportActivityView & V>(v, id, hashReportActivityView)
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/** Live statistics for reports for the current calendar day, filterable by queue, moderator, or report type. */
|
|
388
|
+
export interface LiveStats {
|
|
389
|
+
$type?: 'tools.ozone.report.defs#liveStats'
|
|
390
|
+
/** Number of reports currently not closed. */
|
|
391
|
+
pendingCount?: number
|
|
392
|
+
/** Number of reports closed today. */
|
|
393
|
+
actionedCount?: number
|
|
394
|
+
/** Number of reports escalated today. */
|
|
395
|
+
escalatedCount?: number
|
|
396
|
+
/** Reports received today. */
|
|
397
|
+
inboundCount?: number
|
|
398
|
+
/** Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer. */
|
|
399
|
+
actionRate?: number
|
|
400
|
+
/** Average time in seconds from report creation (or moderator assignment) to close. */
|
|
401
|
+
avgHandlingTimeSec?: number
|
|
402
|
+
/** When these statistics were last computed. */
|
|
403
|
+
lastUpdated?: string
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
const hashLiveStats = 'liveStats'
|
|
407
|
+
|
|
408
|
+
export function isLiveStats<V>(v: V) {
|
|
409
|
+
return is$typed(v, id, hashLiveStats)
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export function validateLiveStats<V>(v: V) {
|
|
413
|
+
return validate<LiveStats & V>(v, id, hashLiveStats)
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/** A single daily snapshot of report statistics for a calendar date. */
|
|
417
|
+
export interface HistoricalStats {
|
|
418
|
+
$type?: 'tools.ozone.report.defs#historicalStats'
|
|
419
|
+
/** The calendar date this snapshot covers (YYYY-MM-DD). */
|
|
420
|
+
date: string
|
|
421
|
+
/** When this snapshot was last computed. */
|
|
422
|
+
computedAt?: string
|
|
423
|
+
/** Number of reports not closed at time of computation. */
|
|
424
|
+
pendingCount?: number
|
|
425
|
+
/** Number of reports closed during this day. */
|
|
426
|
+
actionedCount?: number
|
|
427
|
+
/** Number of reports escalated during this day. */
|
|
428
|
+
escalatedCount?: number
|
|
429
|
+
/** Reports received during this day. */
|
|
430
|
+
inboundCount?: number
|
|
431
|
+
/** Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer. */
|
|
432
|
+
actionRate?: number
|
|
433
|
+
/** Average time in seconds from report creation (or moderator assignment) to close. */
|
|
434
|
+
avgHandlingTimeSec?: number
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
const hashHistoricalStats = 'historicalStats'
|
|
438
|
+
|
|
439
|
+
export function isHistoricalStats<V>(v: V) {
|
|
440
|
+
return is$typed(v, id, hashHistoricalStats)
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export function validateHistoricalStats<V>(v: V) {
|
|
444
|
+
return validate<HistoricalStats & V>(v, id, hashHistoricalStats)
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export interface AssignmentView {
|
|
448
|
+
$type?: 'tools.ozone.report.defs#assignmentView'
|
|
449
|
+
id: number
|
|
450
|
+
did: string
|
|
451
|
+
moderator?: ToolsOzoneTeamDefs.Member
|
|
452
|
+
queue?: ToolsOzoneQueueDefs.QueueView
|
|
453
|
+
reportId: number
|
|
454
|
+
startAt: string
|
|
455
|
+
endAt?: string
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
const hashAssignmentView = 'assignmentView'
|
|
459
|
+
|
|
460
|
+
export function isAssignmentView<V>(v: V) {
|
|
461
|
+
return is$typed(v, id, hashAssignmentView)
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export function validateAssignmentView<V>(v: V) {
|
|
465
|
+
return validate<AssignmentView & V>(v, id, hashAssignmentView)
|
|
466
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { CID } from 'multiformats/cid'
|
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
7
|
+
import {
|
|
8
|
+
type $Typed,
|
|
9
|
+
is$typed as _is$typed,
|
|
10
|
+
type OmitKey,
|
|
11
|
+
} from '../../../../util'
|
|
12
|
+
import type * as ToolsOzoneReportDefs from './defs.js'
|
|
13
|
+
|
|
14
|
+
const is$typed = _is$typed,
|
|
15
|
+
validate = _validate
|
|
16
|
+
const id = 'tools.ozone.report.getAssignments'
|
|
17
|
+
|
|
18
|
+
export type QueryParams = {
|
|
19
|
+
/** When true, only returns active assignments. */
|
|
20
|
+
onlyActive: boolean
|
|
21
|
+
/** If specified, returns assignments for these reports only. */
|
|
22
|
+
reportIds?: number[]
|
|
23
|
+
/** If specified, returns assignments for these moderators only. */
|
|
24
|
+
dids?: string[]
|
|
25
|
+
limit: number
|
|
26
|
+
cursor?: string
|
|
27
|
+
}
|
|
28
|
+
export type InputSchema = undefined
|
|
29
|
+
|
|
30
|
+
export interface OutputSchema {
|
|
31
|
+
cursor?: string
|
|
32
|
+
assignments: ToolsOzoneReportDefs.AssignmentView[]
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type HandlerInput = void
|
|
36
|
+
|
|
37
|
+
export interface HandlerSuccess {
|
|
38
|
+
encoding: 'application/json'
|
|
39
|
+
body: OutputSchema
|
|
40
|
+
headers?: { [key: string]: string }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface HandlerError {
|
|
44
|
+
status: number
|
|
45
|
+
message?: string
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { CID } from 'multiformats/cid'
|
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
7
|
+
import {
|
|
8
|
+
type $Typed,
|
|
9
|
+
is$typed as _is$typed,
|
|
10
|
+
type OmitKey,
|
|
11
|
+
} from '../../../../util'
|
|
12
|
+
import type * as ToolsOzoneReportDefs from './defs.js'
|
|
13
|
+
|
|
14
|
+
const is$typed = _is$typed,
|
|
15
|
+
validate = _validate
|
|
16
|
+
const id = 'tools.ozone.report.getHistoricalStats'
|
|
17
|
+
|
|
18
|
+
export type QueryParams = {
|
|
19
|
+
/** Filter stats by queue. Use -1 for unqueued reports. */
|
|
20
|
+
queueId?: number
|
|
21
|
+
/** Filter stats by moderator DID. */
|
|
22
|
+
moderatorDid?: string
|
|
23
|
+
/** Filter stats by report types. */
|
|
24
|
+
reportTypes?: string[]
|
|
25
|
+
/** Earliest date to include (inclusive). */
|
|
26
|
+
startDate?: string
|
|
27
|
+
/** Latest date to include (inclusive). */
|
|
28
|
+
endDate?: string
|
|
29
|
+
/** Maximum number of entries to return. */
|
|
30
|
+
limit: number
|
|
31
|
+
/** Pagination cursor. */
|
|
32
|
+
cursor?: string
|
|
33
|
+
}
|
|
34
|
+
export type InputSchema = undefined
|
|
35
|
+
|
|
36
|
+
export interface OutputSchema {
|
|
37
|
+
stats: ToolsOzoneReportDefs.HistoricalStats[]
|
|
38
|
+
cursor?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type HandlerInput = void
|
|
42
|
+
|
|
43
|
+
export interface HandlerSuccess {
|
|
44
|
+
encoding: 'application/json'
|
|
45
|
+
body: OutputSchema
|
|
46
|
+
headers?: { [key: string]: string }
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface HandlerError {
|
|
50
|
+
status: number
|
|
51
|
+
message?: string
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { CID } from 'multiformats/cid'
|
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
7
|
+
import {
|
|
8
|
+
type $Typed,
|
|
9
|
+
is$typed as _is$typed,
|
|
10
|
+
type OmitKey,
|
|
11
|
+
} from '../../../../util'
|
|
12
|
+
import type * as ToolsOzoneReportDefs from './defs.js'
|
|
13
|
+
|
|
14
|
+
const is$typed = _is$typed,
|
|
15
|
+
validate = _validate
|
|
16
|
+
const id = 'tools.ozone.report.getLatestReport'
|
|
17
|
+
|
|
18
|
+
export type QueryParams = {}
|
|
19
|
+
export type InputSchema = undefined
|
|
20
|
+
|
|
21
|
+
export interface OutputSchema {
|
|
22
|
+
report: ToolsOzoneReportDefs.ReportView
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type HandlerInput = void
|
|
26
|
+
|
|
27
|
+
export interface HandlerSuccess {
|
|
28
|
+
encoding: 'application/json'
|
|
29
|
+
body: OutputSchema
|
|
30
|
+
headers?: { [key: string]: string }
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface HandlerError {
|
|
34
|
+
status: number
|
|
35
|
+
message?: string
|
|
36
|
+
error?: 'NotFound'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { CID } from 'multiformats/cid'
|
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
7
|
+
import {
|
|
8
|
+
type $Typed,
|
|
9
|
+
is$typed as _is$typed,
|
|
10
|
+
type OmitKey,
|
|
11
|
+
} from '../../../../util'
|
|
12
|
+
import type * as ToolsOzoneReportDefs from './defs.js'
|
|
13
|
+
|
|
14
|
+
const is$typed = _is$typed,
|
|
15
|
+
validate = _validate
|
|
16
|
+
const id = 'tools.ozone.report.getLiveStats'
|
|
17
|
+
|
|
18
|
+
export type QueryParams = {
|
|
19
|
+
/** Filter stats by queue. Use -1 for unqueued reports. */
|
|
20
|
+
queueId?: number
|
|
21
|
+
/** Filter stats by moderator DID. */
|
|
22
|
+
moderatorDid?: string
|
|
23
|
+
/** Filter stats by report types. */
|
|
24
|
+
reportTypes?: string[]
|
|
25
|
+
}
|
|
26
|
+
export type InputSchema = undefined
|
|
27
|
+
|
|
28
|
+
export interface OutputSchema {
|
|
29
|
+
stats: ToolsOzoneReportDefs.LiveStats
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type HandlerInput = void
|
|
33
|
+
|
|
34
|
+
export interface HandlerSuccess {
|
|
35
|
+
encoding: 'application/json'
|
|
36
|
+
body: OutputSchema
|
|
37
|
+
headers?: { [key: string]: string }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface HandlerError {
|
|
41
|
+
status: number
|
|
42
|
+
message?: string
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { CID } from 'multiformats/cid'
|
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
7
|
+
import {
|
|
8
|
+
type $Typed,
|
|
9
|
+
is$typed as _is$typed,
|
|
10
|
+
type OmitKey,
|
|
11
|
+
} from '../../../../util'
|
|
12
|
+
import type * as ToolsOzoneReportDefs from './defs.js'
|
|
13
|
+
|
|
14
|
+
const is$typed = _is$typed,
|
|
15
|
+
validate = _validate
|
|
16
|
+
const id = 'tools.ozone.report.getReport'
|
|
17
|
+
|
|
18
|
+
export type QueryParams = {
|
|
19
|
+
/** The ID of the report to retrieve. */
|
|
20
|
+
id: number
|
|
21
|
+
}
|
|
22
|
+
export type InputSchema = undefined
|
|
23
|
+
export type OutputSchema = ToolsOzoneReportDefs.ReportView
|
|
24
|
+
export type HandlerInput = void
|
|
25
|
+
|
|
26
|
+
export interface HandlerSuccess {
|
|
27
|
+
encoding: 'application/json'
|
|
28
|
+
body: OutputSchema
|
|
29
|
+
headers?: { [key: string]: string }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface HandlerError {
|
|
33
|
+
status: number
|
|
34
|
+
message?: string
|
|
35
|
+
error?: 'NotFound'
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { CID } from 'multiformats/cid'
|
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
7
|
+
import {
|
|
8
|
+
type $Typed,
|
|
9
|
+
is$typed as _is$typed,
|
|
10
|
+
type OmitKey,
|
|
11
|
+
} from '../../../../util'
|
|
12
|
+
import type * as ToolsOzoneReportDefs from './defs.js'
|
|
13
|
+
|
|
14
|
+
const is$typed = _is$typed,
|
|
15
|
+
validate = _validate
|
|
16
|
+
const id = 'tools.ozone.report.listActivities'
|
|
17
|
+
|
|
18
|
+
export type QueryParams = {
|
|
19
|
+
/** ID of the report whose activities to list */
|
|
20
|
+
reportId: number
|
|
21
|
+
limit: number
|
|
22
|
+
cursor?: string
|
|
23
|
+
}
|
|
24
|
+
export type InputSchema = undefined
|
|
25
|
+
|
|
26
|
+
export interface OutputSchema {
|
|
27
|
+
activities: ToolsOzoneReportDefs.ReportActivityView[]
|
|
28
|
+
cursor?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type HandlerInput = void
|
|
32
|
+
|
|
33
|
+
export interface HandlerSuccess {
|
|
34
|
+
encoding: 'application/json'
|
|
35
|
+
body: OutputSchema
|
|
36
|
+
headers?: { [key: string]: string }
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface HandlerError {
|
|
40
|
+
status: number
|
|
41
|
+
message?: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
5
|
+
import { CID } from 'multiformats/cid'
|
|
6
|
+
import { validate as _validate } from '../../../../lexicons'
|
|
7
|
+
import {
|
|
8
|
+
type $Typed,
|
|
9
|
+
is$typed as _is$typed,
|
|
10
|
+
type OmitKey,
|
|
11
|
+
} from '../../../../util'
|
|
12
|
+
import type * as ToolsOzoneReportDefs from './defs.js'
|
|
13
|
+
|
|
14
|
+
const is$typed = _is$typed,
|
|
15
|
+
validate = _validate
|
|
16
|
+
const id = 'tools.ozone.report.queryReports'
|
|
17
|
+
|
|
18
|
+
export type QueryParams = {
|
|
19
|
+
/** Filter by queue ID. Use -1 for unassigned reports. */
|
|
20
|
+
queueId?: number
|
|
21
|
+
/** Filter by report types (fully qualified string in the format of com.atproto.moderation.defs#reason<name>). */
|
|
22
|
+
reportTypes?: string[]
|
|
23
|
+
/** Filter by report status. */
|
|
24
|
+
status:
|
|
25
|
+
| 'open'
|
|
26
|
+
| 'closed'
|
|
27
|
+
| 'escalated'
|
|
28
|
+
| 'queued'
|
|
29
|
+
| 'assigned'
|
|
30
|
+
| (string & {})
|
|
31
|
+
/** Filter by subject DID or AT-URI. */
|
|
32
|
+
subject?: string
|
|
33
|
+
/** 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. */
|
|
34
|
+
did?: string
|
|
35
|
+
/** If specified, reports of the given type (account or record) will be returned. */
|
|
36
|
+
subjectType?: 'account' | 'record' | (string & {})
|
|
37
|
+
/** If specified, reports where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored. */
|
|
38
|
+
collections?: string[]
|
|
39
|
+
/** Retrieve reports created after a given timestamp */
|
|
40
|
+
reportedAfter?: string
|
|
41
|
+
/** Retrieve reports created before a given timestamp */
|
|
42
|
+
reportedBefore?: string
|
|
43
|
+
/** Filter by muted status. true returns only muted reports, false returns only unmuted reports. Defaults to false. */
|
|
44
|
+
isMuted: boolean
|
|
45
|
+
/** Filter by the DID of the moderator permanently assigned to the report. */
|
|
46
|
+
assignedTo?: string
|
|
47
|
+
sortField: 'createdAt' | 'updatedAt'
|
|
48
|
+
sortDirection: 'asc' | 'desc'
|
|
49
|
+
limit: number
|
|
50
|
+
cursor?: string
|
|
51
|
+
}
|
|
52
|
+
export type InputSchema = undefined
|
|
53
|
+
|
|
54
|
+
export interface OutputSchema {
|
|
55
|
+
cursor?: string
|
|
56
|
+
reports: ToolsOzoneReportDefs.ReportView[]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type HandlerInput = void
|
|
60
|
+
|
|
61
|
+
export interface HandlerSuccess {
|
|
62
|
+
encoding: 'application/json'
|
|
63
|
+
body: OutputSchema
|
|
64
|
+
headers?: { [key: string]: string }
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface HandlerError {
|
|
68
|
+
status: number
|
|
69
|
+
message?: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type HandlerOutput = HandlerError | HandlerSuccess
|