import { AddRoutesOptions } from "../router";
export interface WorkerParameter {
    type: keyof WorkerBindingSourceOptions | string;
    optional?: boolean;
}
type ImportableURL = string | URL;
export interface WorkerBindingSourceOptions {
    text?: string;
    data?: BlobPart;
    json?: string | unknown;
    import?: ImportableURL;
    service?: ServiceEntrypointOption;
    queue?: ServiceEntrypointOption;
}
export interface WorkerBindingTypeOptions extends WorkerBindingSourceOptions {
    parameter?: WorkerParameter;
}
export interface WorkerBinding extends WorkerBindingTypeOptions, ImportCallOptions {
    name?: string;
    protocol?: string;
    routes?: AddRoutesOptions;
}
export interface WorkerOptions {
    bindings?: WorkerBinding[];
}
export interface ScriptWorker {
    url?: ImportableURL | ImportableURL[];
}
export interface Service extends ScriptWorker, WorkerOptions {
    name?: string;
}
export interface ServiceEntrypoint extends Service {
    entrypoint?: string;
    entrypointArguments?: string[];
}
export interface NamedService extends Service {
    name: string;
}
export type ServiceEntrypointOption = string | ServiceEntrypoint;
export interface Socket {
    address: string;
    service: ServiceEntrypointOption;
    type?: string;
    name?: string;
    routes?: AddRoutesOptions;
}
export interface HttpOptions {
}
export interface HttpSocket extends Socket, HttpOptions {
    type?: "http";
}
export interface HttpsTlsOptions {
}
export interface HttpsSocket extends Socket, HttpOptions {
    type: "https";
    tls?: HttpsTlsOptions;
}
export type SocketType = HttpSocket | HttpsSocket;
export interface Extension {
    url: ImportableURL | ImportableURL[];
    name?: string;
}
export type ExtensionType = Extension | ImportableURL;
export interface Config {
    url?: string;
    services?: NamedService[];
    sockets?: SocketType[];
    extensions?: ExtensionType[];
}
export {};
