mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
update rust types to match sdk changes
This commit is contained in:
4
core/startos/bindings/ActionMetadata.ts
Normal file
4
core/startos/bindings/ActionMetadata.ts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
import type { AllowedStatuses } from "./AllowedStatuses";
|
||||||
|
|
||||||
|
export interface ActionMetadata { name: string, description: string, warning: string | null, disabled: boolean, input: {[key: string]: any}, allowedStatuses: AllowedStatuses, group: string | null, }
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export type AllowedStatuses = "only-running" | "only-stopped" | "any" | "disabled";
|
export type AllowedStatuses = "only-running" | "only-stopped" | "any";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { AllowedStatuses } from "./AllowedStatuses";
|
import type { ActionMetadata } from "./ActionMetadata";
|
||||||
|
|
||||||
export interface ExportActionParams { name: string, description: string, id: string, input: {[key: string]: any}, allowedStatuses: AllowedStatuses, group: string | null, }
|
export interface ExportActionParams { id: string, metadata: ActionMetadata, }
|
||||||
@@ -260,16 +260,24 @@ enum AllowedStatuses {
|
|||||||
OnlyRunning,
|
OnlyRunning,
|
||||||
OnlyStopped,
|
OnlyStopped,
|
||||||
Any,
|
Any,
|
||||||
Disabled,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
|
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
|
||||||
#[ts(export)]
|
#[ts(export)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
struct ExportActionParams {
|
struct ExportActionParams {
|
||||||
|
#[ts(type = "string")]
|
||||||
|
id: ActionId,
|
||||||
|
metadata: ActionMetadata
|
||||||
|
}
|
||||||
|
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, TS)]
|
||||||
|
#[ts(export)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
struct ActionMetadata {
|
||||||
name: String,
|
name: String,
|
||||||
description: String,
|
description: String,
|
||||||
id: String,
|
warning: Option<String>,
|
||||||
|
disabled: bool,
|
||||||
#[ts(type = "{[key: string]: any}")]
|
#[ts(type = "{[key: string]: any}")]
|
||||||
input: Value,
|
input: Value,
|
||||||
allowed_statuses: AllowedStatuses,
|
allowed_statuses: AllowedStatuses,
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ export type Effects = {
|
|||||||
*
|
*
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
exportAction(options: ActionMetadata): Promise<void>
|
exportAction(options: { id: string; metadata: ActionMetadata }): Promise<void>
|
||||||
/**
|
/**
|
||||||
* Remove an action that was exported. Used problably during main or during setConfig.
|
* Remove an action that was exported. Used problably during main or during setConfig.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user