Compare commits
No commits in common. "9a887dd8f2ee634c5e524cfa802f754878a91e5a" and "040801af3a68552199793751c15ad1dd1a379b84" have entirely different histories.
9a887dd8f2
...
040801af3a
@ -8,7 +8,7 @@ FEEDGEN_LISTENHOST="localhost"
|
||||
FEEDGEN_SQLITE_LOCATION=":memory:"
|
||||
|
||||
# Don't change unless you're working in a different environment than the primary Bluesky network
|
||||
FEEDGEN_SUBSCRIPTION_ENDPOINT="wss://bsky.network"
|
||||
FEEDGEN_SUBSCRIPTION_ENDPOINT="wss://bsky.social"
|
||||
|
||||
# Set this to the hostname that you intend to run the service at
|
||||
FEEDGEN_HOSTNAME="example.com"
|
||||
|
12
package.json
12
package.json
@ -12,12 +12,12 @@
|
||||
"build": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@atproto/api": "^0.6.20",
|
||||
"@atproto/identity": "^0.2.1",
|
||||
"@atproto/lexicon": "^0.2.2",
|
||||
"@atproto/repo": "^0.3.2",
|
||||
"@atproto/syntax": "^0.1.2",
|
||||
"@atproto/xrpc-server": "^0.6.0",
|
||||
"@atproto/api": "^0.3.7",
|
||||
"@atproto/did-resolver": "^0.1.0",
|
||||
"@atproto/lexicon": "^0.1.0",
|
||||
"@atproto/repo": "^0.1.0",
|
||||
"@atproto/uri": "^0.0.2",
|
||||
"@atproto/xrpc-server": "^0.2.0",
|
||||
"better-sqlite3": "^8.3.0",
|
||||
"dotenv": "^16.0.3",
|
||||
"express": "^4.18.2",
|
||||
|
@ -45,6 +45,14 @@ const run = async () => {
|
||||
const agent = new AtpAgent({ service: 'https://bsky.social' })
|
||||
await agent.login({ identifier: handle, password })
|
||||
|
||||
try {
|
||||
await agent.api.app.bsky.feed.describeFeedGenerator()
|
||||
} catch (err) {
|
||||
throw new Error(
|
||||
'The bluesky server is not ready to accept published custom feeds yet',
|
||||
)
|
||||
}
|
||||
|
||||
let avatarRef: BlobRef | undefined
|
||||
if (avatar) {
|
||||
let encoding: string
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { InvalidRequestError } from '@atproto/xrpc-server'
|
||||
import { QueryParams } from '../lexicon/types/app/bsky/feed/getFeedSkeleton'
|
||||
import { AppContext } from '../config'
|
||||
|
||||
@ -13,8 +14,15 @@ export const handler = async (ctx: AppContext, params: QueryParams) => {
|
||||
.limit(params.limit)
|
||||
|
||||
if (params.cursor) {
|
||||
const timeStr = new Date(parseInt(params.cursor, 10)).toISOString()
|
||||
builder = builder.where('post.indexedAt', '<', timeStr)
|
||||
const [indexedAt, cid] = params.cursor.split('::')
|
||||
if (!indexedAt || !cid) {
|
||||
throw new InvalidRequestError('malformed cursor')
|
||||
}
|
||||
const timeStr = new Date(parseInt(indexedAt, 10)).toISOString()
|
||||
builder = builder
|
||||
.where('post.indexedAt', '<', timeStr)
|
||||
.orWhere((qb) => qb.where('post.indexedAt', '=', timeStr))
|
||||
.where('post.cid', '<', cid)
|
||||
}
|
||||
const res = await builder.execute()
|
||||
|
||||
@ -25,7 +33,7 @@ export const handler = async (ctx: AppContext, params: QueryParams) => {
|
||||
let cursor: string | undefined
|
||||
const last = res.at(-1)
|
||||
if (last) {
|
||||
cursor = new Date(last.indexedAt).getTime().toString(10)
|
||||
cursor = `${new Date(last.indexedAt).getTime()}::${last.cid}`
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import express from 'express'
|
||||
import { verifyJwt, AuthRequiredError, parseReqNsid } from '@atproto/xrpc-server'
|
||||
import { DidResolver } from '@atproto/identity'
|
||||
import { verifyJwt, AuthRequiredError } from '@atproto/xrpc-server'
|
||||
import { DidResolver } from '@atproto/did-resolver'
|
||||
|
||||
export const validateAuth = async (
|
||||
req: express.Request,
|
||||
@ -12,9 +12,7 @@ export const validateAuth = async (
|
||||
throw new AuthRequiredError()
|
||||
}
|
||||
const jwt = authorization.replace('Bearer ', '').trim()
|
||||
const nsid = parseReqNsid(req)
|
||||
const parsed = await verifyJwt(jwt, serviceDid, nsid, async (did: string) => {
|
||||
return verifyJwt(jwt, serviceDid, async (did: string) => {
|
||||
return didResolver.resolveAtprotoKey(did)
|
||||
})
|
||||
return parsed.iss
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Database } from './db'
|
||||
import { DidResolver } from '@atproto/identity'
|
||||
import { DidResolver } from '@atproto/did-resolver'
|
||||
|
||||
export type AppContext = {
|
||||
db: Database
|
||||
|
@ -14,6 +14,8 @@ migrations['001'] = {
|
||||
.createTable('post')
|
||||
.addColumn('uri', 'varchar', (col) => col.primaryKey())
|
||||
.addColumn('cid', 'varchar', (col) => col.notNull())
|
||||
.addColumn('replyParent', 'varchar')
|
||||
.addColumn('replyRoot', 'varchar')
|
||||
.addColumn('indexedAt', 'varchar', (col) => col.notNull())
|
||||
.execute()
|
||||
await db.schema
|
||||
|
@ -6,6 +6,8 @@ export type DatabaseSchema = {
|
||||
export type Post = {
|
||||
uri: string
|
||||
cid: string
|
||||
replyParent: string | null
|
||||
replyRoot: string | null
|
||||
indexedAt: string
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ const run = async () => {
|
||||
sqliteLocation: maybeStr(process.env.FEEDGEN_SQLITE_LOCATION) ?? ':memory:',
|
||||
subscriptionEndpoint:
|
||||
maybeStr(process.env.FEEDGEN_SUBSCRIPTION_ENDPOINT) ??
|
||||
'wss://bsky.network',
|
||||
'wss://bsky.social',
|
||||
publisherDid:
|
||||
maybeStr(process.env.FEEDGEN_PUBLISHER_DID) ?? 'did:example:alice',
|
||||
subscriptionReconnectDelay:
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -107,10 +107,6 @@ export function validateViewerState(v: unknown): ValidationResult {
|
||||
export type Preferences = (
|
||||
| AdultContentPref
|
||||
| ContentLabelPref
|
||||
| SavedFeedsPref
|
||||
| PersonalDetailsPref
|
||||
| FeedViewPref
|
||||
| ThreadViewPref
|
||||
| { $type: string; [k: string]: unknown }
|
||||
)[]
|
||||
|
||||
@ -148,87 +144,3 @@ export function isContentLabelPref(v: unknown): v is ContentLabelPref {
|
||||
export function validateContentLabelPref(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.actor.defs#contentLabelPref', v)
|
||||
}
|
||||
|
||||
export interface SavedFeedsPref {
|
||||
pinned: string[]
|
||||
saved: string[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isSavedFeedsPref(v: unknown): v is SavedFeedsPref {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.actor.defs#savedFeedsPref'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateSavedFeedsPref(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.actor.defs#savedFeedsPref', v)
|
||||
}
|
||||
|
||||
export interface PersonalDetailsPref {
|
||||
/** The birth date of the owner of the account. */
|
||||
birthDate?: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isPersonalDetailsPref(v: unknown): v is PersonalDetailsPref {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.actor.defs#personalDetailsPref'
|
||||
)
|
||||
}
|
||||
|
||||
export function validatePersonalDetailsPref(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.actor.defs#personalDetailsPref', v)
|
||||
}
|
||||
|
||||
export interface FeedViewPref {
|
||||
/** The URI of the feed, or an identifier which describes the feed. */
|
||||
feed: string
|
||||
/** Hide replies in the feed. */
|
||||
hideReplies?: boolean
|
||||
/** Hide replies in the feed if they are not by followed users. */
|
||||
hideRepliesByUnfollowed?: boolean
|
||||
/** Hide replies in the feed if they do not have this number of likes. */
|
||||
hideRepliesByLikeCount?: number
|
||||
/** Hide reposts in the feed. */
|
||||
hideReposts?: boolean
|
||||
/** Hide quote posts in the feed. */
|
||||
hideQuotePosts?: boolean
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isFeedViewPref(v: unknown): v is FeedViewPref {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.actor.defs#feedViewPref'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateFeedViewPref(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.actor.defs#feedViewPref', v)
|
||||
}
|
||||
|
||||
export interface ThreadViewPref {
|
||||
/** Sorting mode. */
|
||||
sort?: 'oldest' | 'newest' | 'most-likes' | 'random' | (string & {})
|
||||
/** Show followed users at the top of all replies. */
|
||||
prioritizeFollowedUsers?: boolean
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isThreadViewPref(v: unknown): v is ThreadViewPref {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.actor.defs#threadViewPref'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateThreadViewPref(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.actor.defs#threadViewPref', v)
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -32,13 +31,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -20,7 +20,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -29,13 +28,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -25,7 +25,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -34,13 +33,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -27,7 +27,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -36,13 +35,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -5,16 +5,12 @@ import { ValidationResult, BlobRef } from '@atproto/lexicon'
|
||||
import { lexicons } from '../../../../lexicons'
|
||||
import { isObj, hasProp } from '../../../../util'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
|
||||
|
||||
export interface Record {
|
||||
displayName?: string
|
||||
description?: string
|
||||
avatar?: BlobRef
|
||||
banner?: BlobRef
|
||||
labels?:
|
||||
| ComAtprotoLabelDefs.SelfLabels
|
||||
| { $type: string; [k: string]: unknown }
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
|
@ -27,13 +27,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -10,10 +10,7 @@ import { HandlerAuth } from '@atproto/xrpc-server'
|
||||
import * as AppBskyActorDefs from './defs'
|
||||
|
||||
export interface QueryParams {
|
||||
/** DEPRECATED: use 'q' instead */
|
||||
term?: string
|
||||
/** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
|
||||
q?: string
|
||||
limit: number
|
||||
cursor?: string
|
||||
}
|
||||
@ -31,7 +28,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -40,13 +36,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -10,10 +10,7 @@ import { HandlerAuth } from '@atproto/xrpc-server'
|
||||
import * as AppBskyActorDefs from './defs'
|
||||
|
||||
export interface QueryParams {
|
||||
/** DEPRECATED: use 'q' instead */
|
||||
term?: string
|
||||
/** search query prefix; not a full query string */
|
||||
q?: string
|
||||
limit: number
|
||||
}
|
||||
|
||||
@ -29,7 +26,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -38,13 +34,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -27,7 +27,6 @@ export function validateMain(v: unknown): ValidationResult {
|
||||
export interface Image {
|
||||
image: BlobRef
|
||||
alt: string
|
||||
aspectRatio?: AspectRatio
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -41,25 +40,6 @@ export function validateImage(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.embed.images#image', v)
|
||||
}
|
||||
|
||||
/** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. */
|
||||
export interface AspectRatio {
|
||||
width: number
|
||||
height: number
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isAspectRatio(v: unknown): v is AspectRatio {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.embed.images#aspectRatio'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateAspectRatio(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.embed.images#aspectRatio', v)
|
||||
}
|
||||
|
||||
export interface View {
|
||||
images: ViewImage[]
|
||||
[k: string]: unknown
|
||||
@ -79,7 +59,6 @@ export interface ViewImage {
|
||||
thumb: string
|
||||
fullsize: string
|
||||
alt: string
|
||||
aspectRatio?: AspectRatio
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@ import { isObj, hasProp } from '../../../../util'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
||||
import * as AppBskyFeedDefs from '../feed/defs'
|
||||
import * as AppBskyGraphDefs from '../graph/defs'
|
||||
import * as AppBskyActorDefs from '../actor/defs'
|
||||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
|
||||
import * as AppBskyEmbedImages from './images'
|
||||
@ -38,7 +37,6 @@ export interface View {
|
||||
| ViewNotFound
|
||||
| ViewBlocked
|
||||
| AppBskyFeedDefs.GeneratorView
|
||||
| AppBskyGraphDefs.ListView
|
||||
| { $type: string; [k: string]: unknown }
|
||||
[k: string]: unknown
|
||||
}
|
||||
@ -84,7 +82,6 @@ export function validateViewRecord(v: unknown): ValidationResult {
|
||||
|
||||
export interface ViewNotFound {
|
||||
uri: string
|
||||
notFound: true
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -102,8 +99,6 @@ export function validateViewNotFound(v: unknown): ValidationResult {
|
||||
|
||||
export interface ViewBlocked {
|
||||
uri: string
|
||||
blocked: true
|
||||
author: AppBskyFeedDefs.BlockedAuthor
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@ 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'
|
||||
import * as AppBskyGraphDefs from '../graph/defs'
|
||||
|
||||
export interface PostView {
|
||||
uri: string
|
||||
@ -31,7 +30,6 @@ export interface PostView {
|
||||
indexedAt: string
|
||||
viewer?: ViewerState
|
||||
labels?: ComAtprotoLabelDefs.Label[]
|
||||
threadgate?: ThreadgateView
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -137,7 +135,6 @@ export interface ThreadViewPost {
|
||||
| BlockedPost
|
||||
| { $type: string; [k: string]: unknown }
|
||||
)[]
|
||||
viewer?: ViewerThreadState
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -174,7 +171,6 @@ export function validateNotFoundPost(v: unknown): ValidationResult {
|
||||
export interface BlockedPost {
|
||||
uri: string
|
||||
blocked: true
|
||||
author: BlockedAuthor
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -190,47 +186,12 @@ export function validateBlockedPost(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.feed.defs#blockedPost', v)
|
||||
}
|
||||
|
||||
export interface BlockedAuthor {
|
||||
did: string
|
||||
viewer?: AppBskyActorDefs.ViewerState
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isBlockedAuthor(v: unknown): v is BlockedAuthor {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.feed.defs#blockedAuthor'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateBlockedAuthor(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.feed.defs#blockedAuthor', v)
|
||||
}
|
||||
|
||||
export interface ViewerThreadState {
|
||||
canReply?: boolean
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isViewerThreadState(v: unknown): v is ViewerThreadState {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.feed.defs#viewerThreadState'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateViewerThreadState(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.feed.defs#viewerThreadState', v)
|
||||
}
|
||||
|
||||
export interface GeneratorView {
|
||||
uri: string
|
||||
cid: string
|
||||
did: string
|
||||
did?: string
|
||||
creator: AppBskyActorDefs.ProfileView
|
||||
displayName: string
|
||||
displayName?: string
|
||||
description?: string
|
||||
descriptionFacets?: AppBskyRichtextFacet.Main[]
|
||||
avatar?: string
|
||||
@ -253,6 +214,7 @@ export function validateGeneratorView(v: unknown): ValidationResult {
|
||||
}
|
||||
|
||||
export interface GeneratorViewerState {
|
||||
saved?: boolean
|
||||
like?: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
@ -303,23 +265,3 @@ export function isSkeletonReasonRepost(v: unknown): v is SkeletonReasonRepost {
|
||||
export function validateSkeletonReasonRepost(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.feed.defs#skeletonReasonRepost', v)
|
||||
}
|
||||
|
||||
export interface ThreadgateView {
|
||||
uri?: string
|
||||
cid?: string
|
||||
record?: {}
|
||||
lists?: AppBskyGraphDefs.ListViewBasic[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isThreadgateView(v: unknown): v is ThreadgateView {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.feed.defs#threadgateView'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateThreadgateView(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.feed.defs#threadgateView', v)
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -33,16 +32,13 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
||||
export interface Feed {
|
||||
uri: string
|
||||
|
@ -6,17 +6,13 @@ import { lexicons } from '../../../../lexicons'
|
||||
import { isObj, hasProp } from '../../../../util'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import * as AppBskyRichtextFacet from '../richtext/facet'
|
||||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
|
||||
|
||||
export interface Record {
|
||||
did: string
|
||||
displayName: string
|
||||
displayName?: string
|
||||
description?: string
|
||||
descriptionFacets?: AppBskyRichtextFacet.Main[]
|
||||
avatar?: BlobRef
|
||||
labels?:
|
||||
| ComAtprotoLabelDefs.SelfLabels
|
||||
| { $type: string; [k: string]: unknown }
|
||||
createdAt: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -37,13 +36,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -1,50 +0,0 @@
|
||||
/**
|
||||
* 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
|
||||
feed: AppBskyFeedDefs.FeedViewPost[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export type HandlerInput = undefined
|
||||
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
error?: 'BlockedActor' | 'BlockedByActor'
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -13,11 +13,6 @@ export interface QueryParams {
|
||||
actor: string
|
||||
limit: number
|
||||
cursor?: string
|
||||
filter:
|
||||
| 'posts_with_replies'
|
||||
| 'posts_no_replies'
|
||||
| 'posts_with_media'
|
||||
| (string & {})
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
@ -33,7 +28,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -43,13 +37,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -28,7 +28,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -38,13 +37,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -27,7 +27,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -36,13 +35,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -1,46 +0,0 @@
|
||||
/**
|
||||
* 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 {
|
||||
feeds: string[]
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
feeds: AppBskyFeedDefs.GeneratorView[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export type HandlerInput = undefined
|
||||
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -28,7 +28,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -38,13 +37,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -31,7 +31,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -40,16 +39,13 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
||||
export interface Like {
|
||||
indexedAt: string
|
||||
|
@ -1,50 +0,0 @@
|
||||
/**
|
||||
* 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 {
|
||||
list: string
|
||||
limit: number
|
||||
cursor?: string
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
cursor?: string
|
||||
feed: AppBskyFeedDefs.FeedViewPost[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export type HandlerInput = undefined
|
||||
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
error?: 'UnknownList'
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -11,8 +11,7 @@ import * as AppBskyFeedDefs from './defs'
|
||||
|
||||
export interface QueryParams {
|
||||
uri: string
|
||||
depth: number
|
||||
parentHeight: number
|
||||
depth?: number
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
@ -31,7 +30,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -41,13 +39,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -25,7 +25,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -34,13 +33,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -31,7 +31,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -40,13 +39,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -27,7 +27,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -36,13 +35,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
@ -28,7 +28,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -37,13 +36,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -10,7 +10,6 @@ import * as AppBskyEmbedImages from '../embed/images'
|
||||
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 ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
|
||||
|
||||
export interface Record {
|
||||
@ -25,12 +24,6 @@ export interface Record {
|
||||
| AppBskyEmbedRecord.Main
|
||||
| AppBskyEmbedRecordWithMedia.Main
|
||||
| { $type: string; [k: string]: unknown }
|
||||
langs?: string[]
|
||||
labels?:
|
||||
| ComAtprotoLabelDefs.SelfLabels
|
||||
| { $type: string; [k: string]: unknown }
|
||||
/** Additional non-inline tags describing this post. */
|
||||
tags?: string[]
|
||||
createdAt: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
@ -11,10 +11,7 @@ import { HandlerAuth } from '@atproto/xrpc-server'
|
||||
export interface QueryParams {}
|
||||
|
||||
export interface InputSchema {
|
||||
serviceDid: string
|
||||
token: string
|
||||
platform: 'ios' | 'android' | 'web' | (string & {})
|
||||
appId: string
|
||||
feed: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -29,13 +26,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
@ -1,54 +0,0 @@
|
||||
/**
|
||||
* 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 {
|
||||
/** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
|
||||
q: string
|
||||
limit: number
|
||||
/** optional pagination mechanism; may not necessarily allow scrolling through entire result set */
|
||||
cursor?: string
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
cursor?: string
|
||||
/** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
|
||||
hitsTotal?: number
|
||||
posts: AppBskyFeedDefs.PostView[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export type HandlerInput = undefined
|
||||
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
error?: 'BadQueryString'
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -1,84 +0,0 @@
|
||||
/**
|
||||
* 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 {
|
||||
post: string
|
||||
allow?: (
|
||||
| MentionRule
|
||||
| FollowingRule
|
||||
| ListRule
|
||||
| { $type: string; [k: string]: unknown }
|
||||
)[]
|
||||
createdAt: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isRecord(v: unknown): v is Record {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
(v.$type === 'app.bsky.feed.threadgate#main' ||
|
||||
v.$type === 'app.bsky.feed.threadgate')
|
||||
)
|
||||
}
|
||||
|
||||
export function validateRecord(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.feed.threadgate#main', v)
|
||||
}
|
||||
|
||||
/** Allow replies from actors mentioned in your post. */
|
||||
export interface MentionRule {
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isMentionRule(v: unknown): v is MentionRule {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.feed.threadgate#mentionRule'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateMentionRule(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.feed.threadgate#mentionRule', v)
|
||||
}
|
||||
|
||||
/** Allow replies from actors you follow. */
|
||||
export interface FollowingRule {
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isFollowingRule(v: unknown): v is FollowingRule {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.feed.threadgate#followingRule'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateFollowingRule(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.feed.threadgate#followingRule', v)
|
||||
}
|
||||
|
||||
/** Allow replies from actors on a list. */
|
||||
export interface ListRule {
|
||||
list: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isListRule(v: unknown): v is ListRule {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.feed.threadgate#listRule'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateListRule(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.feed.threadgate#listRule', v)
|
||||
}
|
@ -11,14 +11,7 @@ import { HandlerAuth } from '@atproto/xrpc-server'
|
||||
export interface QueryParams {}
|
||||
|
||||
export interface InputSchema {
|
||||
recipientDid: string
|
||||
content: string
|
||||
subject?: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export interface OutputSchema {
|
||||
sent: boolean
|
||||
feed: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -27,25 +20,16 @@ export interface HandlerInput {
|
||||
body: InputSchema
|
||||
}
|
||||
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
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
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
@ -10,7 +10,6 @@ import * as AppBskyRichtextFacet from '../richtext/facet'
|
||||
|
||||
export interface ListViewBasic {
|
||||
uri: string
|
||||
cid: string
|
||||
name: string
|
||||
purpose: ListPurpose
|
||||
avatar?: string
|
||||
@ -33,7 +32,6 @@ export function validateListViewBasic(v: unknown): ValidationResult {
|
||||
|
||||
export interface ListView {
|
||||
uri: string
|
||||
cid: string
|
||||
creator: AppBskyActorDefs.ProfileView
|
||||
name: string
|
||||
purpose: ListPurpose
|
||||
@ -74,19 +72,13 @@ export function validateListItemView(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.graph.defs#listItemView', v)
|
||||
}
|
||||
|
||||
export type ListPurpose =
|
||||
| 'app.bsky.graph.defs#modlist'
|
||||
| 'app.bsky.graph.defs#curatelist'
|
||||
| (string & {})
|
||||
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'
|
||||
/** A list of actors used for curation purposes such as list feeds or interaction gating */
|
||||
export const CURATELIST = 'app.bsky.graph.defs#curatelist'
|
||||
|
||||
export interface ListViewerState {
|
||||
muted?: boolean
|
||||
blocked?: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -36,13 +35,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -29,7 +29,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -38,13 +37,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -29,7 +29,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -38,13 +37,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -29,7 +29,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -38,13 +37,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -1,48 +0,0 @@
|
||||
/**
|
||||
* 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
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -27,7 +27,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -36,13 +35,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -28,7 +28,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -37,13 +36,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -27,7 +27,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -36,13 +35,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -1,46 +0,0 @@
|
||||
/**
|
||||
* 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 AppBskyActorDefs from '../actor/defs'
|
||||
|
||||
export interface QueryParams {
|
||||
actor: string
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
suggestions: AppBskyActorDefs.ProfileView[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export type HandlerInput = undefined
|
||||
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -7,7 +7,6 @@ import { isObj, hasProp } from '../../../../util'
|
||||
import { CID } from 'multiformats/cid'
|
||||
import * as AppBskyGraphDefs from './defs'
|
||||
import * as AppBskyRichtextFacet from '../richtext/facet'
|
||||
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
|
||||
|
||||
export interface Record {
|
||||
purpose: AppBskyGraphDefs.ListPurpose
|
||||
@ -15,9 +14,6 @@ export interface Record {
|
||||
description?: string
|
||||
descriptionFacets?: AppBskyRichtextFacet.Main[]
|
||||
avatar?: BlobRef
|
||||
labels?:
|
||||
| ComAtprotoLabelDefs.SelfLabels
|
||||
| { $type: string; [k: string]: unknown }
|
||||
createdAt: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
@ -1,26 +0,0 @@
|
||||
/**
|
||||
* 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
|
||||
createdAt: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isRecord(v: unknown): v is Record {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
(v.$type === 'app.bsky.graph.listblock#main' ||
|
||||
v.$type === 'app.bsky.graph.listblock')
|
||||
)
|
||||
}
|
||||
|
||||
export function validateRecord(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.graph.listblock#main', v)
|
||||
}
|
@ -26,13 +26,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -26,13 +26,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -26,13 +26,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -26,13 +26,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -24,7 +24,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -33,13 +32,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -29,7 +29,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -38,16 +37,13 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
||||
export interface Notification {
|
||||
uri: string
|
||||
|
@ -26,13 +26,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -8,7 +8,7 @@ import { CID } from 'multiformats/cid'
|
||||
|
||||
export interface Main {
|
||||
index: ByteSlice
|
||||
features: (Mention | Link | Tag | { $type: string; [k: string]: unknown })[]
|
||||
features: (Mention | Link | { $type: string; [k: string]: unknown })[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -61,22 +61,6 @@ export function validateLink(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.richtext.facet#link', v)
|
||||
}
|
||||
|
||||
/** A hashtag. */
|
||||
export interface Tag {
|
||||
tag: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isTag(v: unknown): v is Tag {
|
||||
return (
|
||||
isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.richtext.facet#tag'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateTag(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.richtext.facet#tag', v)
|
||||
}
|
||||
|
||||
/** A text segment. Start is inclusive, end is exclusive. Indices are for utf8-encoded strings. */
|
||||
export interface ByteSlice {
|
||||
byteStart: number
|
||||
|
@ -1,41 +0,0 @@
|
||||
/**
|
||||
* 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 SkeletonSearchPost {
|
||||
uri: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isSkeletonSearchPost(v: unknown): v is SkeletonSearchPost {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.unspecced.defs#skeletonSearchPost'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateSkeletonSearchPost(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchPost', v)
|
||||
}
|
||||
|
||||
export interface SkeletonSearchActor {
|
||||
did: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isSkeletonSearchActor(v: unknown): v is SkeletonSearchActor {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'app.bsky.unspecced.defs#skeletonSearchActor'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateSkeletonSearchActor(v: unknown): ValidationResult {
|
||||
return lexicons.validate('app.bsky.unspecced.defs#skeletonSearchActor', v)
|
||||
}
|
@ -28,7 +28,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -37,13 +36,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -1,49 +0,0 @@
|
||||
/**
|
||||
* 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 '../feed/defs'
|
||||
|
||||
export interface QueryParams {
|
||||
limit: number
|
||||
cursor?: string
|
||||
query?: 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
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -1,49 +0,0 @@
|
||||
/**
|
||||
* 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 '../feed/defs'
|
||||
|
||||
export interface QueryParams {
|
||||
limit: number
|
||||
cursor?: string
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
cursor?: string
|
||||
feed: AppBskyFeedDefs.SkeletonFeedPost[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export type HandlerInput = undefined
|
||||
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
error?: 'UnknownFeed'
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -1,56 +0,0 @@
|
||||
/**
|
||||
* 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 AppBskyUnspeccedDefs from './defs'
|
||||
|
||||
export interface QueryParams {
|
||||
/** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax */
|
||||
q: string
|
||||
/** if true, acts as fast/simple 'typeahead' query */
|
||||
typeahead?: boolean
|
||||
limit: number
|
||||
/** optional pagination mechanism; may not necessarily allow scrolling through entire result set */
|
||||
cursor?: string
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
cursor?: string
|
||||
/** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
|
||||
hitsTotal?: number
|
||||
actors: AppBskyUnspeccedDefs.SkeletonSearchActor[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export type HandlerInput = undefined
|
||||
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
error?: 'BadQueryString'
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -1,54 +0,0 @@
|
||||
/**
|
||||
* 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 AppBskyUnspeccedDefs from './defs'
|
||||
|
||||
export interface QueryParams {
|
||||
/** search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended */
|
||||
q: string
|
||||
limit: number
|
||||
/** optional pagination mechanism; may not necessarily allow scrolling through entire result set */
|
||||
cursor?: string
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
|
||||
export interface OutputSchema {
|
||||
cursor?: string
|
||||
/** count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits */
|
||||
hitsTotal?: number
|
||||
posts: AppBskyUnspeccedDefs.SkeletonSearchPost[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export type HandlerInput = undefined
|
||||
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
error?: 'BadQueryString'
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
@ -13,8 +13,6 @@ import * as ComAtprotoLabelDefs from '../label/defs'
|
||||
export interface ActionView {
|
||||
id: number
|
||||
action: ActionType
|
||||
/** Indicates how long this action was meant to be in effect before automatically expiring. */
|
||||
durationInHours?: number
|
||||
subject:
|
||||
| RepoRef
|
||||
| ComAtprotoRepoStrongRef.Main
|
||||
@ -45,14 +43,7 @@ export function validateActionView(v: unknown): ValidationResult {
|
||||
export interface ActionViewDetail {
|
||||
id: number
|
||||
action: ActionType
|
||||
/** Indicates how long this action was meant to be in effect before automatically expiring. */
|
||||
durationInHours?: number
|
||||
subject:
|
||||
| RepoView
|
||||
| RepoViewNotFound
|
||||
| RecordView
|
||||
| RecordViewNotFound
|
||||
| { $type: string; [k: string]: unknown }
|
||||
subject: RepoView | RecordView | { $type: string; [k: string]: unknown }
|
||||
subjectBlobs: BlobView[]
|
||||
createLabelVals?: string[]
|
||||
negateLabelVals?: string[]
|
||||
@ -79,8 +70,6 @@ export function validateActionViewDetail(v: unknown): ValidationResult {
|
||||
export interface ActionViewCurrent {
|
||||
id: number
|
||||
action: ActionType
|
||||
/** Indicates how long this action was meant to be in effect before automatically expiring. */
|
||||
durationInHours?: number
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -135,7 +124,6 @@ export interface ReportView {
|
||||
id: number
|
||||
reasonType: ComAtprotoModerationDefs.ReasonType
|
||||
reason?: string
|
||||
subjectRepoHandle?: string
|
||||
subject:
|
||||
| RepoRef
|
||||
| ComAtprotoRepoStrongRef.Main
|
||||
@ -162,12 +150,7 @@ export interface ReportViewDetail {
|
||||
id: number
|
||||
reasonType: ComAtprotoModerationDefs.ReasonType
|
||||
reason?: string
|
||||
subject:
|
||||
| RepoView
|
||||
| RepoViewNotFound
|
||||
| RecordView
|
||||
| RecordViewNotFound
|
||||
| { $type: string; [k: string]: unknown }
|
||||
subject: RepoView | RecordView | { $type: string; [k: string]: unknown }
|
||||
reportedBy: string
|
||||
createdAt: string
|
||||
resolvedByActions: ActionView[]
|
||||
@ -195,7 +178,6 @@ export interface RepoView {
|
||||
moderation: Moderation
|
||||
invitedBy?: ComAtprotoServerDefs.InviteCode
|
||||
invitesDisabled?: boolean
|
||||
inviteNote?: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -222,7 +204,6 @@ export interface RepoViewDetail {
|
||||
invitedBy?: ComAtprotoServerDefs.InviteCode
|
||||
invites?: ComAtprotoServerDefs.InviteCode[]
|
||||
invitesDisabled?: boolean
|
||||
inviteNote?: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -238,23 +219,6 @@ export function validateRepoViewDetail(v: unknown): ValidationResult {
|
||||
return lexicons.validate('com.atproto.admin.defs#repoViewDetail', v)
|
||||
}
|
||||
|
||||
export interface RepoViewNotFound {
|
||||
did: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isRepoViewNotFound(v: unknown): v is RepoViewNotFound {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'com.atproto.admin.defs#repoViewNotFound'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateRepoViewNotFound(v: unknown): ValidationResult {
|
||||
return lexicons.validate('com.atproto.admin.defs#repoViewNotFound', v)
|
||||
}
|
||||
|
||||
export interface RepoRef {
|
||||
did: string
|
||||
[k: string]: unknown
|
||||
@ -319,23 +283,6 @@ export function validateRecordViewDetail(v: unknown): ValidationResult {
|
||||
return lexicons.validate('com.atproto.admin.defs#recordViewDetail', v)
|
||||
}
|
||||
|
||||
export interface RecordViewNotFound {
|
||||
uri: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isRecordViewNotFound(v: unknown): v is RecordViewNotFound {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'com.atproto.admin.defs#recordViewNotFound'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateRecordViewNotFound(v: unknown): ValidationResult {
|
||||
return lexicons.validate('com.atproto.admin.defs#recordViewNotFound', v)
|
||||
}
|
||||
|
||||
export interface Moderation {
|
||||
currentAction?: ActionViewCurrent
|
||||
[k: string]: unknown
|
||||
|
@ -12,8 +12,6 @@ export interface QueryParams {}
|
||||
|
||||
export interface InputSchema {
|
||||
account: string
|
||||
/** Additionally add a note describing why the invites were disabled */
|
||||
note?: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -28,13 +26,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -27,13 +27,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -12,8 +12,6 @@ export interface QueryParams {}
|
||||
|
||||
export interface InputSchema {
|
||||
account: string
|
||||
/** Additionally add a note describing why the invites were enabled */
|
||||
note?: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
@ -28,13 +26,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -28,7 +28,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -37,13 +36,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -20,7 +20,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -29,13 +28,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -28,7 +28,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -37,13 +36,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -20,7 +20,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -29,13 +28,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -11,11 +11,6 @@ import * as ComAtprotoAdminDefs from './defs'
|
||||
|
||||
export interface QueryParams {
|
||||
subject?: string
|
||||
ignoreSubjects?: string[]
|
||||
/** Get all reports that were actioned by a specific moderator */
|
||||
actionedBy?: string
|
||||
/** Filter reports made by one or more DIDs */
|
||||
reporters?: string[]
|
||||
resolved?: boolean
|
||||
actionType?:
|
||||
| 'com.atproto.admin.defs#takedown'
|
||||
@ -25,8 +20,6 @@ export interface QueryParams {
|
||||
| (string & {})
|
||||
limit: number
|
||||
cursor?: string
|
||||
/** Reverse the order of the returned records? when true, returns reports in chronological order */
|
||||
reverse?: boolean
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
@ -42,7 +35,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -51,13 +43,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -21,23 +21,18 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
error?: 'RecordNotFound'
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -20,23 +20,18 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
status: number
|
||||
message?: string
|
||||
error?: 'RepoNotFound'
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -28,7 +28,6 @@ export interface HandlerInput {
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -37,13 +36,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -28,7 +28,6 @@ export interface HandlerInput {
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -37,13 +36,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -10,9 +10,7 @@ import { HandlerAuth } from '@atproto/xrpc-server'
|
||||
import * as ComAtprotoAdminDefs from './defs'
|
||||
|
||||
export interface QueryParams {
|
||||
/** DEPRECATED: use 'q' instead */
|
||||
term?: string
|
||||
q?: string
|
||||
invitedBy?: string
|
||||
limit: number
|
||||
cursor?: string
|
||||
@ -31,7 +29,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -40,13 +37,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -26,8 +26,6 @@ export interface InputSchema {
|
||||
createLabelVals?: string[]
|
||||
negateLabelVals?: string[]
|
||||
reason: string
|
||||
/** Indicates how long this action was meant to be in effect before automatically expiring. */
|
||||
durationInHours?: number
|
||||
createdBy: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
@ -42,7 +40,6 @@ export interface HandlerInput {
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -52,13 +49,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -28,13 +28,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -27,13 +27,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -9,8 +9,8 @@ import { CID } from 'multiformats/cid'
|
||||
import { HandlerAuth } from '@atproto/xrpc-server'
|
||||
|
||||
export interface QueryParams {
|
||||
/** The handle to resolve. */
|
||||
handle: string
|
||||
/** The handle to resolve. If not supplied, will resolve the host's own handle. */
|
||||
handle?: string
|
||||
}
|
||||
|
||||
export type InputSchema = undefined
|
||||
@ -25,7 +25,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -34,13 +33,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -26,13 +26,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -34,40 +34,3 @@ export function isLabel(v: unknown): v is Label {
|
||||
export function validateLabel(v: unknown): ValidationResult {
|
||||
return lexicons.validate('com.atproto.label.defs#label', v)
|
||||
}
|
||||
|
||||
/** Metadata tags on an atproto record, published by the author within the record. */
|
||||
export interface SelfLabels {
|
||||
values: SelfLabel[]
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isSelfLabels(v: unknown): v is SelfLabels {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'com.atproto.label.defs#selfLabels'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateSelfLabels(v: unknown): ValidationResult {
|
||||
return lexicons.validate('com.atproto.label.defs#selfLabels', v)
|
||||
}
|
||||
|
||||
/** Metadata tag on an atproto record, published by the author within the record. Note -- schemas should use #selfLabels, not #selfLabel. */
|
||||
export interface SelfLabel {
|
||||
/** the short string name of the value or type of this label */
|
||||
val: string
|
||||
[k: string]: unknown
|
||||
}
|
||||
|
||||
export function isSelfLabel(v: unknown): v is SelfLabel {
|
||||
return (
|
||||
isObj(v) &&
|
||||
hasProp(v, '$type') &&
|
||||
v.$type === 'com.atproto.label.defs#selfLabel'
|
||||
)
|
||||
}
|
||||
|
||||
export function validateSelfLabel(v: unknown): ValidationResult {
|
||||
return lexicons.validate('com.atproto.label.defs#selfLabel', v)
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -40,13 +39,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -20,15 +20,12 @@ export type OutputSchema =
|
||||
| { $type: string; [k: string]: unknown }
|
||||
export type HandlerError = ErrorFrame<'FutureCursor'>
|
||||
export type HandlerOutput = HandlerError | OutputSchema
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
req: IncomingMessage
|
||||
signal: AbortSignal
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => AsyncIterable<HandlerOutput>
|
||||
}) => AsyncIterable<HandlerOutput>
|
||||
|
||||
export interface Labels {
|
||||
seq: number
|
||||
|
@ -44,7 +44,6 @@ export interface HandlerInput {
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -53,13 +52,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -21,7 +21,7 @@ export const REASONSPAM = 'com.atproto.moderation.defs#reasonSpam'
|
||||
export const REASONVIOLATION = 'com.atproto.moderation.defs#reasonViolation'
|
||||
/** Misleading identity, affiliation, or content */
|
||||
export const REASONMISLEADING = 'com.atproto.moderation.defs#reasonMisleading'
|
||||
/** Unwanted or mislabeled sexual content */
|
||||
/** Unwanted or mis-labeled sexual content */
|
||||
export const REASONSEXUAL = 'com.atproto.moderation.defs#reasonSexual'
|
||||
/** Rude, harassing, explicit, or otherwise unwelcoming behavior */
|
||||
export const REASONRUDE = 'com.atproto.moderation.defs#reasonRude'
|
||||
|
@ -32,16 +32,13 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
||||
/** Create a new record. */
|
||||
export interface Create {
|
||||
|
@ -40,7 +40,6 @@ export interface HandlerInput {
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -50,13 +49,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -36,13 +36,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | void
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -29,7 +29,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -38,13 +37,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -33,7 +33,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -42,13 +41,10 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
@ -37,7 +37,6 @@ export type HandlerInput = undefined
|
||||
export interface HandlerSuccess {
|
||||
encoding: 'application/json'
|
||||
body: OutputSchema
|
||||
headers?: { [key: string]: string }
|
||||
}
|
||||
|
||||
export interface HandlerError {
|
||||
@ -46,16 +45,13 @@ export interface HandlerError {
|
||||
}
|
||||
|
||||
export type HandlerOutput = HandlerError | HandlerSuccess
|
||||
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
||||
export type Handler<HA extends HandlerAuth = never> = (ctx: {
|
||||
auth: HA
|
||||
params: QueryParams
|
||||
input: HandlerInput
|
||||
req: express.Request
|
||||
res: express.Response
|
||||
}
|
||||
export type Handler<HA extends HandlerAuth = never> = (
|
||||
ctx: HandlerReqCtx<HA>,
|
||||
) => Promise<HandlerOutput> | HandlerOutput
|
||||
}) => Promise<HandlerOutput> | HandlerOutput
|
||||
|
||||
export interface Record {
|
||||
uri: string
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user