This commit is contained in:
2026-04-29 20:56:59 +08:00
parent fb6f455530
commit 730f485f48
200 changed files with 9881 additions and 2221 deletions

View File

@@ -492,6 +492,56 @@ impl SpacetimeClient {
.await
}
pub async fn update_puzzle_run_pause(
&self,
input: PuzzleRunPauseRecordInput,
) -> Result<PuzzleRunRecord, SpacetimeClientError> {
let procedure_input = PuzzleRunPauseInput {
run_id: input.run_id,
owner_user_id: input.owner_user_id,
paused: input.paused,
updated_at_micros: input.updated_at_micros,
};
self.call_after_connect(move |connection, sender| {
connection.procedures().update_puzzle_run_pause_then(
procedure_input,
move |_, result| {
let mapped = result
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
.and_then(map_puzzle_run_procedure_result);
send_once(&sender, mapped);
},
);
})
.await
}
pub async fn use_puzzle_runtime_prop(
&self,
input: PuzzleRunPropRecordInput,
) -> Result<PuzzleRunRecord, SpacetimeClientError> {
let procedure_input = PuzzleRunPropInput {
run_id: input.run_id,
owner_user_id: input.owner_user_id,
prop_kind: input.prop_kind,
used_at_micros: input.used_at_micros,
};
self.call_after_connect(move |connection, sender| {
connection.procedures().use_puzzle_runtime_prop_then(
procedure_input,
move |_, result| {
let mapped = result
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
.and_then(map_puzzle_run_procedure_result);
send_once(&sender, mapped);
},
);
})
.await
}
pub async fn submit_puzzle_leaderboard_entry(
&self,
input: PuzzleLeaderboardSubmitRecordInput,