@atproto/bsky 0.0.37 → 0.0.38
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 +14 -0
- package/dist/api/app/bsky/feed/getAuthorFeed.d.ts +2 -3
- package/dist/api/app/bsky/feed/getListFeed.d.ts +2 -2
- package/dist/api/app/bsky/feed/getTimeline.d.ts +4 -2
- package/dist/api/app/bsky/labeler/getServices.d.ts +3 -0
- package/dist/api/util.d.ts +9 -2
- package/dist/auth-verifier.d.ts +1 -1
- package/dist/context.d.ts +3 -0
- package/dist/data-plane/server/db/database-schema.d.ts +2 -2
- package/dist/data-plane/server/db/migrations/20240226T225725627Z-labelers.d.ts +3 -0
- package/dist/data-plane/server/db/migrations/index.d.ts +1 -0
- package/dist/data-plane/server/db/tables/labeler.d.ts +13 -0
- package/dist/data-plane/server/indexing/index.d.ts +2 -0
- package/dist/data-plane/server/indexing/plugins/labeler.d.ts +10 -0
- package/dist/data-plane/server/util.d.ts +6 -6
- package/dist/hydration/actor.d.ts +3 -0
- package/dist/hydration/hydrator.d.ts +27 -22
- package/dist/hydration/label.d.ts +23 -9
- package/dist/index.js +4068 -4641
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +7 -27
- package/dist/lexicon/lexicons.d.ts +507 -1467
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +23 -1
- package/dist/lexicon/types/app/bsky/embed/record.d.ts +2 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +1 -0
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts +3 -0
- package/dist/lexicon/types/app/bsky/labeler/defs.d.ts +41 -0
- package/dist/lexicon/types/{com/atproto/admin/searchRepos.d.ts → app/bsky/labeler/getServices.d.ts} +7 -7
- package/dist/lexicon/types/app/bsky/labeler/service.d.ts +14 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +0 -304
- package/dist/lexicon/types/com/atproto/label/defs.d.ts +23 -0
- package/dist/proto/bsky_connect.d.ts +7 -1
- package/dist/proto/bsky_pb.d.ts +25 -0
- package/dist/util.d.ts +7 -0
- package/dist/views/index.d.ts +3 -0
- package/dist/views/types.d.ts +2 -1
- package/package.json +14 -13
- package/proto/bsky.proto +12 -0
- package/src/api/app/bsky/actor/getProfile.ts +21 -17
- package/src/api/app/bsky/actor/getProfiles.ts +16 -7
- package/src/api/app/bsky/actor/getSuggestions.ts +18 -13
- package/src/api/app/bsky/actor/searchActors.ts +9 -5
- package/src/api/app/bsky/actor/searchActorsTypeahead.ts +12 -5
- package/src/api/app/bsky/feed/getActorFeeds.ts +16 -6
- package/src/api/app/bsky/feed/getActorLikes.ts +18 -8
- package/src/api/app/bsky/feed/getAuthorFeed.ts +18 -19
- package/src/api/app/bsky/feed/getFeed.ts +14 -7
- package/src/api/app/bsky/feed/getFeedGenerator.ts +8 -2
- package/src/api/app/bsky/feed/getFeedGenerators.ts +16 -5
- package/src/api/app/bsky/feed/getLikes.ts +13 -6
- package/src/api/app/bsky/feed/getListFeed.ts +13 -7
- package/src/api/app/bsky/feed/getPostThread.ts +15 -8
- package/src/api/app/bsky/feed/getPosts.ts +14 -5
- package/src/api/app/bsky/feed/getRepostedBy.ts +13 -6
- package/src/api/app/bsky/feed/getSuggestedFeeds.ts +8 -2
- package/src/api/app/bsky/feed/getTimeline.ts +14 -8
- package/src/api/app/bsky/feed/searchPosts.ts +9 -5
- package/src/api/app/bsky/graph/getBlocks.ts +10 -9
- package/src/api/app/bsky/graph/getFollowers.ts +23 -15
- package/src/api/app/bsky/graph/getFollows.ts +23 -15
- package/src/api/app/bsky/graph/getList.ts +14 -8
- package/src/api/app/bsky/graph/getListBlocks.ts +10 -7
- package/src/api/app/bsky/graph/getListMutes.ts +10 -7
- package/src/api/app/bsky/graph/getLists.ts +9 -7
- package/src/api/app/bsky/graph/getMutes.ts +10 -8
- package/src/api/app/bsky/graph/getSuggestedFollowsByActor.ts +10 -7
- package/src/api/app/bsky/graph/muteActor.ts +1 -1
- package/src/api/app/bsky/labeler/getServices.ts +46 -0
- package/src/api/app/bsky/notification/listNotifications.ts +12 -8
- package/src/api/app/bsky/unspecced/getPopularFeedGenerators.ts +6 -3
- package/src/api/com/atproto/admin/getAccountInfos.ts +10 -3
- package/src/api/index.ts +2 -0
- package/src/api/util.ts +19 -4
- package/src/auth-verifier.ts +2 -2
- package/src/context.ts +20 -0
- package/src/data-plane/server/db/database-schema.ts +4 -4
- package/src/data-plane/server/db/migrations/20240226T225725627Z-labelers.ts +27 -0
- package/src/data-plane/server/db/migrations/index.ts +1 -0
- package/src/data-plane/server/db/tables/labeler.ts +16 -0
- package/src/data-plane/server/indexing/index.ts +4 -0
- package/src/data-plane/server/indexing/plugins/labeler.ts +77 -0
- package/src/data-plane/server/routes/interactions.ts +17 -1
- package/src/data-plane/server/routes/profile.ts +15 -1
- package/src/data-plane/server/routes/records.ts +1 -0
- package/src/hydration/actor.ts +6 -0
- package/src/hydration/hydrator.ts +171 -97
- package/src/hydration/label.ts +106 -20
- package/src/index.ts +1 -3
- package/src/lexicon/index.ts +22 -137
- package/src/lexicon/lexicons.ts +502 -1598
- package/src/lexicon/types/app/bsky/actor/defs.ts +57 -1
- package/src/lexicon/types/app/bsky/embed/record.ts +2 -0
- package/src/lexicon/types/app/bsky/feed/defs.ts +1 -0
- package/src/lexicon/types/app/bsky/graph/defs.ts +3 -0
- package/src/lexicon/types/app/bsky/labeler/defs.ts +93 -0
- package/src/lexicon/types/{com/atproto/admin/searchRepos.ts → app/bsky/labeler/getServices.ts} +8 -8
- package/src/lexicon/types/app/bsky/labeler/service.ts +31 -0
- package/src/lexicon/types/com/atproto/admin/defs.ts +0 -694
- package/src/lexicon/types/com/atproto/label/defs.ts +78 -0
- package/src/proto/bsky_connect.ts +11 -0
- package/src/proto/bsky_pb.ts +146 -0
- package/src/util.ts +44 -0
- package/src/views/index.ts +76 -7
- package/src/views/types.ts +6 -3
- package/tests/__snapshots__/feed-generation.test.ts.snap +12 -0
- package/tests/_util.ts +21 -0
- package/tests/data-plane/__snapshots__/indexing.test.ts.snap +20 -0
- package/tests/label-hydration.test.ts +162 -0
- package/tests/views/__snapshots__/block-lists.test.ts.snap +7 -0
- package/tests/views/__snapshots__/labeler-service.test.ts.snap +160 -0
- package/tests/views/__snapshots__/mute-lists.test.ts.snap +10 -0
- package/tests/views/__snapshots__/profile.test.ts.snap +40 -0
- package/tests/views/__snapshots__/threadgating.test.ts.snap +2 -0
- package/tests/views/labeler-service.test.ts +156 -0
- package/tests/views/takedown-labels.test.ts +133 -0
- package/tests/views/timeline.test.ts +7 -2
- package/dist/data-plane/server/db/tables/moderation.d.ts +0 -42
- package/dist/lexicon/types/com/atproto/admin/createCommunicationTemplate.d.ts +0 -37
- package/dist/lexicon/types/com/atproto/admin/deleteCommunicationTemplate.d.ts +0 -25
- package/dist/lexicon/types/com/atproto/admin/emitModerationEvent.d.ts +0 -45
- package/dist/lexicon/types/com/atproto/admin/getModerationEvent.d.ts +0 -29
- package/dist/lexicon/types/com/atproto/admin/getRecord.d.ts +0 -31
- package/dist/lexicon/types/com/atproto/admin/getRepo.d.ts +0 -30
- package/dist/lexicon/types/com/atproto/admin/listCommunicationTemplates.d.ts +0 -31
- package/dist/lexicon/types/com/atproto/admin/queryModerationEvents.d.ts +0 -48
- package/dist/lexicon/types/com/atproto/admin/queryModerationStatuses.d.ts +0 -50
- package/dist/lexicon/types/com/atproto/admin/updateCommunicationTemplate.d.ts +0 -39
- package/src/data-plane/server/db/tables/moderation.ts +0 -59
- package/src/lexicon/types/com/atproto/admin/createCommunicationTemplate.ts +0 -54
- package/src/lexicon/types/com/atproto/admin/deleteCommunicationTemplate.ts +0 -38
- package/src/lexicon/types/com/atproto/admin/emitModerationEvent.ts +0 -67
- package/src/lexicon/types/com/atproto/admin/getModerationEvent.ts +0 -41
- package/src/lexicon/types/com/atproto/admin/getRecord.ts +0 -43
- package/src/lexicon/types/com/atproto/admin/getRepo.ts +0 -42
- package/src/lexicon/types/com/atproto/admin/listCommunicationTemplates.ts +0 -44
- package/src/lexicon/types/com/atproto/admin/queryModerationEvents.ts +0 -73
- package/src/lexicon/types/com/atproto/admin/queryModerationStatuses.ts +0 -74
- package/src/lexicon/types/com/atproto/admin/updateCommunicationTemplate.ts +0 -57
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import express from 'express';
|
|
2
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
|
|
3
|
-
import * as ComAtprotoAdminDefs from './defs';
|
|
4
|
-
export interface QueryParams {
|
|
5
|
-
}
|
|
6
|
-
export interface InputSchema {
|
|
7
|
-
id: string;
|
|
8
|
-
name?: string;
|
|
9
|
-
contentMarkdown?: string;
|
|
10
|
-
subject?: string;
|
|
11
|
-
updatedBy?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
[k: string]: unknown;
|
|
14
|
-
}
|
|
15
|
-
export type OutputSchema = ComAtprotoAdminDefs.CommunicationTemplateView;
|
|
16
|
-
export interface HandlerInput {
|
|
17
|
-
encoding: 'application/json';
|
|
18
|
-
body: InputSchema;
|
|
19
|
-
}
|
|
20
|
-
export interface HandlerSuccess {
|
|
21
|
-
encoding: 'application/json';
|
|
22
|
-
body: OutputSchema;
|
|
23
|
-
headers?: {
|
|
24
|
-
[key: string]: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface HandlerError {
|
|
28
|
-
status: number;
|
|
29
|
-
message?: string;
|
|
30
|
-
}
|
|
31
|
-
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
|
32
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
33
|
-
auth: HA;
|
|
34
|
-
params: QueryParams;
|
|
35
|
-
input: HandlerInput;
|
|
36
|
-
req: express.Request;
|
|
37
|
-
res: express.Response;
|
|
38
|
-
};
|
|
39
|
-
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Generated } from 'kysely'
|
|
2
|
-
import {
|
|
3
|
-
REVIEWCLOSED,
|
|
4
|
-
REVIEWOPEN,
|
|
5
|
-
REVIEWESCALATED,
|
|
6
|
-
} from '../../../../lexicon/types/com/atproto/admin/defs'
|
|
7
|
-
|
|
8
|
-
export const eventTableName = 'moderation_event'
|
|
9
|
-
export const subjectStatusTableName = 'moderation_subject_status'
|
|
10
|
-
|
|
11
|
-
export interface ModerationEvent {
|
|
12
|
-
id: Generated<number>
|
|
13
|
-
action:
|
|
14
|
-
| 'com.atproto.admin.defs#modEventTakedown'
|
|
15
|
-
| 'com.atproto.admin.defs#modEventAcknowledge'
|
|
16
|
-
| 'com.atproto.admin.defs#modEventEscalate'
|
|
17
|
-
| 'com.atproto.admin.defs#modEventComment'
|
|
18
|
-
| 'com.atproto.admin.defs#modEventLabel'
|
|
19
|
-
| 'com.atproto.admin.defs#modEventReport'
|
|
20
|
-
| 'com.atproto.admin.defs#modEventMute'
|
|
21
|
-
| 'com.atproto.admin.defs#modEventReverseTakedown'
|
|
22
|
-
| 'com.atproto.admin.defs#modEventEmail'
|
|
23
|
-
subjectType: 'com.atproto.admin.defs#repoRef' | 'com.atproto.repo.strongRef'
|
|
24
|
-
subjectDid: string
|
|
25
|
-
subjectUri: string | null
|
|
26
|
-
subjectCid: string | null
|
|
27
|
-
createLabelVals: string | null
|
|
28
|
-
negateLabelVals: string | null
|
|
29
|
-
comment: string | null
|
|
30
|
-
createdAt: string
|
|
31
|
-
createdBy: string
|
|
32
|
-
durationInHours: number | null
|
|
33
|
-
expiresAt: string | null
|
|
34
|
-
meta: Record<string, string | boolean> | null
|
|
35
|
-
legacyRefId: number | null
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface ModerationSubjectStatus {
|
|
39
|
-
id: Generated<number>
|
|
40
|
-
did: string
|
|
41
|
-
recordPath: string
|
|
42
|
-
recordCid: string | null
|
|
43
|
-
blobCids: string[] | null
|
|
44
|
-
reviewState: typeof REVIEWCLOSED | typeof REVIEWOPEN | typeof REVIEWESCALATED
|
|
45
|
-
createdAt: string
|
|
46
|
-
updatedAt: string
|
|
47
|
-
lastReviewedBy: string | null
|
|
48
|
-
lastReviewedAt: string | null
|
|
49
|
-
lastReportedAt: string | null
|
|
50
|
-
muteUntil: string | null
|
|
51
|
-
suspendUntil: string | null
|
|
52
|
-
takendown: boolean
|
|
53
|
-
comment: string | null
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export type PartialDB = {
|
|
57
|
-
[eventTableName]: ModerationEvent
|
|
58
|
-
[subjectStatusTableName]: ModerationSubjectStatus
|
|
59
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express'
|
|
5
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import { isObj, hasProp } from '../../../../util'
|
|
8
|
-
import { CID } from 'multiformats/cid'
|
|
9
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
-
import * as ComAtprotoAdminDefs from './defs'
|
|
11
|
-
|
|
12
|
-
export interface QueryParams {}
|
|
13
|
-
|
|
14
|
-
export interface InputSchema {
|
|
15
|
-
/** Name of the template. */
|
|
16
|
-
name: string
|
|
17
|
-
/** Content of the template, markdown supported, can contain variable placeholders. */
|
|
18
|
-
contentMarkdown: string
|
|
19
|
-
/** Subject of the message, used in emails. */
|
|
20
|
-
subject: string
|
|
21
|
-
/** DID of the user who is creating the template. */
|
|
22
|
-
createdBy?: string
|
|
23
|
-
[k: string]: unknown
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type OutputSchema = ComAtprotoAdminDefs.CommunicationTemplateView
|
|
27
|
-
|
|
28
|
-
export interface HandlerInput {
|
|
29
|
-
encoding: 'application/json'
|
|
30
|
-
body: InputSchema
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface HandlerSuccess {
|
|
34
|
-
encoding: 'application/json'
|
|
35
|
-
body: OutputSchema
|
|
36
|
-
headers?: { [key: string]: string }
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface HandlerError {
|
|
40
|
-
status: number
|
|
41
|
-
message?: string
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
45
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
46
|
-
auth: HA
|
|
47
|
-
params: QueryParams
|
|
48
|
-
input: HandlerInput
|
|
49
|
-
req: express.Request
|
|
50
|
-
res: express.Response
|
|
51
|
-
}
|
|
52
|
-
export type Handler<HA extends HandlerAuth = never> = (
|
|
53
|
-
ctx: HandlerReqCtx<HA>,
|
|
54
|
-
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express'
|
|
5
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import { isObj, hasProp } from '../../../../util'
|
|
8
|
-
import { CID } from 'multiformats/cid'
|
|
9
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
-
|
|
11
|
-
export interface QueryParams {}
|
|
12
|
-
|
|
13
|
-
export interface InputSchema {
|
|
14
|
-
id: string
|
|
15
|
-
[k: string]: unknown
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface HandlerInput {
|
|
19
|
-
encoding: 'application/json'
|
|
20
|
-
body: InputSchema
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface HandlerError {
|
|
24
|
-
status: number
|
|
25
|
-
message?: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type HandlerOutput = HandlerError | void
|
|
29
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
30
|
-
auth: HA
|
|
31
|
-
params: QueryParams
|
|
32
|
-
input: HandlerInput
|
|
33
|
-
req: express.Request
|
|
34
|
-
res: express.Response
|
|
35
|
-
}
|
|
36
|
-
export type Handler<HA extends HandlerAuth = never> = (
|
|
37
|
-
ctx: HandlerReqCtx<HA>,
|
|
38
|
-
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express'
|
|
5
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import { isObj, hasProp } from '../../../../util'
|
|
8
|
-
import { CID } from 'multiformats/cid'
|
|
9
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
-
import * as ComAtprotoAdminDefs from './defs'
|
|
11
|
-
import * as ComAtprotoRepoStrongRef from '../repo/strongRef'
|
|
12
|
-
|
|
13
|
-
export interface QueryParams {}
|
|
14
|
-
|
|
15
|
-
export interface InputSchema {
|
|
16
|
-
event:
|
|
17
|
-
| ComAtprotoAdminDefs.ModEventTakedown
|
|
18
|
-
| ComAtprotoAdminDefs.ModEventAcknowledge
|
|
19
|
-
| ComAtprotoAdminDefs.ModEventEscalate
|
|
20
|
-
| ComAtprotoAdminDefs.ModEventComment
|
|
21
|
-
| ComAtprotoAdminDefs.ModEventLabel
|
|
22
|
-
| ComAtprotoAdminDefs.ModEventReport
|
|
23
|
-
| ComAtprotoAdminDefs.ModEventMute
|
|
24
|
-
| ComAtprotoAdminDefs.ModEventReverseTakedown
|
|
25
|
-
| ComAtprotoAdminDefs.ModEventUnmute
|
|
26
|
-
| ComAtprotoAdminDefs.ModEventEmail
|
|
27
|
-
| ComAtprotoAdminDefs.ModEventTag
|
|
28
|
-
| { $type: string; [k: string]: unknown }
|
|
29
|
-
subject:
|
|
30
|
-
| ComAtprotoAdminDefs.RepoRef
|
|
31
|
-
| ComAtprotoRepoStrongRef.Main
|
|
32
|
-
| { $type: string; [k: string]: unknown }
|
|
33
|
-
subjectBlobCids?: string[]
|
|
34
|
-
createdBy: string
|
|
35
|
-
[k: string]: unknown
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type OutputSchema = ComAtprotoAdminDefs.ModEventView
|
|
39
|
-
|
|
40
|
-
export interface HandlerInput {
|
|
41
|
-
encoding: 'application/json'
|
|
42
|
-
body: InputSchema
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface HandlerSuccess {
|
|
46
|
-
encoding: 'application/json'
|
|
47
|
-
body: OutputSchema
|
|
48
|
-
headers?: { [key: string]: string }
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface HandlerError {
|
|
52
|
-
status: number
|
|
53
|
-
message?: string
|
|
54
|
-
error?: 'SubjectHasAction'
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
58
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
59
|
-
auth: HA
|
|
60
|
-
params: QueryParams
|
|
61
|
-
input: HandlerInput
|
|
62
|
-
req: express.Request
|
|
63
|
-
res: express.Response
|
|
64
|
-
}
|
|
65
|
-
export type Handler<HA extends HandlerAuth = never> = (
|
|
66
|
-
ctx: HandlerReqCtx<HA>,
|
|
67
|
-
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express'
|
|
5
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import { isObj, hasProp } from '../../../../util'
|
|
8
|
-
import { CID } from 'multiformats/cid'
|
|
9
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
-
import * as ComAtprotoAdminDefs from './defs'
|
|
11
|
-
|
|
12
|
-
export interface QueryParams {
|
|
13
|
-
id: number
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type InputSchema = undefined
|
|
17
|
-
export type OutputSchema = ComAtprotoAdminDefs.ModEventViewDetail
|
|
18
|
-
export type HandlerInput = undefined
|
|
19
|
-
|
|
20
|
-
export interface HandlerSuccess {
|
|
21
|
-
encoding: 'application/json'
|
|
22
|
-
body: OutputSchema
|
|
23
|
-
headers?: { [key: string]: string }
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface HandlerError {
|
|
27
|
-
status: number
|
|
28
|
-
message?: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
32
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
33
|
-
auth: HA
|
|
34
|
-
params: QueryParams
|
|
35
|
-
input: HandlerInput
|
|
36
|
-
req: express.Request
|
|
37
|
-
res: express.Response
|
|
38
|
-
}
|
|
39
|
-
export type Handler<HA extends HandlerAuth = never> = (
|
|
40
|
-
ctx: HandlerReqCtx<HA>,
|
|
41
|
-
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express'
|
|
5
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import { isObj, hasProp } from '../../../../util'
|
|
8
|
-
import { CID } from 'multiformats/cid'
|
|
9
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
-
import * as ComAtprotoAdminDefs from './defs'
|
|
11
|
-
|
|
12
|
-
export interface QueryParams {
|
|
13
|
-
uri: string
|
|
14
|
-
cid?: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type InputSchema = undefined
|
|
18
|
-
export type OutputSchema = ComAtprotoAdminDefs.RecordViewDetail
|
|
19
|
-
export type HandlerInput = undefined
|
|
20
|
-
|
|
21
|
-
export interface HandlerSuccess {
|
|
22
|
-
encoding: 'application/json'
|
|
23
|
-
body: OutputSchema
|
|
24
|
-
headers?: { [key: string]: string }
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface HandlerError {
|
|
28
|
-
status: number
|
|
29
|
-
message?: string
|
|
30
|
-
error?: 'RecordNotFound'
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
34
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
35
|
-
auth: HA
|
|
36
|
-
params: QueryParams
|
|
37
|
-
input: HandlerInput
|
|
38
|
-
req: express.Request
|
|
39
|
-
res: express.Response
|
|
40
|
-
}
|
|
41
|
-
export type Handler<HA extends HandlerAuth = never> = (
|
|
42
|
-
ctx: HandlerReqCtx<HA>,
|
|
43
|
-
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express'
|
|
5
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import { isObj, hasProp } from '../../../../util'
|
|
8
|
-
import { CID } from 'multiformats/cid'
|
|
9
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
-
import * as ComAtprotoAdminDefs from './defs'
|
|
11
|
-
|
|
12
|
-
export interface QueryParams {
|
|
13
|
-
did: string
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type InputSchema = undefined
|
|
17
|
-
export type OutputSchema = ComAtprotoAdminDefs.RepoViewDetail
|
|
18
|
-
export type HandlerInput = undefined
|
|
19
|
-
|
|
20
|
-
export interface HandlerSuccess {
|
|
21
|
-
encoding: 'application/json'
|
|
22
|
-
body: OutputSchema
|
|
23
|
-
headers?: { [key: string]: string }
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface HandlerError {
|
|
27
|
-
status: number
|
|
28
|
-
message?: string
|
|
29
|
-
error?: 'RepoNotFound'
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
33
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
34
|
-
auth: HA
|
|
35
|
-
params: QueryParams
|
|
36
|
-
input: HandlerInput
|
|
37
|
-
req: express.Request
|
|
38
|
-
res: express.Response
|
|
39
|
-
}
|
|
40
|
-
export type Handler<HA extends HandlerAuth = never> = (
|
|
41
|
-
ctx: HandlerReqCtx<HA>,
|
|
42
|
-
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express'
|
|
5
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import { isObj, hasProp } from '../../../../util'
|
|
8
|
-
import { CID } from 'multiformats/cid'
|
|
9
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
-
import * as ComAtprotoAdminDefs from './defs'
|
|
11
|
-
|
|
12
|
-
export interface QueryParams {}
|
|
13
|
-
|
|
14
|
-
export type InputSchema = undefined
|
|
15
|
-
|
|
16
|
-
export interface OutputSchema {
|
|
17
|
-
communicationTemplates: ComAtprotoAdminDefs.CommunicationTemplateView[]
|
|
18
|
-
[k: string]: unknown
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type HandlerInput = undefined
|
|
22
|
-
|
|
23
|
-
export interface HandlerSuccess {
|
|
24
|
-
encoding: 'application/json'
|
|
25
|
-
body: OutputSchema
|
|
26
|
-
headers?: { [key: string]: string }
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface HandlerError {
|
|
30
|
-
status: number
|
|
31
|
-
message?: string
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
35
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
36
|
-
auth: HA
|
|
37
|
-
params: QueryParams
|
|
38
|
-
input: HandlerInput
|
|
39
|
-
req: express.Request
|
|
40
|
-
res: express.Response
|
|
41
|
-
}
|
|
42
|
-
export type Handler<HA extends HandlerAuth = never> = (
|
|
43
|
-
ctx: HandlerReqCtx<HA>,
|
|
44
|
-
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express'
|
|
5
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import { isObj, hasProp } from '../../../../util'
|
|
8
|
-
import { CID } from 'multiformats/cid'
|
|
9
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
-
import * as ComAtprotoAdminDefs from './defs'
|
|
11
|
-
|
|
12
|
-
export interface QueryParams {
|
|
13
|
-
/** The types of events (fully qualified string in the format of com.atproto.admin#modEvent<name>) to filter by. If not specified, all events are returned. */
|
|
14
|
-
types?: string[]
|
|
15
|
-
createdBy?: string
|
|
16
|
-
/** Sort direction for the events. Defaults to descending order of created at timestamp. */
|
|
17
|
-
sortDirection: 'asc' | 'desc'
|
|
18
|
-
/** Retrieve events created after a given timestamp */
|
|
19
|
-
createdAfter?: string
|
|
20
|
-
/** Retrieve events created before a given timestamp */
|
|
21
|
-
createdBefore?: string
|
|
22
|
-
subject?: string
|
|
23
|
-
/** If true, events on all record types (posts, lists, profile etc.) owned by the did are returned */
|
|
24
|
-
includeAllUserRecords: boolean
|
|
25
|
-
limit: number
|
|
26
|
-
/** If true, only events with comments are returned */
|
|
27
|
-
hasComment?: boolean
|
|
28
|
-
/** If specified, only events with comments containing the keyword are returned */
|
|
29
|
-
comment?: string
|
|
30
|
-
/** If specified, only events where all of these labels were added are returned */
|
|
31
|
-
addedLabels?: string[]
|
|
32
|
-
/** If specified, only events where all of these labels were removed are returned */
|
|
33
|
-
removedLabels?: string[]
|
|
34
|
-
/** If specified, only events where all of these tags were added are returned */
|
|
35
|
-
addedTags?: string[]
|
|
36
|
-
/** If specified, only events where all of these tags were removed are returned */
|
|
37
|
-
removedTags?: string[]
|
|
38
|
-
reportTypes?: string[]
|
|
39
|
-
cursor?: string
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type InputSchema = undefined
|
|
43
|
-
|
|
44
|
-
export interface OutputSchema {
|
|
45
|
-
cursor?: string
|
|
46
|
-
events: ComAtprotoAdminDefs.ModEventView[]
|
|
47
|
-
[k: string]: unknown
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export type HandlerInput = undefined
|
|
51
|
-
|
|
52
|
-
export interface HandlerSuccess {
|
|
53
|
-
encoding: 'application/json'
|
|
54
|
-
body: OutputSchema
|
|
55
|
-
headers?: { [key: string]: string }
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface HandlerError {
|
|
59
|
-
status: number
|
|
60
|
-
message?: string
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
64
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
65
|
-
auth: HA
|
|
66
|
-
params: QueryParams
|
|
67
|
-
input: HandlerInput
|
|
68
|
-
req: express.Request
|
|
69
|
-
res: express.Response
|
|
70
|
-
}
|
|
71
|
-
export type Handler<HA extends HandlerAuth = never> = (
|
|
72
|
-
ctx: HandlerReqCtx<HA>,
|
|
73
|
-
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express'
|
|
5
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import { isObj, hasProp } from '../../../../util'
|
|
8
|
-
import { CID } from 'multiformats/cid'
|
|
9
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
-
import * as ComAtprotoAdminDefs from './defs'
|
|
11
|
-
|
|
12
|
-
export interface QueryParams {
|
|
13
|
-
subject?: string
|
|
14
|
-
/** Search subjects by keyword from comments */
|
|
15
|
-
comment?: string
|
|
16
|
-
/** Search subjects reported after a given timestamp */
|
|
17
|
-
reportedAfter?: string
|
|
18
|
-
/** Search subjects reported before a given timestamp */
|
|
19
|
-
reportedBefore?: string
|
|
20
|
-
/** Search subjects reviewed after a given timestamp */
|
|
21
|
-
reviewedAfter?: string
|
|
22
|
-
/** Search subjects reviewed before a given timestamp */
|
|
23
|
-
reviewedBefore?: string
|
|
24
|
-
/** By default, we don't include muted subjects in the results. Set this to true to include them. */
|
|
25
|
-
includeMuted?: boolean
|
|
26
|
-
/** Specify when fetching subjects in a certain state */
|
|
27
|
-
reviewState?: string
|
|
28
|
-
ignoreSubjects?: string[]
|
|
29
|
-
/** Get all subject statuses that were reviewed by a specific moderator */
|
|
30
|
-
lastReviewedBy?: string
|
|
31
|
-
sortField: 'lastReviewedAt' | 'lastReportedAt'
|
|
32
|
-
sortDirection: 'asc' | 'desc'
|
|
33
|
-
/** Get subjects that were taken down */
|
|
34
|
-
takendown?: boolean
|
|
35
|
-
/** Get subjects in unresolved appealed status */
|
|
36
|
-
appealed?: boolean
|
|
37
|
-
limit: number
|
|
38
|
-
tags?: string[]
|
|
39
|
-
excludeTags?: string[]
|
|
40
|
-
cursor?: string
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export type InputSchema = undefined
|
|
44
|
-
|
|
45
|
-
export interface OutputSchema {
|
|
46
|
-
cursor?: string
|
|
47
|
-
subjectStatuses: ComAtprotoAdminDefs.SubjectStatusView[]
|
|
48
|
-
[k: string]: unknown
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export type HandlerInput = undefined
|
|
52
|
-
|
|
53
|
-
export interface HandlerSuccess {
|
|
54
|
-
encoding: 'application/json'
|
|
55
|
-
body: OutputSchema
|
|
56
|
-
headers?: { [key: string]: string }
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface HandlerError {
|
|
60
|
-
status: number
|
|
61
|
-
message?: string
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
65
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
66
|
-
auth: HA
|
|
67
|
-
params: QueryParams
|
|
68
|
-
input: HandlerInput
|
|
69
|
-
req: express.Request
|
|
70
|
-
res: express.Response
|
|
71
|
-
}
|
|
72
|
-
export type Handler<HA extends HandlerAuth = never> = (
|
|
73
|
-
ctx: HandlerReqCtx<HA>,
|
|
74
|
-
) => Promise<HandlerOutput> | HandlerOutput
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GENERATED CODE - DO NOT MODIFY
|
|
3
|
-
*/
|
|
4
|
-
import express from 'express'
|
|
5
|
-
import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
|
6
|
-
import { lexicons } from '../../../../lexicons'
|
|
7
|
-
import { isObj, hasProp } from '../../../../util'
|
|
8
|
-
import { CID } from 'multiformats/cid'
|
|
9
|
-
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server'
|
|
10
|
-
import * as ComAtprotoAdminDefs from './defs'
|
|
11
|
-
|
|
12
|
-
export interface QueryParams {}
|
|
13
|
-
|
|
14
|
-
export interface InputSchema {
|
|
15
|
-
/** ID of the template to be updated. */
|
|
16
|
-
id: string
|
|
17
|
-
/** Name of the template. */
|
|
18
|
-
name?: string
|
|
19
|
-
/** Content of the template, markdown supported, can contain variable placeholders. */
|
|
20
|
-
contentMarkdown?: string
|
|
21
|
-
/** Subject of the message, used in emails. */
|
|
22
|
-
subject?: string
|
|
23
|
-
/** DID of the user who is updating the template. */
|
|
24
|
-
updatedBy?: string
|
|
25
|
-
disabled?: boolean
|
|
26
|
-
[k: string]: unknown
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export type OutputSchema = ComAtprotoAdminDefs.CommunicationTemplateView
|
|
30
|
-
|
|
31
|
-
export interface HandlerInput {
|
|
32
|
-
encoding: 'application/json'
|
|
33
|
-
body: InputSchema
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface HandlerSuccess {
|
|
37
|
-
encoding: 'application/json'
|
|
38
|
-
body: OutputSchema
|
|
39
|
-
headers?: { [key: string]: string }
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface HandlerError {
|
|
43
|
-
status: number
|
|
44
|
-
message?: string
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough
|
|
48
|
-
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
|
49
|
-
auth: HA
|
|
50
|
-
params: QueryParams
|
|
51
|
-
input: HandlerInput
|
|
52
|
-
req: express.Request
|
|
53
|
-
res: express.Response
|
|
54
|
-
}
|
|
55
|
-
export type Handler<HA extends HandlerAuth = never> = (
|
|
56
|
-
ctx: HandlerReqCtx<HA>,
|
|
57
|
-
) => Promise<HandlerOutput> | HandlerOutput
|