Skip to content

Latest commit

History

995 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Docker/Moby API types

This package only contains TypeScript declaration files. In case you do not want to introduce effect-ts in your project, only need the TypeScript types for API parameters and return types.

See https://github.com/leonitousconforti/the-moby-effect for full functional REST API.

Examples

importtype{MobyEndpoints,MobySchemas}from'docker-api-types'import{toURLSearchParams}from'./utils'exporttypeContainerListOptions=NonNullable<Parameters<MobyEndpoints.Containers['list']>[0]>exportasyncfunctionlistContainers(params?: ContainerListOptions): Promise<MobySchemas.ContainerSummary[]|undefined>{constqueryParams=toURLSearchParams(params)constresponse=awaitfetch(`/containers/json?${queryParams}`)if(response.ok){returnawaitresponse.json()asMobySchemas.ContainerSummary[]}}// import type { Brand, Effect } from 'docker-api-types/effect'

Credits

Huge thanks to Leo Conforti 👍

About

Moby/Docker API client built using effect-ts

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages