import { Config, Service, ServiceEntrypointOption } from "./types";
import { DurableServiceWorkerRegistration } from "../container";
import { Pushable } from "../execute";
import { DurableEventData } from "../../../data";
import { FetchFn } from "../execute-fetch";
import { ServiceWorkerWorkerData } from "../worker";
interface ServiceWorkerEventFn {
    (event: DurableEventData): Promise<unknown>;
}
interface ServiceWorkerContext {
    pushable: Pushable<ServiceWorkerWorkerData, unknown>;
    service: Service;
    registration: DurableServiceWorkerRegistration;
    activated: Promise<ServiceWorkerEventFn>;
    fetch: FetchFn;
}
export interface ImportConfigurationOptions {
    virtual?: boolean;
}
/**
 * Import configuration and initiate services
 */
export declare function importConfiguration(source: string | URL | Config, { virtual }?: ImportConfigurationOptions): Promise<{
    fetch: FetchFn;
    getService: (options?: ServiceEntrypointOption) => Promise<ServiceWorkerContext>;
    close(): Promise<void>;
}>;
export {};
