@atproto/ozone 0.6.0 → 0.6.2

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 (64) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/api/setting/removeOptions.d.ts.map +1 -1
  3. package/dist/api/setting/removeOptions.js +21 -1
  4. package/dist/api/setting/removeOptions.js.map +1 -1
  5. package/dist/api/setting/upsertOption.d.ts.map +1 -1
  6. package/dist/api/setting/upsertOption.js +10 -2
  7. package/dist/api/setting/upsertOption.js.map +1 -1
  8. package/dist/db/migrations/20261008T000000000Z-add-report-priority.d.ts +4 -0
  9. package/dist/db/migrations/20261008T000000000Z-add-report-priority.d.ts.map +1 -0
  10. package/dist/db/migrations/20261008T000000000Z-add-report-priority.js +17 -0
  11. package/dist/db/migrations/20261008T000000000Z-add-report-priority.js.map +1 -0
  12. package/dist/db/migrations/20261008T000000001Z-add-report-closure-target-stats.d.ts +4 -0
  13. package/dist/db/migrations/20261008T000000001Z-add-report-closure-target-stats.d.ts.map +1 -0
  14. package/dist/db/migrations/20261008T000000001Z-add-report-closure-target-stats.js +17 -0
  15. package/dist/db/migrations/20261008T000000001Z-add-report-closure-target-stats.js.map +1 -0
  16. package/dist/db/migrations/index.d.ts +2 -0
  17. package/dist/db/migrations/index.d.ts.map +1 -1
  18. package/dist/db/migrations/index.js +2 -0
  19. package/dist/db/migrations/index.js.map +1 -1
  20. package/dist/db/schema/report.d.ts +12 -0
  21. package/dist/db/schema/report.d.ts.map +1 -1
  22. package/dist/db/schema/report.js.map +1 -1
  23. package/dist/db/schema/report_stat.d.ts +6 -0
  24. package/dist/db/schema/report_stat.d.ts.map +1 -1
  25. package/dist/db/schema/report_stat.js.map +1 -1
  26. package/dist/lexicons/app/bsky/embed/record.defs.d.ts +8 -0
  27. package/dist/lexicons/app/bsky/embed/record.defs.d.ts.map +1 -1
  28. package/dist/lexicons/app/bsky/embed/record.defs.js +2 -0
  29. package/dist/lexicons/app/bsky/embed/record.defs.js.map +1 -1
  30. package/dist/lexicons/tools/ozone/queue/defs.defs.d.ts +17 -1
  31. package/dist/lexicons/tools/ozone/queue/defs.defs.d.ts.map +1 -1
  32. package/dist/lexicons/tools/ozone/queue/defs.defs.js +8 -0
  33. package/dist/lexicons/tools/ozone/queue/defs.defs.js.map +1 -1
  34. package/dist/lexicons/tools/ozone/report/defs.defs.d.ts +54 -2
  35. package/dist/lexicons/tools/ozone/report/defs.defs.d.ts.map +1 -1
  36. package/dist/lexicons/tools/ozone/report/defs.defs.js +24 -0
  37. package/dist/lexicons/tools/ozone/report/defs.defs.js.map +1 -1
  38. package/dist/queue/service.d.ts +1 -1
  39. package/dist/queue/service.d.ts.map +1 -1
  40. package/dist/queue/service.js +34 -8
  41. package/dist/queue/service.js.map +1 -1
  42. package/dist/report/stats.d.ts +3 -0
  43. package/dist/report/stats.d.ts.map +1 -1
  44. package/dist/report/stats.js +41 -11
  45. package/dist/report/stats.js.map +1 -1
  46. package/dist/report/views.d.ts.map +1 -1
  47. package/dist/report/views.js +51 -0
  48. package/dist/report/views.js.map +1 -1
  49. package/dist/setting/constants.d.ts +3 -0
  50. package/dist/setting/constants.d.ts.map +1 -1
  51. package/dist/setting/constants.js +5 -0
  52. package/dist/setting/constants.js.map +1 -1
  53. package/dist/setting/report.d.ts +7 -0
  54. package/dist/setting/report.d.ts.map +1 -0
  55. package/dist/setting/report.js +32 -0
  56. package/dist/setting/report.js.map +1 -0
  57. package/dist/setting/types.d.ts +11 -0
  58. package/dist/setting/types.d.ts.map +1 -1
  59. package/dist/setting/types.js.map +1 -1
  60. package/dist/setting/validators.d.ts +2 -1
  61. package/dist/setting/validators.d.ts.map +1 -1
  62. package/dist/setting/validators.js +81 -1
  63. package/dist/setting/validators.js.map +1 -1
  64. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atproto/ozone
2
2
 
3
+ ## 0.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#5581](https://github.com/bluesky-social/atproto/pull/5581) [`f069327`](https://github.com/bluesky-social/atproto/commit/f0693271583923f38d827b4d4387d065e2cb8be7) Thanks [@gcwill70](https://github.com/gcwill70)! - Add report closure target met and missed counts, target met percentages, and overdue pending-report snapshots to report and queue statistics. Exclude reports without closure targets and preserve unavailable historical metrics until recomputed.
8
+
9
+ Include the updated Ozone report and queue statistics definitions in the generated API client.
10
+
11
+ Exclude muted reports from current and recomputed historical pending and overdue counts. Inbound volume and closure outcomes continue to include muted reports.
12
+
13
+ ## 0.6.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [#5579](https://github.com/bluesky-social/atproto/pull/5579) [`b023046`](https://github.com/bluesky-social/atproto/commit/b023046f9266b8755ad9b44928032426bb05599e) Thanks [@gcwill70](https://github.com/gcwill70)! - Add configurable report priority levels and reason mappings, with priority scores and resolution targets in minutes snapshotted on reports at creation.
18
+
19
+ Expose each closed report's resolution time and whether it met its priority target.
20
+
3
21
  ## 0.6.0
4
22
 
5
23
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"removeOptions.d.ts","sourceRoot":"","sources":["../../../src/api/setting/removeOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAIlD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0DvD"}
1
+ {"version":3,"file":"removeOptions.d.ts","sourceRoot":"","sources":["../../../src/api/setting/removeOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,MAAM,EACZ,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AASlD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAsFvD"}
@@ -1,5 +1,6 @@
1
- import { AuthRequiredError } from '@atproto/xrpc-server';
1
+ import { AuthRequiredError, InvalidRequestError, } from '@atproto/xrpc-server';
2
2
  import { tools } from '../../lexicons/index.js';
3
+ import { PriorityLevelSettingKey, ReportPriorityLevelSettingKey, isReportPrioritySetting, } from '../../setting/constants.js';
3
4
  export default function (server, ctx) {
4
5
  server.add(tools.ozone.setting.removeOptions, {
5
6
  auth: ctx.authVerifier.modOrAdminToken,
@@ -9,6 +10,13 @@ export default function (server, ctx) {
9
10
  const { keys, scope } = input.body;
10
11
  let did = ctx.cfg.service.did;
11
12
  let managerRole = [];
13
+ if (keys.some(isReportPrioritySetting)) {
14
+ if (scope !== 'instance')
15
+ throw new InvalidRequestError('Report priority settings must have instance scope');
16
+ if (access.type !== 'admin_token' && !access.isAdmin) {
17
+ throw new AuthRequiredError('Only admins can manage report priorities');
18
+ }
19
+ }
12
20
  if (scope === 'personal') {
13
21
  if (access.type !== 'moderator') {
14
22
  throw new AuthRequiredError('Must use moderator auth to delete personal setting');
@@ -39,6 +47,18 @@ export default function (server, ctx) {
39
47
  }
40
48
  }
41
49
  const settingService = ctx.settingService(db);
50
+ if (scope === 'instance' &&
51
+ keys.includes(PriorityLevelSettingKey) &&
52
+ !keys.includes(ReportPriorityLevelSettingKey)) {
53
+ const { options } = await settingService.query({
54
+ limit: 1,
55
+ scope: 'instance',
56
+ keys: [ReportPriorityLevelSettingKey],
57
+ });
58
+ if (options[0] && Object.keys(options[0].value).length) {
59
+ throw new InvalidRequestError('Remove report priority levels before removing priority levels');
60
+ }
61
+ }
42
62
  await settingService.removeOptions(keys, {
43
63
  scope: scope === 'personal' ? 'personal' : 'instance',
44
64
  managerRole,
@@ -1 +1 @@
1
- {"version":3,"file":"removeOptions.js","sourceRoot":"","sources":["../../../src/api/setting/removeOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAe,MAAM,sBAAsB,CAAA;AAGrE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CA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,CAAC,WAAW,EAAE,CAAC;wBACvB,WAAW,GAAG;4BACZ,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa;4BACnC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU;yBACjC,CAAA;oBACH,CAAC;yBAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;wBAC3B,WAAW,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;oBAClD,CAAC;gBACH,CAAC;YACH,CAAC;YAED,MAAM,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAA;YAE7C,MAAM,cAAc,CAAC,aAAa,CAAC,IAAI,EAAE;gBACvC,KAAK,EAAE,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU;gBACrD,WAAW;gBACX,GAAG;aACJ,CAAC,CAAA;YAEF,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,EAAE;aACT,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { AuthRequiredError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../context.js'\nimport type { Member } from '../../db/schema/member.js'\nimport { tools } from '../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(tools.ozone.setting.removeOptions, {\n auth: ctx.authVerifier.modOrAdminToken,\n handler: async ({ input, auth }) => {\n const access = auth.credentials\n const db = ctx.db\n const { keys, scope } = input.body\n let did = ctx.cfg.service.did\n let managerRole: Member['role'][] = []\n\n if (scope === 'personal') {\n if (access.type !== 'moderator') {\n throw new AuthRequiredError(\n 'Must use moderator auth to delete personal setting',\n )\n }\n\n did = access.iss\n }\n\n // When attempting to delete an instance setting using admin_token will allow removing any setting\n // otherwise, admins can remove settings that are manageable by all roles\n // moderators can remove settings that are manageable by moderator and triage roles\n // triage can remove settings that are manageable by triage role\n if (scope === 'instance') {\n managerRole = [\n tools.ozone.team.defs.RoleModerator,\n tools.ozone.team.defs.RoleTriage,\n tools.ozone.team.defs.RoleAdmin,\n tools.ozone.team.defs.RoleVerifier,\n ]\n\n if (access.type !== 'admin_token' && !access.isAdmin) {\n if (access.isModerator) {\n managerRole = [\n tools.ozone.team.defs.RoleModerator,\n tools.ozone.team.defs.RoleTriage,\n ]\n } else if (access.isTriage) {\n managerRole = [tools.ozone.team.defs.RoleTriage]\n }\n }\n }\n\n const settingService = ctx.settingService(db)\n\n await settingService.removeOptions(keys, {\n scope: scope === 'personal' ? 'personal' : 'instance',\n managerRole,\n did,\n })\n\n return {\n encoding: 'application/json',\n body: {},\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"removeOptions.js","sourceRoot":"","sources":["../../../src/api/setting/removeOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GAEpB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAC/C,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,4BAA4B,CAAA;AAEnC,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE;QAC5C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,eAAe;QACtC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;YACjC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAA;YAC/B,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,CAAA;YACjB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;YAClC,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,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C,CAAA;oBACH,CAAC;yBAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;wBAC3B,WAAW,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;oBAClD,CAAC;gBACH,CAAC;YACH,CAAC;YAED,MAAM,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,CAAA;YAC7C,IACE,KAAK,KAAK,UAAU;gBACpB,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC;gBACtC,CAAC,IAAI,CAAC,QAAQ,CAAC,6BAA6B,CAAC,EAC7C,CAAC;gBACD,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,cAAc,CAAC,KAAK,CAAC;oBAC7C,KAAK,EAAE,CAAC;oBACR,KAAK,EAAE,UAAU;oBACjB,IAAI,EAAE,CAAC,6BAA6B,CAAC;iBACtC,CAAC,CAAA;gBACF,IAAI,OAAO,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;oBACvD,MAAM,IAAI,mBAAmB,CAC3B,+DAA+D,CAChE,CAAA;gBACH,CAAC;YACH,CAAC;YAED,MAAM,cAAc,CAAC,aAAa,CAAC,IAAI,EAAE;gBACvC,KAAK,EAAE,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU;gBACrD,WAAW;gBACX,GAAG;aACJ,CAAC,CAAA;YAEF,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,EAAE;aACT,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import {\n AuthRequiredError,\n InvalidRequestError,\n type Server,\n} from '@atproto/xrpc-server'\nimport type { AppContext } from '../../context.js'\nimport type { Member } from '../../db/schema/member.js'\nimport { tools } from '../../lexicons/index.js'\nimport {\n PriorityLevelSettingKey,\n ReportPriorityLevelSettingKey,\n isReportPrioritySetting,\n} from '../../setting/constants.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(tools.ozone.setting.removeOptions, {\n auth: ctx.authVerifier.modOrAdminToken,\n handler: async ({ input, auth }) => {\n const access = auth.credentials\n const db = ctx.db\n const { keys, scope } = input.body\n let did = ctx.cfg.service.did\n let managerRole: Member['role'][] = []\n\n if (keys.some(isReportPrioritySetting)) {\n if (scope !== 'instance')\n throw new InvalidRequestError(\n 'Report priority settings must have instance scope',\n )\n if (access.type !== 'admin_token' && !access.isAdmin) {\n throw new AuthRequiredError(\n 'Only admins can manage report priorities',\n )\n }\n }\n\n if (scope === 'personal') {\n if (access.type !== 'moderator') {\n throw new AuthRequiredError(\n 'Must use moderator auth to delete personal setting',\n )\n }\n\n did = access.iss\n }\n\n // When attempting to delete an instance setting using admin_token will allow removing any setting\n // otherwise, admins can remove settings that are manageable by all roles\n // moderators can remove settings that are manageable by moderator and triage roles\n // triage can remove settings that are manageable by triage role\n if (scope === 'instance') {\n managerRole = [\n tools.ozone.team.defs.RoleModerator,\n tools.ozone.team.defs.RoleTriage,\n tools.ozone.team.defs.RoleAdmin,\n tools.ozone.team.defs.RoleVerifier,\n ]\n\n if (access.type !== 'admin_token' && !access.isAdmin) {\n if (access.isModerator) {\n managerRole = [\n tools.ozone.team.defs.RoleModerator,\n tools.ozone.team.defs.RoleTriage,\n ]\n } else if (access.isTriage) {\n managerRole = [tools.ozone.team.defs.RoleTriage]\n }\n }\n }\n\n const settingService = ctx.settingService(db)\n if (\n scope === 'instance' &&\n keys.includes(PriorityLevelSettingKey) &&\n !keys.includes(ReportPriorityLevelSettingKey)\n ) {\n const { options } = await settingService.query({\n limit: 1,\n scope: 'instance',\n keys: [ReportPriorityLevelSettingKey],\n })\n if (options[0] && Object.keys(options[0].value).length) {\n throw new InvalidRequestError(\n 'Remove report priority levels before removing priority levels',\n )\n }\n }\n\n await settingService.removeOptions(keys, {\n scope: scope === 'personal' ? 'personal' : 'instance',\n managerRole,\n did,\n })\n\n return {\n encoding: 'application/json',\n body: {},\n }\n },\n })\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"upsertOption.d.ts","sourceRoot":"","sources":["../../../src/api/setting/upsertOption.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAErE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAWlD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAqFvD"}
1
+ {"version":3,"file":"upsertOption.d.ts","sourceRoot":"","sources":["../../../src/api/setting/upsertOption.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,MAAM,EACZ,MAAM,sBAAsB,CAAA;AAE7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAYlD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAiGvD"}
@@ -1,6 +1,7 @@
1
1
  import assert from 'node:assert';
2
- import { AuthRequiredError } from '@atproto/xrpc-server';
2
+ import { AuthRequiredError, InvalidRequestError, } from '@atproto/xrpc-server';
3
3
  import { tools } from '../../lexicons/index.js';
4
+ import { isReportPrioritySetting } from '../../setting/constants.js';
4
5
  import { settingValidators } from '../../setting/validators.js';
5
6
  const ROLEADMIN = tools.ozone.team.defs.roleAdmin.value;
6
7
  const ROLEMODERATOR = tools.ozone.team.defs.roleModerator.value;
@@ -18,6 +19,13 @@ export default function (server, ctx) {
18
19
  if (scope === 'personal' && access.type !== 'moderator') {
19
20
  throw new AuthRequiredError('Must use moderator auth to create or update a personal setting');
20
21
  }
22
+ if (isReportPrioritySetting(key)) {
23
+ if (scope !== 'instance')
24
+ throw new InvalidRequestError('Report priority settings must have instance scope');
25
+ if (access.type !== 'admin_token' && !access.isAdmin) {
26
+ throw new AuthRequiredError('Only admins can manage report priorities');
27
+ }
28
+ }
21
29
  // if the caller is using moderator auth and storing personal setting
22
30
  // use the caller's DID as the owner
23
31
  if (scope === 'personal' && access.type === 'moderator') {
@@ -55,7 +63,7 @@ export default function (server, ctx) {
55
63
  managerRole: getManagerRole(managerRole),
56
64
  };
57
65
  if (settingValidators.has(key)) {
58
- await settingValidators.get(key)?.(option);
66
+ await settingValidators.get(key)?.(option, settingService);
59
67
  }
60
68
  await settingService.upsert(option);
61
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upsertOption.js","sourceRoot":"","sources":["../../../src/api/setting/upsertOption.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,iBAAiB,EAAe,MAAM,sBAAsB,CAAA;AAIrE,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAE/D,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAA;AACvD,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAA;AAC/D,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAA;AACzD,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAA;AAE7D,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE;QAC3C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,eAAe;QACtC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;YAC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AC,CAAA;IAEF,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAC1B,CAAC,CAAA;AAED,MAAM,yBAAyB,GAAG,CAChC,MAAwE,EACxE,EAAE;IACF,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,CAAC,CAAA;IAC3E,IAAI,MAAM,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;QAClC,OAAO,cAAc,CAAA;IACvB,CAAC;IAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,cAAc,CAAA;IACvB,CAAC;IAED,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;IACpC,CAAC;IAED,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,OAAO,CAAC,YAAY,CAAC,CAAA;IACvB,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAA;AACrB,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,IAAa,EAAE,EAAE;IACvC,IAAI,WAAW,GAA0B,IAAI,CAAA;IAE7C,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,WAAW,GAAG,SAAS,CAAA;IACzB,CAAC;SAAM,IAAI,IAAI,KAAK,aAAa,EAAE,CAAC;QAClC,WAAW,GAAG,aAAa,CAAA;IAC7B,CAAC;SAAM,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,WAAW,GAAG,UAAU,CAAA;IAC1B,CAAC;SAAM,IAAI,IAAI,KAAK,YAAY,EAAE,CAAC;QACjC,WAAW,GAAG,YAAY,CAAA;IAC5B,CAAC;IAED,OAAO,WAAW,CAAA;AACpB,CAAC,CAAA","sourcesContent":["import assert from 'node:assert'\nimport type { DidString } from '@atproto/lex'\nimport { AuthRequiredError, type Server } from '@atproto/xrpc-server'\nimport type { AdminTokenOutput, ModeratorOutput } from '../../auth-verifier.js'\nimport type { AppContext } from '../../context.js'\nimport type { Member } from '../../db/schema/member.js'\nimport { tools } from '../../lexicons/index.js'\nimport type { SettingService } from '../../setting/service.js'\nimport { settingValidators } from '../../setting/validators.js'\n\nconst ROLEADMIN = tools.ozone.team.defs.roleAdmin.value\nconst ROLEMODERATOR = tools.ozone.team.defs.roleModerator.value\nconst ROLETRIAGE = tools.ozone.team.defs.roleTriage.value\nconst ROLEVERIFIER = tools.ozone.team.defs.roleVerifier.value\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(tools.ozone.setting.upsertOption, {\n auth: ctx.authVerifier.modOrAdminToken,\n handler: async ({ input, auth }) => {\n const access = auth.credentials\n const db = ctx.db\n const { key, value, description, managerRole, scope } = input.body\n const serviceDid = ctx.cfg.service.did\n let ownerDid = serviceDid\n\n if (scope === 'personal' && access.type !== 'moderator') {\n throw new AuthRequiredError(\n 'Must use moderator auth to create or update a personal setting',\n )\n }\n\n // if the caller is using moderator auth and storing personal setting\n // use the caller's DID as the owner\n if (scope === 'personal' && access.type === 'moderator') {\n ownerDid = access.iss\n }\n\n const now = new Date()\n const baseOption = {\n key,\n value,\n did: ownerDid,\n createdBy: ownerDid,\n lastUpdatedBy: ownerDid,\n description: description || '',\n createdAt: now,\n updatedAt: now,\n }\n\n const settingService = ctx.settingService(db)\n if (scope === 'personal') {\n await settingService.upsert({\n ...baseOption,\n scope: 'personal',\n managerRole: null,\n })\n } else {\n const manageableRoles = getRolesForInstanceOption(access)\n const existingSetting = await getExistingSetting(\n settingService,\n ownerDid,\n key,\n 'instance',\n )\n\n if (\n existingSetting?.managerRole &&\n !manageableRoles.includes(existingSetting.managerRole)\n ) {\n throw new AuthRequiredError(`Not permitted to update setting ${key}`)\n }\n const option = {\n ...baseOption,\n scope: 'instance' as const,\n managerRole: getManagerRole(managerRole),\n }\n\n if (settingValidators.has(key)) {\n await settingValidators.get(key)?.(option)\n }\n\n await settingService.upsert(option)\n }\n\n const newOption = await getExistingSetting(\n settingService,\n ownerDid,\n key,\n scope,\n )\n assert(newOption, 'Failed to get the updated setting')\n\n return {\n encoding: 'application/json',\n body: {\n option: settingService.view(newOption),\n },\n }\n },\n })\n}\n\nconst getExistingSetting = async (\n settingService: SettingService,\n did: DidString,\n key: string,\n scope: string,\n) => {\n const result = await settingService.query({\n scope: scope === 'personal' ? 'personal' : 'instance',\n keys: [key],\n limit: 1,\n did,\n })\n\n return result.options[0]\n}\n\nconst getRolesForInstanceOption = (\n access: AdminTokenOutput['credentials'] | ModeratorOutput['credentials'],\n) => {\n const fullPermission = [ROLEADMIN, ROLEMODERATOR, ROLETRIAGE, ROLEVERIFIER]\n if (access.type === 'admin_token') {\n return fullPermission\n }\n\n if (access.isAdmin) {\n return fullPermission\n }\n\n if (access.isModerator) {\n return [ROLEMODERATOR, ROLETRIAGE]\n }\n\n if (access.isVerifier) {\n return [ROLEVERIFIER]\n }\n\n return [ROLETRIAGE]\n}\n\nconst getManagerRole = (role?: string) => {\n let managerRole: Member['role'] | null = null\n\n if (role === ROLEADMIN) {\n managerRole = ROLEADMIN\n } else if (role === ROLEMODERATOR) {\n managerRole = ROLEMODERATOR\n } else if (role === ROLETRIAGE) {\n managerRole = ROLETRIAGE\n } else if (role === ROLEVERIFIER) {\n managerRole = ROLEVERIFIER\n }\n\n return managerRole\n}\n"]}
1
+ {"version":3,"file":"upsertOption.js","sourceRoot":"","sources":["../../../src/api/setting/upsertOption.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GAEpB,MAAM,sBAAsB,CAAA;AAI7B,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAE/D,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC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CAAA;IACvB,CAAC;IAED,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAA;IACpC,CAAC;IAED,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,OAAO,CAAC,YAAY,CAAC,CAAA;IACvB,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,CAAA;AACrB,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,IAAa,EAAE,EAAE;IACvC,IAAI,WAAW,GAA0B,IAAI,CAAA;IAE7C,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,WAAW,GAAG,SAAS,CAAA;IACzB,CAAC;SAAM,IAAI,IAAI,KAAK,aAAa,EAAE,CAAC;QAClC,WAAW,GAAG,aAAa,CAAA;IAC7B,CAAC;SAAM,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,WAAW,GAAG,UAAU,CAAA;IAC1B,CAAC;SAAM,IAAI,IAAI,KAAK,YAAY,EAAE,CAAC;QACjC,WAAW,GAAG,YAAY,CAAA;IAC5B,CAAC;IAED,OAAO,WAAW,CAAA;AACpB,CAAC,CAAA","sourcesContent":["import assert from 'node:assert'\nimport type { DidString } from '@atproto/lex'\nimport {\n AuthRequiredError,\n InvalidRequestError,\n type Server,\n} from '@atproto/xrpc-server'\nimport type { AdminTokenOutput, ModeratorOutput } from '../../auth-verifier.js'\nimport type { AppContext } from '../../context.js'\nimport type { Member } from '../../db/schema/member.js'\nimport { tools } from '../../lexicons/index.js'\nimport { isReportPrioritySetting } from '../../setting/constants.js'\nimport type { SettingService } from '../../setting/service.js'\nimport { settingValidators } from '../../setting/validators.js'\n\nconst ROLEADMIN = tools.ozone.team.defs.roleAdmin.value\nconst ROLEMODERATOR = tools.ozone.team.defs.roleModerator.value\nconst ROLETRIAGE = tools.ozone.team.defs.roleTriage.value\nconst ROLEVERIFIER = tools.ozone.team.defs.roleVerifier.value\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(tools.ozone.setting.upsertOption, {\n auth: ctx.authVerifier.modOrAdminToken,\n handler: async ({ input, auth }) => {\n const access = auth.credentials\n const db = ctx.db\n const { key, value, description, managerRole, scope } = input.body\n const serviceDid = ctx.cfg.service.did\n let ownerDid = serviceDid\n\n if (scope === 'personal' && access.type !== 'moderator') {\n throw new AuthRequiredError(\n 'Must use moderator auth to create or update a personal setting',\n )\n }\n\n if (isReportPrioritySetting(key)) {\n if (scope !== 'instance')\n throw new InvalidRequestError(\n 'Report priority settings must have instance scope',\n )\n if (access.type !== 'admin_token' && !access.isAdmin) {\n throw new AuthRequiredError(\n 'Only admins can manage report priorities',\n )\n }\n }\n\n // if the caller is using moderator auth and storing personal setting\n // use the caller's DID as the owner\n if (scope === 'personal' && access.type === 'moderator') {\n ownerDid = access.iss\n }\n\n const now = new Date()\n const baseOption = {\n key,\n value,\n did: ownerDid,\n createdBy: ownerDid,\n lastUpdatedBy: ownerDid,\n description: description || '',\n createdAt: now,\n updatedAt: now,\n }\n\n const settingService = ctx.settingService(db)\n if (scope === 'personal') {\n await settingService.upsert({\n ...baseOption,\n scope: 'personal',\n managerRole: null,\n })\n } else {\n const manageableRoles = getRolesForInstanceOption(access)\n const existingSetting = await getExistingSetting(\n settingService,\n ownerDid,\n key,\n 'instance',\n )\n\n if (\n existingSetting?.managerRole &&\n !manageableRoles.includes(existingSetting.managerRole)\n ) {\n throw new AuthRequiredError(`Not permitted to update setting ${key}`)\n }\n const option = {\n ...baseOption,\n scope: 'instance' as const,\n managerRole: getManagerRole(managerRole),\n }\n\n if (settingValidators.has(key)) {\n await settingValidators.get(key)?.(option, settingService)\n }\n\n await settingService.upsert(option)\n }\n\n const newOption = await getExistingSetting(\n settingService,\n ownerDid,\n key,\n scope,\n )\n assert(newOption, 'Failed to get the updated setting')\n\n return {\n encoding: 'application/json',\n body: {\n option: settingService.view(newOption),\n },\n }\n },\n })\n}\n\nconst getExistingSetting = async (\n settingService: SettingService,\n did: DidString,\n key: string,\n scope: string,\n) => {\n const result = await settingService.query({\n scope: scope === 'personal' ? 'personal' : 'instance',\n keys: [key],\n limit: 1,\n did,\n })\n\n return result.options[0]\n}\n\nconst getRolesForInstanceOption = (\n access: AdminTokenOutput['credentials'] | ModeratorOutput['credentials'],\n) => {\n const fullPermission = [ROLEADMIN, ROLEMODERATOR, ROLETRIAGE, ROLEVERIFIER]\n if (access.type === 'admin_token') {\n return fullPermission\n }\n\n if (access.isAdmin) {\n return fullPermission\n }\n\n if (access.isModerator) {\n return [ROLEMODERATOR, ROLETRIAGE]\n }\n\n if (access.isVerifier) {\n return [ROLEVERIFIER]\n }\n\n return [ROLETRIAGE]\n}\n\nconst getManagerRole = (role?: string) => {\n let managerRole: Member['role'] | null = null\n\n if (role === ROLEADMIN) {\n managerRole = ROLEADMIN\n } else if (role === ROLEMODERATOR) {\n managerRole = ROLEMODERATOR\n } else if (role === ROLETRIAGE) {\n managerRole = ROLETRIAGE\n } else if (role === ROLEVERIFIER) {\n managerRole = ROLEVERIFIER\n }\n\n return managerRole\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { Kysely } from 'kysely';
2
+ export declare function up(db: Kysely<unknown>): Promise<void>;
3
+ export declare function down(db: Kysely<unknown>): Promise<void>;
4
+ //# sourceMappingURL=20261008T000000000Z-add-report-priority.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261008T000000000Z-add-report-priority.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/20261008T000000000Z-add-report-priority.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEpC,wBAAsB,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAO3D;AAED,wBAAsB,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAO7D"}
@@ -0,0 +1,17 @@
1
+ export async function up(db) {
2
+ await db.schema
3
+ .alterTable('report')
4
+ .addColumn('priorityLevel', 'varchar')
5
+ .addColumn('priorityScore', 'integer')
6
+ .addColumn('priorityTargetMinutes', 'integer')
7
+ .execute();
8
+ }
9
+ export async function down(db) {
10
+ await db.schema
11
+ .alterTable('report')
12
+ .dropColumn('priorityLevel')
13
+ .dropColumn('priorityScore')
14
+ .dropColumn('priorityTargetMinutes')
15
+ .execute();
16
+ }
17
+ //# sourceMappingURL=20261008T000000000Z-add-report-priority.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261008T000000000Z-add-report-priority.js","sourceRoot":"","sources":["../../../src/db/migrations/20261008T000000000Z-add-report-priority.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,EAAE,CAAC,EAAmB;IAC1C,MAAM,EAAE,CAAC,MAAM;SACZ,UAAU,CAAC,QAAQ,CAAC;SACpB,SAAS,CAAC,eAAe,EAAE,SAAS,CAAC;SACrC,SAAS,CAAC,eAAe,EAAE,SAAS,CAAC;SACrC,SAAS,CAAC,uBAAuB,EAAE,SAAS,CAAC;SAC7C,OAAO,EAAE,CAAA;AACd,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,EAAmB;IAC5C,MAAM,EAAE,CAAC,MAAM;SACZ,UAAU,CAAC,QAAQ,CAAC;SACpB,UAAU,CAAC,eAAe,CAAC;SAC3B,UAAU,CAAC,eAAe,CAAC;SAC3B,UAAU,CAAC,uBAAuB,CAAC;SACnC,OAAO,EAAE,CAAA;AACd,CAAC","sourcesContent":["import type { Kysely } from 'kysely'\n\nexport async function up(db: Kysely<unknown>): Promise<void> {\n await db.schema\n .alterTable('report')\n .addColumn('priorityLevel', 'varchar')\n .addColumn('priorityScore', 'integer')\n .addColumn('priorityTargetMinutes', 'integer')\n .execute()\n}\n\nexport async function down(db: Kysely<unknown>): Promise<void> {\n await db.schema\n .alterTable('report')\n .dropColumn('priorityLevel')\n .dropColumn('priorityScore')\n .dropColumn('priorityTargetMinutes')\n .execute()\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { Kysely } from 'kysely';
2
+ export declare function up(db: Kysely<unknown>): Promise<void>;
3
+ export declare function down(db: Kysely<unknown>): Promise<void>;
4
+ //# sourceMappingURL=20261008T000000001Z-add-report-closure-target-stats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261008T000000001Z-add-report-closure-target-stats.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/20261008T000000001Z-add-report-closure-target-stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEpC,wBAAsB,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAO3D;AAED,wBAAsB,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAO7D"}
@@ -0,0 +1,17 @@
1
+ export async function up(db) {
2
+ await db.schema
3
+ .alterTable('report_stat')
4
+ .addColumn('closureTargetMetCount', 'integer')
5
+ .addColumn('closureTargetMissedCount', 'integer')
6
+ .addColumn('closureTargetOverdueCount', 'integer')
7
+ .execute();
8
+ }
9
+ export async function down(db) {
10
+ await db.schema
11
+ .alterTable('report_stat')
12
+ .dropColumn('closureTargetMetCount')
13
+ .dropColumn('closureTargetMissedCount')
14
+ .dropColumn('closureTargetOverdueCount')
15
+ .execute();
16
+ }
17
+ //# sourceMappingURL=20261008T000000001Z-add-report-closure-target-stats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261008T000000001Z-add-report-closure-target-stats.js","sourceRoot":"","sources":["../../../src/db/migrations/20261008T000000001Z-add-report-closure-target-stats.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,EAAE,CAAC,EAAmB;IAC1C,MAAM,EAAE,CAAC,MAAM;SACZ,UAAU,CAAC,aAAa,CAAC;SACzB,SAAS,CAAC,uBAAuB,EAAE,SAAS,CAAC;SAC7C,SAAS,CAAC,0BAA0B,EAAE,SAAS,CAAC;SAChD,SAAS,CAAC,2BAA2B,EAAE,SAAS,CAAC;SACjD,OAAO,EAAE,CAAA;AACd,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,EAAmB;IAC5C,MAAM,EAAE,CAAC,MAAM;SACZ,UAAU,CAAC,aAAa,CAAC;SACzB,UAAU,CAAC,uBAAuB,CAAC;SACnC,UAAU,CAAC,0BAA0B,CAAC;SACtC,UAAU,CAAC,2BAA2B,CAAC;SACvC,OAAO,EAAE,CAAA;AACd,CAAC","sourcesContent":["import type { Kysely } from 'kysely'\n\nexport async function up(db: Kysely<unknown>): Promise<void> {\n await db.schema\n .alterTable('report_stat')\n .addColumn('closureTargetMetCount', 'integer')\n .addColumn('closureTargetMissedCount', 'integer')\n .addColumn('closureTargetOverdueCount', 'integer')\n .execute()\n}\n\nexport async function down(db: Kysely<unknown>): Promise<void> {\n await db.schema\n .alterTable('report_stat')\n .dropColumn('closureTargetMetCount')\n .dropColumn('closureTargetMissedCount')\n .dropColumn('closureTargetOverdueCount')\n .execute()\n}\n"]}
@@ -47,4 +47,6 @@ export * as _20260928T000000000Z from './20260928T000000000Z-inbox-appeal.js';
47
47
  export * as _20261002T000000000Z from './20261002T000000000Z-add-report-reporter-did.js';
48
48
  export * as _20261005T000000000Z from './20261005T000000000Z-inbox-seen.js';
49
49
  export * as _20261005T000000001Z from './20261005T000000001Z-inbox-notifications.js';
50
+ export * as _20261008T000000000Z from './20261008T000000000Z-add-report-priority.js';
51
+ export * as _20261008T000000001Z from './20261008T000000001Z-add-report-closure-target-stats.js';
50
52
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,oBAAoB,MAAM,+BAA+B,CAAA;AACrE,OAAO,KAAK,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AACxF,OAAO,KAAK,oBAAoB,MAAM,4CAA4C,CAAA;AAClF,OAAO,KAAK,oBAAoB,MAAM,4CAA4C,CAAA;AAClF,OAAO,KAAK,oBAAoB,MAAM,uDAAuD,CAAA;AAC7F,OAAO,KAAK,oBAAoB,MAAM,8CAA8C,CAAA;AACpF,OAAO,KAAK,oBAAoB,MAAM,+CAA+C,CAAA;AACrF,OAAO,KAAK,oBAAoB,MAAM,iDAAiD,CAAA;AACvF,OAAO,KAAK,oBAAoB,MAAM,oDAAoD,CAAA;AAC1F,OAAO,KAAK,oBAAoB,MAAM,0CAA0C,CAAA;AAChF,OAAO,KAAK,oBAAoB,MAAM,iDAAiD,CAAA;AACvF,OAAO,KAAK,oBAAoB,MAAM,+CAA+C,CAAA;AACrF,OAAO,KAAK,oBAAoB,MAAM,4DAA4D,CAAA;AAClG,OAAO,KAAK,oBAAoB,MAAM,iDAAiD,CAAA;AACvF,OAAO,KAAK,oBAAoB,MAAM,4DAA4D,CAAA;AAClG,OAAO,KAAK,oBAAoB,MAAM,mEAAmE,CAAA;AACzG,OAAO,KAAK,oBAAoB,MAAM,sDAAsD,CAAA;AAC5F,OAAO,KAAK,oBAAoB,MAAM,qDAAqD,CAAA;AAC3F,OAAO,KAAK,oBAAoB,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,oBAAoB,MAAM,kDAAkD,CAAA;AACxF,OAAO,KAAK,oBAAoB,MAAM,qCAAqC,CAAA;AAC3E,OAAO,KAAK,oBAAoB,MAAM,8CAA8C,CAAA;AACpF,OAAO,KAAK,oBAAoB,MAAM,8CAA8C,CAAA;AACpF,OAAO,KAAK,oBAAoB,MAAM,0DAA0D,CAAA"}
@@ -50,4 +50,6 @@ export * as _20260928T000000000Z from './20260928T000000000Z-inbox-appeal.js';
50
50
  export * as _20261002T000000000Z from './20261002T000000000Z-add-report-reporter-did.js';
51
51
  export * as _20261005T000000000Z from './20261005T000000000Z-inbox-seen.js';
52
52
  export * as _20261005T000000001Z from './20261005T000000001Z-inbox-notifications.js';
53
+ export * as _20261008T000000000Z from './20261008T000000000Z-add-report-priority.js';
54
+ export * as _20261008T000000001Z from './20261008T000000001Z-add-report-closure-target-stats.js';
53
55
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/db/migrations/index.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,gGAAgG;AAChG,+FAA+F;AAE/F,OAAO,KAAK,oBAAoB,MAAM,+BAA+B,CAAA;AACrE,OAAO,KAAK,oBAAoB,MAAM,iDAAiD,CAAA;AACvF,OAAO,KAAK,oBAAoB,MAAM,0CAA0C,CAAA;AAChF,OAAO,KAAK,oBAAoB,MAAM,gEAAgE,CAAA;AACtG,OAAO,KAAK,oBAAoB,MAAM,yCAAyC,CAAA;AAC/E,OAAO,KAAK,oBAAoB,MAAM,yCAAyC,CAAA;AAC/E,OAAO,KAAK,oBAAoB,MAAM,0CAA0C,CAAA;AAChF,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,oBAAoB,MAAM,iDAAiD,CAAA;AACvF,OAAO,KAAK,oBAAoB,MAAM,4CAA4C,CAAA;AAClF,OAAO,KAAK,oBAAoB,MAAM,gDAAgD,CAAA;AACtF,OAAO,KAAK,oBAAoB,MAAM,4DAA4D,CAAA;AAClG,OAAO,KAAK,oBAAoB,MAAM,+BAA+B,CAAA;AACrE,OAAO,KAAK,oBAAoB,MAAM,kCAAkC,CAAA;AACxE,OAAO,KAAK,oBAAoB,MAAM,+DAA+D,CAAA;AACrG,OAAO,KAAK,oBAAoB,MAAM,mDAAmD,CAAA;AACzF,OAAO,KAAK,oBAAoB,MAAM,qDAAqD,CAAA;AAC3F,OAAO,KAAK,oBAAoB,MAAM,mDAAmD,CAAA;AACzF,OAAO,KAAK,oBAAoB,MAAM,+DAA+D,CAAA;AACrG,OAAO,KAAK,oBAAoB,MAAM,yCAAyC,CAAA;AAC/E,OAAO,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AK,oBAAoB,MAAM,kDAAkD,CAAA;AACxF,OAAO,KAAK,oBAAoB,MAAM,qCAAqC,CAAA;AAC3E,OAAO,KAAK,oBAAoB,MAAM,8CAA8C,CAAA","sourcesContent":["// NOTE this file can be edited by hand, but it is also appended to by the migration:create command.\n// It's important that every migration is exported from here with the proper name. We'd simplify\n// this with kysely's FileMigrationProvider, but it doesn't play nicely with the build process.\n\nexport * as _20231219T205730722Z from './20231219T205730722Z-init.js'\nexport * as _20240116T085607200Z from './20240116T085607200Z-communication-template.js'\nexport * as _20240201T051104136Z from './20240201T051104136Z-mod-event-blobs.js'\nexport * as _20240208T213404429Z from './20240208T213404429Z-add-tags-column-to-moderation-subject.js'\nexport * as _20240228T003647759Z from './20240228T003647759Z-add-label-sigs.js'\nexport * as _20240408T192432676Z from './20240408T192432676Z-mute-reporting.js'\nexport * as _20240506T225055595Z from './20240506T225055595Z-message-subject.js'\nexport * as _20240430T211332580Z from './20240521T211332580Z-member.js'\nexport * as _20240814T003647759Z from './20240814T003647759Z-event-created-at-index.js'\nexport * as _20240903T205730722Z from './20240903T205730722Z-add-template-lang.js'\nexport * as _20240904T205730722Z from './20240904T205730722Z-add-subject-did-index.js'\nexport * as _20241001T205730722Z from './20241001T205730722Z-subject-status-review-state-index.js'\nexport * as _20241008T205730722Z from './20241008T205730722Z-sets.js'\nexport * as _20241018T205730722Z from './20241018T205730722Z-setting.js'\nexport * as _20241026T205730722Z from './20241026T205730722Z-add-hosting-status-to-subject-status.js'\nexport * as _20241220T144630860Z from './20241220T144630860Z-stats-materialized-views.js'\nexport * as _20250204T003647759Z from './20250204T003647759Z-add-subject-priority-score.js'\nexport * as _20250211T003647759Z from './20250211T003647759Z-add-reporter-stats-index.js'\nexport * as _20250211T132135150Z from './20250211T132135150Z-moderation-event-message-partial-idx.js'\nexport * as _20250221T132135150Z from './20250221T132135150Z-member-details.js'\nexport * as _20250404T201720309Z from './20250404T201720309Z-subject-status-sort-idxs.js'\nexport * as _20250415T201720309Z from './20250415T201720309Z-verification.js'\nexport * as _20250417T201720309Z from './20250417T201720309Z-firehose-cursor.js'\nexport * as _20250609T110704000Z from './20250609T110704000Z-safelink.js'\nexport * as _20250618T180246000Z from './20250618T180246000Z-add-mod-tool-to-moderation-event.js'\nexport * as _20250701T000000000Z from './20250701T000000000Z-add-age-assurance-state.js'\nexport * as _20250715T000000000Z from './20250715T000000000Z-add-mod-event-external-id.js'\nexport * as _20250718T150931000Z from './20250718T150931000Z-update-appeal-reason-stats.js'\nexport * as _20250813T000000000Z from './20250813T000000000Z-mod-tool-batch-id-index.js'\nexport * as _20250923T000000000Z from './20250923T000000000Z-scheduled-actions.js'\nexport * as _20251008T120000000Z from './20251008T120000000Z-add-strike-system.js'\nexport * as _20260210T154806448Z from './20260210T154806448Z-mod-event-created-by-indexes.js'\nexport * as _20260219T164523000Z from './20260219T164523000Z-create-report-table.js'\nexport * as _20260219T165302248Z from './20260219T165302248Z-moderator-assignment.js'\nexport * as _20260225T000000000Z from './20260225T000000000Z-add-report-queue-table.js'\nexport * as _20260313T000000000Z from './20260313T000000000Z-add-report-activity-table.js'\nexport * as _20260318T152058935Z from './20260318T152058935Z-add-report-stat.js'\nexport * as _20260428T000000000Z from './20260428T000000000Z-add-expiring-tag-table.js'\nexport * as _20260513T202941104Z from './20260513T202941104Z-add-subject-convo-id.js'\nexport * as _20260602T120000000Z from './20260602T120000000Z-add-report-activity-created-index.js'\nexport * as _20260617T210022765Z from './20260617T210022765Z-add-report-isautomated.js'\nexport * as _20260720T000000000Z from './20260720T000000000Z-add-convo-subjects-to-stats-views.js'\nexport * as _20260731T000000000Z from './20260731T000000000Z-add-recommended-policies-to-report-queue.js'\nexport * as _20260810T000000000Z from './20260810T000000000Z-add-report-stats-components.js'\nexport * as _20260922T153505234Z from './20260922T153505234Z-add-report-closed-at-index.js'\nexport * as _20260928T000000000Z from './20260928T000000000Z-inbox-appeal.js'\nexport * as _20261002T000000000Z from './20261002T000000000Z-add-report-reporter-did.js'\nexport * as _20261005T000000000Z from './20261005T000000000Z-inbox-seen.js'\nexport * as _20261005T000000001Z from './20261005T000000001Z-inbox-notifications.js'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/db/migrations/index.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,gGAAgG;AAChG,+FAA+F;AAE/F,OAAO,KAAK,oBAAoB,MAAM,+BAA+B,CAAA;AACrE,OAAO,KAAK,oBAAoB,MAAM,iDAAiD,CAAA;AACvF,OAAO,KAAK,oBAAoB,MAAM,0CAA0C,CAAA;AAChF,OAAO,KAAK,oBAAoB,MAAM,gEAAgE,CAAA;AACtG,OAAO,KAAK,oBAAoB,MAAM,yCAAyC,CAAA;AAC/E,OAAO,KAAK,oBAAoB,MAAM,yCAAyC,CAAA;AAC/E,OAAO,KAAK,oBAAoB,MAAM,0CAA0C,CAAA;AAChF,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,oBAAoB,MAAM,iDAAiD,CAAA;AACvF,OAAO,KAAK,oBAAoB,MAAM,4CAA4C,CAAA;AAClF,OAAO,KAAK,oBAAoB,MAAM,gDAAgD,CAAA;AACtF,OAAO,KAAK,oBAAoB,MAAM,4DAA4D,CAAA;AAClG,OAAO,KAAK,oBAAoB,MAAM,+BAA+B,CAAA;AACrE,OAAO,KAAK,oBAAoB,MAAM,kCAAkC,CAAA;AACxE,OAAO,KAAK,oBAAoB,MAAM,+DAA+D,CAAA;AACrG,OAAO,KAAK,oBAAoB,MAAM,mDAAmD,CAAA;AACzF,OAAO,KAAK,oBAAoB,MAAM,qDAAqD,CAAA;AAC3F,OAAO,KAAK,oBAAoB,MAAM,mDAAmD,CAAA;AACzF,OAAO,KAAK,oBAAoB,MAAM,+DAA+D,CAAA;AACrG,OAAO,KAAK,oBAAoB,MAAM,yCAAyC,CAAA;AAC/E,OAAO,KAAK,oBAAoB,MAAM,mDAAmD,CAAA;AACzF,OAAO,KAAK,oBAAoB,MAAM,uCA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C,CAAA;AAC3E,OAAO,KAAK,oBAAoB,MAAM,8CAA8C,CAAA;AACpF,OAAO,KAAK,oBAAoB,MAAM,8CAA8C,CAAA;AACpF,OAAO,KAAK,oBAAoB,MAAM,0DAA0D,CAAA","sourcesContent":["// NOTE this file can be edited by hand, but it is also appended to by the migration:create command.\n// It's important that every migration is exported from here with the proper name. We'd simplify\n// this with kysely's FileMigrationProvider, but it doesn't play nicely with the build process.\n\nexport * as _20231219T205730722Z from './20231219T205730722Z-init.js'\nexport * as _20240116T085607200Z from './20240116T085607200Z-communication-template.js'\nexport * as _20240201T051104136Z from './20240201T051104136Z-mod-event-blobs.js'\nexport * as _20240208T213404429Z from './20240208T213404429Z-add-tags-column-to-moderation-subject.js'\nexport * as _20240228T003647759Z from './20240228T003647759Z-add-label-sigs.js'\nexport * as _20240408T192432676Z from './20240408T192432676Z-mute-reporting.js'\nexport * as _20240506T225055595Z from './20240506T225055595Z-message-subject.js'\nexport * as _20240430T211332580Z from './20240521T211332580Z-member.js'\nexport * as _20240814T003647759Z from './20240814T003647759Z-event-created-at-index.js'\nexport * as _20240903T205730722Z from './20240903T205730722Z-add-template-lang.js'\nexport * as _20240904T205730722Z from './20240904T205730722Z-add-subject-did-index.js'\nexport * as _20241001T205730722Z from './20241001T205730722Z-subject-status-review-state-index.js'\nexport * as _20241008T205730722Z from './20241008T205730722Z-sets.js'\nexport * as _20241018T205730722Z from './20241018T205730722Z-setting.js'\nexport * as _20241026T205730722Z from './20241026T205730722Z-add-hosting-status-to-subject-status.js'\nexport * as _20241220T144630860Z from './20241220T144630860Z-stats-materialized-views.js'\nexport * as _20250204T003647759Z from './20250204T003647759Z-add-subject-priority-score.js'\nexport * as _20250211T003647759Z from './20250211T003647759Z-add-reporter-stats-index.js'\nexport * as _20250211T132135150Z from './20250211T132135150Z-moderation-event-message-partial-idx.js'\nexport * as _20250221T132135150Z from './20250221T132135150Z-member-details.js'\nexport * as _20250404T201720309Z from './20250404T201720309Z-subject-status-sort-idxs.js'\nexport * as _20250415T201720309Z from './20250415T201720309Z-verification.js'\nexport * as _20250417T201720309Z from './20250417T201720309Z-firehose-cursor.js'\nexport * as _20250609T110704000Z from './20250609T110704000Z-safelink.js'\nexport * as _20250618T180246000Z from './20250618T180246000Z-add-mod-tool-to-moderation-event.js'\nexport * as _20250701T000000000Z from './20250701T000000000Z-add-age-assurance-state.js'\nexport * as _20250715T000000000Z from './20250715T000000000Z-add-mod-event-external-id.js'\nexport * as _20250718T150931000Z from './20250718T150931000Z-update-appeal-reason-stats.js'\nexport * as _20250813T000000000Z from './20250813T000000000Z-mod-tool-batch-id-index.js'\nexport * as _20250923T000000000Z from './20250923T000000000Z-scheduled-actions.js'\nexport * as _20251008T120000000Z from './20251008T120000000Z-add-strike-system.js'\nexport * as _20260210T154806448Z from './20260210T154806448Z-mod-event-created-by-indexes.js'\nexport * as _20260219T164523000Z from './20260219T164523000Z-create-report-table.js'\nexport * as _20260219T165302248Z from './20260219T165302248Z-moderator-assignment.js'\nexport * as _20260225T000000000Z from './20260225T000000000Z-add-report-queue-table.js'\nexport * as _20260313T000000000Z from './20260313T000000000Z-add-report-activity-table.js'\nexport * as _20260318T152058935Z from './20260318T152058935Z-add-report-stat.js'\nexport * as _20260428T000000000Z from './20260428T000000000Z-add-expiring-tag-table.js'\nexport * as _20260513T202941104Z from './20260513T202941104Z-add-subject-convo-id.js'\nexport * as _20260602T120000000Z from './20260602T120000000Z-add-report-activity-created-index.js'\nexport * as _20260617T210022765Z from './20260617T210022765Z-add-report-isautomated.js'\nexport * as _20260720T000000000Z from './20260720T000000000Z-add-convo-subjects-to-stats-views.js'\nexport * as _20260731T000000000Z from './20260731T000000000Z-add-recommended-policies-to-report-queue.js'\nexport * as _20260810T000000000Z from './20260810T000000000Z-add-report-stats-components.js'\nexport * as _20260922T153505234Z from './20260922T153505234Z-add-report-closed-at-index.js'\nexport * as _20260928T000000000Z from './20260928T000000000Z-inbox-appeal.js'\nexport * as _20261002T000000000Z from './20261002T000000000Z-add-report-reporter-did.js'\nexport * as _20261005T000000000Z from './20261005T000000000Z-inbox-seen.js'\nexport * as _20261005T000000001Z from './20261005T000000001Z-inbox-notifications.js'\nexport * as _20261008T000000000Z from './20261008T000000000Z-add-report-priority.js'\nexport * as _20261008T000000001Z from './20261008T000000001Z-add-report-closure-target-stats.js'\n"]}
@@ -12,6 +12,18 @@ export interface Report {
12
12
  isAutomated: boolean;
13
13
  status: string;
14
14
  reportType: string;
15
+ /**
16
+ * Priority level assigned to the report from priority settings.
17
+ */
18
+ priorityLevel: string | null;
19
+ /**
20
+ * Report priority score. Higher scores have higher priority.
21
+ */
22
+ priorityScore: number | null;
23
+ /**
24
+ * Target resolution duration in minutes.
25
+ */
26
+ priorityTargetMinutes: number | null;
15
27
  did: DidString;
16
28
  reporterDid: DidString | null;
17
29
  recordPath: string;
@@ -1 +1 @@
1
- {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../src/db/schema/report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7D,eAAO,MAAM,eAAe,WAAW,CAAA;AAEvC,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAA;IAC/B,cAAc,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,SAAS,CAAA;IACd,WAAW,EAAE,SAAS,GAAG,IAAI,CAAA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IACd,WAAW,EAAE,SAAS,GAAG,IAAI,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,SAAS,EAAE,cAAc,CAAA;IACzB,SAAS,EAAE,cAAc,CAAA;IACzB,UAAU,EAAE,SAAS,GAAG,IAAI,CAAA;IAC5B,UAAU,EAAE,cAAc,GAAG,IAAI,CAAA;IACjC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAA;CAChC;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/db/schema/report.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAA","sourcesContent":["import type { Generated } from 'kysely'\nimport type { DatetimeString, DidString } from '@atproto/lex'\n\nexport const reportTableName = 'report'\n\nexport interface Report {\n id: Generated<number>\n eventId: number // References moderation_event.id\n queueId: number | null // NULL = not yet assigned, -1 = no matching queue\n queuedAt: DatetimeString | null\n actionEventIds: number[] | null // Event IDs in append order (most recently linked last)\n actionNote: string | null\n isMuted: boolean\n isAutomated: boolean // Denormalized from moderation_event.modTool.meta.isAutomated\n status: string // 'open', 'closed', 'escalated', 'queued', 'assigned'\n reportType: string // Denormalized from moderation_event.meta.reportType\n did: DidString // Denormalized from moderation_event.subjectDid\n reporterDid: DidString | null // Original moderation_event.createdBy for eventId\n recordPath: string // '' = account/message/conversation, 'collection/rkey' = record\n subjectMessageId: string | null // Denormalized from moderation_event.subjectMessageId\n subjectConvoId: string | null // Denormalized from moderation_event.subjectConvoId\n createdAt: DatetimeString\n updatedAt: DatetimeString\n assignedTo: DidString | null // DID of permanently assigned moderator, null if unassigned\n assignedAt: DatetimeString | null // When the permanent assignment was created\n closedAt: DatetimeString | null\n}\n\nexport type PartialDB = {\n [reportTableName]: Report\n}\n"]}
1
+ {"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/db/schema/report.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAA","sourcesContent":["import type { Generated } from 'kysely'\nimport type { DatetimeString, DidString } from '@atproto/lex'\n\nexport const reportTableName = 'report'\n\nexport interface Report {\n id: Generated<number>\n eventId: number // References moderation_event.id\n queueId: number | null // NULL = not yet assigned, -1 = no matching queue\n queuedAt: DatetimeString | null\n actionEventIds: number[] | null // Event IDs in append order (most recently linked last)\n actionNote: string | null\n isMuted: boolean\n isAutomated: boolean // Denormalized from moderation_event.modTool.meta.isAutomated\n status: string // 'open', 'closed', 'escalated', 'queued', 'assigned'\n reportType: string // Denormalized from moderation_event.meta.reportType\n /**\n * Priority level assigned to the report from priority settings.\n */\n priorityLevel: string | null\n /**\n * Report priority score. Higher scores have higher priority.\n */\n priorityScore: number | null\n /**\n * Target resolution duration in minutes.\n */\n priorityTargetMinutes: number | null\n did: DidString // Denormalized from moderation_event.subjectDid\n reporterDid: DidString | null // Original moderation_event.createdBy for eventId\n recordPath: string // '' = account/message/conversation, 'collection/rkey' = record\n subjectMessageId: string | null // Denormalized from moderation_event.subjectMessageId\n subjectConvoId: string | null // Denormalized from moderation_event.subjectConvoId\n createdAt: DatetimeString\n updatedAt: DatetimeString\n assignedTo: DidString | null // DID of permanently assigned moderator, null if unassigned\n assignedAt: DatetimeString | null // When the permanent assignment was created\n closedAt: DatetimeString | null\n}\n\nexport type PartialDB = {\n [reportTableName]: Report\n}\n"]}
@@ -29,6 +29,12 @@ export interface ReportStat {
29
29
  resolutionDurationSec: number | null;
30
30
  resolutionSampleCount: number | null;
31
31
  avgResolutionTimeSec: number | null;
32
+ /** Current closures within the closure target, inclusive. */
33
+ closureTargetMetCount: number | null;
34
+ /** Current closures exceeding the closure target. */
35
+ closureTargetMissedCount: number | null;
36
+ /** Unmuted pending reports past their closure target. */
37
+ closureTargetOverdueCount: number | null;
32
38
  }
33
39
  export type PartialDB = {
34
40
  [reportStatTableName]: ReportStat;
@@ -1 +1 @@
1
- {"version":3,"file":"report_stat.d.ts","sourceRoot":"","sources":["../../../src/db/schema/report_stat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7D;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;AAExD,eAAO,MAAM,mBAAmB,gBAAgB,CAAA;AAEhD,MAAM,WAAW,UAAU;IAEzB,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IACrB,UAAU,EAAE,cAAc,CAAA;IAG1B,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC5B,YAAY,EAAE,SAAS,GAAG,IAAI,CAAA;IAG9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAG3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAG7B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAG1B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;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,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAG1B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAG7B,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IAGnC,6DAA6D;IAC7D,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,qDAAqD;IACrD,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC,yDAAyD;IACzD,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAA;CACzC;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,mBAAmB,CAAC,EAAE,UAAU,CAAA;CAClC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"report_stat.js","sourceRoot":"","sources":["../../../src/db/schema/report_stat.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAA","sourcesContent":["import type { Generated } from 'kysely'\nimport type { DatetimeString, DidString } from '@atproto/lex'\n\n/**\n * A calendar day in `YYYY-MM-DD` form. Typed as a template literal so it\n * composes into a {@link DatetimeString} without a cast.\n */\nexport type DateString = `${string}-${string}-${string}`\n\nexport const reportStatTableName = 'report_stat'\n\nexport interface ReportStat {\n // metadata\n id: Generated<number>\n computedAt: DatetimeString // When this snapshot was last computed\n\n // group\n date: DateString // ISO date e.g. '2026-04-15' — the calendar day this snapshot covers\n queueId: number | null // NULL = aggregate across all queues\n reportTypes: string[] | null // NULL = aggregate across all report types\n moderatorDid: DidString | null // NULL = aggregate, non-null = per-moderator\n\n // inbound\n inboundCount: number | null // Reports received during this calendar day\n\n // unresolved\n pendingCount: number | null // Reports with status != 'closed' at time of computation\n escalatedCount: number | null // Reports escalated during this calendar day\n\n // resolved\n actionedCount: number | null // Current closures whose last action was enforcement\n actionRate: number | null // actionedCount / closedCount * 100\n labelActionCount: number | null // Current closures whose last action was label\n tagActionCount: number | null // Current closures whose last action was tag\n takedownActionCount: number | null // Current closures whose last action was takedown\n acknowledgedCount: number | null // Current closures without a last enforcement action\n closedCount: number | null // Current reports with closedAt in this calendar day\n\n // handling time\n avgHandlingTimeSec: number | null // Average time from assignment to close, in seconds\n ahtDurationSec: number | null // Sum of assignment-to-close durations\n ahtSampleCount: number | null // Assigned closed-report samples in ahtDurationSec\n\n // resolution time\n resolutionDurationSec: number | null // Sum of creation-to-close durations\n resolutionSampleCount: number | null // Closed-report samples in resolutionDurationSec\n avgResolutionTimeSec: number | null // Average time from creation to close, in seconds\n}\n\nexport type PartialDB = {\n [reportStatTableName]: ReportStat\n}\n"]}
1
+ {"version":3,"file":"report_stat.js","sourceRoot":"","sources":["../../../src/db/schema/report_stat.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAA","sourcesContent":["import type { Generated } from 'kysely'\nimport type { DatetimeString, DidString } from '@atproto/lex'\n\n/**\n * A calendar day in `YYYY-MM-DD` form. Typed as a template literal so it\n * composes into a {@link DatetimeString} without a cast.\n */\nexport type DateString = `${string}-${string}-${string}`\n\nexport const reportStatTableName = 'report_stat'\n\nexport interface ReportStat {\n // metadata\n id: Generated<number>\n computedAt: DatetimeString // When this snapshot was last computed\n\n // group\n date: DateString // ISO date e.g. '2026-04-15' — the calendar day this snapshot covers\n queueId: number | null // NULL = aggregate across all queues\n reportTypes: string[] | null // NULL = aggregate across all report types\n moderatorDid: DidString | null // NULL = aggregate, non-null = per-moderator\n\n // inbound\n inboundCount: number | null // Reports received during this calendar day\n\n // unresolved\n pendingCount: number | null // Unmuted reports not closed at the snapshot time\n escalatedCount: number | null // Reports escalated during this calendar day\n\n // resolved\n actionedCount: number | null // Current closures whose last action was enforcement\n actionRate: number | null // actionedCount / closedCount * 100\n labelActionCount: number | null // Current closures whose last action was label\n tagActionCount: number | null // Current closures whose last action was tag\n takedownActionCount: number | null // Current closures whose last action was takedown\n acknowledgedCount: number | null // Current closures without a last enforcement action\n closedCount: number | null // Current reports with closedAt in this calendar day\n\n // handling time\n avgHandlingTimeSec: number | null // Average time from assignment to close, in seconds\n ahtDurationSec: number | null // Sum of assignment-to-close durations\n ahtSampleCount: number | null // Assigned closed-report samples in ahtDurationSec\n\n // resolution time\n resolutionDurationSec: number | null // Sum of creation-to-close durations\n resolutionSampleCount: number | null // Closed-report samples in resolutionDurationSec\n avgResolutionTimeSec: number | null // Average time from creation to close, in seconds\n\n // closure target\n /** Current closures within the closure target, inclusive. */\n closureTargetMetCount: number | null\n /** Current closures exceeding the closure target. */\n closureTargetMissedCount: number | null\n /** Unmuted pending reports past their closure target. */\n closureTargetOverdueCount: number | null\n}\n\nexport type PartialDB = {\n [reportStatTableName]: ReportStat\n}\n"]}
@@ -88,6 +88,14 @@ type ViewRecord = {
88
88
  repostCount?: number;
89
89
  likeCount?: number;
90
90
  quoteCount?: number;
91
+ /**
92
+ * The 1-indexed position of this post within the contiguous OP thread. Only present when this post is part of the OP thread.
93
+ */
94
+ opThreadPostIndex?: number;
95
+ /**
96
+ * The total number of posts in the contiguous OP thread that this post belongs to. Only present when this post is part of the OP thread.
97
+ */
98
+ opThreadPostCount?: number;
91
99
  embeds?: (l.$Typed<EmbedImages.View> | l.$Typed<EmbedVideo.View> | l.$Typed<EmbedGallery.View> | l.$Typed<EmbedExternal.View> | l.$Typed<View> | l.$Typed<EmbedRecordWithMedia.View> | l.Unknown$TypedObject)[];
92
100
  indexedAt: l.DatetimeString;
93
101
  };
@@ -1 +1 @@
1
- {"version":3,"file":"record.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/app/bsky/embed/record.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AA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AAE5B,QAAA,MAAM,YAAY,oGAOjB,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -60,6 +60,8 @@ const viewRecord = /*#__PURE__*/ l.typedObject($nsid, 'viewRecord',
60
60
  repostCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),
61
61
  likeCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),
62
62
  quoteCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),
63
+ opThreadPostIndex: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),
64
+ opThreadPostCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),
63
65
  embeds: /*#__PURE__*/ l.optional(
64
66
  /*#__PURE__*/ l.array(
65
67
  /*#__PURE__*/ l.typedUnion([
@@ -1 +1 @@
1
- {"version":3,"file":"record.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/app/bsky/embed/record.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAChC,OAAO,KAAK,aAAa,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAA;AAChD,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,WAAW,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,SAAS,MAAM,yCAAyC,CAAA;AACpE,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAA;AAEjE,MAAM,KAAK,GAAG,uBAAuB,CAAA;AAIrC,OAAO,EAAE,KAAK,EA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,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACjD,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACtC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CACzB,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAQ,CACtC;CACF,CAAC,CACH,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA;AAUtB,MAAM,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,WAAW,CAC9C,KAAK,EACL,cAAc;AACd,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACjD,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CACxC,CAAC,CACH,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex'\nimport * as RepoStrongRef from '../../../com/atproto/repo/strongRef.defs.js'\nimport * as FeedDefs from '../feed/defs.defs.js'\nimport * as GraphDefs from '../graph/defs.defs.js'\nimport * as LabelerDefs from '../labeler/defs.defs.js'\nimport * as ActorDefs from '../actor/defs.defs.js'\nimport * as LabelDefs from '../../../com/atproto/label/defs.defs.js'\nimport * as EmbedImages from './images.defs.js'\nimport * as EmbedVideo from './video.defs.js'\nimport * as EmbedGallery from './gallery.defs.js'\nimport * as EmbedExternal from './external.defs.js'\nimport * as EmbedRecordWithMedia from './recordWithMedia.defs.js'\n\nconst $nsid = 'app.bsky.embed.record'\n\ntype $nsid = typeof $nsid\n\nexport { $nsid }\n\ntype Main = { $type?: 'app.bsky.embed.record'; record: RepoStrongRef.Main }\n\nexport type { Main }\n\nconst main = /*#__PURE__*/ l.typedObject<Main>(\n $nsid,\n 'main',\n /*#__PURE__*/ l.object({\n record: /*#__PURE__*/ l.ref<RepoStrongRef.Main>(\n (() => RepoStrongRef.main) as any,\n ),\n }),\n)\n\nexport { main }\n\nconst $type = $nsid\n\ntype $type = typeof $type\n\nexport { $type }\n\nexport const $isTypeOf = /*#__PURE__*/ main.isTypeOf.bind(main)\nexport const $build = /*#__PURE__*/ main.build.bind(main)\nexport const $assert = /*#__PURE__*/ main.assert.bind(main)\nexport const $check = /*#__PURE__*/ main.check.bind(main)\nexport const $cast = /*#__PURE__*/ main.cast.bind(main)\nexport const $ifMatches = /*#__PURE__*/ main.ifMatches.bind(main)\nexport const $matches = /*#__PURE__*/ main.matches.bind(main)\nexport const $parse = /*#__PURE__*/ main.parse.bind(main)\nexport const $safeParse = /*#__PURE__*/ main.safeParse.bind(main)\nexport const $validate = /*#__PURE__*/ main.validate.bind(main)\nexport const $safeValidate = /*#__PURE__*/ main.safeValidate.bind(main)\n\ntype View = {\n $type?: 'app.bsky.embed.record#view'\n record:\n | l.$Typed<ViewRecord>\n | l.$Typed<ViewNotFound>\n | l.$Typed<ViewBlocked>\n | l.$Typed<ViewDetached>\n | l.$Typed<FeedDefs.GeneratorView>\n | l.$Typed<GraphDefs.ListView>\n | l.$Typed<LabelerDefs.LabelerView>\n | l.$Typed<GraphDefs.StarterPackViewBasic>\n | l.Unknown$TypedObject\n}\n\nexport type { View }\n\nconst view = /*#__PURE__*/ l.typedObject<View>(\n $nsid,\n 'view',\n /*#__PURE__*/ l.object({\n record: /*#__PURE__*/ l.typedUnion(\n [\n /*#__PURE__*/ l.typedRef<ViewRecord>((() => viewRecord) as any),\n /*#__PURE__*/ l.typedRef<ViewNotFound>((() => viewNotFound) as any),\n /*#__PURE__*/ l.typedRef<ViewBlocked>((() => viewBlocked) as any),\n /*#__PURE__*/ l.typedRef<ViewDetached>((() => viewDetached) as any),\n /*#__PURE__*/ l.typedRef<FeedDefs.GeneratorView>(\n (() => FeedDefs.generatorView) as any,\n ),\n /*#__PURE__*/ l.typedRef<GraphDefs.ListView>(\n (() => GraphDefs.listView) as any,\n ),\n /*#__PURE__*/ l.typedRef<LabelerDefs.LabelerView>(\n (() => LabelerDefs.labelerView) as any,\n ),\n /*#__PURE__*/ l.typedRef<GraphDefs.StarterPackViewBasic>(\n (() => GraphDefs.starterPackViewBasic) as any,\n ),\n ],\n false,\n ),\n }),\n)\n\nexport { view }\n\ntype ViewRecord = {\n $type?: 'app.bsky.embed.record#viewRecord'\n uri: l.AtUriString\n cid: l.CidString\n author: ActorDefs.ProfileViewBasic\n\n /**\n * The record data itself.\n */\n value: l.LexMap\n labels?: LabelDefs.Label[]\n replyCount?: number\n repostCount?: number\n likeCount?: number\n quoteCount?: number\n embeds?: (\n | l.$Typed<EmbedImages.View>\n | l.$Typed<EmbedVideo.View>\n | l.$Typed<EmbedGallery.View>\n | l.$Typed<EmbedExternal.View>\n | l.$Typed<View>\n | l.$Typed<EmbedRecordWithMedia.View>\n | l.Unknown$TypedObject\n )[]\n indexedAt: l.DatetimeString\n}\n\nexport type { ViewRecord }\n\nconst viewRecord = /*#__PURE__*/ l.typedObject<ViewRecord>(\n $nsid,\n 'viewRecord',\n /*#__PURE__*/ l.object({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n cid: /*#__PURE__*/ l.string({ format: 'cid' }),\n author: /*#__PURE__*/ l.ref<ActorDefs.ProfileViewBasic>(\n (() => ActorDefs.profileViewBasic) as any,\n ),\n value: /*#__PURE__*/ l.lexMap(),\n labels: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.array(\n /*#__PURE__*/ l.ref<LabelDefs.Label>((() => LabelDefs.label) as any),\n ),\n ),\n replyCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),\n repostCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),\n likeCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),\n quoteCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),\n embeds: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.array(\n /*#__PURE__*/ l.typedUnion(\n [\n /*#__PURE__*/ l.typedRef<EmbedImages.View>(\n (() => EmbedImages.view) as any,\n ),\n /*#__PURE__*/ l.typedRef<EmbedVideo.View>(\n (() => EmbedVideo.view) as any,\n ),\n /*#__PURE__*/ l.typedRef<EmbedGallery.View>(\n (() => EmbedGallery.view) as any,\n ),\n /*#__PURE__*/ l.typedRef<EmbedExternal.View>(\n (() => EmbedExternal.view) as any,\n ),\n /*#__PURE__*/ l.typedRef<View>((() => view) as any),\n /*#__PURE__*/ l.typedRef<EmbedRecordWithMedia.View>(\n (() => EmbedRecordWithMedia.view) as any,\n ),\n ],\n false,\n ),\n ),\n ),\n indexedAt: /*#__PURE__*/ l.string({ format: 'datetime' }),\n }),\n)\n\nexport { viewRecord }\n\ntype ViewNotFound = {\n $type?: 'app.bsky.embed.record#viewNotFound'\n uri: l.AtUriString\n notFound: true\n}\n\nexport type { ViewNotFound }\n\nconst viewNotFound = /*#__PURE__*/ l.typedObject<ViewNotFound>(\n $nsid,\n 'viewNotFound',\n /*#__PURE__*/ l.object({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n notFound: /*#__PURE__*/ l.literal(true),\n }),\n)\n\nexport { viewNotFound }\n\ntype ViewBlocked = {\n $type?: 'app.bsky.embed.record#viewBlocked'\n uri: l.AtUriString\n blocked: true\n author: FeedDefs.BlockedAuthor\n}\n\nexport type { ViewBlocked }\n\nconst viewBlocked = /*#__PURE__*/ l.typedObject<ViewBlocked>(\n $nsid,\n 'viewBlocked',\n /*#__PURE__*/ l.object({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n blocked: /*#__PURE__*/ l.literal(true),\n author: /*#__PURE__*/ l.ref<FeedDefs.BlockedAuthor>(\n (() => FeedDefs.blockedAuthor) as any,\n ),\n }),\n)\n\nexport { viewBlocked }\n\ntype ViewDetached = {\n $type?: 'app.bsky.embed.record#viewDetached'\n uri: l.AtUriString\n detached: true\n}\n\nexport type { ViewDetached }\n\nconst viewDetached = /*#__PURE__*/ l.typedObject<ViewDetached>(\n $nsid,\n 'viewDetached',\n /*#__PURE__*/ l.object({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n detached: /*#__PURE__*/ l.literal(true),\n }),\n)\n\nexport { viewDetached }\n"]}
1
+ {"version":3,"file":"record.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/app/bsky/embed/record.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAChC,OAAO,KAAK,aAAa,MAAM,6CAA6C,CAAA;AAC5E,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAA;AAChD,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,WAAW,MAAM,yBAAyB,CAAA;AACtD,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAClD,OAAO,KAAK,SAAS,MAAM,yCAAyC,CAAA;AACpE,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,oBAAoB,MAAM,2BAA2B,CAAA;AAEjE,MAAM,KAAK,GAAG,uBAAuB,CAAA;AAIrC,OAAO,EAAE,KAAK,EAAE,CAAA;AAMhB,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,WAAW,CACtC,KAAK,EACL,MAAM;AACN,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACrB,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CACzB,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAQ,CAClC;CACF,CAAC,CACH,CAAA;AAED,OAAO,EAAE,I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,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACtC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CACzB,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAQ,CACtC;CACF,CAAC,CACH,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA;AAUtB,MAAM,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,WAAW,CAC9C,KAAK,EACL,cAAc;AACd,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACjD,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;CACxC,CAAC,CACH,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex'\nimport * as RepoStrongRef from '../../../com/atproto/repo/strongRef.defs.js'\nimport * as FeedDefs from '../feed/defs.defs.js'\nimport * as GraphDefs from '../graph/defs.defs.js'\nimport * as LabelerDefs from '../labeler/defs.defs.js'\nimport * as ActorDefs from '../actor/defs.defs.js'\nimport * as LabelDefs from '../../../com/atproto/label/defs.defs.js'\nimport * as EmbedImages from './images.defs.js'\nimport * as EmbedVideo from './video.defs.js'\nimport * as EmbedGallery from './gallery.defs.js'\nimport * as EmbedExternal from './external.defs.js'\nimport * as EmbedRecordWithMedia from './recordWithMedia.defs.js'\n\nconst $nsid = 'app.bsky.embed.record'\n\ntype $nsid = typeof $nsid\n\nexport { $nsid }\n\ntype Main = { $type?: 'app.bsky.embed.record'; record: RepoStrongRef.Main }\n\nexport type { Main }\n\nconst main = /*#__PURE__*/ l.typedObject<Main>(\n $nsid,\n 'main',\n /*#__PURE__*/ l.object({\n record: /*#__PURE__*/ l.ref<RepoStrongRef.Main>(\n (() => RepoStrongRef.main) as any,\n ),\n }),\n)\n\nexport { main }\n\nconst $type = $nsid\n\ntype $type = typeof $type\n\nexport { $type }\n\nexport const $isTypeOf = /*#__PURE__*/ main.isTypeOf.bind(main)\nexport const $build = /*#__PURE__*/ main.build.bind(main)\nexport const $assert = /*#__PURE__*/ main.assert.bind(main)\nexport const $check = /*#__PURE__*/ main.check.bind(main)\nexport const $cast = /*#__PURE__*/ main.cast.bind(main)\nexport const $ifMatches = /*#__PURE__*/ main.ifMatches.bind(main)\nexport const $matches = /*#__PURE__*/ main.matches.bind(main)\nexport const $parse = /*#__PURE__*/ main.parse.bind(main)\nexport const $safeParse = /*#__PURE__*/ main.safeParse.bind(main)\nexport const $validate = /*#__PURE__*/ main.validate.bind(main)\nexport const $safeValidate = /*#__PURE__*/ main.safeValidate.bind(main)\n\ntype View = {\n $type?: 'app.bsky.embed.record#view'\n record:\n | l.$Typed<ViewRecord>\n | l.$Typed<ViewNotFound>\n | l.$Typed<ViewBlocked>\n | l.$Typed<ViewDetached>\n | l.$Typed<FeedDefs.GeneratorView>\n | l.$Typed<GraphDefs.ListView>\n | l.$Typed<LabelerDefs.LabelerView>\n | l.$Typed<GraphDefs.StarterPackViewBasic>\n | l.Unknown$TypedObject\n}\n\nexport type { View }\n\nconst view = /*#__PURE__*/ l.typedObject<View>(\n $nsid,\n 'view',\n /*#__PURE__*/ l.object({\n record: /*#__PURE__*/ l.typedUnion(\n [\n /*#__PURE__*/ l.typedRef<ViewRecord>((() => viewRecord) as any),\n /*#__PURE__*/ l.typedRef<ViewNotFound>((() => viewNotFound) as any),\n /*#__PURE__*/ l.typedRef<ViewBlocked>((() => viewBlocked) as any),\n /*#__PURE__*/ l.typedRef<ViewDetached>((() => viewDetached) as any),\n /*#__PURE__*/ l.typedRef<FeedDefs.GeneratorView>(\n (() => FeedDefs.generatorView) as any,\n ),\n /*#__PURE__*/ l.typedRef<GraphDefs.ListView>(\n (() => GraphDefs.listView) as any,\n ),\n /*#__PURE__*/ l.typedRef<LabelerDefs.LabelerView>(\n (() => LabelerDefs.labelerView) as any,\n ),\n /*#__PURE__*/ l.typedRef<GraphDefs.StarterPackViewBasic>(\n (() => GraphDefs.starterPackViewBasic) as any,\n ),\n ],\n false,\n ),\n }),\n)\n\nexport { view }\n\ntype ViewRecord = {\n $type?: 'app.bsky.embed.record#viewRecord'\n uri: l.AtUriString\n cid: l.CidString\n author: ActorDefs.ProfileViewBasic\n\n /**\n * The record data itself.\n */\n value: l.LexMap\n labels?: LabelDefs.Label[]\n replyCount?: number\n repostCount?: number\n likeCount?: number\n quoteCount?: number\n\n /**\n * The 1-indexed position of this post within the contiguous OP thread. Only present when this post is part of the OP thread.\n */\n opThreadPostIndex?: number\n\n /**\n * The total number of posts in the contiguous OP thread that this post belongs to. Only present when this post is part of the OP thread.\n */\n opThreadPostCount?: number\n embeds?: (\n | l.$Typed<EmbedImages.View>\n | l.$Typed<EmbedVideo.View>\n | l.$Typed<EmbedGallery.View>\n | l.$Typed<EmbedExternal.View>\n | l.$Typed<View>\n | l.$Typed<EmbedRecordWithMedia.View>\n | l.Unknown$TypedObject\n )[]\n indexedAt: l.DatetimeString\n}\n\nexport type { ViewRecord }\n\nconst viewRecord = /*#__PURE__*/ l.typedObject<ViewRecord>(\n $nsid,\n 'viewRecord',\n /*#__PURE__*/ l.object({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n cid: /*#__PURE__*/ l.string({ format: 'cid' }),\n author: /*#__PURE__*/ l.ref<ActorDefs.ProfileViewBasic>(\n (() => ActorDefs.profileViewBasic) as any,\n ),\n value: /*#__PURE__*/ l.lexMap(),\n labels: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.array(\n /*#__PURE__*/ l.ref<LabelDefs.Label>((() => LabelDefs.label) as any),\n ),\n ),\n replyCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),\n repostCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),\n likeCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),\n quoteCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),\n opThreadPostIndex: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),\n opThreadPostCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),\n embeds: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.array(\n /*#__PURE__*/ l.typedUnion(\n [\n /*#__PURE__*/ l.typedRef<EmbedImages.View>(\n (() => EmbedImages.view) as any,\n ),\n /*#__PURE__*/ l.typedRef<EmbedVideo.View>(\n (() => EmbedVideo.view) as any,\n ),\n /*#__PURE__*/ l.typedRef<EmbedGallery.View>(\n (() => EmbedGallery.view) as any,\n ),\n /*#__PURE__*/ l.typedRef<EmbedExternal.View>(\n (() => EmbedExternal.view) as any,\n ),\n /*#__PURE__*/ l.typedRef<View>((() => view) as any),\n /*#__PURE__*/ l.typedRef<EmbedRecordWithMedia.View>(\n (() => EmbedRecordWithMedia.view) as any,\n ),\n ],\n false,\n ),\n ),\n ),\n indexedAt: /*#__PURE__*/ l.string({ format: 'datetime' }),\n }),\n)\n\nexport { viewRecord }\n\ntype ViewNotFound = {\n $type?: 'app.bsky.embed.record#viewNotFound'\n uri: l.AtUriString\n notFound: true\n}\n\nexport type { ViewNotFound }\n\nconst viewNotFound = /*#__PURE__*/ l.typedObject<ViewNotFound>(\n $nsid,\n 'viewNotFound',\n /*#__PURE__*/ l.object({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n notFound: /*#__PURE__*/ l.literal(true),\n }),\n)\n\nexport { viewNotFound }\n\ntype ViewBlocked = {\n $type?: 'app.bsky.embed.record#viewBlocked'\n uri: l.AtUriString\n blocked: true\n author: FeedDefs.BlockedAuthor\n}\n\nexport type { ViewBlocked }\n\nconst viewBlocked = /*#__PURE__*/ l.typedObject<ViewBlocked>(\n $nsid,\n 'viewBlocked',\n /*#__PURE__*/ l.object({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n blocked: /*#__PURE__*/ l.literal(true),\n author: /*#__PURE__*/ l.ref<FeedDefs.BlockedAuthor>(\n (() => FeedDefs.blockedAuthor) as any,\n ),\n }),\n)\n\nexport { viewBlocked }\n\ntype ViewDetached = {\n $type?: 'app.bsky.embed.record#viewDetached'\n uri: l.AtUriString\n detached: true\n}\n\nexport type { ViewDetached }\n\nconst viewDetached = /*#__PURE__*/ l.typedObject<ViewDetached>(\n $nsid,\n 'viewDetached',\n /*#__PURE__*/ l.object({\n uri: /*#__PURE__*/ l.string({ format: 'at-uri' }),\n detached: /*#__PURE__*/ l.literal(true),\n }),\n)\n\nexport { viewDetached }\n"]}
@@ -62,9 +62,25 @@ export { queueView };
62
62
  type QueueStats = {
63
63
  $type?: 'tools.ozone.queue.defs#queueStats';
64
64
  /**
65
- * Number of reports in 'open' status
65
+ * Number of unmuted reports currently not closed.
66
66
  */
67
67
  pendingCount?: number;
68
+ /**
69
+ * Unmuted pending reports past their closure target.
70
+ */
71
+ closureTargetOverdueCount?: number;
72
+ /**
73
+ * Reports whose closure meets their closure target.
74
+ */
75
+ closureTargetMetCount?: number;
76
+ /**
77
+ * Reports whose closure exceeds their closure target.
78
+ */
79
+ closureTargetMissedCount?: number;
80
+ /**
81
+ * Percent of reports meeting their closure target.
82
+ */
83
+ closureTargetMetRate?: number;
68
84
  /**
69
85
  * Number of reports in 'closed' status
70
86
  */
@@ -1 +1 @@
1
- {"version":3,"file":"defs.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/tools/ozone/queue/defs.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAChC,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAA;AAEhD,QAAA,MAAM,KAAK,2BAA2B,CAAA;AAEtC,KAAK,KAAK,GAAG,OAAO,KAAK,CAAA;AAEzB,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,KAAK,SAAS,GAAG;IACf,KAA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MAAM,CAAA;IAEnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,cAAc,CAAA;CAC/B,CAAA;AAED,YAAY,EAAE,UAAU,EAAE,CAAA;AAE1B,QAAA,MAAM,UAAU,+FA0Bf,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA;AAErB,KAAK,cAAc,GAAG;IACpB,KAAK,CAAC,EAAE,uCAAuC,CAAA;IAC/C,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,CAAC,CAAC,SAAS,CAAA;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAA;IAC3B,KAAK,EAAE,SAAS,CAAA;IAChB,OAAO,EAAE,CAAC,CAAC,cAAc,CAAA;IACzB,KAAK,CAAC,EAAE,CAAC,CAAC,cAAc,CAAA;CACzB,CAAA;AAED,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B,QAAA,MAAM,cAAc,2GAenB,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -33,6 +33,14 @@ export { queueView };
33
33
  const queueStats = /*#__PURE__*/ l.typedObject($nsid, 'queueStats',
34
34
  /*#__PURE__*/ l.object({
35
35
  pendingCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),
36
+ closureTargetOverdueCount: /*#__PURE__*/ l.optional(
37
+ /*#__PURE__*/ l.integer({ minimum: 0 })),
38
+ closureTargetMetCount: /*#__PURE__*/ l.optional(
39
+ /*#__PURE__*/ l.integer({ minimum: 0 })),
40
+ closureTargetMissedCount: /*#__PURE__*/ l.optional(
41
+ /*#__PURE__*/ l.integer({ minimum: 0 })),
42
+ closureTargetMetRate: /*#__PURE__*/ l.optional(
43
+ /*#__PURE__*/ l.integer({ minimum: 0, maximum: 100 })),
36
44
  actionedCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),
37
45
  escalatedCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),
38
46
  inboundCount: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),