/** * Run an async function with a per-request API key in context. All * `apiGet` / `apiPost` calls inside `fn` will use this key instead of * the env-var default. When `strict` is true, missing context inside * `fn` will throw rather than fall back to the env key — use this for * the authenticated HTTP endpoint where the wrong tenant must never * be billed. */ export declare function runWithApiKey(apiKey: string, fn: () => Promise, options?: { strict?: boolean; }): Promise; /** * Throws if no `NORDIC_API_KEY` is configured in the environment. * Called at startup by the stdio entrypoint (`src/index.ts`), which * cannot rely on per-request overrides. */ export declare function ensureApiKeyConfigured(): void; /** * Returns the API key that the current request should use — the per-request * customer key when an ALS scope is active (/mcp/auth), otherwise the env * `NORDIC_API_KEY`. Used by the discovery tools so spec fetches and * call_endpoint authenticate with exactly the same key as the curated tools. * Throws a `NordicApiError` (401) if no key is available. */ export declare function getResolvedApiKey(): string; /** * Returns true iff a strict per-request key scope is active in the current * async context. The authenticated HTTP endpoint uses this immediately * before invoking the MCP transport to assert that ALS context has actually * propagated, so we never silently fall back to the server key. */ export declare function isStrictApiKeyScopeActive(): boolean; export declare function apiGet(path: string): Promise; export declare function apiPost(path: string, body: unknown): Promise; //# sourceMappingURL=apiClient.d.ts.map