eb8bfd11d1
* add new routes with placeholder screens * add clops list * add a clop input * add some better padding to the clops * some more adjustments * add rnkc * implement rnkc * implement rnkc * be a little less weird about it * rename clop stuff * rename more clop * one more * [Clipclops] Temp codegenerated lexicon (#3749) * add codegenerated lexicon * replace hailey's types * use codegen'd types in components * fix error + throw if fetch failed * remove bad imports * update messageslist and messageitem * import useState * add clop service URL hook * add dm service url storage * use context * use context for service url (temp) * remove log * nits --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
37 lines
641 B
TypeScript
37 lines
641 B
TypeScript
import {Headers, XRPCError} from '@atproto/xrpc'
|
|
|
|
import * as TempDmDefs from './defs'
|
|
|
|
export interface QueryParams {
|
|
cursor?: string
|
|
}
|
|
|
|
export type InputSchema = undefined
|
|
|
|
export interface OutputSchema {
|
|
cursor?: string
|
|
logs: (
|
|
| TempDmDefs.LogBeginChat
|
|
| TempDmDefs.LogCreateMessage
|
|
| TempDmDefs.LogDeleteMessage
|
|
| {$type: string; [k: string]: unknown}
|
|
)[]
|
|
[k: string]: unknown
|
|
}
|
|
|
|
export interface CallOptions {
|
|
headers?: Headers
|
|
}
|
|
|
|
export interface Response {
|
|
success: boolean
|
|
headers: Headers
|
|
data: OutputSchema
|
|
}
|
|
|
|
export function toKnownErr(e: any) {
|
|
if (e instanceof XRPCError) {
|
|
}
|
|
return e
|
|
}
|