MDK Logo

API

TypeScript types for API requests and responses

Type definitions for API requests and responses.

Package

@tetherto/mdk-ui-foundation

Types

@tetherto/mdk-ui-foundation

Import the public APIs on this page from @tetherto/mdk-ui-foundation.

AlertSeverity

Severity literal expected by the ActiveIncidentsCard row component.

type AlertSeverity = 'critical' | 'high' | 'medium'

AuthTokenRequest

Request body for POST /auth/token. The token endpoint refreshes the session and (optionally) downgrades the role set.

type AuthTokenRequest = { roles?: string[] ttl?: number ips?: string[] scope?: string }

AuthTokenResponse

Response from POST /auth/token.

type AuthTokenResponse = { token: string }

PowerModeTimelineEntry

Power-mode timeline entry — carries grouped per-miner mode/status maps keyed by miner id. Consumed by PowerModeTimelineChart.

type PowerModeTimelineEntry = TailLogEntry & { power_mode_group_aggr?: Record<string, string> status_group_aggr?: Record<string, string> }

Rack

A single rack entry from GET /auth/list-racks. Typed loosely — the listRacks RPC response shape has not been captured against a live backend yet (staging returned no rack data at verification time).

type Rack = { id?: string name?: string [key: string]: unknown }

TailLogEntry

A single time-bucketed entry from GET /auth/tail-log. Backend returns Array&lt;Array&lt;TailLogEntry&gt;&gt; (outer wrapping is the per-worker grouping — single-site dashboards take _head(response)).

type TailLogEntry = { ts: number /** All other fields are dynamic aggregates requested via `aggrFields`. */ [key: string]: unknown }

On this page