@atproto/bsky 0.0.14 → 0.0.16
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 +22 -0
- package/dist/api/app/bsky/feed/searchPosts.d.ts +3 -0
- package/dist/api/com/atproto/moderation/util.d.ts +4 -3
- package/dist/config.d.ts +2 -2
- package/dist/context.d.ts +16 -1
- package/dist/db/index.js +26 -1
- package/dist/db/index.js.map +3 -3
- package/dist/db/migrations/20231003T202833377Z-create-moderation-subject-status.d.ts +3 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/db/pagination.d.ts +2 -1
- package/dist/db/{periodic-moderation-action-reversal.d.ts → periodic-moderation-event-reversal.d.ts} +3 -5
- package/dist/db/tables/moderation.d.ts +24 -34
- package/dist/feed-gen/types.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3332 -2430
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +18 -18
- package/dist/lexicon/lexicons.d.ts +460 -385
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +1 -7
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +116 -48
- package/dist/lexicon/types/com/atproto/admin/{takeModerationAction.d.ts → emitModerationEvent.d.ts} +5 -6
- package/dist/lexicon/types/com/atproto/admin/{getModerationAction.d.ts → getModerationEvent.d.ts} +1 -1
- package/dist/lexicon/types/com/atproto/admin/{getModerationActions.d.ts → queryModerationEvents.d.ts} +5 -1
- package/dist/lexicon/types/com/atproto/admin/{getModerationReports.d.ts → queryModerationStatuses.d.ts} +12 -6
- package/dist/lexicon/types/com/atproto/admin/sendEmail.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/{admin/getModerationReport.d.ts → temp/fetchLabels.d.ts} +7 -3
- package/dist/migrate-moderation-data.d.ts +1 -0
- package/dist/services/actor/views.d.ts +2 -5
- package/dist/services/feed/index.d.ts +1 -0
- package/dist/services/feed/util.d.ts +9 -1
- package/dist/services/feed/views.d.ts +6 -17
- package/dist/services/graph/index.d.ts +5 -29
- package/dist/services/graph/types.d.ts +1 -0
- package/dist/services/moderation/index.d.ts +135 -72
- package/dist/services/moderation/pagination.d.ts +36 -0
- package/dist/services/moderation/status.d.ts +13 -0
- package/dist/services/moderation/types.d.ts +35 -0
- package/dist/services/moderation/views.d.ts +18 -14
- package/dist/util/debug.d.ts +1 -1
- package/package.json +14 -15
- package/src/api/app/bsky/actor/getSuggestions.ts +45 -21
- package/src/api/app/bsky/feed/getActorFeeds.ts +2 -1
- package/src/api/app/bsky/feed/getActorLikes.ts +1 -3
- package/src/api/app/bsky/feed/getAuthorFeed.ts +1 -3
- package/src/api/app/bsky/feed/getFeed.ts +9 -9
- package/src/api/app/bsky/feed/getFeedGenerator.ts +3 -0
- package/src/api/app/bsky/feed/getFeedGenerators.ts +2 -1
- package/src/api/app/bsky/feed/getListFeed.ts +1 -3
- package/src/api/app/bsky/feed/getPostThread.ts +31 -58
- package/src/api/app/bsky/feed/getPosts.ts +21 -18
- package/src/api/app/bsky/feed/getSuggestedFeeds.ts +2 -1
- package/src/api/app/bsky/feed/getTimeline.ts +1 -3
- package/src/api/app/bsky/feed/searchPosts.ts +130 -0
- package/src/api/app/bsky/graph/getList.ts +6 -3
- package/src/api/app/bsky/graph/getListBlocks.ts +3 -2
- package/src/api/app/bsky/graph/getListMutes.ts +2 -1
- package/src/api/app/bsky/graph/getLists.ts +2 -1
- package/src/api/app/bsky/unspecced/getPopularFeedGenerators.ts +3 -1
- package/src/api/blob-resolver.ts +6 -11
- package/src/api/com/atproto/admin/emitModerationEvent.ts +220 -0
- package/src/api/com/atproto/admin/{getModerationActions.ts → getModerationEvent.ts} +5 -11
- package/src/api/com/atproto/admin/getRecord.ts +1 -0
- package/src/api/com/atproto/admin/{getModerationReports.ts → queryModerationEvents.ts} +13 -16
- package/src/api/com/atproto/admin/queryModerationStatuses.ts +55 -0
- package/src/api/com/atproto/admin/util.ts +3 -1
- package/src/api/com/atproto/moderation/createReport.ts +9 -7
- package/src/api/com/atproto/moderation/util.ts +38 -20
- package/src/api/com/atproto/temp/fetchLabels.ts +30 -0
- package/src/api/index.ts +12 -14
- package/src/auth.ts +29 -21
- package/src/auto-moderator/index.ts +26 -19
- package/src/config.ts +6 -6
- package/src/context.ts +15 -9
- package/src/db/migrations/20231003T202833377Z-create-moderation-subject-status.ts +123 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/db/pagination.ts +26 -3
- package/src/db/{periodic-moderation-action-reversal.ts → periodic-moderation-event-reversal.ts} +51 -55
- package/src/db/tables/moderation.ts +35 -52
- package/src/feed-gen/best-of-follows.ts +6 -3
- package/src/feed-gen/bsky-team.ts +1 -1
- package/src/feed-gen/hot-classic.ts +1 -1
- package/src/feed-gen/mutuals.ts +6 -2
- package/src/feed-gen/types.ts +1 -1
- package/src/feed-gen/whats-hot.ts +1 -1
- package/src/feed-gen/with-friends.ts +7 -3
- package/src/index.ts +2 -1
- package/src/lexicon/index.ts +52 -67
- package/src/lexicon/lexicons.ts +674 -579
- package/src/lexicon/types/app/bsky/actor/defs.ts +2 -2
- package/src/lexicon/types/app/bsky/actor/searchActors.ts +2 -2
- package/src/lexicon/types/app/bsky/actor/searchActorsTypeahead.ts +2 -2
- package/src/lexicon/types/app/bsky/feed/defs.ts +1 -18
- package/src/lexicon/types/app/bsky/feed/searchPosts.ts +3 -3
- package/src/lexicon/types/app/bsky/graph/defs.ts +3 -2
- package/src/lexicon/types/app/bsky/unspecced/searchActorsSkeleton.ts +4 -4
- package/src/lexicon/types/app/bsky/unspecced/searchPostsSkeleton.ts +3 -3
- package/src/lexicon/types/com/atproto/admin/defs.ts +278 -84
- package/src/lexicon/types/com/atproto/admin/disableAccountInvites.ts +1 -1
- package/src/lexicon/types/com/atproto/admin/{takeModerationAction.ts → emitModerationEvent.ts} +13 -11
- package/src/lexicon/types/com/atproto/admin/enableAccountInvites.ts +1 -1
- package/src/lexicon/types/com/atproto/admin/{getModerationReport.ts → getModerationEvent.ts} +1 -1
- package/src/lexicon/types/com/atproto/admin/{getModerationReports.ts → queryModerationEvents.ts} +8 -15
- package/src/lexicon/types/com/atproto/admin/queryModerationStatuses.ts +70 -0
- package/src/lexicon/types/com/atproto/admin/sendEmail.ts +1 -0
- package/src/lexicon/types/com/atproto/label/defs.ts +9 -9
- package/src/lexicon/types/com/atproto/label/queryLabels.ts +2 -2
- package/src/lexicon/types/com/atproto/repo/applyWrites.ts +1 -1
- package/src/lexicon/types/com/atproto/repo/createRecord.ts +2 -2
- package/src/lexicon/types/com/atproto/repo/deleteRecord.ts +2 -2
- package/src/lexicon/types/com/atproto/repo/listRecords.ts +1 -1
- package/src/lexicon/types/com/atproto/repo/putRecord.ts +3 -3
- package/src/lexicon/types/com/atproto/sync/listBlobs.ts +1 -1
- package/src/lexicon/types/com/atproto/sync/subscribeRepos.ts +4 -4
- package/src/lexicon/types/com/atproto/{admin/getModerationActions.ts → temp/fetchLabels.ts} +3 -5
- package/src/migrate-moderation-data.ts +414 -0
- package/src/services/actor/views.ts +5 -14
- package/src/services/feed/index.ts +26 -7
- package/src/services/feed/util.ts +47 -19
- package/src/services/feed/views.ts +68 -4
- package/src/services/graph/index.ts +21 -3
- package/src/services/graph/types.ts +1 -0
- package/src/services/indexing/plugins/block.ts +2 -3
- package/src/services/indexing/plugins/feed-generator.ts +2 -3
- package/src/services/indexing/plugins/follow.ts +2 -3
- package/src/services/indexing/plugins/like.ts +2 -3
- package/src/services/indexing/plugins/list-block.ts +2 -3
- package/src/services/indexing/plugins/list-item.ts +2 -3
- package/src/services/indexing/plugins/list.ts +2 -3
- package/src/services/indexing/plugins/post.ts +3 -4
- package/src/services/indexing/plugins/repost.ts +2 -3
- package/src/services/indexing/plugins/thread-gate.ts +2 -3
- package/src/services/label/index.ts +2 -3
- package/src/services/moderation/index.ts +380 -395
- package/src/services/moderation/pagination.ts +96 -0
- package/src/services/moderation/status.ts +244 -0
- package/src/services/moderation/types.ts +49 -0
- package/src/services/moderation/views.ts +278 -329
- package/src/util/debug.ts +2 -2
- package/tests/__snapshots__/feed-generation.test.ts.snap +322 -6
- package/tests/__snapshots__/indexing.test.ts.snap +0 -6
- package/tests/admin/__snapshots__/get-record.test.ts.snap +30 -132
- package/tests/admin/__snapshots__/get-repo.test.ts.snap +14 -60
- package/tests/admin/__snapshots__/moderation-events.test.ts.snap +146 -0
- package/tests/admin/__snapshots__/moderation-statuses.test.ts.snap +64 -0
- package/tests/admin/__snapshots__/moderation.test.ts.snap +0 -125
- package/tests/admin/get-record.test.ts +5 -9
- package/tests/admin/get-repo.test.ts +38 -9
- package/tests/admin/moderation-events.test.ts +221 -0
- package/tests/admin/moderation-statuses.test.ts +145 -0
- package/tests/admin/moderation.test.ts +512 -860
- package/tests/admin/repo-search.test.ts +2 -3
- package/tests/auto-moderator/fuzzy-matcher.test.ts +2 -1
- package/tests/auto-moderator/takedowns.test.ts +45 -18
- package/tests/feed-generation.test.ts +57 -9
- package/tests/views/__snapshots__/block-lists.test.ts.snap +3 -9
- package/tests/views/__snapshots__/blocks.test.ts.snap +0 -9
- package/tests/views/__snapshots__/mute-lists.test.ts.snap +5 -5
- package/tests/views/__snapshots__/mutes.test.ts.snap +0 -3
- package/tests/views/__snapshots__/thread.test.ts.snap +0 -30
- package/tests/views/actor-search.test.ts +2 -3
- package/tests/views/author-feed.test.ts +42 -36
- package/tests/views/follows.test.ts +40 -35
- package/tests/views/list-feed.test.ts +17 -9
- package/tests/views/notifications.test.ts +13 -9
- package/tests/views/profile.test.ts +20 -18
- package/tests/views/suggestions.test.ts +15 -7
- package/tests/views/thread.test.ts +54 -26
- package/tests/views/threadgating.test.ts +51 -19
- package/tests/views/timeline.test.ts +21 -13
- package/dist/api/com/atproto/admin/reverseModerationAction.d.ts +0 -3
- package/dist/api/com/atproto/admin/takeModerationAction.d.ts +0 -3
- package/dist/lexicon/types/com/atproto/admin/resolveModerationReports.d.ts +0 -36
- package/dist/lexicon/types/com/atproto/admin/reverseModerationAction.d.ts +0 -36
- package/src/api/com/atproto/admin/getModerationAction.ts +0 -44
- package/src/api/com/atproto/admin/getModerationReport.ts +0 -43
- package/src/api/com/atproto/admin/resolveModerationReports.ts +0 -24
- package/src/api/com/atproto/admin/reverseModerationAction.ts +0 -115
- package/src/api/com/atproto/admin/takeModerationAction.ts +0 -156
- package/src/lexicon/types/com/atproto/admin/getModerationAction.ts +0 -41
- package/src/lexicon/types/com/atproto/admin/resolveModerationReports.ts +0 -49
- package/src/lexicon/types/com/atproto/admin/reverseModerationAction.ts +0 -49
- package/tests/admin/__snapshots__/get-moderation-action.test.ts.snap +0 -172
- package/tests/admin/__snapshots__/get-moderation-actions.test.ts.snap +0 -178
- package/tests/admin/__snapshots__/get-moderation-report.test.ts.snap +0 -177
- package/tests/admin/__snapshots__/get-moderation-reports.test.ts.snap +0 -307
- package/tests/admin/get-moderation-action.test.ts +0 -100
- package/tests/admin/get-moderation-actions.test.ts +0 -164
- package/tests/admin/get-moderation-report.test.ts +0 -100
- package/tests/admin/get-moderation-reports.test.ts +0 -332
- /package/dist/api/com/atproto/admin/{getModerationAction.d.ts → emitModerationEvent.d.ts} +0 -0
- /package/dist/api/com/atproto/admin/{getModerationActions.d.ts → getModerationEvent.d.ts} +0 -0
- /package/dist/api/com/atproto/admin/{getModerationReport.d.ts → queryModerationEvents.d.ts} +0 -0
- /package/dist/api/com/atproto/admin/{getModerationReports.d.ts → queryModerationStatuses.d.ts} +0 -0
- /package/dist/api/com/atproto/{admin/resolveModerationReports.d.ts → temp/fetchLabels.d.ts} +0 -0
|
@@ -3,16 +3,20 @@ import { QueryParams as SkeletonParams } from '../lexicon/types/app/bsky/feed/ge
|
|
|
3
3
|
import { paginate } from '../db/pagination'
|
|
4
4
|
import { AlgoHandler, AlgoResponse } from './types'
|
|
5
5
|
import { FeedKeyset, getFeedDateThreshold } from '../api/app/bsky/util/feed'
|
|
6
|
+
import { AuthRequiredError } from '@atproto/xrpc-server'
|
|
6
7
|
|
|
7
8
|
const handler: AlgoHandler = async (
|
|
8
9
|
ctx: AppContext,
|
|
9
10
|
params: SkeletonParams,
|
|
10
|
-
|
|
11
|
+
viewer: string | null,
|
|
11
12
|
): Promise<AlgoResponse> => {
|
|
13
|
+
if (!viewer) {
|
|
14
|
+
throw new AuthRequiredError('This feed requires being logged-in')
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
const { cursor, limit = 50 } = params
|
|
13
18
|
const db = ctx.db.getReplica('feed')
|
|
14
19
|
const feedService = ctx.services.feed(db)
|
|
15
|
-
|
|
16
20
|
const { ref } = db.db.dynamic
|
|
17
21
|
|
|
18
22
|
const keyset = new FeedKeyset(ref('post.sortAt'), ref('post.cid'))
|
|
@@ -23,7 +27,7 @@ const handler: AlgoHandler = async (
|
|
|
23
27
|
.innerJoin('follow', 'follow.subjectDid', 'post.creator')
|
|
24
28
|
.innerJoin('post_agg', 'post_agg.uri', 'post.uri')
|
|
25
29
|
.where('post_agg.likeCount', '>=', 5)
|
|
26
|
-
.where('follow.creator', '=',
|
|
30
|
+
.where('follow.creator', '=', viewer)
|
|
27
31
|
.where('post.sortAt', '>', getFeedDateThreshold(sortFrom))
|
|
28
32
|
|
|
29
33
|
postsQb = paginate(postsQb, { limit, cursor, keyset, tryIndex: true })
|
package/src/index.ts
CHANGED
|
@@ -32,13 +32,14 @@ export type { ServerConfigValues } from './config'
|
|
|
32
32
|
export type { MountedAlgos } from './feed-gen/types'
|
|
33
33
|
export { ServerConfig } from './config'
|
|
34
34
|
export { Database, PrimaryDatabase, DatabaseCoordinator } from './db'
|
|
35
|
-
export {
|
|
35
|
+
export { PeriodicModerationEventReversal } from './db/periodic-moderation-event-reversal'
|
|
36
36
|
export { Redis } from './redis'
|
|
37
37
|
export { ViewMaintainer } from './db/views'
|
|
38
38
|
export { AppContext } from './context'
|
|
39
39
|
export { makeAlgos } from './feed-gen'
|
|
40
40
|
export * from './indexer'
|
|
41
41
|
export * from './ingester'
|
|
42
|
+
export { MigrateModerationData } from './migrate-moderation-data'
|
|
42
43
|
|
|
43
44
|
export class BskyAppView {
|
|
44
45
|
public ctx: AppContext
|
package/src/lexicon/index.ts
CHANGED
|
@@ -11,21 +11,18 @@ import {
|
|
|
11
11
|
import { schemas } from './lexicons'
|
|
12
12
|
import * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites'
|
|
13
13
|
import * as ComAtprotoAdminDisableInviteCodes from './types/com/atproto/admin/disableInviteCodes'
|
|
14
|
+
import * as ComAtprotoAdminEmitModerationEvent from './types/com/atproto/admin/emitModerationEvent'
|
|
14
15
|
import * as ComAtprotoAdminEnableAccountInvites from './types/com/atproto/admin/enableAccountInvites'
|
|
15
16
|
import * as ComAtprotoAdminGetAccountInfo from './types/com/atproto/admin/getAccountInfo'
|
|
16
17
|
import * as ComAtprotoAdminGetInviteCodes from './types/com/atproto/admin/getInviteCodes'
|
|
17
|
-
import * as
|
|
18
|
-
import * as ComAtprotoAdminGetModerationActions from './types/com/atproto/admin/getModerationActions'
|
|
19
|
-
import * as ComAtprotoAdminGetModerationReport from './types/com/atproto/admin/getModerationReport'
|
|
20
|
-
import * as ComAtprotoAdminGetModerationReports from './types/com/atproto/admin/getModerationReports'
|
|
18
|
+
import * as ComAtprotoAdminGetModerationEvent from './types/com/atproto/admin/getModerationEvent'
|
|
21
19
|
import * as ComAtprotoAdminGetRecord from './types/com/atproto/admin/getRecord'
|
|
22
20
|
import * as ComAtprotoAdminGetRepo from './types/com/atproto/admin/getRepo'
|
|
23
21
|
import * as ComAtprotoAdminGetSubjectStatus from './types/com/atproto/admin/getSubjectStatus'
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
22
|
+
import * as ComAtprotoAdminQueryModerationEvents from './types/com/atproto/admin/queryModerationEvents'
|
|
23
|
+
import * as ComAtprotoAdminQueryModerationStatuses from './types/com/atproto/admin/queryModerationStatuses'
|
|
26
24
|
import * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRepos'
|
|
27
25
|
import * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail'
|
|
28
|
-
import * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction'
|
|
29
26
|
import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail'
|
|
30
27
|
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
|
|
31
28
|
import * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus'
|
|
@@ -75,6 +72,7 @@ import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos'
|
|
|
75
72
|
import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate'
|
|
76
73
|
import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'
|
|
77
74
|
import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
|
|
75
|
+
import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels'
|
|
78
76
|
import * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences'
|
|
79
77
|
import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'
|
|
80
78
|
import * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles'
|
|
@@ -122,10 +120,9 @@ import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecce
|
|
|
122
120
|
import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
|
|
123
121
|
|
|
124
122
|
export const COM_ATPROTO_ADMIN = {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
DefsEscalate: 'com.atproto.admin.defs#escalate',
|
|
123
|
+
DefsReviewOpen: 'com.atproto.admin.defs#reviewOpen',
|
|
124
|
+
DefsReviewEscalated: 'com.atproto.admin.defs#reviewEscalated',
|
|
125
|
+
DefsReviewClosed: 'com.atproto.admin.defs#reviewClosed',
|
|
129
126
|
}
|
|
130
127
|
export const COM_ATPROTO_MODERATION = {
|
|
131
128
|
DefsReasonSpam: 'com.atproto.moderation.defs#reasonSpam',
|
|
@@ -175,6 +172,7 @@ export class AtprotoNS {
|
|
|
175
172
|
repo: RepoNS
|
|
176
173
|
server: ServerNS
|
|
177
174
|
sync: SyncNS
|
|
175
|
+
temp: TempNS
|
|
178
176
|
|
|
179
177
|
constructor(server: Server) {
|
|
180
178
|
this._server = server
|
|
@@ -185,6 +183,7 @@ export class AtprotoNS {
|
|
|
185
183
|
this.repo = new RepoNS(server)
|
|
186
184
|
this.server = new ServerNS(server)
|
|
187
185
|
this.sync = new SyncNS(server)
|
|
186
|
+
this.temp = new TempNS(server)
|
|
188
187
|
}
|
|
189
188
|
}
|
|
190
189
|
|
|
@@ -217,6 +216,17 @@ export class AdminNS {
|
|
|
217
216
|
return this._server.xrpc.method(nsid, cfg)
|
|
218
217
|
}
|
|
219
218
|
|
|
219
|
+
emitModerationEvent<AV extends AuthVerifier>(
|
|
220
|
+
cfg: ConfigOf<
|
|
221
|
+
AV,
|
|
222
|
+
ComAtprotoAdminEmitModerationEvent.Handler<ExtractAuth<AV>>,
|
|
223
|
+
ComAtprotoAdminEmitModerationEvent.HandlerReqCtx<ExtractAuth<AV>>
|
|
224
|
+
>,
|
|
225
|
+
) {
|
|
226
|
+
const nsid = 'com.atproto.admin.emitModerationEvent' // @ts-ignore
|
|
227
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
228
|
+
}
|
|
229
|
+
|
|
220
230
|
enableAccountInvites<AV extends AuthVerifier>(
|
|
221
231
|
cfg: ConfigOf<
|
|
222
232
|
AV,
|
|
@@ -250,47 +260,14 @@ export class AdminNS {
|
|
|
250
260
|
return this._server.xrpc.method(nsid, cfg)
|
|
251
261
|
}
|
|
252
262
|
|
|
253
|
-
|
|
263
|
+
getModerationEvent<AV extends AuthVerifier>(
|
|
254
264
|
cfg: ConfigOf<
|
|
255
265
|
AV,
|
|
256
|
-
|
|
257
|
-
|
|
266
|
+
ComAtprotoAdminGetModerationEvent.Handler<ExtractAuth<AV>>,
|
|
267
|
+
ComAtprotoAdminGetModerationEvent.HandlerReqCtx<ExtractAuth<AV>>
|
|
258
268
|
>,
|
|
259
269
|
) {
|
|
260
|
-
const nsid = 'com.atproto.admin.
|
|
261
|
-
return this._server.xrpc.method(nsid, cfg)
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
getModerationActions<AV extends AuthVerifier>(
|
|
265
|
-
cfg: ConfigOf<
|
|
266
|
-
AV,
|
|
267
|
-
ComAtprotoAdminGetModerationActions.Handler<ExtractAuth<AV>>,
|
|
268
|
-
ComAtprotoAdminGetModerationActions.HandlerReqCtx<ExtractAuth<AV>>
|
|
269
|
-
>,
|
|
270
|
-
) {
|
|
271
|
-
const nsid = 'com.atproto.admin.getModerationActions' // @ts-ignore
|
|
272
|
-
return this._server.xrpc.method(nsid, cfg)
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
getModerationReport<AV extends AuthVerifier>(
|
|
276
|
-
cfg: ConfigOf<
|
|
277
|
-
AV,
|
|
278
|
-
ComAtprotoAdminGetModerationReport.Handler<ExtractAuth<AV>>,
|
|
279
|
-
ComAtprotoAdminGetModerationReport.HandlerReqCtx<ExtractAuth<AV>>
|
|
280
|
-
>,
|
|
281
|
-
) {
|
|
282
|
-
const nsid = 'com.atproto.admin.getModerationReport' // @ts-ignore
|
|
283
|
-
return this._server.xrpc.method(nsid, cfg)
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
getModerationReports<AV extends AuthVerifier>(
|
|
287
|
-
cfg: ConfigOf<
|
|
288
|
-
AV,
|
|
289
|
-
ComAtprotoAdminGetModerationReports.Handler<ExtractAuth<AV>>,
|
|
290
|
-
ComAtprotoAdminGetModerationReports.HandlerReqCtx<ExtractAuth<AV>>
|
|
291
|
-
>,
|
|
292
|
-
) {
|
|
293
|
-
const nsid = 'com.atproto.admin.getModerationReports' // @ts-ignore
|
|
270
|
+
const nsid = 'com.atproto.admin.getModerationEvent' // @ts-ignore
|
|
294
271
|
return this._server.xrpc.method(nsid, cfg)
|
|
295
272
|
}
|
|
296
273
|
|
|
@@ -327,25 +304,25 @@ export class AdminNS {
|
|
|
327
304
|
return this._server.xrpc.method(nsid, cfg)
|
|
328
305
|
}
|
|
329
306
|
|
|
330
|
-
|
|
307
|
+
queryModerationEvents<AV extends AuthVerifier>(
|
|
331
308
|
cfg: ConfigOf<
|
|
332
309
|
AV,
|
|
333
|
-
|
|
334
|
-
|
|
310
|
+
ComAtprotoAdminQueryModerationEvents.Handler<ExtractAuth<AV>>,
|
|
311
|
+
ComAtprotoAdminQueryModerationEvents.HandlerReqCtx<ExtractAuth<AV>>
|
|
335
312
|
>,
|
|
336
313
|
) {
|
|
337
|
-
const nsid = 'com.atproto.admin.
|
|
314
|
+
const nsid = 'com.atproto.admin.queryModerationEvents' // @ts-ignore
|
|
338
315
|
return this._server.xrpc.method(nsid, cfg)
|
|
339
316
|
}
|
|
340
317
|
|
|
341
|
-
|
|
318
|
+
queryModerationStatuses<AV extends AuthVerifier>(
|
|
342
319
|
cfg: ConfigOf<
|
|
343
320
|
AV,
|
|
344
|
-
|
|
345
|
-
|
|
321
|
+
ComAtprotoAdminQueryModerationStatuses.Handler<ExtractAuth<AV>>,
|
|
322
|
+
ComAtprotoAdminQueryModerationStatuses.HandlerReqCtx<ExtractAuth<AV>>
|
|
346
323
|
>,
|
|
347
324
|
) {
|
|
348
|
-
const nsid = 'com.atproto.admin.
|
|
325
|
+
const nsid = 'com.atproto.admin.queryModerationStatuses' // @ts-ignore
|
|
349
326
|
return this._server.xrpc.method(nsid, cfg)
|
|
350
327
|
}
|
|
351
328
|
|
|
@@ -371,17 +348,6 @@ export class AdminNS {
|
|
|
371
348
|
return this._server.xrpc.method(nsid, cfg)
|
|
372
349
|
}
|
|
373
350
|
|
|
374
|
-
takeModerationAction<AV extends AuthVerifier>(
|
|
375
|
-
cfg: ConfigOf<
|
|
376
|
-
AV,
|
|
377
|
-
ComAtprotoAdminTakeModerationAction.Handler<ExtractAuth<AV>>,
|
|
378
|
-
ComAtprotoAdminTakeModerationAction.HandlerReqCtx<ExtractAuth<AV>>
|
|
379
|
-
>,
|
|
380
|
-
) {
|
|
381
|
-
const nsid = 'com.atproto.admin.takeModerationAction' // @ts-ignore
|
|
382
|
-
return this._server.xrpc.method(nsid, cfg)
|
|
383
|
-
}
|
|
384
|
-
|
|
385
351
|
updateAccountEmail<AV extends AuthVerifier>(
|
|
386
352
|
cfg: ConfigOf<
|
|
387
353
|
AV,
|
|
@@ -970,6 +936,25 @@ export class SyncNS {
|
|
|
970
936
|
}
|
|
971
937
|
}
|
|
972
938
|
|
|
939
|
+
export class TempNS {
|
|
940
|
+
_server: Server
|
|
941
|
+
|
|
942
|
+
constructor(server: Server) {
|
|
943
|
+
this._server = server
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
fetchLabels<AV extends AuthVerifier>(
|
|
947
|
+
cfg: ConfigOf<
|
|
948
|
+
AV,
|
|
949
|
+
ComAtprotoTempFetchLabels.Handler<ExtractAuth<AV>>,
|
|
950
|
+
ComAtprotoTempFetchLabels.HandlerReqCtx<ExtractAuth<AV>>
|
|
951
|
+
>,
|
|
952
|
+
) {
|
|
953
|
+
const nsid = 'com.atproto.temp.fetchLabels' // @ts-ignore
|
|
954
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
|
|
973
958
|
export class AppNS {
|
|
974
959
|
_server: Server
|
|
975
960
|
bsky: BskyNS
|