mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
chore: Fix the effects
This commit is contained in:
@@ -1,21 +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.
|
||||||
import type { ExposedUI } from "./ExposedUI";
|
|
||||||
|
|
||||||
export type ExposeUiParams =
|
export type ExposeUiParams = { "type": "object", value: {[key: string]: ExposeUiParams}, } | { "type": "string", path: string, description: string | null, masked: boolean, copyable: boolean | null, qr: boolean | null, };
|
||||||
| {
|
|
||||||
type: "object";
|
|
||||||
value: { [k: string]: ExposeUiParams };
|
|
||||||
}
|
|
||||||
| {
|
|
||||||
type: "string";
|
|
||||||
/** The path to the value in the Store. [JsonPath](https://jsonpath.com/) */
|
|
||||||
path: string;
|
|
||||||
/** A human readable description or explanation of the value */
|
|
||||||
description: string | null;
|
|
||||||
/** (string/number only) Whether or not to mask the value, for example, when displaying a password */
|
|
||||||
masked: boolean;
|
|
||||||
/** (string/number only) Whether or not to include a button for copying the value to clipboard */
|
|
||||||
copyable: boolean | null;
|
|
||||||
/** (string/number only) Whether or not to include a button for displaying the value as a QR code */
|
|
||||||
qr: boolean | null;
|
|
||||||
};
|
|
||||||
@@ -695,9 +695,10 @@ async fn expose_for_dependents(
|
|||||||
#[ts(export)]
|
#[ts(export)]
|
||||||
enum ExposeUiParams {
|
enum ExposeUiParams {
|
||||||
Object {
|
Object {
|
||||||
value: Record<String, ExposeUiParams>,
|
#[ts(type = "{[key: string]: ExposeUiParams}")]
|
||||||
|
value: OrdMap<String, ExposeUiParams>,
|
||||||
},
|
},
|
||||||
r#String {
|
String {
|
||||||
path: String,
|
path: String,
|
||||||
description: Option<String>,
|
description: Option<String>,
|
||||||
masked: bool,
|
masked: bool,
|
||||||
@@ -706,25 +707,23 @@ enum ExposeUiParams {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn expose_ui(
|
async fn expose_ui(context: EffectContext, params: ExposeUiParams) -> Result<(), Error> {
|
||||||
context: EffectContext,
|
todo!()
|
||||||
ExposeUiParams { paths }: ExposeUiParams,
|
// let context = context.deref()?;
|
||||||
) -> Result<(), Error> {
|
// let package_id = context.id.clone();
|
||||||
let context = context.deref()?;
|
// context
|
||||||
let package_id = context.id.clone();
|
// .ctx
|
||||||
context
|
// .db
|
||||||
.ctx
|
// .mutate(|db| {
|
||||||
.db
|
// db.as_public_mut()
|
||||||
.mutate(|db| {
|
// .as_package_data_mut()
|
||||||
db.as_public_mut()
|
// .as_idx_mut(&package_id)
|
||||||
.as_package_data_mut()
|
// .or_not_found(&package_id)?
|
||||||
.as_idx_mut(&package_id)
|
// .as_store_exposed_ui_mut()
|
||||||
.or_not_found(&package_id)?
|
// .ser(&paths)
|
||||||
.as_store_exposed_ui_mut()
|
// })
|
||||||
.ser(&paths)
|
// .await?;
|
||||||
})
|
// Ok(())
|
||||||
.await?;
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Parser, TS)]
|
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, Parser, TS)]
|
||||||
#[ts(export)]
|
#[ts(export)]
|
||||||
|
|||||||
Reference in New Issue
Block a user