import { type BrandApiClientOptions } from "./types.js"; export type { BrandApiClientOptions } from "./types.js"; export interface BrandApiRequest { /** Base path under the API host (e.g. `/stream/ai-skills-api`). */ basePath: string; /** Path appended to `basePath`. Should start with a slash. */ path: string; method: "GET" | "POST" | "PATCH" | "DELETE"; query?: Record; /** Parsed JSON body. Stringified by the client. */ body?: unknown; /** Optional AbortSignal for cancellation. */ signal?: AbortSignal; } /** * Issue a single request to a Brand API and parse JSON. * * Auth handling: * - Acquires a token via `acquireBrandToken` (cache → mint). * - On 401, clears the cached token once and retries. This handles * the documented 24h token expiry; if the retry also 401s we * surface the failure rather than loop. * * Errors surface as `BRAND_API_FAILED` with the server's * `error_description` / `detail` / `message` in the message, leaving * `AUTH_BRAND_REQUIRED` for credential-resolution failures inside * `acquireBrandToken`. */ export declare const requestBrandApi: (client: BrandApiClientOptions, request: BrandApiRequest) => Promise;