import type { Transport } from "./transport"; /** * These were re-declared here, under a comment saying they lived in the server * package rather than in `@rebasepro/types`. That stopped being true, and the * copy drifted: it never gained `admin`, the flag that grants a key the `admin` * role — admin routes plus the RLS `default_admin` policies — so the SDK could * describe every kind of key except a privileged one, and * `createKey({ …, admin: true })` was an excess-property error. */ export type { ApiKeyPermission, ApiKeyMasked, ApiKeyWithSecret, CreateApiKeyRequest, UpdateApiKeyRequest } from "@rebasepro/types"; import type { ApiKeyMasked, ApiKeyWithSecret, CreateApiKeyRequest, UpdateApiKeyRequest } from "@rebasepro/types"; /** Options for the `createApiKeys` factory. */ export interface CreateApiKeysOptions { apiKeysPath?: string; } /** * Creates a client for managing API keys via the admin routes. * * @param transport - The shared HTTP transport created by `createTransport`. * @param options - Optional overrides (e.g. a custom base path). */ export declare function createApiKeys(transport: Transport, options?: CreateApiKeysOptions): { listKeys: () => Promise<{ keys: ApiKeyMasked[]; }>; getKey: (id: string) => Promise<{ key: ApiKeyMasked; }>; createKey: (data: CreateApiKeyRequest) => Promise<{ key: ApiKeyWithSecret; }>; updateKey: (id: string, data: UpdateApiKeyRequest) => Promise<{ key: ApiKeyMasked; }>; revokeKey: (id: string) => Promise<{ success: boolean; }>; };