mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Update/040 types (#2845)
* small type changes and clear todos * handle notifications and metrics * wip * fixes * migration * dedup all urls * better handling of clearnet ips * add rfkill dependency --------- Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type UnsetPublicParams = { interface: string }
|
||||
export type Celsius = number
|
||||
3
sdk/base/lib/osBindings/GigaBytes.ts
Normal file
3
sdk/base/lib/osBindings/GigaBytes.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type GigaBytes = number
|
||||
@@ -2,6 +2,7 @@
|
||||
import type { NetworkInterfaceType } from "./NetworkInterfaceType"
|
||||
|
||||
export type IpInfo = {
|
||||
name: string
|
||||
scopeId: number
|
||||
deviceType: NetworkInterfaceType | null
|
||||
subnets: string[]
|
||||
|
||||
3
sdk/base/lib/osBindings/MebiBytes.ts
Normal file
3
sdk/base/lib/osBindings/MebiBytes.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type MebiBytes = number
|
||||
12
sdk/base/lib/osBindings/Metrics.ts
Normal file
12
sdk/base/lib/osBindings/Metrics.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { MetricsCpu } from "./MetricsCpu"
|
||||
import type { MetricsDisk } from "./MetricsDisk"
|
||||
import type { MetricsGeneral } from "./MetricsGeneral"
|
||||
import type { MetricsMemory } from "./MetricsMemory"
|
||||
|
||||
export type Metrics = {
|
||||
general: MetricsGeneral
|
||||
memory: MetricsMemory
|
||||
cpu: MetricsCpu
|
||||
disk: MetricsDisk
|
||||
}
|
||||
10
sdk/base/lib/osBindings/MetricsCpu.ts
Normal file
10
sdk/base/lib/osBindings/MetricsCpu.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Percentage } from "./Percentage"
|
||||
|
||||
export type MetricsCpu = {
|
||||
percentageUsed: Percentage
|
||||
idle: Percentage
|
||||
userSpace: Percentage
|
||||
kernelSpace: Percentage
|
||||
wait: Percentage
|
||||
}
|
||||
10
sdk/base/lib/osBindings/MetricsDisk.ts
Normal file
10
sdk/base/lib/osBindings/MetricsDisk.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { GigaBytes } from "./GigaBytes"
|
||||
import type { Percentage } from "./Percentage"
|
||||
|
||||
export type MetricsDisk = {
|
||||
percentageUsed: Percentage
|
||||
used: GigaBytes
|
||||
available: GigaBytes
|
||||
capacity: GigaBytes
|
||||
}
|
||||
4
sdk/base/lib/osBindings/MetricsGeneral.ts
Normal file
4
sdk/base/lib/osBindings/MetricsGeneral.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Celsius } from "./Celsius"
|
||||
|
||||
export type MetricsGeneral = { temperature: Celsius | null }
|
||||
13
sdk/base/lib/osBindings/MetricsMemory.ts
Normal file
13
sdk/base/lib/osBindings/MetricsMemory.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { MebiBytes } from "./MebiBytes"
|
||||
import type { Percentage } from "./Percentage"
|
||||
|
||||
export type MetricsMemory = {
|
||||
percentageUsed: Percentage
|
||||
total: MebiBytes
|
||||
available: MebiBytes
|
||||
used: MebiBytes
|
||||
zramTotal: MebiBytes
|
||||
zramAvailable: MebiBytes
|
||||
zramUsed: MebiBytes
|
||||
}
|
||||
13
sdk/base/lib/osBindings/NetworkInfo.ts
Normal file
13
sdk/base/lib/osBindings/NetworkInfo.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AcmeProvider } from "./AcmeProvider"
|
||||
import type { AcmeSettings } from "./AcmeSettings"
|
||||
import type { Host } from "./Host"
|
||||
import type { NetworkInterfaceInfo } from "./NetworkInterfaceInfo"
|
||||
import type { WifiInfo } from "./WifiInfo"
|
||||
|
||||
export type NetworkInfo = {
|
||||
wifi: WifiInfo
|
||||
host: Host
|
||||
networkInterfaces: { [key: string]: NetworkInterfaceInfo }
|
||||
acme: { [key: AcmeProvider]: AcmeSettings }
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
import type { IpInfo } from "./IpInfo"
|
||||
|
||||
export type NetworkInterfaceInfo = {
|
||||
public: boolean | null
|
||||
inbound: boolean | null
|
||||
outbound: boolean | null
|
||||
ipInfo: IpInfo | null
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type NetworkInterfaceSetPublicParams = {
|
||||
export type NetworkInterfaceSetInboundParams = {
|
||||
interface: string
|
||||
public: boolean | null
|
||||
inbound: boolean | null
|
||||
}
|
||||
3
sdk/base/lib/osBindings/Percentage.ts
Normal file
3
sdk/base/lib/osBindings/Percentage.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type Percentage = number
|
||||
@@ -1,28 +1,21 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AcmeProvider } from "./AcmeProvider"
|
||||
import type { AcmeSettings } from "./AcmeSettings"
|
||||
import type { Governor } from "./Governor"
|
||||
import type { Host } from "./Host"
|
||||
import type { LshwDevice } from "./LshwDevice"
|
||||
import type { NetworkInterfaceInfo } from "./NetworkInterfaceInfo"
|
||||
import type { NetworkInfo } from "./NetworkInfo"
|
||||
import type { ServerStatus } from "./ServerStatus"
|
||||
import type { SmtpValue } from "./SmtpValue"
|
||||
import type { WifiInfo } from "./WifiInfo"
|
||||
|
||||
export type ServerInfo = {
|
||||
arch: string
|
||||
platform: string
|
||||
id: string
|
||||
hostname: string
|
||||
host: Host
|
||||
version: string
|
||||
packageVersionCompat: string
|
||||
postInitMigrationTodos: string[]
|
||||
lastBackup: string | null
|
||||
networkInterfaces: { [key: string]: NetworkInterfaceInfo }
|
||||
acme: { [key: AcmeProvider]: AcmeSettings }
|
||||
network: NetworkInfo
|
||||
statusInfo: ServerStatus
|
||||
wifi: WifiInfo
|
||||
unreadNotificationCount: number
|
||||
passwordHash: string
|
||||
pubkey: string
|
||||
|
||||
3
sdk/base/lib/osBindings/UnsetInboundParams.ts
Normal file
3
sdk/base/lib/osBindings/UnsetInboundParams.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type UnsetInboundParams = { interface: string }
|
||||
@@ -1,6 +1,7 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type WifiInfo = {
|
||||
enabled: boolean
|
||||
interface: string | null
|
||||
ssids: Array<string>
|
||||
selected: string | null
|
||||
|
||||
@@ -46,6 +46,7 @@ export { BlockDev } from "./BlockDev"
|
||||
export { BuildArg } from "./BuildArg"
|
||||
export { CallbackId } from "./CallbackId"
|
||||
export { Category } from "./Category"
|
||||
export { Celsius } from "./Celsius"
|
||||
export { CheckDependenciesParam } from "./CheckDependenciesParam"
|
||||
export { CheckDependenciesResult } from "./CheckDependenciesResult"
|
||||
export { Cifs } from "./Cifs"
|
||||
@@ -93,6 +94,7 @@ export { GetSslKeyParams } from "./GetSslKeyParams"
|
||||
export { GetStatusParams } from "./GetStatusParams"
|
||||
export { GetStoreParams } from "./GetStoreParams"
|
||||
export { GetSystemSmtpParams } from "./GetSystemSmtpParams"
|
||||
export { GigaBytes } from "./GigaBytes"
|
||||
export { GitHash } from "./GitHash"
|
||||
export { Governor } from "./Governor"
|
||||
export { Guid } from "./Guid"
|
||||
@@ -125,14 +127,21 @@ export { LshwProcessor } from "./LshwProcessor"
|
||||
export { MainStatus } from "./MainStatus"
|
||||
export { Manifest } from "./Manifest"
|
||||
export { MaybeUtf8String } from "./MaybeUtf8String"
|
||||
export { MebiBytes } from "./MebiBytes"
|
||||
export { MerkleArchiveCommitment } from "./MerkleArchiveCommitment"
|
||||
export { MetricsCpu } from "./MetricsCpu"
|
||||
export { MetricsDisk } from "./MetricsDisk"
|
||||
export { MetricsGeneral } from "./MetricsGeneral"
|
||||
export { MetricsMemory } from "./MetricsMemory"
|
||||
export { Metrics } from "./Metrics"
|
||||
export { MountParams } from "./MountParams"
|
||||
export { MountTarget } from "./MountTarget"
|
||||
export { NamedHealthCheckResult } from "./NamedHealthCheckResult"
|
||||
export { NamedProgress } from "./NamedProgress"
|
||||
export { NetInfo } from "./NetInfo"
|
||||
export { NetworkInfo } from "./NetworkInfo"
|
||||
export { NetworkInterfaceInfo } from "./NetworkInterfaceInfo"
|
||||
export { NetworkInterfaceSetPublicParams } from "./NetworkInterfaceSetPublicParams"
|
||||
export { NetworkInterfaceSetInboundParams } from "./NetworkInterfaceSetInboundParams"
|
||||
export { NetworkInterfaceType } from "./NetworkInterfaceType"
|
||||
export { OnionHostname } from "./OnionHostname"
|
||||
export { OsIndex } from "./OsIndex"
|
||||
@@ -149,6 +158,7 @@ export { PackageState } from "./PackageState"
|
||||
export { PackageVersionInfo } from "./PackageVersionInfo"
|
||||
export { PasswordType } from "./PasswordType"
|
||||
export { PathOrUrl } from "./PathOrUrl"
|
||||
export { Percentage } from "./Percentage"
|
||||
export { ProcedureId } from "./ProcedureId"
|
||||
export { Progress } from "./Progress"
|
||||
export { Public } from "./Public"
|
||||
@@ -188,7 +198,7 @@ export { SignerInfo } from "./SignerInfo"
|
||||
export { SmtpValue } from "./SmtpValue"
|
||||
export { StartStop } from "./StartStop"
|
||||
export { TestSmtpParams } from "./TestSmtpParams"
|
||||
export { UnsetPublicParams } from "./UnsetPublicParams"
|
||||
export { UnsetInboundParams } from "./UnsetInboundParams"
|
||||
export { UpdatingState } from "./UpdatingState"
|
||||
export { VerifyCifsParams } from "./VerifyCifsParams"
|
||||
export { VersionSignerParams } from "./VersionSignerParams"
|
||||
|
||||
@@ -73,7 +73,7 @@ import * as actions from "../../base/lib/actions"
|
||||
import { setupInit } from "./inits/setupInit"
|
||||
import * as fs from "node:fs/promises"
|
||||
|
||||
export const OSVersion = testTypeVersion("0.3.6-alpha.15")
|
||||
export const OSVersion = testTypeVersion("0.4.0-alpha.0")
|
||||
|
||||
// prettier-ignore
|
||||
type AnyNeverCond<T extends any[], Then, Else> =
|
||||
|
||||
Reference in New Issue
Block a user