/** * Workers-config client for resolving queue URLs from the workers-config API Lambda. */ interface WorkersConfig { version: string; stage: string; region: string; workers: Record; } /** * Fetches the workers configuration from the workers-config API. * Results are cached for 5 minutes to reduce API calls. * * @param apiUrl - The URL of the workers-config API endpoint * @param apiKey - Optional API key for authentication (sent as x-workers-config-key header) * @returns The workers configuration mapping worker IDs to queue URLs */ declare function getWorkersConfig(apiUrl: string, apiKey?: string): Promise; /** * Resolves the queue URL for a specific worker ID. * Throws an error if the worker ID is not found in the configuration. * * @param workerId - The ID of the worker * @param apiUrl - The URL of the workers-config API endpoint * @param apiKey - Optional API key for authentication * @returns The queue URL for the worker */ declare function resolveQueueUrl(workerId: string, apiUrl: string, apiKey?: string): Promise; /** * Clears the cached workers configuration. * Useful for testing or when you need to force a refresh. */ declare function clearWorkersConfigCache(): void; export { type WorkersConfig, clearWorkersConfigCache, getWorkersConfig, resolveQueueUrl };