mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
ts bindings refactor
This commit is contained in:
@@ -1,28 +1,14 @@
|
||||
import {
|
||||
ActionId,
|
||||
ActionInput,
|
||||
ActionMetadata,
|
||||
SetMainStatus,
|
||||
DependencyRequirement,
|
||||
CheckDependenciesResult,
|
||||
SetHealth,
|
||||
BindParams,
|
||||
HostId,
|
||||
NetInfo,
|
||||
Host,
|
||||
ExportServiceInterfaceParams,
|
||||
ServiceInterface,
|
||||
CreateTaskParams,
|
||||
MainStatus,
|
||||
MountParams,
|
||||
} from "./osBindings"
|
||||
import {
|
||||
PackageId,
|
||||
Dependencies,
|
||||
ServiceInterfaceId,
|
||||
SmtpValue,
|
||||
ActionResult,
|
||||
} from "./types"
|
||||
import { ServiceEffectsApi } from "./osBindings/service-effects-api"
|
||||
import { RpcParamType, RpcReturnType } from "./osBindings/api-helpers"
|
||||
|
||||
type Expand<T> = { [K in keyof T]: T[K] }
|
||||
type ReqTy<Method extends string> = RpcParamType<ServiceEffectsApi, Method>
|
||||
type ResTy<Method extends string> = Promise<
|
||||
Expand<RpcReturnType<ServiceEffectsApi, Method>>
|
||||
>
|
||||
type FnTy<Method extends string> = keyof ReqTy<Method> extends never
|
||||
? () => ResTy<Method>
|
||||
: (options: ReqTy<Method>) => ResTy<Method>
|
||||
|
||||
/** Used to reach out from the pure js runtime */
|
||||
|
||||
@@ -39,131 +25,85 @@ export type Effects = {
|
||||
// action
|
||||
action: {
|
||||
/** Define an action that can be invoked by a user or service */
|
||||
export(options: { id: ActionId; metadata: ActionMetadata }): Promise<null>
|
||||
export: FnTy<"action.export">
|
||||
/** Remove all exported actions */
|
||||
clear(options: { except: ActionId[] }): Promise<null>
|
||||
getInput(options: {
|
||||
packageId?: PackageId
|
||||
actionId: ActionId
|
||||
}): Promise<ActionInput | null>
|
||||
run<Input extends Record<string, unknown>>(options: {
|
||||
packageId?: PackageId
|
||||
actionId: ActionId
|
||||
input?: Input
|
||||
}): Promise<ActionResult | null>
|
||||
createTask(options: CreateTaskParams): Promise<null>
|
||||
clearTasks(
|
||||
options: { only: string[] } | { except: string[] },
|
||||
): Promise<null>
|
||||
clear: FnTy<"action.clear">
|
||||
getInput: FnTy<"action.get-input">
|
||||
run: FnTy<"action.run">
|
||||
createTask: FnTy<"action.create-task">
|
||||
clearTasks: FnTy<"action.clear-tasks">
|
||||
}
|
||||
|
||||
// control
|
||||
/** restart this service's main function */
|
||||
restart(): Promise<null>
|
||||
restart: FnTy<"restart">
|
||||
/** stop this service's main function */
|
||||
shutdown(): Promise<null>
|
||||
shutdown: FnTy<"shutdown">
|
||||
/** ask the host os what the service's current status is */
|
||||
getStatus(options: {
|
||||
packageId?: PackageId
|
||||
callback?: () => void
|
||||
}): Promise<MainStatus>
|
||||
getStatus: FnTy<"get-status">
|
||||
/** indicate to the host os what runstate the service is in */
|
||||
setMainStatus(options: SetMainStatus): Promise<null>
|
||||
setMainStatus: FnTy<"set-main-status">
|
||||
|
||||
// dependency
|
||||
/** Set the dependencies of what the service needs, usually run during the inputSpec action as a best practice */
|
||||
setDependencies(options: { dependencies: Dependencies }): Promise<null>
|
||||
setDependencies: FnTy<"set-dependencies">
|
||||
/** Get the list of the dependencies, both the dynamic set by the effect of setDependencies and the end result any required in the manifest */
|
||||
getDependencies(): Promise<DependencyRequirement[]>
|
||||
getDependencies: FnTy<"get-dependencies">
|
||||
/** Test whether current dependency requirements are satisfied */
|
||||
checkDependencies(options: {
|
||||
packageIds?: PackageId[]
|
||||
}): Promise<CheckDependenciesResult[]>
|
||||
checkDependencies: FnTy<"check-dependencies">
|
||||
/** mount a volume of a dependency */
|
||||
mount(options: MountParams): Promise<string>
|
||||
mount: FnTy<"mount">
|
||||
/** Returns a list of the ids of all installed packages */
|
||||
getInstalledPackages(): Promise<string[]>
|
||||
getInstalledPackages: FnTy<"get-installed-packages">
|
||||
|
||||
// health
|
||||
/** sets the result of a health check */
|
||||
setHealth(o: SetHealth): Promise<null>
|
||||
setHealth: FnTy<"set-health">
|
||||
|
||||
// subcontainer
|
||||
subcontainer: {
|
||||
/** A low level api used by SubContainer */
|
||||
createFs(options: {
|
||||
imageId: string
|
||||
name: string | null
|
||||
}): Promise<[string, string]>
|
||||
createFs: FnTy<"subcontainer.create-fs">
|
||||
/** A low level api used by SubContainer */
|
||||
destroyFs(options: { guid: string }): Promise<null>
|
||||
destroyFs: FnTy<"subcontainer.destroy-fs">
|
||||
}
|
||||
|
||||
// net
|
||||
// bind
|
||||
/** Creates a host connected to the specified port with the provided options */
|
||||
bind(options: BindParams): Promise<null>
|
||||
bind: FnTy<"bind">
|
||||
/** Get the port address for a service */
|
||||
getServicePortForward(options: {
|
||||
packageId?: PackageId
|
||||
hostId: HostId
|
||||
internalPort: number
|
||||
}): Promise<NetInfo>
|
||||
getServicePortForward: FnTy<"get-service-port-forward">
|
||||
/** Removes all network bindings, called in the setupInputSpec */
|
||||
clearBindings(options: {
|
||||
except: { id: HostId; internalPort: number }[]
|
||||
}): Promise<null>
|
||||
clearBindings: FnTy<"clear-bindings">
|
||||
// host
|
||||
/** Returns information about the specified host, if it exists */
|
||||
getHostInfo(options: {
|
||||
packageId?: PackageId
|
||||
hostId: HostId
|
||||
callback?: () => void
|
||||
}): Promise<Host | null>
|
||||
getHostInfo: FnTy<"get-host-info">
|
||||
/** Returns the IP address of the container */
|
||||
getContainerIp(options: {
|
||||
packageId?: PackageId
|
||||
callback?: () => void
|
||||
}): Promise<string>
|
||||
getContainerIp: FnTy<"get-container-ip">
|
||||
/** Returns the IP address of StartOS */
|
||||
getOsIp(): Promise<string>
|
||||
getOsIp: FnTy<"get-os-ip">
|
||||
// interface
|
||||
/** Creates an interface bound to a specific host and port to show to the user */
|
||||
exportServiceInterface(options: ExportServiceInterfaceParams): Promise<null>
|
||||
exportServiceInterface: FnTy<"export-service-interface">
|
||||
/** Returns an exported service interface */
|
||||
getServiceInterface(options: {
|
||||
packageId?: PackageId
|
||||
serviceInterfaceId: ServiceInterfaceId
|
||||
callback?: () => void
|
||||
}): Promise<ServiceInterface | null>
|
||||
getServiceInterface: FnTy<"get-service-interface">
|
||||
/** Returns all exported service interfaces for a package */
|
||||
listServiceInterfaces(options: {
|
||||
packageId?: PackageId
|
||||
callback?: () => void
|
||||
}): Promise<Record<ServiceInterfaceId, ServiceInterface>>
|
||||
listServiceInterfaces: FnTy<"list-service-interfaces">
|
||||
/** Removes all service interfaces */
|
||||
clearServiceInterfaces(options: {
|
||||
except: ServiceInterfaceId[]
|
||||
}): Promise<null>
|
||||
clearServiceInterfaces: FnTy<"clear-service-interfaces">
|
||||
// ssl
|
||||
/** Returns a PEM encoded fullchain for the hostnames specified */
|
||||
getSslCertificate: (options: {
|
||||
hostnames: string[]
|
||||
algorithm?: "ecdsa" | "ed25519"
|
||||
callback?: () => void
|
||||
}) => Promise<[string, string, string]>
|
||||
getSslCertificate: FnTy<"get-ssl-certificate">
|
||||
/** Returns a PEM encoded private key corresponding to the certificate for the hostnames specified */
|
||||
getSslKey: (options: {
|
||||
hostnames: string[]
|
||||
algorithm?: "ecdsa" | "ed25519"
|
||||
}) => Promise<string>
|
||||
getSslKey: FnTy<"get-ssl-key">
|
||||
|
||||
/** sets the version that this service's data has been migrated to */
|
||||
setDataVersion(options: { version: string | null }): Promise<null>
|
||||
setDataVersion: FnTy<"set-data-version">
|
||||
/** returns the version that this service's data has been migrated to */
|
||||
getDataVersion(): Promise<string | null>
|
||||
getDataVersion: FnTy<"get-data-version">
|
||||
|
||||
// system
|
||||
/** Returns globally configured SMTP settings, if they exist */
|
||||
getSystemSmtp(options: { callback?: () => void }): Promise<SmtpValue | null>
|
||||
getSystemSmtp: FnTy<"get-system-smtp">
|
||||
}
|
||||
|
||||
@@ -39,7 +39,10 @@ export async function checkDependencies<
|
||||
effects: Effects,
|
||||
packageIds?: DependencyId[],
|
||||
): Promise<CheckDependencies<DependencyId>> {
|
||||
let [dependencies, results] = await Promise.all([
|
||||
let [dependencies, results]: [
|
||||
DependencyRequirement[],
|
||||
CheckDependenciesResult[],
|
||||
] = await Promise.all([
|
||||
effects.getDependencies(),
|
||||
effects.checkDependencies({
|
||||
packageIds,
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AnyVerifyingKey } from "./AnyVerifyingKey"
|
||||
|
||||
export type AcceptSigners =
|
||||
| { signer: AnyVerifyingKey }
|
||||
| { any: Array<AcceptSigners> }
|
||||
| { all: Array<AcceptSigners> }
|
||||
@@ -1,11 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AnySignature } from "./AnySignature"
|
||||
import type { Blake3Commitment } from "./Blake3Commitment"
|
||||
|
||||
export type AddAssetParams = {
|
||||
version: string
|
||||
platform: string
|
||||
url: string
|
||||
signature: AnySignature
|
||||
commitment: Blake3Commitment
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AnySignature } from "./AnySignature"
|
||||
import type { MerkleArchiveCommitment } from "./MerkleArchiveCommitment"
|
||||
|
||||
export type AddPackageParams = {
|
||||
url: string
|
||||
commitment: MerkleArchiveCommitment
|
||||
signature: AnySignature
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type AddPackageToCategoryParams = { id: string; package: PackageId }
|
||||
@@ -1,8 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type AddVersionParams = {
|
||||
version: string
|
||||
headline: string
|
||||
releaseNotes: string
|
||||
sourceVersion: string
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ApiState = "error" | "initializing" | "running"
|
||||
@@ -1,8 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { EncryptedWire } from "./EncryptedWire"
|
||||
|
||||
export type AttachParams = {
|
||||
startOsPassword: EncryptedWire | null
|
||||
guid: string
|
||||
kiosk?: boolean
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { BlockDev } from "./BlockDev"
|
||||
import type { Cifs } from "./Cifs"
|
||||
|
||||
export type BackupTargetFS =
|
||||
| ({ type: "disk" } & BlockDev)
|
||||
| ({ type: "cifs" } & Cifs)
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { HostId } from "./HostId"
|
||||
|
||||
export type BindId = { id: HostId; internalPort: number }
|
||||
@@ -1,12 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AddSslOptions } from "./AddSslOptions"
|
||||
import type { HostId } from "./HostId"
|
||||
import type { Security } from "./Security"
|
||||
|
||||
export type BindParams = {
|
||||
id: HostId
|
||||
internalPort: number
|
||||
preferredExternalPort: number
|
||||
addSsl: AddSslOptions | null
|
||||
secure: Security | null
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { GatewayId } from "./GatewayId"
|
||||
|
||||
export type BindingGatewaySetEnabledParams = {
|
||||
internalPort: number
|
||||
gateway: GatewayId
|
||||
enabled: boolean | null
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Base64 } from "./Base64"
|
||||
|
||||
export type Blake3Commitment = { hash: Base64; size: number }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type CallbackId = number
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type Category = { name: string }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ActionId } from "./ActionId"
|
||||
|
||||
export type ClearActionsParams = { except: Array<ActionId> }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { BindId } from "./BindId"
|
||||
|
||||
export type ClearBindingsParams = { except: Array<BindId> }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ClearCallbacksParams = { only: number[] } | { except: number[] }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ServiceInterfaceId } from "./ServiceInterfaceId"
|
||||
|
||||
export type ClearServiceInterfacesParams = { except: Array<ServiceInterfaceId> }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ClearTasksParams = { only: string[] } | { except: string[] }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type CliSetIconParams = { icon: string }
|
||||
@@ -1,6 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ContactInfo =
|
||||
| { email: string }
|
||||
| { matrix: string }
|
||||
| { website: string }
|
||||
@@ -1,7 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ImageId } from "./ImageId"
|
||||
|
||||
export type CreateSubcontainerFsParams = {
|
||||
imageId: ImageId
|
||||
name: string | null
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type DependencyKind = "exists" | "running"
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Guid } from "./Guid"
|
||||
|
||||
export type DestroySubcontainerFsParams = { guid: Guid }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { GatewayId } from "./GatewayId"
|
||||
|
||||
export type DomainSettings = { gateway: GatewayId }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type EchoParams = { message: string }
|
||||
@@ -1,13 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AnyVerifyingKey } from "./AnyVerifyingKey"
|
||||
import type { ContactInfo } from "./ContactInfo"
|
||||
import type { Guid } from "./Guid"
|
||||
|
||||
export type EditSignerParams = {
|
||||
id: Guid
|
||||
setName: string | null
|
||||
addContact: Array<ContactInfo>
|
||||
addKey: Array<AnyVerifyingKey>
|
||||
removeContact: Array<ContactInfo>
|
||||
removeKey: Array<AnyVerifyingKey>
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type EncryptedWire = { encrypted: any }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Guid } from "./Guid"
|
||||
|
||||
export type EventId = { eventId: Guid }
|
||||
@@ -1,5 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ActionId } from "./ActionId"
|
||||
import type { ActionMetadata } from "./ActionMetadata"
|
||||
|
||||
export type ExportActionParams = { id: ActionId; metadata: ActionMetadata }
|
||||
@@ -1,13 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AddressInfo } from "./AddressInfo"
|
||||
import type { ServiceInterfaceId } from "./ServiceInterfaceId"
|
||||
import type { ServiceInterfaceType } from "./ServiceInterfaceType"
|
||||
|
||||
export type ExportServiceInterfaceParams = {
|
||||
id: ServiceInterfaceId
|
||||
name: string
|
||||
description: string
|
||||
masked: boolean
|
||||
addressInfo: AddressInfo
|
||||
type: ServiceInterfaceType
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type FileType = "file" | "directory" | "infer"
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { GatewayId } from "./GatewayId"
|
||||
|
||||
export type ForgetGatewayParams = { gateway: GatewayId }
|
||||
@@ -1,14 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DataUrl } from "./DataUrl"
|
||||
import type { Guid } from "./Guid"
|
||||
import type { OsIndex } from "./OsIndex"
|
||||
import type { PackageIndex } from "./PackageIndex"
|
||||
import type { SignerInfo } from "./SignerInfo"
|
||||
|
||||
export type FullIndex = {
|
||||
name: string | null
|
||||
icon: DataUrl | null
|
||||
package: PackageIndex
|
||||
os: OsIndex
|
||||
signers: { [key: Guid]: SignerInfo }
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ActionId } from "./ActionId"
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type GetActionInputParams = { packageId?: PackageId; actionId: ActionId }
|
||||
@@ -1,8 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CallbackId } from "./CallbackId"
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type GetContainerIpParams = {
|
||||
packageId?: PackageId
|
||||
callback?: CallbackId
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CallbackId } from "./CallbackId"
|
||||
import type { HostId } from "./HostId"
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type GetHostInfoParams = {
|
||||
hostId: HostId
|
||||
packageId?: PackageId
|
||||
callback?: CallbackId
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type GetOsAssetParams = { version: string; platform: string }
|
||||
@@ -1,8 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type GetOsVersionParams = {
|
||||
sourceVersion: string | null
|
||||
targetVersion: string | null
|
||||
serverId: string | null
|
||||
platform: string | null
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PackageDetailLevel } from "./PackageDetailLevel"
|
||||
import type { PackageId } from "./PackageId"
|
||||
import type { Version } from "./Version"
|
||||
|
||||
export type GetPackageParams = {
|
||||
id: PackageId | null
|
||||
targetVersion: string | null
|
||||
sourceVersion: Version | null
|
||||
otherVersions: PackageDetailLevel
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PackageInfoShort } from "./PackageInfoShort"
|
||||
import type { PackageVersionInfo } from "./PackageVersionInfo"
|
||||
import type { Version } from "./Version"
|
||||
|
||||
export type GetPackageResponse = {
|
||||
categories: string[]
|
||||
best: { [key: Version]: PackageVersionInfo }
|
||||
otherVersions?: { [key: Version]: PackageInfoShort }
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PackageVersionInfo } from "./PackageVersionInfo"
|
||||
import type { Version } from "./Version"
|
||||
|
||||
export type GetPackageResponseFull = {
|
||||
categories: string[]
|
||||
best: { [key: Version]: PackageVersionInfo }
|
||||
otherVersions: { [key: Version]: PackageVersionInfo }
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CallbackId } from "./CallbackId"
|
||||
import type { PackageId } from "./PackageId"
|
||||
import type { ServiceInterfaceId } from "./ServiceInterfaceId"
|
||||
|
||||
export type GetServiceInterfaceParams = {
|
||||
packageId?: PackageId
|
||||
serviceInterfaceId: ServiceInterfaceId
|
||||
callback?: CallbackId
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { HostId } from "./HostId"
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type GetServicePortForwardParams = {
|
||||
packageId?: PackageId
|
||||
hostId: HostId
|
||||
internalPort: number
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Algorithm } from "./Algorithm"
|
||||
import type { CallbackId } from "./CallbackId"
|
||||
|
||||
export type GetSslCertificateParams = {
|
||||
hostnames: string[]
|
||||
algorithm?: Algorithm
|
||||
callback?: CallbackId
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Algorithm } from "./Algorithm"
|
||||
|
||||
export type GetSslKeyParams = { hostnames: string[]; algorithm?: Algorithm }
|
||||
@@ -1,5 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CallbackId } from "./CallbackId"
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type GetStatusParams = { packageId?: PackageId; callback?: CallbackId }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CallbackId } from "./CallbackId"
|
||||
|
||||
export type GetSystemSmtpParams = { callback: CallbackId | null }
|
||||
@@ -1,8 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ImageMetadata = {
|
||||
workdir: string
|
||||
user: string
|
||||
entrypoint: Array<string> | null
|
||||
cmd: Array<string> | null
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { FullProgress } from "./FullProgress"
|
||||
import type { Guid } from "./Guid"
|
||||
|
||||
export type InitProgressRes = { progress: FullProgress; guid: Guid }
|
||||
@@ -1,9 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PackageId } from "./PackageId"
|
||||
import type { Version } from "./Version"
|
||||
|
||||
export type InstallParams = {
|
||||
registry: string
|
||||
id: PackageId
|
||||
version: Version
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type InstalledVersionParams = { id: PackageId }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type ListPackageSignersParams = { id: PackageId }
|
||||
@@ -1,8 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CallbackId } from "./CallbackId"
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type ListServiceInterfacesParams = {
|
||||
packageId?: PackageId
|
||||
callback?: CallbackId
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ListVersionSignersParams = { version: string }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type LoginParams = { password: string; ephemeral: boolean }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type MaybeUtf8String = string | number[]
|
||||
@@ -1,7 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Base64 } from "./Base64"
|
||||
|
||||
export type MerkleArchiveCommitment = {
|
||||
rootSighash: Base64
|
||||
rootMaxsize: number
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// 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
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// 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
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// 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
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// 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 }
|
||||
@@ -1,13 +0,0 @@
|
||||
// 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
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { MountTarget } from "./MountTarget"
|
||||
|
||||
export type MountParams = { location: string; target: MountTarget }
|
||||
@@ -1,12 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { FileType } from "./FileType"
|
||||
import type { PackageId } from "./PackageId"
|
||||
import type { VolumeId } from "./VolumeId"
|
||||
|
||||
export type MountTarget = {
|
||||
packageId: PackageId
|
||||
volumeId: VolumeId
|
||||
subpath: string | null
|
||||
readonly: boolean
|
||||
filetype: FileType
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { GatewayId } from "./GatewayId"
|
||||
|
||||
export type NetworkInterfaceSetPublicParams = {
|
||||
gateway: GatewayId
|
||||
public: boolean | null
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { OsVersionInfoMap } from "./OsVersionInfoMap"
|
||||
|
||||
export type OsIndex = { versions: OsVersionInfoMap }
|
||||
@@ -1,14 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Blake3Commitment } from "./Blake3Commitment"
|
||||
import type { Guid } from "./Guid"
|
||||
import type { RegistryAsset } from "./RegistryAsset"
|
||||
|
||||
export type OsVersionInfo = {
|
||||
headline: string
|
||||
releaseNotes: string
|
||||
sourceVersion: string
|
||||
authorized: Array<Guid>
|
||||
iso: { [key: string]: RegistryAsset<Blake3Commitment> }
|
||||
squashfs: { [key: string]: RegistryAsset<Blake3Commitment> }
|
||||
img: { [key: string]: RegistryAsset<Blake3Commitment> }
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { OsVersionInfo } from "./OsVersionInfo"
|
||||
|
||||
export type OsVersionInfoMap = { [key: string]: OsVersionInfo }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type PackageDetailLevel = "none" | "short" | "full"
|
||||
@@ -1,9 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Category } from "./Category"
|
||||
import type { PackageId } from "./PackageId"
|
||||
import type { PackageInfo } from "./PackageInfo"
|
||||
|
||||
export type PackageIndex = {
|
||||
categories: { [key: string]: Category }
|
||||
packages: { [key: PackageId]: PackageInfo }
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Guid } from "./Guid"
|
||||
import type { PackageVersionInfo } from "./PackageVersionInfo"
|
||||
import type { Version } from "./Version"
|
||||
|
||||
export type PackageInfo = {
|
||||
authorized: Array<Guid>
|
||||
versions: { [key: Version]: PackageVersionInfo }
|
||||
categories: string[]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type PackageInfoShort = { releaseNotes: string }
|
||||
@@ -1,5 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Guid } from "./Guid"
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type PackageSignerParams = { id: PackageId; signer: Guid }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { EncryptedWire } from "./EncryptedWire"
|
||||
|
||||
export type PasswordType = EncryptedWire | string
|
||||
@@ -1,3 +0,0 @@
|
||||
// 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,11 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { BackupTargetFS } from "./BackupTargetFS"
|
||||
|
||||
export type RecoverySource<Password> =
|
||||
| { type: "migrate"; guid: string }
|
||||
| {
|
||||
type: "backup"
|
||||
target: BackupTargetFS
|
||||
password: Password
|
||||
serverId: string
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { AnySignature } from "./AnySignature"
|
||||
import type { AnyVerifyingKey } from "./AnyVerifyingKey"
|
||||
|
||||
export type RegistryAsset<Commitment> = {
|
||||
publishedAt: string
|
||||
url: string
|
||||
commitment: Commitment
|
||||
signatures: { [key: AnyVerifyingKey]: AnySignature }
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Category } from "./Category"
|
||||
import type { DataUrl } from "./DataUrl"
|
||||
|
||||
export type RegistryInfo = {
|
||||
name: string | null
|
||||
icon: DataUrl | null
|
||||
categories: { [key: string]: Category }
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Guid } from "./Guid"
|
||||
|
||||
export type RemoveAdminParams = { signer: Guid }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type RemoveAssetParams = { version: string; platform: string }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type RemoveCategoryParams = { id: string }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type RemovePackageFromCategoryParams = { id: string; package: PackageId }
|
||||
@@ -1,5 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PackageId } from "./PackageId"
|
||||
import type { Version } from "./Version"
|
||||
|
||||
export type RemovePackageParams = { id: PackageId; version: Version }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { GatewayId } from "./GatewayId"
|
||||
|
||||
export type RemoveTunnelParams = { id: GatewayId }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type RemoveVersionParams = { version: string }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { GatewayId } from "./GatewayId"
|
||||
|
||||
export type RenameGatewayParams = { id: GatewayId; name: string }
|
||||
@@ -1,9 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Base64 } from "./Base64"
|
||||
|
||||
export type RequestCommitment = {
|
||||
timestamp: number
|
||||
nonce: number
|
||||
size: number
|
||||
blake3: Base64
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ActionId } from "./ActionId"
|
||||
import type { PackageId } from "./PackageId"
|
||||
|
||||
export type RunActionParams = {
|
||||
packageId?: PackageId
|
||||
actionId: ActionId
|
||||
input: any
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ServerSpecs = { cpu: string; disk: string; memory: string }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Sessions } from "./Sessions"
|
||||
|
||||
export type SessionList = { current: string | null; sessions: Sessions }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type SetDataVersionParams = { version: string }
|
||||
@@ -1,6 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DependencyRequirement } from "./DependencyRequirement"
|
||||
|
||||
export type SetDependenciesParams = {
|
||||
dependencies: Array<DependencyRequirement>
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DataUrl } from "./DataUrl"
|
||||
|
||||
export type SetIconParams = { icon: DataUrl }
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { SetMainStatusStatus } from "./SetMainStatusStatus"
|
||||
|
||||
export type SetMainStatus = { status: SetMainStatusStatus }
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type SetMainStatusStatus = "running" | "stopped"
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type SetNameParams = { name: string }
|
||||
@@ -1,10 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { EncryptedWire } from "./EncryptedWire"
|
||||
import type { RecoverySource } from "./RecoverySource"
|
||||
|
||||
export type SetupExecuteParams = {
|
||||
startOsLogicalname: string
|
||||
startOsPassword: EncryptedWire
|
||||
recoverySource: RecoverySource<EncryptedWire> | null
|
||||
kiosk?: boolean
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user