v0.3.8-pre.006
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// file: crates/ksp-app-store-desk/src/dto_common.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Common Tauri DTOs shared by the Store Desk scaffold shell.
|
||||
//! Common Tauri DTOs shared by the Store Desk shell and Store runtime Overview.
|
||||
|
||||
use ts_rs::TS; // rust-rules: trait-import
|
||||
|
||||
@@ -30,7 +30,7 @@ impl crate::CommandErrorDto {
|
||||
}
|
||||
}
|
||||
|
||||
/// Safe scaffold/runtime snapshot exposed to the Store Desk shell.
|
||||
/// Safe shell/Config/Logging snapshot exposed to Store Desk diagnostics.
|
||||
#[derive(Clone, Debug, serde::Serialize, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "../frontend/ts/bindings/ksp_app_store_desk/dto_common/ShellStatusDto.ts")]
|
||||
@@ -49,6 +49,37 @@ pub(crate) struct ShellStatusDto {
|
||||
pub(crate) startup_diagnostic: std::option::Option<CommandErrorDto>,
|
||||
}
|
||||
|
||||
/// Backend-neutral Store runtime and health projection used by the Overview screen.
|
||||
#[derive(Clone, Debug, serde::Serialize, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "../frontend/ts/bindings/ksp_app_store_desk/dto_common/StoreRuntimeStatusDto.ts")]
|
||||
pub(crate) struct StoreRuntimeStatusDto {
|
||||
/// Stable selected Store backend kind, when configuration resolution reached that phase.
|
||||
pub(crate) backend_kind: std::option::Option<String>,
|
||||
/// Safe Store startup/health diagnostic, when present.
|
||||
pub(crate) diagnostic: std::option::Option<CommandErrorDto>,
|
||||
/// Portable Store health code (`ready`, `not_ready`, `unavailable`, `closed`, or `unknown`).
|
||||
pub(crate) health_state: String,
|
||||
/// Applied migration version rendered as an exact decimal string.
|
||||
pub(crate) migration_version_decimal: std::option::Option<String>,
|
||||
/// Logical Store network, when configuration resolution reached that phase.
|
||||
pub(crate) network: std::option::Option<String>,
|
||||
/// Number of embedded migrations newer than the applied migration version.
|
||||
pub(crate) pending_migration_count: u32,
|
||||
/// Number of currently available pooled backend objects.
|
||||
pub(crate) pool_available: u32,
|
||||
/// Configured pool capacity.
|
||||
pub(crate) pool_capacity: u32,
|
||||
/// Current pool size.
|
||||
pub(crate) pool_size: u32,
|
||||
/// Number of tasks currently waiting for pool capacity.
|
||||
pub(crate) pool_waiting: u32,
|
||||
/// Store profile selected by the Store Desk composite.
|
||||
pub(crate) profile_id: std::option::Option<String>,
|
||||
/// Whether the application currently retains an opened Store facade.
|
||||
pub(crate) store_open: bool,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "../unit_tests/dto_common.rs"]
|
||||
mod tests;
|
||||
|
||||
Reference in New Issue
Block a user