MDK Logo
ReferenceUITypes

Foundation General Types

General TypeScript types from ui-foundation

General type definitions from the ui-foundation package.

Package

@tetherto/mdk-ui-foundation

Types

ApiError

Shared error contract used across HTTP/API surfaces.

type ApiError = { error: string message: string status: number data?: { message?: string } }

ImportResult

type ImportResult = { success: boolean applied?: string[] errors?: string[] message?: string }

PermLevel

type PermLevel = 'rw' | 'r' | false

RoleOption

type RoleOption = { label: string value: string }

RolesPermissionsData

type RolesPermissionsData = { permissions: Record<string, Record<string, PermLevel>> labels: Record<string, string> }

SettingsExportData

type SettingsExportData = { headerControls?: Record<string, boolean> featureFlags?: Record<string, boolean> timestamp?: string version?: string } & TExtra

SettingsUser

type SettingsUser = { id: string name?: string email: string role: string last_login?: string lastActive?: string [key: string]: unknown }

SubscriberCallback

type SubscriberCallback = (value: T) => void

UnknownRecord

Generic type for objects with unknown structure.

type UnknownRecord = Record<string, unknown>

Unsubscribe

type Unsubscribe = () => void

On this page