the-moby-effect
Version:
Moby/Docker API client built using effect-ts
436 lines • 30.7 kB
TypeScript
import * as Context from "effect/Context";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as Schema from "effect/Schema";
import * as Stream from "effect/Stream";
import * as HttpClient from "effect/unstable/http/HttpClient";
import * as HttpApi from "effect/unstable/httpapi/HttpApi";
import * as HttpApiEndpoint from "effect/unstable/httpapi/HttpApiEndpoint";
import * as HttpApiGroup from "effect/unstable/httpapi/HttpApiGroup";
import * as HttpApiSchema from "effect/unstable/httpapi/HttpApiSchema";
import * as Socket from "effect/unstable/socket/Socket";
import { ArchiveChange, ContainerConfig, ContainerCreateRequest, ContainerHostConfig, ContainerInspectResponse, ContainerStatsResponse, ContainerSummary, ContainerTopResponse, ContainerWaitResponse } from "../generated/index.ts";
import { ContainerIdentifier } from "../schemas/id.ts";
import { DockerError } from "./circular.ts";
import { BadRequest, Conflict, Forbidden, InternalServerError, NotAcceptable, NotFound } from "./errors.ts";
/** @since 1.0.0 */
export declare const ListFilters: Schema.fromJsonString<Schema.Struct<{
readonly ancestor: Schema.optional<Schema.$Array<Schema.String>>;
readonly before: Schema.optional<Schema.$Array<Schema.String>>;
readonly expose: Schema.optional<Schema.$Array<Schema.String>>;
readonly exited: Schema.optional<Schema.$Array<Schema.NumberFromString>>;
readonly health: Schema.optional<Schema.$Array<Schema.Literals<readonly ["none", "starting", "healthy", "unhealthy"]>>>;
readonly identifier: Schema.optional<Schema.$Array<Schema.brand<Schema.String, "ContainerId">>>;
readonly "is-task": Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Tuple<readonly [Schema.String]>, never, never>>;
readonly label: Schema.optional<Schema.$Array<Schema.String>>;
readonly name: Schema.optional<Schema.$Array<Schema.String>>;
readonly network: Schema.optional<Schema.$Array<Schema.String>>;
readonly publish: Schema.optional<Schema.$Array<Schema.String>>;
readonly since: Schema.optional<Schema.$Array<Schema.String>>;
readonly status: Schema.optional<Schema.$Array<Schema.Literals<readonly ["created", "restarting", "running", "removing", "paused", "exited", "dead"]>>>;
readonly volume: Schema.optional<Schema.decodeTo<Schema.String, Schema.Tuple<readonly [Schema.String]>, never, never>>;
}>>;
/** @since 1.0.0 */
export declare const PruneFilters: Schema.fromJsonString<Schema.Struct<{
readonly until: Schema.optional<Schema.decodeTo<Schema.String, Schema.Tuple<readonly [Schema.String]>, never, never>>;
readonly label: Schema.optional<Schema.$Array<Schema.String>>;
}>>;
/**
* @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<"archive", "GET", "/containers/:identifier/archive", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
path: Schema.String;
}>>, never, never, HttpApiSchema.StreamUint8Array, Schema.toCodecJson<typeof BadRequest | typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"archiveInfo", "HEAD", "/containers/:identifier/archive", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
path: Schema.String;
}>>, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof BadRequest | typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"attach", "POST", "/containers/:identifier/attach", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
detachKeys: Schema.optional<Schema.String>;
logs: Schema.optional<Schema.Boolean>;
stream: Schema.optional<Schema.Boolean>;
stdin: Schema.optional<Schema.Boolean>;
stdout: Schema.optional<Schema.Boolean>;
stderr: Schema.optional<Schema.Boolean>;
}>>, never, Schema.toCodecStringTree<Schema.Struct<{
Upgrade: Schema.Literal<"tcp">;
Connection: Schema.Literal<"Upgrade">;
}>>, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof BadRequest | typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"attachWebsocket", "GET", "/containers/:identifier/attach/ws", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
detachKeys: Schema.optional<Schema.String>;
logs: Schema.optional<Schema.Boolean>;
stream: Schema.optional<Schema.Boolean>;
stdin: Schema.optional<Schema.Boolean>;
stdout: Schema.optional<Schema.Boolean>;
stderr: Schema.optional<Schema.Boolean>;
}>>, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof BadRequest | typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"changes", "GET", "/containers/:identifier/changes", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, never, never, never, Schema.toCodecJson<Schema.NullOr<Schema.$Array<typeof ArchiveChange>>>, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/containers/create", never, Schema.toCodecStringTree<Schema.Struct<{
platform: Schema.optional<Schema.String>;
name: Schema.optional<Schema.String>;
}>>, Schema.toCodecJson<typeof ContainerCreateRequest>, never, Schema.toCodecJson<Schema.Struct<{
readonly Id: Schema.brand<Schema.String, "ContainerId">;
readonly Warnings: Schema.NullOr<Schema.$Array<Schema.String>>;
}>>, Schema.toCodecJson<typeof BadRequest | typeof Forbidden | typeof NotFound | typeof NotAcceptable | typeof Conflict | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", "/containers/:identifier", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
v: Schema.optional<Schema.Boolean>;
force: Schema.optional<Schema.Boolean>;
link: Schema.optional<Schema.Boolean>;
}>>, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof BadRequest | typeof NotFound | typeof Conflict | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"export", "GET", "/containers/:identifier/export", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, never, never, never, HttpApiSchema.StreamUint8Array, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"inspect", "GET", "/containers/:identifier/json", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
size: Schema.optional<Schema.Boolean>;
}>>, never, never, Schema.toCodecJson<typeof ContainerInspectResponse>, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"kill", "POST", "/containers/:identifier/kill", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
signal: Schema.optional<Schema.String>;
}>>, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof NotFound | typeof Conflict | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/containers/json", never, Schema.toCodecStringTree<Schema.Struct<{
all: Schema.optional<Schema.Boolean>;
limit: Schema.optional<Schema.Number>;
size: Schema.optional<Schema.Boolean>;
filters: Schema.optional<Schema.fromJsonString<Schema.Struct<{
readonly ancestor: Schema.optional<Schema.$Array<Schema.String>>;
readonly before: Schema.optional<Schema.$Array<Schema.String>>;
readonly expose: Schema.optional<Schema.$Array<Schema.String>>;
readonly exited: Schema.optional<Schema.$Array<Schema.NumberFromString>>;
readonly health: Schema.optional<Schema.$Array<Schema.Literals<readonly ["none", "starting", "healthy", "unhealthy"]>>>;
readonly identifier: Schema.optional<Schema.$Array<Schema.brand<Schema.String, "ContainerId">>>;
readonly "is-task": Schema.optional<Schema.decodeTo<Schema.Boolean, Schema.Tuple<readonly [Schema.String]>, never, never>>;
readonly label: Schema.optional<Schema.$Array<Schema.String>>;
readonly name: Schema.optional<Schema.$Array<Schema.String>>;
readonly network: Schema.optional<Schema.$Array<Schema.String>>;
readonly publish: Schema.optional<Schema.$Array<Schema.String>>;
readonly since: Schema.optional<Schema.$Array<Schema.String>>;
readonly status: Schema.optional<Schema.$Array<Schema.Literals<readonly ["created", "restarting", "running", "removing", "paused", "exited", "dead"]>>>;
readonly volume: Schema.optional<Schema.decodeTo<Schema.String, Schema.Tuple<readonly [Schema.String]>, never, never>>;
}>>>;
}>>, never, never, Schema.toCodecJson<Schema.$Array<typeof ContainerSummary>>, Schema.toCodecJson<typeof BadRequest | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"logs", "GET", "/containers/:identifier/logs", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
follow: Schema.optional<Schema.Boolean>;
stdout: Schema.optional<Schema.Boolean>;
stderr: Schema.optional<Schema.Boolean>;
since: Schema.optional<Schema.Number>;
until: Schema.optional<Schema.Number>;
timestamps: Schema.optional<Schema.Boolean>;
tail: Schema.optional<Schema.String>;
}>>, never, never, HttpApiSchema.StreamUint8Array, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"pause", "POST", "/containers/:identifier/pause", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, never, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"prune", "POST", "/containers/prune", never, Schema.toCodecStringTree<Schema.Struct<{
filters: Schema.optional<Schema.fromJsonString<Schema.Struct<{
readonly until: Schema.optional<Schema.decodeTo<Schema.String, Schema.Tuple<readonly [Schema.String]>, never, never>>;
readonly label: Schema.optional<Schema.$Array<Schema.String>>;
}>>>;
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
readonly ContainersDeleted: Schema.NullOr<Schema.$Array<Schema.brand<Schema.String, "ContainerId">>>;
readonly SpaceReclaimed: Schema.BigIntFromString;
}>>, Schema.toCodecJson<typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"putArchive", "PUT", "/containers/:identifier/archive", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
path: Schema.String;
noOverwriteDirNonDir: Schema.optional<Schema.String>;
copyUIDGidentifier: Schema.optional<Schema.String>;
}>>, Schema.toCodecJson<HttpApiSchema.StreamUint8Array>, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof BadRequest | typeof Forbidden | typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"rename", "POST", "/containers/:identifier/rename", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
name: Schema.String;
}>>, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof NotFound | typeof Conflict | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"resize", "POST", "/containers/:identifier/resize", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
h: Schema.optional<Schema.Number>;
w: Schema.optional<Schema.Number>;
}>>, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"restart", "POST", "/containers/:identifier/restart", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
signal: Schema.optional<Schema.String>;
t: Schema.optional<Schema.Number>;
}>>, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"start", "POST", "/containers/:identifier/start", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
detachKeys: Schema.optional<Schema.String>;
}>>, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"stats", "GET", "/containers/:identifier/stats", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
stream: Schema.optional<Schema.Boolean>;
"one-shot": Schema.optional<Schema.Boolean>;
}>>, never, never, HttpApiSchema.StreamUint8Array, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"stop", "POST", "/containers/:identifier/stop", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
signal: Schema.optional<Schema.String>;
t: Schema.optional<Schema.Number>;
}>>, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"top", "GET", "/containers/:identifier/top", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
ps_args: Schema.optional<Schema.String>;
}>>, never, never, Schema.toCodecJson<typeof ContainerTopResponse>, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"unpause", "POST", "/containers/:identifier/unpause", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, never, never, never, Schema.toCodecJson<Schema.Void>, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"update", "POST", "/containers/:identifier/update", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, never, Schema.toCodecJson<typeof ContainerConfig>, never, Schema.toCodecJson<Schema.Struct<{
readonly Warnings: Schema.NullOr<Schema.$Array<Schema.String>>;
}>>, Schema.toCodecJson<typeof NotFound | typeof InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"wait", "POST", "/containers/:identifier/wait", Schema.toCodecStringTree<Schema.Struct<{
identifier: Schema.brand<Schema.String, "ContainerId">;
}>>, Schema.toCodecStringTree<Schema.Struct<{
condition: Schema.optional<Schema.String>;
}>>, never, never, Schema.toCodecJson<typeof ContainerWaitResponse>, Schema.toCodecJson<typeof BadRequest | typeof NotFound | typeof InternalServerError>, never, never>, false>>;
declare const Containers_base: Context.ServiceClass<Containers, "@the-moby-effect/endpoints/Containers", {
list: (options?: {
readonly all?: boolean | undefined;
readonly limit?: number | undefined;
readonly size?: boolean | undefined;
readonly filters?: {
readonly ancestor?: readonly string[] | undefined;
readonly before?: readonly string[] | undefined;
readonly expose?: readonly string[] | undefined;
readonly exited?: readonly number[] | undefined;
readonly health?: readonly ("healthy" | "none" | "starting" | "unhealthy")[] | undefined;
readonly identifier?: readonly (string & import("effect/Brand").Brand<"ContainerId">)[] | undefined;
readonly "is-task"?: boolean | undefined;
readonly label?: readonly string[] | undefined;
readonly name?: readonly string[] | undefined;
readonly network?: readonly string[] | undefined;
readonly publish?: readonly string[] | undefined;
readonly since?: readonly string[] | undefined;
readonly status?: readonly ("created" | "dead" | "exited" | "paused" | "removing" | "restarting" | "running")[] | undefined;
readonly volume?: string | undefined;
} | undefined;
} | undefined) => Effect.Effect<readonly ContainerSummary[], DockerError, never>;
create: (options: Omit<(typeof ContainerCreateRequest)["~type.make.in"], "HostConfig"> & {
readonly Name?: string | undefined;
readonly Platform?: string | undefined;
readonly HostConfig?: (typeof ContainerHostConfig)["~type.make.in"] | undefined;
}) => Effect.Effect<{
readonly Id: string & import("effect/Brand").Brand<"ContainerId">;
readonly Warnings: readonly string[] | null;
}, DockerError, never>;
inspect: (identifier: ContainerIdentifier, options?: {
readonly size?: boolean | undefined;
}) => Effect.Effect<ContainerInspectResponse, DockerError, never>;
top: (identifier: ContainerIdentifier, options?: {
readonly ps_args?: string | undefined;
}) => Effect.Effect<ContainerTopResponse, DockerError, never>;
logs: (identifier: ContainerIdentifier, options?: {
readonly follow?: boolean | undefined;
readonly stdout?: boolean | undefined;
readonly stderr?: boolean | undefined;
readonly since?: number | undefined;
readonly until?: number | undefined;
readonly timestamps?: boolean | undefined;
readonly tail?: string | undefined;
}) => Stream.Stream<string, DockerError, never>;
changes: (identifier: ContainerIdentifier) => Effect.Effect<readonly ArchiveChange[] | null, DockerError, never>;
export: (identifier: ContainerIdentifier) => Stream.Stream<Uint8Array<ArrayBufferLike>, DockerError, never>;
stats: (identifier: ContainerIdentifier, options?: {
readonly stream?: boolean | undefined;
readonly "one-shot"?: boolean | undefined;
}) => Stream.Stream<ContainerStatsResponse, DockerError, never>;
resize: (identifier: ContainerIdentifier, options?: {
readonly h?: number | undefined;
readonly w?: number | undefined;
}) => Effect.Effect<void, DockerError, never>;
start: (identifier: ContainerIdentifier, options?: {
readonly detachKeys?: string | undefined;
}) => Effect.Effect<void, DockerError, never>;
stop: (identifier: ContainerIdentifier, options?: {
readonly signal?: string | undefined;
readonly t?: number | undefined;
}) => Effect.Effect<void, DockerError, never>;
restart: (identifier: ContainerIdentifier, options?: {
readonly signal?: string | undefined;
readonly t?: number | undefined;
}) => Effect.Effect<void, DockerError, never>;
kill: (identifier: ContainerIdentifier, options?: {
readonly signal?: string | undefined;
}) => Effect.Effect<void, DockerError, never>;
update: (identifier: ContainerIdentifier, config: (typeof ContainerConfig)["~type.make.in"]) => Effect.Effect<{
readonly Warnings: readonly string[] | null;
}, DockerError, never>;
rename: (identifier: ContainerIdentifier, name: string) => Effect.Effect<void, DockerError, never>;
pause: (identifier: ContainerIdentifier) => Effect.Effect<void, DockerError, never>;
unpause: (identifier: ContainerIdentifier) => Effect.Effect<void, DockerError, never>;
attach: (identifier: ContainerIdentifier, options?: {
readonly detachKeys?: string | undefined;
readonly logs?: boolean | undefined;
readonly stream?: boolean | undefined;
readonly stdin?: boolean | undefined;
readonly stdout?: boolean | undefined;
readonly stderr?: boolean | undefined;
}) => Effect.Effect<import("../../MobyDemux.ts").MultiplexedSocket | import("../../MobyDemux.ts").RawSocket, DockerError, never>;
attachWebsocket: (identifier: ContainerIdentifier, options?: {
readonly detachKeys?: string | undefined;
readonly logs?: boolean | undefined;
readonly stream?: boolean | undefined;
readonly stdin?: boolean | undefined;
readonly stdout?: boolean | undefined;
readonly stderr?: boolean | undefined;
}) => Effect.Effect<import("../../MobyDemux.ts").RawSocket, DockerError, never>;
wait: (identifier: ContainerIdentifier, options?: {
readonly condition?: string | undefined;
}) => Effect.Effect<ContainerWaitResponse, DockerError, never>;
delete: (identifier: ContainerIdentifier, options?: {
readonly v?: boolean | undefined;
readonly force?: boolean | undefined;
readonly link?: boolean | undefined;
}) => Effect.Effect<void, DockerError, never>;
archive: (identifier: ContainerIdentifier, options: {
readonly path: string;
}) => Stream.Stream<Uint8Array<ArrayBufferLike>, DockerError, never>;
archiveInfo: (identifier: ContainerIdentifier, options: {
readonly path: string;
}) => Effect.Effect<unknown, DockerError, never>;
putArchive: <E, R>(identifier: ContainerIdentifier, stream: Stream.Stream<Uint8Array, E, R>, options: {
readonly path: string;
readonly noOverwriteDirNonDir?: string | undefined;
readonly copyUIDGidentifier?: string | undefined;
}) => Effect.Effect<void, DockerError, R>;
prune: (filters?: Schema.Schema.Type<typeof PruneFilters> | undefined) => Effect.Effect<{
readonly ContainersDeleted: readonly (string & import("effect/Brand").Brand<"ContainerId">)[] | null;
readonly SpaceReclaimed: bigint;
}, DockerError, never>;
}> & {
readonly make: Effect.Effect<{
list: (options?: {
readonly all?: boolean | undefined;
readonly limit?: number | undefined;
readonly size?: boolean | undefined;
readonly filters?: {
readonly ancestor?: readonly string[] | undefined;
readonly before?: readonly string[] | undefined;
readonly expose?: readonly string[] | undefined;
readonly exited?: readonly number[] | undefined;
readonly health?: readonly ("healthy" | "none" | "starting" | "unhealthy")[] | undefined;
readonly identifier?: readonly (string & import("effect/Brand").Brand<"ContainerId">)[] | undefined;
readonly "is-task"?: boolean | undefined;
readonly label?: readonly string[] | undefined;
readonly name?: readonly string[] | undefined;
readonly network?: readonly string[] | undefined;
readonly publish?: readonly string[] | undefined;
readonly since?: readonly string[] | undefined;
readonly status?: readonly ("created" | "dead" | "exited" | "paused" | "removing" | "restarting" | "running")[] | undefined;
readonly volume?: string | undefined;
} | undefined;
} | undefined) => Effect.Effect<readonly ContainerSummary[], DockerError, never>;
create: (options: Omit<(typeof ContainerCreateRequest)["~type.make.in"], "HostConfig"> & {
readonly Name?: string | undefined;
readonly Platform?: string | undefined;
readonly HostConfig?: (typeof ContainerHostConfig)["~type.make.in"] | undefined;
}) => Effect.Effect<{
readonly Id: string & import("effect/Brand").Brand<"ContainerId">;
readonly Warnings: readonly string[] | null;
}, DockerError, never>;
inspect: (identifier: ContainerIdentifier, options?: {
readonly size?: boolean | undefined;
}) => Effect.Effect<ContainerInspectResponse, DockerError, never>;
top: (identifier: ContainerIdentifier, options?: {
readonly ps_args?: string | undefined;
}) => Effect.Effect<ContainerTopResponse, DockerError, never>;
logs: (identifier: ContainerIdentifier, options?: {
readonly follow?: boolean | undefined;
readonly stdout?: boolean | undefined;
readonly stderr?: boolean | undefined;
readonly since?: number | undefined;
readonly until?: number | undefined;
readonly timestamps?: boolean | undefined;
readonly tail?: string | undefined;
}) => Stream.Stream<string, DockerError, never>;
changes: (identifier: ContainerIdentifier) => Effect.Effect<readonly ArchiveChange[] | null, DockerError, never>;
export: (identifier: ContainerIdentifier) => Stream.Stream<Uint8Array<ArrayBufferLike>, DockerError, never>;
stats: (identifier: ContainerIdentifier, options?: {
readonly stream?: boolean | undefined;
readonly "one-shot"?: boolean | undefined;
}) => Stream.Stream<ContainerStatsResponse, DockerError, never>;
resize: (identifier: ContainerIdentifier, options?: {
readonly h?: number | undefined;
readonly w?: number | undefined;
}) => Effect.Effect<void, DockerError, never>;
start: (identifier: ContainerIdentifier, options?: {
readonly detachKeys?: string | undefined;
}) => Effect.Effect<void, DockerError, never>;
stop: (identifier: ContainerIdentifier, options?: {
readonly signal?: string | undefined;
readonly t?: number | undefined;
}) => Effect.Effect<void, DockerError, never>;
restart: (identifier: ContainerIdentifier, options?: {
readonly signal?: string | undefined;
readonly t?: number | undefined;
}) => Effect.Effect<void, DockerError, never>;
kill: (identifier: ContainerIdentifier, options?: {
readonly signal?: string | undefined;
}) => Effect.Effect<void, DockerError, never>;
update: (identifier: ContainerIdentifier, config: (typeof ContainerConfig)["~type.make.in"]) => Effect.Effect<{
readonly Warnings: readonly string[] | null;
}, DockerError, never>;
rename: (identifier: ContainerIdentifier, name: string) => Effect.Effect<void, DockerError, never>;
pause: (identifier: ContainerIdentifier) => Effect.Effect<void, DockerError, never>;
unpause: (identifier: ContainerIdentifier) => Effect.Effect<void, DockerError, never>;
attach: (identifier: ContainerIdentifier, options?: {
readonly detachKeys?: string | undefined;
readonly logs?: boolean | undefined;
readonly stream?: boolean | undefined;
readonly stdin?: boolean | undefined;
readonly stdout?: boolean | undefined;
readonly stderr?: boolean | undefined;
}) => Effect.Effect<import("../../MobyDemux.ts").MultiplexedSocket | import("../../MobyDemux.ts").RawSocket, DockerError, never>;
attachWebsocket: (identifier: ContainerIdentifier, options?: {
readonly detachKeys?: string | undefined;
readonly logs?: boolean | undefined;
readonly stream?: boolean | undefined;
readonly stdin?: boolean | undefined;
readonly stdout?: boolean | undefined;
readonly stderr?: boolean | undefined;
}) => Effect.Effect<import("../../MobyDemux.ts").RawSocket, DockerError, never>;
wait: (identifier: ContainerIdentifier, options?: {
readonly condition?: string | undefined;
}) => Effect.Effect<ContainerWaitResponse, DockerError, never>;
delete: (identifier: ContainerIdentifier, options?: {
readonly v?: boolean | undefined;
readonly force?: boolean | undefined;
readonly link?: boolean | undefined;
}) => Effect.Effect<void, DockerError, never>;
archive: (identifier: ContainerIdentifier, options: {
readonly path: string;
}) => Stream.Stream<Uint8Array<ArrayBufferLike>, DockerError, never>;
archiveInfo: (identifier: ContainerIdentifier, options: {
readonly path: string;
}) => Effect.Effect<unknown, DockerError, never>;
putArchive: <E, R>(identifier: ContainerIdentifier, stream: Stream.Stream<Uint8Array, E, R>, options: {
readonly path: string;
readonly noOverwriteDirNonDir?: string | undefined;
readonly copyUIDGidentifier?: string | undefined;
}) => Effect.Effect<void, DockerError, R>;
prune: (filters?: Schema.Schema.Type<typeof PruneFilters> | undefined) => Effect.Effect<{
readonly ContainersDeleted: readonly (string & import("effect/Brand").Brand<"ContainerId">)[] | null;
readonly SpaceReclaimed: bigint;
}, 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 ContainersLayer: Layer.Layer<Containers, never, HttpClient.HttpClient | Socket.WebSocketConstructor>;
/**
* @since 1.0.0
* @category Layers
* @see https://docs.docker.com/reference/api/engine/latest/#tag/Container
*/
export declare const ContainersLayerLocalSocket: Layer.Layer<Containers, never, HttpClient.HttpClient | Socket.WebSocketConstructor>;
export {};
//# sourceMappingURL=containers.d.ts.map