import type { ServicePolicy } from "@metamask/controller-utils"; import type { AbstractConfigRegistryApiService, FetchConfigOptions, FetchConfigResult } from "./abstract-config-registry-api-service.mjs"; export declare const DEFAULT_API_BASE_URL = "https://client-config.uat-api.cx.metamask.io/v1"; export declare const DEFAULT_ENDPOINT_PATH = "/config/networks"; export declare const DEFAULT_TIMEOUT: number; export type ConfigRegistryApiServiceOptions = { apiBaseUrl?: string; endpointPath?: string; timeout?: number; fetch?: typeof fetch; degradedThreshold?: number; retries?: number; maximumConsecutiveFailures?: number; circuitBreakDuration?: number; }; export declare class ConfigRegistryApiService implements AbstractConfigRegistryApiService { #private; /** * Construct a Config Registry API Service. * * @param options - The options for constructing the service. * @param options.apiBaseUrl - The base URL for the API. Defaults to the UAT API URL. * @param options.endpointPath - The endpoint path. Defaults to '/config/networks'. * @param options.timeout - Timeout for HTTP requests in milliseconds. Defaults to 10 seconds. * @param options.fetch - Custom fetch function for testing or custom implementations. Defaults to the global fetch. * @param options.degradedThreshold - The length of time (in milliseconds) that governs when the service is regarded as degraded. Defaults to 5 seconds. * @param options.retries - Number of retry attempts for each fetch request. Defaults to 3. * @param options.maximumConsecutiveFailures - The maximum number of consecutive failures allowed before breaking the circuit. Defaults to 3. * @param options.circuitBreakDuration - The amount of time to wait when the circuit breaks from too many consecutive failures. Defaults to 2 minutes. */ constructor({ apiBaseUrl, endpointPath, timeout, fetch: customFetch, degradedThreshold, retries, maximumConsecutiveFailures, circuitBreakDuration, }?: ConfigRegistryApiServiceOptions); onBreak(...args: Parameters): ReturnType; onDegraded(...args: Parameters): ReturnType; fetchConfig(options?: FetchConfigOptions): Promise; } //# sourceMappingURL=config-registry-api-service.d.mts.map