type Duration = `${number}ns` | `${number}us` | `${number}ms` | `${number}s` | `${number}m` | `${number}h`; type StrOrStrArr = string | string[]; type KV = Record; export type StringMap = Record; export type RestartPolicy = 'no' | 'always' | 'unless-stopped' | `on-failure${'' | `:${number}`}`; export interface ComposeHealthcheck { test: StrOrStrArr | ['NONE']; interval?: Duration; timeout?: Duration; retries?: number; start_period?: Duration; } export interface ComposeBuild { context?: string; dockerfile?: string; args?: KV; target?: string; network?: string; shm_size?: string | number; labels?: StringMap; cache_from?: string[]; cache_to?: Array<{ type: 'inline' | 'local' | 'registry' | 'gha'; [k: string]: any; }>; extra_hosts?: string[] | StringMap; } export interface ComposeResources { limits?: { cpus?: number | string; memory?: string | number; pids?: number; }; reservations?: { cpus?: number | string; memory?: string | number; devices?: Array<{ capabilities: string[]; }>; }; } export interface ComposeLogging { driver?: 'json-file' | 'local' | 'syslog' | 'journald' | 'gelf' | 'fluentd' | 'awslogs' | 'splunk' | 'none'; options?: KV; } export interface ComposeDeploy { mode?: 'replicated' | 'global'; replicas?: number; restart_policy?: { condition?: 'none' | 'on-failure' | 'any'; delay?: Duration; max_attempts?: number; window?: Duration; }; resources?: ComposeResources; labels?: StringMap | string[]; placement?: { constraints?: string[]; preferences?: Array<{ spread: string; }>; }; update_config?: { parallelism?: number; delay?: Duration; failure_action?: 'continue' | 'rollback' | 'pause'; monitor?: Duration; max_failure_ratio?: number; order?: 'stop-first' | 'start-first'; }; rollback_config?: ComposeDeploy['update_config']; } export interface ComposeVolumeMount { type?: 'volume' | 'bind' | 'tmpfs' | 'npipe'; source?: string; target: string; read_only?: boolean; consistency?: 'consistent' | 'cached' | 'delegated'; bind?: { create_host_path?: boolean; propagation?: string; }; volume?: { nocopy?: boolean; }; tmpfs?: { size?: number; mode?: number; }; } export interface ComposeService { container_name?: string; image?: string; build?: ComposeBuild | string; command?: StrOrStrArr; entrypoint?: StrOrStrArr; user?: string | number; working_dir?: string; hostname?: string; domainname?: string; environment?: StringMap | string[]; env_file?: string | string[]; labels?: StringMap | string[]; ports?: Array; expose?: Array; volumes?: Array; devices?: Array; extra_hosts?: string[] | StringMap; dns?: string[]; dns_search?: string[]; dns_opt?: string[]; networks?: Array | StringMap; healthcheck?: ComposeHealthcheck; restart?: RestartPolicy; tty?: boolean; stdin_open?: boolean; depends_on?: string[] | Record; stop_grace_period?: Duration; stop_signal?: string; logging?: ComposeLogging; security_opt?: string[]; privileged?: boolean; read_only?: boolean; shm_size?: string | number; sysctls?: StringMap; deploy?: ComposeDeploy; x_extra?: Record; } export interface ComposeTop { /** Name of the Docker API to use. If not set, the system default will be used. */ iobDockerApi?: { host: string; port: number; protocol: 'http' | 'https'; ca?: string; cert?: string; key?: string; } | string; iobDockerComposeFiles?: string[]; version?: '3.9' | '3.8' | '3.7' | '3.6' | '3.5' | '3.4' | '3.3' | '3.2' | '3.1' | '3'; services?: Record; networks?: Record; options?: StringMap; }; labels?: StringMap | string[]; }>; volumes?: Record; secrets?: Record; configs?: Record; [xKey: `x-${string}`]: any; } export declare function cleanUndefined(obj: Record): Record | undefined; export default function composeFromYaml(input: string | Record): ComposeTop; export {};