Migrated the get secret calls from Tauri JS to the runtime API

This commit is contained in:
tsommer committed 2024-08-28 21:00:19 +02:00
1 parent 273376ad97
commit 97854e7eaa
53 files changed
+299 -243

No files matched your search

@@ -0,0 +1,7 @@
using System.Text.Json.Serialization;
namespace AIStudio.Tools.Rust;
public readonly record struct GetSecretRequest(
string Destination,
[property:JsonPropertyName("user_name")] string UserName);
@@ -0,0 +1,9 @@
namespace AIStudio.Tools.Rust;
/// <summary>
/// Data structure for any requested secret.
/// </summary>
/// <param name="Success">True, when the secret was successfully retrieved.</param>
/// <param name="Secret">The secret, e.g., API key.</param>
/// <param name="Issue">The issue, when the secret could not be retrieved.</param>
public readonly record struct RequestedSecret(bool Success, EncryptedText Secret, string Issue);
@@ -0,0 +1,8 @@
namespace AIStudio.Tools.Rust;
/// <summary>
/// The response from the set clipboard operation.
/// </summary>
/// <param name="Success">True, when the operation was successful.</param>
/// <param name="Issue">The issues, which occurred during the operation, empty when successful.</param>
public readonly record struct SetClipboardResponse(bool Success, string Issue);
@@ -0,0 +1,16 @@
using System.Text.Json.Serialization;
namespace AIStudio.Tools.Rust;
/// <summary>
/// The response of the update check.
/// </summary>
/// <param name="UpdateIsAvailable">True if an update is available.</param>
/// <param name="NewVersion">The new version, when available.</param>
/// <param name="Changelog">The changelog of the new version, when available.</param>
public readonly record struct UpdateResponse(
[property:JsonPropertyName("update_is_available")] bool UpdateIsAvailable,
[property:JsonPropertyName("error")] bool Error,
[property:JsonPropertyName("new_version")] string NewVersion,
string Changelog
);