update lexicons & docs

This commit is contained in:
dholms 2023-05-12 17:22:13 -05:00
parent c936d5ae9e
commit bc753388c3
21 changed files with 1313 additions and 141 deletions

View File

@ -64,18 +64,12 @@ The skeleton that a Feed Generator puts together is, in its simplest form, a lis
]
```
However, we include two locations to attach some additional context. Here is the full schema:
However, we include an additionl location to attach some context. Here is the full schema:
```ts
type SkeletonItem = {
post: string // post URI
// optional metadata about the thread that this post is in reply to
replyTo?: {
root: string, // reply root URI
parent: string, // reply parent URI
}
// optional reason for inclusion in the feed
// (generally to be displayed in client)
reason?: Reason
@ -86,8 +80,7 @@ type Reason = ReasonRepost
type ReasonRepost = {
$type: 'app.bsky.feed.defs#skeletonReasonRepost'
by: string // the did of the reposting user
indexedAt: string // the time that the repost took place
repost: string // repost URI
}
```

View File

@ -42,13 +42,6 @@ export default function (server: Server, ctx: AppContext) {
const feed = res.map((row) => ({
post: row.uri,
replyTo:
row.replyParent && row.replyRoot
? {
root: row.replyRoot,
parent: row.replyParent,
}
: undefined,
}))
let cursor: string | undefined

View File

@ -9,7 +9,9 @@ import {
StreamAuthVerifier,
} from '@atproto/xrpc-server'
import { schemas } from './lexicons'
import * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites'
import * as ComAtprotoAdminDisableInviteCodes from './types/com/atproto/admin/disableInviteCodes'
import * as ComAtprotoAdminEnableAccountInvites from './types/com/atproto/admin/enableAccountInvites'
import * as ComAtprotoAdminGetInviteCodes from './types/com/atproto/admin/getInviteCodes'
import * as ComAtprotoAdminGetModerationAction from './types/com/atproto/admin/getModerationAction'
import * as ComAtprotoAdminGetModerationActions from './types/com/atproto/admin/getModerationActions'
@ -35,6 +37,7 @@ import * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRe
import * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord'
import * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords'
import * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord'
import * as ComAtprotoRepoRebaseRepo from './types/com/atproto/repo/rebaseRepo'
import * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob'
import * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount'
import * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword'
@ -70,6 +73,7 @@ import * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestio
import * as AppBskyActorSearchActors from './types/app/bsky/actor/searchActors'
import * as AppBskyActorSearchActorsTypeahead from './types/app/bsky/actor/searchActorsTypeahead'
import * as AppBskyFeedBookmarkFeed from './types/app/bsky/feed/bookmarkFeed'
import * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds'
import * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed'
import * as AppBskyFeedGetBookmarkedFeeds from './types/app/bsky/feed/getBookmarkedFeeds'
import * as AppBskyFeedGetFeed from './types/app/bsky/feed/getFeed'
@ -83,9 +87,14 @@ import * as AppBskyFeedUnbookmarkFeed from './types/app/bsky/feed/unbookmarkFeed
import * as AppBskyGraphGetBlocks from './types/app/bsky/graph/getBlocks'
import * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers'
import * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows'
import * as AppBskyGraphGetList from './types/app/bsky/graph/getList'
import * as AppBskyGraphGetListMutes from './types/app/bsky/graph/getListMutes'
import * as AppBskyGraphGetLists from './types/app/bsky/graph/getLists'
import * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes'
import * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor'
import * as AppBskyGraphMuteActorList from './types/app/bsky/graph/muteActorList'
import * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor'
import * as AppBskyGraphUnmuteActorList from './types/app/bsky/graph/unmuteActorList'
import * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount'
import * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications'
import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen'
@ -105,9 +114,8 @@ export const COM_ATPROTO_MODERATION = {
DefsReasonRude: 'com.atproto.moderation.defs#reasonRude',
DefsReasonOther: 'com.atproto.moderation.defs#reasonOther',
}
export const APP_BSKY_ACTOR = {
DefsUser: 'app.bsky.actor.defs#user',
DefsFeedGenerator: 'app.bsky.actor.defs#feedGenerator',
export const APP_BSKY_GRAPH = {
DefsModlist: 'app.bsky.graph.defs#modlist',
}
export function createServer(options?: XrpcOptions): Server {
@ -165,6 +173,16 @@ export class AdminNS {
this._server = server
}
disableAccountInvites<AV extends AuthVerifier>(
cfg: ConfigOf<
AV,
ComAtprotoAdminDisableAccountInvites.Handler<ExtractAuth<AV>>
>,
) {
const nsid = 'com.atproto.admin.disableAccountInvites' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}
disableInviteCodes<AV extends AuthVerifier>(
cfg: ConfigOf<
AV,
@ -175,6 +193,16 @@ export class AdminNS {
return this._server.xrpc.method(nsid, cfg)
}
enableAccountInvites<AV extends AuthVerifier>(
cfg: ConfigOf<
AV,
ComAtprotoAdminEnableAccountInvites.Handler<ExtractAuth<AV>>
>,
) {
const nsid = 'com.atproto.admin.enableAccountInvites' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}
getInviteCodes<AV extends AuthVerifier>(
cfg: ConfigOf<AV, ComAtprotoAdminGetInviteCodes.Handler<ExtractAuth<AV>>>,
) {
@ -412,6 +440,13 @@ export class RepoNS {
return this._server.xrpc.method(nsid, cfg)
}
rebaseRepo<AV extends AuthVerifier>(
cfg: ConfigOf<AV, ComAtprotoRepoRebaseRepo.Handler<ExtractAuth<AV>>>,
) {
const nsid = 'com.atproto.repo.rebaseRepo' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}
uploadBlob<AV extends AuthVerifier>(
cfg: ConfigOf<AV, ComAtprotoRepoUploadBlob.Handler<ExtractAuth<AV>>>,
) {
@ -756,6 +791,13 @@ export class FeedNS {
return this._server.xrpc.method(nsid, cfg)
}
getActorFeeds<AV extends AuthVerifier>(
cfg: ConfigOf<AV, AppBskyFeedGetActorFeeds.Handler<ExtractAuth<AV>>>,
) {
const nsid = 'app.bsky.feed.getActorFeeds' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}
getAuthorFeed<AV extends AuthVerifier>(
cfg: ConfigOf<AV, AppBskyFeedGetAuthorFeed.Handler<ExtractAuth<AV>>>,
) {
@ -855,6 +897,27 @@ export class GraphNS {
return this._server.xrpc.method(nsid, cfg)
}
getList<AV extends AuthVerifier>(
cfg: ConfigOf<AV, AppBskyGraphGetList.Handler<ExtractAuth<AV>>>,
) {
const nsid = 'app.bsky.graph.getList' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}
getListMutes<AV extends AuthVerifier>(
cfg: ConfigOf<AV, AppBskyGraphGetListMutes.Handler<ExtractAuth<AV>>>,
) {
const nsid = 'app.bsky.graph.getListMutes' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}
getLists<AV extends AuthVerifier>(
cfg: ConfigOf<AV, AppBskyGraphGetLists.Handler<ExtractAuth<AV>>>,
) {
const nsid = 'app.bsky.graph.getLists' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}
getMutes<AV extends AuthVerifier>(
cfg: ConfigOf<AV, AppBskyGraphGetMutes.Handler<ExtractAuth<AV>>>,
) {
@ -869,12 +932,26 @@ export class GraphNS {
return this._server.xrpc.method(nsid, cfg)
}
muteActorList<AV extends AuthVerifier>(
cfg: ConfigOf<AV, AppBskyGraphMuteActorList.Handler<ExtractAuth<AV>>>,
) {
const nsid = 'app.bsky.graph.muteActorList' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}
unmuteActor<AV extends AuthVerifier>(
cfg: ConfigOf<AV, AppBskyGraphUnmuteActor.Handler<ExtractAuth<AV>>>,
) {
const nsid = 'app.bsky.graph.unmuteActor' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}
unmuteActorList<AV extends AuthVerifier>(
cfg: ConfigOf<AV, AppBskyGraphUnmuteActorList.Handler<ExtractAuth<AV>>>,
) {
const nsid = 'app.bsky.graph.unmuteActorList' // @ts-ignore
return this._server.xrpc.method(nsid, cfg)
}
}
export class NotificationNS {

View File

@ -333,6 +333,9 @@ export const schemaDict = {
type: 'ref',
ref: 'lex:com.atproto.server.defs#inviteCode',
},
invitesDisabled: {
type: 'boolean',
},
},
},
repoViewDetail: {
@ -388,6 +391,9 @@ export const schemaDict = {
ref: 'lex:com.atproto.server.defs#inviteCode',
},
},
invitesDisabled: {
type: 'boolean',
},
},
},
repoRef: {
@ -589,6 +595,30 @@ export const schemaDict = {
},
},
},
ComAtprotoAdminDisableAccountInvites: {
lexicon: 1,
id: 'com.atproto.admin.disableAccountInvites',
defs: {
main: {
type: 'procedure',
description:
'Disable an account from receiving new invite codes, but does not invalidate existing codes',
input: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['account'],
properties: {
account: {
type: 'string',
format: 'did',
},
},
},
},
},
},
},
ComAtprotoAdminDisableInviteCodes: {
lexicon: 1,
id: 'com.atproto.admin.disableInviteCodes',
@ -620,6 +650,29 @@ export const schemaDict = {
},
},
},
ComAtprotoAdminEnableAccountInvites: {
lexicon: 1,
id: 'com.atproto.admin.enableAccountInvites',
defs: {
main: {
type: 'procedure',
description: 'Re-enable an accounts ability to receive invite codes',
input: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['account'],
properties: {
account: {
type: 'string',
format: 'did',
},
},
},
},
},
},
},
ComAtprotoAdminGetInviteCodes: {
lexicon: 1,
id: 'com.atproto.admin.getInviteCodes',
@ -1959,6 +2012,41 @@ export const schemaDict = {
},
},
},
ComAtprotoRepoRebaseRepo: {
lexicon: 1,
id: 'com.atproto.repo.rebaseRepo',
defs: {
main: {
type: 'procedure',
description: 'Simple rebase of repo that deletes history',
input: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['repo'],
properties: {
repo: {
type: 'string',
format: 'at-identifier',
description: 'The handle or DID of the repo.',
},
swapCommit: {
type: 'string',
format: 'cid',
description:
'Compare and swap with the previous commit by cid.',
},
},
},
},
errors: [
{
name: 'InvalidSwap',
},
],
},
},
},
ComAtprotoRepoStrongRef: {
lexicon: 1,
id: 'com.atproto.repo.strongRef',
@ -3285,10 +3373,6 @@ export const schemaDict = {
avatar: {
type: 'string',
},
actorType: {
type: 'ref',
ref: 'lex:app.bsky.actor.defs#actorType',
},
viewer: {
type: 'ref',
ref: 'lex:app.bsky.actor.defs#viewerState',
@ -3327,10 +3411,6 @@ export const schemaDict = {
avatar: {
type: 'string',
},
actorType: {
type: 'ref',
ref: 'lex:app.bsky.actor.defs#actorType',
},
indexedAt: {
type: 'string',
format: 'datetime',
@ -3373,14 +3453,6 @@ export const schemaDict = {
avatar: {
type: 'string',
},
actorType: {
type: 'ref',
ref: 'lex:app.bsky.actor.defs#actorType',
},
actorInfo: {
type: 'union',
refs: ['lex:app.bsky.actor.defs#infoFeedGenerator'],
},
banner: {
type: 'string',
},
@ -3416,6 +3488,10 @@ export const schemaDict = {
muted: {
type: 'boolean',
},
mutedByList: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#listViewBasic',
},
blockedBy: {
type: 'boolean',
},
@ -3433,32 +3509,6 @@ export const schemaDict = {
},
},
},
infoFeedGenerator: {
type: 'object',
required: ['likes'],
properties: {
likes: {
type: 'integer',
},
},
},
actorType: {
type: 'string',
knownValues: [
'app.bsky.actor.defs#user',
'app.bsky.actor.defs#feedGenerator',
],
},
user: {
type: 'token',
description:
'Actor type: User. This is the default option and an actor is assumed to be a user unless suggested otherwise.',
},
feedGenerator: {
type: 'token',
description:
'Actor type: Feed Generator. A service that provides a custom feed.',
},
},
},
AppBskyActorGetProfile: {
@ -3973,7 +4023,7 @@ export const schemaDict = {
properties: {
feed: {
type: 'string',
format: 'at-identifier',
format: 'at-uri',
},
},
},
@ -4163,6 +4213,62 @@ export const schemaDict = {
},
},
},
generatorView: {
type: 'object',
required: ['uri', 'creator', 'indexedAt'],
properties: {
uri: {
type: 'string',
format: 'at-uri',
},
did: {
type: 'string',
format: 'did',
},
creator: {
type: 'ref',
ref: 'lex:app.bsky.actor.defs#profileView',
},
displayName: {
type: 'string',
},
description: {
type: 'string',
maxGraphemes: 300,
maxLength: 3000,
},
descriptionFacets: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.richtext.facet',
},
},
avatar: {
type: 'string',
},
viewer: {
type: 'ref',
ref: 'lex:app.bsky.feed.defs#generatorViewerState',
},
indexedAt: {
type: 'string',
format: 'datetime',
},
},
},
generatorViewerState: {
type: 'object',
properties: {
subscribed: {
type: 'boolean',
},
like: {
type: 'string',
format: 'at-uri',
},
},
},
skeletonFeedPost: {
type: 'object',
required: ['post'],
@ -4171,41 +4277,114 @@ export const schemaDict = {
type: 'string',
format: 'at-uri',
},
replyTo: {
type: 'ref',
ref: 'lex:app.bsky.feed.defs#skeletonReplyRef',
},
reason: {
type: 'union',
refs: ['lex:app.bsky.feed.defs#skeletonReasonRepost'],
},
},
},
skeletonReplyRef: {
skeletonReasonRepost: {
type: 'object',
required: ['root', 'parent'],
required: ['repost'],
properties: {
root: {
type: 'string',
ref: 'at-uri',
},
parent: {
repost: {
type: 'string',
ref: 'at-uri',
},
},
},
skeletonReasonRepost: {
type: 'object',
required: ['by', 'indexedAt'],
properties: {
by: {
type: 'string',
format: 'did',
},
},
AppBskyFeedGenerator: {
lexicon: 1,
id: 'app.bsky.feed.generator',
defs: {
main: {
type: 'record',
description: 'A declaration of the existence of a feed generator',
key: 'any',
record: {
type: 'object',
required: ['did', 'createdAt'],
properties: {
did: {
type: 'string',
format: 'did',
},
displayName: {
type: 'string',
maxGraphemes: 64,
maxLength: 640,
},
description: {
type: 'string',
maxGraphemes: 300,
maxLength: 3000,
},
descriptionFacets: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.richtext.facet',
},
},
avatar: {
type: 'blob',
accept: ['image/png', 'image/jpeg'],
maxSize: 1000000,
},
createdAt: {
type: 'string',
format: 'datetime',
},
},
indexedAt: {
type: 'string',
format: 'datetime',
},
},
},
},
AppBskyFeedGetActorFeeds: {
lexicon: 1,
id: 'app.bsky.feed.getActorFeeds',
defs: {
main: {
type: 'query',
description: 'Retrieve a list of feeds created by a given actor',
parameters: {
type: 'params',
required: ['actor'],
properties: {
actor: {
type: 'string',
format: 'at-identifier',
},
limit: {
type: 'integer',
minimum: 1,
maximum: 100,
default: 50,
},
cursor: {
type: 'string',
},
},
},
output: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['feeds'],
properties: {
cursor: {
type: 'string',
},
feeds: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.feed.defs#generatorView',
},
},
},
},
},
},
@ -4302,7 +4481,7 @@ export const schemaDict = {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.actor.defs#profileView',
ref: 'lex:app.bsky.feed.defs#generatorView',
},
},
},
@ -4325,7 +4504,7 @@ export const schemaDict = {
properties: {
feed: {
type: 'string',
format: 'at-identifier',
format: 'at-uri',
},
limit: {
type: 'integer',
@ -4373,6 +4552,7 @@ export const schemaDict = {
properties: {
feed: {
type: 'string',
format: 'at-uri',
},
limit: {
type: 'integer',
@ -4837,7 +5017,7 @@ export const schemaDict = {
properties: {
feed: {
type: 'string',
format: 'at-identifier',
format: 'at-uri',
},
},
},
@ -4870,6 +5050,115 @@ export const schemaDict = {
},
},
},
AppBskyGraphDefs: {
lexicon: 1,
id: 'app.bsky.graph.defs',
defs: {
listViewBasic: {
type: 'object',
required: ['uri', 'creator', 'name', 'purpose'],
properties: {
uri: {
type: 'string',
format: 'at-uri',
},
name: {
type: 'string',
maxLength: 64,
minLength: 1,
},
purpose: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#listPurpose',
},
avatar: {
type: 'string',
},
viewer: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#listViewerState',
},
indexedAt: {
type: 'string',
format: 'datetime',
},
},
},
listView: {
type: 'object',
required: ['uri', 'creator', 'name', 'purpose', 'indexedAt'],
properties: {
uri: {
type: 'string',
format: 'at-uri',
},
creator: {
type: 'ref',
ref: 'lex:app.bsky.actor.defs#profileView',
},
name: {
type: 'string',
maxLength: 64,
minLength: 1,
},
purpose: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#listPurpose',
},
description: {
type: 'string',
maxGraphemes: 300,
maxLength: 3000,
},
descriptionFacets: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.richtext.facet',
},
},
avatar: {
type: 'string',
},
viewer: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#listViewerState',
},
indexedAt: {
type: 'string',
format: 'datetime',
},
},
},
listItemView: {
type: 'object',
required: ['subject'],
properties: {
subject: {
type: 'ref',
ref: 'lex:app.bsky.actor.defs#profileView',
},
},
},
listPurpose: {
type: 'string',
knownValues: ['app.bsky.graph.defs#modlist'],
},
modlist: {
type: 'token',
description:
'A list of actors to apply an aggregate moderation action (mute/block) on',
},
listViewerState: {
type: 'object',
properties: {
muted: {
type: 'boolean',
},
},
},
},
},
AppBskyGraphFollow: {
lexicon: 1,
id: 'app.bsky.graph.follow',
@ -5042,6 +5331,149 @@ export const schemaDict = {
},
},
},
AppBskyGraphGetList: {
lexicon: 1,
id: 'app.bsky.graph.getList',
defs: {
main: {
type: 'query',
description: 'Fetch a list of actors',
parameters: {
type: 'params',
required: ['list'],
properties: {
list: {
type: 'string',
format: 'at-uri',
},
limit: {
type: 'integer',
minimum: 1,
maximum: 100,
default: 50,
},
cursor: {
type: 'string',
},
},
},
output: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['list', 'items'],
properties: {
cursor: {
type: 'string',
},
list: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#listView',
},
items: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#listItemView',
},
},
},
},
},
},
},
},
AppBskyGraphGetListMutes: {
lexicon: 1,
id: 'app.bsky.graph.getListMutes',
defs: {
main: {
type: 'query',
description: "Which lists is the requester's account muting?",
parameters: {
type: 'params',
properties: {
limit: {
type: 'integer',
minimum: 1,
maximum: 100,
default: 50,
},
cursor: {
type: 'string',
},
},
},
output: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['lists'],
properties: {
cursor: {
type: 'string',
},
lists: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#listView',
},
},
},
},
},
},
},
},
AppBskyGraphGetLists: {
lexicon: 1,
id: 'app.bsky.graph.getLists',
defs: {
main: {
type: 'query',
description: 'Fetch a list of lists that belong to an actor',
parameters: {
type: 'params',
required: ['actor'],
properties: {
actor: {
type: 'string',
format: 'at-identifier',
},
limit: {
type: 'integer',
minimum: 1,
maximum: 100,
default: 50,
},
cursor: {
type: 'string',
},
},
},
output: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['lists'],
properties: {
cursor: {
type: 'string',
},
lists: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#listView',
},
},
},
},
},
},
},
},
AppBskyGraphGetMutes: {
lexicon: 1,
id: 'app.bsky.graph.getMutes',
@ -5085,6 +5517,82 @@ export const schemaDict = {
},
},
},
AppBskyGraphList: {
lexicon: 1,
id: 'app.bsky.graph.list',
defs: {
main: {
type: 'record',
description: 'A declaration of a list of actors.',
key: 'tid',
record: {
type: 'object',
required: ['name', 'purpose', 'createdAt'],
properties: {
purpose: {
type: 'ref',
ref: 'lex:app.bsky.graph.defs#listPurpose',
},
name: {
type: 'string',
maxLength: 64,
minLength: 1,
},
description: {
type: 'string',
maxGraphemes: 300,
maxLength: 3000,
},
descriptionFacets: {
type: 'array',
items: {
type: 'ref',
ref: 'lex:app.bsky.richtext.facet',
},
},
avatar: {
type: 'blob',
accept: ['image/png', 'image/jpeg'],
maxSize: 1000000,
},
createdAt: {
type: 'string',
format: 'datetime',
},
},
},
},
},
},
AppBskyGraphListitem: {
lexicon: 1,
id: 'app.bsky.graph.listitem',
defs: {
main: {
type: 'record',
description: 'An item under a declared list of actors',
key: 'tid',
record: {
type: 'object',
required: ['subject', 'list', 'createdAt'],
properties: {
subject: {
type: 'string',
format: 'did',
},
list: {
type: 'string',
format: 'at-uri',
},
createdAt: {
type: 'string',
format: 'datetime',
},
},
},
},
},
},
AppBskyGraphMuteActor: {
lexicon: 1,
id: 'app.bsky.graph.muteActor',
@ -5108,6 +5616,29 @@ export const schemaDict = {
},
},
},
AppBskyGraphMuteActorList: {
lexicon: 1,
id: 'app.bsky.graph.muteActorList',
defs: {
main: {
type: 'procedure',
description: 'Mute a list of actors.',
input: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['list'],
properties: {
list: {
type: 'string',
format: 'at-uri',
},
},
},
},
},
},
},
AppBskyGraphUnmuteActor: {
lexicon: 1,
id: 'app.bsky.graph.unmuteActor',
@ -5131,6 +5662,29 @@ export const schemaDict = {
},
},
},
AppBskyGraphUnmuteActorList: {
lexicon: 1,
id: 'app.bsky.graph.unmuteActorList',
defs: {
main: {
type: 'procedure',
description: 'Unmute a list of actors.',
input: {
encoding: 'application/json',
schema: {
type: 'object',
required: ['list'],
properties: {
list: {
type: 'string',
format: 'at-uri',
},
},
},
},
},
},
},
AppBskyNotificationGetUnreadCount: {
lexicon: 1,
id: 'app.bsky.notification.getUnreadCount',
@ -5406,7 +5960,10 @@ export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[]
export const lexicons: Lexicons = new Lexicons(schemas)
export const ids = {
ComAtprotoAdminDefs: 'com.atproto.admin.defs',
ComAtprotoAdminDisableAccountInvites:
'com.atproto.admin.disableAccountInvites',
ComAtprotoAdminDisableInviteCodes: 'com.atproto.admin.disableInviteCodes',
ComAtprotoAdminEnableAccountInvites: 'com.atproto.admin.enableAccountInvites',
ComAtprotoAdminGetInviteCodes: 'com.atproto.admin.getInviteCodes',
ComAtprotoAdminGetModerationAction: 'com.atproto.admin.getModerationAction',
ComAtprotoAdminGetModerationActions: 'com.atproto.admin.getModerationActions',
@ -5436,6 +5993,7 @@ export const ids = {
ComAtprotoRepoGetRecord: 'com.atproto.repo.getRecord',
ComAtprotoRepoListRecords: 'com.atproto.repo.listRecords',
ComAtprotoRepoPutRecord: 'com.atproto.repo.putRecord',
ComAtprotoRepoRebaseRepo: 'com.atproto.repo.rebaseRepo',
ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef',
ComAtprotoRepoUploadBlob: 'com.atproto.repo.uploadBlob',
ComAtprotoServerCreateAccount: 'com.atproto.server.createAccount',
@ -5483,6 +6041,8 @@ export const ids = {
AppBskyEmbedRecordWithMedia: 'app.bsky.embed.recordWithMedia',
AppBskyFeedBookmarkFeed: 'app.bsky.feed.bookmarkFeed',
AppBskyFeedDefs: 'app.bsky.feed.defs',
AppBskyFeedGenerator: 'app.bsky.feed.generator',
AppBskyFeedGetActorFeeds: 'app.bsky.feed.getActorFeeds',
AppBskyFeedGetAuthorFeed: 'app.bsky.feed.getAuthorFeed',
AppBskyFeedGetBookmarkedFeeds: 'app.bsky.feed.getBookmarkedFeeds',
AppBskyFeedGetFeed: 'app.bsky.feed.getFeed',
@ -5497,13 +6057,21 @@ export const ids = {
AppBskyFeedRepost: 'app.bsky.feed.repost',
AppBskyFeedUnbookmarkFeed: 'app.bsky.feed.unbookmarkFeed',
AppBskyGraphBlock: 'app.bsky.graph.block',
AppBskyGraphDefs: 'app.bsky.graph.defs',
AppBskyGraphFollow: 'app.bsky.graph.follow',
AppBskyGraphGetBlocks: 'app.bsky.graph.getBlocks',
AppBskyGraphGetFollowers: 'app.bsky.graph.getFollowers',
AppBskyGraphGetFollows: 'app.bsky.graph.getFollows',
AppBskyGraphGetList: 'app.bsky.graph.getList',
AppBskyGraphGetListMutes: 'app.bsky.graph.getListMutes',
AppBskyGraphGetLists: 'app.bsky.graph.getLists',
AppBskyGraphGetMutes: 'app.bsky.graph.getMutes',
AppBskyGraphList: 'app.bsky.graph.list',
AppBskyGraphListitem: 'app.bsky.graph.listitem',
AppBskyGraphMuteActor: 'app.bsky.graph.muteActor',
AppBskyGraphMuteActorList: 'app.bsky.graph.muteActorList',
AppBskyGraphUnmuteActor: 'app.bsky.graph.unmuteActor',
AppBskyGraphUnmuteActorList: 'app.bsky.graph.unmuteActorList',
AppBskyNotificationGetUnreadCount: 'app.bsky.notification.getUnreadCount',
AppBskyNotificationListNotifications:
'app.bsky.notification.listNotifications',

View File

@ -6,13 +6,13 @@ import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
import * as AppBskyGraphDefs from '../graph/defs'
export interface ProfileViewBasic {
did: string
handle: string
displayName?: string
avatar?: string
actorType?: ActorType
viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[]
[k: string]: unknown
@ -36,7 +36,6 @@ export interface ProfileView {
displayName?: string
description?: string
avatar?: string
actorType?: ActorType
indexedAt?: string
viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[]
@ -61,8 +60,6 @@ export interface ProfileViewDetailed {
displayName?: string
description?: string
avatar?: string
actorType?: ActorType
actorInfo?: InfoFeedGenerator | { $type: string; [k: string]: unknown }
banner?: string
followersCount?: number
followsCount?: number
@ -87,6 +84,7 @@ export function validateProfileViewDetailed(v: unknown): ValidationResult {
export interface ViewerState {
muted?: boolean
mutedByList?: AppBskyGraphDefs.ListViewBasic
blockedBy?: boolean
blocking?: string
following?: string
@ -105,30 +103,3 @@ export function isViewerState(v: unknown): v is ViewerState {
export function validateViewerState(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#viewerState', v)
}
export interface InfoFeedGenerator {
likes: number
[k: string]: unknown
}
export function isInfoFeedGenerator(v: unknown): v is InfoFeedGenerator {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#infoFeedGenerator'
)
}
export function validateInfoFeedGenerator(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#infoFeedGenerator', v)
}
export type ActorType =
| 'app.bsky.actor.defs#user'
| 'app.bsky.actor.defs#feedGenerator'
| (string & {})
/** Actor type: User. This is the default option and an actor is assumed to be a user unless suggested otherwise. */
export const USER = 'app.bsky.actor.defs#user'
/** Actor type: Feed Generator. A service that provides a custom feed. */
export const FEEDGENERATOR = 'app.bsky.actor.defs#feedGenerator'

View File

@ -11,6 +11,7 @@ import * as AppBskyEmbedExternal from '../embed/external'
import * as AppBskyEmbedRecord from '../embed/record'
import * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia'
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
import * as AppBskyRichtextFacet from '../richtext/facet'
export interface PostView {
uri: string
@ -185,9 +186,51 @@ export function validateBlockedPost(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.feed.defs#blockedPost', v)
}
export interface GeneratorView {
uri: string
did?: string
creator: AppBskyActorDefs.ProfileView
displayName?: string
description?: string
descriptionFacets?: AppBskyRichtextFacet.Main[]
avatar?: string
viewer?: GeneratorViewerState
indexedAt: string
[k: string]: unknown
}
export function isGeneratorView(v: unknown): v is GeneratorView {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.feed.defs#generatorView'
)
}
export function validateGeneratorView(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.feed.defs#generatorView', v)
}
export interface GeneratorViewerState {
subscribed?: boolean
like?: string
[k: string]: unknown
}
export function isGeneratorViewerState(v: unknown): v is GeneratorViewerState {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.feed.defs#generatorViewerState'
)
}
export function validateGeneratorViewerState(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.feed.defs#generatorViewerState', v)
}
export interface SkeletonFeedPost {
post: string
replyTo?: SkeletonReplyRef
reason?: SkeletonReasonRepost | { $type: string; [k: string]: unknown }
[k: string]: unknown
}
@ -204,27 +247,8 @@ export function validateSkeletonFeedPost(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.feed.defs#skeletonFeedPost', v)
}
export interface SkeletonReplyRef {
root: string
parent: string
[k: string]: unknown
}
export function isSkeletonReplyRef(v: unknown): v is SkeletonReplyRef {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.feed.defs#skeletonReplyRef'
)
}
export function validateSkeletonReplyRef(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.feed.defs#skeletonReplyRef', v)
}
export interface SkeletonReasonRepost {
by: string
indexedAt: string
repost: string
[k: string]: unknown
}

View File

@ -0,0 +1,31 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import * as AppBskyRichtextFacet from '../richtext/facet'
export interface Record {
did: string
displayName?: string
description?: string
descriptionFacets?: AppBskyRichtextFacet.Main[]
avatar?: BlobRef
createdAt: string
[k: string]: unknown
}
export function isRecord(v: unknown): v is Record {
return (
isObj(v) &&
hasProp(v, '$type') &&
(v.$type === 'app.bsky.feed.generator#main' ||
v.$type === 'app.bsky.feed.generator')
)
}
export function validateRecord(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.feed.generator#main', v)
}

View File

@ -0,0 +1,45 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import express from 'express'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
import * as AppBskyFeedDefs from './defs'
export interface QueryParams {
actor: string
limit: number
cursor?: string
}
export type InputSchema = undefined
export interface OutputSchema {
cursor?: string
feeds: AppBskyFeedDefs.GeneratorView[]
[k: string]: unknown
}
export type HandlerInput = undefined
export interface HandlerSuccess {
encoding: 'application/json'
body: OutputSchema
}
export interface HandlerError {
status: number
message?: string
}
export type HandlerOutput = HandlerError | HandlerSuccess
export type Handler<HA extends HandlerAuth = never> = (ctx: {
auth: HA
params: QueryParams
input: HandlerInput
req: express.Request
res: express.Response
}) => Promise<HandlerOutput> | HandlerOutput

View File

@ -7,7 +7,7 @@ import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
import * as AppBskyActorDefs from '../actor/defs'
import * as AppBskyFeedDefs from './defs'
export interface QueryParams {
limit: number
@ -18,7 +18,7 @@ export type InputSchema = undefined
export interface OutputSchema {
cursor?: string
feeds: AppBskyActorDefs.ProfileView[]
feeds: AppBskyFeedDefs.GeneratorView[]
[k: string]: unknown
}

View File

@ -0,0 +1,95 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import * as AppBskyActorDefs from '../actor/defs'
import * as AppBskyRichtextFacet from '../richtext/facet'
export interface ListViewBasic {
uri: string
name: string
purpose: ListPurpose
avatar?: string
viewer?: ListViewerState
indexedAt?: string
[k: string]: unknown
}
export function isListViewBasic(v: unknown): v is ListViewBasic {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.graph.defs#listViewBasic'
)
}
export function validateListViewBasic(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.graph.defs#listViewBasic', v)
}
export interface ListView {
uri: string
creator: AppBskyActorDefs.ProfileView
name: string
purpose: ListPurpose
description?: string
descriptionFacets?: AppBskyRichtextFacet.Main[]
avatar?: string
viewer?: ListViewerState
indexedAt: string
[k: string]: unknown
}
export function isListView(v: unknown): v is ListView {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.graph.defs#listView'
)
}
export function validateListView(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.graph.defs#listView', v)
}
export interface ListItemView {
subject: AppBskyActorDefs.ProfileView
[k: string]: unknown
}
export function isListItemView(v: unknown): v is ListItemView {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.graph.defs#listItemView'
)
}
export function validateListItemView(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.graph.defs#listItemView', v)
}
export type ListPurpose = 'app.bsky.graph.defs#modlist' | (string & {})
/** A list of actors to apply an aggregate moderation action (mute/block) on */
export const MODLIST = 'app.bsky.graph.defs#modlist'
export interface ListViewerState {
muted?: boolean
[k: string]: unknown
}
export function isListViewerState(v: unknown): v is ListViewerState {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.graph.defs#listViewerState'
)
}
export function validateListViewerState(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.graph.defs#listViewerState', v)
}

View File

@ -0,0 +1,46 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import express from 'express'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
import * as AppBskyGraphDefs from './defs'
export interface QueryParams {
list: string
limit: number
cursor?: string
}
export type InputSchema = undefined
export interface OutputSchema {
cursor?: string
list: AppBskyGraphDefs.ListView
items: AppBskyGraphDefs.ListItemView[]
[k: string]: unknown
}
export type HandlerInput = undefined
export interface HandlerSuccess {
encoding: 'application/json'
body: OutputSchema
}
export interface HandlerError {
status: number
message?: string
}
export type HandlerOutput = HandlerError | HandlerSuccess
export type Handler<HA extends HandlerAuth = never> = (ctx: {
auth: HA
params: QueryParams
input: HandlerInput
req: express.Request
res: express.Response
}) => Promise<HandlerOutput> | HandlerOutput

View File

@ -0,0 +1,44 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import express from 'express'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
import * as AppBskyGraphDefs from './defs'
export interface QueryParams {
limit: number
cursor?: string
}
export type InputSchema = undefined
export interface OutputSchema {
cursor?: string
lists: AppBskyGraphDefs.ListView[]
[k: string]: unknown
}
export type HandlerInput = undefined
export interface HandlerSuccess {
encoding: 'application/json'
body: OutputSchema
}
export interface HandlerError {
status: number
message?: string
}
export type HandlerOutput = HandlerError | HandlerSuccess
export type Handler<HA extends HandlerAuth = never> = (ctx: {
auth: HA
params: QueryParams
input: HandlerInput
req: express.Request
res: express.Response
}) => Promise<HandlerOutput> | HandlerOutput

View File

@ -0,0 +1,45 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import express from 'express'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
import * as AppBskyGraphDefs from './defs'
export interface QueryParams {
actor: string
limit: number
cursor?: string
}
export type InputSchema = undefined
export interface OutputSchema {
cursor?: string
lists: AppBskyGraphDefs.ListView[]
[k: string]: unknown
}
export type HandlerInput = undefined
export interface HandlerSuccess {
encoding: 'application/json'
body: OutputSchema
}
export interface HandlerError {
status: number
message?: string
}
export type HandlerOutput = HandlerError | HandlerSuccess
export type Handler<HA extends HandlerAuth = never> = (ctx: {
auth: HA
params: QueryParams
input: HandlerInput
req: express.Request
res: express.Response
}) => Promise<HandlerOutput> | HandlerOutput

View File

@ -0,0 +1,32 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import * as AppBskyGraphDefs from './defs'
import * as AppBskyRichtextFacet from '../richtext/facet'
export interface Record {
purpose: AppBskyGraphDefs.ListPurpose
name: string
description?: string
descriptionFacets?: AppBskyRichtextFacet.Main[]
avatar?: BlobRef
createdAt: string
[k: string]: unknown
}
export function isRecord(v: unknown): v is Record {
return (
isObj(v) &&
hasProp(v, '$type') &&
(v.$type === 'app.bsky.graph.list#main' ||
v.$type === 'app.bsky.graph.list')
)
}
export function validateRecord(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.graph.list#main', v)
}

View File

@ -0,0 +1,27 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
export interface Record {
subject: string
list: string
createdAt: string
[k: string]: unknown
}
export function isRecord(v: unknown): v is Record {
return (
isObj(v) &&
hasProp(v, '$type') &&
(v.$type === 'app.bsky.graph.listitem#main' ||
v.$type === 'app.bsky.graph.listitem')
)
}
export function validateRecord(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.graph.listitem#main', v)
}

View File

@ -0,0 +1,35 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import express from 'express'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
export interface QueryParams {}
export interface InputSchema {
list: string
[k: string]: unknown
}
export interface HandlerInput {
encoding: 'application/json'
body: InputSchema
}
export interface HandlerError {
status: number
message?: string
}
export type HandlerOutput = HandlerError | void
export type Handler<HA extends HandlerAuth = never> = (ctx: {
auth: HA
params: QueryParams
input: HandlerInput
req: express.Request
res: express.Response
}) => Promise<HandlerOutput> | HandlerOutput

View File

@ -0,0 +1,35 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import express from 'express'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
export interface QueryParams {}
export interface InputSchema {
list: string
[k: string]: unknown
}
export interface HandlerInput {
encoding: 'application/json'
body: InputSchema
}
export interface HandlerError {
status: number
message?: string
}
export type HandlerOutput = HandlerError | void
export type Handler<HA extends HandlerAuth = never> = (ctx: {
auth: HA
params: QueryParams
input: HandlerInput
req: express.Request
res: express.Response
}) => Promise<HandlerOutput> | HandlerOutput

View File

@ -177,6 +177,7 @@ export interface RepoView {
indexedAt: string
moderation: Moderation
invitedBy?: ComAtprotoServerDefs.InviteCode
invitesDisabled?: boolean
[k: string]: unknown
}
@ -202,6 +203,7 @@ export interface RepoViewDetail {
labels?: ComAtprotoLabelDefs.Label[]
invitedBy?: ComAtprotoServerDefs.InviteCode
invites?: ComAtprotoServerDefs.InviteCode[]
invitesDisabled?: boolean
[k: string]: unknown
}

View File

@ -0,0 +1,35 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import express from 'express'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
export interface QueryParams {}
export interface InputSchema {
account: string
[k: string]: unknown
}
export interface HandlerInput {
encoding: 'application/json'
body: InputSchema
}
export interface HandlerError {
status: number
message?: string
}
export type HandlerOutput = HandlerError | void
export type Handler<HA extends HandlerAuth = never> = (ctx: {
auth: HA
params: QueryParams
input: HandlerInput
req: express.Request
res: express.Response
}) => Promise<HandlerOutput> | HandlerOutput

View File

@ -0,0 +1,35 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import express from 'express'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
export interface QueryParams {}
export interface InputSchema {
account: string
[k: string]: unknown
}
export interface HandlerInput {
encoding: 'application/json'
body: InputSchema
}
export interface HandlerError {
status: number
message?: string
}
export type HandlerOutput = HandlerError | void
export type Handler<HA extends HandlerAuth = never> = (ctx: {
auth: HA
params: QueryParams
input: HandlerInput
req: express.Request
res: express.Response
}) => Promise<HandlerOutput> | HandlerOutput

View File

@ -0,0 +1,39 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import express from 'express'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { lexicons } from '../../../../lexicons'
import { isObj, hasProp } from '../../../../util'
import { CID } from 'multiformats/cid'
import { HandlerAuth } from '@atproto/xrpc-server'
export interface QueryParams {}
export interface InputSchema {
/** The handle or DID of the repo. */
repo: string
/** Compare and swap with the previous commit by cid. */
swapCommit?: string
[k: string]: unknown
}
export interface HandlerInput {
encoding: 'application/json'
body: InputSchema
}
export interface HandlerError {
status: number
message?: string
error?: 'InvalidSwap'
}
export type HandlerOutput = HandlerError | void
export type Handler<HA extends HandlerAuth = never> = (ctx: {
auth: HA
params: QueryParams
input: HandlerInput
req: express.Request
res: express.Response
}) => Promise<HandlerOutput> | HandlerOutput