Chore/unexport api ts (#2585)

* don't export api params

* import from SDK instead of BE

---------

Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
Matt Hill
2024-04-01 14:47:03 -06:00
committed by GitHub
parent f021ad9b0a
commit 71b83245b4
105 changed files with 88 additions and 464 deletions

View File

@@ -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 ActionParams = {
id: PackageId;
actionId: ActionId;
input: { [key: string]: any } | null;
};

View File

@@ -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 { ImageId } from "./ImageId";
export type AddImageParams = { id: ImageId; image: string };

View File

@@ -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 { SshPubKey } from "./SshPubKey";
export type AddParams = { key: SshPubKey };

View File

@@ -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 ApplyParams = { expr: string; path: string | null };

View File

@@ -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 { EncryptedWire } from "./EncryptedWire";
export type AttachParams = {
startOsPassword: EncryptedWire | null;
guid: string;
};

View File

@@ -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 { BackupTargetId } from "./BackupTargetId";
import type { PackageId } from "./PackageId";
import type { PasswordType } from "./PasswordType";
export type BackupParams = {
targetId: BackupTargetId;
oldPassword: PasswordType | null;
packageIds: Array<PackageId> | null;
password: PasswordType;
};

View File

@@ -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);

View File

@@ -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 BackupTargetId = string;

View File

@@ -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 BlockDev = { logicalname: string };

View File

@@ -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 Cifs = {
hostname: string;
path: string;
username: string;
password: string | null;
};

View File

@@ -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 ConfigParams = { id: PackageId };

View File

@@ -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 { PackageId } from "./PackageId";
export type ConfigureParams = {
dependentId: PackageId;
dependencyId: PackageId;
};

View File

@@ -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 ConnectParams = { id: PackageId };

View File

@@ -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 ControlParams = { id: PackageId };

View File

@@ -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 { NotificationLevel } from "./NotificationLevel";
import type { PackageId } from "./PackageId";
export type CreateParams = {
package: PackageId | null;
level: NotificationLevel;
title: string;
message: string;
};

View File

@@ -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 DeleteBeforeParams = { before: number };

View File

@@ -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 DeleteParams = { fingerprint: string };

View File

@@ -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 DumpParams = {};

View File

@@ -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 };

View File

@@ -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 EditManifestParams = { expression: string };

View File

@@ -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 ExecuteParams = {
startOsLogicalname: string;
startOsPassword: EncryptedWire;
recoverySource: RecoverySource | null;
recoveryPassword: EncryptedWire | null;
};

View File

@@ -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 GetParams = { url: string };

View File

@@ -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 { Governor } from "./Governor";
export type GovernorParams = { set: Governor | null };

View File

@@ -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 { BackupTargetId } from "./BackupTargetId";
export type InfoParams = { targetId: BackupTargetId; password: string };

View File

@@ -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 { MinMax } from "./MinMax";
import type { PackageId } from "./PackageId";
export type InstallParams = {
id: PackageId;
marketplaceUrl: string | null;
versionSpec: string | null;
versionPriority: MinMax | null;
};

View File

@@ -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 KernelLogsParams = {
limit: number | null;
cursor: string | null;
before: boolean;
follow: boolean;
};

View File

@@ -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 KillParams = { ids: Array<string> };

View File

@@ -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 ListParams = { before: number | null; limit: number | null };

View File

@@ -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 { PasswordType } from "./PasswordType";
export type LoginParams = {
password: PasswordType | null;
userAgent: string | null;
metadata: any;
};

View File

@@ -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 LogoutParams = { session: string };

View File

@@ -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 LogsParams = {
limit: number | null;
cursor: string | null;
before: boolean;
follow: boolean;
};

View File

@@ -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 MinMax = "min" | "max";

View File

@@ -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 NotificationLevel = "success" | "info" | "warning" | "error";

View File

@@ -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 { BackupTargetFS } from "./BackupTargetFS";
export type RecoverySource =
| { type: "migrate"; guid: string }
| { type: "backup"; target: BackupTargetFS };

View File

@@ -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 RemoveParams = { guid: string };

View File

@@ -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 ResetParams = { wipeState: boolean; reason: string };

View File

@@ -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 { PasswordType } from "./PasswordType";
export type ResetPasswordParams = {
oldPassword: PasswordType | null;
newPassword: PasswordType | null;
};

View File

@@ -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 { BackupTargetId } from "./BackupTargetId";
import type { PackageId } from "./PackageId";
export type RestorePackageParams = {
ids: Array<PackageId>;
targetId: BackupTargetId;
password: string;
};

View File

@@ -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 SetCountryParams = { country: string };

View File

@@ -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 { Duration } from "./Duration";
export type SetParams = {
timeout: Duration | null;
config: { [key: string]: any } | null;
};

View File

@@ -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 SshPubKey = string;

View File

@@ -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 SsidParams = { ssid: string };

View File

@@ -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 UiParams = { pointer: string; value: any };

View File

@@ -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 { BackupTargetId } from "./BackupTargetId";
export type UmountParams = { targetId: BackupTargetId | null };

View File

@@ -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 UninstallParams = { id: PackageId };

View File

@@ -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 UpdateParams = { interface: string };

View File

@@ -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 UpdateSystemParams = { marketplaceUrl: string };

View File

@@ -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 { EncryptedWire } from "./EncryptedWire";
export type VerifyCifsParams = {
hostname: string;
path: string;
username: string;
password: EncryptedWire | null;
};

View File

@@ -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 VerifyParams = { path: string };

View File

@@ -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 ZramParams = { enable: boolean };

View File

@@ -1,8 +1,5 @@
export { ActionId } from "./ActionId";
export { ActionMetadata } from "./ActionMetadata";
export { ActionParams } from "./ActionParams";
export { AddImageParams } from "./AddImageParams";
export { AddParams } from "./AddParams";
export { AddressInfo } from "./AddressInfo";
export { AddSslOptions } from "./AddSslOptions";
export { Alerts } from "./Alerts";
@@ -10,30 +7,16 @@ export { Algorithm } from "./Algorithm";
export { AllowedStatuses } from "./AllowedStatuses";
export { AllPackageData } from "./AllPackageData";
export { AlpnInfo } from "./AlpnInfo";
export { ApplyParams } from "./ApplyParams";
export { AttachParams } from "./AttachParams";
export { BackupParams } from "./BackupParams";
export { BackupProgress } from "./BackupProgress";
export { BackupTargetFS } from "./BackupTargetFS";
export { BackupTargetId } from "./BackupTargetId";
export { BindInfo } from "./BindInfo";
export { BindOptions } from "./BindOptions";
export { BindParams } from "./BindParams";
export { BlockDev } from "./BlockDev";
export { Callback } from "./Callback";
export { ChrootParams } from "./ChrootParams";
export { Cifs } from "./Cifs";
export { ConfigParams } from "./ConfigParams";
export { ConfigureParams } from "./ConfigureParams";
export { ConnectParams } from "./ConnectParams";
export { ControlParams } from "./ControlParams";
export { CreateOverlayedImageParams } from "./CreateOverlayedImageParams";
export { CreateParams } from "./CreateParams";
export { CurrentDependencies } from "./CurrentDependencies";
export { CurrentDependencyInfo } from "./CurrentDependencyInfo";
export { DataUrl } from "./DataUrl";
export { DeleteBeforeParams } from "./DeleteBeforeParams";
export { DeleteParams } from "./DeleteParams";
export { Dependencies } from "./Dependencies";
export { DependencyConfigErrors } from "./DependencyConfigErrors";
export { DependencyKind } from "./DependencyKind";
@@ -41,13 +24,9 @@ export { DependencyRequirement } from "./DependencyRequirement";
export { DepInfo } from "./DepInfo";
export { Description } from "./Description";
export { DestroyOverlayedImageParams } from "./DestroyOverlayedImageParams";
export { DumpParams } from "./DumpParams";
export { Duration } from "./Duration";
export { EchoParams } from "./EchoParams";
export { EditManifestParams } from "./EditManifestParams";
export { EncryptedWire } from "./EncryptedWire";
export { ExecuteAction } from "./ExecuteAction";
export { ExecuteParams } from "./ExecuteParams";
export { ExportActionParams } from "./ExportActionParams";
export { ExportedHostInfo } from "./ExportedHostInfo";
export { ExportedHostnameInfo } from "./ExportedHostnameInfo";
@@ -58,7 +37,6 @@ export { ExposeForDependentsParams } from "./ExposeForDependentsParams";
export { FullProgress } from "./FullProgress";
export { GetHostInfoParamsKind } from "./GetHostInfoParamsKind";
export { GetHostInfoParams } from "./GetHostInfoParams";
export { GetParams } from "./GetParams";
export { GetPrimaryUrlParams } from "./GetPrimaryUrlParams";
export { GetServiceInterfaceParams } from "./GetServiceInterfaceParams";
export { GetServicePortForwardParams } from "./GetServicePortForwardParams";
@@ -66,7 +44,6 @@ export { GetSslCertificateParams } from "./GetSslCertificateParams";
export { GetSslKeyParams } from "./GetSslKeyParams";
export { GetStoreParams } from "./GetStoreParams";
export { GetSystemSmtpParams } from "./GetSystemSmtpParams";
export { GovernorParams } from "./GovernorParams";
export { Governor } from "./Governor";
export { HardwareRequirements } from "./HardwareRequirements";
export { HealthCheckId } from "./HealthCheckId";
@@ -77,27 +54,17 @@ export { HostInfo } from "./HostInfo";
export { HostKind } from "./HostKind";
export { Host } from "./Host";
export { ImageId } from "./ImageId";
export { InfoParams } from "./InfoParams";
export { InstalledState } from "./InstalledState";
export { InstallingInfo } from "./InstallingInfo";
export { InstallingState } from "./InstallingState";
export { InstallParams } from "./InstallParams";
export { IpInfo } from "./IpInfo";
export { KernelLogsParams } from "./KernelLogsParams";
export { KillParams } from "./KillParams";
export { ListParams } from "./ListParams";
export { ListServiceInterfacesParams } from "./ListServiceInterfacesParams";
export { LoginParams } from "./LoginParams";
export { LogoutParams } from "./LogoutParams";
export { LogsParams } from "./LogsParams";
export { MainStatus } from "./MainStatus";
export { Manifest } from "./Manifest";
export { MaybeUtf8String } from "./MaybeUtf8String";
export { MinMax } from "./MinMax";
export { MountParams } from "./MountParams";
export { MountTarget } from "./MountTarget";
export { NamedProgress } from "./NamedProgress";
export { NotificationLevel } from "./NotificationLevel";
export { PackageDataEntry } from "./PackageDataEntry";
export { PackageId } from "./PackageId";
export { PackageState } from "./PackageState";
@@ -106,13 +73,8 @@ export { ParamsPackageId } from "./ParamsPackageId";
export { PasswordType } from "./PasswordType";
export { Progress } from "./Progress";
export { Public } from "./Public";
export { RecoverySource } from "./RecoverySource";
export { RemoveActionParams } from "./RemoveActionParams";
export { RemoveAddressParams } from "./RemoveAddressParams";
export { RemoveParams } from "./RemoveParams";
export { ResetParams } from "./ResetParams";
export { ResetPasswordParams } from "./ResetPasswordParams";
export { RestorePackageParams } from "./RestorePackageParams";
export { ReverseProxyBind } from "./ReverseProxyBind";
export { ReverseProxyDestination } from "./ReverseProxyDestination";
export { ReverseProxyHttp } from "./ReverseProxyHttp";
@@ -129,24 +91,12 @@ export { SessionList } from "./SessionList";
export { Sessions } from "./Sessions";
export { Session } from "./Session";
export { SetConfigured } from "./SetConfigured";
export { SetCountryParams } from "./SetCountryParams";
export { SetDependenciesParams } from "./SetDependenciesParams";
export { SetHealth } from "./SetHealth";
export { SetMainStatus } from "./SetMainStatus";
export { SetParams } from "./SetParams";
export { SetStoreParams } from "./SetStoreParams";
export { SshPubKey } from "./SshPubKey";
export { SsidParams } from "./SsidParams";
export { Status } from "./Status";
export { UiParams } from "./UiParams";
export { UmountParams } from "./UmountParams";
export { UninstallParams } from "./UninstallParams";
export { UpdateParams } from "./UpdateParams";
export { UpdateProgress } from "./UpdateProgress";
export { UpdateSystemParams } from "./UpdateSystemParams";
export { UpdatingState } from "./UpdatingState";
export { VerifyCifsParams } from "./VerifyCifsParams";
export { VerifyParams } from "./VerifyParams";
export { VolumeId } from "./VolumeId";
export { WifiInfo } from "./WifiInfo";
export { ZramParams } from "./ZramParams";

View File

@@ -51,7 +51,6 @@ pub fn display_action_result(params: WithIoFormat<ActionParams>, result: ActionR
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ActionParams {
#[arg(id = "id")]
#[serde(rename = "id")]

View File

@@ -183,7 +183,6 @@ pub fn check_password_against_db(db: &DatabaseModel, password: &str) -> Result<(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct LoginParams {
password: Option<PasswordType>,
#[serde(default)]
@@ -226,7 +225,6 @@ pub async fn login_impl(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct LogoutParams {
#[ts(type = "string")]
session: InternedString,
@@ -320,7 +318,6 @@ fn display_sessions(params: WithIoFormat<ListParams>, arg: SessionList) {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ListParams {
#[arg(skip)]
#[ts(skip)]
@@ -357,7 +354,6 @@ impl AsLogoutSessionId for KillSessionId {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct KillParams {
ids: Vec<String>,
}
@@ -371,7 +367,6 @@ pub async fn kill(ctx: RpcContext, KillParams { ids }: KillParams) -> Result<(),
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ResetPasswordParams {
old_password: Option<PasswordType>,
new_password: Option<PasswordType>,

View File

@@ -33,7 +33,6 @@ use crate::version::VersionT;
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct BackupParams {
target_id: BackupTargetId,
#[arg(long = "old-password")]

View File

@@ -28,7 +28,6 @@ use crate::util::serde::IoFormat;
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct RestorePackageParams {
pub ids: Vec<PackageId>,
pub target_id: BackupTargetId,

View File

@@ -71,7 +71,6 @@ pub fn cifs() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct AddParams {
pub hostname: String,
pub path: PathBuf,
@@ -126,7 +125,6 @@ pub async fn add(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UpdateParams {
pub id: BackupTargetId,
pub hostname: String,
@@ -191,7 +189,6 @@ pub async fn update(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct RemoveParams {
pub id: BackupTargetId,
}

View File

@@ -247,7 +247,6 @@ fn display_backup_info(params: WithIoFormat<InfoParams>, info: BackupInfo) {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct InfoParams {
target_id: BackupTargetId,
password: String,
@@ -282,7 +281,6 @@ lazy_static::lazy_static! {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct MountParams {
target_id: BackupTargetId,
password: String,
@@ -318,7 +316,6 @@ pub async fn mount(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UmountParams {
target_id: Option<BackupTargetId>,
}

View File

@@ -129,7 +129,6 @@ pub enum MatchError {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ConfigParams {
pub id: PackageId,
}
@@ -160,7 +159,6 @@ pub async fn get(ctx: RpcContext, _: Empty, id: PackageId) -> Result<ConfigRes,
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub struct SetParams {
#[arg(long = "timeout")]
pub timeout: Option<crate::util::serde::Duration>,

View File

@@ -13,7 +13,6 @@ use crate::Error;
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ControlParams {
pub id: PackageId,
}

View File

@@ -219,7 +219,6 @@ async fn cli_dump(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct DumpParams {
#[arg(long = "include-private", short = 'p')]
#[serde(default)]
@@ -277,7 +276,6 @@ async fn cli_apply(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ApplyParams {
expr: String,
path: Option<PathBuf>,
@@ -316,7 +314,6 @@ pub fn put() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UiParams {
#[ts(type = "string")]
pointer: JsonPointer,

View File

@@ -46,7 +46,6 @@ pub struct DepInfo {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ConfigureParams {
dependent_id: PackageId,
dependency_id: PackageId,

View File

@@ -44,7 +44,6 @@ pub fn error(ctx: DiagnosticContext) -> Result<Arc<RpcError>, Error> {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct LogsParams {
#[ts(type = "number | null")]
limit: Option<usize>,

View File

@@ -26,7 +26,6 @@ pub fn inspect() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct HashParams {
path: PathBuf,
}
@@ -42,7 +41,6 @@ pub async fn hash(_: CliContext, HashParams { path }: HashParams) -> Result<Stri
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ManifestParams {
path: PathBuf,
#[arg(long = "no-verify")]
@@ -61,7 +59,6 @@ pub async fn manifest(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct InspectParams {
path: PathBuf,
#[arg(long = "no-verify")]
@@ -94,7 +91,6 @@ pub async fn icon(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct InstructionParams {
path: PathBuf,
#[arg(long = "no-verify")]

View File

@@ -106,7 +106,6 @@ impl std::fmt::Display for MinMax {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct InstallParams {
id: PackageId,
#[arg(short = 'm', long = "marketplace-url")]
@@ -397,7 +396,6 @@ pub async fn cli_install(ctx: CliContext, params: CliInstallParams) -> Result<()
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UninstallParams {
id: PackageId,
}

View File

@@ -83,7 +83,6 @@ use crate::util::serde::HandlerExtSerde;
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct EchoParams {
message: String,
}

View File

@@ -353,7 +353,6 @@ pub async fn list(ctx: RpcContext) -> Result<Vec<InternedString>, Error> {
}
#[derive(Deserialize, Serialize, Parser, TS)]
#[ts(export)]
pub struct RemoveParams {
#[ts(type = "string")]
pub guid: InternedString,
@@ -367,7 +366,6 @@ pub async fn remove(ctx: RpcContext, RemoveParams { guid }: RemoveParams) -> Res
}
#[derive(Deserialize, Serialize, Parser, TS)]
#[ts(export)]
pub struct ConnectParams {
#[ts(type = "string")]
pub guid: InternedString,

View File

@@ -64,7 +64,6 @@ pub fn dhcp() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UpdateParams {
interface: String,
}

View File

@@ -108,7 +108,6 @@ pub fn tor() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ResetParams {
#[arg(name = "wipe-state", short = 'w', long = "wipe-state")]
wipe_state: bool,
@@ -147,7 +146,6 @@ pub async fn list_services(ctx: RpcContext, _: Empty) -> Result<Vec<OnionAddress
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct LogsParams {
#[arg(short = 'l', long = "limit")]
#[ts(type = "number | null")]

View File

@@ -91,7 +91,6 @@ pub fn country() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct AddParams {
ssid: String,
password: String,
@@ -143,7 +142,6 @@ pub async fn add(ctx: RpcContext, AddParams { ssid, password }: AddParams) -> Re
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct SsidParams {
ssid: String,
}
@@ -408,7 +406,6 @@ pub async fn get_available(ctx: RpcContext, _: Empty) -> Result<Vec<WifiListOut>
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct SetCountryParams {
#[arg(value_parser = CountryCodeParser)]
#[ts(type = "string")]

View File

@@ -52,7 +52,6 @@ pub fn notification() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ListParams {
#[ts(type = "number | null")]
before: Option<u32>,
@@ -117,7 +116,6 @@ pub async fn list(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct DeleteParams {
#[ts(type = "number")]
id: u32,
@@ -134,7 +132,6 @@ pub async fn delete(ctx: RpcContext, DeleteParams { id }: DeleteParams) -> Resul
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct DeleteBeforeParams {
#[ts(type = "number")]
before: u32,
@@ -159,7 +156,6 @@ pub async fn delete_before(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct CreateParams {
package: Option<PackageId>,
level: NotificationLevel,

View File

@@ -116,7 +116,6 @@ async fn partition(disk: &mut DiskInfo, overwrite: bool) -> Result<OsPartitionIn
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ExecuteParams {
logicalname: PathBuf,
#[arg(short = 'o')]

View File

@@ -40,7 +40,6 @@ pub fn with_query_params(ctx: RpcContext, mut url: Url) -> Url {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct GetParams {
#[ts(type = "string")]
url: Url,

View File

@@ -69,7 +69,6 @@ fn inspect() -> ParentHandler<S9pkPath> {
}
#[derive(Deserialize, Serialize, Parser, TS)]
#[ts(export)]
struct AddImageParams {
id: ImageId,
image: String,
@@ -186,7 +185,6 @@ async fn add_image(
}
#[derive(Deserialize, Serialize, Parser, TS)]
#[ts(export)]
struct EditManifestParams {
expression: String,
}

View File

@@ -16,7 +16,6 @@ pub const SIG_CONTEXT: &[u8] = b"s9pk";
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct VerifyParams {
pub path: PathBuf,
}

View File

@@ -501,7 +501,6 @@ impl Actor for ServiceActor {
}
#[derive(Deserialize, Serialize, Parser, TS)]
#[ts(export)]
pub struct ConnectParams {
pub id: PackageId,
}

View File

@@ -102,7 +102,6 @@ async fn setup_init(
#[derive(Deserialize, Serialize, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub struct AttachParams {
#[serde(rename = "startOsPassword")]
password: Option<EncryptedWire>,
@@ -214,7 +213,6 @@ pub fn cifs() -> ParentHandler {
#[derive(Deserialize, Serialize, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub struct VerifyCifsParams {
hostname: String,
path: PathBuf,
@@ -258,7 +256,6 @@ pub enum RecoverySource {
#[derive(Deserialize, Serialize, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export)]
pub struct ExecuteParams {
start_os_logicalname: PathBuf,
start_os_password: EncryptedWire,

View File

@@ -107,7 +107,6 @@ pub fn ssh() -> ParentHandler {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct AddParams {
key: SshPubKey,
}
@@ -141,7 +140,6 @@ pub async fn add(ctx: RpcContext, AddParams { key }: AddParams) -> Result<SshKey
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct DeleteParams {
#[ts(type = "string")]
fingerprint: InternedString,

View File

@@ -77,7 +77,6 @@ pub async fn enable_zram() -> Result<(), Error> {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct ZramParams {
enable: bool,
}
@@ -140,7 +139,6 @@ fn display_governor_info(params: WithIoFormat<GovernorParams>, result: GovernorI
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct GovernorParams {
set: Option<Governor>,
}
@@ -235,7 +233,6 @@ pub async fn time(ctx: RpcContext, _: Empty) -> Result<TimeInfo, Error> {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct LogsParams {
#[arg(short = 'l', long = "limit")]
#[ts(type = "number | null")]
@@ -321,7 +318,6 @@ pub async fn logs_follow(
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct KernelLogsParams {
#[arg(short = 'l', long = "limit")]
#[ts(type = "number | null")]

View File

@@ -38,7 +38,6 @@ lazy_static! {
#[derive(Deserialize, Serialize, Parser, TS)]
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
#[ts(export)]
pub struct UpdateSystemParams {
#[ts(type = "string")]
marketplace_url: Url,

View File

@@ -1,5 +1,5 @@
import { Url } from '@start9labs/shared'
import { Manifest } from '../../../../core/startos/bindings/Manifest'
import { T } from '@start9labs/start-sdk'
export type StoreURL = string
export type StoreName = string
@@ -26,7 +26,7 @@ export interface MarketplacePkg {
icon: Url
license: Url
instructions: Url
manifest: Manifest
manifest: T.Manifest
categories: string[]
versions: string[]
dependencyMetadata: {

View File

@@ -18,7 +18,7 @@ import { ActionSuccessPage } from 'src/app/modals/action-success/action-success.
import { hasCurrentDeps } from 'src/app/util/has-deps'
import { getAllPackages, getManifest } from 'src/app/util/get-package-data'
import { ActionMetadata } from '@start9labs/start-sdk/cjs/sdk/lib/types'
import { Status } from '../../../../../../../../core/startos/bindings/Status'
import { T } from '@start9labs/start-sdk'
@Component({
selector: 'app-actions',
@@ -42,7 +42,7 @@ export class AppActionsPage {
) {}
async handleAction(
status: Status,
status: T.Status,
action: { key: string; value: ActionMetadata },
) {
if (

View File

@@ -7,11 +7,9 @@ import { DataModel } from 'src/app/services/patch-db/data-model'
import { PatchDB } from 'patch-db-client'
import { QRComponent } from 'src/app/components/qr/qr.component'
import { map } from 'rxjs'
import { types as T } from '@start9labs/start-sdk'
import { ServiceInterface } from '../../../../../../../../core/startos/bindings/ServiceInterface'
import { ServiceInterfaceWithHostInfo } from '../../../../../../../../core/startos/bindings/ServiceInterfaceWithHostInfo'
import { T } from '@start9labs/start-sdk'
type MappedInterface = ServiceInterface & {
type MappedInterface = T.ServiceInterface & {
addresses: MappedAddress[]
}
type MappedAddress = {
@@ -101,7 +99,7 @@ export class AppInterfacesItemComponent {
}
function getAddresses(
serviceInterface: ServiceInterfaceWithHostInfo,
serviceInterface: T.ServiceInterfaceWithHostInfo,
): MappedAddress[] {
const host = serviceInterface.hostInfo
const addressInfo = serviceInterface.addressInfo

View File

@@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
import { PkgInfo } from 'src/app/util/get-package-info'
import { UiLauncherService } from 'src/app/services/ui-launcher.service'
import { MainStatus } from '../../../../../../../../../core/startos/bindings/MainStatus'
import { T } from '@start9labs/start-sdk'
@Component({
selector: 'app-list-pkg',
@@ -15,7 +15,7 @@ export class AppListPkgComponent {
constructor(private readonly launcherService: UiLauncherService) {}
get pkgMainStatus(): MainStatus {
get pkgMainStatus(): T.MainStatus {
return (
this.pkg.entry.status.main || {
status: 'stopped',

View File

@@ -25,7 +25,7 @@ import {
isRestoring,
isUpdating,
} from 'src/app/util/get-package-data'
import { Manifest } from '../../../../../../../../core/startos/bindings/Manifest'
import { T } from '@start9labs/start-sdk'
export interface DependencyInfo {
id: string
@@ -91,7 +91,7 @@ export class AppShowPage {
private getDepValues(
pkg: PackageDataEntry,
manifest: Manifest,
manifest: T.Manifest,
depId: string,
depErrors: PkgDependencyErrors,
): DependencyInfo {
@@ -120,7 +120,7 @@ export class AppShowPage {
private getDepErrors(
pkg: PackageDataEntry,
manifest: Manifest,
manifest: T.Manifest,
depId: string,
depErrors: PkgDependencyErrors,
) {
@@ -162,7 +162,7 @@ export class AppShowPage {
private async fixDep(
pkg: PackageDataEntry,
pkgManifest: Manifest,
pkgManifest: T.Manifest,
action: 'install' | 'update' | 'configure',
id: string,
): Promise<void> {
@@ -177,7 +177,7 @@ export class AppShowPage {
private async installDep(
pkg: PackageDataEntry,
pkgManifest: Manifest,
pkgManifest: T.Manifest,
depId: string,
): Promise<void> {
const dependentInfo: DependentInfo = {
@@ -196,7 +196,7 @@ export class AppShowPage {
}
private async configureDep(
pkgManifest: Manifest,
pkgManifest: T.Manifest,
dependencyId: string,
): Promise<void> {
const dependentInfo: DependentInfo = {

View File

@@ -1,9 +1,9 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
import { ModalController, ToastController } from '@ionic/angular'
import { copyToClipboard, MarkdownComponent } from '@start9labs/shared'
import { T } from '@start9labs/start-sdk'
import { from } from 'rxjs'
import { ApiService } from 'src/app/services/api/embassy-api.service'
import { Manifest } from '../../../../../../../../../../core/startos/bindings/Manifest'
@Component({
selector: 'app-show-additional',
@@ -12,7 +12,7 @@ import { Manifest } from '../../../../../../../../../../core/startos/bindings/Ma
})
export class AppShowAdditionalComponent {
@Input()
manifest!: Manifest
manifest!: T.Manifest
constructor(
private readonly modalCtrl: ModalController,

View File

@@ -1,6 +1,6 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
import { T } from '@start9labs/start-sdk'
import { ConnectionService } from 'src/app/services/connection.service'
import { HealthCheckResult } from '../../../../../../../../../../core/startos/bindings/HealthCheckResult'
@Component({
selector: 'app-show-health-checks',
@@ -10,17 +10,17 @@ import { HealthCheckResult } from '../../../../../../../../../../core/startos/bi
})
export class AppShowHealthChecksComponent {
@Input()
healthChecks!: Record<string, HealthCheckResult>
healthChecks!: Record<string, T.HealthCheckResult>
readonly connected$ = this.connectionService.connected$
constructor(private readonly connectionService: ConnectionService) {}
isLoading(result: HealthCheckResult['result']): boolean {
isLoading(result: T.HealthCheckResult['result']): boolean {
return result === 'starting' || result === 'loading'
}
isReady(result: HealthCheckResult['result']): boolean {
isReady(result: T.HealthCheckResult['result']): boolean {
return result !== 'failure' && result !== 'loading'
}

View File

@@ -1,5 +1,5 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
import { FullProgress } from '../../../../../../../../../../core/startos/bindings/FullProgress'
import { T } from '@start9labs/start-sdk'
@Component({
selector: 'app-show-progress',
@@ -9,5 +9,5 @@ import { FullProgress } from '../../../../../../../../../../core/startos/binding
})
export class AppShowProgressComponent {
@Input()
phases!: FullProgress['phases']
phases!: T.FullProgress['phases']
}

View File

@@ -20,8 +20,7 @@ import {
getAllPackages,
} from 'src/app/util/get-package-data'
import { PatchDB } from 'patch-db-client'
import { Status } from '../../../../../../../../../../core/startos/bindings/Status'
import { Manifest } from '../../../../../../../../../../core/startos/bindings/Manifest'
import { T } from '@start9labs/start-sdk'
@Component({
selector: 'app-show-status',
@@ -57,11 +56,11 @@ export class AppShowStatusComponent {
return this.pkg.serviceInterfaces
}
get pkgStatus(): Status {
get pkgStatus(): T.Status {
return this.pkg.status
}
get manifest(): Manifest {
get manifest(): T.Manifest {
return getManifest(this.pkg)
}

View File

@@ -1,11 +1,11 @@
import { Pipe, PipeTransform } from '@angular/core'
import { HealthCheckResult } from '../../../../../../../../../core/startos/bindings/HealthCheckResult'
import { T } from '@start9labs/start-sdk'
@Pipe({
name: 'healthColor',
})
export class HealthColorPipe implements PipeTransform {
transform(val: HealthCheckResult['result']): string {
transform(val: T.HealthCheckResult['result']): string {
switch (val) {
case 'success':
return 'success'

View File

@@ -11,7 +11,7 @@ import { ModalService } from 'src/app/services/modal.service'
import { ApiService } from 'src/app/services/api/embassy-api.service'
import { from, map, Observable } from 'rxjs'
import { PatchDB } from 'patch-db-client'
import { Manifest } from '../../../../../../../../../core/startos/bindings/Manifest'
import { T } from '@start9labs/start-sdk'
export interface Button {
title: string
@@ -99,7 +99,7 @@ export class ToButtonsPipe implements PipeTransform {
]
}
private async presentModalInstructions(manifest: Manifest) {
private async presentModalInstructions(manifest: T.Manifest) {
this.apiService
.setDbValue<boolean>(['ack-instructions', manifest.id], true)
.catch(e => console.error('Failed to mark instructions as seen', e))

View File

@@ -4,8 +4,7 @@ import { isEmptyObject } from '@start9labs/shared'
import { map, startWith } from 'rxjs/operators'
import { PatchDB } from 'patch-db-client'
import { Observable } from 'rxjs'
import { HealthCheckResult } from '../../../../../../../../../core/startos/bindings/HealthCheckResult'
import { Manifest } from '../../../../../../../../../core/startos/bindings/Manifest'
import { T } from '@start9labs/start-sdk'
@Pipe({
name: 'toHealthChecks',
@@ -14,8 +13,8 @@ export class ToHealthChecksPipe implements PipeTransform {
constructor(private readonly patch: PatchDB<DataModel>) {}
transform(
manifest: Manifest,
): Observable<Record<string, HealthCheckResult | null> | null> {
manifest: T.Manifest,
): Observable<Record<string, T.HealthCheckResult | null> | null> {
return this.patch.watch$('packageData', manifest.id, 'status', 'main').pipe(
map(main => {
return main.status === 'running' && !isEmptyObject(main.health)

View File

@@ -8,7 +8,7 @@ import { PatchDB } from 'patch-db-client'
import { take } from 'rxjs/operators'
import { DataModel } from 'src/app/services/patch-db/data-model'
import { Observable } from 'rxjs'
import { MainStatus } from '../../../../../../../../../core/startos/bindings/MainStatus'
import { T } from '@start9labs/start-sdk'
@Component({
selector: 'backing-up',
@@ -30,7 +30,7 @@ export class BackingUpComponent {
name: 'pkgMainStatus',
})
export class PkgMainStatusPipe implements PipeTransform {
transform(pkgId: string): Observable<MainStatus['status']> {
transform(pkgId: string): Observable<T.MainStatus['status']> {
return this.patch.watch$('packageData', pkgId, 'status', 'main', 'status')
}

View File

@@ -4,7 +4,7 @@ import { ApiService } from 'src/app/services/api/embassy-api.service'
import { ConfigService } from 'src/app/services/config.service'
import cbor from 'cbor'
import { ErrorToastService } from '@start9labs/shared'
import { Manifest } from '../../../../../../../../core/startos/bindings/Manifest'
import { T } from '@start9labs/start-sdk'
interface Positions {
[key: string]: [bigint, bigint] // [position, length]
@@ -21,7 +21,7 @@ const VERSION = new Uint8Array([1])
export class SideloadPage {
isMobile = isPlatform(window, 'ios') || isPlatform(window, 'android')
toUpload: {
manifest: Manifest | null
manifest: T.Manifest | null
icon: string | null
file: File | null
} = {

View File

@@ -24,7 +24,7 @@ import {
isUpdating,
} from 'src/app/util/get-package-data'
import { dryUpdate } from 'src/app/util/dry-update'
import { Manifest } from '../../../../../../../core/startos/bindings/Manifest'
import { T } from '@start9labs/start-sdk'
interface UpdatesData {
hosts: StoreIdentity[]
@@ -70,7 +70,7 @@ export class UpdatesPage {
})
}
async tryUpdate(manifest: Manifest, url: string, e: Event): Promise<void> {
async tryUpdate(manifest: T.Manifest, url: string, e: Event): Promise<void> {
e.stopPropagation()
const { id, version } = manifest
@@ -86,7 +86,7 @@ export class UpdatesPage {
}
}
private async dryInstall(manifest: Manifest, url: string) {
private async dryInstall(manifest: T.Manifest, url: string) {
const { id, version, title } = manifest
const breakages = dryUpdate(

View File

@@ -1,11 +1,11 @@
import { Pipe, PipeTransform } from '@angular/core'
import { Progress } from '../../../../../../../core/startos/bindings/Progress'
import { T } from '@start9labs/start-sdk'
@Pipe({
name: 'installingProgressString',
})
export class InstallingProgressDisplayPipe implements PipeTransform {
transform(progress: Progress): string {
transform(progress: T.Progress): string {
if (progress === true) return 'finalizing'
if (progress === false || !progress.total) return 'unknown %'
const percentage = Math.round((100 * progress.done) / progress.total)
@@ -18,7 +18,7 @@ export class InstallingProgressDisplayPipe implements PipeTransform {
name: 'installingProgress',
})
export class InstallingProgressPipe implements PipeTransform {
transform(progress: Progress): number | null {
transform(progress: T.Progress): number | null {
if (progress === true) return 1
if (progress === false || !progress.total) return null
return Number((progress.done / progress.total).toFixed(2))

View File

@@ -1,7 +1,6 @@
import { Pipe, PipeTransform } from '@angular/core'
import { ConfigService } from '../../services/config.service'
import { PackageState } from '../../../../../../../core/startos/bindings/PackageState'
import { MainStatus } from '../../../../../../../core/startos/bindings/MainStatus'
import { T } from '@start9labs/start-sdk'
@Pipe({
name: 'isLaunchable',
@@ -10,8 +9,8 @@ export class LaunchablePipe implements PipeTransform {
constructor(private configService: ConfigService) {}
transform(
state: PackageState['state'],
status: MainStatus['status'],
state: T.PackageState['state'],
status: T.MainStatus['status'],
): boolean {
return this.configService.isLaunchable(state, status)
}

View File

@@ -2,7 +2,7 @@ import { Pipe, PipeTransform } from '@angular/core'
import { PackageDataEntry } from '../../services/patch-db/data-model'
import { hasUi } from '../../services/config.service'
import { getManifest } from 'src/app/util/get-package-data'
import { Manifest } from '../../../../../../../core/startos/bindings/Manifest'
import { T } from '@start9labs/start-sdk'
@Pipe({
name: 'hasUi',
@@ -17,7 +17,7 @@ export class UiPipe implements PipeTransform {
name: 'toManifest',
})
export class ToManifestPipe implements PipeTransform {
transform(pkg: PackageDataEntry): Manifest {
transform(pkg: PackageDataEntry): T.Manifest {
return getManifest(pkg)
}
}

View File

@@ -6,11 +6,10 @@ import { Metric, NotificationLevel, RR, ServerNotifications } from './api.types'
import { BTC_ICON, LND_ICON, PROXY_ICON } from './api-icons'
import { DependencyMetadata, MarketplacePkg } from '@start9labs/marketplace'
import { Log } from '@start9labs/shared'
import { ServerStatus } from '../../../../../../../core/startos/bindings/ServerStatus'
import { Manifest } from '../../../../../../../core/startos/bindings/Manifest'
import { T } from '@start9labs/start-sdk'
export module Mock {
export const ServerUpdated: ServerStatus = {
export const ServerUpdated: T.ServerStatus = {
backupProgress: null,
updateProgress: null,
updated: true,
@@ -42,7 +41,7 @@ export module Mock {
'0.19.0': 'release notes for Bitcoin 0.19.0',
}
export const MockManifestBitcoind: Manifest = {
export const MockManifestBitcoind: T.Manifest = {
id: 'bitcoind',
title: 'Bitcoin Core',
version: '0.21.0',
@@ -80,7 +79,7 @@ export module Mock {
},
}
export const MockManifestLnd: Manifest = {
export const MockManifestLnd: T.Manifest = {
id: 'lnd',
title: 'Lightning Network Daemon',
version: '0.11.1',
@@ -128,7 +127,7 @@ export module Mock {
},
}
export const MockManifestBitcoinProxy: Manifest = {
export const MockManifestBitcoinProxy: T.Manifest = {
id: 'btc-rpc-proxy',
title: 'Bitcoin Proxy',
version: '0.2.2',

View File

@@ -4,8 +4,7 @@ import { PackagePropertiesVersioned } from 'src/app/util/properties.util'
import { ConfigSpec } from 'src/app/pkg-config/config-types'
import { DataModel } from 'src/app/services/patch-db/data-model'
import { StartOSDiskInfo, LogsRes, ServerLogsReq } from '@start9labs/shared'
import { HealthCheckResult } from '../../../../../../../core/startos/bindings/HealthCheckResult'
import { Manifest } from '../../../../../../../core/startos/bindings/Manifest'
import { T } from '@start9labs/start-sdk'
export module RR {
// DB
@@ -245,7 +244,7 @@ export module RR {
}
export type SideloadPackageReq = {
manifest: Manifest
manifest: T.Manifest
icon: string // base64
}
export type SideloadPacakgeRes = string //guid
@@ -515,7 +514,7 @@ export interface DependencyErrorConfigUnsatisfied {
export interface DependencyErrorHealthChecksFailed {
type: 'healthChecksFailed'
check: HealthCheckResult
check: T.HealthCheckResult
}
export interface DependencyErrorTransitive {

View File

@@ -37,10 +37,9 @@ import { WebSocketSubjectConfig } from 'rxjs/webSocket'
import { AuthService } from '../auth.service'
import { ConnectionService } from '../connection.service'
import { StoreInfo } from '@start9labs/marketplace'
import { FullProgress } from '../../../../../../../core/startos/bindings/FullProgress'
import { ServerStatus } from '../../../../../../../core/startos/bindings/ServerStatus'
import { T } from '@start9labs/start-sdk'
const PROGRESS: FullProgress = {
const PROGRESS: T.FullProgress = {
overall: {
done: 0,
total: 120,

Some files were not shown because too many files have changed in this diff Show More