This commit is contained in:
2026-04-24 17:59:48 +08:00
parent 929febb4fe
commit 6cb3efae61
55 changed files with 2373 additions and 435 deletions

View File

@@ -1,5 +1,6 @@
use super::*;
use crate::mapper::*;
use crate::module_bindings::delete_puzzle_work_procedure::delete_puzzle_work;
impl SpacetimeClient {
pub async fn create_puzzle_agent_session(
@@ -280,6 +281,29 @@ impl SpacetimeClient {
.await
}
pub async fn delete_puzzle_work(
&self,
profile_id: String,
owner_user_id: String,
) -> Result<Vec<PuzzleWorkProfileRecord>, SpacetimeClientError> {
let procedure_input = PuzzleWorkDeleteInput {
profile_id,
owner_user_id,
};
self.call_after_connect(move |connection, sender| {
connection
.procedures()
.delete_puzzle_work_then(procedure_input, move |_, result| {
let mapped = result
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
.and_then(map_puzzle_works_procedure_result);
send_once(&sender, mapped);
});
})
.await
}
pub async fn list_puzzle_gallery(
&self,
) -> Result<Vec<PuzzleWorkProfileRecord>, SpacetimeClientError> {