diff --git a/lib/types/backup-types.js b/lib/types/backup-types.js --- a/lib/types/backup-types.js +++ b/lib/types/backup-types.js @@ -5,6 +5,8 @@ import { tShape } from '../utils/validation-utils.js'; +// This type should match `BackupKeysResult` in +// `native/native_rust_library/src/backup.rs` export type BackupKeys = { +backupID: string, +backupDataKey: string, diff --git a/native/native_rust_library/src/backup.rs b/native/native_rust_library/src/backup.rs --- a/native/native_rust_library/src/backup.rs +++ b/native/native_rust_library/src/backup.rs @@ -392,8 +392,11 @@ }) } +// This struct should match `BackupKeys` in `lib/types/backup-types.js` #[derive(Debug, Serialize)] +#[serde(rename_all = "camelCase")] struct BackupKeysResult { + #[serde(rename = "backupID")] backup_id: String, backup_data_key: String, backup_log_data_key: String,