import { ServicePlugin, Store, WebhookDispatcher, AppKeyResolver, AuthFallback } from '@emulators/core';

interface LoadedService {
    plugin: ServicePlugin;
    seedFromConfig?(store: Store, baseUrl: string, config: unknown, webhooks?: WebhookDispatcher): void;
    createAppKeyResolver?(store: Store): AppKeyResolver;
    /**
     * Project live store state back into the editable `*SeedConfig` shape this
     * service's `seedFromConfig` consumes. The result must round-trip: feeding
     * it back through `seedFromConfig` reconstructs equivalent state. Credentials
     * are stripped unless `opts.includeCredentials` is set.
     */
    storeToSeedConfig?(store: Store, baseUrl: string, opts?: {
        includeCredentials?: boolean;
    }): object;
}
interface ServiceEntry {
    label: string;
    endpoints: string;
    load(): Promise<LoadedService>;
    defaultFallback(svcSeedConfig?: Record<string, unknown>): AuthFallback;
    initConfig: Record<string, unknown>;
}
declare const SERVICE_NAME_LIST: readonly ["vercel", "github", "google", "slack", "apple", "microsoft", "okta", "aws", "resend", "stripe", "mongoatlas", "clerk", "workos", "nango", "simpro", "uptick"];
type ServiceName = (typeof SERVICE_NAME_LIST)[number];
declare const SERVICE_NAMES: readonly ServiceName[];
declare const SERVICE_REGISTRY: Record<ServiceName, ServiceEntry>;

interface SeedConfig {
    tokens?: Record<string, {
        login: string;
        scopes?: string[];
    }>;
    [service: string]: unknown;
}
interface EmulatorOptions {
    service: ServiceName;
    port?: number;
    seed?: SeedConfig;
    baseUrl?: string;
}
interface Emulator {
    url: string;
    reset(): void;
    close(): Promise<void>;
}
declare function createEmulator(options: EmulatorOptions): Promise<Emulator>;

export { type Emulator, type EmulatorOptions, type LoadedService, SERVICE_NAMES, SERVICE_REGISTRY, type SeedConfig, type ServiceEntry, type ServiceName, createEmulator };
