about summary refs log tree commit diff
path: root/src/temp/dm/getChatLog.ts
blob: 9d310d908fbd29b51ac1bf14a8ec240fbb4d7d46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
}