This commit is contained in:
2026-05-01 01:30:02 +08:00
parent aabad6407f
commit 2e9d0f4640
92 changed files with 4548 additions and 248 deletions

View File

@@ -1,5 +1,6 @@
use super::*;
use crate::mapper::*;
use crate::module_bindings::claim_puzzle_work_point_incentive_procedure::claim_puzzle_work_point_incentive;
use crate::module_bindings::delete_puzzle_work_procedure::delete_puzzle_work;
use crate::module_bindings::record_puzzle_work_like_procedure::record_puzzle_work_like;
use crate::module_bindings::remix_puzzle_work_procedure::remix_puzzle_work;
@@ -340,6 +341,29 @@ impl SpacetimeClient {
.await
}
pub async fn claim_puzzle_work_point_incentive(
&self,
input: PuzzleWorkPointIncentiveClaimRecordInput,
) -> Result<PuzzleWorkProfileRecord, SpacetimeClientError> {
let procedure_input = PuzzleWorkPointIncentiveClaimInput {
profile_id: input.profile_id,
owner_user_id: input.owner_user_id,
claimed_at_micros: input.claimed_at_micros,
};
self.call_after_connect(move |connection, sender| {
connection
.procedures()
.claim_puzzle_work_point_incentive_then(procedure_input, move |_, result| {
let mapped = result
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
.and_then(map_puzzle_work_procedure_result);
send_once(&sender, mapped);
});
})
.await
}
pub async fn list_puzzle_gallery(
&self,
) -> Result<Vec<PuzzleWorkProfileRecord>, SpacetimeClientError> {
@@ -586,6 +610,7 @@ impl SpacetimeClient {
owner_user_id: input.owner_user_id,
prop_kind: input.prop_kind,
used_at_micros: input.used_at_micros,
spent_points: input.spent_points,
};
self.call_after_connect(move |connection, sender| {