import { HttpApi, HttpApiEndpoint, HttpApiGroup, HttpClient, type Socket } from "@effect/platform"; import { Effect, Schema, Stream, type Layer } from "effect"; import { ArchiveChange, ContainerConfig, ContainerCreateRequest, ContainerHostConfig, ContainerInspectResponse, ContainerStatsResponse, ContainerSummary, ContainerTopResponse, ContainerWaitResponse } from "../generated/index.js"; import { ContainerIdentifier } from "../schemas/id.js"; import { DockerError } from "./circular.ts"; import { BadRequest, Conflict, Forbidden, InternalServerError, NotAcceptable, NotFound } from "./httpApiHacks.js"; declare const ListFilters_base: Schema.transform, Schema.Struct<{ ancestor: Schema.optional>; before: Schema.optional>; expose: Schema.optional>; exited: Schema.optional>; health: Schema.optional>>; identifier: Schema.optional>; "is-task": Schema.optional; label: Schema.optional>; name: Schema.optional>; network: Schema.optional>; publish: Schema.optional>; since: Schema.optional>; status: Schema.optional>>; volume: Schema.optional; }>>; /** @since 1.0.0 */ export declare class ListFilters extends ListFilters_base { } declare const PruneFilters_base: Schema.transform, Schema.Struct<{ until: Schema.optional; label: Schema.optional>; }>>; /** @since 1.0.0 */ export declare class PruneFilters extends PruneFilters_base { } /** * @since 1.0.0 * @category HttpApi * @see https://docs.docker.com/reference/api/engine/latest/#tag/Container */ export declare const ContainersApi: HttpApi.HttpApi<"ContainersApi", HttpApiGroup.HttpApiGroup<"containers", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, { readonly size?: boolean | undefined; readonly limit?: number | undefined; readonly all?: boolean | undefined; readonly filters?: { readonly identifier?: readonly string[] | undefined; readonly volume?: string | undefined; readonly exited?: readonly number[] | undefined; readonly name?: readonly string[] | undefined; readonly status?: readonly ("created" | "restarting" | "running" | "removing" | "paused" | "exited" | "dead")[] | undefined; readonly network?: readonly string[] | undefined; readonly label?: readonly string[] | undefined; readonly ancestor?: readonly string[] | undefined; readonly before?: readonly string[] | undefined; readonly expose?: readonly string[] | undefined; readonly health?: readonly ("none" | "starting" | "healthy" | "unhealthy")[] | undefined; readonly "is-task"?: boolean | undefined; readonly publish?: readonly string[] | undefined; readonly since?: readonly string[] | undefined; } | undefined; }, never, never, readonly ContainerSummary[], BadRequest, never, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, { readonly platform?: string | undefined; readonly name?: string | undefined; }, ContainerCreateRequest, never, { readonly Id: string; readonly Warnings: readonly string[] | null; }, BadRequest | Forbidden | NotFound | NotAcceptable | Conflict, never, never> | HttpApiEndpoint.HttpApiEndpoint<"inspect", "GET", { readonly identifier: string; }, { readonly size?: boolean | undefined; }, never, never, ContainerInspectResponse, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"top", "GET", { readonly identifier: string; }, { readonly ps_args?: string | undefined; }, never, never, ContainerTopResponse, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"logs", "GET", { readonly identifier: string; }, { readonly stdout?: boolean | undefined; readonly stderr?: boolean | undefined; readonly since?: number | undefined; readonly until?: number | undefined; readonly follow?: boolean | undefined; readonly timestamps?: boolean | undefined; readonly tail?: string | undefined; }, never, never, void, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"changes", "GET", { readonly identifier: string; }, never, never, never, readonly ArchiveChange[] | null, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"export", "GET", { readonly identifier: string; }, never, never, never, void, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"stats", "GET", { readonly identifier: string; }, { readonly stream?: boolean | undefined; readonly "one-shot"?: boolean | undefined; }, never, never, void, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"resize", "POST", { readonly identifier: string; }, { readonly h?: number | undefined; readonly w?: number | undefined; }, never, never, void, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"start", "POST", { readonly identifier: string; }, { readonly detachKeys?: string | undefined; }, never, never, void, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"stop", "POST", { readonly identifier: string; }, { readonly signal?: string | undefined; readonly t?: number | undefined; }, never, never, void, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"restart", "POST", { readonly identifier: string; }, { readonly signal?: string | undefined; readonly t?: number | undefined; }, never, never, void, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"kill", "POST", { readonly identifier: string; }, { readonly signal?: string | undefined; }, never, never, void, NotFound | Conflict, never, never> | HttpApiEndpoint.HttpApiEndpoint<"update", "POST", { readonly identifier: string; }, never, ContainerConfig, never, { readonly Warnings: readonly string[] | null; }, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"rename", "POST", { readonly identifier: string; }, { readonly name: string; }, never, never, void, NotFound | Conflict, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pause", "POST", { readonly identifier: string; }, never, never, never, void, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"unpause", "POST", { readonly identifier: string; }, never, never, never, void, NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"attach", "POST", { readonly identifier: string; }, { readonly stream?: boolean | undefined; readonly stdout?: boolean | undefined; readonly stderr?: boolean | undefined; readonly stdin?: boolean | undefined; readonly logs?: boolean | undefined; readonly detachKeys?: string | undefined; }, never, { readonly Upgrade: "tcp"; readonly Connection: "Upgrade"; }, void, BadRequest | NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"attachWebsocket", "GET", { readonly identifier: string; }, { readonly stream?: boolean | undefined; readonly stdout?: boolean | undefined; readonly stderr?: boolean | undefined; readonly stdin?: boolean | undefined; readonly logs?: boolean | undefined; readonly detachKeys?: string | undefined; }, never, never, void, BadRequest | NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"wait", "POST", { readonly identifier: string; }, { readonly condition?: string | undefined; }, never, never, ContainerWaitResponse, BadRequest | NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", { readonly identifier: string; }, { readonly link?: boolean | undefined; readonly force?: boolean | undefined; readonly v?: boolean | undefined; }, never, never, void, BadRequest | NotFound | Conflict, never, never> | HttpApiEndpoint.HttpApiEndpoint<"archive", "GET", { readonly identifier: string; }, { readonly path: string; }, never, never, void, BadRequest | NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"archiveInfo", "HEAD", { readonly identifier: string; }, { readonly path: string; }, never, never, void, BadRequest | NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"putArchive", "PUT", { readonly identifier: string; }, { readonly path: string; readonly noOverwriteDirNonDir?: string | undefined; readonly copyUIDGidentifier?: string | undefined; }, never, never, void, BadRequest | Forbidden | NotFound, never, never> | HttpApiEndpoint.HttpApiEndpoint<"prune", "POST", never, { readonly filters?: { readonly label?: readonly string[] | undefined; readonly until?: string | undefined; } | undefined; }, never, never, { readonly ContainersDeleted: readonly string[] | null; readonly SpaceReclaimed: number; }, never, never, never>, InternalServerError, never, false>, import("@effect/platform/HttpApiError").HttpApiDecodeError, never>; declare const Containers_base: Effect.Service.Class]; readonly effect: Effect.Effect<{ list: (options?: { readonly size?: boolean | undefined; readonly limit?: number | undefined; readonly all?: boolean | undefined; readonly filters?: { readonly identifier?: readonly string[] | undefined; readonly volume?: string | undefined; readonly exited?: readonly number[] | undefined; readonly name?: readonly string[] | undefined; readonly status?: readonly ("created" | "restarting" | "running" | "removing" | "paused" | "exited" | "dead")[] | undefined; readonly network?: readonly string[] | undefined; readonly label?: readonly string[] | undefined; readonly ancestor?: readonly string[] | undefined; readonly before?: readonly string[] | undefined; readonly expose?: readonly string[] | undefined; readonly health?: readonly ("none" | "starting" | "healthy" | "unhealthy")[] | undefined; readonly "is-task"?: boolean | undefined; readonly publish?: readonly string[] | undefined; readonly since?: readonly string[] | undefined; } | undefined; } | undefined) => Effect.Effect; create: (options: Omit[0], "HostConfig"> & { readonly Name?: string | undefined; readonly Platform?: string | undefined; readonly HostConfig?: ConstructorParameters[0] | undefined; }) => Effect.Effect<{ readonly Id: string; readonly Warnings: readonly string[] | null; }, DockerError, never>; inspect: (identifier: ContainerIdentifier, options?: { readonly size?: boolean | undefined; }) => Effect.Effect; top: (identifier: ContainerIdentifier, options?: { readonly ps_args?: string | undefined; }) => Effect.Effect; logs: (identifier: ContainerIdentifier, options?: { readonly stdout?: boolean | undefined; readonly stderr?: boolean | undefined; readonly since?: number | undefined; readonly until?: number | undefined; readonly follow?: boolean | undefined; readonly timestamps?: boolean | undefined; readonly tail?: string | undefined; }) => Stream.Stream; changes: (identifier: ContainerIdentifier) => Effect.Effect; export: (identifier: ContainerIdentifier) => Stream.Stream, DockerError, never>; stats: (identifier: ContainerIdentifier, options?: { readonly stream?: boolean | undefined; readonly "one-shot"?: boolean | undefined; }) => Stream.Stream; resize: (identifier: ContainerIdentifier, options?: { readonly h?: number | undefined; readonly w?: number | undefined; }) => Effect.Effect; start: (identifier: ContainerIdentifier, options?: { readonly detachKeys?: string | undefined; }) => Effect.Effect; stop: (identifier: ContainerIdentifier, options?: { readonly signal?: string | undefined; readonly t?: number | undefined; }) => Effect.Effect; restart: (identifier: ContainerIdentifier, options?: { readonly signal?: string | undefined; readonly t?: number | undefined; }) => Effect.Effect; kill: (identifier: ContainerIdentifier, options?: { readonly signal?: string | undefined; }) => Effect.Effect; update: (identifier: ContainerIdentifier, config: ContainerConfig) => Effect.Effect<{ readonly Warnings: readonly string[] | null; }, DockerError, never>; rename: (identifier: ContainerIdentifier, name: string) => Effect.Effect; pause: (identifier: ContainerIdentifier) => Effect.Effect; unpause: (identifier: ContainerIdentifier) => Effect.Effect; attach: (identifier: ContainerIdentifier, options?: { readonly stream?: boolean | undefined; readonly stdout?: boolean | undefined; readonly stderr?: boolean | undefined; readonly stdin?: boolean | undefined; readonly logs?: boolean | undefined; readonly detachKeys?: string | undefined; }) => Effect.Effect; attachWebsocket: (identifier: ContainerIdentifier, options?: { readonly stream?: boolean | undefined; readonly stdout?: boolean | undefined; readonly stderr?: boolean | undefined; readonly stdin?: boolean | undefined; readonly logs?: boolean | undefined; readonly detachKeys?: string | undefined; }) => Effect.Effect; wait: (identifier: ContainerIdentifier, options?: { readonly condition?: string | undefined; }) => Effect.Effect; delete: (identifier: ContainerIdentifier, options?: { readonly link?: boolean | undefined; readonly force?: boolean | undefined; readonly v?: boolean | undefined; }) => Effect.Effect; archive: (identifier: ContainerIdentifier, options: { readonly path: string; }) => Stream.Stream, DockerError, never>; archiveInfo: (identifier: ContainerIdentifier, options: { readonly path: string; }) => Effect.Effect; putArchive: (identifier: ContainerIdentifier, stream: Stream.Stream, options: { readonly path: string; readonly noOverwriteDirNonDir?: string | undefined; readonly copyUIDGidentifier?: string | undefined; }) => Effect.Effect; prune: (filters?: Schema.Schema.Type | undefined) => Effect.Effect<{ readonly ContainersDeleted: readonly string[] | null; readonly SpaceReclaimed: number; }, DockerError, never>; }, never, HttpClient.HttpClient | Socket.WebSocketConstructor>; }>; /** * @since 1.0.0 * @category Services * @see https://docs.docker.com/reference/api/engine/latest/#tag/Container */ export declare class Containers extends Containers_base { } /** * @since 1.0.0 * @category Layers * @see https://docs.docker.com/reference/api/engine/latest/#tag/Container */ export declare const ContainersLayerLocalSocket: Layer.Layer; /** * @since 1.0.0 * @category Layers * @see https://docs.docker.com/reference/api/engine/latest/#tag/Container */ export declare const ContainersLayer: Layer.Layer; export {};