/**
 * GENERATED CODE - DO NOT MODIFY
 */
import { HeadersMap, XRPCError } from '@atproto/xrpc'
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
import { CID } from 'multiformats/cid'
import { validate as _validate } from '../../../../lexicons'
import {
  type $Typed,
  is$typed as _is$typed,
  type OmitKey,
} from '../../../../util'

const is$typed = _is$typed,
  validate = _validate
const id = 'com.atproto.repo.describeRepo'

export type QueryParams = {
  /** The handle or DID of the repo. */
  repo: string
}
export type InputSchema = undefined

export interface OutputSchema {
  handle: string
  did: string
  /** The complete DID document for this account. */
  didDoc: { [_ in string]: unknown }
  /** List of all the collections (NSIDs) for which this repo contains at least one record. */
  collections: string[]
  /** Indicates if handle is currently valid (resolves bi-directionally) */
  handleIsCorrect: boolean
}

export interface CallOptions {
  signal?: AbortSignal
  headers?: HeadersMap
}

export interface Response {
  success: boolean
  headers: HeadersMap
  data: OutputSchema
}

export function toKnownErr(e: any) {
  return e
}
