v0.3.7-pre.012
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-backfill-desk/src/dto_common.rs
|
||||
// version: 5
|
||||
// version: 6
|
||||
|
||||
//! Common Tauri DTOs shared by the Backfill Desk shell.
|
||||
|
||||
@@ -21,6 +21,45 @@ pub(crate) struct BackfillHttpRouteOptionDto {
|
||||
pub(crate) role: String,
|
||||
}
|
||||
|
||||
/// Safe Program ID entry exposed only to populate the free-form address autocomplete dataset.
|
||||
///
|
||||
/// Every value is derived from the canonical `ksp-core-lib` registry. The frontend remains free to submit any valid Solana address; this DTO is advisory only.
|
||||
#[derive(Clone, Debug, serde::Serialize, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "../frontend/ts/bindings/ksp_app_backfill_desk/dto_common/ProgramIdAutocompleteOptionDto.ts")]
|
||||
pub(crate) struct ProgramIdAutocompleteOptionDto {
|
||||
/// Stable KSP machine-readable Program ID code.
|
||||
pub(crate) code: String,
|
||||
/// Broad functional domain from the canonical registry.
|
||||
pub(crate) domain: String,
|
||||
/// Functional family from the canonical registry.
|
||||
pub(crate) family: String,
|
||||
/// Human-readable program name.
|
||||
pub(crate) name: String,
|
||||
/// Canonical Base58 Program ID used as the HTML datalist value.
|
||||
pub(crate) program_id: String,
|
||||
/// Owning protocol/project label from the canonical registry.
|
||||
pub(crate) protocol: String,
|
||||
}
|
||||
|
||||
/// Projects the canonical KSP Program ID registry to the safe autocomplete dataset.
|
||||
#[must_use]
|
||||
pub(crate) fn program_id_autocomplete_options() -> std::vec::Vec<ProgramIdAutocompleteOptionDto> {
|
||||
let entries = ksp_core_lib::entries();
|
||||
let mut options = std::vec::Vec::with_capacity(entries.len());
|
||||
for entry in entries {
|
||||
options.push(ProgramIdAutocompleteOptionDto {
|
||||
code: entry.code().to_owned(),
|
||||
domain: entry.domain().to_owned(),
|
||||
family: entry.family().to_owned(),
|
||||
name: entry.name().to_owned(),
|
||||
program_id: entry.program_id().to_owned(),
|
||||
protocol: entry.protocol().to_owned(),
|
||||
});
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
/// Safe Backfill Desk options contract combining readiness, HTTP routes and Job-owned campaign bounds.
|
||||
///
|
||||
/// Endpoint URLs, credentials and physical routing details are intentionally absent.
|
||||
@@ -36,6 +75,8 @@ pub(crate) struct BackfillDeskOptionsDto {
|
||||
pub(crate) limits: crate::BackfillRequestLimitsDto,
|
||||
/// Whether the Transport and Store readiness gates jointly permit later Backfill composition.
|
||||
pub(crate) composition_ready: bool,
|
||||
/// Canonical KSP Program IDs exposed as a frontend autocomplete dataset; never an allow-list.
|
||||
pub(crate) program_id_options: std::vec::Vec<ProgramIdAutocompleteOptionDto>,
|
||||
/// Distinct enabled HTTP cluster labels selected by the active Transport profile.
|
||||
pub(crate) configured_networks: std::vec::Vec<String>,
|
||||
/// Whether the selected Store network exactly matches the one coherent Transport network.
|
||||
|
||||
Reference in New Issue
Block a user