import { type NetworkOptions, type Session } from './atproto.ts'; /** The collection lexicon schemas are published in. */ export declare const SCHEMA_COLLECTION = "com.atproto.lexicon.schema"; /** A lexicon document, as this package carries it. */ export interface LexiconDocument { lexicon: 1; id: string; defs: Record; [key: string]: unknown; } /** Where this package's lexicons are (`lexicons/`, beside package.json). */ export declare function lexiconDir(): string; /** Every lexicon document this package carries, by NSID. */ export declare function lexicons(dir?: string): LexiconDocument[]; /** The domain an NSID's authority is: everything but the name, reversed. */ export declare function authorityOf(nsid: string): string; /** The DID `_lexicon.` names for an NSID, or null when there is no such record. */ export declare function authorityDid(nsid: string, options?: NetworkOptions): Promise; /** What is known about one lexicon's publication. */ export interface LexiconStatus { nsid: string; /** The TXT record that should exist. */ dns: string; /** The DID it names, if it exists. */ authority: string | null; /** Whether the published schema is this package's document, if one is published. */ state: 'current' | 'different' | 'unpublished' | 'no-authority'; uri?: string | undefined; } /** * Where each lexicon stands: does DNS name an authority, does that authority * publish the schema, and is it the document this package carries? The * published record is fetched with its proof and verified. */ export declare function checkLexicons(options?: NetworkOptions, docs?: LexiconDocument[]): Promise; /** The record a lexicon document is published as. */ export declare function schemaRecord(doc: LexiconDocument): Record; /** * Publish every lexicon this package carries from `session`'s account: the * account's schemas listed once, and all of them written in one batch. DNS is * checked first: a schema published from an account the authority does not * name is one nobody can resolve, so that is refused unless `force` says * otherwise. The PDS saying they are written is taken as their being * written; `lexicon check` reads them back, verified, whenever that is wanted. */ export declare function publishLexicons(session: Session, { force, ...options }?: NetworkOptions & { force?: boolean | undefined; }, docs?: LexiconDocument[]): Promise<{ nsid: string; uri: string; dns: string; authority: string | null; }[]>; //# sourceMappingURL=lexicon.d.ts.map