// file: crates/ksp-app-wallet-desk/src/wallet_metadata.rs // version: 1 //! OWNER-only protected metadata administration contracts for Wallet Desk. use ts_rs::TS; // rust-rules: trait-import /// OWNER request that updates or clears the protected internal Wallet alias. #[derive(serde::Deserialize, TS)] #[serde(rename_all = "camelCase")] #[ts(export, export_to = "../frontend/ts/bindings/ksp_app_wallet_desk/wallet_metadata/WalletAliasUpdateRequestDto.ts")] pub(crate) struct WalletAliasUpdateRequestDto { /// New protected alias, or `None` to clear it. pub(crate) alias: std::option::Option, } /// OWNER request that appends one protected Wallet note. #[derive(serde::Deserialize, TS)] #[serde(rename_all = "camelCase")] #[ts(export, export_to = "../frontend/ts/bindings/ksp_app_wallet_desk/wallet_metadata/WalletNoteAddRequestDto.ts")] pub(crate) struct WalletNoteAddRequestDto { /// Protected note text transported only for the explicit mutation call. pub(crate) text: String, } /// OWNER request that updates one protected Wallet note by stable identifier. #[derive(serde::Deserialize, TS)] #[serde(rename_all = "camelCase")] #[ts(export, export_to = "../frontend/ts/bindings/ksp_app_wallet_desk/wallet_metadata/WalletNoteUpdateRequestDto.ts")] pub(crate) struct WalletNoteUpdateRequestDto { /// Stable note identifier returned by the authorized Wallet projection. pub(crate) note_id: String, /// Replacement protected note text transported only for the explicit mutation call. pub(crate) text: String, } /// OWNER request that deletes one protected Wallet note by stable identifier. #[derive(serde::Deserialize, TS)] #[serde(rename_all = "camelCase")] #[ts(export, export_to = "../frontend/ts/bindings/ksp_app_wallet_desk/wallet_metadata/WalletNoteDeleteRequestDto.ts")] pub(crate) struct WalletNoteDeleteRequestDto { /// Stable note identifier returned by the authorized Wallet projection. pub(crate) note_id: String, } #[cfg(test)] #[path = "../unit_tests/wallet_metadata.rs"] mod tests;