@atproto/bsky 0.0.21 → 0.0.22
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 +7 -0
- package/dist/api/com/atproto/moderation/util.d.ts +1 -1
- package/dist/db/index.js +17 -1
- package/dist/db/index.js.map +3 -3
- package/dist/db/migrations/20231213T181744386Z-moderation-subject-appeal.d.ts +3 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/db/tables/moderation.d.ts +3 -1
- package/dist/index.js +213 -32
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +1 -0
- package/dist/lexicon/lexicons.d.ts +35 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +10 -1
- package/dist/lexicon/types/com/atproto/admin/queryModerationStatuses.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/admin/sendEmail.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/moderation/defs.d.ts +2 -1
- package/dist/services/feed/views.d.ts +1 -1
- package/dist/services/moderation/index.d.ts +7 -2
- package/package.json +5 -5
- package/src/api/app/bsky/feed/getPostThread.ts +4 -3
- package/src/api/app/bsky/feed/getTimeline.ts +54 -0
- package/src/api/com/atproto/admin/queryModerationStatuses.ts +2 -0
- package/src/api/com/atproto/moderation/createReport.ts +14 -3
- package/src/api/com/atproto/moderation/util.ts +2 -0
- package/src/api/health.ts +14 -0
- package/src/auto-moderator/index.ts +19 -0
- package/src/db/migrations/20231213T181744386Z-moderation-subject-appeal.ts +23 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/db/tables/moderation.ts +3 -0
- package/src/lexicon/index.ts +1 -0
- package/src/lexicon/lexicons.ts +40 -0
- package/src/lexicon/types/com/atproto/admin/defs.ts +28 -0
- package/src/lexicon/types/com/atproto/admin/queryModerationStatuses.ts +2 -0
- package/src/lexicon/types/com/atproto/admin/sendEmail.ts +2 -0
- package/src/lexicon/types/com/atproto/moderation/defs.ts +3 -0
- package/src/services/feed/views.ts +6 -3
- package/src/services/moderation/index.ts +9 -0
- package/src/services/moderation/status.ts +24 -0
- package/src/services/moderation/views.ts +2 -0
- package/tests/admin/moderation-appeals.test.ts +269 -0
- package/tests/auto-moderator/labeler.test.ts +39 -0
- package/tests/views/blocks.test.ts +14 -1
- package/tests/views/timeline.test.ts +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,6 @@ export declare const getSubject: (subject: SubjectInput) => {
|
|
|
13
13
|
did?: undefined;
|
|
14
14
|
};
|
|
15
15
|
export declare const getReasonType: (reasonType: ReportInput['reasonType']) => string | boolean;
|
|
16
|
-
export declare const getEventType: (type: string) => "com.atproto.admin.defs#modEventTakedown" | "com.atproto.admin.defs#modEventReverseTakedown" | "com.atproto.admin.defs#modEventComment" | "com.atproto.admin.defs#modEventReport" | "com.atproto.admin.defs#modEventLabel" | "com.atproto.admin.defs#modEventAcknowledge" | "com.atproto.admin.defs#modEventEscalate" | "com.atproto.admin.defs#modEventMute" | "com.atproto.admin.defs#modEventEmail";
|
|
16
|
+
export declare const getEventType: (type: string) => "com.atproto.admin.defs#modEventTakedown" | "com.atproto.admin.defs#modEventReverseTakedown" | "com.atproto.admin.defs#modEventResolveAppeal" | "com.atproto.admin.defs#modEventComment" | "com.atproto.admin.defs#modEventReport" | "com.atproto.admin.defs#modEventLabel" | "com.atproto.admin.defs#modEventAcknowledge" | "com.atproto.admin.defs#modEventEscalate" | "com.atproto.admin.defs#modEventMute" | "com.atproto.admin.defs#modEventEmail";
|
|
17
17
|
export declare const getReviewState: (reviewState?: string) => "com.atproto.admin.defs#reviewOpen" | "com.atproto.admin.defs#reviewEscalated" | "com.atproto.admin.defs#reviewClosed" | undefined;
|
|
18
18
|
export {};
|
package/dist/db/index.js
CHANGED
|
@@ -33504,7 +33504,8 @@ __export(migrations_exports, {
|
|
|
33504
33504
|
_20230920T213858047Z: () => T213858047Z_add_tags_to_post_exports,
|
|
33505
33505
|
_20230929T192920807Z: () => T192920807Z_record_cursor_indexes_exports,
|
|
33506
33506
|
_20231003T202833377Z: () => T202833377Z_create_moderation_subject_status_exports,
|
|
33507
|
-
_20231205T000257238Z: () => T000257238Z_remove_did_cache_exports
|
|
33507
|
+
_20231205T000257238Z: () => T000257238Z_remove_did_cache_exports,
|
|
33508
|
+
_20231213T181744386Z: () => T181744386Z_moderation_subject_appeal_exports
|
|
33508
33509
|
});
|
|
33509
33510
|
|
|
33510
33511
|
// src/db/migrations/20230309T045948368Z-init.ts
|
|
@@ -34040,6 +34041,21 @@ async function down30(db) {
|
|
|
34040
34041
|
await db.schema.createTable("did_cache").addColumn("did", "varchar", (col) => col.primaryKey()).addColumn("doc", "jsonb", (col) => col.notNull()).addColumn("updatedAt", "bigint", (col) => col.notNull()).execute();
|
|
34041
34042
|
}
|
|
34042
34043
|
|
|
34044
|
+
// src/db/migrations/20231213T181744386Z-moderation-subject-appeal.ts
|
|
34045
|
+
var T181744386Z_moderation_subject_appeal_exports = {};
|
|
34046
|
+
__export(T181744386Z_moderation_subject_appeal_exports, {
|
|
34047
|
+
down: () => down31,
|
|
34048
|
+
up: () => up31
|
|
34049
|
+
});
|
|
34050
|
+
async function up31(db) {
|
|
34051
|
+
await db.schema.alterTable("moderation_subject_status").addColumn("lastAppealedAt", "varchar").execute();
|
|
34052
|
+
await db.schema.alterTable("moderation_subject_status").addColumn("appealed", "boolean").execute();
|
|
34053
|
+
}
|
|
34054
|
+
async function down31(db) {
|
|
34055
|
+
await db.schema.alterTable("moderation_subject_status").dropColumn("lastAppealedAt").execute();
|
|
34056
|
+
await db.schema.alterTable("moderation_subject_status").dropColumn("appealed").execute();
|
|
34057
|
+
}
|
|
34058
|
+
|
|
34043
34059
|
// src/db/migrations/provider.ts
|
|
34044
34060
|
var CtxMigrationProvider = class {
|
|
34045
34061
|
constructor(migrations, ctx) {
|