@atproto/ozone 0.1.176 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/api/chat/getConvo.d.ts +4 -0
- package/dist/api/chat/getConvo.d.ts.map +1 -0
- package/dist/api/chat/getConvo.js +18 -0
- package/dist/api/chat/getConvo.js.map +1 -0
- package/dist/api/chat/getConvoMembers.d.ts +4 -0
- package/dist/api/chat/getConvoMembers.d.ts.map +1 -0
- package/dist/api/chat/getConvoMembers.js +18 -0
- package/dist/api/chat/getConvoMembers.js.map +1 -0
- package/dist/api/chat/index.d.ts.map +1 -1
- package/dist/api/chat/index.js +4 -0
- package/dist/api/chat/index.js.map +1 -1
- package/dist/daemon/event-reverser.d.ts.map +1 -1
- package/dist/daemon/event-reverser.js +1 -0
- package/dist/daemon/event-reverser.js.map +1 -1
- package/dist/db/migrations/20260513T202941104Z-add-subject-convo-id.d.ts +4 -0
- package/dist/db/migrations/20260513T202941104Z-add-subject-convo-id.d.ts.map +1 -0
- package/dist/db/migrations/20260513T202941104Z-add-subject-convo-id.js +107 -0
- package/dist/db/migrations/20260513T202941104Z-add-subject-convo-id.js.map +1 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/db/migrations/index.d.ts.map +1 -1
- package/dist/db/migrations/index.js +1 -0
- package/dist/db/migrations/index.js.map +1 -1
- package/dist/db/schema/expiring_tag.d.ts +1 -0
- package/dist/db/schema/expiring_tag.d.ts.map +1 -1
- package/dist/db/schema/expiring_tag.js.map +1 -1
- package/dist/db/schema/moderation_event.d.ts +2 -1
- package/dist/db/schema/moderation_event.d.ts.map +1 -1
- package/dist/db/schema/moderation_event.js.map +1 -1
- package/dist/db/schema/moderation_subject_status.d.ts +1 -0
- package/dist/db/schema/moderation_subject_status.d.ts.map +1 -1
- package/dist/db/schema/moderation_subject_status.js.map +1 -1
- package/dist/db/schema/report.d.ts +1 -0
- package/dist/db/schema/report.d.ts.map +1 -1
- package/dist/db/schema/report.js.map +1 -1
- package/dist/lexicon/index.d.ts +19 -2
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +32 -2
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +1364 -132
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +721 -44
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +4 -0
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/external.d.ts +48 -2
- package/dist/lexicon/types/app/bsky/embed/external.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/external.js +21 -0
- package/dist/lexicon/types/app/bsky/embed/external.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/getEmbedExternalView.d.ts +31 -0
- package/dist/lexicon/types/app/bsky/embed/getEmbedExternalView.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/embed/getEmbedExternalView.js +5 -0
- package/dist/lexicon/types/app/bsky/embed/getEmbedExternalView.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/actor/getStatus.d.ts +24 -0
- package/dist/lexicon/types/chat/bsky/actor/getStatus.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/{group/getJoinLinkPreview.js → actor/getStatus.js} +2 -2
- package/dist/lexicon/types/chat/bsky/actor/getStatus.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/defs.d.ts +39 -7
- package/dist/lexicon/types/chat/bsky/convo/defs.d.ts.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/defs.js +21 -0
- package/dist/lexicon/types/chat/bsky/convo/defs.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/getConvoForMembers.d.ts +1 -1
- package/dist/lexicon/types/chat/bsky/convo/getConvoForMembers.d.ts.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/getConvoForMembers.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/getLog.d.ts +1 -1
- package/dist/lexicon/types/chat/bsky/convo/getLog.d.ts.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/getLog.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/listConvoRequests.d.ts +1 -1
- package/dist/lexicon/types/chat/bsky/convo/listConvoRequests.d.ts.map +1 -1
- package/dist/lexicon/types/chat/bsky/convo/listConvoRequests.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/embed/joinLink.d.ts +19 -0
- package/dist/lexicon/types/chat/bsky/embed/joinLink.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/embed/joinLink.js +19 -0
- package/dist/lexicon/types/chat/bsky/embed/joinLink.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/group/addMembers.d.ts +1 -1
- package/dist/lexicon/types/chat/bsky/group/addMembers.d.ts.map +1 -1
- package/dist/lexicon/types/chat/bsky/group/addMembers.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/group/createGroup.d.ts +1 -1
- package/dist/lexicon/types/chat/bsky/group/createGroup.d.ts.map +1 -1
- package/dist/lexicon/types/chat/bsky/group/createGroup.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/group/defs.d.ts +23 -0
- package/dist/lexicon/types/chat/bsky/group/defs.d.ts.map +1 -1
- package/dist/lexicon/types/chat/bsky/group/defs.js +14 -0
- package/dist/lexicon/types/chat/bsky/group/defs.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/group/{getJoinLinkPreview.d.ts → getJoinLinkPreviews.d.ts} +3 -4
- package/dist/lexicon/types/chat/bsky/group/getJoinLinkPreviews.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/group/getJoinLinkPreviews.js +5 -0
- package/dist/lexicon/types/chat/bsky/group/getJoinLinkPreviews.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/group/updateJoinRequestsRead.d.ts +24 -0
- package/dist/lexicon/types/chat/bsky/group/updateJoinRequestsRead.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/group/updateJoinRequestsRead.js +5 -0
- package/dist/lexicon/types/chat/bsky/group/updateJoinRequestsRead.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/group/withdrawJoinRequest.d.ts +24 -0
- package/dist/lexicon/types/chat/bsky/group/withdrawJoinRequest.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/group/withdrawJoinRequest.js +5 -0
- package/dist/lexicon/types/chat/bsky/group/withdrawJoinRequest.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/defs.d.ts +42 -0
- package/dist/lexicon/types/chat/bsky/moderation/defs.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/defs.js +26 -0
- package/dist/lexicon/types/chat/bsky/moderation/defs.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/getConvo.d.ts +23 -0
- package/dist/lexicon/types/chat/bsky/moderation/getConvo.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/getConvo.js +5 -0
- package/dist/lexicon/types/chat/bsky/moderation/getConvo.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/getConvoMembers.d.ts +26 -0
- package/dist/lexicon/types/chat/bsky/moderation/getConvoMembers.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/getConvoMembers.js +5 -0
- package/dist/lexicon/types/chat/bsky/moderation/getConvoMembers.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/subscribeModEvents.d.ts +13 -1
- package/dist/lexicon/types/chat/bsky/moderation/subscribeModEvents.d.ts.map +1 -1
- package/dist/lexicon/types/chat/bsky/moderation/subscribeModEvents.js +7 -0
- package/dist/lexicon/types/chat/bsky/moderation/subscribeModEvents.js.map +1 -1
- package/dist/lexicon/types/com/atproto/server/getServiceAuth.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/server/getServiceAuth.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/getServiceAuth.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +10 -3
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/defs.js +7 -0
- package/dist/lexicon/types/tools/ozone/moderation/defs.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/queryEvents.d.ts +2 -2
- package/dist/lexicon/types/tools/ozone/moderation/queryEvents.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/queryEvents.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts +2 -2
- package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/queryStatuses.js.map +1 -1
- package/dist/mod-service/expiring-tags.d.ts +3 -0
- package/dist/mod-service/expiring-tags.d.ts.map +1 -1
- package/dist/mod-service/expiring-tags.js +5 -2
- package/dist/mod-service/expiring-tags.js.map +1 -1
- package/dist/mod-service/index.d.ts +3 -1
- package/dist/mod-service/index.d.ts.map +1 -1
- package/dist/mod-service/index.js +48 -10
- package/dist/mod-service/index.js.map +1 -1
- package/dist/mod-service/status.d.ts +7 -1
- package/dist/mod-service/status.d.ts.map +1 -1
- package/dist/mod-service/status.js +18 -3
- package/dist/mod-service/status.js.map +1 -1
- package/dist/mod-service/subject.d.ts +38 -2
- package/dist/mod-service/subject.d.ts.map +1 -1
- package/dist/mod-service/subject.js +67 -0
- package/dist/mod-service/subject.js.map +1 -1
- package/dist/mod-service/views.d.ts +2 -1
- package/dist/mod-service/views.d.ts.map +1 -1
- package/dist/mod-service/views.js +24 -22
- package/dist/mod-service/views.js.map +1 -1
- package/dist/queue/service.d.ts.map +1 -1
- package/dist/queue/service.js +7 -3
- package/dist/queue/service.js.map +1 -1
- package/dist/safelink/service.d.ts +1 -1
- package/package.json +5 -5
- package/src/api/chat/getConvo.ts +23 -0
- package/src/api/chat/getConvoMembers.ts +23 -0
- package/src/api/chat/index.ts +4 -0
- package/src/daemon/event-reverser.ts +1 -0
- package/src/db/migrations/20260513T202941104Z-add-subject-convo-id.ts +114 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/db/schema/expiring_tag.ts +1 -0
- package/src/db/schema/moderation_event.ts +2 -0
- package/src/db/schema/moderation_subject_status.ts +4 -0
- package/src/db/schema/report.ts +2 -1
- package/src/mod-service/expiring-tags.ts +8 -2
- package/src/mod-service/index.ts +52 -16
- package/src/mod-service/status.ts +24 -2
- package/src/mod-service/subject.ts +79 -1
- package/src/mod-service/views.ts +28 -23
- package/src/queue/service.ts +8 -4
- package/tests/__snapshots__/verification.test.ts.snap +2 -0
- package/tests/expiring-tags.test.ts +1 -0
- package/tests/moderation-events.test.ts +108 -1
- package/tests/moderation-status-tags.test.ts +23 -0
- package/tests/moderation-statuses.test.ts +82 -0
- package/tests/moderation.test.ts +73 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/lexicon/types/chat/bsky/group/getJoinLinkPreview.d.ts.map +0 -1
- package/dist/lexicon/types/chat/bsky/group/getJoinLinkPreview.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atproto/ozone
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#4941](https://github.com/bluesky-social/atproto/pull/4941) [`682e325`](https://github.com/bluesky-social/atproto/commit/682e325b2bce62216d034a8f5b9429f485b9360d) Thanks [@gcwill70](https://github.com/gcwill70)! - Allow conversations to be reported in ozone
|
|
8
|
+
|
|
9
|
+
This change extends ozone's moderation system to handle conversation reporting alongside existing reporting subject types.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`8a9e757`](https://github.com/bluesky-social/atproto/commit/8a9e7578eb0f6afcb460061550e435ea9ed125ff), [`682e325`](https://github.com/bluesky-social/atproto/commit/682e325b2bce62216d034a8f5b9429f485b9360d), [`47c71fc`](https://github.com/bluesky-social/atproto/commit/47c71fcc157258c2f5dbe43ba2b27a5af7856341), [`3affdd5`](https://github.com/bluesky-social/atproto/commit/3affdd5eeee30b09cbb7a92e8296a6cda55022a3)]:
|
|
14
|
+
- @atproto/api@0.20.7
|
|
15
|
+
|
|
3
16
|
## 0.1.176
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConvo.d.ts","sourceRoot":"","sources":["../../../src/api/chat/getConvo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAG/C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAiBvD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InvalidRequestError } from '@atproto/xrpc-server';
|
|
2
|
+
import { ids } from '../../lexicon/lexicons.js';
|
|
3
|
+
export default function (server, ctx) {
|
|
4
|
+
server.chat.bsky.moderation.getConvo({
|
|
5
|
+
auth: ctx.authVerifier.modOrAdminToken,
|
|
6
|
+
handler: async ({ params }) => {
|
|
7
|
+
if (!ctx.chatAgent) {
|
|
8
|
+
throw new InvalidRequestError('No chat agent configured');
|
|
9
|
+
}
|
|
10
|
+
const res = await ctx.chatAgent.api.chat.bsky.moderation.getConvo(params, await ctx.chatAuth(ids.ChatBskyModerationGetConvo));
|
|
11
|
+
return {
|
|
12
|
+
encoding: 'application/json',
|
|
13
|
+
body: res.data,
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=getConvo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConvo.js","sourceRoot":"","sources":["../../../src/api/chat/getConvo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG1D,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAE/C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QACnC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,eAAe;QACtC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;gBACnB,MAAM,IAAI,mBAAmB,CAAC,0BAA0B,CAAC,CAAA;YAC3D,CAAC;YACD,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAC/D,MAAM,EACN,MAAM,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,0BAA0B,CAAC,CACnD,CAAA;YACD,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,GAAG,CAAC,IAAI;aACf,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError } from '@atproto/xrpc-server'\nimport { AppContext } from '../../context.js'\nimport { Server } from '../../lexicon/index.js'\nimport { ids } from '../../lexicon/lexicons.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.chat.bsky.moderation.getConvo({\n auth: ctx.authVerifier.modOrAdminToken,\n handler: async ({ params }) => {\n if (!ctx.chatAgent) {\n throw new InvalidRequestError('No chat agent configured')\n }\n const res = await ctx.chatAgent.api.chat.bsky.moderation.getConvo(\n params,\n await ctx.chatAuth(ids.ChatBskyModerationGetConvo),\n )\n return {\n encoding: 'application/json',\n body: res.data,\n }\n },\n })\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConvoMembers.d.ts","sourceRoot":"","sources":["../../../src/api/chat/getConvoMembers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAG/C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAiBvD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InvalidRequestError } from '@atproto/xrpc-server';
|
|
2
|
+
import { ids } from '../../lexicon/lexicons.js';
|
|
3
|
+
export default function (server, ctx) {
|
|
4
|
+
server.chat.bsky.moderation.getConvoMembers({
|
|
5
|
+
auth: ctx.authVerifier.modOrAdminToken,
|
|
6
|
+
handler: async ({ params }) => {
|
|
7
|
+
if (!ctx.chatAgent) {
|
|
8
|
+
throw new InvalidRequestError('No chat agent configured');
|
|
9
|
+
}
|
|
10
|
+
const res = await ctx.chatAgent.api.chat.bsky.moderation.getConvoMembers(params, await ctx.chatAuth(ids.ChatBskyModerationGetConvoMembers));
|
|
11
|
+
return {
|
|
12
|
+
encoding: 'application/json',
|
|
13
|
+
body: res.data,
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=getConvoMembers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConvoMembers.js","sourceRoot":"","sources":["../../../src/api/chat/getConvoMembers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG1D,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAA;AAE/C,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;QAC1C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,eAAe;QACtC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;gBACnB,MAAM,IAAI,mBAAmB,CAAC,0BAA0B,CAAC,CAAA;YAC3D,CAAC;YACD,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,CACtE,MAAM,EACN,MAAM,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAC1D,CAAA;YACD,OAAO;gBACL,QAAQ,EAAE,kBAAkB;gBAC5B,IAAI,EAAE,GAAG,CAAC,IAAI;aACf,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError } from '@atproto/xrpc-server'\nimport { AppContext } from '../../context.js'\nimport { Server } from '../../lexicon/index.js'\nimport { ids } from '../../lexicon/lexicons.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.chat.bsky.moderation.getConvoMembers({\n auth: ctx.authVerifier.modOrAdminToken,\n handler: async ({ params }) => {\n if (!ctx.chatAgent) {\n throw new InvalidRequestError('No chat agent configured')\n }\n const res = await ctx.chatAgent.api.chat.bsky.moderation.getConvoMembers(\n params,\n await ctx.chatAuth(ids.ChatBskyModerationGetConvoMembers),\n )\n return {\n encoding: 'application/json',\n body: res.data,\n }\n },\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAM/C,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,UAMvD"}
|
package/dist/api/chat/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import getActorMetadata from './getActorMetadata.js';
|
|
2
|
+
import getConvo from './getConvo.js';
|
|
3
|
+
import getConvoMembers from './getConvoMembers.js';
|
|
2
4
|
import getMessageContext from './getMessageContext.js';
|
|
3
5
|
export default function (server, ctx) {
|
|
4
6
|
getActorMetadata(server, ctx);
|
|
7
|
+
getConvo(server, ctx);
|
|
8
|
+
getConvoMembers(server, ctx);
|
|
5
9
|
getMessageContext(server, ctx);
|
|
6
10
|
return server;
|
|
7
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/chat/index.ts"],"names":[],"mappings":"AAEA,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAEtD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9B,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["import { AppContext } from '../../context.js'\nimport { Server } from '../../lexicon/index.js'\nimport getActorMetadata from './getActorMetadata.js'\nimport getMessageContext from './getMessageContext.js'\n\nexport default function (server: Server, ctx: AppContext) {\n getActorMetadata(server, ctx)\n getMessageContext(server, ctx)\n return server\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/chat/index.ts"],"names":[],"mappings":"AAEA,OAAO,gBAAgB,MAAM,uBAAuB,CAAA;AACpD,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,iBAAiB,MAAM,wBAAwB,CAAA;AAEtD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACrB,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9B,OAAO,MAAM,CAAA;AACf,CAAC","sourcesContent":["import { AppContext } from '../../context.js'\nimport { Server } from '../../lexicon/index.js'\nimport getActorMetadata from './getActorMetadata.js'\nimport getConvo from './getConvo.js'\nimport getConvoMembers from './getConvoMembers.js'\nimport getMessageContext from './getMessageContext.js'\n\nexport default function (server: Server, ctx: AppContext) {\n getActorMetadata(server, ctx)\n getConvo(server, ctx)\n getConvoMembers(server, ctx)\n getMessageContext(server, ctx)\n return server\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-reverser.d.ts","sourceRoot":"","sources":["../../src/daemon/event-reverser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAMzC,OAAO,EACL,wBAAwB,EACxB,eAAe,EAChB,MAAM,yBAAyB,CAAA;AAGhC,qBAAa,aAAa;IAMtB,OAAO,CAAC,EAAE;IACV,OAAO,CAAC,UAAU;IANpB,SAAS,UAAQ;IACjB,eAAe,EAAE,OAAO,CAAC,IAAI,CAAC,CAAoB;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,CAAA;gBAGZ,EAAE,EAAE,QAAQ,EACZ,UAAU,EAAE,wBAAwB;IAG9C,KAAK;IAIL,IAAI;IAWE,OAAO;IASP,WAAW,CAAC,OAAO,EAAE,eAAe;IAkBpC,uBAAuB;IAavB,wBAAwB;
|
|
1
|
+
{"version":3,"file":"event-reverser.d.ts","sourceRoot":"","sources":["../../src/daemon/event-reverser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAMzC,OAAO,EACL,wBAAwB,EACxB,eAAe,EAChB,MAAM,yBAAyB,CAAA;AAGhC,qBAAa,aAAa;IAMtB,OAAO,CAAC,EAAE;IACV,OAAO,CAAC,UAAU;IANpB,SAAS,UAAQ;IACjB,eAAe,EAAE,OAAO,CAAC,IAAI,CAAC,CAAoB;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,CAAA;gBAGZ,EAAE,EAAE,QAAQ,EACZ,UAAU,EAAE,wBAAwB;IAG9C,KAAK;IAIL,IAAI;IAWE,OAAO;IASP,WAAW,CAAC,OAAO,EAAE,eAAe;IAkBpC,uBAAuB;IAavB,wBAAwB;CAyC/B"}
|
|
@@ -65,6 +65,7 @@ export class EventReverser {
|
|
|
65
65
|
.selectFrom('moderation_subject_status')
|
|
66
66
|
.where('did', '=', group.did)
|
|
67
67
|
.where('recordPath', '=', group.recordPath)
|
|
68
|
+
.where('convoId', '=', group.convoId)
|
|
68
69
|
.selectAll()
|
|
69
70
|
.executeTakeFirst();
|
|
70
71
|
const currentTags = status?.tags ?? [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-reverser.js","sourceRoot":"","sources":["../../src/daemon/event-reverser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EACL,uBAAuB,EACvB,cAAc,GACf,MAAM,iCAAiC,CAAA;AAKxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE,MAAM,OAAO,aAAa;IAKxB,YACU,EAAY,EACZ,UAAoC;QADpC,OAAE,GAAF,EAAE,CAAU;QACZ,eAAU,GAAV,UAAU,CAA0B;QAN9C,cAAS,GAAG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,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;gBAEtE,0CAA0C;gBAC1C,MAAM,uBAAuB,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;gBAE/C,oEAAoE;gBACpE,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,EAAE,CAAC;oBACtC,MAAM,OAAO,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAA;oBAC5C,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;oBAC5C,MAAM,aAAa,CAAC,QAAQ,CAAC;wBAC3B,KAAK,EAAE;4BACL,KAAK,EAAE,yCAAyC;4BAChD,GAAG,EAAE,EAAE;4BACP,MAAM,EAAE,YAAY;4BACpB,OAAO,EACL,uEAAuE;yBAC1E;wBACD,SAAS,EAAE,KAAK,CAAC,SAAS;wBAC1B,OAAO;wBACP,SAAS,EAAE,IAAI,IAAI,EAAE;qBACtB,CAAC,CAAA;gBACJ,CAAC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF;AAED,MAAM,WAAW,GAAG,GAAW,EAAE;IAC/B,6FAA6F;IAC7F,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IACtB,MAAM,UAAU,GAAG,MAAM,CAAA;IACzB,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,CAAA;IACjD,OAAO,aAAa,GAAG,UAAU,GAAG,GAAG,CAAA;AACzC,CAAC,CAAA","sourcesContent":["import { MINUTE } from '@atproto/common'\nimport { Database } from '../db/index.js'\nimport { dbLogger } from '../logger.js'\nimport {\n deleteExpiringTagsByIds,\n getExpiredTags,\n} from '../mod-service/expiring-tags.js'\nimport {\n ModerationServiceCreator,\n ReversalSubject,\n} from '../mod-service/index.js'\nimport { subjectFromStatusRow } from '../mod-service/subject.js'\n\nexport class EventReverser {\n destroyed = false\n reversalPromise: Promise<void> = Promise.resolve()\n timer?: NodeJS.Timeout\n\n constructor(\n private db: Database,\n private modService: ModerationServiceCreator,\n ) {}\n\n start() {\n this.poll()\n }\n\n poll() {\n if (this.destroyed) return\n this.reversalPromise = this.findAndRevertDueActions()\n .catch((err) =>\n dbLogger.error({ err }, 'moderation action reversal errored'),\n )\n .finally(() => {\n this.timer = setTimeout(() => this.poll(), getInterval())\n })\n }\n\n async destroy() {\n this.destroyed = true\n if (this.timer) {\n clearTimeout(this.timer)\n this.timer = undefined\n }\n await this.reversalPromise\n }\n\n async revertState(subject: ReversalSubject) {\n await this.db.transaction(async (dbTxn) => {\n const moderationTxn = this.modService(dbTxn)\n const originalEvent =\n await moderationTxn.getLastReversibleEventForSubject(subject)\n if (originalEvent) {\n await moderationTxn.revertState({\n action: originalEvent.action,\n createdBy: originalEvent.createdBy,\n comment:\n '[SCHEDULED_REVERSAL] Reverting action as originally scheduled',\n subject: subject.subject,\n createdAt: new Date(),\n })\n }\n })\n }\n\n async findAndRevertDueActions() {\n const moderationService = this.modService(this.db)\n const subjectsDueForReversal =\n await moderationService.getSubjectsDueForReversal()\n\n // We shouldn't have too many actions due for reversal at any given time, so running in parallel is probably fine\n // Internally, each reversal runs within its own transaction\n await Promise.all([\n ...subjectsDueForReversal.map(this.revertState.bind(this)),\n this.findAndRevertExpiredTags(),\n ])\n }\n\n async findAndRevertExpiredTags() {\n const groups = await getExpiredTags(this.db)\n if (!groups.length) return\n\n for (const group of groups) {\n await this.db.transaction(async (dbTxn) => {\n // Check which tags are still present on the subject\n const status = await dbTxn.db\n .selectFrom('moderation_subject_status')\n .where('did', '=', group.did)\n .where('recordPath', '=', group.recordPath)\n .selectAll()\n .executeTakeFirst()\n\n const currentTags: string[] = status?.tags ?? []\n const tagsToRemove = group.tags.filter((t) => currentTags.includes(t))\n\n // Delete the expiring_tag rows regardless\n await deleteExpiringTagsByIds(dbTxn, group.ids)\n\n // Only emit removal event if there are tags still present to remove\n if (tagsToRemove.length > 0 && status) {\n const subject = subjectFromStatusRow(status)\n const moderationTxn = this.modService(dbTxn)\n await moderationTxn.logEvent({\n event: {\n $type: 'tools.ozone.moderation.defs#modEventTag',\n add: [],\n remove: tagsToRemove,\n comment:\n '[SCHEDULED_REVERSAL] Reverting temporary tags as originally scheduled',\n },\n createdBy: group.createdBy,\n subject,\n createdAt: new Date(),\n })\n }\n })\n }\n }\n}\n\nconst getInterval = (): number => {\n // super basic synchronization by agreeing when the intervals land relative to unix timestamp\n const now = Date.now()\n const intervalMs = MINUTE\n const nextIteration = Math.ceil(now / intervalMs)\n return nextIteration * intervalMs - now\n}\n"]}
|
|
1
|
+
{"version":3,"file":"event-reverser.js","sourceRoot":"","sources":["../../src/daemon/event-reverser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EACL,uBAAuB,EACvB,cAAc,GACf,MAAM,iCAAiC,CAAA;AAKxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE,MAAM,OAAO,aAAa;IAKxB,YACU,EAAY,EACZ,UAAoC;QADpC,OAAE,GAAF,EAAE,CAAU;QACZ,eAAU,GAAV,UAAU,CAA0B;QAN9C,cAAS,GAAG,KAAK,CAAA;QACjB,oBAAe,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAA;IAM/C,CAAC;IAEJ,KAAK;QACH,IAAI,CAAC,IAAI,EAAE,CAAA;IACb,CAAC;IAED,IAAI;QACF,IAAI,IAAI,CAAC,SAAS;YAAE,OAAM;QAC1B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,uBAAuB,EAAE;aAClD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CACb,QAAQ,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,oCAAoC,CAAC,CAC9D;aACA,OAAO,CAAC,GAAG,EAAE;YACZ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,UAAU,CAAC,KAAK,CAAC,CAAA;oBAC5C,MAAM,aAAa,CAAC,QAAQ,CAAC;wBAC3B,KAAK,EAAE;4BACL,KAAK,EAAE,yCAAyC;4BAChD,GAAG,EAAE,EAAE;4BACP,MAAM,EAAE,YAAY;4BACpB,OAAO,EACL,uEAAuE;yBAC1E;wBACD,SAAS,EAAE,KAAK,CAAC,SAAS;wBAC1B,OAAO;wBACP,SAAS,EAAE,IAAI,IAAI,EAAE;qBACtB,CAAC,CAAA;gBACJ,CAAC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF;AAED,MAAM,WAAW,GAAG,GAAW,EAAE;IAC/B,6FAA6F;IAC7F,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IACtB,MAAM,UAAU,GAAG,MAAM,CAAA;IACzB,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,CAAA;IACjD,OAAO,aAAa,GAAG,UAAU,GAAG,GAAG,CAAA;AACzC,CAAC,CAAA","sourcesContent":["import { MINUTE } from '@atproto/common'\nimport { Database } from '../db/index.js'\nimport { dbLogger } from '../logger.js'\nimport {\n deleteExpiringTagsByIds,\n getExpiredTags,\n} from '../mod-service/expiring-tags.js'\nimport {\n ModerationServiceCreator,\n ReversalSubject,\n} from '../mod-service/index.js'\nimport { subjectFromStatusRow } from '../mod-service/subject.js'\n\nexport class EventReverser {\n destroyed = false\n reversalPromise: Promise<void> = Promise.resolve()\n timer?: NodeJS.Timeout\n\n constructor(\n private db: Database,\n private modService: ModerationServiceCreator,\n ) {}\n\n start() {\n this.poll()\n }\n\n poll() {\n if (this.destroyed) return\n this.reversalPromise = this.findAndRevertDueActions()\n .catch((err) =>\n dbLogger.error({ err }, 'moderation action reversal errored'),\n )\n .finally(() => {\n this.timer = setTimeout(() => this.poll(), getInterval())\n })\n }\n\n async destroy() {\n this.destroyed = true\n if (this.timer) {\n clearTimeout(this.timer)\n this.timer = undefined\n }\n await this.reversalPromise\n }\n\n async revertState(subject: ReversalSubject) {\n await this.db.transaction(async (dbTxn) => {\n const moderationTxn = this.modService(dbTxn)\n const originalEvent =\n await moderationTxn.getLastReversibleEventForSubject(subject)\n if (originalEvent) {\n await moderationTxn.revertState({\n action: originalEvent.action,\n createdBy: originalEvent.createdBy,\n comment:\n '[SCHEDULED_REVERSAL] Reverting action as originally scheduled',\n subject: subject.subject,\n createdAt: new Date(),\n })\n }\n })\n }\n\n async findAndRevertDueActions() {\n const moderationService = this.modService(this.db)\n const subjectsDueForReversal =\n await moderationService.getSubjectsDueForReversal()\n\n // We shouldn't have too many actions due for reversal at any given time, so running in parallel is probably fine\n // Internally, each reversal runs within its own transaction\n await Promise.all([\n ...subjectsDueForReversal.map(this.revertState.bind(this)),\n this.findAndRevertExpiredTags(),\n ])\n }\n\n async findAndRevertExpiredTags() {\n const groups = await getExpiredTags(this.db)\n if (!groups.length) return\n\n for (const group of groups) {\n await this.db.transaction(async (dbTxn) => {\n // Check which tags are still present on the subject\n const status = await dbTxn.db\n .selectFrom('moderation_subject_status')\n .where('did', '=', group.did)\n .where('recordPath', '=', group.recordPath)\n .where('convoId', '=', group.convoId)\n .selectAll()\n .executeTakeFirst()\n\n const currentTags: string[] = status?.tags ?? []\n const tagsToRemove = group.tags.filter((t) => currentTags.includes(t))\n\n // Delete the expiring_tag rows regardless\n await deleteExpiringTagsByIds(dbTxn, group.ids)\n\n // Only emit removal event if there are tags still present to remove\n if (tagsToRemove.length > 0 && status) {\n const subject = subjectFromStatusRow(status)\n const moderationTxn = this.modService(dbTxn)\n await moderationTxn.logEvent({\n event: {\n $type: 'tools.ozone.moderation.defs#modEventTag',\n add: [],\n remove: tagsToRemove,\n comment:\n '[SCHEDULED_REVERSAL] Reverting temporary tags as originally scheduled',\n },\n createdBy: group.createdBy,\n subject,\n createdAt: new Date(),\n })\n }\n })\n }\n }\n}\n\nconst getInterval = (): number => {\n // super basic synchronization by agreeing when the intervals land relative to unix timestamp\n const now = Date.now()\n const intervalMs = MINUTE\n const nextIteration = Math.ceil(now / intervalMs)\n return nextIteration * intervalMs - now\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"20260513T202941104Z-add-subject-convo-id.d.ts","sourceRoot":"","sources":["../../../src/db/migrations/20260513T202941104Z-add-subject-convo-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAO,MAAM,QAAQ,CAAA;AAEpC,wBAAsB,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA+D3D;AAED,wBAAsB,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA8C7D"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { sql } from 'kysely';
|
|
2
|
+
export async function up(db) {
|
|
3
|
+
// moderation_event
|
|
4
|
+
await db.schema
|
|
5
|
+
.alterTable('moderation_event')
|
|
6
|
+
.addColumn('subjectConvoId', 'varchar')
|
|
7
|
+
.execute();
|
|
8
|
+
/// broad index to support conversation-based queries
|
|
9
|
+
/// Users is a convo is capped at 50 so volume of matching events should be low
|
|
10
|
+
/// subsequent ordering and filtering will be efficient
|
|
11
|
+
await sql `
|
|
12
|
+
CREATE INDEX "moderation_event_convo_idx"
|
|
13
|
+
ON moderation_event("subjectConvoId")
|
|
14
|
+
WHERE "subjectConvoId" IS NOT NULL
|
|
15
|
+
`.execute(db);
|
|
16
|
+
// moderation_subject_status
|
|
17
|
+
await db.schema
|
|
18
|
+
.alterTable('moderation_subject_status')
|
|
19
|
+
.addColumn('convoId', 'varchar', (col) => col.notNull().defaultTo(''))
|
|
20
|
+
.execute();
|
|
21
|
+
/// Update unique constraint: [did, recordPath] -> [did, recordPath, convoId]
|
|
22
|
+
/// Create new unique index, drop old constraint, rename new index
|
|
23
|
+
/// Avoids gap without any constraints
|
|
24
|
+
await sql `
|
|
25
|
+
CREATE UNIQUE INDEX "moderation_status_unique_idx_new"
|
|
26
|
+
ON moderation_subject_status(did, "recordPath", "convoId")
|
|
27
|
+
`.execute(db);
|
|
28
|
+
await db.schema
|
|
29
|
+
.alterTable('moderation_subject_status')
|
|
30
|
+
.dropConstraint('moderation_status_unique_idx')
|
|
31
|
+
.execute();
|
|
32
|
+
await db.schema.dropIndex('moderation_status_unique_idx').ifExists().execute();
|
|
33
|
+
await sql `
|
|
34
|
+
ALTER INDEX "moderation_status_unique_idx_new"
|
|
35
|
+
RENAME TO "moderation_status_unique_idx"
|
|
36
|
+
`.execute(db);
|
|
37
|
+
await sql `
|
|
38
|
+
ALTER TABLE moderation_subject_status
|
|
39
|
+
ADD CONSTRAINT "moderation_status_unique_idx"
|
|
40
|
+
UNIQUE USING INDEX "moderation_status_unique_idx"
|
|
41
|
+
`.execute(db);
|
|
42
|
+
// expiring_tag
|
|
43
|
+
await db.schema
|
|
44
|
+
.alterTable('expiring_tag')
|
|
45
|
+
.addColumn('convoId', 'varchar', (col) => col.notNull().defaultTo(''))
|
|
46
|
+
.execute();
|
|
47
|
+
await db.schema
|
|
48
|
+
.createIndex('idx_expiring_tag_did_record_path_convo_id')
|
|
49
|
+
.on('expiring_tag')
|
|
50
|
+
.columns(['did', 'recordPath', 'convoId'])
|
|
51
|
+
.execute();
|
|
52
|
+
// report table
|
|
53
|
+
await db.schema
|
|
54
|
+
.alterTable('report')
|
|
55
|
+
.addColumn('subjectConvoId', 'varchar')
|
|
56
|
+
.execute();
|
|
57
|
+
await db.schema.dropIndex('idx_report_unassigned_id').execute();
|
|
58
|
+
await sql `CREATE INDEX idx_report_unassigned_id ON report
|
|
59
|
+
(id)
|
|
60
|
+
INCLUDE (status, "reportType", "recordPath", "subjectMessageId", "subjectConvoId")
|
|
61
|
+
WHERE ("queueId" IS NULL AND status != 'closed')`.execute(db);
|
|
62
|
+
}
|
|
63
|
+
export async function down(db) {
|
|
64
|
+
// report
|
|
65
|
+
await db.schema.dropIndex('idx_report_unassigned_id').execute();
|
|
66
|
+
await sql `CREATE INDEX idx_report_unassigned_id ON report
|
|
67
|
+
(id)
|
|
68
|
+
INCLUDE (status, "reportType", "recordPath", "subjectMessageId")
|
|
69
|
+
WHERE ("queueId" IS NULL AND status != 'closed')`.execute(db);
|
|
70
|
+
await db.schema.alterTable('report').dropColumn('subjectConvoId').execute();
|
|
71
|
+
// expiring_tag
|
|
72
|
+
await db.schema
|
|
73
|
+
.dropIndex('idx_expiring_tag_did_record_path_convo_id')
|
|
74
|
+
.execute();
|
|
75
|
+
await db.schema.alterTable('expiring_tag').dropColumn('convoId').execute();
|
|
76
|
+
// moderation_subject_status
|
|
77
|
+
/// Reverse the unique constraint change: [did, recordPath, convoId] -> [did, recordPath]
|
|
78
|
+
await sql `
|
|
79
|
+
CREATE UNIQUE INDEX "moderation_status_unique_idx_old"
|
|
80
|
+
ON moderation_subject_status(did, "recordPath")
|
|
81
|
+
`.execute(db);
|
|
82
|
+
await db.schema
|
|
83
|
+
.alterTable('moderation_subject_status')
|
|
84
|
+
.dropConstraint('moderation_status_unique_idx')
|
|
85
|
+
.execute();
|
|
86
|
+
await db.schema.dropIndex('moderation_status_unique_idx').ifExists().execute();
|
|
87
|
+
await sql `
|
|
88
|
+
ALTER INDEX "moderation_status_unique_idx_old"
|
|
89
|
+
RENAME TO "moderation_status_unique_idx"
|
|
90
|
+
`.execute(db);
|
|
91
|
+
await sql `
|
|
92
|
+
ALTER TABLE moderation_subject_status
|
|
93
|
+
ADD CONSTRAINT "moderation_status_unique_idx"
|
|
94
|
+
UNIQUE USING INDEX "moderation_status_unique_idx"
|
|
95
|
+
`.execute(db);
|
|
96
|
+
await db.schema
|
|
97
|
+
.alterTable('moderation_subject_status')
|
|
98
|
+
.dropColumn('convoId')
|
|
99
|
+
.execute();
|
|
100
|
+
// moderation_event
|
|
101
|
+
await db.schema.dropIndex('moderation_event_convo_idx').execute();
|
|
102
|
+
await db.schema
|
|
103
|
+
.alterTable('moderation_event')
|
|
104
|
+
.dropColumn('subjectConvoId')
|
|
105
|
+
.execute();
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=20260513T202941104Z-add-subject-convo-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"20260513T202941104Z-add-subject-convo-id.js","sourceRoot":"","sources":["../../../src/db/migrations/20260513T202941104Z-add-subject-convo-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,GAAG,EAAE,MAAM,QAAQ,CAAA;AAEpC,MAAM,CAAC,KAAK,UAAU,EAAE,CAAC,EAAmB;IAC1C,mBAAmB;IACnB,MAAM,EAAE,CAAC,MAAM;SACZ,UAAU,CAAC,kBAAkB,CAAC;SAC9B,SAAS,CAAC,gBAAgB,EAAE,SAAS,CAAC;SACtC,OAAO,EAAE,CAAA;IACZ,qDAAqD;IACrD,+EAA+E;IAC/E,uDAAuD;IACvD,MAAM,GAAG,CAAA;;;;GAIR,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAEb,4BAA4B;IAC5B,MAAM,EAAE,CAAC,MAAM;SACZ,UAAU,CAAC,2BAA2B,CAAC;SACvC,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;SACrE,OAAO,EAAE,CAAA;IACZ,6EAA6E;IAC7E,kEAAkE;IAClE,sCAAsC;IACtC,MAAM,GAAG,CAAA;;;GAGR,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IACb,MAAM,EAAE,CAAC,MAAM;SACZ,UAAU,CAAC,2BAA2B,CAAC;SACvC,cAAc,CAAC,8BAA8B,CAAC;SAC9C,OAAO,EAAE,CAAA;IACZ,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAA;IAC9E,MAAM,GAAG,CAAA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AAC,2CAA2C,CAAC;SACtD,OAAO,EAAE,CAAA;IACZ,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAA;IAE1E,4BAA4B;IAC5B,yFAAyF;IACzF,MAAM,GAAG,CAAA;;;GAGR,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IACb,MAAM,EAAE,CAAC,MAAM;SACZ,UAAU,CAAC,2BAA2B,CAAC;SACvC,cAAc,CAAC,8BAA8B,CAAC;SAC9C,OAAO,EAAE,CAAA;IACZ,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAA;IAC9E,MAAM,GAAG,CAAA;;;GAGR,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IACb,MAAM,GAAG,CAAA;;;;GAIR,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IACb,MAAM,EAAE,CAAC,MAAM;SACZ,UAAU,CAAC,2BAA2B,CAAC;SACvC,UAAU,CAAC,SAAS,CAAC;SACrB,OAAO,EAAE,CAAA;IAEZ,mBAAmB;IACnB,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC,OAAO,EAAE,CAAA;IACjE,MAAM,EAAE,CAAC,MAAM;SACZ,UAAU,CAAC,kBAAkB,CAAC;SAC9B,UAAU,CAAC,gBAAgB,CAAC;SAC5B,OAAO,EAAE,CAAA;AACd,CAAC","sourcesContent":["import { Kysely, sql } from 'kysely'\n\nexport async function up(db: Kysely<unknown>): Promise<void> {\n // moderation_event\n await db.schema\n .alterTable('moderation_event')\n .addColumn('subjectConvoId', 'varchar')\n .execute()\n /// broad index to support conversation-based queries\n /// Users is a convo is capped at 50 so volume of matching events should be low\n /// subsequent ordering and filtering will be efficient\n await sql`\n CREATE INDEX \"moderation_event_convo_idx\"\n ON moderation_event(\"subjectConvoId\")\n WHERE \"subjectConvoId\" IS NOT NULL\n `.execute(db)\n\n // moderation_subject_status\n await db.schema\n .alterTable('moderation_subject_status')\n .addColumn('convoId', 'varchar', (col) => col.notNull().defaultTo(''))\n .execute()\n /// Update unique constraint: [did, recordPath] -> [did, recordPath, convoId]\n /// Create new unique index, drop old constraint, rename new index\n /// Avoids gap without any constraints\n await sql`\n CREATE UNIQUE INDEX \"moderation_status_unique_idx_new\"\n ON moderation_subject_status(did, \"recordPath\", \"convoId\")\n `.execute(db)\n await db.schema\n .alterTable('moderation_subject_status')\n .dropConstraint('moderation_status_unique_idx')\n .execute()\n await db.schema.dropIndex('moderation_status_unique_idx').ifExists().execute()\n await sql`\n ALTER INDEX \"moderation_status_unique_idx_new\"\n RENAME TO \"moderation_status_unique_idx\"\n `.execute(db)\n await sql`\n ALTER TABLE moderation_subject_status\n ADD CONSTRAINT \"moderation_status_unique_idx\"\n UNIQUE USING INDEX \"moderation_status_unique_idx\"\n `.execute(db)\n\n // expiring_tag\n await db.schema\n .alterTable('expiring_tag')\n .addColumn('convoId', 'varchar', (col) => col.notNull().defaultTo(''))\n .execute()\n await db.schema\n .createIndex('idx_expiring_tag_did_record_path_convo_id')\n .on('expiring_tag')\n .columns(['did', 'recordPath', 'convoId'])\n .execute()\n\n // report table\n await db.schema\n .alterTable('report')\n .addColumn('subjectConvoId', 'varchar')\n .execute()\n await db.schema.dropIndex('idx_report_unassigned_id').execute()\n await sql`CREATE INDEX idx_report_unassigned_id ON report\n (id)\n INCLUDE (status, \"reportType\", \"recordPath\", \"subjectMessageId\", \"subjectConvoId\")\n WHERE (\"queueId\" IS NULL AND status != 'closed')`.execute(db)\n}\n\nexport async function down(db: Kysely<unknown>): Promise<void> {\n // report\n await db.schema.dropIndex('idx_report_unassigned_id').execute()\n await sql`CREATE INDEX idx_report_unassigned_id ON report\n (id)\n INCLUDE (status, \"reportType\", \"recordPath\", \"subjectMessageId\")\n WHERE (\"queueId\" IS NULL AND status != 'closed')`.execute(db)\n await db.schema.alterTable('report').dropColumn('subjectConvoId').execute()\n\n // expiring_tag\n await db.schema\n .dropIndex('idx_expiring_tag_did_record_path_convo_id')\n .execute()\n await db.schema.alterTable('expiring_tag').dropColumn('convoId').execute()\n\n // moderation_subject_status\n /// Reverse the unique constraint change: [did, recordPath, convoId] -> [did, recordPath]\n await sql`\n CREATE UNIQUE INDEX \"moderation_status_unique_idx_old\"\n ON moderation_subject_status(did, \"recordPath\")\n `.execute(db)\n await db.schema\n .alterTable('moderation_subject_status')\n .dropConstraint('moderation_status_unique_idx')\n .execute()\n await db.schema.dropIndex('moderation_status_unique_idx').ifExists().execute()\n await sql`\n ALTER INDEX \"moderation_status_unique_idx_old\"\n RENAME TO \"moderation_status_unique_idx\"\n `.execute(db)\n await sql`\n ALTER TABLE moderation_subject_status\n ADD CONSTRAINT \"moderation_status_unique_idx\"\n UNIQUE USING INDEX \"moderation_status_unique_idx\"\n `.execute(db)\n await db.schema\n .alterTable('moderation_subject_status')\n .dropColumn('convoId')\n .execute()\n\n // moderation_event\n await db.schema.dropIndex('moderation_event_convo_idx').execute()\n await db.schema\n .alterTable('moderation_event')\n .dropColumn('subjectConvoId')\n .execute()\n}\n"]}
|
|
@@ -36,4 +36,5 @@ export * as _20260225T000000000Z from './20260225T000000000Z-add-report-queue-ta
|
|
|
36
36
|
export * as _20260313T000000000Z from './20260313T000000000Z-add-report-activity-table.js';
|
|
37
37
|
export * as _20260318T152058935Z from './20260318T152058935Z-add-report-stat.js';
|
|
38
38
|
export * as _20260428T000000000Z from './20260428T000000000Z-add-expiring-tag-table.js';
|
|
39
|
+
export * as _20260513T202941104Z from './20260513T202941104Z-add-subject-convo-id.js';
|
|
39
40
|
//# 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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@@ export * as _20260225T000000000Z from './20260225T000000000Z-add-report-queue-ta
|
|
|
39
39
|
export * as _20260313T000000000Z from './20260313T000000000Z-add-report-activity-table.js';
|
|
40
40
|
export * as _20260318T152058935Z from './20260318T152058935Z-add-report-stat.js';
|
|
41
41
|
export * as _20260428T000000000Z from './20260428T000000000Z-add-expiring-tag-table.js';
|
|
42
|
+
export * as _20260513T202941104Z from './20260513T202941104Z-add-subject-convo-id.js';
|
|
42
43
|
//# 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,KAAK,oBAAoB,MAAM,mDAAmD,CAAA;AACzF,OAAO,KAAK,oBAAoB,MAAM,uCAAuC,CAAA;AAC7E,OAAO,KAAK,oBAAoB,MAAM,0CAA0C,CAAA;AAChF,OAAO,KAAK,oBAAoB,MAAM,mCAAmC,CAAA;AACzE,OAAO,KAAK,oBAAoB,MAAM,2DAA2D,CAAA;AACjG,OAAO,KAAK,oBAAoB,MAAM,kDAAkD,CAAA;AACxF,OAAO,KAAK,oBAAoB,MAAM,oDAAoD,CAAA;AAC1F,OAAO,KAAK,oBAAoB,MAAM,qDAAqD,CAAA;AAC3F,OAAO,KAAK,oBAAoB,MAAM,kDAAkD,CAAA;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","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'\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,uCAAuC,CAAA;AAC7E,OAAO,KAAK,oBAAoB,MAAM,0CAA0C,CAAA;AAChF,OAAO,KAAK,oBAAoB,MAAM,mCAAmC,CAAA;AACzE,OAAO,KAAK,oBAAoB,MAAM,2DAA2D,CAAA;AACjG,OAAO,KAAK,oBAAoB,MAAM,kDAAkD,CAAA;AACxF,OAAO,KAAK,oBAAoB,MAAM,oDAAoD,CAAA;AAC1F,OAAO,KAAK,oBAAoB,MAAM,qDAAqD,CAAA;AAC3F,OAAO,KAAK,oBAAoB,MAAM,kDAAkD,CAAA;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","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'\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expiring_tag.d.ts","sourceRoot":"","sources":["../../../src/db/schema/expiring_tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,eAAO,MAAM,SAAS,iBAAiB,CAAA;AAEvC,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,SAAS,CAAC,EAAE,WAAW,CAAA;CACzB,CAAA"}
|
|
1
|
+
{"version":3,"file":"expiring_tag.d.ts","sourceRoot":"","sources":["../../../src/db/schema/expiring_tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,eAAO,MAAM,SAAS,iBAAiB,CAAA;AAEvC,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,SAAS,CAAC,EAAE,WAAW,CAAA;CACzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expiring_tag.js","sourceRoot":"","sources":["../../../src/db/schema/expiring_tag.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAG,cAAc,CAAA","sourcesContent":["import { Generated } from 'kysely'\n\nexport const tableName = 'expiring_tag'\n\nexport interface ExpiringTag {\n id: Generated<number>\n eventId: number\n did: string\n recordPath: string\n tag: string\n expiresAt: string\n createdBy: string\n}\n\nexport type PartialDB = {\n [tableName]: ExpiringTag\n}\n"]}
|
|
1
|
+
{"version":3,"file":"expiring_tag.js","sourceRoot":"","sources":["../../../src/db/schema/expiring_tag.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAG,cAAc,CAAA","sourcesContent":["import { Generated } from 'kysely'\n\nexport const tableName = 'expiring_tag'\n\nexport interface ExpiringTag {\n id: Generated<number>\n eventId: number\n did: string\n recordPath: string\n convoId: string\n tag: string\n expiresAt: string\n createdBy: string\n}\n\nexport type PartialDB = {\n [tableName]: ExpiringTag\n}\n"]}
|
|
@@ -3,11 +3,12 @@ export declare const eventTableName = "moderation_event";
|
|
|
3
3
|
export interface ModerationEvent {
|
|
4
4
|
id: Generated<number>;
|
|
5
5
|
action: 'tools.ozone.moderation.defs#modEventTakedown' | 'tools.ozone.moderation.defs#modEventAcknowledge' | 'tools.ozone.moderation.defs#modEventEscalate' | 'tools.ozone.moderation.defs#modEventComment' | 'tools.ozone.moderation.defs#modEventLabel' | 'tools.ozone.moderation.defs#modEventReport' | 'tools.ozone.moderation.defs#modEventMute' | 'tools.ozone.moderation.defs#modEventUnmute' | 'tools.ozone.moderation.defs#modEventMuteReporter' | 'tools.ozone.moderation.defs#modEventUnmuteReporter' | 'tools.ozone.moderation.defs#modEventReverseTakedown' | 'tools.ozone.moderation.defs#modEventEmail' | 'tools.ozone.moderation.defs#modEventResolveAppeal' | 'tools.ozone.moderation.defs#modEventTag' | 'tools.ozone.moderation.defs#accountEvent' | 'tools.ozone.moderation.defs#identityEvent' | 'tools.ozone.moderation.defs#recordEvent' | 'tools.ozone.moderation.defs#modEventPriorityScore' | 'tools.ozone.moderation.defs#ageAssuranceEvent' | 'tools.ozone.moderation.defs#ageAssuranceOverrideEvent' | 'tools.ozone.moderation.defs#ageAssurancePurgeEvent' | 'tools.ozone.moderation.defs#revokeAccountCredentialsEvent';
|
|
6
|
-
subjectType: 'com.atproto.admin.defs#repoRef' | 'com.atproto.repo.strongRef' | 'chat.bsky.convo.defs#messageRef';
|
|
6
|
+
subjectType: 'com.atproto.admin.defs#repoRef' | 'com.atproto.repo.strongRef' | 'chat.bsky.convo.defs#messageRef' | 'chat.bsky.convo.defs#convoRef';
|
|
7
7
|
subjectDid: string;
|
|
8
8
|
subjectUri: string | null;
|
|
9
9
|
subjectCid: string | null;
|
|
10
10
|
subjectBlobCids: string[] | null;
|
|
11
|
+
subjectConvoId: string | null;
|
|
11
12
|
subjectMessageId: string | null;
|
|
12
13
|
createLabelVals: string | null;
|
|
13
14
|
negateLabelVals: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderation_event.d.ts","sourceRoot":"","sources":["../../../src/db/schema/moderation_event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,eAAO,MAAM,cAAc,qBAAqB,CAAA;AAEhD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IACrB,MAAM,EACF,8CAA8C,GAC9C,iDAAiD,GACjD,8CAA8C,GAC9C,6CAA6C,GAC7C,2CAA2C,GAC3C,4CAA4C,GAC5C,0CAA0C,GAC1C,4CAA4C,GAC5C,kDAAkD,GAClD,oDAAoD,GACpD,qDAAqD,GACrD,2CAA2C,GAC3C,mDAAmD,GACnD,yCAAyC,GACzC,0CAA0C,GAC1C,2CAA2C,GAC3C,yCAAyC,GACzC,mDAAmD,GACnD,+CAA+C,GAC/C,uDAAuD,GACvD,oDAAoD,GACpD,2DAA2D,CAAA;IAC/D,WAAW,EACP,gCAAgC,GAChC,4BAA4B,GAC5B,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"moderation_event.d.ts","sourceRoot":"","sources":["../../../src/db/schema/moderation_event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,eAAO,MAAM,cAAc,qBAAqB,CAAA;AAEhD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;IACrB,MAAM,EACF,8CAA8C,GAC9C,iDAAiD,GACjD,8CAA8C,GAC9C,6CAA6C,GAC7C,2CAA2C,GAC3C,4CAA4C,GAC5C,0CAA0C,GAC1C,4CAA4C,GAC5C,kDAAkD,GAClD,oDAAoD,GACpD,qDAAqD,GACrD,2CAA2C,GAC3C,mDAAmD,GACnD,yCAAyC,GACzC,0CAA0C,GAC1C,2CAA2C,GAC3C,yCAAyC,GACzC,mDAAmD,GACnD,+CAA+C,GAC/C,uDAAuD,GACvD,oDAAoD,GACpD,2DAA2D,CAAA;IAC/D,WAA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AA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderation_event.js","sourceRoot":"","sources":["../../../src/db/schema/moderation_event.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAA","sourcesContent":["import { Generated } from 'kysely'\n\nexport const eventTableName = 'moderation_event'\n\nexport interface ModerationEvent {\n id: Generated<number>\n action:\n | 'tools.ozone.moderation.defs#modEventTakedown'\n | 'tools.ozone.moderation.defs#modEventAcknowledge'\n | 'tools.ozone.moderation.defs#modEventEscalate'\n | 'tools.ozone.moderation.defs#modEventComment'\n | 'tools.ozone.moderation.defs#modEventLabel'\n | 'tools.ozone.moderation.defs#modEventReport'\n | 'tools.ozone.moderation.defs#modEventMute'\n | 'tools.ozone.moderation.defs#modEventUnmute'\n | 'tools.ozone.moderation.defs#modEventMuteReporter'\n | 'tools.ozone.moderation.defs#modEventUnmuteReporter'\n | 'tools.ozone.moderation.defs#modEventReverseTakedown'\n | 'tools.ozone.moderation.defs#modEventEmail'\n | 'tools.ozone.moderation.defs#modEventResolveAppeal'\n | 'tools.ozone.moderation.defs#modEventTag'\n | 'tools.ozone.moderation.defs#accountEvent'\n | 'tools.ozone.moderation.defs#identityEvent'\n | 'tools.ozone.moderation.defs#recordEvent'\n | 'tools.ozone.moderation.defs#modEventPriorityScore'\n | 'tools.ozone.moderation.defs#ageAssuranceEvent'\n | 'tools.ozone.moderation.defs#ageAssuranceOverrideEvent'\n | 'tools.ozone.moderation.defs#ageAssurancePurgeEvent'\n | 'tools.ozone.moderation.defs#revokeAccountCredentialsEvent'\n subjectType:\n | 'com.atproto.admin.defs#repoRef'\n | 'com.atproto.repo.strongRef'\n | 'chat.bsky.convo.defs#messageRef'\n subjectDid: string\n subjectUri: string | null\n subjectCid: string | null\n subjectBlobCids: string[] | null\n subjectMessageId: string | null\n createLabelVals: string | null\n negateLabelVals: string | null\n comment: string | null\n createdAt: string\n createdBy: string\n durationInHours: number | null\n expiresAt: string | null\n meta: Record<string, string | boolean | number> | null\n addedTags: string[] | null\n removedTags: string[] | null\n legacyRefId: number | null\n modTool: { name: string; meta?: { [_ in string]: unknown } } | null\n externalId: string | null\n severityLevel: string | null\n strikeCount: number | null\n strikeExpiresAt: string | null\n}\n\nexport type PartialDB = {\n [eventTableName]: ModerationEvent\n}\n"]}
|
|
1
|
+
{"version":3,"file":"moderation_event.js","sourceRoot":"","sources":["../../../src/db/schema/moderation_event.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG,kBAAkB,CAAA","sourcesContent":["import { Generated } from 'kysely'\n\nexport const eventTableName = 'moderation_event'\n\nexport interface ModerationEvent {\n id: Generated<number>\n action:\n | 'tools.ozone.moderation.defs#modEventTakedown'\n | 'tools.ozone.moderation.defs#modEventAcknowledge'\n | 'tools.ozone.moderation.defs#modEventEscalate'\n | 'tools.ozone.moderation.defs#modEventComment'\n | 'tools.ozone.moderation.defs#modEventLabel'\n | 'tools.ozone.moderation.defs#modEventReport'\n | 'tools.ozone.moderation.defs#modEventMute'\n | 'tools.ozone.moderation.defs#modEventUnmute'\n | 'tools.ozone.moderation.defs#modEventMuteReporter'\n | 'tools.ozone.moderation.defs#modEventUnmuteReporter'\n | 'tools.ozone.moderation.defs#modEventReverseTakedown'\n | 'tools.ozone.moderation.defs#modEventEmail'\n | 'tools.ozone.moderation.defs#modEventResolveAppeal'\n | 'tools.ozone.moderation.defs#modEventTag'\n | 'tools.ozone.moderation.defs#accountEvent'\n | 'tools.ozone.moderation.defs#identityEvent'\n | 'tools.ozone.moderation.defs#recordEvent'\n | 'tools.ozone.moderation.defs#modEventPriorityScore'\n | 'tools.ozone.moderation.defs#ageAssuranceEvent'\n | 'tools.ozone.moderation.defs#ageAssuranceOverrideEvent'\n | 'tools.ozone.moderation.defs#ageAssurancePurgeEvent'\n | 'tools.ozone.moderation.defs#revokeAccountCredentialsEvent'\n subjectType:\n | 'com.atproto.admin.defs#repoRef'\n | 'com.atproto.repo.strongRef'\n | 'chat.bsky.convo.defs#messageRef'\n | 'chat.bsky.convo.defs#convoRef'\n subjectDid: string\n subjectUri: string | null\n subjectCid: string | null\n subjectBlobCids: string[] | null\n subjectConvoId: string | null\n subjectMessageId: string | null\n createLabelVals: string | null\n negateLabelVals: string | null\n comment: string | null\n createdAt: string\n createdBy: string\n durationInHours: number | null\n expiresAt: string | null\n meta: Record<string, string | boolean | number> | null\n addedTags: string[] | null\n removedTags: string[] | null\n legacyRefId: number | null\n modTool: { name: string; meta?: { [_ in string]: unknown } } | null\n externalId: string | null\n severityLevel: string | null\n strikeCount: number | null\n strikeExpiresAt: string | null\n}\n\nexport type PartialDB = {\n [eventTableName]: ModerationEvent\n}\n"]}
|
|
@@ -5,6 +5,7 @@ export interface ModerationSubjectStatus {
|
|
|
5
5
|
id: Generated<number>;
|
|
6
6
|
did: string;
|
|
7
7
|
recordPath: string;
|
|
8
|
+
convoId: string;
|
|
8
9
|
recordCid: string | null;
|
|
9
10
|
blobCids: string[] | null;
|
|
10
11
|
reviewState: typeof REVIEWCLOSED | typeof REVIEWOPEN | typeof REVIEWESCALATED | typeof REVIEWNONE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderation_subject_status.d.ts","sourceRoot":"","sources":["../../../src/db/schema/moderation_subject_status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,UAAU,EACV,UAAU,EACX,MAAM,oDAAoD,CAAA;AAE3D,eAAO,MAAM,sBAAsB,8BAA8B,CAAA;AAEjE,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"moderation_subject_status.d.ts","sourceRoot":"","sources":["../../../src/db/schema/moderation_subject_status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,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AAM,EAAE,GAAG,IAAI,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,iBAAiB,EAAE,MAAM,CAAA;IACzB,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtC;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,sBAAsB,CAAC,EAAE,uBAAuB,CAAA;CAClD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderation_subject_status.js","sourceRoot":"","sources":["../../../src/db/schema/moderation_subject_status.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,sBAAsB,GAAG,2BAA2B,CAAA","sourcesContent":["import { Generated } from 'kysely'\nimport {\n REVIEWCLOSED,\n REVIEWESCALATED,\n REVIEWNONE,\n REVIEWOPEN,\n} from '../../lexicon/types/tools/ozone/moderation/defs.js'\n\nexport const subjectStatusTableName = 'moderation_subject_status'\n\nexport interface ModerationSubjectStatus {\n id: Generated<number>\n did: string\n recordPath: string\n recordCid: string | null\n blobCids: string[] | null\n reviewState:\n | typeof REVIEWCLOSED\n | typeof REVIEWOPEN\n | typeof REVIEWESCALATED\n | typeof REVIEWNONE\n createdAt: string\n updatedAt: string\n lastReviewedBy: string | null\n lastReviewedAt: string | null\n lastReportedAt: string | null\n lastAppealedAt: string | null\n hostingUpdatedAt: string | null\n hostingDeletedAt: string | null\n hostingCreatedAt: string | null\n hostingDeactivatedAt: string | null\n hostingReactivatedAt: string | null\n hostingStatus: string | null\n muteUntil: string | null\n muteReportingUntil: string | null\n suspendUntil: string | null\n takendown: boolean\n appealed: boolean | null\n comment: string | null\n tags: string[] | null\n priorityScore?: number\n ageAssuranceState: string\n ageAssuranceUpdatedBy?: string | null\n}\n\nexport type PartialDB = {\n [subjectStatusTableName]: ModerationSubjectStatus\n}\n"]}
|
|
1
|
+
{"version":3,"file":"moderation_subject_status.js","sourceRoot":"","sources":["../../../src/db/schema/moderation_subject_status.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,sBAAsB,GAAG,2BAA2B,CAAA","sourcesContent":["import { Generated } from 'kysely'\nimport {\n REVIEWCLOSED,\n REVIEWESCALATED,\n REVIEWNONE,\n REVIEWOPEN,\n} from '../../lexicon/types/tools/ozone/moderation/defs.js'\n\nexport const subjectStatusTableName = 'moderation_subject_status'\n\nexport interface ModerationSubjectStatus {\n id: Generated<number>\n\n // unique columns\n did: string\n recordPath: string\n convoId: string\n\n recordCid: string | null\n blobCids: string[] | null\n reviewState:\n | typeof REVIEWCLOSED\n | typeof REVIEWOPEN\n | typeof REVIEWESCALATED\n | typeof REVIEWNONE\n createdAt: string\n updatedAt: string\n lastReviewedBy: string | null\n lastReviewedAt: string | null\n lastReportedAt: string | null\n lastAppealedAt: string | null\n hostingUpdatedAt: string | null\n hostingDeletedAt: string | null\n hostingCreatedAt: string | null\n hostingDeactivatedAt: string | null\n hostingReactivatedAt: string | null\n hostingStatus: string | null\n muteUntil: string | null\n muteReportingUntil: string | null\n suspendUntil: string | null\n takendown: boolean\n appealed: boolean | null\n comment: string | null\n tags: string[] | null\n priorityScore?: number\n ageAssuranceState: string\n ageAssuranceUpdatedBy?: string | null\n}\n\nexport type PartialDB = {\n [subjectStatusTableName]: ModerationSubjectStatus\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../src/db/schema/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,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,MAAM,GAAG,IAAI,CAAA;IACvB,cAAc,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC/B,UAAU,EAAE,M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,CAAA;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;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":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAA","sourcesContent":["import { Generated } from 'kysely'\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: string | null\n actionEventIds: number[] | null // Array of event IDs, sorted DESC [newest, ..., oldest]\n actionNote: string | null\n isMuted: boolean\n status: string // 'open', 'closed', 'escalated', 'queued', 'assigned'\n reportType: string // Denormalized from moderation_event.meta.reportType\n did: string // Denormalized from moderation_event.subjectDid\n recordPath: string // '' = account/message, 'collection/rkey' = record\n subjectMessageId: string | null // Denormalized from moderation_event.subjectMessageId\n createdAt: string\n updatedAt: string\n assignedTo: string | null // DID of permanently assigned moderator, null if unassigned\n assignedAt: string | null // When the permanent assignment was created\n closedAt: string | 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":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAA","sourcesContent":["import { Generated } from 'kysely'\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: string | null\n actionEventIds: number[] | null // Array of event IDs, sorted DESC [newest, ..., oldest]\n actionNote: string | null\n isMuted: boolean\n status: string // 'open', 'closed', 'escalated', 'queued', 'assigned'\n reportType: string // Denormalized from moderation_event.meta.reportType\n did: string // Denormalized from moderation_event.subjectDid\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: string\n updatedAt: string\n assignedTo: string | null // DID of permanently assigned moderator, null if unassigned\n assignedAt: string | null // When the permanent assignment was created\n closedAt: string | null\n}\n\nexport type PartialDB = {\n [reportTableName]: Report\n}\n"]}
|
package/dist/lexicon/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ import * as AppBskyDraftCreateDraft from './types/app/bsky/draft/createDraft.js'
|
|
|
27
27
|
import * as AppBskyDraftDeleteDraft from './types/app/bsky/draft/deleteDraft.js';
|
|
28
28
|
import * as AppBskyDraftGetDrafts from './types/app/bsky/draft/getDrafts.js';
|
|
29
29
|
import * as AppBskyDraftUpdateDraft from './types/app/bsky/draft/updateDraft.js';
|
|
30
|
+
import * as AppBskyEmbedGetEmbedExternalView from './types/app/bsky/embed/getEmbedExternalView.js';
|
|
30
31
|
import * as AppBskyFeedDescribeFeedGenerator from './types/app/bsky/feed/describeFeedGenerator.js';
|
|
31
32
|
import * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds.js';
|
|
32
33
|
import * as AppBskyFeedGetActorLikes from './types/app/bsky/feed/getActorLikes.js';
|
|
@@ -114,6 +115,7 @@ import * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLi
|
|
|
114
115
|
import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js';
|
|
115
116
|
import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js';
|
|
116
117
|
import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js';
|
|
118
|
+
import * as ChatBskyActorGetStatus from './types/chat/bsky/actor/getStatus.js';
|
|
117
119
|
import * as ChatBskyConvoAcceptConvo from './types/chat/bsky/convo/acceptConvo.js';
|
|
118
120
|
import * as ChatBskyConvoAddReaction from './types/chat/bsky/convo/addReaction.js';
|
|
119
121
|
import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js';
|
|
@@ -143,13 +145,17 @@ import * as ChatBskyGroupDisableJoinLink from './types/chat/bsky/group/disableJo
|
|
|
143
145
|
import * as ChatBskyGroupEditGroup from './types/chat/bsky/group/editGroup.js';
|
|
144
146
|
import * as ChatBskyGroupEditJoinLink from './types/chat/bsky/group/editJoinLink.js';
|
|
145
147
|
import * as ChatBskyGroupEnableJoinLink from './types/chat/bsky/group/enableJoinLink.js';
|
|
146
|
-
import * as
|
|
148
|
+
import * as ChatBskyGroupGetJoinLinkPreviews from './types/chat/bsky/group/getJoinLinkPreviews.js';
|
|
147
149
|
import * as ChatBskyGroupListJoinRequests from './types/chat/bsky/group/listJoinRequests.js';
|
|
148
150
|
import * as ChatBskyGroupListMutualGroups from './types/chat/bsky/group/listMutualGroups.js';
|
|
149
151
|
import * as ChatBskyGroupRejectJoinRequest from './types/chat/bsky/group/rejectJoinRequest.js';
|
|
150
152
|
import * as ChatBskyGroupRemoveMembers from './types/chat/bsky/group/removeMembers.js';
|
|
151
153
|
import * as ChatBskyGroupRequestJoin from './types/chat/bsky/group/requestJoin.js';
|
|
154
|
+
import * as ChatBskyGroupUpdateJoinRequestsRead from './types/chat/bsky/group/updateJoinRequestsRead.js';
|
|
155
|
+
import * as ChatBskyGroupWithdrawJoinRequest from './types/chat/bsky/group/withdrawJoinRequest.js';
|
|
152
156
|
import * as ChatBskyModerationGetActorMetadata from './types/chat/bsky/moderation/getActorMetadata.js';
|
|
157
|
+
import * as ChatBskyModerationGetConvo from './types/chat/bsky/moderation/getConvo.js';
|
|
158
|
+
import * as ChatBskyModerationGetConvoMembers from './types/chat/bsky/moderation/getConvoMembers.js';
|
|
153
159
|
import * as ChatBskyModerationGetMessageContext from './types/chat/bsky/moderation/getMessageContext.js';
|
|
154
160
|
import * as ChatBskyModerationSubscribeModEvents from './types/chat/bsky/moderation/subscribeModEvents.js';
|
|
155
161
|
import * as ChatBskyModerationUpdateActorAccess from './types/chat/bsky/moderation/updateActorAccess.js';
|
|
@@ -473,6 +479,7 @@ export declare class AppBskyDraftNS {
|
|
|
473
479
|
export declare class AppBskyEmbedNS {
|
|
474
480
|
_server: Server;
|
|
475
481
|
constructor(server: Server);
|
|
482
|
+
getEmbedExternalView<A extends Auth = void>(cfg: MethodConfigOrHandler<A, AppBskyEmbedGetEmbedExternalView.QueryParams, AppBskyEmbedGetEmbedExternalView.HandlerInput, AppBskyEmbedGetEmbedExternalView.HandlerOutput>): void;
|
|
476
483
|
}
|
|
477
484
|
export declare class AppBskyFeedNS {
|
|
478
485
|
_server: Server;
|
|
@@ -596,6 +603,7 @@ export declare class ChatBskyNS {
|
|
|
596
603
|
_server: Server;
|
|
597
604
|
actor: ChatBskyActorNS;
|
|
598
605
|
convo: ChatBskyConvoNS;
|
|
606
|
+
embed: ChatBskyEmbedNS;
|
|
599
607
|
group: ChatBskyGroupNS;
|
|
600
608
|
moderation: ChatBskyModerationNS;
|
|
601
609
|
constructor(server: Server);
|
|
@@ -605,6 +613,7 @@ export declare class ChatBskyActorNS {
|
|
|
605
613
|
constructor(server: Server);
|
|
606
614
|
deleteAccount<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyActorDeleteAccount.QueryParams, ChatBskyActorDeleteAccount.HandlerInput, ChatBskyActorDeleteAccount.HandlerOutput>): void;
|
|
607
615
|
exportAccountData<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyActorExportAccountData.QueryParams, ChatBskyActorExportAccountData.HandlerInput, ChatBskyActorExportAccountData.HandlerOutput>): void;
|
|
616
|
+
getStatus<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyActorGetStatus.QueryParams, ChatBskyActorGetStatus.HandlerInput, ChatBskyActorGetStatus.HandlerOutput>): void;
|
|
608
617
|
}
|
|
609
618
|
export declare class ChatBskyConvoNS {
|
|
610
619
|
_server: Server;
|
|
@@ -631,6 +640,10 @@ export declare class ChatBskyConvoNS {
|
|
|
631
640
|
updateAllRead<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyConvoUpdateAllRead.QueryParams, ChatBskyConvoUpdateAllRead.HandlerInput, ChatBskyConvoUpdateAllRead.HandlerOutput>): void;
|
|
632
641
|
updateRead<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyConvoUpdateRead.QueryParams, ChatBskyConvoUpdateRead.HandlerInput, ChatBskyConvoUpdateRead.HandlerOutput>): void;
|
|
633
642
|
}
|
|
643
|
+
export declare class ChatBskyEmbedNS {
|
|
644
|
+
_server: Server;
|
|
645
|
+
constructor(server: Server);
|
|
646
|
+
}
|
|
634
647
|
export declare class ChatBskyGroupNS {
|
|
635
648
|
_server: Server;
|
|
636
649
|
constructor(server: Server);
|
|
@@ -642,17 +655,21 @@ export declare class ChatBskyGroupNS {
|
|
|
642
655
|
editGroup<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupEditGroup.QueryParams, ChatBskyGroupEditGroup.HandlerInput, ChatBskyGroupEditGroup.HandlerOutput>): void;
|
|
643
656
|
editJoinLink<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupEditJoinLink.QueryParams, ChatBskyGroupEditJoinLink.HandlerInput, ChatBskyGroupEditJoinLink.HandlerOutput>): void;
|
|
644
657
|
enableJoinLink<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupEnableJoinLink.QueryParams, ChatBskyGroupEnableJoinLink.HandlerInput, ChatBskyGroupEnableJoinLink.HandlerOutput>): void;
|
|
645
|
-
|
|
658
|
+
getJoinLinkPreviews<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupGetJoinLinkPreviews.QueryParams, ChatBskyGroupGetJoinLinkPreviews.HandlerInput, ChatBskyGroupGetJoinLinkPreviews.HandlerOutput>): void;
|
|
646
659
|
listJoinRequests<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupListJoinRequests.QueryParams, ChatBskyGroupListJoinRequests.HandlerInput, ChatBskyGroupListJoinRequests.HandlerOutput>): void;
|
|
647
660
|
listMutualGroups<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupListMutualGroups.QueryParams, ChatBskyGroupListMutualGroups.HandlerInput, ChatBskyGroupListMutualGroups.HandlerOutput>): void;
|
|
648
661
|
rejectJoinRequest<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupRejectJoinRequest.QueryParams, ChatBskyGroupRejectJoinRequest.HandlerInput, ChatBskyGroupRejectJoinRequest.HandlerOutput>): void;
|
|
649
662
|
removeMembers<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupRemoveMembers.QueryParams, ChatBskyGroupRemoveMembers.HandlerInput, ChatBskyGroupRemoveMembers.HandlerOutput>): void;
|
|
650
663
|
requestJoin<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupRequestJoin.QueryParams, ChatBskyGroupRequestJoin.HandlerInput, ChatBskyGroupRequestJoin.HandlerOutput>): void;
|
|
664
|
+
updateJoinRequestsRead<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupUpdateJoinRequestsRead.QueryParams, ChatBskyGroupUpdateJoinRequestsRead.HandlerInput, ChatBskyGroupUpdateJoinRequestsRead.HandlerOutput>): void;
|
|
665
|
+
withdrawJoinRequest<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyGroupWithdrawJoinRequest.QueryParams, ChatBskyGroupWithdrawJoinRequest.HandlerInput, ChatBskyGroupWithdrawJoinRequest.HandlerOutput>): void;
|
|
651
666
|
}
|
|
652
667
|
export declare class ChatBskyModerationNS {
|
|
653
668
|
_server: Server;
|
|
654
669
|
constructor(server: Server);
|
|
655
670
|
getActorMetadata<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyModerationGetActorMetadata.QueryParams, ChatBskyModerationGetActorMetadata.HandlerInput, ChatBskyModerationGetActorMetadata.HandlerOutput>): void;
|
|
671
|
+
getConvo<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyModerationGetConvo.QueryParams, ChatBskyModerationGetConvo.HandlerInput, ChatBskyModerationGetConvo.HandlerOutput>): void;
|
|
672
|
+
getConvoMembers<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyModerationGetConvoMembers.QueryParams, ChatBskyModerationGetConvoMembers.HandlerInput, ChatBskyModerationGetConvoMembers.HandlerOutput>): void;
|
|
656
673
|
getMessageContext<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyModerationGetMessageContext.QueryParams, ChatBskyModerationGetMessageContext.HandlerInput, ChatBskyModerationGetMessageContext.HandlerOutput>): void;
|
|
657
674
|
subscribeModEvents<A extends Auth = void>(cfg: StreamConfigOrHandler<A, ChatBskyModerationSubscribeModEvents.QueryParams, ChatBskyModerationSubscribeModEvents.HandlerOutput>): void;
|
|
658
675
|
updateActorAccess<A extends Auth = void>(cfg: MethodConfigOrHandler<A, ChatBskyModerationUpdateActorAccess.QueryParams, ChatBskyModerationUpdateActorAccess.HandlerInput, ChatBskyModerationUpdateActorAccess.HandlerOutput>): void;
|