mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
chore: Add some of the fixes to make the build work !!!
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// 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 interface CreateOverlayedImageParams { imageId: ImageId, }
|
||||
export interface CreateOverlayedImageParams { imageId: string, }
|
||||
@@ -1,4 +1,3 @@
|
||||
// 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 interface DestroyOverlayedImageParams { imageId: ImageId, guid: string, }
|
||||
export interface DestroyOverlayedImageParams { imageId: string , guid: string, }
|
||||
@@ -1,5 +1,3 @@
|
||||
// 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 interface ExecuteAction { serviceId: PackageId | null, actionId: ActionId, input: any, }
|
||||
export interface ExecuteAction { serviceId: string | null, actionId: string, input: any, }
|
||||
3
core/startos/bindings/ExposedUI.ts
Normal file
3
core/startos/bindings/ExposedUI.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface ExposedUI { path: string, title: string, description: string | null, masked: boolean | null, copyable: boolean | null, qr: boolean | null, }
|
||||
@@ -1,5 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Callback } from "./Callback";
|
||||
import type { PackageId } from "./PackageId";
|
||||
|
||||
export interface GetServiceInterfaceParams { packageId: PackageId | null, serviceInterfaceId: string, callback: Callback, }
|
||||
export interface GetServiceInterfaceParams { packageId: string | null, serviceInterfaceId: string, callback: Callback, }
|
||||
@@ -1,4 +1,3 @@
|
||||
// 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 interface GetStoreParams { packageId: PackageId | null, path: string, }
|
||||
export interface GetStoreParams { packageId: string | null, path: string, }
|
||||
3
core/startos/bindings/HealthCheckString.ts
Normal file
3
core/startos/bindings/HealthCheckString.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type HealthCheckString = "passing" | "disabled" | "starting" | "warning" | "failure";
|
||||
@@ -1,4 +1,3 @@
|
||||
// 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 interface ParamsMaybePackageId { packageId: PackageId | null, }
|
||||
export interface ParamsMaybePackageId { packageId: string | null, }
|
||||
@@ -1,4 +1,3 @@
|
||||
// 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 interface ParamsPackageId { packageId: PackageId, }
|
||||
export interface ParamsPackageId { packageId: string, }
|
||||
@@ -1,5 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { HealthCheckId } from "./HealthCheckId";
|
||||
import type { HealthCheckString } from "./HealthCheckString";
|
||||
|
||||
export interface SetHealth { name: HealthCheckId, status: HealthCheckString, message: string | null, }
|
||||
export interface SetHealth { name: string, status: HealthCheckString, message: string | null, }
|
||||
@@ -531,6 +531,7 @@ pub struct ExposedDependent {
|
||||
}
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, HasModel, ts_rs::TS)]
|
||||
#[model = "Model<Self>"]
|
||||
#[ts(export)]
|
||||
pub struct ExposedUI {
|
||||
#[ts(type = "string")]
|
||||
pub path: JsonPointer,
|
||||
|
||||
@@ -222,6 +222,7 @@ async fn bind(_: AnyContext, BindParams { .. }: BindParams) -> Result<Value, Err
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
struct GetServiceInterfaceParams {
|
||||
#[ts(type = "string | null")]
|
||||
package_id: Option<PackageId>,
|
||||
service_interface_id: String,
|
||||
callback: Callback,
|
||||
@@ -375,6 +376,7 @@ async fn get_ssl_key(
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
struct GetStoreParams {
|
||||
#[ts(type = "string | null")]
|
||||
package_id: Option<PackageId>,
|
||||
#[ts(type = "string")]
|
||||
path: JsonPointer,
|
||||
@@ -494,10 +496,11 @@ async fn expose_ui(
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Parser, TS)]
|
||||
#[ts(export)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct ParamsPackageId {
|
||||
#[ts(type = "string")]
|
||||
package_id: PackageId,
|
||||
}
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Parser, TS)]
|
||||
@@ -505,6 +508,7 @@ struct ParamsPackageId {
|
||||
#[command(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
struct ParamsMaybePackageId {
|
||||
#[ts(type = "string | null")]
|
||||
package_id: Option<PackageId>,
|
||||
}
|
||||
|
||||
@@ -523,7 +527,9 @@ async fn exists(context: EffectContext, params: ParamsPackageId) -> Result<Value
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
struct ExecuteAction {
|
||||
#[ts(type = "string | null")]
|
||||
service_id: Option<PackageId>,
|
||||
#[ts(type = "string")]
|
||||
action_id: ActionId,
|
||||
#[ts(type = "any")]
|
||||
input: Value,
|
||||
@@ -584,11 +590,11 @@ async fn stopped(context: EffectContext, params: ParamsMaybePackageId) -> Result
|
||||
.de()?;
|
||||
Ok(json!(matches!(package, MainStatus::Stopped)))
|
||||
}
|
||||
async fn running(context: EffectContext, params: ParamsMaybePackageId) -> Result<Value, Error> {
|
||||
async fn running(context: EffectContext, params: ParamsPackageId) -> Result<Value, Error> {
|
||||
dbg!("Starting the running {params:?}");
|
||||
let context = context.deref()?;
|
||||
let peeked = context.ctx.db.peek().await;
|
||||
let package_id = params.package_id.unwrap_or_else(|| context.id.clone());
|
||||
let package_id = params.package_id;
|
||||
let package = peeked
|
||||
.as_public()
|
||||
.as_package_data()
|
||||
@@ -701,6 +707,7 @@ async fn set_main_status(context: EffectContext, params: SetMainStatus) -> Resul
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
struct SetHealth {
|
||||
#[ts(type = "string")]
|
||||
name: HealthCheckId,
|
||||
status: HealthCheckString,
|
||||
message: Option<String>,
|
||||
@@ -771,6 +778,7 @@ async fn set_health(
|
||||
#[command(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
pub struct DestroyOverlayedImageParams {
|
||||
#[ts(type = "string ")]
|
||||
image_id: ImageId,
|
||||
#[ts(type = "string")]
|
||||
guid: InternedString,
|
||||
@@ -799,6 +807,7 @@ pub async fn destroy_overlayed_image(
|
||||
#[command(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
pub struct CreateOverlayedImageParams {
|
||||
#[ts(type = "string")]
|
||||
image_id: ImageId,
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ impl std::fmt::Display for HealthCheckResult {
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, ts_rs::TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
pub enum HealthCheckString {
|
||||
Passing,
|
||||
Disabled,
|
||||
|
||||
Reference in New Issue
Block a user