/** * Build the Authorization header for quonfig API requests. * Format: Basic base64("1:{sdkKey}") */ export declare const authHeader: (sdkKey: string) => string; /** * Build the standard headers for quonfig API requests. * Note: We intentionally omit X-Quonfig-Client-Version to avoid * CORS preflight issues in browsers. Custom headers trigger OPTIONS * preflight which requires server-side CORS configuration. */ export declare const headers: (sdkKey: string, _clientVersion: string) => { Authorization: string; }; /** * Per-leg hard fetch deadline (ms). Lowered from 10s to 3s with the parallel * hedge (spec 5e): a page loaded against a hung primary used to wait the full * 10s before even trying the secondary. 3s sits above a cold-start / mobile * primary (so a slow-but-alive primary isn't clipped) but far below the old * wall. It must stay ABOVE DEFAULT_HEDGE_DELAY so a hedged secondary leg gets * its own budget. Mirrors sdk-go's DefaultConfigFetchTimeout (3s). */ export declare const DEFAULT_TIMEOUT = 3000; /** * How long the hedge waits for the primary leg before ALSO firing the * secondary in parallel (ms). Fire-on-slow, never on a fast primary success, * so the secondary is contacted only for the bounded slice of requests slower * than this delay (spec 5e). Mirrors sdk-go's DefaultConfigFetchHedgeDelay (2s). * * Raising this toward the primary's measured p99 reduces how often the * secondary is touched; the reject-older guard (spec 5f) makes firing it early * harmless either way — the depth-1 secondary's generation=1 is rejected for an * established client, so an early hedge can never regress or flap it. */ export declare const DEFAULT_HEDGE_DELAY = 2000; /** * Default Quonfig domain. Used when no explicit URL options are supplied * and `QUONFIG_DOMAIN` is not set in `process.env`. */ export declare const DEFAULT_DOMAIN = "quonfig.com"; export type DomainOptions = { domain?: string; }; /** * Resolve the active Quonfig domain. * * Order (highest wins): * 1. `options.domain` — the documented browser path (single knob that * flips api + telemetry URLs in lockstep, set via `init({ domain })` * or @quonfig/react ``) * 2. `process.env.QUONFIG_DOMAIN` — useful Node-side / SSR / build-time * inlining; not reliably present at runtime in browsers * 3. Hardcoded default `"quonfig.com"` * * The env-var read is guarded so a pure browser runtime (where `process` * does not exist or is stubbed) does not throw. */ export declare const getDomain: (options?: DomainOptions) => string; /** * Default ordered list of API base URLs, derived from the active domain. * Frontend SDK does NOT open SSE — only the eval-with-context HTTP endpoint * is hit, so we ship both primary and secondary as failover targets. */ export declare const getDefaultApiUrls: (options?: DomainOptions) => string[]; /** * Default telemetry base URL, derived from the active domain. */ export declare const getDefaultTelemetryUrl: (options?: DomainOptions) => string;