import type { FetchClient } from "../../../shared/index.js"; /** Admin user of the token. Only `id` is guaranteed. */ export type CurrentUser = { id: number; [key: string]: unknown; }; /** * Resolves the admin user of the token. * * `GET /profile` exists from platform 10.2; before 10.2 the same serializer is * served at `GET /admin_users/me`, which 10.2 answers with 404. The lookup * tries `/profile` first and falls back to `/admin_users/me` only on a 404. * * The route that answered and the user it returned are kept in the instance: * each repository creates its own lookup, so one tool call reads the user * once. A failed read is not kept, so the next call tries again. */ export declare class CurrentUserLookup { private readonly fetchClient; private route; private pending; constructor(fetchClient: FetchClient); /** Full body of the user of the token. Requires a numeric `id`. */ user(): Promise; /** Id of the user of the token, to compare with the owner of a lock. */ id(): Promise; private read; private readRoute; } //# sourceMappingURL=CurrentUserLookup.d.ts.map