import type { MobyEndpoints, MobySchemas } from 'docker-api-types'; import type { Effect } from 'docker-api-types/effect'; import { DockerAPIResource } from '../resource'; export type ContainerListParams = NonNullable[0]>; export type ContainerCreateParams = NonNullable[0]>; export type ContainerCreateResponse = Effect.Effect.Success>; export type ContainerInspectParams = NonNullable[1]>; export type ContainerTopParams = NonNullable[1]>; export type ContainerLogsParams = NonNullable[1]>; export type ContainerStatsParams = NonNullable[1]>; export type ContainerResizeParams = NonNullable[1]>; export type ContainerStartParams = NonNullable[1]>; export type ContainerStopParams = NonNullable[1]>; export type ContainerRestartParams = NonNullable[1]>; export type ContainerKillParams = NonNullable[1]>; export type ContainerUpdateParams = NonNullable[1]>; export type ContainerUpdateResponse = Effect.Effect.Success>; export type ContainerRenameParams = NonNullable[1]>; export type ContainerAttachParams = NonNullable[1]>; export type ContainerWaitParams = NonNullable[1]>; export type ContainerDeleteParams = NonNullable[1]>; export type ContainerArchiveParams = NonNullable[1]>; export type ContainerArchiveInfoParams = NonNullable[1]>; export type ContainerPutArchiveParams = NonNullable[1]> & { stream: Bun.BodyInit; }; export type ContainerPruneParams = NonNullable[0]>; export type ContainerPruneResponse = Effect.Effect.Success>; /** * @see https://github.com/moby/moby/blob/master/api/docs/v1.52.yaml#L5351 */ export type ContainerStatus = 'created' | 'running' | 'paused' | 'restarting' | 'removing' | 'exited' | 'dead'; /** * @see https://github.com/leonitousconforti/the-moby-effect/blob/main/src/internal/endpoints/containers.ts */ export declare class Containers extends DockerAPIResource { /** * List containers. * * Returns a list of containers. For details on the format, see the * [inspect endpoint](#operation/ContainerInspect). * * Note that it uses a different, smaller representation of a container * than inspecting a single container. For example, the list of linked * containers is not propagated . * * @see https://docs.docker.com/reference/api/engine/latest/#tag/Container/operation/ContainerList * @see MobyEndpoints.Containers.list * * // TODO: https://github.com/leonitousconforti/the-moby-effect/issues/287 */ list(params?: ContainerListParams): Promise; /** * Create a container. * * @see https://docs.docker.com/reference/api/engine/latest/#tag/Container/operation/ContainerCreate * @see MobyEndpoints.Containers.create */ create(params: ContainerCreateParams): Promise; /** * Inspect a container. * * Return low-level information about a container. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerInspect * @see MobyEndpoints.Containers.inspect */ inspect(id: string, params?: ContainerInspectParams): Promise; /** * List processes running inside a container. * * On Unix systems, this is done by running the ps command. This endpoint is not supported on Windows. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerTop * @see MobyEndpoints.Containers.top */ top(id: string, params?: ContainerTopParams): Promise; /** * Get container logs. * * Get `stdout` and `stderr` logs from a container. * Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerLogs * @see MobyEndpoints.Containers.logs */ logs(id: string, params?: ContainerLogsParams, options?: BunFetchRequestInit): Promise; /** * Get changes on a container’s filesystem. * * Returns which files in a container's filesystem have been added, deleted, * or modified. The `Kind` of modification can be one of: * - `0`: Modified ("C") * - `1`: Added ("A") * - `2`: Deleted ("D") * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerChanges * @see MobyEndpoints.Containers.changes */ changes(id: string): Promise; /** * Export a container. * * Export the contents of a container as a tarball. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerExport * @see MobyEndpoints.Containers.export */ export(id: string): Promise; /** * Get container stats based on resource usage. * * This endpoint returns a live stream of a container’s resource usage statistics. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerStats * @see MobyEndpoints.Containers.stats */ stats(id: string, params?: ContainerStatsParams): Promise; /** * Resize a container TTY. * * Resize the TTY for a container. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerResize * @see MobyEndpoints.Containers.resize */ resize(id: string, params?: ContainerResizeParams): Promise; /** * Start a container. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerStart * @see MobyEndpoints.Containers.start */ start(id: string, params?: ContainerStartParams): Promise; /** * Stop a container. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerStop * @see MobyEndpoints.Containers.stop */ stop(id: string, params?: ContainerStopParams): Promise; /** * Restart a container. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerRestart * @see MobyEndpoints.Containers.restart */ restart(id: string, params: ContainerRestartParams): Promise; /** * Kill a container. * * Send a POSIX signal to a container, defaulting to killing to the container. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerKill * @see MobyEndpoints.Containers.kill */ kill(id: string, params?: ContainerKillParams): Promise; /** * Update a container. * * Change various configuration options of a container without having to recreate it. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerUpdate * @see MobyEndpoints.Containers.update */ update(id: string, params: ContainerUpdateParams): Promise; /** * Rename a container. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerRename * @see MobyEndpoints.Containers.rename */ rename(id: string, name: string): Promise; /** * Pause a container. * * Use the freezer cgroup to suspend all processes in a container. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerPause * @see MobyEndpoints.Containers.pause */ pause(id: string): Promise; /** * Unpause a container. * * Resume a container which has been paused. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerUnpause * @see MobyEndpoints.Containers.unpause */ unpause(id: string): Promise; /** * Attach to a container. * * Attach to a container to read its output or send it input. You can attach * to the same container multiple times and you can reattach to containers * that have been detached. * * Either the `stream` or `logs` parameter must be `true` for this endpoint * to do anything. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerAttach * @see MobyEndpoints.Containers.attach */ attach(id: string, params?: ContainerAttachParams): Promise; /** * Attach to a container via a websocket. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerAttachWebsocket * @see MobyEndpoints.Containers.attachWebsocket */ attachWebsocket(id: string, params?: ContainerAttachParams): Promise; /** * Wait for a container. * * Block until a container stops, then returns the exit code. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerWait * @see MobyEndpoints.Containers.wait */ wait(id: string, params?: ContainerWaitParams): Promise; /** * Remove a container. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerDelete * @see MobyEndpoints.Containers.delete */ delete(id: string, params?: ContainerDeleteParams): Promise; /** * Get an archive of a filesystem resource in a container. * * Get a tar archive of a resource in the filesystem of container id. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerArchive * @see MobyEndpoints.Containers.archive */ archive(id: string, params: ContainerArchiveParams): Promise; /** * Get information about files in a container. * * A response header `X-Docker-Container-Path-Stat` is returned, containing * a base64 - encoded JSON object with some filesystem header information * about the path. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerArchiveInfo * @see MobyEndpoints.Containers.archiveInfo */ archiveInfo(id: string, params: ContainerArchiveInfoParams): Promise; /** * Extract an archive of files or folders to a directory in a container. * * Upload a tar archive to be extracted to a path in the filesystem of * container id. `path` parameter is asserted to be a directory. If it exists * as a file, 400 error will be returned with message "not a directory". * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/PutContainerArchive * @see MobyEndpoints.Containers.putArchive */ putArchive(id: string, params: ContainerPutArchiveParams): Promise; /** * Delete stopped containers. * * @see https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Container/operation/ContainerPrune * @see MobyEndpoints.Containers.prune * * // TODO: https://github.com/leonitousconforti/the-moby-effect/issues/287 */ prune(params: ContainerPruneParams): Promise; } //# sourceMappingURL=containers.d.ts.map