@atproto/ozone 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/api/moderation/util.d.ts +1 -1
- package/dist/db/index.js +20 -1
- package/dist/db/index.js.map +3 -3
- package/dist/db/migrations/20240208T213404429Z-add-tags-column-to-moderation-subject.d.ts +3 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/db/schema/moderation_event.d.ts +3 -1
- package/dist/db/schema/moderation_subject_status.d.ts +1 -0
- package/dist/index.js +318 -51
- package/dist/index.js.map +3 -3
- package/dist/lexicon/lexicons.d.ts +57 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +9 -0
- package/dist/lexicon/types/com/atproto/admin/emitModerationEvent.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/admin/queryModerationEvents.d.ts +2 -0
- package/dist/lexicon/types/com/atproto/admin/queryModerationStatuses.d.ts +2 -0
- package/dist/logger.d.ts +1 -0
- package/dist/mod-service/index.d.ts +18 -4
- package/dist/mod-service/lang.d.ts +15 -0
- package/dist/mod-service/status.d.ts +1 -1
- package/dist/mod-service/types.d.ts +1 -1
- package/dist/mod-service/views.d.ts +2 -1
- package/package.json +6 -6
- package/src/api/admin/emitModerationEvent.ts +22 -10
- package/src/api/admin/queryModerationEvents.ts +4 -0
- package/src/api/admin/queryModerationStatuses.ts +4 -0
- package/src/api/moderation/createReport.ts +15 -4
- package/src/api/moderation/util.ts +1 -0
- package/src/db/migrations/20240208T213404429Z-add-tags-column-to-moderation-subject.ts +31 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/db/schema/moderation_event.ts +3 -0
- package/src/db/schema/moderation_subject_status.ts +1 -0
- package/src/lexicon/lexicons.ts +62 -0
- package/src/lexicon/types/com/atproto/admin/defs.ts +24 -0
- package/src/lexicon/types/com/atproto/admin/emitModerationEvent.ts +1 -0
- package/src/lexicon/types/com/atproto/admin/queryModerationEvents.ts +4 -0
- package/src/lexicon/types/com/atproto/admin/queryModerationStatuses.ts +2 -0
- package/src/logger.ts +2 -0
- package/src/mod-service/index.ts +60 -10
- package/src/mod-service/lang.ts +82 -0
- package/src/mod-service/status.ts +18 -4
- package/src/mod-service/types.ts +1 -0
- package/src/mod-service/views.ts +21 -2
- package/tests/__snapshots__/get-record.test.ts.snap +6 -0
- package/tests/__snapshots__/get-repo.test.ts.snap +3 -0
- package/tests/__snapshots__/moderation-events.test.ts.snap +45 -4
- package/tests/__snapshots__/moderation-statuses.test.ts.snap +59 -3
- package/tests/__snapshots__/moderation.test.ts.snap +3 -3
- package/tests/get-record.test.ts +0 -8
- package/tests/moderation-events.test.ts +57 -5
- package/tests/moderation-status-tags.test.ts +92 -0
- package/tests/moderation-statuses.test.ts +20 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atproto/ozone
|
|
2
2
|
|
|
3
|
+
## 0.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2192](https://github.com/bluesky-social/atproto/pull/2192) [`f79cc6339`](https://github.com/bluesky-social/atproto/commit/f79cc63390ae9dbd47a4ff5d694eec25b78b788e) Thanks [@foysalit](https://github.com/foysalit)! - Tag event on moderation subjects and allow filtering events and subjects by tags
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`f79cc6339`](https://github.com/bluesky-social/atproto/commit/f79cc63390ae9dbd47a4ff5d694eec25b78b788e)]:
|
|
10
|
+
- @atproto/api@0.9.8
|
|
11
|
+
|
|
3
12
|
## 0.0.9
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { InputSchema as ReportInput } from '../../lexicon/types/com/atproto/moderation/createReport';
|
|
2
2
|
export declare const getReasonType: (reasonType: ReportInput['reasonType']) => string | boolean;
|
|
3
|
-
export declare const getEventType: (type: string) => "com.atproto.admin.defs#modEventTakedown" | "com.atproto.admin.defs#modEventAcknowledge" | "com.atproto.admin.defs#modEventEscalate" | "com.atproto.admin.defs#modEventComment" | "com.atproto.admin.defs#modEventLabel" | "com.atproto.admin.defs#modEventReport" | "com.atproto.admin.defs#modEventMute" | "com.atproto.admin.defs#modEventReverseTakedown" | "com.atproto.admin.defs#modEventEmail" | "com.atproto.admin.defs#modEventResolveAppeal";
|
|
3
|
+
export declare const getEventType: (type: string) => "com.atproto.admin.defs#modEventTakedown" | "com.atproto.admin.defs#modEventAcknowledge" | "com.atproto.admin.defs#modEventEscalate" | "com.atproto.admin.defs#modEventComment" | "com.atproto.admin.defs#modEventLabel" | "com.atproto.admin.defs#modEventReport" | "com.atproto.admin.defs#modEventMute" | "com.atproto.admin.defs#modEventReverseTakedown" | "com.atproto.admin.defs#modEventEmail" | "com.atproto.admin.defs#modEventResolveAppeal" | "com.atproto.admin.defs#modEventTag";
|
|
4
4
|
export declare const getReviewState: (reviewState?: string) => "com.atproto.admin.defs#reviewOpen" | "com.atproto.admin.defs#reviewEscalated" | "com.atproto.admin.defs#reviewClosed" | undefined;
|
package/dist/db/index.js
CHANGED
|
@@ -33761,6 +33761,7 @@ var subsystemLogger = (name2) => {
|
|
|
33761
33761
|
// src/logger.ts
|
|
33762
33762
|
var dbLogger = subsystemLogger("ozone:db");
|
|
33763
33763
|
var httpLogger = subsystemLogger("ozone");
|
|
33764
|
+
var langLogger = subsystemLogger("ozone:lang");
|
|
33764
33765
|
var loggerMiddleware = (0, import_pino_http.default)({
|
|
33765
33766
|
logger: httpLogger,
|
|
33766
33767
|
serializers: {
|
|
@@ -33781,7 +33782,8 @@ var migrations_exports = {};
|
|
|
33781
33782
|
__export(migrations_exports, {
|
|
33782
33783
|
_20231219T205730722Z: () => T205730722Z_init_exports,
|
|
33783
33784
|
_20240116T085607200Z: () => T085607200Z_communication_template_exports,
|
|
33784
|
-
_20240201T051104136Z: () => T051104136Z_mod_event_blobs_exports
|
|
33785
|
+
_20240201T051104136Z: () => T051104136Z_mod_event_blobs_exports,
|
|
33786
|
+
_20240208T213404429Z: () => T213404429Z_add_tags_column_to_moderation_subject_exports
|
|
33785
33787
|
});
|
|
33786
33788
|
|
|
33787
33789
|
// src/db/migrations/20231219T205730722Z-init.ts
|
|
@@ -33852,6 +33854,23 @@ async function down3(db) {
|
|
|
33852
33854
|
await db.schema.alterTable("moderation_event").dropColumn("subjectBlobCids").execute();
|
|
33853
33855
|
}
|
|
33854
33856
|
|
|
33857
|
+
// src/db/migrations/20240208T213404429Z-add-tags-column-to-moderation-subject.ts
|
|
33858
|
+
var T213404429Z_add_tags_column_to_moderation_subject_exports = {};
|
|
33859
|
+
__export(T213404429Z_add_tags_column_to_moderation_subject_exports, {
|
|
33860
|
+
down: () => down4,
|
|
33861
|
+
up: () => up4
|
|
33862
|
+
});
|
|
33863
|
+
async function up4(db) {
|
|
33864
|
+
await db.schema.alterTable("moderation_event").addColumn("addedTags", "jsonb").execute();
|
|
33865
|
+
await db.schema.alterTable("moderation_event").addColumn("removedTags", "jsonb").execute();
|
|
33866
|
+
await db.schema.alterTable("moderation_subject_status").addColumn("tags", "jsonb").execute();
|
|
33867
|
+
}
|
|
33868
|
+
async function down4(db) {
|
|
33869
|
+
await db.schema.alterTable("moderation_event").dropColumn("addedTags").execute();
|
|
33870
|
+
await db.schema.alterTable("moderation_event").dropColumn("removedTags").execute();
|
|
33871
|
+
await db.schema.alterTable("moderation_subject_status").dropColumn("tags").execute();
|
|
33872
|
+
}
|
|
33873
|
+
|
|
33855
33874
|
// src/db/migrations/provider.ts
|
|
33856
33875
|
var CtxMigrationProvider = class {
|
|
33857
33876
|
constructor(migrations, ctx) {
|