appendContainerToTag | (deviceId: string) => string | — |
appendIdToTag | (deviceId: string) => string | — |
appendIdToTags | (deviceIdList: string[]) => string[] | — |
buildCabinetDetailParams | (root: string) => ListThingsParams | List-things params for one LV cabinet's family of devices — the powermeters and temperature sensors whose `info.pos` sits under the cabinet `root`. Mirrors the reference app's `getLvCabinetDevicesByRoot(root)`; the detail hook groups the r… |
buildContainerCrossThing | (containers: string[]) => DeviceActionCrossThing | `{ type: 'container', params: { containers } }` fan-out for miner-level actions. |
buildContainerDetailParams | (containerKeys: string[]) => ListThingsParams | List-things params for the selected containers' detail snapshots. Takes the raw container keys (the `selectedDevicesTags` outer keys / `info.container` names), tags them with `container-` and filters to `t-container` things — mirrors the r… |
buildContainerWidgetsListParams | () => ListThingsParams | List-things params for the Site Overview container widgets grid. |
buildContainerWidgetsRealtimeTailLogParams | () => TailLogParams | Tail-log params for the Container Widgets realtime snapshot — the latest `stat-realtime` sample across all miners, grouped so the cards can slice per container. |
buildDeviceActionSubmission | (action: DeviceActionValue, tags: string[], params: VotingActionParam[] = [], extras: Record<string, unknown> = {}) => DeviceActionSubmission | Core submission assembler. Prefer the per-action builders below — they pin each action's param arity/encoding; this is the escape hatch for actions without a dedicated builder. `extras` is spread first so it can never override the pinned s… |
buildExplorerListThingsParams | (tab: ExplorerTabValue, options: { limit?: number; offset?: number } = {}) => ListThingsParams | List-things params for one Explorer tab: tag-filtered, status-enriched, projected to {@link OP_CENTRE_LIST_THINGS_FIELDS}. |
buildMinerCrossThing | (containers: string[]) => DeviceActionCrossThing | `{ type: 'miner', params: { containers } }` fan-out for container-level actions. |
buildRebootAction | (tags: string[]) => DeviceActionSubmission | `reboot` — no params. |
buildResetAlarmAction | (tags: string[]) => DeviceActionSubmission | `resetAlarm` — no params. |
buildSetAirExhaustEnabledAction | (tags: string[], isOn: boolean) => DeviceActionSubmission | `setAirExhaustEnabled` — single boolean param. |
buildSetLedAction | (tags: string[], isOn: boolean) => DeviceActionSubmission | `setLED` — single boolean param. |
buildSetPlcRegistersAction | (tags: string[], registers: Record<string, unknown>) => DeviceActionSubmission | `setPlcRegisters` (Gamma) — single `{ register: value }` map param. |
buildSetPowerModeAction | (tags: string[], mode: PowerModeValue, crossThing?: DeviceActionCrossThing) => DeviceActionSubmission | `setPowerMode` — single power-mode param, optional container fan-out. |
buildSetPowerPctAction | (tags: string[], percentage: number, crossThing?: DeviceActionCrossThing) => DeviceActionSubmission | `setPowerPct` — percentage encoded as a string, optional container fan-out. |
buildSetTankEnabledAction | (tags: string[], tankNumber: number, isOn: boolean) => DeviceActionSubmission | `setTankEnabled` — positional `[tankNumber, isOn]`. |
buildSwitchContainerAction | (tags: string[], isOn: boolean) => DeviceActionSubmission | `switchContainer` — single boolean param. |
buildSwitchCoolingSystemAction | (tags: string[], isOn: boolean, crossThing?: DeviceActionCrossThing) => DeviceActionSubmission | `switchCoolingSystem` — single boolean param, optional miner fan-out. |
buildSwitchSocketAction | (tags: string[], sockets: SocketSwitch[]) => DeviceActionSubmission | `switchSocket` — one `{ pdu, socket, enabled }` param per toggled socket. |
buildUpdateThingBatchEntry | (params: UpdateThingParams, minerId: string = params.id) => VotingActionPayload | One `updateThing` entry inside a move/add/replace-miner batch — carries the miner's new rack/position/network config plus the owning `minerId` the backend uses to group batch progress. |
checkPermission | (config: AuthConfig | null | undefined, { perm, write, cap }: PermissionCheck) => boolean | Check if user has the requested permission |
deriveContainerActivity | (realtime: TailLogEntry | undefined, containerModel: string, total: number) => ContainerActivity | Slice the realtime aggregate into one container's per-status miner counts. `total` is the container's nominal miner capacity; miners not accounted for by any status count collapse into `disconnected` (never negative). With no realtime samp… |
deriveContainerSummary | (realtime: TailLogEntry | undefined, containerModel: string) => ContainerSummary | — |
deriveContainerTanks | (container: ListThingsDevice) => TankReading[] | Derive the per-tank readings for a container's immersion cooling system — one entry per oil pump, joined with the matching water pump and (when present) the tank pressure. Returns an empty array for containers without an immersion cooling… |
deriveSelectedSockets | (containers: ContainerSnapshotForSockets[] | undefined, selectedDevicesTags: Record<string, Record<string, unknown>>, allDevices: MinerForSocket[] | undefined) => Record<string, { sockets: DerivedSoc… | Derive the store's `selectedSockets` map (keyed by container tag) from the selected device-tags — the pure body of the reference app's `findAndSetSelectedSockets`. Each per-container tag key (`pos-…` / `id-…`) is stripped of its `pos-` pre… |
exportSettingsToFile | (data: SettingsExportData) => string | — |
filterUsers | ({ users, email, role }: FilterUsersParams) => SettingsUser[] | — |
findMatchingContainer | (settings: ContainerSettingsEntry[] | undefined, containerType: string | undefined) => ContainerSettingsEntry | null | Find the container-settings row for a container type: an exact `model` match first, else the settings-model family fallback. Mirrors the reference app's `findMatchingContainer`. |
flattenKernelEnvelope | (envelope: ReadonlyArray<readonly (T | null | undefined)[] | null | undefined> | null | undefined) => T[] | Flattens the per-Kernel response envelope the gateway wraps around merged worker responses (`/auth/list-things`, `/auth/list-racks`, ... return `[[row, ...], [row, ...]]` — one inner array per Kernel). Null-safe on both levels: a missing e… |
formatLastActive | (timestamp: string | undefined) => string | — |
formatRoleLabel | (role: string) => string | — |
getAntspaceHydroIndexes | (pos: string) => string[] | Antspace Hydro position → `[rack, pdu, socket]`. |
getAntspaceImmersionIndexes | (pos: string) => string[] | Antspace Immersion position → `[pdu, socket]`. |
getBitdeerIndexes | (pos: string) => string[] | Bitdeer / MicroBT position → `[pdu, socket]`. |
getByIdsQuery | (ids: string[], allowEmptyArray?: boolean) => string | — |
getByTagsQuery | (filterTags: string[], allowEmptyArray?: boolean) => string | — |
getByTagsWithAlertsQuery | (filterTags: string[], allowEmptyArray?: boolean) => string | — |
getByTagsWithCriticalAlertsQuery | (filterTags: string[], allowEmptyArray?: boolean) => string | — |
getByThingsAttributeQuery | (filterAttributes: FilterAttribute[], selectedTypes: string[], allowEmptyArray?: boolean) => UnknownRecord | — |
getByTypesQuery | (filterTypes: string[], allowEmptyArray?: boolean) => string | — |
getConnectedMinerForSocket | (devices: MinerForSocket[] | undefined, pos: string) => MinerForSocket | undefined | The selected miner sitting at `pos`, if any (miners only, exact position). |
getContainerByContainerTagsQuery | (filterTags: string[], allowEmptyArray?: boolean) => string | — |
getContainerMinersByContainerTagsQuery | (filterTags: string[], allowEmptyArray?: boolean) => string | — |
getContainerSettingsModel | (containerType: string | undefined) => string | null | Map a container type string to its settings-model key (`bd` / `mbt` / `hydro` / `immersion`), or `null` for an unknown family. Mirrors the reference app's `getContainerSettingsModel`. |
getDeviceByAlertId | (uuid: string) => string | — |
getFiltersQuery | (filterTags?: string[], filters?: Record<string, string[]>, selectedTypes: string[] = ['t-container']) => UnknownRecord | — |
getListQuery | (filterTags: string[], filters?: Record<string, string[]>, selectedTypes: string[] = ['t-container']) => string | — |
getLvCabinetDevicesByRoot | (root: string) => string | — |
getMinersByContainerTagsQuery | (filterTags: string[], allowEmptyArray?: boolean) => string | — |
getPduByIndex | (container: ContainerSnapshotForSockets | undefined, pduIndex: string | number) => PduSnapshot | undefined | The PDU row whose `pdu` matches `pduIndex` on this container, or undefined. |
getPduData | (last: ContainerSnapshotForSockets['last']) => PduSnapshot[] | undefined | The `pdu_data` array off a container detail snapshot, or undefined. |
getRolesFromAuthToken | (authToken?: string) => string[] | Extract roles from authentication token |
getSignInRedirectUrl | (authToken: string | null | undefined) => string | Get redirect URL based on user's primary role |
getSitePowerMeterQuery | () => string | — |
getSocketInfo | (container: ContainerSnapshotForSockets, pos: string, allDevices: MinerForSocket[] | undefined) => DerivedSocket | Resolve one socket for `pos` on `container`: pick the vendor index scheme off the container name, then (for Bitdeer / MicroBT) join the live PDU row so `enabled` / `cooling` reflect the snapshot. Hydro / Immersion have no live socket table… |
getSupportedContainerTabs | (type: string | undefined) => ContainerTabValue[] | Full tab sequence for a container type: the family's base sequence, plus Power Adjustment spliced in after the PDU tab for Whatsminer containers. Unknown types resolve to an empty list. |
getWidgetAlarmState | (_container: ListThingsDevice, _settings: ContainerSettingsEntry | null = null) => ContainerAlarmState | Resolve a container's alarm state from its live stats and matched settings. |
isAntminer | (type: string | undefined) => boolean | — |
isAntspaceHydroContainer | (type: string | undefined) => boolean | Antspace/Bitmain hydro family (`as-hk3`, `antspace-hydro`, `bitmain-hydro`). |
isAntspaceImmersionContainer | (type: string | undefined) => boolean | Antspace/Bitmain immersion family (`as-immersion`, `bitmain-imm[ersion]`). |
isAvalon | (type: string | undefined) => boolean | — |
isBitdeerContainer | (type: string | undefined) => boolean | Bitdeer family — `container-bd-*` and anything mentioning `bitdeer`. |
isContainer | (type: string | undefined) => boolean | — |
isGammaContainer | (type: string | undefined) => boolean | Gamma family (`m221`, `gamma`). |
isMicroBTContainer | (type: string | undefined) => boolean | MicroBT family (`mbt`, `microbt`). |
isMiner | (type: string | undefined) => boolean | — |
isPduContainerTab | (tab: string | undefined) => boolean | The PDU grid renders under the `pdu` tab key. |
isWhatsminer | (type: string | undefined) => boolean | — |
isWhatsminerContainer | (type: string | undefined) => boolean | Containers populated with Whatsminer miners (`m56` / `m30` positions, or any MicroBT container) — the set that gets the Power Adjustment tab. |
parseSettingsFile | (file: File) => Promise<SettingsExportData> | — |
removeContainerPrefix | (text: string) => string | — |
resolveContainerModelFamily | (type: string | undefined) => ContainerModelFamily | undefined | Resolves a raw container `type` string (e.g. `container-bd-d40-m56`) to its model family, or `undefined` for unknown types. First match wins, in the reference app's original branch order. |
validateSettingsJson | (data: unknown) => data is SettingsExportData | — |