@atproto/ozone 0.1.73 → 0.1.75
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 +35 -0
- package/bin/migration-create.ts +2 -2
- package/dist/api/chat/getActorMetadata.d.ts +1 -1
- package/dist/api/chat/getActorMetadata.d.ts.map +1 -1
- package/dist/api/chat/getActorMetadata.js.map +1 -1
- package/dist/api/chat/getMessageContext.d.ts +1 -1
- package/dist/api/chat/getMessageContext.d.ts.map +1 -1
- package/dist/api/chat/getMessageContext.js.map +1 -1
- package/dist/api/chat/index.d.ts +1 -1
- package/dist/api/chat/index.d.ts.map +1 -1
- package/dist/api/communication/createTemplate.d.ts +1 -1
- package/dist/api/communication/createTemplate.d.ts.map +1 -1
- package/dist/api/communication/createTemplate.js.map +1 -1
- package/dist/api/communication/deleteTemplate.d.ts +1 -1
- package/dist/api/communication/deleteTemplate.d.ts.map +1 -1
- package/dist/api/communication/listTemplates.d.ts +1 -1
- package/dist/api/communication/listTemplates.d.ts.map +1 -1
- package/dist/api/communication/updateTemplate.d.ts +1 -1
- package/dist/api/communication/updateTemplate.d.ts.map +1 -1
- package/dist/api/communication/updateTemplate.js.map +1 -1
- package/dist/api/health.d.ts +3 -3
- package/dist/api/health.d.ts.map +1 -1
- package/dist/api/health.js +2 -5
- package/dist/api/health.js.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +20 -20
- package/dist/api/index.js.map +1 -1
- package/dist/api/label/fetchLabels.d.ts +1 -1
- package/dist/api/label/fetchLabels.d.ts.map +1 -1
- package/dist/api/label/queryLabels.d.ts +1 -1
- package/dist/api/label/queryLabels.d.ts.map +1 -1
- package/dist/api/label/queryLabels.js +1 -1
- package/dist/api/label/queryLabels.js.map +1 -1
- package/dist/api/label/subscribeLabels.d.ts +1 -1
- package/dist/api/label/subscribeLabels.d.ts.map +1 -1
- package/dist/api/label/subscribeLabels.js +2 -5
- package/dist/api/label/subscribeLabels.js.map +1 -1
- package/dist/api/moderation/emitEvent.d.ts +1 -1
- package/dist/api/moderation/emitEvent.d.ts.map +1 -1
- package/dist/api/moderation/emitEvent.js +6 -6
- package/dist/api/moderation/emitEvent.js.map +1 -1
- package/dist/api/moderation/getEvent.d.ts +1 -1
- package/dist/api/moderation/getEvent.d.ts.map +1 -1
- package/dist/api/moderation/getRecord.d.ts +1 -1
- package/dist/api/moderation/getRecord.d.ts.map +1 -1
- package/dist/api/moderation/getRecord.js +1 -1
- package/dist/api/moderation/getRecord.js.map +1 -1
- package/dist/api/moderation/getRecords.d.ts +1 -1
- package/dist/api/moderation/getRecords.d.ts.map +1 -1
- package/dist/api/moderation/getRecords.js +1 -1
- package/dist/api/moderation/getRecords.js.map +1 -1
- package/dist/api/moderation/getRepo.d.ts +1 -1
- package/dist/api/moderation/getRepo.d.ts.map +1 -1
- package/dist/api/moderation/getRepos.d.ts +1 -1
- package/dist/api/moderation/getRepos.d.ts.map +1 -1
- package/dist/api/moderation/queryEvents.d.ts +1 -1
- package/dist/api/moderation/queryEvents.d.ts.map +1 -1
- package/dist/api/moderation/queryStatuses.d.ts +1 -1
- package/dist/api/moderation/queryStatuses.d.ts.map +1 -1
- package/dist/api/moderation/searchRepos.d.ts +1 -1
- package/dist/api/moderation/searchRepos.d.ts.map +1 -1
- package/dist/api/moderation/searchRepos.js.map +1 -1
- package/dist/api/proxied.d.ts +1 -1
- package/dist/api/proxied.d.ts.map +1 -1
- package/dist/api/report/createReport.d.ts +1 -1
- package/dist/api/report/createReport.d.ts.map +1 -1
- package/dist/api/report/createReport.js +6 -6
- package/dist/api/report/createReport.js.map +1 -1
- package/dist/api/server/getConfig.d.ts +1 -1
- package/dist/api/server/getConfig.d.ts.map +1 -1
- package/dist/api/server/getConfig.js.map +1 -1
- package/dist/api/set/addValues.d.ts +1 -1
- package/dist/api/set/addValues.d.ts.map +1 -1
- package/dist/api/set/deleteSet.d.ts +1 -1
- package/dist/api/set/deleteSet.d.ts.map +1 -1
- package/dist/api/set/deleteValues.d.ts +1 -1
- package/dist/api/set/deleteValues.d.ts.map +1 -1
- package/dist/api/set/getValues.d.ts +1 -1
- package/dist/api/set/getValues.d.ts.map +1 -1
- package/dist/api/set/querySets.d.ts +1 -1
- package/dist/api/set/querySets.d.ts.map +1 -1
- package/dist/api/set/upsertSet.d.ts +1 -1
- package/dist/api/set/upsertSet.d.ts.map +1 -1
- package/dist/api/setting/listOptions.d.ts +1 -1
- package/dist/api/setting/listOptions.d.ts.map +1 -1
- package/dist/api/setting/removeOptions.d.ts +1 -1
- package/dist/api/setting/removeOptions.d.ts.map +1 -1
- package/dist/api/setting/upsertOption.d.ts +1 -1
- package/dist/api/setting/upsertOption.d.ts.map +1 -1
- package/dist/api/setting/upsertOption.js +2 -2
- package/dist/api/setting/upsertOption.js.map +1 -1
- package/dist/api/team/addMember.d.ts +1 -1
- package/dist/api/team/addMember.d.ts.map +1 -1
- package/dist/api/team/deleteMember.d.ts +1 -1
- package/dist/api/team/deleteMember.d.ts.map +1 -1
- package/dist/api/team/listMembers.d.ts +1 -1
- package/dist/api/team/listMembers.d.ts.map +1 -1
- package/dist/api/team/updateMember.d.ts +1 -1
- package/dist/api/team/updateMember.d.ts.map +1 -1
- package/dist/api/util.d.ts +4 -4
- package/dist/api/util.d.ts.map +1 -1
- package/dist/api/util.js +4 -1
- package/dist/api/util.js.map +1 -1
- package/dist/api/well-known.d.ts +3 -3
- package/dist/api/well-known.d.ts.map +1 -1
- package/dist/api/well-known.js +2 -5
- package/dist/api/well-known.js.map +1 -1
- package/dist/background.d.ts.map +1 -1
- package/dist/background.js +0 -2
- package/dist/background.js.map +1 -1
- package/dist/communication-service/template.d.ts +1 -1
- package/dist/communication-service/template.d.ts.map +1 -1
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js.map +1 -1
- package/dist/config/secrets.js +3 -3
- package/dist/config/secrets.js.map +1 -1
- package/dist/context.d.ts +9 -10
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +11 -12
- package/dist/context.js.map +1 -1
- package/dist/daemon/blob-diverter.d.ts +2 -2
- package/dist/daemon/blob-diverter.d.ts.map +1 -1
- package/dist/daemon/blob-diverter.js +3 -3
- package/dist/daemon/blob-diverter.js.map +1 -1
- package/dist/daemon/context.d.ts +1 -2
- package/dist/daemon/context.d.ts.map +1 -1
- package/dist/daemon/context.js +6 -7
- package/dist/daemon/context.js.map +1 -1
- package/dist/daemon/event-pusher.d.ts +3 -3
- package/dist/daemon/event-pusher.d.ts.map +1 -1
- package/dist/daemon/event-pusher.js +2 -2
- package/dist/daemon/event-pusher.js.map +1 -1
- package/dist/daemon/event-reverser.d.ts +1 -1
- package/dist/daemon/event-reverser.d.ts.map +1 -1
- package/dist/daemon/event-reverser.js.map +1 -1
- package/dist/daemon/index.d.ts +1 -1
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +2 -5
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/materialized-view-refresher.js +1 -1
- package/dist/daemon/materialized-view-refresher.js.map +1 -1
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.d.ts.map +1 -1
- package/dist/db/index.js +5 -5
- package/dist/db/index.js.map +1 -1
- package/dist/db/migrations/20241220T144630860Z-stats-materialized-views.d.ts.map +1 -1
- package/dist/db/migrations/20241220T144630860Z-stats-materialized-views.js.map +1 -1
- package/dist/db/schema/index.d.ts +11 -11
- package/dist/db/schema/index.d.ts.map +1 -1
- package/dist/db/schema/moderation_subject_status.d.ts +1 -1
- package/dist/db/schema/moderation_subject_status.d.ts.map +1 -1
- package/dist/db/types.d.ts +1 -1
- package/dist/db/types.d.ts.map +1 -1
- package/dist/db/types.js.map +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +64 -2
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +36 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +19 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js +10 -0
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/postgate.d.ts +1 -0
- package/dist/lexicon/types/app/bsky/feed/postgate.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/postgate.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts +1 -0
- package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/threadgate.js.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts +2 -0
- package/dist/lexicon/types/tools/ozone/moderation/defs.d.ts.map +1 -1
- package/dist/lexicon/types/tools/ozone/moderation/defs.js.map +1 -1
- package/dist/logger.js +2 -25
- package/dist/logger.js.map +1 -1
- package/dist/mod-service/index.d.ts +32 -32
- package/dist/mod-service/index.d.ts.map +1 -1
- package/dist/mod-service/index.js +19 -15
- package/dist/mod-service/index.js.map +1 -1
- package/dist/mod-service/status.d.ts +24 -24
- package/dist/mod-service/status.d.ts.map +1 -1
- package/dist/mod-service/status.js +2 -0
- package/dist/mod-service/status.js.map +1 -1
- package/dist/mod-service/subject.d.ts +3 -3
- package/dist/mod-service/subject.d.ts.map +1 -1
- package/dist/mod-service/subject.js.map +1 -1
- package/dist/mod-service/types.d.ts +2 -2
- package/dist/mod-service/types.d.ts.map +1 -1
- package/dist/mod-service/views.d.ts +6 -6
- package/dist/mod-service/views.d.ts.map +1 -1
- package/dist/mod-service/views.js +8 -8
- package/dist/mod-service/views.js.map +1 -1
- package/dist/sequencer/outbox.d.ts +1 -2
- package/dist/sequencer/outbox.d.ts.map +1 -1
- package/dist/sequencer/outbox.js +0 -1
- package/dist/sequencer/outbox.js.map +1 -1
- package/dist/sequencer/sequencer.d.ts +3 -4
- package/dist/sequencer/sequencer.d.ts.map +1 -1
- package/dist/sequencer/sequencer.js +3 -4
- package/dist/sequencer/sequencer.js.map +1 -1
- package/dist/set/service.d.ts +2 -2
- package/dist/set/service.d.ts.map +1 -1
- package/dist/set/service.js.map +1 -1
- package/dist/setting/service.d.ts +3 -3
- package/dist/setting/service.d.ts.map +1 -1
- package/dist/setting/service.js.map +1 -1
- package/dist/setting/validators.d.ts.map +1 -1
- package/dist/setting/validators.js +1 -1
- package/dist/setting/validators.js.map +1 -1
- package/dist/tag-service/embed-tagger.d.ts.map +1 -1
- package/dist/tag-service/embed-tagger.js +1 -1
- package/dist/tag-service/embed-tagger.js.map +1 -1
- package/dist/tag-service/index.d.ts.map +1 -1
- package/dist/tag-service/index.js +1 -1
- package/dist/tag-service/index.js.map +1 -1
- package/dist/tag-service/language-tagger.d.ts.map +1 -1
- package/dist/tag-service/language-tagger.js +1 -1
- package/dist/tag-service/language-tagger.js.map +1 -1
- package/dist/team/index.d.ts +3 -3
- package/dist/team/index.d.ts.map +1 -1
- package/dist/team/index.js +2 -2
- package/dist/team/index.js.map +1 -1
- package/dist/util.d.ts +1 -1
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +1 -1
- package/dist/util.js.map +1 -1
- package/package.json +14 -11
- package/src/api/chat/getActorMetadata.ts +2 -2
- package/src/api/chat/getMessageContext.ts +2 -2
- package/src/api/chat/index.ts +1 -1
- package/src/api/communication/createTemplate.ts +2 -2
- package/src/api/communication/deleteTemplate.ts +1 -1
- package/src/api/communication/listTemplates.ts +1 -1
- package/src/api/communication/updateTemplate.ts +2 -2
- package/src/api/health.ts +4 -4
- package/src/api/index.ts +21 -21
- package/src/api/label/fetchLabels.ts +1 -1
- package/src/api/label/queryLabels.ts +3 -3
- package/src/api/label/subscribeLabels.ts +3 -3
- package/src/api/moderation/emitEvent.ts +7 -6
- package/src/api/moderation/getEvent.ts +1 -1
- package/src/api/moderation/getRecord.ts +2 -2
- package/src/api/moderation/getRecords.ts +2 -2
- package/src/api/moderation/getRepo.ts +1 -1
- package/src/api/moderation/getRepos.ts +1 -1
- package/src/api/moderation/queryEvents.ts +1 -1
- package/src/api/moderation/queryStatuses.ts +1 -1
- package/src/api/moderation/searchRepos.ts +2 -2
- package/src/api/proxied.ts +1 -1
- package/src/api/report/createReport.ts +5 -5
- package/src/api/server/getConfig.ts +1 -1
- package/src/api/set/addValues.ts +1 -1
- package/src/api/set/deleteSet.ts +1 -1
- package/src/api/set/deleteValues.ts +1 -1
- package/src/api/set/getValues.ts +1 -1
- package/src/api/set/querySets.ts +1 -1
- package/src/api/set/upsertSet.ts +1 -1
- package/src/api/setting/listOptions.ts +1 -1
- package/src/api/setting/removeOptions.ts +2 -2
- package/src/api/setting/upsertOption.ts +5 -5
- package/src/api/team/addMember.ts +1 -1
- package/src/api/team/deleteMember.ts +1 -1
- package/src/api/team/listMembers.ts +1 -1
- package/src/api/team/updateMember.ts +1 -1
- package/src/api/util.ts +14 -11
- package/src/api/well-known.ts +4 -4
- package/src/background.ts +0 -2
- package/src/communication-service/template.ts +1 -1
- package/src/config/config.ts +1 -1
- package/src/config/secrets.ts +1 -1
- package/src/context.ts +13 -14
- package/src/daemon/blob-diverter.ts +7 -8
- package/src/daemon/context.ts +6 -8
- package/src/daemon/event-pusher.ts +6 -6
- package/src/daemon/event-reverser.ts +1 -1
- package/src/daemon/index.ts +1 -1
- package/src/daemon/materialized-view-refresher.ts +1 -1
- package/src/db/index.ts +8 -8
- package/src/db/migrations/20241220T144630860Z-stats-materialized-views.ts +1 -3
- package/src/db/pagination.ts +1 -1
- package/src/db/schema/index.ts +11 -12
- package/src/db/schema/moderation_subject_status.ts +1 -1
- package/src/db/types.ts +1 -1
- package/src/error.ts +1 -1
- package/src/index.ts +11 -11
- package/src/lexicon/lexicons.ts +42 -0
- package/src/lexicon/types/app/bsky/actor/defs.ts +36 -0
- package/src/lexicon/types/app/bsky/feed/postgate.ts +1 -0
- package/src/lexicon/types/app/bsky/feed/threadgate.ts +1 -0
- package/src/lexicon/types/tools/ozone/moderation/defs.ts +2 -0
- package/src/logger.ts +1 -1
- package/src/mod-service/index.ts +39 -33
- package/src/mod-service/status.ts +3 -1
- package/src/mod-service/subject.ts +4 -4
- package/src/mod-service/types.ts +2 -2
- package/src/mod-service/views.ts +18 -18
- package/src/sequencer/outbox.ts +1 -3
- package/src/sequencer/sequencer.ts +5 -7
- package/src/set/service.ts +2 -2
- package/src/setting/service.ts +5 -5
- package/src/setting/validators.ts +1 -1
- package/src/tag-service/embed-tagger.ts +3 -3
- package/src/tag-service/index.ts +3 -3
- package/src/tag-service/language-tagger.ts +1 -2
- package/src/team/index.ts +6 -6
- package/src/util.ts +2 -2
- package/tests/3p-labeler.test.ts +5 -5
- package/tests/__snapshots__/get-record.test.ts.snap +2 -2
- package/tests/__snapshots__/get-records.test.ts.snap +1 -1
- package/tests/__snapshots__/get-repo.test.ts.snap +1 -1
- package/tests/__snapshots__/get-repos.test.ts.snap +1 -1
- package/tests/__snapshots__/moderation-events.test.ts.snap +1 -1
- package/tests/__snapshots__/moderation-statuses.test.ts.snap +6 -6
- package/tests/_util.ts +4 -4
- package/tests/ack-all-subjects-of-account.test.ts +4 -4
- package/tests/blob-divert.test.ts +1 -1
- package/tests/communication-templates.test.ts +1 -1
- package/tests/content-tagger.test.ts +1 -1
- package/tests/get-config.test.ts +1 -1
- package/tests/get-lists.test.ts +4 -4
- package/tests/get-profiles.test.ts +2 -3
- package/tests/get-record.test.ts +4 -4
- package/tests/get-records.test.ts +4 -4
- package/tests/get-repo.test.ts +3 -3
- package/tests/get-repos.test.ts +3 -3
- package/tests/get-starter-pack.test.ts +5 -5
- package/tests/moderation-appeals.test.ts +6 -6
- package/tests/moderation-events.test.ts +4 -4
- package/tests/moderation-status-tags.test.ts +2 -2
- package/tests/moderation-statuses.test.ts +8 -8
- package/tests/moderation.test.ts +39 -13
- package/tests/protected-tags.test.ts +3 -3
- package/tests/query-labels.test.ts +3 -3
- package/tests/record-and-account-events.test.ts +8 -7
- package/tests/repo-search.test.ts +2 -2
- package/tests/report-muting.test.ts +6 -6
- package/tests/sequencer.test.ts +3 -3
- package/tests/server.test.ts +1 -1
- package/tests/sets.test.ts +2 -2
- package/tests/settings.test.ts +2 -2
- package/tests/takedown.test.ts +3 -12
- package/tests/team.test.ts +1 -1
package/src/mod-service/views.ts
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
1
|
import { sql } from 'kysely'
|
|
2
|
-
import {
|
|
3
|
-
import { AtpAgent, AppBskyFeedDefs } from '@atproto/api'
|
|
2
|
+
import { AppBskyFeedDefs, AtpAgent } from '@atproto/api'
|
|
4
3
|
import { dedupeStrs } from '@atproto/common'
|
|
5
|
-
import { BlobRef } from '@atproto/lexicon'
|
|
6
4
|
import { Keypair } from '@atproto/crypto'
|
|
5
|
+
import { BlobRef } from '@atproto/lexicon'
|
|
6
|
+
import { AtUri, INVALID_HANDLE, normalizeDatetimeAlways } from '@atproto/syntax'
|
|
7
7
|
import { Database } from '../db'
|
|
8
|
+
import { LabelRow } from '../db/schema/label'
|
|
9
|
+
import { ids } from '../lexicon/lexicons'
|
|
10
|
+
import { AccountView } from '../lexicon/types/com/atproto/admin/defs'
|
|
11
|
+
import { Label, isSelfLabels } from '../lexicon/types/com/atproto/label/defs'
|
|
12
|
+
import { OutputSchema as ReportOutput } from '../lexicon/types/com/atproto/moderation/createReport'
|
|
13
|
+
import { REASONOTHER } from '../lexicon/types/com/atproto/moderation/defs'
|
|
8
14
|
import {
|
|
15
|
+
BlobView,
|
|
9
16
|
ModEventView,
|
|
10
|
-
|
|
17
|
+
ModEventViewDetail,
|
|
11
18
|
RecordView,
|
|
12
19
|
RecordViewDetail,
|
|
13
|
-
|
|
20
|
+
RepoView,
|
|
14
21
|
SubjectStatusView,
|
|
15
|
-
ModEventViewDetail,
|
|
16
22
|
} from '../lexicon/types/tools/ozone/moderation/defs'
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
23
|
+
import { dbLogger, httpLogger } from '../logger'
|
|
24
|
+
import { ParsedLabelers } from '../util'
|
|
25
|
+
import { moderationSubjectStatusQueryBuilder } from './status'
|
|
26
|
+
import { subjectFromEventRow, subjectFromStatusRow } from './subject'
|
|
20
27
|
import {
|
|
21
28
|
ModerationEventRowWithHandle,
|
|
22
29
|
ModerationSubjectStatusRowWithHandle,
|
|
23
30
|
} from './types'
|
|
24
|
-
import { REASONOTHER } from '../lexicon/types/com/atproto/moderation/defs'
|
|
25
|
-
import { subjectFromEventRow, subjectFromStatusRow } from './subject'
|
|
26
31
|
import { formatLabel, signLabel } from './util'
|
|
27
|
-
import { LabelRow } from '../db/schema/label'
|
|
28
|
-
import { dbLogger } from '../logger'
|
|
29
|
-
import { httpLogger } from '../logger'
|
|
30
|
-
import { ParsedLabelers } from '../util'
|
|
31
|
-
import { ids } from '../lexicon/lexicons'
|
|
32
|
-
import { moderationSubjectStatusQueryBuilder } from './status'
|
|
33
32
|
|
|
34
33
|
export type AuthHeaders = {
|
|
35
34
|
headers: {
|
|
@@ -113,6 +112,7 @@ export class ModerationViews {
|
|
|
113
112
|
[
|
|
114
113
|
'tools.ozone.moderation.defs#modEventMuteReporter',
|
|
115
114
|
'tools.ozone.moderation.defs#modEventTakedown',
|
|
115
|
+
'tools.ozone.moderation.defs#modEventLabel',
|
|
116
116
|
'tools.ozone.moderation.defs#modEventMute',
|
|
117
117
|
].includes(event.action)
|
|
118
118
|
) {
|
|
@@ -628,7 +628,7 @@ export class ModerationViews {
|
|
|
628
628
|
|
|
629
629
|
recordsStats: {
|
|
630
630
|
// Explicitly typing to allow for easy manipulation (e.g. to strip from tests snapshots)
|
|
631
|
-
$type: 'tools.ozone.moderation.defs#
|
|
631
|
+
$type: 'tools.ozone.moderation.defs#recordsStats',
|
|
632
632
|
|
|
633
633
|
// account_record_events_stats
|
|
634
634
|
totalReports: status.totalReports ?? undefined,
|
package/src/sequencer/outbox.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AsyncBuffer, AsyncBufferFullError } from '@atproto/common'
|
|
2
2
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
|
3
|
-
import {
|
|
3
|
+
import { LabelsEvt, Sequencer } from './sequencer'
|
|
4
4
|
|
|
5
5
|
export type OutboxOpts = {
|
|
6
6
|
maxBufferSize: number
|
|
@@ -121,5 +121,3 @@ export class Outbox {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
export default Outbox
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import EventEmitter from 'events'
|
|
2
|
-
import TypedEmitter from 'typed-emitter'
|
|
1
|
+
import EventEmitter from 'node:events'
|
|
3
2
|
import { Selectable } from 'kysely'
|
|
4
3
|
import { PoolClient } from 'pg'
|
|
5
|
-
import
|
|
6
|
-
import Database from '../db'
|
|
4
|
+
import TypedEmitter from 'typed-emitter'
|
|
5
|
+
import { Database } from '../db'
|
|
6
|
+
import { Label as LabelTable, LabelChannel } from '../db/schema/label'
|
|
7
7
|
import { Labels as LabelsEvt } from '../lexicon/types/com/atproto/label/subscribeLabels'
|
|
8
|
-
import {
|
|
8
|
+
import { seqLogger as log } from '../logger'
|
|
9
9
|
import { ModerationService } from '../mod-service'
|
|
10
10
|
|
|
11
11
|
export type { Labels as LabelsEvt } from '../lexicon/types/com/atproto/label/subscribeLabels'
|
|
@@ -143,5 +143,3 @@ type SequencerEvents = {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
export type SequencerEmitter = TypedEmitter<SequencerEvents>
|
|
146
|
-
|
|
147
|
-
export default Sequencer
|
package/src/set/service.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import Database from '../db'
|
|
2
1
|
import { Selectable } from 'kysely'
|
|
2
|
+
import { Database } from '../db'
|
|
3
|
+
import { TimeIdKeyset, paginate } from '../db/pagination'
|
|
3
4
|
import { SetDetail } from '../db/schema/ozone_set'
|
|
4
5
|
import { SetView } from '../lexicon/types/tools/ozone/set/defs'
|
|
5
|
-
import { paginate, TimeIdKeyset } from '../db/pagination'
|
|
6
6
|
|
|
7
7
|
export type SetServiceCreator = (db: Database) => SetService
|
|
8
8
|
|
package/src/setting/service.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Database from '../db'
|
|
2
|
-
import { Selectable } from 'kysely'
|
|
3
|
-
import { Option } from '../lexicon/types/tools/ozone/setting/defs'
|
|
4
|
-
import { Setting, SettingScope } from '../db/schema/setting'
|
|
5
|
-
import { Member } from '../db/schema/member'
|
|
6
1
|
import assert from 'node:assert'
|
|
2
|
+
import { Selectable } from 'kysely'
|
|
7
3
|
import { InvalidRequestError } from '@atproto/xrpc-server'
|
|
4
|
+
import { Database } from '../db'
|
|
5
|
+
import { Member } from '../db/schema/member'
|
|
6
|
+
import { Setting, SettingScope } from '../db/schema/setting'
|
|
7
|
+
import { Option } from '../lexicon/types/tools/ozone/setting/defs'
|
|
8
8
|
|
|
9
9
|
export type SettingServiceCreator = (db: Database) => SettingService
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Selectable } from 'kysely'
|
|
2
|
+
import { InvalidRequestError } from '@atproto/xrpc-server'
|
|
2
3
|
import { Setting } from '../db/schema/setting'
|
|
3
4
|
import { PolicyListSettingKey, ProtectedTagSettingKey } from './constants'
|
|
4
|
-
import { InvalidRequestError } from '@atproto/xrpc-server'
|
|
5
5
|
|
|
6
6
|
export const settingValidators = new Map<
|
|
7
7
|
string,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AppBskyEmbedExternal,
|
|
2
3
|
AppBskyEmbedImages,
|
|
3
4
|
AppBskyEmbedRecordWithMedia,
|
|
4
|
-
AppBskyFeedPost,
|
|
5
5
|
AppBskyEmbedVideo,
|
|
6
|
-
|
|
6
|
+
AppBskyFeedPost,
|
|
7
7
|
} from '@atproto/api'
|
|
8
|
+
import { ids } from '../lexicon/lexicons'
|
|
8
9
|
import { langLogger as log } from '../logger'
|
|
9
10
|
import { ContentTagger } from './content-tagger'
|
|
10
|
-
import { ids } from '../lexicon/lexicons'
|
|
11
11
|
|
|
12
12
|
export class EmbedTagger extends ContentTagger {
|
|
13
13
|
tagPrefix = 'embed:'
|
package/src/tag-service/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { langLogger as log } from '../logger'
|
|
1
2
|
import { ModerationService } from '../mod-service'
|
|
2
3
|
import { ModSubject } from '../mod-service/subject'
|
|
3
|
-
import {
|
|
4
|
+
import { ModerationSubjectStatusRow } from '../mod-service/types'
|
|
4
5
|
import { ContentTagger } from './content-tagger'
|
|
5
|
-
import { LanguageTagger } from './language-tagger'
|
|
6
6
|
import { EmbedTagger } from './embed-tagger'
|
|
7
|
-
import {
|
|
7
|
+
import { LanguageTagger } from './language-tagger'
|
|
8
8
|
|
|
9
9
|
export class TagService {
|
|
10
10
|
private taggers: ContentTagger[]
|
|
@@ -4,10 +4,9 @@ import {
|
|
|
4
4
|
AppBskyFeedPost,
|
|
5
5
|
AppBskyGraphList,
|
|
6
6
|
} from '@atproto/api'
|
|
7
|
-
|
|
8
7
|
import { langLogger as log } from '../logger'
|
|
9
|
-
import { code3ToCode2 } from './language-data'
|
|
10
8
|
import { ContentTagger } from './content-tagger'
|
|
9
|
+
import { code3ToCode2 } from './language-data'
|
|
11
10
|
|
|
12
11
|
export class LanguageTagger extends ContentTagger {
|
|
13
12
|
tagPrefix = 'lang:'
|
package/src/team/index.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import Database from '../db'
|
|
2
1
|
import { Selectable } from 'kysely'
|
|
2
|
+
import { chunkArray } from '@atproto/common'
|
|
3
|
+
import { InvalidRequestError } from '@atproto/xrpc-server'
|
|
4
|
+
import { AppContext } from '../context'
|
|
5
|
+
import { Database } from '../db'
|
|
3
6
|
import { Member } from '../db/schema/member'
|
|
4
|
-
import {
|
|
7
|
+
import { ids } from '../lexicon/lexicons'
|
|
5
8
|
import { ProfileViewDetailed } from '../lexicon/types/app/bsky/actor/defs'
|
|
6
|
-
import {
|
|
7
|
-
import { chunkArray } from '@atproto/common'
|
|
8
|
-
import AppContext from '../context'
|
|
9
|
+
import { Member as TeamMember } from '../lexicon/types/tools/ozone/team/defs'
|
|
9
10
|
import { httpLogger } from '../logger'
|
|
10
|
-
import { ids } from '../lexicon/lexicons'
|
|
11
11
|
|
|
12
12
|
export type TeamServiceCreator = (db: Database) => TeamService
|
|
13
13
|
|
package/src/util.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
|
+
import { parseList } from 'structured-headers'
|
|
2
3
|
import { createRetryable } from '@atproto/common'
|
|
3
4
|
import { ResponseType, XRPCError } from '@atproto/xrpc'
|
|
4
|
-
import {
|
|
5
|
-
import Database from './db'
|
|
5
|
+
import { Database } from './db'
|
|
6
6
|
|
|
7
7
|
export const getSigningKeyId = async (
|
|
8
8
|
db: Database,
|
package/tests/3p-labeler.test.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { AtpAgent } from '@atproto/api'
|
|
2
|
+
import { Secp256k1Keypair } from '@atproto/crypto'
|
|
1
3
|
import {
|
|
4
|
+
ModeratorClient,
|
|
2
5
|
SeedClient,
|
|
3
6
|
TestNetwork,
|
|
4
|
-
basicSeed,
|
|
5
7
|
TestOzone,
|
|
6
|
-
|
|
8
|
+
basicSeed,
|
|
7
9
|
createOzoneDid,
|
|
8
10
|
} from '@atproto/dev-env'
|
|
9
|
-
import { AtpAgent } from '@atproto/api'
|
|
10
|
-
import { Secp256k1Keypair } from '@atproto/crypto'
|
|
11
|
-
import { LABELER_HEADER_NAME } from '../src/util'
|
|
12
11
|
import { ids } from '../src/lexicon/lexicons'
|
|
12
|
+
import { LABELER_HEADER_NAME } from '../src/util'
|
|
13
13
|
|
|
14
14
|
describe('labels from 3p labelers', () => {
|
|
15
15
|
let network: TestNetwork
|
|
@@ -41,7 +41,7 @@ Object {
|
|
|
41
41
|
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
42
42
|
"lastReviewedBy": "user(1)",
|
|
43
43
|
"recordsStats": Object {
|
|
44
|
-
"$type": "tools.ozone.moderation.defs#
|
|
44
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
45
45
|
"appealedCount": 0,
|
|
46
46
|
"escalatedCount": 0,
|
|
47
47
|
"pendingCount": 0,
|
|
@@ -161,7 +161,7 @@ Object {
|
|
|
161
161
|
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
162
162
|
"lastReviewedBy": "user(1)",
|
|
163
163
|
"recordsStats": Object {
|
|
164
|
-
"$type": "tools.ozone.moderation.defs#
|
|
164
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
165
165
|
"appealedCount": 0,
|
|
166
166
|
"escalatedCount": 0,
|
|
167
167
|
"pendingCount": 0,
|
|
@@ -44,7 +44,7 @@ Object {
|
|
|
44
44
|
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
45
45
|
"lastReviewedBy": "user(1)",
|
|
46
46
|
"recordsStats": Object {
|
|
47
|
-
"$type": "tools.ozone.moderation.defs#
|
|
47
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
48
48
|
"appealedCount": 0,
|
|
49
49
|
"escalatedCount": 0,
|
|
50
50
|
"pendingCount": 0,
|
|
@@ -40,7 +40,7 @@ Object {
|
|
|
40
40
|
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
41
41
|
"lastReviewedBy": "user(1)",
|
|
42
42
|
"recordsStats": Object {
|
|
43
|
-
"$type": "tools.ozone.moderation.defs#
|
|
43
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
44
44
|
},
|
|
45
45
|
"reviewState": "tools.ozone.moderation.defs#reviewClosed",
|
|
46
46
|
"subject": Object {
|
|
@@ -43,7 +43,7 @@ Object {
|
|
|
43
43
|
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
44
44
|
"lastReviewedBy": "user(1)",
|
|
45
45
|
"recordsStats": Object {
|
|
46
|
-
"$type": "tools.ozone.moderation.defs#
|
|
46
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
47
47
|
},
|
|
48
48
|
"reviewState": "tools.ozone.moderation.defs#reviewClosed",
|
|
49
49
|
"subject": Object {
|
|
@@ -36,7 +36,7 @@ Object {
|
|
|
36
36
|
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
37
37
|
"lastReviewedBy": "user(1)",
|
|
38
38
|
"recordsStats": Object {
|
|
39
|
-
"$type": "tools.ozone.moderation.defs#
|
|
39
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
40
40
|
"appealedCount": 0,
|
|
41
41
|
"escalatedCount": 0,
|
|
42
42
|
"pendingCount": 2,
|
|
@@ -19,7 +19,7 @@ Array [
|
|
|
19
19
|
"id": 7,
|
|
20
20
|
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
|
21
21
|
"recordsStats": Object {
|
|
22
|
-
"$type": "tools.ozone.moderation.defs#
|
|
22
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
23
23
|
"appealedCount": 0,
|
|
24
24
|
"escalatedCount": 0,
|
|
25
25
|
"pendingCount": 1,
|
|
@@ -62,7 +62,7 @@ Array [
|
|
|
62
62
|
"id": 5,
|
|
63
63
|
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
|
64
64
|
"recordsStats": Object {
|
|
65
|
-
"$type": "tools.ozone.moderation.defs#
|
|
65
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
66
66
|
"appealedCount": 0,
|
|
67
67
|
"escalatedCount": 0,
|
|
68
68
|
"pendingCount": 1,
|
|
@@ -109,7 +109,7 @@ Array [
|
|
|
109
109
|
"id": 7,
|
|
110
110
|
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
|
111
111
|
"recordsStats": Object {
|
|
112
|
-
"$type": "tools.ozone.moderation.defs#
|
|
112
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
113
113
|
"appealedCount": 0,
|
|
114
114
|
"escalatedCount": 0,
|
|
115
115
|
"pendingCount": 1,
|
|
@@ -152,7 +152,7 @@ Array [
|
|
|
152
152
|
"id": 5,
|
|
153
153
|
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
|
154
154
|
"recordsStats": Object {
|
|
155
|
-
"$type": "tools.ozone.moderation.defs#
|
|
155
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
156
156
|
"appealedCount": 0,
|
|
157
157
|
"escalatedCount": 0,
|
|
158
158
|
"pendingCount": 1,
|
|
@@ -194,7 +194,7 @@ Array [
|
|
|
194
194
|
"id": 3,
|
|
195
195
|
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
|
196
196
|
"recordsStats": Object {
|
|
197
|
-
"$type": "tools.ozone.moderation.defs#
|
|
197
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
198
198
|
"appealedCount": 0,
|
|
199
199
|
"escalatedCount": 0,
|
|
200
200
|
"pendingCount": 1,
|
|
@@ -236,7 +236,7 @@ Array [
|
|
|
236
236
|
"id": 1,
|
|
237
237
|
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
|
238
238
|
"recordsStats": Object {
|
|
239
|
-
"$type": "tools.ozone.moderation.defs#
|
|
239
|
+
"$type": "tools.ozone.moderation.defs#recordsStats",
|
|
240
240
|
"appealedCount": 0,
|
|
241
241
|
"escalatedCount": 0,
|
|
242
242
|
"pendingCount": 1,
|
package/tests/_util.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { type Express } from 'express'
|
|
2
1
|
import { Server } from 'node:http'
|
|
3
2
|
import { AddressInfo } from 'node:net'
|
|
4
|
-
import {
|
|
5
|
-
import { lexToJson } from '@atproto/lexicon'
|
|
3
|
+
import { type Express } from 'express'
|
|
6
4
|
import { CID } from 'multiformats/cid'
|
|
5
|
+
import { lexToJson } from '@atproto/lexicon'
|
|
6
|
+
import { AtUri } from '@atproto/syntax'
|
|
7
|
+
import { isViewRecord } from '../src/lexicon/types/app/bsky/embed/record'
|
|
7
8
|
import {
|
|
8
9
|
FeedViewPost,
|
|
9
10
|
PostView,
|
|
10
11
|
isPostView,
|
|
11
12
|
isThreadViewPost,
|
|
12
13
|
} from '../src/lexicon/types/app/bsky/feed/defs'
|
|
13
|
-
import { isViewRecord } from '../src/lexicon/types/app/bsky/embed/record'
|
|
14
14
|
|
|
15
15
|
// Swap out identifiers and dates with stable
|
|
16
16
|
// values for the purpose of snapshot testing
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { ComAtprotoRepoStrongRef } from '@atproto/api'
|
|
1
2
|
import {
|
|
2
|
-
|
|
3
|
+
ModeratorClient,
|
|
3
4
|
RecordRef,
|
|
4
5
|
SeedClient,
|
|
6
|
+
TestNetwork,
|
|
5
7
|
basicSeed,
|
|
6
|
-
ModeratorClient,
|
|
7
8
|
} from '@atproto/dev-env'
|
|
9
|
+
import { isRepoRef } from '../src/lexicon/types/com/atproto/admin/defs'
|
|
8
10
|
import {
|
|
9
11
|
REASONAPPEAL,
|
|
10
12
|
REASONOTHER,
|
|
@@ -16,8 +18,6 @@ import {
|
|
|
16
18
|
REVIEWOPEN,
|
|
17
19
|
SubjectStatusView,
|
|
18
20
|
} from '../src/lexicon/types/tools/ozone/moderation/defs'
|
|
19
|
-
import { isRepoRef } from '../src/lexicon/types/com/atproto/admin/defs'
|
|
20
|
-
import { ComAtprotoRepoStrongRef } from '@atproto/api'
|
|
21
21
|
|
|
22
22
|
describe('acknowledge all subjects of account', () => {
|
|
23
23
|
let network: TestNetwork
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import assert from 'node:assert'
|
|
1
2
|
import {
|
|
2
3
|
ModeratorClient,
|
|
3
4
|
SeedClient,
|
|
@@ -5,7 +6,6 @@ import {
|
|
|
5
6
|
basicSeed,
|
|
6
7
|
} from '@atproto/dev-env'
|
|
7
8
|
import { ResponseType, XRPCError } from '@atproto/xrpc'
|
|
8
|
-
import assert from 'node:assert'
|
|
9
9
|
import { forSnapshot } from './_util'
|
|
10
10
|
|
|
11
11
|
describe('blob divert', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TestNetwork, SeedClient, basicSeed } from '@atproto/dev-env'
|
|
2
1
|
import { AtpAgent } from '@atproto/api'
|
|
2
|
+
import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
|
|
3
3
|
import { ids } from '../src/lexicon/lexicons'
|
|
4
4
|
|
|
5
5
|
describe('communication-templates', () => {
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
TestNetwork,
|
|
5
5
|
basicSeed,
|
|
6
6
|
} from '@atproto/dev-env'
|
|
7
|
-
import { REASONSPAM } from '../src/lexicon/types/com/atproto/moderation/defs'
|
|
8
7
|
import { REASONMISLEADING } from '../dist/lexicon/types/com/atproto/moderation/defs'
|
|
8
|
+
import { REASONSPAM } from '../src/lexicon/types/com/atproto/moderation/defs'
|
|
9
9
|
|
|
10
10
|
describe('moderation subject content tagging', () => {
|
|
11
11
|
let network: TestNetwork
|
package/tests/get-config.test.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TestNetwork, SeedClient, basicSeed } from '@atproto/dev-env'
|
|
2
1
|
import { AtpAgent } from '@atproto/api'
|
|
2
|
+
import { SeedClient, TestNetwork, basicSeed } from '@atproto/dev-env'
|
|
3
3
|
import { TOOLS_OZONE_TEAM } from '../src/lexicon'
|
|
4
4
|
import { ids } from '../src/lexicon/lexicons'
|
|
5
5
|
|
package/tests/get-lists.test.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { AtpAgent, BSKY_LABELER_DID } from '@atproto/api'
|
|
1
2
|
import {
|
|
3
|
+
ModeratorClient,
|
|
4
|
+
RecordRef,
|
|
2
5
|
SeedClient,
|
|
3
6
|
TestNetwork,
|
|
4
7
|
TestOzone,
|
|
5
8
|
basicSeed,
|
|
6
|
-
ModeratorClient,
|
|
7
|
-
RecordRef,
|
|
8
9
|
} from '@atproto/dev-env'
|
|
9
|
-
import { AtpAgent, BSKY_LABELER_DID } from '@atproto/api'
|
|
10
|
-
import { TAKEDOWN_LABEL } from '../src/mod-service'
|
|
11
10
|
import { ids } from '../src/lexicon/lexicons'
|
|
11
|
+
import { TAKEDOWN_LABEL } from '../src/mod-service'
|
|
12
12
|
|
|
13
13
|
describe('admin get lists', () => {
|
|
14
14
|
let network: TestNetwork
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
ModeratorClient,
|
|
3
3
|
SeedClient,
|
|
4
|
+
TestNetwork,
|
|
4
5
|
basicSeed,
|
|
5
|
-
ModeratorClient,
|
|
6
6
|
} from '@atproto/dev-env'
|
|
7
|
-
import { ids } from '../src/lexicon/lexicons'
|
|
8
7
|
|
|
9
8
|
describe('get profiles through ozone', () => {
|
|
10
9
|
let network: TestNetwork
|
package/tests/get-record.test.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
+
import { AtpAgent } from '@atproto/api'
|
|
1
2
|
import {
|
|
3
|
+
ModeratorClient,
|
|
2
4
|
SeedClient,
|
|
3
5
|
TestNetwork,
|
|
4
|
-
basicSeed,
|
|
5
6
|
TestOzone,
|
|
6
|
-
|
|
7
|
+
basicSeed,
|
|
7
8
|
} from '@atproto/dev-env'
|
|
8
|
-
import { AtpAgent } from '@atproto/api'
|
|
9
9
|
import { AtUri } from '@atproto/syntax'
|
|
10
|
+
import { ids } from '../src/lexicon/lexicons'
|
|
10
11
|
import {
|
|
11
12
|
REASONOTHER,
|
|
12
13
|
REASONSPAM,
|
|
13
14
|
} from '../src/lexicon/types/com/atproto/moderation/defs'
|
|
14
15
|
import { forSnapshot } from './_util'
|
|
15
|
-
import { ids } from '../src/lexicon/lexicons'
|
|
16
16
|
|
|
17
17
|
describe('admin get record view', () => {
|
|
18
18
|
let network: TestNetwork
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { AtpAgent } from '@atproto/api'
|
|
1
2
|
import {
|
|
3
|
+
ModeratorClient,
|
|
2
4
|
SeedClient,
|
|
3
5
|
TestNetwork,
|
|
4
|
-
basicSeed,
|
|
5
6
|
TestOzone,
|
|
6
|
-
|
|
7
|
+
basicSeed,
|
|
7
8
|
} from '@atproto/dev-env'
|
|
8
|
-
import {
|
|
9
|
+
import { ids } from '../src/lexicon/lexicons'
|
|
9
10
|
import {
|
|
10
11
|
REASONOTHER,
|
|
11
12
|
REASONSPAM,
|
|
12
13
|
} from '../src/lexicon/types/com/atproto/moderation/defs'
|
|
13
14
|
import { forSnapshot } from './_util'
|
|
14
|
-
import { ids } from '../src/lexicon/lexicons'
|
|
15
15
|
|
|
16
16
|
describe('admin get records view', () => {
|
|
17
17
|
let network: TestNetwork
|
package/tests/get-repo.test.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { AtpAgent } from '@atproto/api'
|
|
1
2
|
import {
|
|
3
|
+
ModeratorClient,
|
|
2
4
|
SeedClient,
|
|
3
5
|
TestNetwork,
|
|
4
6
|
TestOzone,
|
|
5
7
|
basicSeed,
|
|
6
|
-
ModeratorClient,
|
|
7
8
|
} from '@atproto/dev-env'
|
|
8
|
-
import {
|
|
9
|
+
import { ids } from '../src/lexicon/lexicons'
|
|
9
10
|
import {
|
|
10
11
|
REASONOTHER,
|
|
11
12
|
REASONSPAM,
|
|
12
13
|
} from '../src/lexicon/types/com/atproto/moderation/defs'
|
|
13
14
|
import { forSnapshot } from './_util'
|
|
14
|
-
import { ids } from '../src/lexicon/lexicons'
|
|
15
15
|
|
|
16
16
|
describe('admin get repo view', () => {
|
|
17
17
|
let network: TestNetwork
|
package/tests/get-repos.test.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { AtpAgent } from '@atproto/api'
|
|
1
2
|
import {
|
|
3
|
+
ModeratorClient,
|
|
2
4
|
SeedClient,
|
|
3
5
|
TestNetwork,
|
|
4
6
|
TestOzone,
|
|
5
7
|
basicSeed,
|
|
6
|
-
ModeratorClient,
|
|
7
8
|
} from '@atproto/dev-env'
|
|
8
|
-
import {
|
|
9
|
+
import { ids } from '../src/lexicon/lexicons'
|
|
9
10
|
import {
|
|
10
11
|
REASONOTHER,
|
|
11
12
|
REASONSPAM,
|
|
12
13
|
} from '../src/lexicon/types/com/atproto/moderation/defs'
|
|
13
14
|
import { forSnapshot } from './_util'
|
|
14
|
-
import { ids } from '../src/lexicon/lexicons'
|
|
15
15
|
|
|
16
16
|
describe('admin get multiple repos', () => {
|
|
17
17
|
let network: TestNetwork
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { AtpAgent } from '@atproto/api'
|
|
1
2
|
import {
|
|
3
|
+
RecordRef,
|
|
2
4
|
SeedClient,
|
|
3
5
|
TestNetwork,
|
|
4
|
-
basicSeed,
|
|
5
6
|
TestOzone,
|
|
6
|
-
|
|
7
|
+
basicSeed,
|
|
7
8
|
} from '@atproto/dev-env'
|
|
8
|
-
import { AtpAgent } from '@atproto/api'
|
|
9
|
-
import { forSnapshot } from './_util'
|
|
10
|
-
import { TAKEDOWN_LABEL } from '../src/mod-service'
|
|
11
9
|
import { ids } from '../src/lexicon/lexicons'
|
|
10
|
+
import { TAKEDOWN_LABEL } from '../src/mod-service'
|
|
11
|
+
import { forSnapshot } from './_util'
|
|
12
12
|
|
|
13
13
|
describe('admin get starter pack view', () => {
|
|
14
14
|
let network: TestNetwork
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TestNetwork,
|
|
3
|
-
SeedClient,
|
|
4
|
-
basicSeed,
|
|
5
|
-
ModeratorClient,
|
|
6
|
-
} from '@atproto/dev-env'
|
|
7
1
|
import {
|
|
8
2
|
ComAtprotoModerationDefs,
|
|
9
3
|
ToolsOzoneModerationDefs,
|
|
10
4
|
} from '@atproto/api'
|
|
5
|
+
import {
|
|
6
|
+
ModeratorClient,
|
|
7
|
+
SeedClient,
|
|
8
|
+
TestNetwork,
|
|
9
|
+
basicSeed,
|
|
10
|
+
} from '@atproto/dev-env'
|
|
11
11
|
import {
|
|
12
12
|
REASONMISLEADING,
|
|
13
13
|
REASONSPAM,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import assert from 'node:assert'
|
|
2
2
|
import EventEmitter, { once } from 'node:events'
|
|
3
|
+
import { ToolsOzoneModerationDefs } from '@atproto/api'
|
|
3
4
|
import {
|
|
4
|
-
|
|
5
|
+
ModeratorClient,
|
|
5
6
|
SeedClient,
|
|
7
|
+
TestNetwork,
|
|
6
8
|
basicSeed,
|
|
7
|
-
ModeratorClient,
|
|
8
9
|
} from '@atproto/dev-env'
|
|
9
|
-
import { ToolsOzoneModerationDefs } from '@atproto/api'
|
|
10
|
-
import { forSnapshot } from './_util'
|
|
11
10
|
import {
|
|
12
11
|
REASONAPPEAL,
|
|
13
12
|
REASONMISLEADING,
|
|
14
13
|
REASONSPAM,
|
|
15
14
|
} from '../src/lexicon/types/com/atproto/moderation/defs'
|
|
15
|
+
import { forSnapshot } from './_util'
|
|
16
16
|
|
|
17
17
|
describe('moderation-events', () => {
|
|
18
18
|
let network: TestNetwork
|