mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
* don't export api params * import from SDK instead of BE --------- Co-authored-by: Aiden McClelland <me@drbonez.dev>
77 lines
1.4 KiB
TypeScript
77 lines
1.4 KiB
TypeScript
import { T } from '@start9labs/start-sdk'
|
|
|
|
export type DataModel = T.Public & {
|
|
ui: UIData
|
|
packageData: Record<string, PackageDataEntry>
|
|
}
|
|
|
|
export interface UIData {
|
|
name: string | null
|
|
ackWelcome: string // eOS emver
|
|
marketplace: UIMarketplaceData
|
|
gaming: {
|
|
snake: {
|
|
highScore: number
|
|
}
|
|
}
|
|
ackInstructions: Record<string, boolean>
|
|
theme: string
|
|
widgets: readonly Widget[]
|
|
}
|
|
|
|
export interface Widget {
|
|
id: string
|
|
meta: {
|
|
name: string
|
|
width: number
|
|
height: number
|
|
mobileWidth: number
|
|
mobileHeight: number
|
|
}
|
|
url?: string
|
|
settings?: string
|
|
}
|
|
|
|
export interface UIMarketplaceData {
|
|
selectedUrl: string
|
|
knownHosts: {
|
|
'https://registry.start9.com/': UIStore
|
|
'https://community-registry.start9.com/': UIStore
|
|
[url: string]: UIStore
|
|
}
|
|
}
|
|
|
|
export interface UIStore {
|
|
name?: string
|
|
}
|
|
|
|
export type PackageDataEntry<T extends StateInfo = StateInfo> =
|
|
T.PackageDataEntry & {
|
|
stateInfo: T
|
|
}
|
|
|
|
export type StateInfo = InstalledState | InstallingState | UpdatingState
|
|
|
|
export type InstalledState = {
|
|
state: 'installed' | 'removing'
|
|
manifest: T.Manifest
|
|
installingInfo?: undefined
|
|
}
|
|
|
|
export type InstallingState = {
|
|
state: 'installing' | 'restoring'
|
|
installingInfo: InstallingInfo
|
|
manifest?: undefined
|
|
}
|
|
|
|
export type UpdatingState = {
|
|
state: 'updating'
|
|
installingInfo: InstallingInfo
|
|
manifest: T.Manifest
|
|
}
|
|
|
|
export type InstallingInfo = {
|
|
progress: T.FullProgress
|
|
newManifest: T.Manifest
|
|
}
|