@atproto/ozone 0.2.4 → 0.2.6

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 (217) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/api/index.d.ts.map +1 -1
  3. package/dist/api/index.js +2 -0
  4. package/dist/api/index.js.map +1 -1
  5. package/dist/api/label/queryLabels.d.ts.map +1 -1
  6. package/dist/api/label/queryLabels.js +13 -21
  7. package/dist/api/label/queryLabels.js.map +1 -1
  8. package/dist/api/report/queryActivities.d.ts +4 -0
  9. package/dist/api/report/queryActivities.d.ts.map +1 -0
  10. package/dist/api/report/queryActivities.js +36 -0
  11. package/dist/api/report/queryActivities.js.map +1 -0
  12. package/dist/assignment/index.d.ts.map +1 -1
  13. package/dist/assignment/index.js +9 -12
  14. package/dist/assignment/index.js.map +1 -1
  15. package/dist/background.d.ts +5 -3
  16. package/dist/background.d.ts.map +1 -1
  17. package/dist/background.js +13 -4
  18. package/dist/background.js.map +1 -1
  19. package/dist/context.js +1 -1
  20. package/dist/context.js.map +1 -1
  21. package/dist/daemon/context.js +1 -1
  22. package/dist/daemon/context.js.map +1 -1
  23. package/dist/daemon/event-pusher.d.ts +7 -1
  24. package/dist/daemon/event-pusher.d.ts.map +1 -1
  25. package/dist/daemon/verification-listener.d.ts +1 -1
  26. package/dist/daemon/verification-listener.d.ts.map +1 -1
  27. package/dist/daemon/verification-listener.js +10 -4
  28. package/dist/daemon/verification-listener.js.map +1 -1
  29. package/dist/db/index.d.ts +4 -5
  30. package/dist/db/index.d.ts.map +1 -1
  31. package/dist/db/index.js +2 -1
  32. package/dist/db/index.js.map +1 -1
  33. package/dist/db/migrations/20241220T144630860Z-stats-materialized-views.d.ts +1 -2
  34. package/dist/db/migrations/20241220T144630860Z-stats-materialized-views.d.ts.map +1 -1
  35. package/dist/db/migrations/20241220T144630860Z-stats-materialized-views.js.map +1 -1
  36. package/dist/db/migrations/20250718T150931000Z-update-appeal-reason-stats.d.ts +1 -2
  37. package/dist/db/migrations/20250718T150931000Z-update-appeal-reason-stats.d.ts.map +1 -1
  38. package/dist/db/migrations/20250718T150931000Z-update-appeal-reason-stats.js.map +1 -1
  39. package/dist/db/migrations/20260602T120000000Z-add-report-activity-created-index.d.ts +4 -0
  40. package/dist/db/migrations/20260602T120000000Z-add-report-activity-created-index.d.ts.map +1 -0
  41. package/dist/db/migrations/20260602T120000000Z-add-report-activity-created-index.js +15 -0
  42. package/dist/db/migrations/20260602T120000000Z-add-report-activity-created-index.js.map +1 -0
  43. package/dist/db/migrations/index.d.ts +1 -0
  44. package/dist/db/migrations/index.d.ts.map +1 -1
  45. package/dist/db/migrations/index.js +1 -0
  46. package/dist/db/migrations/index.js.map +1 -1
  47. package/dist/db/migrations/provider.d.ts +2 -1
  48. package/dist/db/migrations/provider.d.ts.map +1 -1
  49. package/dist/db/migrations/provider.js.map +1 -1
  50. package/dist/db/pagination.d.ts +4 -3
  51. package/dist/db/pagination.d.ts.map +1 -1
  52. package/dist/db/pagination.js +4 -4
  53. package/dist/db/pagination.js.map +1 -1
  54. package/dist/db/types.d.ts +1 -1
  55. package/dist/db/types.d.ts.map +1 -1
  56. package/dist/db/types.js.map +1 -1
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +23 -13
  59. package/dist/index.js.map +1 -1
  60. package/dist/jetstream/service.d.ts +1 -1
  61. package/dist/jetstream/service.d.ts.map +1 -1
  62. package/dist/jetstream/service.js +3 -1
  63. package/dist/jetstream/service.js.map +1 -1
  64. package/dist/lexicon/index.d.ts +11 -0
  65. package/dist/lexicon/index.d.ts.map +1 -1
  66. package/dist/lexicon/index.js +18 -0
  67. package/dist/lexicon/index.js.map +1 -1
  68. package/dist/lexicon/lexicons.d.ts +338 -0
  69. package/dist/lexicon/lexicons.d.ts.map +1 -1
  70. package/dist/lexicon/lexicons.js +173 -0
  71. package/dist/lexicon/lexicons.js.map +1 -1
  72. package/dist/lexicon/types/app/bsky/notification/defs.d.ts +1 -0
  73. package/dist/lexicon/types/app/bsky/notification/defs.d.ts.map +1 -1
  74. package/dist/lexicon/types/app/bsky/notification/defs.js.map +1 -1
  75. package/dist/lexicon/types/chat/bsky/notification/defs.d.ts +19 -0
  76. package/dist/lexicon/types/chat/bsky/notification/defs.d.ts.map +1 -0
  77. package/dist/lexicon/types/chat/bsky/notification/defs.js +19 -0
  78. package/dist/lexicon/types/chat/bsky/notification/defs.js.map +1 -0
  79. package/dist/lexicon/types/chat/bsky/notification/getPreferences.d.ts +20 -0
  80. package/dist/lexicon/types/chat/bsky/notification/getPreferences.d.ts.map +1 -0
  81. package/dist/lexicon/types/chat/bsky/notification/getPreferences.js +5 -0
  82. package/dist/lexicon/types/chat/bsky/notification/getPreferences.js.map +1 -0
  83. package/dist/lexicon/types/chat/bsky/notification/putPreferences.d.ts +26 -0
  84. package/dist/lexicon/types/chat/bsky/notification/putPreferences.d.ts.map +1 -0
  85. package/dist/lexicon/types/chat/bsky/notification/putPreferences.js +5 -0
  86. package/dist/lexicon/types/chat/bsky/notification/putPreferences.js.map +1 -0
  87. package/dist/lexicon/types/tools/ozone/report/defs.d.ts +1 -0
  88. package/dist/lexicon/types/tools/ozone/report/defs.d.ts.map +1 -1
  89. package/dist/lexicon/types/tools/ozone/report/defs.js.map +1 -1
  90. package/dist/lexicon/types/tools/ozone/report/queryActivities.d.ts +32 -0
  91. package/dist/lexicon/types/tools/ozone/report/queryActivities.d.ts.map +1 -0
  92. package/dist/lexicon/types/tools/ozone/report/queryActivities.js +5 -0
  93. package/dist/lexicon/types/tools/ozone/report/queryActivities.js.map +1 -0
  94. package/dist/mod-service/index.d.ts.map +1 -1
  95. package/dist/mod-service/index.js +28 -52
  96. package/dist/mod-service/index.js.map +1 -1
  97. package/dist/mod-service/report.d.ts +1 -0
  98. package/dist/mod-service/report.d.ts.map +1 -1
  99. package/dist/mod-service/report.js +16 -0
  100. package/dist/mod-service/report.js.map +1 -1
  101. package/dist/mod-service/status.d.ts +23 -128
  102. package/dist/mod-service/status.d.ts.map +1 -1
  103. package/dist/mod-service/views.js +7 -11
  104. package/dist/mod-service/views.js.map +1 -1
  105. package/dist/queue/service.js +1 -3
  106. package/dist/queue/service.js.map +1 -1
  107. package/dist/report/activity.d.ts +31 -2
  108. package/dist/report/activity.d.ts.map +1 -1
  109. package/dist/report/activity.js +27 -1
  110. package/dist/report/activity.js.map +1 -1
  111. package/dist/report/stats.d.ts.map +1 -1
  112. package/dist/report/stats.js.map +1 -1
  113. package/dist/scheduled-action/service.d.ts.map +1 -1
  114. package/dist/scheduled-action/service.js +16 -20
  115. package/dist/scheduled-action/service.js.map +1 -1
  116. package/dist/set/service.d.ts +10 -1
  117. package/dist/set/service.d.ts.map +1 -1
  118. package/dist/set/service.js +5 -2
  119. package/dist/set/service.js.map +1 -1
  120. package/dist/team/index.d.ts.map +1 -1
  121. package/dist/team/index.js +5 -4
  122. package/dist/team/index.js.map +1 -1
  123. package/dist/verification/issuer.d.ts +13 -3
  124. package/dist/verification/issuer.d.ts.map +1 -1
  125. package/dist/verification/service.d.ts +13 -1
  126. package/dist/verification/service.d.ts.map +1 -1
  127. package/dist/verification/service.js +1 -1
  128. package/dist/verification/service.js.map +1 -1
  129. package/package.json +12 -11
  130. package/src/api/index.ts +2 -0
  131. package/src/api/label/queryLabels.ts +11 -14
  132. package/src/api/report/queryActivities.ts +64 -0
  133. package/src/assignment/index.ts +15 -18
  134. package/src/background.ts +19 -4
  135. package/src/context.ts +1 -1
  136. package/src/daemon/context.ts +1 -1
  137. package/src/daemon/verification-listener.ts +9 -4
  138. package/src/db/index.ts +1 -1
  139. package/src/db/migrations/20241220T144630860Z-stats-materialized-views.ts +1 -2
  140. package/src/db/migrations/20250718T150931000Z-update-appeal-reason-stats.ts +1 -2
  141. package/src/db/migrations/20260602T120000000Z-add-report-activity-created-index.ts +17 -0
  142. package/src/db/migrations/index.ts +1 -0
  143. package/src/db/migrations/provider.ts +2 -1
  144. package/src/db/pagination.ts +18 -18
  145. package/src/db/types.ts +3 -1
  146. package/src/index.ts +25 -15
  147. package/src/jetstream/service.ts +3 -1
  148. package/src/mod-service/index.ts +78 -71
  149. package/src/mod-service/report.ts +24 -3
  150. package/src/mod-service/views.ts +16 -16
  151. package/src/queue/service.ts +5 -5
  152. package/src/report/activity.ts +47 -0
  153. package/src/report/stats.ts +5 -3
  154. package/src/scheduled-action/service.ts +22 -20
  155. package/src/set/service.ts +17 -14
  156. package/src/team/index.ts +6 -5
  157. package/src/verification/service.ts +2 -2
  158. package/tests/3p-labeler.test.ts +2 -2
  159. package/tests/_util.ts +8 -25
  160. package/tests/account-strikes.test.ts +1 -1
  161. package/tests/ack-all-subjects-of-account.test.ts +1 -1
  162. package/tests/age-assurance.test.ts +1 -1
  163. package/tests/blob-divert.test.ts +1 -1
  164. package/tests/communication-templates.test.ts +1 -1
  165. package/tests/content-tagger.test.ts +1 -1
  166. package/tests/db.test.ts +1 -1
  167. package/tests/expiring-label.test.ts +1 -1
  168. package/tests/expiring-tags.test.ts +1 -1
  169. package/tests/get-account-timeline.test.ts +1 -1
  170. package/tests/get-config.test.ts +1 -1
  171. package/tests/get-lists.test.ts +2 -1
  172. package/tests/get-profiles.test.ts +1 -1
  173. package/tests/get-record.test.ts +1 -1
  174. package/tests/get-records.test.ts +1 -1
  175. package/tests/get-repo.test.ts +1 -1
  176. package/tests/get-report.test.ts +1 -1
  177. package/tests/get-reporter-stats.test.ts +1 -1
  178. package/tests/get-repos.test.ts +1 -1
  179. package/tests/get-starter-pack.test.ts +1 -1
  180. package/tests/get-subjects.test.ts +1 -1
  181. package/tests/mod-tool.test.ts +1 -1
  182. package/tests/moderation-appeals.test.ts +1 -1
  183. package/tests/moderation-events.test.ts +1 -1
  184. package/tests/moderation-status-tags.test.ts +1 -1
  185. package/tests/moderation-statuses.test.ts +1 -1
  186. package/tests/moderation.test.ts +1 -1
  187. package/tests/protected-tags.test.ts +1 -1
  188. package/tests/query-labels.test.ts +1 -1
  189. package/tests/query-reports.test.ts +1 -1
  190. package/tests/queue-assignment.test.ts +1 -1
  191. package/tests/queue-router.test.ts +1 -1
  192. package/tests/queues.test.ts +1 -1
  193. package/tests/record-and-account-events.test.ts +1 -1
  194. package/tests/repo-search.test.ts +2 -2
  195. package/tests/report-action.test.ts +1 -1
  196. package/tests/report-activity.test.ts +145 -1
  197. package/tests/report-assignment.test.ts +1 -1
  198. package/tests/report-muting.test.ts +1 -1
  199. package/tests/report-reason.test.ts +1 -1
  200. package/tests/report-reassign-queue.test.ts +1 -1
  201. package/tests/report-routing.test.ts +1 -1
  202. package/tests/report-stats.test.ts +1 -1
  203. package/tests/revoke-account-credentials.test.ts +1 -1
  204. package/tests/safelink.test.ts +1 -1
  205. package/tests/scheduled-action-processor.test.ts +1 -1
  206. package/tests/scheduled-action.test.ts +1 -1
  207. package/tests/sequencer.test.ts +1 -1
  208. package/tests/server.test.ts +9 -12
  209. package/tests/sets.test.ts +1 -1
  210. package/tests/settings.test.ts +1 -1
  211. package/tests/strike-expiry-processor.test.ts +1 -1
  212. package/tests/subject-priority-score.test.ts +1 -1
  213. package/tests/takedown.test.ts +1 -1
  214. package/tests/team.test.ts +1 -1
  215. package/tests/verification-listener.test.ts +40 -13
  216. package/tests/verification.test.ts +1 -1
  217. package/tsconfig.build.tsbuildinfo +1 -1
@@ -7017,6 +7017,7 @@ export const schemaDict = {
7017
7017
  },
7018
7018
  chatPreference: {
7019
7019
  type: 'object',
7020
+ description: 'Deprecated: use chat.bsky.notification preferences instead. This will only return a default value.',
7020
7021
  required: ['include', 'push'],
7021
7022
  properties: {
7022
7023
  include: {
@@ -7077,6 +7078,7 @@ export const schemaDict = {
7077
7078
  chat: {
7078
7079
  type: 'ref',
7079
7080
  ref: 'lex:app.bsky.notification.defs#chatPreference',
7081
+ description: 'Deprecated: use chat.bsky.notification preferences instead. This will only return a default value.',
7080
7082
  },
7081
7083
  follow: {
7082
7084
  type: 'ref',
@@ -7473,6 +7475,7 @@ export const schemaDict = {
7473
7475
  chat: {
7474
7476
  type: 'ref',
7475
7477
  ref: 'lex:app.bsky.notification.defs#chatPreference',
7478
+ description: "Deprecated: use chat.bsky.notification preferences instead. Setting this won't stick and the default values will be returned.",
7476
7479
  },
7477
7480
  follow: {
7478
7481
  type: 'ref',
@@ -14022,6 +14025,101 @@ export const schemaDict = {
14022
14025
  },
14023
14026
  },
14024
14027
  },
14028
+ ChatBskyNotificationDefs: {
14029
+ lexicon: 1,
14030
+ id: 'chat.bsky.notification.defs',
14031
+ defs: {
14032
+ preferences: {
14033
+ type: 'object',
14034
+ required: ['chat', 'chatRequest'],
14035
+ properties: {
14036
+ chat: {
14037
+ type: 'ref',
14038
+ ref: 'lex:chat.bsky.notification.defs#chatPreference',
14039
+ },
14040
+ chatRequest: {
14041
+ type: 'ref',
14042
+ ref: 'lex:chat.bsky.notification.defs#chatPreference',
14043
+ },
14044
+ },
14045
+ },
14046
+ chatPreference: {
14047
+ type: 'object',
14048
+ required: ['include', 'push'],
14049
+ properties: {
14050
+ include: {
14051
+ type: 'string',
14052
+ knownValues: ['all', 'follows'],
14053
+ },
14054
+ push: {
14055
+ type: 'boolean',
14056
+ },
14057
+ },
14058
+ },
14059
+ },
14060
+ },
14061
+ ChatBskyNotificationGetPreferences: {
14062
+ lexicon: 1,
14063
+ id: 'chat.bsky.notification.getPreferences',
14064
+ defs: {
14065
+ main: {
14066
+ type: 'query',
14067
+ description: "Get the requesting account's chat notification preferences. Defaults are returned for accounts that have not set any preferences. Requires auth.",
14068
+ output: {
14069
+ encoding: 'application/json',
14070
+ schema: {
14071
+ type: 'object',
14072
+ required: ['preferences'],
14073
+ properties: {
14074
+ preferences: {
14075
+ type: 'ref',
14076
+ ref: 'lex:chat.bsky.notification.defs#preferences',
14077
+ },
14078
+ },
14079
+ },
14080
+ },
14081
+ },
14082
+ },
14083
+ },
14084
+ ChatBskyNotificationPutPreferences: {
14085
+ lexicon: 1,
14086
+ id: 'chat.bsky.notification.putPreferences',
14087
+ defs: {
14088
+ main: {
14089
+ type: 'procedure',
14090
+ description: "Set the requesting account's chat notification preferences. Only the provided preferences are updated; omitted preferences are left unchanged.",
14091
+ input: {
14092
+ encoding: 'application/json',
14093
+ schema: {
14094
+ type: 'object',
14095
+ properties: {
14096
+ chat: {
14097
+ type: 'ref',
14098
+ ref: 'lex:chat.bsky.notification.defs#chatPreference',
14099
+ },
14100
+ chatRequest: {
14101
+ type: 'ref',
14102
+ ref: 'lex:chat.bsky.notification.defs#chatPreference',
14103
+ },
14104
+ },
14105
+ },
14106
+ },
14107
+ output: {
14108
+ encoding: 'application/json',
14109
+ schema: {
14110
+ type: 'object',
14111
+ required: ['preferences'],
14112
+ properties: {
14113
+ preferences: {
14114
+ type: 'ref',
14115
+ ref: 'lex:chat.bsky.notification.defs#preferences',
14116
+ },
14117
+ },
14118
+ },
14119
+ },
14120
+ },
14121
+ },
14122
+ },
14025
14123
  ComAtprotoAdminDefs: {
14026
14124
  lexicon: 1,
14027
14125
  id: 'com.atproto.admin.defs',
@@ -22868,6 +22966,11 @@ export const schemaDict = {
22868
22966
  ref: 'lex:tools.ozone.team.defs#member',
22869
22967
  description: 'Full member record of the moderator who created this activity',
22870
22968
  },
22969
+ report: {
22970
+ type: 'ref',
22971
+ ref: 'lex:tools.ozone.report.defs#reportView',
22972
+ description: 'Full view of the report this activity belongs to.',
22973
+ },
22871
22974
  createdAt: {
22872
22975
  type: 'string',
22873
22976
  format: 'datetime',
@@ -23280,6 +23383,72 @@ export const schemaDict = {
23280
23383
  },
23281
23384
  },
23282
23385
  },
23386
+ ToolsOzoneReportQueryActivities: {
23387
+ lexicon: 1,
23388
+ id: 'tools.ozone.report.queryActivities',
23389
+ defs: {
23390
+ main: {
23391
+ type: 'query',
23392
+ description: 'Query report activities across all reports, ordered by createdAt. Used by downstream pollers; for per-report activity history use listActivities.',
23393
+ parameters: {
23394
+ type: 'params',
23395
+ properties: {
23396
+ activityTypes: {
23397
+ type: 'array',
23398
+ items: {
23399
+ type: 'string',
23400
+ },
23401
+ description: 'Filter to specific activity types (e.g. closeActivity, escalationActivity). If omitted, all types are returned.',
23402
+ },
23403
+ createdAfter: {
23404
+ type: 'string',
23405
+ format: 'datetime',
23406
+ description: 'Retrieve activities created at or after a given timestamp',
23407
+ },
23408
+ createdBefore: {
23409
+ type: 'string',
23410
+ format: 'datetime',
23411
+ description: 'Retrieve activities created at or before a given timestamp',
23412
+ },
23413
+ sortDirection: {
23414
+ type: 'string',
23415
+ default: 'desc',
23416
+ enum: ['asc', 'desc'],
23417
+ },
23418
+ limit: {
23419
+ type: 'integer',
23420
+ minimum: 1,
23421
+ maximum: 100,
23422
+ default: 50,
23423
+ },
23424
+ cursor: {
23425
+ type: 'string',
23426
+ description: 'Cursor of the form `<createdAtMs>::<activityId>`.',
23427
+ },
23428
+ },
23429
+ },
23430
+ output: {
23431
+ encoding: 'application/json',
23432
+ schema: {
23433
+ type: 'object',
23434
+ required: ['activities'],
23435
+ properties: {
23436
+ activities: {
23437
+ type: 'array',
23438
+ items: {
23439
+ type: 'ref',
23440
+ ref: 'lex:tools.ozone.report.defs#reportActivityView',
23441
+ },
23442
+ },
23443
+ cursor: {
23444
+ type: 'string',
23445
+ },
23446
+ },
23447
+ },
23448
+ },
23449
+ },
23450
+ },
23451
+ },
23283
23452
  ToolsOzoneReportQueryReports: {
23284
23453
  lexicon: 1,
23285
23454
  id: 'tools.ozone.report.queryReports',
@@ -25520,6 +25689,9 @@ export const ids = {
25520
25689
  ChatBskyModerationGetMessageContext: 'chat.bsky.moderation.getMessageContext',
25521
25690
  ChatBskyModerationSubscribeModEvents: 'chat.bsky.moderation.subscribeModEvents',
25522
25691
  ChatBskyModerationUpdateActorAccess: 'chat.bsky.moderation.updateActorAccess',
25692
+ ChatBskyNotificationDefs: 'chat.bsky.notification.defs',
25693
+ ChatBskyNotificationGetPreferences: 'chat.bsky.notification.getPreferences',
25694
+ ChatBskyNotificationPutPreferences: 'chat.bsky.notification.putPreferences',
25523
25695
  ComAtprotoAdminDefs: 'com.atproto.admin.defs',
25524
25696
  ComAtprotoAdminDeleteAccount: 'com.atproto.admin.deleteAccount',
25525
25697
  ComAtprotoAdminDisableAccountInvites: 'com.atproto.admin.disableAccountInvites',
@@ -25655,6 +25827,7 @@ export const ids = {
25655
25827
  ToolsOzoneReportGetLiveStats: 'tools.ozone.report.getLiveStats',
25656
25828
  ToolsOzoneReportGetReport: 'tools.ozone.report.getReport',
25657
25829
  ToolsOzoneReportListActivities: 'tools.ozone.report.listActivities',
25830
+ ToolsOzoneReportQueryActivities: 'tools.ozone.report.queryActivities',
25658
25831
  ToolsOzoneReportQueryReports: 'tools.ozone.report.queryReports',
25659
25832
  ToolsOzoneReportReassignQueue: 'tools.ozone.report.reassignQueue',
25660
25833
  ToolsOzoneReportRefreshStats: 'tools.ozone.report.refreshStats',