import type { IAuditUser, IUnleashConfig } from '../../types/index.js';
import type { ClientMetricsSchema, FrontendApiFeatureSchema } from '../../openapi/index.js';
import type { IApiUser } from '../../types/api-user.js';
import { type Context } from 'unleash-client';
import { type FrontendSettings } from '../../types/settings/frontend-settings.js';
import type { GlobalFrontendApiCache } from './global-frontend-api-cache.js';
import type { IUnleashServices } from '../../services/index.js';
export type Config = Pick<IUnleashConfig, 'getLogger' | 'frontendApi' | 'frontendApiOrigins' | 'eventBus' | 'flagResolver'>;
export type Services = Pick<IUnleashServices, 'clientMetricsServiceV2' | 'settingService' | 'clientInstanceService'>;
export declare class FrontendApiService {
    private readonly config;
    private readonly logger;
    private readonly services;
    private flagResolver;
    private readonly globalFrontendApiCache;
    /**
     * This is intentionally a Promise because we want to be able to await
     * until the client (which might be being created by a different request) is ready
     * Check this test that fails if we don't use a Promise: frontend-api.concurrency.e2e.test.ts
     */
    private readonly clients;
    private cachedFrontendSettings;
    constructor(config: Config, services: Services, globalFrontendApiCache: GlobalFrontendApiCache);
    getFrontendApiFeatures(token: IApiUser, context: Context): Promise<FrontendApiFeatureSchema[]>;
    private resolveProject;
    registerFrontendApiMetrics(token: IApiUser, metrics: ClientMetricsSchema, ip: string, sdkVersion?: string | string[]): Promise<void>;
    private clientForFrontendApiToken;
    private createClientForFrontendApiToken;
    deleteClientForFrontendApiToken(secret: string): Promise<void>;
    stopAll(): void;
    refreshData(): Promise<void>;
    private static assertExpectedTokenType;
    setFrontendCorsSettings(value: FrontendSettings['frontendApiOrigins'], auditUser: IAuditUser): Promise<void>;
    fetchFrontendSettings(): Promise<FrontendSettings>;
    getFrontendSettings(useCache?: boolean): Promise<FrontendSettings>;
}
//# sourceMappingURL=frontend-api-service.d.ts.map