api: {
    get: (<K>(endpoint, params?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "get">>>);
    post: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "post">>>);
    put: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "put">>>);
    delete: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "delete">>>);
} = ...

Create an API client for kos

Type declaration

  • get: (<K>(endpoint, params?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "get">>>)
      • <K>(endpoint, params?, options?): Promise<ServiceResponse<ClientResponse<paths, K, "get">>>
      • Type Parameters

        • K extends "/api/kos/network/interfaces" | "/api/kos/localization/context/{*path}" | "/api/kos/localization/contexts" | "/api/kos/browser" | "/api/kos/browser/redirect" | "/api/kos/future/traces" | "/api/kos/future/traces/{traceId}/events" | "/api/kos/ota/paused" | "/api/kos/ota/artifacts" | "/api/kos/state/paths" | "/api/kos/state/{path}" | "/api/kos/config/schema" | "/api/kos/config/schema/{path}" | "/api/kos/config/{path}" | "/api/kos/config/details/{options}" | "/api/kos/config/details/{path}/{options}" | "/api/kos/config/value/merged/{scopedPath}/{attr}" | "/api/kos/config/value/{scopedPath}/{attr}" | "/api/kos/config/bean/defaults/{scopedPath}" | "/api/kos/config/bean/merged/{path}" | "/api/kos/config/bean/overrides/{scopedPath}" | "/api/kos/storage/devices" | "/api/kos/update/available" | "/api/kos/troubles" | "/api/kos/troubles/{troubleId}" | "/api/kos/handles" | "/api/kos/handles/{path}" | "/api/kos/handles/{path}/{view}" | "/api/kos/handles/views" | "/api/kos/openapi/{*baseUrl}" | "/api/kos/manifest/node" | "/api/kos/manifest/device" | "/api/kos/manifest/info" | "/api/kos/time/timezone" | "/api/kos/regions" | "/api/kos/regions/info" | "/api/kos/descriptor/{path}" | "/api/kos/descriptor/{path}/{dotted}" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests" | "/api/kos/nodeMgr/blockedManifests" | "/api/kos/criticalData/sources" | "/api/kos/criticalData/data" | "/api/kos/criticalData/data/{name}" | "/api/kos/device" | "/api/kos/device/assemblies" | "/api/kos/device/serialNumber" | "/api/kos/log/overrides" | "/api/kos/log/groups" | "/api/kos/log/overrides/{nodeType}" | "/api/kos/log/overrides/{nodeType}/{typePrefix}" | "/api/kos/terminal"

        Parameters

        • endpoint: K
        • Optional params: ClientGetParams<paths, K>
        • Optional options: RequestOptions

        Returns Promise<ServiceResponse<ClientResponse<paths, K, "get">>>

  • post: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "post">>>)
      • <K>(endpoint, params?, body?, options?): Promise<ServiceResponse<ClientResponse<paths, K, "post">>>
      • Type Parameters

        • K extends "/api/kos/browser/{nodeId}" | "/api/kos/browser/{nodeId}/{name}" | "/api/kos/browser/intent" | "/api/kos/browser/url" | "/api/kos/future/{futureId}/cancel" | "/api/kos/ota/resume/{name}" | "/api/kos/ota/cancel" | "/api/kos/ota/cancel/{name}" | "/api/kos/ota/pause/{name}" | "/api/kos/config/{path}" | "/api/kos/config/bulk" | "/api/kos/update/install" | "/api/kos/troubles/resolve" | "/api/kos/troubles/resolve/{troubleId}" | "/api/kos/time/date" | "/api/kos/time/timezone" | "/api/kos/time/time" | "/api/kos/nodeMgr/reboot" | "/api/kos/nodeMgr/node/{nodeId}/reboot" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests/{manifestId}" | "/api/kos/nodeMgr/blockedManifests/{manifestId}" | "/api/kos/criticalData/data" | "/api/kos/criticalData/data/{name}" | "/api/kos/device/serialNumber/{serialNum}" | "/api/kos/log/overrides" | "/api/kos/terminal/open" | "/api/kos/terminal/open/{nodeId}"

        Parameters

        • endpoint: K
        • Optional params: ClientPostParams<paths, K>
        • Optional body: ClientPostBody<paths, K>
        • Optional options: RequestOptions

        Returns Promise<ServiceResponse<ClientResponse<paths, K, "post">>>

  • put: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "put">>>)
      • <K>(endpoint, params?, body?, options?): Promise<ServiceResponse<ClientResponse<paths, K, "put">>>
      • Type Parameters

        • K extends never

        Parameters

        • endpoint: K
        • Optional params: ClientPutParams<paths, K>
        • Optional body: ClientPutBody<paths, K>
        • Optional options: RequestOptions

        Returns Promise<ServiceResponse<ClientResponse<paths, K, "put">>>

  • delete: (<K>(endpoint, params?, body?, options?) => Promise<ServiceResponse<ClientResponse<paths, K, "delete">>>)
      • <K>(endpoint, params?, body?, options?): Promise<ServiceResponse<ClientResponse<paths, K, "delete">>>
      • Type Parameters

        • K extends "/api/kos/nodeMgr/node/{nodeId}/blockedManifests" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests/{manifestId}" | "/api/kos/nodeMgr/blockedManifests/{manifestId}" | "/api/kos/criticalData/data/{name}" | "/api/kos/log/overrides" | "/api/kos/terminal/close/{connId}"

        Parameters

        • endpoint: K
        • Optional params: ClientDeleteParams<paths, K>
        • Optional body: ClientPutBody<paths, K>
        • Optional options: RequestOptions

        Returns Promise<ServiceResponse<ClientResponse<paths, K, "delete">>>