@atproto/bsky 0.0.15 → 0.0.17
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 +18 -0
- package/dist/api/com/atproto/moderation/util.d.ts +4 -3
- package/dist/cache/read-through.d.ts +30 -0
- package/dist/config.d.ts +18 -0
- package/dist/context.d.ts +21 -6
- package/dist/daemon/config.d.ts +15 -0
- package/dist/daemon/context.d.ts +15 -0
- package/dist/daemon/index.d.ts +23 -0
- package/dist/daemon/logger.d.ts +3 -0
- package/dist/daemon/notifications.d.ts +18 -0
- package/dist/daemon/services.d.ts +11 -0
- package/dist/db/database-schema.d.ts +1 -2
- package/dist/db/index.js +41 -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/20231205T000257238Z-remove-did-cache.d.ts +3 -0
- package/dist/db/migrations/index.d.ts +2 -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/did-cache.d.ts +10 -7
- package/dist/feed-gen/types.d.ts +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +4370 -2758
- package/dist/index.js.map +3 -3
- package/dist/indexer/context.d.ts +2 -0
- package/dist/indexer/index.d.ts +1 -0
- package/dist/lexicon/index.d.ts +23 -18
- package/dist/lexicon/lexicons.d.ts +561 -412
- 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 +114 -48
- package/dist/lexicon/types/com/atproto/admin/{resolveModerationReports.d.ts → deleteAccount.d.ts} +2 -13
- 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/importRepo.d.ts} +10 -7
- package/dist/lexicon/types/com/atproto/temp/pushBlob.d.ts +25 -0
- package/dist/lexicon/types/com/atproto/{admin/reverseModerationAction.d.ts → temp/transferAccount.d.ts} +11 -5
- package/dist/logger.d.ts +1 -0
- package/dist/migrate-moderation-data.d.ts +1 -0
- package/dist/redis.d.ts +10 -1
- package/dist/services/actor/index.d.ts +18 -4
- package/dist/services/actor/views.d.ts +6 -8
- package/dist/services/feed/index.d.ts +7 -4
- package/dist/services/feed/util.d.ts +9 -1
- package/dist/services/feed/views.d.ts +11 -21
- package/dist/services/graph/index.d.ts +5 -29
- package/dist/services/graph/types.d.ts +1 -0
- package/dist/services/index.d.ts +3 -7
- package/dist/services/label/index.d.ts +10 -4
- package/dist/services/moderation/index.d.ts +134 -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/services/types.d.ts +3 -0
- package/dist/services/util/notification.d.ts +5 -0
- package/dist/services/util/post.d.ts +6 -6
- package/dist/util/debug.d.ts +1 -1
- package/dist/util/retry.d.ts +1 -6
- package/package.json +11 -11
- 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 +15 -54
- 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 +20 -17
- 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/moderation/createReport.ts +9 -7
- package/src/api/com/atproto/moderation/util.ts +38 -20
- package/src/api/index.ts +8 -14
- package/src/auth.ts +29 -21
- package/src/auto-moderator/index.ts +26 -19
- package/src/cache/read-through.ts +151 -0
- package/src/config.ts +90 -1
- package/src/context.ts +11 -7
- package/src/daemon/config.ts +60 -0
- package/src/daemon/context.ts +27 -0
- package/src/daemon/index.ts +78 -0
- package/src/daemon/logger.ts +6 -0
- package/src/daemon/notifications.ts +54 -0
- package/src/daemon/services.ts +22 -0
- package/src/db/database-schema.ts +0 -2
- package/src/db/migrations/20231003T202833377Z-create-moderation-subject-status.ts +123 -0
- package/src/db/migrations/20231205T000257238Z-remove-did-cache.ts +14 -0
- package/src/db/migrations/index.ts +2 -0
- package/src/db/pagination.ts +26 -3
- package/src/db/{periodic-moderation-action-reversal.ts → periodic-moderation-event-reversal.ts} +50 -46
- package/src/db/tables/moderation.ts +35 -52
- package/src/did-cache.ts +33 -56
- package/src/feed-gen/bsky-team.ts +1 -1
- package/src/feed-gen/hot-classic.ts +1 -1
- package/src/feed-gen/index.ts +0 -4
- package/src/feed-gen/mutuals.ts +6 -2
- package/src/feed-gen/types.ts +1 -1
- package/src/index.ts +57 -17
- package/src/indexer/context.ts +5 -0
- package/src/indexer/index.ts +10 -7
- package/src/lexicon/index.ts +80 -67
- package/src/lexicon/lexicons.ts +698 -507
- package/src/lexicon/types/app/bsky/feed/defs.ts +1 -18
- package/src/lexicon/types/app/bsky/graph/defs.ts +1 -0
- package/src/lexicon/types/com/atproto/admin/defs.ts +276 -84
- package/src/lexicon/types/com/atproto/admin/{resolveModerationReports.ts → deleteAccount.ts} +2 -13
- package/src/lexicon/types/com/atproto/admin/{takeModerationAction.ts → emitModerationEvent.ts} +13 -11
- package/src/lexicon/types/com/atproto/admin/{getModerationReport.ts → getModerationEvent.ts} +1 -1
- package/src/lexicon/types/com/atproto/admin/{getModerationActions.ts → queryModerationEvents.ts} +8 -1
- package/src/lexicon/types/com/atproto/admin/{getModerationReports.ts → queryModerationStatuses.ts} +21 -14
- package/src/lexicon/types/com/atproto/admin/sendEmail.ts +1 -0
- package/src/lexicon/types/com/atproto/{admin/getModerationAction.ts → temp/importRepo.ts} +11 -7
- package/src/lexicon/types/com/atproto/temp/pushBlob.ts +39 -0
- package/src/lexicon/types/com/atproto/{admin/reverseModerationAction.ts → temp/transferAccount.ts} +18 -5
- package/src/logger.ts +2 -0
- package/src/migrate-moderation-data.ts +414 -0
- package/src/redis.ts +43 -3
- package/src/services/actor/index.ts +55 -7
- package/src/services/actor/views.ts +18 -21
- package/src/services/feed/index.ts +52 -19
- package/src/services/feed/util.ts +47 -19
- package/src/services/feed/views.ts +87 -13
- package/src/services/graph/index.ts +21 -3
- package/src/services/graph/types.ts +1 -0
- package/src/services/index.ts +14 -14
- package/src/services/indexing/index.ts +7 -10
- 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 +16 -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 +68 -25
- package/src/services/moderation/index.ts +380 -395
- package/src/services/moderation/pagination.ts +96 -0
- package/src/services/moderation/status.ts +241 -0
- package/src/services/moderation/types.ts +49 -0
- package/src/services/moderation/views.ts +278 -329
- package/src/services/types.ts +4 -0
- package/src/services/util/notification.ts +70 -0
- package/src/util/debug.ts +2 -2
- package/src/util/retry.ts +1 -44
- 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 +10 -12
- 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 +3 -3
- package/tests/algos/hot-classic.test.ts +1 -2
- package/tests/auth.test.ts +1 -1
- package/tests/auto-moderator/fuzzy-matcher.test.ts +2 -1
- package/tests/auto-moderator/labeler.test.ts +19 -20
- package/tests/auto-moderator/takedowns.test.ts +61 -28
- package/tests/blob-resolver.test.ts +4 -2
- package/tests/daemon.test.ts +191 -0
- package/tests/did-cache.test.ts +20 -5
- package/tests/feed-generation.test.ts +57 -9
- package/tests/handle-invalidation.test.ts +1 -5
- package/tests/indexing.test.ts +20 -13
- package/tests/redis-cache.test.ts +231 -0
- package/tests/seeds/basic.ts +3 -0
- package/tests/subscription/repo.test.ts +4 -7
- 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 -19
- package/tests/views/thread.test.ts +117 -94
- package/tests/views/threadgating.test.ts +89 -19
- package/tests/views/timeline.test.ts +21 -13
- package/dist/api/com/atproto/admin/resolveModerationReports.d.ts +0 -3
- package/dist/api/com/atproto/admin/reverseModerationAction.d.ts +0 -3
- package/dist/api/com/atproto/admin/takeModerationAction.d.ts +0 -3
- package/dist/db/tables/did-cache.d.ts +0 -10
- package/dist/feed-gen/best-of-follows.d.ts +0 -29
- package/dist/feed-gen/whats-hot.d.ts +0 -29
- package/dist/feed-gen/with-friends.d.ts +0 -3
- package/dist/label-cache.d.ts +0 -19
- 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/db/tables/did-cache.ts +0 -13
- package/src/feed-gen/best-of-follows.ts +0 -74
- package/src/feed-gen/whats-hot.ts +0 -101
- package/src/feed-gen/with-friends.ts +0 -39
- package/src/label-cache.ts +0 -90
- 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/tests/algos/whats-hot.test.ts +0 -118
- package/tests/algos/with-friends.test.ts +0 -145
- /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/src/lexicon/index.ts
CHANGED
|
@@ -9,23 +9,21 @@ import {
|
|
|
9
9
|
StreamAuthVerifier,
|
|
10
10
|
} from '@atproto/xrpc-server'
|
|
11
11
|
import { schemas } from './lexicons'
|
|
12
|
+
import * as ComAtprotoAdminDeleteAccount from './types/com/atproto/admin/deleteAccount'
|
|
12
13
|
import * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites'
|
|
13
14
|
import * as ComAtprotoAdminDisableInviteCodes from './types/com/atproto/admin/disableInviteCodes'
|
|
15
|
+
import * as ComAtprotoAdminEmitModerationEvent from './types/com/atproto/admin/emitModerationEvent'
|
|
14
16
|
import * as ComAtprotoAdminEnableAccountInvites from './types/com/atproto/admin/enableAccountInvites'
|
|
15
17
|
import * as ComAtprotoAdminGetAccountInfo from './types/com/atproto/admin/getAccountInfo'
|
|
16
18
|
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'
|
|
19
|
+
import * as ComAtprotoAdminGetModerationEvent from './types/com/atproto/admin/getModerationEvent'
|
|
21
20
|
import * as ComAtprotoAdminGetRecord from './types/com/atproto/admin/getRecord'
|
|
22
21
|
import * as ComAtprotoAdminGetRepo from './types/com/atproto/admin/getRepo'
|
|
23
22
|
import * as ComAtprotoAdminGetSubjectStatus from './types/com/atproto/admin/getSubjectStatus'
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
23
|
+
import * as ComAtprotoAdminQueryModerationEvents from './types/com/atproto/admin/queryModerationEvents'
|
|
24
|
+
import * as ComAtprotoAdminQueryModerationStatuses from './types/com/atproto/admin/queryModerationStatuses'
|
|
26
25
|
import * as ComAtprotoAdminSearchRepos from './types/com/atproto/admin/searchRepos'
|
|
27
26
|
import * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail'
|
|
28
|
-
import * as ComAtprotoAdminTakeModerationAction from './types/com/atproto/admin/takeModerationAction'
|
|
29
27
|
import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail'
|
|
30
28
|
import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle'
|
|
31
29
|
import * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus'
|
|
@@ -76,6 +74,9 @@ import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOf
|
|
|
76
74
|
import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl'
|
|
77
75
|
import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos'
|
|
78
76
|
import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels'
|
|
77
|
+
import * as ComAtprotoTempImportRepo from './types/com/atproto/temp/importRepo'
|
|
78
|
+
import * as ComAtprotoTempPushBlob from './types/com/atproto/temp/pushBlob'
|
|
79
|
+
import * as ComAtprotoTempTransferAccount from './types/com/atproto/temp/transferAccount'
|
|
79
80
|
import * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences'
|
|
80
81
|
import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile'
|
|
81
82
|
import * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles'
|
|
@@ -123,10 +124,9 @@ import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecce
|
|
|
123
124
|
import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton'
|
|
124
125
|
|
|
125
126
|
export const COM_ATPROTO_ADMIN = {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
DefsEscalate: 'com.atproto.admin.defs#escalate',
|
|
127
|
+
DefsReviewOpen: 'com.atproto.admin.defs#reviewOpen',
|
|
128
|
+
DefsReviewEscalated: 'com.atproto.admin.defs#reviewEscalated',
|
|
129
|
+
DefsReviewClosed: 'com.atproto.admin.defs#reviewClosed',
|
|
130
130
|
}
|
|
131
131
|
export const COM_ATPROTO_MODERATION = {
|
|
132
132
|
DefsReasonSpam: 'com.atproto.moderation.defs#reasonSpam',
|
|
@@ -198,6 +198,17 @@ export class AdminNS {
|
|
|
198
198
|
this._server = server
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
deleteAccount<AV extends AuthVerifier>(
|
|
202
|
+
cfg: ConfigOf<
|
|
203
|
+
AV,
|
|
204
|
+
ComAtprotoAdminDeleteAccount.Handler<ExtractAuth<AV>>,
|
|
205
|
+
ComAtprotoAdminDeleteAccount.HandlerReqCtx<ExtractAuth<AV>>
|
|
206
|
+
>,
|
|
207
|
+
) {
|
|
208
|
+
const nsid = 'com.atproto.admin.deleteAccount' // @ts-ignore
|
|
209
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
210
|
+
}
|
|
211
|
+
|
|
201
212
|
disableAccountInvites<AV extends AuthVerifier>(
|
|
202
213
|
cfg: ConfigOf<
|
|
203
214
|
AV,
|
|
@@ -220,6 +231,17 @@ export class AdminNS {
|
|
|
220
231
|
return this._server.xrpc.method(nsid, cfg)
|
|
221
232
|
}
|
|
222
233
|
|
|
234
|
+
emitModerationEvent<AV extends AuthVerifier>(
|
|
235
|
+
cfg: ConfigOf<
|
|
236
|
+
AV,
|
|
237
|
+
ComAtprotoAdminEmitModerationEvent.Handler<ExtractAuth<AV>>,
|
|
238
|
+
ComAtprotoAdminEmitModerationEvent.HandlerReqCtx<ExtractAuth<AV>>
|
|
239
|
+
>,
|
|
240
|
+
) {
|
|
241
|
+
const nsid = 'com.atproto.admin.emitModerationEvent' // @ts-ignore
|
|
242
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
243
|
+
}
|
|
244
|
+
|
|
223
245
|
enableAccountInvites<AV extends AuthVerifier>(
|
|
224
246
|
cfg: ConfigOf<
|
|
225
247
|
AV,
|
|
@@ -253,47 +275,14 @@ export class AdminNS {
|
|
|
253
275
|
return this._server.xrpc.method(nsid, cfg)
|
|
254
276
|
}
|
|
255
277
|
|
|
256
|
-
|
|
257
|
-
cfg: ConfigOf<
|
|
258
|
-
AV,
|
|
259
|
-
ComAtprotoAdminGetModerationAction.Handler<ExtractAuth<AV>>,
|
|
260
|
-
ComAtprotoAdminGetModerationAction.HandlerReqCtx<ExtractAuth<AV>>
|
|
261
|
-
>,
|
|
262
|
-
) {
|
|
263
|
-
const nsid = 'com.atproto.admin.getModerationAction' // @ts-ignore
|
|
264
|
-
return this._server.xrpc.method(nsid, cfg)
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
getModerationActions<AV extends AuthVerifier>(
|
|
268
|
-
cfg: ConfigOf<
|
|
269
|
-
AV,
|
|
270
|
-
ComAtprotoAdminGetModerationActions.Handler<ExtractAuth<AV>>,
|
|
271
|
-
ComAtprotoAdminGetModerationActions.HandlerReqCtx<ExtractAuth<AV>>
|
|
272
|
-
>,
|
|
273
|
-
) {
|
|
274
|
-
const nsid = 'com.atproto.admin.getModerationActions' // @ts-ignore
|
|
275
|
-
return this._server.xrpc.method(nsid, cfg)
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
getModerationReport<AV extends AuthVerifier>(
|
|
279
|
-
cfg: ConfigOf<
|
|
280
|
-
AV,
|
|
281
|
-
ComAtprotoAdminGetModerationReport.Handler<ExtractAuth<AV>>,
|
|
282
|
-
ComAtprotoAdminGetModerationReport.HandlerReqCtx<ExtractAuth<AV>>
|
|
283
|
-
>,
|
|
284
|
-
) {
|
|
285
|
-
const nsid = 'com.atproto.admin.getModerationReport' // @ts-ignore
|
|
286
|
-
return this._server.xrpc.method(nsid, cfg)
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
getModerationReports<AV extends AuthVerifier>(
|
|
278
|
+
getModerationEvent<AV extends AuthVerifier>(
|
|
290
279
|
cfg: ConfigOf<
|
|
291
280
|
AV,
|
|
292
|
-
|
|
293
|
-
|
|
281
|
+
ComAtprotoAdminGetModerationEvent.Handler<ExtractAuth<AV>>,
|
|
282
|
+
ComAtprotoAdminGetModerationEvent.HandlerReqCtx<ExtractAuth<AV>>
|
|
294
283
|
>,
|
|
295
284
|
) {
|
|
296
|
-
const nsid = 'com.atproto.admin.
|
|
285
|
+
const nsid = 'com.atproto.admin.getModerationEvent' // @ts-ignore
|
|
297
286
|
return this._server.xrpc.method(nsid, cfg)
|
|
298
287
|
}
|
|
299
288
|
|
|
@@ -330,25 +319,25 @@ export class AdminNS {
|
|
|
330
319
|
return this._server.xrpc.method(nsid, cfg)
|
|
331
320
|
}
|
|
332
321
|
|
|
333
|
-
|
|
322
|
+
queryModerationEvents<AV extends AuthVerifier>(
|
|
334
323
|
cfg: ConfigOf<
|
|
335
324
|
AV,
|
|
336
|
-
|
|
337
|
-
|
|
325
|
+
ComAtprotoAdminQueryModerationEvents.Handler<ExtractAuth<AV>>,
|
|
326
|
+
ComAtprotoAdminQueryModerationEvents.HandlerReqCtx<ExtractAuth<AV>>
|
|
338
327
|
>,
|
|
339
328
|
) {
|
|
340
|
-
const nsid = 'com.atproto.admin.
|
|
329
|
+
const nsid = 'com.atproto.admin.queryModerationEvents' // @ts-ignore
|
|
341
330
|
return this._server.xrpc.method(nsid, cfg)
|
|
342
331
|
}
|
|
343
332
|
|
|
344
|
-
|
|
333
|
+
queryModerationStatuses<AV extends AuthVerifier>(
|
|
345
334
|
cfg: ConfigOf<
|
|
346
335
|
AV,
|
|
347
|
-
|
|
348
|
-
|
|
336
|
+
ComAtprotoAdminQueryModerationStatuses.Handler<ExtractAuth<AV>>,
|
|
337
|
+
ComAtprotoAdminQueryModerationStatuses.HandlerReqCtx<ExtractAuth<AV>>
|
|
349
338
|
>,
|
|
350
339
|
) {
|
|
351
|
-
const nsid = 'com.atproto.admin.
|
|
340
|
+
const nsid = 'com.atproto.admin.queryModerationStatuses' // @ts-ignore
|
|
352
341
|
return this._server.xrpc.method(nsid, cfg)
|
|
353
342
|
}
|
|
354
343
|
|
|
@@ -374,17 +363,6 @@ export class AdminNS {
|
|
|
374
363
|
return this._server.xrpc.method(nsid, cfg)
|
|
375
364
|
}
|
|
376
365
|
|
|
377
|
-
takeModerationAction<AV extends AuthVerifier>(
|
|
378
|
-
cfg: ConfigOf<
|
|
379
|
-
AV,
|
|
380
|
-
ComAtprotoAdminTakeModerationAction.Handler<ExtractAuth<AV>>,
|
|
381
|
-
ComAtprotoAdminTakeModerationAction.HandlerReqCtx<ExtractAuth<AV>>
|
|
382
|
-
>,
|
|
383
|
-
) {
|
|
384
|
-
const nsid = 'com.atproto.admin.takeModerationAction' // @ts-ignore
|
|
385
|
-
return this._server.xrpc.method(nsid, cfg)
|
|
386
|
-
}
|
|
387
|
-
|
|
388
366
|
updateAccountEmail<AV extends AuthVerifier>(
|
|
389
367
|
cfg: ConfigOf<
|
|
390
368
|
AV,
|
|
@@ -990,6 +968,39 @@ export class TempNS {
|
|
|
990
968
|
const nsid = 'com.atproto.temp.fetchLabels' // @ts-ignore
|
|
991
969
|
return this._server.xrpc.method(nsid, cfg)
|
|
992
970
|
}
|
|
971
|
+
|
|
972
|
+
importRepo<AV extends AuthVerifier>(
|
|
973
|
+
cfg: ConfigOf<
|
|
974
|
+
AV,
|
|
975
|
+
ComAtprotoTempImportRepo.Handler<ExtractAuth<AV>>,
|
|
976
|
+
ComAtprotoTempImportRepo.HandlerReqCtx<ExtractAuth<AV>>
|
|
977
|
+
>,
|
|
978
|
+
) {
|
|
979
|
+
const nsid = 'com.atproto.temp.importRepo' // @ts-ignore
|
|
980
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
pushBlob<AV extends AuthVerifier>(
|
|
984
|
+
cfg: ConfigOf<
|
|
985
|
+
AV,
|
|
986
|
+
ComAtprotoTempPushBlob.Handler<ExtractAuth<AV>>,
|
|
987
|
+
ComAtprotoTempPushBlob.HandlerReqCtx<ExtractAuth<AV>>
|
|
988
|
+
>,
|
|
989
|
+
) {
|
|
990
|
+
const nsid = 'com.atproto.temp.pushBlob' // @ts-ignore
|
|
991
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
transferAccount<AV extends AuthVerifier>(
|
|
995
|
+
cfg: ConfigOf<
|
|
996
|
+
AV,
|
|
997
|
+
ComAtprotoTempTransferAccount.Handler<ExtractAuth<AV>>,
|
|
998
|
+
ComAtprotoTempTransferAccount.HandlerReqCtx<ExtractAuth<AV>>
|
|
999
|
+
>,
|
|
1000
|
+
) {
|
|
1001
|
+
const nsid = 'com.atproto.temp.transferAccount' // @ts-ignore
|
|
1002
|
+
return this._server.xrpc.method(nsid, cfg)
|
|
1003
|
+
}
|
|
993
1004
|
}
|
|
994
1005
|
|
|
995
1006
|
export class AppNS {
|
|
@@ -1586,11 +1597,13 @@ type RouteRateLimitOpts<T> = {
|
|
|
1586
1597
|
calcKey?: (ctx: T) => string
|
|
1587
1598
|
calcPoints?: (ctx: T) => number
|
|
1588
1599
|
}
|
|
1600
|
+
type HandlerOpts = { blobLimit?: number }
|
|
1589
1601
|
type HandlerRateLimitOpts<T> = SharedRateLimitOpts<T> | RouteRateLimitOpts<T>
|
|
1590
1602
|
type ConfigOf<Auth, Handler, ReqCtx> =
|
|
1591
1603
|
| Handler
|
|
1592
1604
|
| {
|
|
1593
1605
|
auth?: Auth
|
|
1606
|
+
opts?: HandlerOpts
|
|
1594
1607
|
rateLimit?: HandlerRateLimitOpts<ReqCtx> | HandlerRateLimitOpts<ReqCtx>[]
|
|
1595
1608
|
handler: Handler
|
|
1596
1609
|
}
|