import { type AuthDeps } from "./store-auth.ts"; /** * Connection configuration for the AI Asset Store API. `jwt` is normally left * null here and filled per-call by the caller from {@link getStoreToken} (the * device-flow session); it stays on the type for the `{ ...config, jwt }` spread. * * @docLink cli/dev-guide#store-client */ export interface StoreConfig { url: string; jwt: string | null; } /** * Read the store API base URL (settings `storeUrl` → `SKAILE_STORE_URL` → * default). Auth is not read here — it lives in the device-flow session; see * {@link getStoreToken}. * * @docLink cli/dev-guide#store-client */ export declare function getStoreConfig(): StoreConfig; /** * Return a valid store access token (Keycloak device-flow session, refreshed if * needed). Throws a "run `skaile store login`" error when there is no session. * This is the auth source for every `/api/v1/*` publisher call. */ export declare function getStoreToken(deps?: AuthDeps): Promise; /** * Make an authenticated HTTP request to the store REST API. * * @param config - Store connection config (URL + auth token). * @param path - API path (e.g. `/api/assets`). * @param opts - Optional method, body, query params, extra headers, and * `timeoutMs` (default 1500). Publisher calls pass a longer timeout because * they trigger server-side clone/sync work. * @returns Parsed JSON response body. * @docLink cli/dev-guide#store-client */ export declare function storeFetch(config: StoreConfig, path: string, opts?: { method?: string; body?: unknown; params?: Record; headers?: Record; timeoutMs?: number; }): Promise; /** * Return `true` when a store session exists (a Keycloak device-flow token cached * at `~/.skaile/auth.json`). Validity/refresh is resolved on use via * {@link getStoreToken}. * * @docLink cli/dev-guide#store-client */ export declare function isStoreAuthenticated(): boolean; //# sourceMappingURL=store-client.d.ts.map