import type { AuthStrategy, FetchInit } from './types.js'; /** * API Key authentication strategy. * * Supports two modes: * - Bearer token: When headerName is 'Authorization', formats as 'Bearer {key}' * - Direct key: For other headers (e.g., 'x-api-key'), sets the key directly * * @example * // For MRT API (Bearer token) * const auth = new ApiKeyStrategy(apiKey, 'Authorization'); * // Sets: Authorization: Bearer {apiKey} * * @example * // For custom API key header * const auth = new ApiKeyStrategy(apiKey, 'x-api-key'); * // Sets: x-api-key: {apiKey} */ export declare class ApiKeyStrategy implements AuthStrategy { private readonly headerValue; private readonly headerName; /** * Creates a new ApiKeyStrategy instance for API key authentication. * * @param key - The API key value to use for authentication * @param headerName - The HTTP header name to populate with the API key. Defaults to 'x-api-key'. When set to 'Authorization', the key will be formatted as a Bearer token ('Bearer {key}'); for other header names, the key is set directly. */ constructor(key: string, headerName?: string); fetch(url: string, init?: FetchInit): Promise; /** * Returns the authorization header value for use with openapi-fetch middleware. */ getAuthorizationHeader(): Promise; }