import { Client } from "@atproto/lex"; import { AstroSession } from "astro"; //#region src/types/session.d.ts type AtAstroSession = Pick; //#endregion //#region src/lib/atproto-client.d.ts /** * Returns an ATProto client, authenticated if the user is signed in, and a public client otherwise. * @param session - The session to use for authentication, typically Astro.session. */ declare function getClient(session: AtAstroSession | undefined): Promise<{ /** An ATProto client. It will be authenticated if the DID is returned; else it will be a public client. */ client: Client; /** The DID of the authenticated user, or null if the user is not signed in. */ did: string | null; /** The resolved handle, `handle.invalid` if unverified, or null when signed out. */ handle: string | null; }>; //#endregion export { getClient as t };