import type { Result } from '@stacksjs/error-handling'; /** * Create a personal access OAuth client. * * Idempotent: returns an `err({ code: 'already-exists' })` when a * non-revoked personal access client already exists in the * `oauth_clients` table, rather than inserting a duplicate. The * previous behaviour silently created a second row, which made * `getPersonalAccessClient()` (which `LIMIT 1`s with no `ORDER BY`) * return whichever the DB happened to surface first — racy with * subsequent token mints. See stacksjs/stacks#1860 M-7. * * The plaintext secret is what callers (e.g., `./buddy auth:token`) * surface to the operator — they store it themselves. The DB holds * only the bcrypt hash so a DB compromise doesn't leak usable client * credentials (stacksjs/stacks#1861 M-1). */ export declare function createPersonalAccessClient(): Promise>; export declare interface CreatePersonalAccessClientError { code: 'already-exists' message: string }