chore: add loadtest observability setup
This commit is contained in:
@@ -8,7 +8,7 @@ impl SpacetimeClient {
|
||||
) -> Result<AiTaskMutationRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("create_ai_task_and_return", move |connection, sender| {
|
||||
connection.procedures().create_ai_task_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -28,7 +28,7 @@ impl SpacetimeClient {
|
||||
) -> Result<(), SpacetimeClientError> {
|
||||
let reducer_input = input.into();
|
||||
|
||||
self.call_reducer_after_connect(move |connection, sender| {
|
||||
self.call_reducer_after_connect("start_ai_task", move |connection, sender| {
|
||||
let callback_sender = sender.clone();
|
||||
if let Err(error) =
|
||||
connection
|
||||
@@ -52,7 +52,7 @@ impl SpacetimeClient {
|
||||
) -> Result<(), SpacetimeClientError> {
|
||||
let reducer_input = input.into();
|
||||
|
||||
self.call_reducer_after_connect(move |connection, sender| {
|
||||
self.call_reducer_after_connect("start_ai_task_stage", move |connection, sender| {
|
||||
let callback_sender = sender.clone();
|
||||
if let Err(error) =
|
||||
connection
|
||||
@@ -76,16 +76,19 @@ impl SpacetimeClient {
|
||||
) -> Result<AiTaskMutationRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.append_ai_text_chunk_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_ai_task_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"append_ai_text_chunk_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.append_ai_text_chunk_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_ai_task_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -95,7 +98,7 @@ impl SpacetimeClient {
|
||||
) -> Result<AiTaskMutationRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("complete_ai_stage_and_return", move |connection, sender| {
|
||||
connection.procedures().complete_ai_stage_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -115,16 +118,22 @@ impl SpacetimeClient {
|
||||
) -> Result<AiTaskMutationRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.attach_ai_result_reference_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_ai_task_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"attach_ai_result_reference_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.attach_ai_result_reference_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_ai_task_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -134,7 +143,7 @@ impl SpacetimeClient {
|
||||
) -> Result<AiTaskMutationRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("complete_ai_task_and_return", move |connection, sender| {
|
||||
connection.procedures().complete_ai_task_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -154,7 +163,7 @@ impl SpacetimeClient {
|
||||
) -> Result<AiTaskMutationRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("fail_ai_task_and_return", move |connection, sender| {
|
||||
connection.procedures().fail_ai_task_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -174,7 +183,7 @@ impl SpacetimeClient {
|
||||
) -> Result<AiTaskMutationRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("cancel_ai_task_and_return", move |connection, sender| {
|
||||
connection.procedures().cancel_ai_task_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
|
||||
@@ -7,17 +7,20 @@ impl SpacetimeClient {
|
||||
) -> Result<Vec<AssetHistoryEntryRecord>, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().list_asset_history_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_asset_history_list_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"list_asset_history_and_return",
|
||||
move |connection, sender| {
|
||||
connection.procedures().list_asset_history_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_asset_history_list_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -27,16 +30,19 @@ impl SpacetimeClient {
|
||||
) -> Result<AssetObjectRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.confirm_asset_object_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"confirm_asset_object_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.confirm_asset_object_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -46,16 +52,22 @@ impl SpacetimeClient {
|
||||
) -> Result<AssetEntityBindingRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.bind_asset_object_to_entity_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_entity_binding_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"bind_asset_object_to_entity_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.bind_asset_object_to_entity_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_entity_binding_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,23 +4,26 @@ impl SpacetimeClient {
|
||||
pub async fn export_auth_store_snapshot_from_tables(
|
||||
&self,
|
||||
) -> Result<AuthStoreSnapshotRecord, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.export_auth_store_snapshot_from_tables_then(move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_auth_store_snapshot_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"export_auth_store_snapshot_from_tables",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.export_auth_store_snapshot_from_tables_then(move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_auth_store_snapshot_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_auth_store_snapshot(
|
||||
&self,
|
||||
) -> Result<AuthStoreSnapshotRecord, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_auth_store_snapshot", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_auth_store_snapshot_then(move |_, result| {
|
||||
@@ -43,7 +46,7 @@ impl SpacetimeClient {
|
||||
updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("upsert_auth_store_snapshot", move |connection, sender| {
|
||||
connection.procedures().upsert_auth_store_snapshot_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -67,23 +70,26 @@ impl SpacetimeClient {
|
||||
updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.import_auth_store_snapshot_json_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_auth_store_snapshot_import_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"import_auth_store_snapshot_json",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.import_auth_store_snapshot_json_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_auth_store_snapshot_import_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn import_auth_store_snapshot(
|
||||
&self,
|
||||
) -> Result<AuthStoreSnapshotImportRecord, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("import_auth_store_snapshot", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.import_auth_store_snapshot_then(move |_, result| {
|
||||
|
||||
@@ -11,7 +11,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
input: BarkBattleDraftCreateRecordInput,
|
||||
) -> Result<BarkBattleDraftConfigRecord, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("create_bark_battle_draft", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_bark_battle_draft_then(input, move |_, result| {
|
||||
@@ -28,16 +28,19 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
input: BarkBattleDraftConfigUpsertRecordInput,
|
||||
) -> Result<BarkBattleDraftConfigRecord, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.update_bark_battle_draft_config_then(input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_bark_battle_draft_config_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"update_bark_battle_draft_config",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.update_bark_battle_draft_config_then(input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_bark_battle_draft_config_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -45,7 +48,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
input: BarkBattleWorkPublishRecordInput,
|
||||
) -> Result<BarkBattleRuntimeConfigRecord, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("publish_bark_battle_work", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.publish_bark_battle_work_then(input, move |_, result| {
|
||||
@@ -67,16 +70,20 @@ impl SpacetimeClient {
|
||||
work_id,
|
||||
owner_user_id,
|
||||
};
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_bark_battle_runtime_config_then(input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_bark_battle_runtime_config_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_bark_battle_runtime_config",
|
||||
move |connection, sender| {
|
||||
connection.procedures().get_bark_battle_runtime_config_then(
|
||||
input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_bark_battle_runtime_config_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -84,7 +91,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
input: BarkBattleRunStartRecordInput,
|
||||
) -> Result<BarkBattleRunRecord, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("start_bark_battle_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.start_bark_battle_run_then(input, move |_, result| {
|
||||
@@ -101,7 +108,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
input: BarkBattleRunFinishRecordInput,
|
||||
) -> Result<BarkBattleRunRecord, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("finish_bark_battle_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finish_bark_battle_run_then(input, move |_, result| {
|
||||
@@ -123,7 +130,7 @@ impl SpacetimeClient {
|
||||
run_id,
|
||||
owner_user_id,
|
||||
};
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_bark_battle_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_bark_battle_run_then(input, move |_, result| {
|
||||
|
||||
@@ -23,7 +23,7 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("create_big_fish_session", move |connection, sender| {
|
||||
connection.procedures().create_big_fish_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -47,7 +47,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_big_fish_session", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_big_fish_session_then(procedure_input, move |_, result| {
|
||||
@@ -87,7 +87,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
procedure_input: BigFishWorksListInput,
|
||||
) -> Result<Vec<BigFishWorkSummaryRecord>, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_big_fish_works", move |connection, sender| {
|
||||
let fallback_owner_user_id = if procedure_input.published_only {
|
||||
None
|
||||
} else {
|
||||
@@ -120,7 +120,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("delete_big_fish_work", move |connection, sender| {
|
||||
let fallback_owner_user_id = Some(procedure_input.owner_user_id.clone());
|
||||
connection
|
||||
.procedures()
|
||||
@@ -152,7 +152,7 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("submit_big_fish_message", move |connection, sender| {
|
||||
connection.procedures().submit_big_fish_message_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -182,16 +182,22 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_big_fish_agent_message_turn_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_big_fish_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"finalize_big_fish_agent_message_turn",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_big_fish_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_big_fish_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -206,7 +212,7 @@ impl SpacetimeClient {
|
||||
compiled_at_micros: input.compiled_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("compile_big_fish_draft", move |connection, sender| {
|
||||
connection.procedures().compile_big_fish_draft_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -234,7 +240,7 @@ impl SpacetimeClient {
|
||||
generated_at_micros: input.generated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("generate_big_fish_asset", move |connection, sender| {
|
||||
connection.procedures().generate_big_fish_asset_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -260,7 +266,7 @@ impl SpacetimeClient {
|
||||
published_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("publish_big_fish_game", move |connection, sender| {
|
||||
connection.procedures().publish_big_fish_game_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -285,7 +291,7 @@ impl SpacetimeClient {
|
||||
played_at_micros: input.reported_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("record_big_fish_play", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_big_fish_play_then(procedure_input, move |_, result| {
|
||||
@@ -309,7 +315,7 @@ impl SpacetimeClient {
|
||||
started_at_micros: input.started_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("start_big_fish_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.start_big_fish_run_then(procedure_input, move |_, result| {
|
||||
@@ -332,7 +338,7 @@ impl SpacetimeClient {
|
||||
liked_at_micros: input.liked_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("record_big_fish_like", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_big_fish_like_then(procedure_input, move |_, result| {
|
||||
@@ -355,7 +361,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_big_fish_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_big_fish_run_then(procedure_input, move |_, result| {
|
||||
@@ -380,7 +386,7 @@ impl SpacetimeClient {
|
||||
remixed_at_micros: input.remixed_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("remix_big_fish_work", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.remix_big_fish_work_then(procedure_input, move |_, result| {
|
||||
@@ -405,7 +411,7 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("submit_big_fish_input", move |connection, sender| {
|
||||
connection.procedures().submit_big_fish_input_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
|
||||
@@ -9,17 +9,20 @@ impl SpacetimeClient {
|
||||
validate_battle_state_input(&input).map_err(SpacetimeClientError::validation_failed)?;
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().create_battle_state_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_battle_state_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"create_battle_state_and_return",
|
||||
move |connection, sender| {
|
||||
connection.procedures().create_battle_state_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_battle_state_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -31,7 +34,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_battle_state", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_battle_state_then(procedure_input, move |_, result| {
|
||||
@@ -52,16 +55,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?;
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.resolve_combat_action_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_resolve_combat_action_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"resolve_combat_action_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.resolve_combat_action_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_resolve_combat_action_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ impl SpacetimeClient {
|
||||
) -> Result<Vec<CustomWorldLibraryEntryRecord>, SpacetimeClientError> {
|
||||
let procedure_input = CustomWorldProfileListInput { owner_user_id };
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_custom_world_profiles", move |connection, sender| {
|
||||
connection.procedures().list_custom_world_profiles_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -36,16 +36,19 @@ impl SpacetimeClient {
|
||||
profile_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_custom_world_library_detail_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_detail_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_custom_world_library_detail",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_custom_world_library_detail_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_detail_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -55,16 +58,22 @@ impl SpacetimeClient {
|
||||
) -> Result<CustomWorldLibraryMutationRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_custom_world_profile_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"upsert_custom_world_profile_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_custom_world_profile_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -86,16 +95,22 @@ impl SpacetimeClient {
|
||||
published_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.publish_custom_world_profile_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"publish_custom_world_profile_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.publish_custom_world_profile_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -113,19 +128,22 @@ impl SpacetimeClient {
|
||||
updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.unpublish_custom_world_profile_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"unpublish_custom_world_profile_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.unpublish_custom_world_profile_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -141,32 +159,41 @@ impl SpacetimeClient {
|
||||
deleted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.delete_custom_world_profile_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_profile_list_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"delete_custom_world_profile_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.delete_custom_world_profile_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_profile_list_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn list_custom_world_gallery_entries(
|
||||
&self,
|
||||
) -> Result<Vec<CustomWorldGalleryEntryRecord>, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.list_custom_world_gallery_entries_then(move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_gallery_list_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"list_custom_world_gallery_entries",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.list_custom_world_gallery_entries_then(move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_gallery_list_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -180,16 +207,19 @@ impl SpacetimeClient {
|
||||
profile_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_custom_world_gallery_detail_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_custom_world_gallery_detail",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_custom_world_gallery_detail_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -199,16 +229,22 @@ impl SpacetimeClient {
|
||||
) -> Result<CustomWorldLibraryMutationRecord, SpacetimeClientError> {
|
||||
let procedure_input = CustomWorldGalleryDetailByCodeInput { public_work_code };
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_custom_world_gallery_detail_by_code_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_custom_world_gallery_detail_by_code",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_custom_world_gallery_detail_by_code_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -225,7 +261,7 @@ impl SpacetimeClient {
|
||||
remixed_at_micros: input.remixed_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("remix_custom_world_profile", move |connection, sender| {
|
||||
connection.procedures().remix_custom_world_profile_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -249,16 +285,19 @@ impl SpacetimeClient {
|
||||
played_at_micros: input.played_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_custom_world_profile_play_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"record_custom_world_profile_play",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_custom_world_profile_play_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -273,16 +312,19 @@ impl SpacetimeClient {
|
||||
liked_at_micros: input.liked_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_custom_world_profile_like_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"record_custom_world_profile_like",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_custom_world_profile_like_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_custom_world_library_mutation_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -292,7 +334,7 @@ impl SpacetimeClient {
|
||||
) -> Result<CustomWorldPublishWorldRecord, SpacetimeClientError> {
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("publish_custom_world_world", move |connection, sender| {
|
||||
connection.procedures().publish_custom_world_world_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -331,16 +373,19 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_custom_world_agent_session_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"create_custom_world_agent_session",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_custom_world_agent_session_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -354,17 +399,20 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().get_custom_world_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_custom_world_agent_session",
|
||||
move |connection, sender| {
|
||||
connection.procedures().get_custom_world_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -374,7 +422,7 @@ impl SpacetimeClient {
|
||||
) -> Result<Vec<CustomWorldWorkSummaryRecord>, SpacetimeClientError> {
|
||||
let procedure_input = CustomWorldWorksListInput { owner_user_id };
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_custom_world_works", move |connection, sender| {
|
||||
connection.procedures().list_custom_world_works_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -398,16 +446,19 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.delete_custom_world_agent_session_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_works_list_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"delete_custom_world_agent_session",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.delete_custom_world_agent_session_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_works_list_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -423,16 +474,19 @@ impl SpacetimeClient {
|
||||
card_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_custom_world_agent_card_detail_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_draft_card_detail_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_custom_world_agent_card_detail",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_custom_world_agent_card_detail_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_draft_card_detail_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -449,16 +503,19 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.execute_custom_world_agent_action_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_action_execute_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"execute_custom_world_agent_action",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.execute_custom_world_agent_action_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_action_execute_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -475,16 +532,19 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_custom_world_agent_message_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_operation_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"submit_custom_world_agent_message",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_custom_world_agent_message_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_operation_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -521,19 +581,22 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_custom_world_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_operation_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"finalize_custom_world_agent_message_turn",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_custom_world_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_operation_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -556,19 +619,22 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_custom_world_agent_operation_progress_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_operation_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"upsert_custom_world_agent_operation_progress",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_custom_world_agent_operation_progress_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_operation_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -584,16 +650,19 @@ impl SpacetimeClient {
|
||||
operation_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_custom_world_agent_operation_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_operation_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_custom_world_agent_operation",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_custom_world_agent_operation_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_custom_world_agent_operation_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_runtime_inventory_state", move |connection, sender| {
|
||||
connection.procedures().get_runtime_inventory_state_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
pub mod module_bindings;
|
||||
|
||||
mod mapper;
|
||||
mod telemetry;
|
||||
use mapper::*;
|
||||
pub use mapper::{
|
||||
AiResultReferenceRecord, AiTaskMutationRecord, AiTaskRecord, AiTaskStageRecord,
|
||||
@@ -142,6 +143,24 @@ use module_npc::{
|
||||
NpcStanceProfile as DomainNpcStanceProfile, NpcStateSnapshot as DomainNpcStateSnapshot,
|
||||
ResolveNpcInteractionInput as DomainResolveNpcInteractionInput,
|
||||
};
|
||||
use module_puzzle::{
|
||||
PuzzleAgentMessageSnapshot as DomainPuzzleAgentMessageSnapshot,
|
||||
PuzzleAgentSessionSnapshot as DomainPuzzleAgentSessionSnapshot,
|
||||
PuzzleAgentSuggestedAction as DomainPuzzleAgentSuggestedAction,
|
||||
PuzzleAnchorItem as DomainPuzzleAnchorItem, PuzzleAnchorPack as DomainPuzzleAnchorPack,
|
||||
PuzzleBoardSnapshot as DomainPuzzleBoardSnapshot,
|
||||
PuzzleCellPosition as DomainPuzzleCellPosition,
|
||||
PuzzleCreatorIntent as DomainPuzzleCreatorIntent, PuzzleDraftLevel as DomainPuzzleDraftLevel,
|
||||
PuzzleGeneratedImageCandidate as DomainPuzzleGeneratedImageCandidate,
|
||||
PuzzleMergedGroupState as DomainPuzzleMergedGroupState,
|
||||
PuzzlePieceState as DomainPuzzlePieceState, PuzzleResultDraft as DomainPuzzleResultDraft,
|
||||
PuzzleResultPreviewBlocker as DomainPuzzleResultPreviewBlocker,
|
||||
PuzzleResultPreviewEnvelope as DomainPuzzleResultPreviewEnvelope,
|
||||
PuzzleResultPreviewFinding as DomainPuzzleResultPreviewFinding,
|
||||
PuzzleRunSnapshot as DomainPuzzleRunSnapshot,
|
||||
PuzzleRuntimeLevelSnapshot as DomainPuzzleRuntimeLevelSnapshot,
|
||||
PuzzleWorkProfile as DomainPuzzleWorkProfile,
|
||||
};
|
||||
use module_runtime::{
|
||||
AnalyticsMetricQueryResponse as DomainAnalyticsMetricQueryResponse, RuntimeBrowseHistoryRecord,
|
||||
RuntimePlatformTheme as DomainRuntimePlatformTheme, RuntimeProfileDashboardRecord,
|
||||
@@ -307,56 +326,72 @@ impl SpacetimeClient {
|
||||
|
||||
async fn call_after_connect<T>(
|
||||
&self,
|
||||
procedure: &'static str,
|
||||
call: impl FnOnce(&DbConnection, ProcedureResultSender<T>) + Send + 'static,
|
||||
) -> Result<T, SpacetimeClientError>
|
||||
where
|
||||
T: Send + 'static,
|
||||
{
|
||||
let metrics_guard = telemetry::begin_procedure(procedure);
|
||||
let (sender, receiver) = oneshot::channel();
|
||||
let result_sender = Arc::new(Mutex::new(Some(sender)));
|
||||
let lease = self.acquire_connection().await?;
|
||||
let final_result = if let Some(connection) = lease.connection.as_ref() {
|
||||
call(&connection.connection, result_sender.clone());
|
||||
match timeout(self.config.procedure_timeout, receiver).await {
|
||||
Ok(inner) => match inner {
|
||||
Ok(value) => value,
|
||||
Err(_) => Err(SpacetimeClientError::ConnectDropped),
|
||||
},
|
||||
Err(_) => Err(Self::resolve_timeout_error(Some(connection))),
|
||||
let final_result = match self.acquire_connection().await {
|
||||
Ok(lease) => {
|
||||
let result = if let Some(connection) = lease.connection.as_ref() {
|
||||
call(&connection.connection, result_sender.clone());
|
||||
match timeout(self.config.procedure_timeout, receiver).await {
|
||||
Ok(inner) => match inner {
|
||||
Ok(value) => value,
|
||||
Err(_) => Err(SpacetimeClientError::ConnectDropped),
|
||||
},
|
||||
Err(_) => Err(Self::resolve_timeout_error(Some(connection))),
|
||||
}
|
||||
} else {
|
||||
Err(SpacetimeClientError::Runtime(
|
||||
"SpacetimeDB 连接租约缺少连接".to_string(),
|
||||
))
|
||||
};
|
||||
self.release_connection(lease).await;
|
||||
result
|
||||
}
|
||||
} else {
|
||||
Err(SpacetimeClientError::Runtime(
|
||||
"SpacetimeDB 连接租约缺少连接".to_string(),
|
||||
))
|
||||
Err(error) => Err(error),
|
||||
};
|
||||
self.release_connection(lease).await;
|
||||
|
||||
metrics_guard.finish(&final_result);
|
||||
final_result
|
||||
}
|
||||
|
||||
async fn call_reducer_after_connect(
|
||||
&self,
|
||||
procedure: &'static str,
|
||||
call: impl FnOnce(&DbConnection, ReducerResultSender) + Send + 'static,
|
||||
) -> Result<(), SpacetimeClientError> {
|
||||
let metrics_guard = telemetry::begin_procedure(procedure);
|
||||
let (sender, receiver) = oneshot::channel();
|
||||
let result_sender = Arc::new(Mutex::new(Some(sender)));
|
||||
let lease = self.acquire_connection().await?;
|
||||
let final_result = if let Some(connection) = lease.connection.as_ref() {
|
||||
call(&connection.connection, result_sender.clone());
|
||||
match timeout(self.config.procedure_timeout, receiver).await {
|
||||
Ok(inner) => match inner {
|
||||
Ok(value) => value,
|
||||
Err(_) => Err(SpacetimeClientError::ConnectDropped),
|
||||
},
|
||||
Err(_) => Err(Self::resolve_timeout_error(Some(connection))),
|
||||
let final_result = match self.acquire_connection().await {
|
||||
Ok(lease) => {
|
||||
let result = if let Some(connection) = lease.connection.as_ref() {
|
||||
call(&connection.connection, result_sender.clone());
|
||||
match timeout(self.config.procedure_timeout, receiver).await {
|
||||
Ok(inner) => match inner {
|
||||
Ok(value) => value,
|
||||
Err(_) => Err(SpacetimeClientError::ConnectDropped),
|
||||
},
|
||||
Err(_) => Err(Self::resolve_timeout_error(Some(connection))),
|
||||
}
|
||||
} else {
|
||||
Err(SpacetimeClientError::Runtime(
|
||||
"SpacetimeDB 连接租约缺少连接".to_string(),
|
||||
))
|
||||
};
|
||||
self.release_connection(lease).await;
|
||||
result
|
||||
}
|
||||
} else {
|
||||
Err(SpacetimeClientError::Runtime(
|
||||
"SpacetimeDB 连接租约缺少连接".to_string(),
|
||||
))
|
||||
Err(error) => Err(error),
|
||||
};
|
||||
self.release_connection(lease).await;
|
||||
|
||||
metrics_guard.finish(&final_result);
|
||||
final_result
|
||||
}
|
||||
|
||||
@@ -488,7 +523,6 @@ impl SpacetimeClient {
|
||||
let mut subscriptions = Vec::new();
|
||||
for query in [
|
||||
"SELECT * FROM puzzle_gallery_view",
|
||||
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'puzzle'",
|
||||
] {
|
||||
let (sender, receiver) = oneshot::channel::<Result<(), SpacetimeClientError>>();
|
||||
let applied_sender = Arc::new(Mutex::new(Some(sender)));
|
||||
|
||||
@@ -16,17 +16,20 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().create_match_3_d_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"create_match_3_d_agent_session",
|
||||
move |connection, sender| {
|
||||
connection.procedures().create_match_3_d_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -40,7 +43,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_match_3_d_agent_session", move |connection, sender| {
|
||||
connection.procedures().get_match_3_d_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -66,17 +69,20 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().submit_match_3_d_agent_message_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"submit_match_3_d_agent_message",
|
||||
move |connection, sender| {
|
||||
connection.procedures().submit_match_3_d_agent_message_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -96,16 +102,22 @@ impl SpacetimeClient {
|
||||
error_message: input.error_message,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_match_3_d_agent_message_turn_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"finalize_match_3_d_agent_message_turn",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_match_3_d_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -127,7 +139,7 @@ impl SpacetimeClient {
|
||||
generated_item_assets_json: input.generated_item_assets_json,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("compile_match_3_d_draft", move |connection, sender| {
|
||||
connection.procedures().compile_match_3_d_draft_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -159,7 +171,7 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("update_match_3_d_work", move |connection, sender| {
|
||||
connection.procedures().update_match_3_d_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -185,7 +197,7 @@ impl SpacetimeClient {
|
||||
published_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("publish_match_3_d_work", move |connection, sender| {
|
||||
connection.procedures().publish_match_3_d_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -225,7 +237,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
procedure_input: Match3DWorksListInput,
|
||||
) -> Result<Vec<Match3DWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_match_3_d_works", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.list_match_3_d_works_then(procedure_input, move |_, result| {
|
||||
@@ -248,7 +260,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_match_3_d_work_detail", move |connection, sender| {
|
||||
connection.procedures().get_match_3_d_work_detail_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -272,7 +284,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("delete_match_3_d_work", move |connection, sender| {
|
||||
connection.procedures().delete_match_3_d_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -299,7 +311,7 @@ impl SpacetimeClient {
|
||||
item_type_count_override: input.item_type_count_override,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("start_match_3_d_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.start_match_3_d_run_then(procedure_input, move |_, result| {
|
||||
@@ -327,7 +339,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_match_3_d_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_match_3_d_run_then(procedure_input, move |_, result| {
|
||||
@@ -359,7 +371,7 @@ impl SpacetimeClient {
|
||||
clicked_at_ms: input.clicked_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("click_match_3_d_item", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.click_match_3_d_item_then(procedure_input, move |_, result| {
|
||||
@@ -390,7 +402,7 @@ impl SpacetimeClient {
|
||||
stopped_at_ms: input.stopped_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("stop_match_3_d_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.stop_match_3_d_run_then(procedure_input, move |_, result| {
|
||||
@@ -419,7 +431,7 @@ impl SpacetimeClient {
|
||||
restarted_at_ms: input.restarted_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("restart_match_3_d_run", move |connection, sender| {
|
||||
connection.procedures().restart_match_3_d_run_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -448,7 +460,7 @@ impl SpacetimeClient {
|
||||
finished_at_ms: input.finished_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("finish_match_3_d_time_up", move |connection, sender| {
|
||||
connection.procedures().finish_match_3_d_time_up_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
|
||||
@@ -95,7 +95,6 @@ pub mod auth_store_snapshot_type;
|
||||
pub mod auth_store_snapshot_upsert_input_type;
|
||||
pub mod authorize_database_migration_operator_procedure;
|
||||
pub mod bark_battle_draft_config_row_type;
|
||||
pub mod bark_battle_draft_config_snapshot_type;
|
||||
pub mod bark_battle_draft_config_table;
|
||||
pub mod bark_battle_draft_config_upsert_input_type;
|
||||
pub mod bark_battle_draft_create_input_type;
|
||||
@@ -108,10 +107,8 @@ pub mod bark_battle_published_config_row_type;
|
||||
pub mod bark_battle_published_config_table;
|
||||
pub mod bark_battle_run_finish_input_type;
|
||||
pub mod bark_battle_run_get_input_type;
|
||||
pub mod bark_battle_run_snapshot_type;
|
||||
pub mod bark_battle_run_start_input_type;
|
||||
pub mod bark_battle_runtime_config_get_input_type;
|
||||
pub mod bark_battle_runtime_config_snapshot_type;
|
||||
pub mod bark_battle_runtime_run_row_type;
|
||||
pub mod bark_battle_runtime_run_table;
|
||||
pub mod bark_battle_score_record_row_type;
|
||||
@@ -163,20 +160,16 @@ pub mod big_fish_run_get_input_type;
|
||||
pub mod big_fish_run_procedure_result_type;
|
||||
pub mod big_fish_run_start_input_type;
|
||||
pub mod big_fish_run_status_type;
|
||||
pub mod big_fish_runtime_entity_snapshot_type;
|
||||
pub mod big_fish_runtime_params_type;
|
||||
pub mod big_fish_runtime_run_table;
|
||||
pub mod big_fish_runtime_run_type;
|
||||
pub mod big_fish_runtime_snapshot_type;
|
||||
pub mod big_fish_session_create_input_type;
|
||||
pub mod big_fish_session_get_input_type;
|
||||
pub mod big_fish_session_procedure_result_type;
|
||||
pub mod big_fish_session_snapshot_type;
|
||||
pub mod big_fish_vector_2_type;
|
||||
pub mod big_fish_work_delete_input_type;
|
||||
pub mod big_fish_work_like_record_input_type;
|
||||
pub mod big_fish_work_remix_input_type;
|
||||
pub mod big_fish_work_summary_snapshot_type;
|
||||
pub mod big_fish_works_list_input_type;
|
||||
pub mod big_fish_works_procedure_result_type;
|
||||
pub mod bind_asset_object_to_entity_and_return_procedure;
|
||||
@@ -409,38 +402,30 @@ pub mod list_visual_novel_works_procedure;
|
||||
pub mod mark_profile_recharge_order_paid_and_return_procedure;
|
||||
pub mod match_3_d_agent_message_finalize_input_type;
|
||||
pub mod match_3_d_agent_message_row_type;
|
||||
pub mod match_3_d_agent_message_snapshot_type;
|
||||
pub mod match_3_d_agent_message_submit_input_type;
|
||||
pub mod match_3_d_agent_message_table;
|
||||
pub mod match_3_d_agent_session_create_input_type;
|
||||
pub mod match_3_d_agent_session_get_input_type;
|
||||
pub mod match_3_d_agent_session_procedure_result_type;
|
||||
pub mod match_3_d_agent_session_row_type;
|
||||
pub mod match_3_d_agent_session_snapshot_type;
|
||||
pub mod match_3_d_agent_session_table;
|
||||
pub mod match_3_d_click_item_procedure_result_type;
|
||||
pub mod match_3_d_creator_config_snapshot_type;
|
||||
pub mod match_3_d_draft_compile_input_type;
|
||||
pub mod match_3_d_draft_snapshot_type;
|
||||
pub mod match_3_d_item_snapshot_type;
|
||||
pub mod match_3_d_run_click_input_type;
|
||||
pub mod match_3_d_run_get_input_type;
|
||||
pub mod match_3_d_run_procedure_result_type;
|
||||
pub mod match_3_d_run_restart_input_type;
|
||||
pub mod match_3_d_run_snapshot_type;
|
||||
pub mod match_3_d_run_start_input_type;
|
||||
pub mod match_3_d_run_stop_input_type;
|
||||
pub mod match_3_d_run_time_up_input_type;
|
||||
pub mod match_3_d_runtime_run_row_type;
|
||||
pub mod match_3_d_runtime_run_table;
|
||||
pub mod match_3_d_tray_slot_snapshot_type;
|
||||
pub mod match_3_d_work_delete_input_type;
|
||||
pub mod match_3_d_work_get_input_type;
|
||||
pub mod match_3_d_work_procedure_result_type;
|
||||
pub mod match_3_d_work_profile_row_type;
|
||||
pub mod match_3_d_work_profile_table;
|
||||
pub mod match_3_d_work_publish_input_type;
|
||||
pub mod match_3_d_work_snapshot_type;
|
||||
pub mod match_3_d_work_update_input_type;
|
||||
pub mod match_3_d_works_list_input_type;
|
||||
pub mod match_3_d_works_procedure_result_type;
|
||||
@@ -514,58 +499,34 @@ pub mod puzzle_agent_message_finalize_input_type;
|
||||
pub mod puzzle_agent_message_kind_type;
|
||||
pub mod puzzle_agent_message_role_type;
|
||||
pub mod puzzle_agent_message_row_type;
|
||||
pub mod puzzle_agent_message_snapshot_type;
|
||||
pub mod puzzle_agent_message_submit_input_type;
|
||||
pub mod puzzle_agent_message_table;
|
||||
pub mod puzzle_agent_session_create_input_type;
|
||||
pub mod puzzle_agent_session_get_input_type;
|
||||
pub mod puzzle_agent_session_procedure_result_type;
|
||||
pub mod puzzle_agent_session_row_type;
|
||||
pub mod puzzle_agent_session_snapshot_type;
|
||||
pub mod puzzle_agent_session_table;
|
||||
pub mod puzzle_agent_stage_type;
|
||||
pub mod puzzle_agent_suggested_action_type;
|
||||
pub mod puzzle_anchor_item_type;
|
||||
pub mod puzzle_anchor_pack_type;
|
||||
pub mod puzzle_anchor_status_type;
|
||||
pub mod puzzle_audio_asset_type;
|
||||
pub mod puzzle_board_snapshot_type;
|
||||
pub mod puzzle_cell_position_type;
|
||||
pub mod puzzle_creator_intent_type;
|
||||
pub mod puzzle_draft_compile_input_type;
|
||||
pub mod puzzle_draft_level_type;
|
||||
pub mod puzzle_event_kind_type;
|
||||
pub mod puzzle_event_table;
|
||||
pub mod puzzle_event_type;
|
||||
pub mod puzzle_form_draft_save_input_type;
|
||||
pub mod puzzle_form_draft_type;
|
||||
pub mod puzzle_gallery_view_table;
|
||||
pub mod puzzle_generated_image_candidate_type;
|
||||
pub mod puzzle_generated_images_save_input_type;
|
||||
pub mod puzzle_leaderboard_entry_row_type;
|
||||
pub mod puzzle_leaderboard_entry_table;
|
||||
pub mod puzzle_leaderboard_entry_type;
|
||||
pub mod puzzle_leaderboard_submit_input_type;
|
||||
pub mod puzzle_merged_group_state_type;
|
||||
pub mod puzzle_piece_state_type;
|
||||
pub mod puzzle_publication_status_type;
|
||||
pub mod puzzle_publish_input_type;
|
||||
pub mod puzzle_recommended_next_work_type;
|
||||
pub mod puzzle_result_draft_type;
|
||||
pub mod puzzle_result_preview_blocker_type;
|
||||
pub mod puzzle_result_preview_envelope_type;
|
||||
pub mod puzzle_result_preview_finding_type;
|
||||
pub mod puzzle_run_drag_input_type;
|
||||
pub mod puzzle_run_get_input_type;
|
||||
pub mod puzzle_run_next_level_input_type;
|
||||
pub mod puzzle_run_pause_input_type;
|
||||
pub mod puzzle_run_procedure_result_type;
|
||||
pub mod puzzle_run_prop_input_type;
|
||||
pub mod puzzle_run_snapshot_type;
|
||||
pub mod puzzle_run_start_input_type;
|
||||
pub mod puzzle_run_swap_input_type;
|
||||
pub mod puzzle_runtime_level_snapshot_type;
|
||||
pub mod puzzle_runtime_level_status_type;
|
||||
pub mod puzzle_runtime_run_row_type;
|
||||
pub mod puzzle_runtime_run_table;
|
||||
pub mod puzzle_select_cover_image_input_type;
|
||||
@@ -577,7 +538,6 @@ pub mod puzzle_work_point_incentive_claim_input_type;
|
||||
pub mod puzzle_work_procedure_result_type;
|
||||
pub mod puzzle_work_profile_row_type;
|
||||
pub mod puzzle_work_profile_table;
|
||||
pub mod puzzle_work_profile_type;
|
||||
pub mod puzzle_work_remix_input_type;
|
||||
pub mod puzzle_work_upsert_input_type;
|
||||
pub mod puzzle_works_list_input_type;
|
||||
@@ -769,41 +729,30 @@ pub mod seed_analytics_date_dimensions_reducer;
|
||||
pub mod select_puzzle_cover_image_procedure;
|
||||
pub mod square_hole_agent_message_finalize_input_type;
|
||||
pub mod square_hole_agent_message_row_type;
|
||||
pub mod square_hole_agent_message_snapshot_type;
|
||||
pub mod square_hole_agent_message_submit_input_type;
|
||||
pub mod square_hole_agent_message_table;
|
||||
pub mod square_hole_agent_session_create_input_type;
|
||||
pub mod square_hole_agent_session_get_input_type;
|
||||
pub mod square_hole_agent_session_procedure_result_type;
|
||||
pub mod square_hole_agent_session_row_type;
|
||||
pub mod square_hole_agent_session_snapshot_type;
|
||||
pub mod square_hole_agent_session_table;
|
||||
pub mod square_hole_creator_config_snapshot_type;
|
||||
pub mod square_hole_draft_compile_input_type;
|
||||
pub mod square_hole_draft_snapshot_type;
|
||||
pub mod square_hole_drop_feedback_snapshot_type;
|
||||
pub mod square_hole_drop_shape_procedure_result_type;
|
||||
pub mod square_hole_hole_option_snapshot_type;
|
||||
pub mod square_hole_hole_snapshot_type;
|
||||
pub mod square_hole_run_drop_input_type;
|
||||
pub mod square_hole_run_get_input_type;
|
||||
pub mod square_hole_run_procedure_result_type;
|
||||
pub mod square_hole_run_restart_input_type;
|
||||
pub mod square_hole_run_snapshot_type;
|
||||
pub mod square_hole_run_start_input_type;
|
||||
pub mod square_hole_run_stop_input_type;
|
||||
pub mod square_hole_run_time_up_input_type;
|
||||
pub mod square_hole_runtime_run_row_type;
|
||||
pub mod square_hole_runtime_run_table;
|
||||
pub mod square_hole_shape_option_snapshot_type;
|
||||
pub mod square_hole_shape_snapshot_type;
|
||||
pub mod square_hole_work_delete_input_type;
|
||||
pub mod square_hole_work_get_input_type;
|
||||
pub mod square_hole_work_procedure_result_type;
|
||||
pub mod square_hole_work_profile_row_type;
|
||||
pub mod square_hole_work_profile_table;
|
||||
pub mod square_hole_work_publish_input_type;
|
||||
pub mod square_hole_work_snapshot_type;
|
||||
pub mod square_hole_work_update_input_type;
|
||||
pub mod square_hole_works_list_input_type;
|
||||
pub mod square_hole_works_procedure_result_type;
|
||||
@@ -880,31 +829,24 @@ pub mod user_browse_history_table;
|
||||
pub mod user_browse_history_type;
|
||||
pub mod visual_novel_agent_message_finalize_input_type;
|
||||
pub mod visual_novel_agent_message_row_type;
|
||||
pub mod visual_novel_agent_message_snapshot_type;
|
||||
pub mod visual_novel_agent_message_submit_input_type;
|
||||
pub mod visual_novel_agent_message_table;
|
||||
pub mod visual_novel_agent_session_create_input_type;
|
||||
pub mod visual_novel_agent_session_get_input_type;
|
||||
pub mod visual_novel_agent_session_procedure_result_type;
|
||||
pub mod visual_novel_agent_session_row_type;
|
||||
pub mod visual_novel_agent_session_snapshot_type;
|
||||
pub mod visual_novel_agent_session_table;
|
||||
pub mod visual_novel_history_procedure_result_type;
|
||||
pub mod visual_novel_json_field_type;
|
||||
pub mod visual_novel_json_value_type;
|
||||
pub mod visual_novel_run_get_input_type;
|
||||
pub mod visual_novel_run_procedure_result_type;
|
||||
pub mod visual_novel_run_snapshot_type;
|
||||
pub mod visual_novel_run_snapshot_upsert_input_type;
|
||||
pub mod visual_novel_run_start_input_type;
|
||||
pub mod visual_novel_runtime_event_procedure_result_type;
|
||||
pub mod visual_novel_runtime_event_record_input_type;
|
||||
pub mod visual_novel_runtime_event_snapshot_type;
|
||||
pub mod visual_novel_runtime_event_table;
|
||||
pub mod visual_novel_runtime_event_type;
|
||||
pub mod visual_novel_runtime_history_append_input_type;
|
||||
pub mod visual_novel_runtime_history_entry_row_type;
|
||||
pub mod visual_novel_runtime_history_entry_snapshot_type;
|
||||
pub mod visual_novel_runtime_history_entry_table;
|
||||
pub mod visual_novel_runtime_history_list_input_type;
|
||||
pub mod visual_novel_runtime_run_row_type;
|
||||
@@ -916,7 +858,6 @@ pub mod visual_novel_work_procedure_result_type;
|
||||
pub mod visual_novel_work_profile_row_type;
|
||||
pub mod visual_novel_work_profile_table;
|
||||
pub mod visual_novel_work_publish_input_type;
|
||||
pub mod visual_novel_work_snapshot_type;
|
||||
pub mod visual_novel_work_update_input_type;
|
||||
pub mod visual_novel_works_list_input_type;
|
||||
pub mod visual_novel_works_procedure_result_type;
|
||||
@@ -1010,7 +951,6 @@ pub use auth_store_snapshot_type::AuthStoreSnapshot;
|
||||
pub use auth_store_snapshot_upsert_input_type::AuthStoreSnapshotUpsertInput;
|
||||
pub use authorize_database_migration_operator_procedure::authorize_database_migration_operator;
|
||||
pub use bark_battle_draft_config_row_type::BarkBattleDraftConfigRow;
|
||||
pub use bark_battle_draft_config_snapshot_type::BarkBattleDraftConfigSnapshot;
|
||||
pub use bark_battle_draft_config_table::*;
|
||||
pub use bark_battle_draft_config_upsert_input_type::BarkBattleDraftConfigUpsertInput;
|
||||
pub use bark_battle_draft_create_input_type::BarkBattleDraftCreateInput;
|
||||
@@ -1023,10 +963,8 @@ pub use bark_battle_published_config_row_type::BarkBattlePublishedConfigRow;
|
||||
pub use bark_battle_published_config_table::*;
|
||||
pub use bark_battle_run_finish_input_type::BarkBattleRunFinishInput;
|
||||
pub use bark_battle_run_get_input_type::BarkBattleRunGetInput;
|
||||
pub use bark_battle_run_snapshot_type::BarkBattleRunSnapshot;
|
||||
pub use bark_battle_run_start_input_type::BarkBattleRunStartInput;
|
||||
pub use bark_battle_runtime_config_get_input_type::BarkBattleRuntimeConfigGetInput;
|
||||
pub use bark_battle_runtime_config_snapshot_type::BarkBattleRuntimeConfigSnapshot;
|
||||
pub use bark_battle_runtime_run_row_type::BarkBattleRuntimeRunRow;
|
||||
pub use bark_battle_runtime_run_table::*;
|
||||
pub use bark_battle_score_record_row_type::BarkBattleScoreRecordRow;
|
||||
@@ -1078,20 +1016,16 @@ pub use big_fish_run_get_input_type::BigFishRunGetInput;
|
||||
pub use big_fish_run_procedure_result_type::BigFishRunProcedureResult;
|
||||
pub use big_fish_run_start_input_type::BigFishRunStartInput;
|
||||
pub use big_fish_run_status_type::BigFishRunStatus;
|
||||
pub use big_fish_runtime_entity_snapshot_type::BigFishRuntimeEntitySnapshot;
|
||||
pub use big_fish_runtime_params_type::BigFishRuntimeParams;
|
||||
pub use big_fish_runtime_run_table::*;
|
||||
pub use big_fish_runtime_run_type::BigFishRuntimeRun;
|
||||
pub use big_fish_runtime_snapshot_type::BigFishRuntimeSnapshot;
|
||||
pub use big_fish_session_create_input_type::BigFishSessionCreateInput;
|
||||
pub use big_fish_session_get_input_type::BigFishSessionGetInput;
|
||||
pub use big_fish_session_procedure_result_type::BigFishSessionProcedureResult;
|
||||
pub use big_fish_session_snapshot_type::BigFishSessionSnapshot;
|
||||
pub use big_fish_vector_2_type::BigFishVector2;
|
||||
pub use big_fish_work_delete_input_type::BigFishWorkDeleteInput;
|
||||
pub use big_fish_work_like_record_input_type::BigFishWorkLikeRecordInput;
|
||||
pub use big_fish_work_remix_input_type::BigFishWorkRemixInput;
|
||||
pub use big_fish_work_summary_snapshot_type::BigFishWorkSummarySnapshot;
|
||||
pub use big_fish_works_list_input_type::BigFishWorksListInput;
|
||||
pub use big_fish_works_procedure_result_type::BigFishWorksProcedureResult;
|
||||
pub use bind_asset_object_to_entity_and_return_procedure::bind_asset_object_to_entity_and_return;
|
||||
@@ -1324,38 +1258,30 @@ pub use list_visual_novel_works_procedure::list_visual_novel_works;
|
||||
pub use mark_profile_recharge_order_paid_and_return_procedure::mark_profile_recharge_order_paid_and_return;
|
||||
pub use match_3_d_agent_message_finalize_input_type::Match3DAgentMessageFinalizeInput;
|
||||
pub use match_3_d_agent_message_row_type::Match3DAgentMessageRow;
|
||||
pub use match_3_d_agent_message_snapshot_type::Match3DAgentMessageSnapshot;
|
||||
pub use match_3_d_agent_message_submit_input_type::Match3DAgentMessageSubmitInput;
|
||||
pub use match_3_d_agent_message_table::*;
|
||||
pub use match_3_d_agent_session_create_input_type::Match3DAgentSessionCreateInput;
|
||||
pub use match_3_d_agent_session_get_input_type::Match3DAgentSessionGetInput;
|
||||
pub use match_3_d_agent_session_procedure_result_type::Match3DAgentSessionProcedureResult;
|
||||
pub use match_3_d_agent_session_row_type::Match3DAgentSessionRow;
|
||||
pub use match_3_d_agent_session_snapshot_type::Match3DAgentSessionSnapshot;
|
||||
pub use match_3_d_agent_session_table::*;
|
||||
pub use match_3_d_click_item_procedure_result_type::Match3DClickItemProcedureResult;
|
||||
pub use match_3_d_creator_config_snapshot_type::Match3DCreatorConfigSnapshot;
|
||||
pub use match_3_d_draft_compile_input_type::Match3DDraftCompileInput;
|
||||
pub use match_3_d_draft_snapshot_type::Match3DDraftSnapshot;
|
||||
pub use match_3_d_item_snapshot_type::Match3DItemSnapshot;
|
||||
pub use match_3_d_run_click_input_type::Match3DRunClickInput;
|
||||
pub use match_3_d_run_get_input_type::Match3DRunGetInput;
|
||||
pub use match_3_d_run_procedure_result_type::Match3DRunProcedureResult;
|
||||
pub use match_3_d_run_restart_input_type::Match3DRunRestartInput;
|
||||
pub use match_3_d_run_snapshot_type::Match3DRunSnapshot;
|
||||
pub use match_3_d_run_start_input_type::Match3DRunStartInput;
|
||||
pub use match_3_d_run_stop_input_type::Match3DRunStopInput;
|
||||
pub use match_3_d_run_time_up_input_type::Match3DRunTimeUpInput;
|
||||
pub use match_3_d_runtime_run_row_type::Match3DRuntimeRunRow;
|
||||
pub use match_3_d_runtime_run_table::*;
|
||||
pub use match_3_d_tray_slot_snapshot_type::Match3DTraySlotSnapshot;
|
||||
pub use match_3_d_work_delete_input_type::Match3DWorkDeleteInput;
|
||||
pub use match_3_d_work_get_input_type::Match3DWorkGetInput;
|
||||
pub use match_3_d_work_procedure_result_type::Match3DWorkProcedureResult;
|
||||
pub use match_3_d_work_profile_row_type::Match3DWorkProfileRow;
|
||||
pub use match_3_d_work_profile_table::*;
|
||||
pub use match_3_d_work_publish_input_type::Match3DWorkPublishInput;
|
||||
pub use match_3_d_work_snapshot_type::Match3DWorkSnapshot;
|
||||
pub use match_3_d_work_update_input_type::Match3DWorkUpdateInput;
|
||||
pub use match_3_d_works_list_input_type::Match3DWorksListInput;
|
||||
pub use match_3_d_works_procedure_result_type::Match3DWorksProcedureResult;
|
||||
@@ -1429,58 +1355,34 @@ pub use puzzle_agent_message_finalize_input_type::PuzzleAgentMessageFinalizeInpu
|
||||
pub use puzzle_agent_message_kind_type::PuzzleAgentMessageKind;
|
||||
pub use puzzle_agent_message_role_type::PuzzleAgentMessageRole;
|
||||
pub use puzzle_agent_message_row_type::PuzzleAgentMessageRow;
|
||||
pub use puzzle_agent_message_snapshot_type::PuzzleAgentMessageSnapshot;
|
||||
pub use puzzle_agent_message_submit_input_type::PuzzleAgentMessageSubmitInput;
|
||||
pub use puzzle_agent_message_table::*;
|
||||
pub use puzzle_agent_session_create_input_type::PuzzleAgentSessionCreateInput;
|
||||
pub use puzzle_agent_session_get_input_type::PuzzleAgentSessionGetInput;
|
||||
pub use puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult;
|
||||
pub use puzzle_agent_session_row_type::PuzzleAgentSessionRow;
|
||||
pub use puzzle_agent_session_snapshot_type::PuzzleAgentSessionSnapshot;
|
||||
pub use puzzle_agent_session_table::*;
|
||||
pub use puzzle_agent_stage_type::PuzzleAgentStage;
|
||||
pub use puzzle_agent_suggested_action_type::PuzzleAgentSuggestedAction;
|
||||
pub use puzzle_anchor_item_type::PuzzleAnchorItem;
|
||||
pub use puzzle_anchor_pack_type::PuzzleAnchorPack;
|
||||
pub use puzzle_anchor_status_type::PuzzleAnchorStatus;
|
||||
pub use puzzle_audio_asset_type::PuzzleAudioAsset;
|
||||
pub use puzzle_board_snapshot_type::PuzzleBoardSnapshot;
|
||||
pub use puzzle_cell_position_type::PuzzleCellPosition;
|
||||
pub use puzzle_creator_intent_type::PuzzleCreatorIntent;
|
||||
pub use puzzle_draft_compile_input_type::PuzzleDraftCompileInput;
|
||||
pub use puzzle_draft_level_type::PuzzleDraftLevel;
|
||||
pub use puzzle_event_kind_type::PuzzleEventKind;
|
||||
pub use puzzle_event_table::*;
|
||||
pub use puzzle_event_type::PuzzleEvent;
|
||||
pub use puzzle_form_draft_save_input_type::PuzzleFormDraftSaveInput;
|
||||
pub use puzzle_form_draft_type::PuzzleFormDraft;
|
||||
pub use puzzle_gallery_view_table::*;
|
||||
pub use puzzle_generated_image_candidate_type::PuzzleGeneratedImageCandidate;
|
||||
pub use puzzle_generated_images_save_input_type::PuzzleGeneratedImagesSaveInput;
|
||||
pub use puzzle_leaderboard_entry_row_type::PuzzleLeaderboardEntryRow;
|
||||
pub use puzzle_leaderboard_entry_table::*;
|
||||
pub use puzzle_leaderboard_entry_type::PuzzleLeaderboardEntry;
|
||||
pub use puzzle_leaderboard_submit_input_type::PuzzleLeaderboardSubmitInput;
|
||||
pub use puzzle_merged_group_state_type::PuzzleMergedGroupState;
|
||||
pub use puzzle_piece_state_type::PuzzlePieceState;
|
||||
pub use puzzle_publication_status_type::PuzzlePublicationStatus;
|
||||
pub use puzzle_publish_input_type::PuzzlePublishInput;
|
||||
pub use puzzle_recommended_next_work_type::PuzzleRecommendedNextWork;
|
||||
pub use puzzle_result_draft_type::PuzzleResultDraft;
|
||||
pub use puzzle_result_preview_blocker_type::PuzzleResultPreviewBlocker;
|
||||
pub use puzzle_result_preview_envelope_type::PuzzleResultPreviewEnvelope;
|
||||
pub use puzzle_result_preview_finding_type::PuzzleResultPreviewFinding;
|
||||
pub use puzzle_run_drag_input_type::PuzzleRunDragInput;
|
||||
pub use puzzle_run_get_input_type::PuzzleRunGetInput;
|
||||
pub use puzzle_run_next_level_input_type::PuzzleRunNextLevelInput;
|
||||
pub use puzzle_run_pause_input_type::PuzzleRunPauseInput;
|
||||
pub use puzzle_run_procedure_result_type::PuzzleRunProcedureResult;
|
||||
pub use puzzle_run_prop_input_type::PuzzleRunPropInput;
|
||||
pub use puzzle_run_snapshot_type::PuzzleRunSnapshot;
|
||||
pub use puzzle_run_start_input_type::PuzzleRunStartInput;
|
||||
pub use puzzle_run_swap_input_type::PuzzleRunSwapInput;
|
||||
pub use puzzle_runtime_level_snapshot_type::PuzzleRuntimeLevelSnapshot;
|
||||
pub use puzzle_runtime_level_status_type::PuzzleRuntimeLevelStatus;
|
||||
pub use puzzle_runtime_run_row_type::PuzzleRuntimeRunRow;
|
||||
pub use puzzle_runtime_run_table::*;
|
||||
pub use puzzle_select_cover_image_input_type::PuzzleSelectCoverImageInput;
|
||||
@@ -1492,7 +1394,6 @@ pub use puzzle_work_point_incentive_claim_input_type::PuzzleWorkPointIncentiveCl
|
||||
pub use puzzle_work_procedure_result_type::PuzzleWorkProcedureResult;
|
||||
pub use puzzle_work_profile_row_type::PuzzleWorkProfileRow;
|
||||
pub use puzzle_work_profile_table::*;
|
||||
pub use puzzle_work_profile_type::PuzzleWorkProfile;
|
||||
pub use puzzle_work_remix_input_type::PuzzleWorkRemixInput;
|
||||
pub use puzzle_work_upsert_input_type::PuzzleWorkUpsertInput;
|
||||
pub use puzzle_works_list_input_type::PuzzleWorksListInput;
|
||||
@@ -1684,41 +1585,30 @@ pub use seed_analytics_date_dimensions_reducer::seed_analytics_date_dimensions;
|
||||
pub use select_puzzle_cover_image_procedure::select_puzzle_cover_image;
|
||||
pub use square_hole_agent_message_finalize_input_type::SquareHoleAgentMessageFinalizeInput;
|
||||
pub use square_hole_agent_message_row_type::SquareHoleAgentMessageRow;
|
||||
pub use square_hole_agent_message_snapshot_type::SquareHoleAgentMessageSnapshot;
|
||||
pub use square_hole_agent_message_submit_input_type::SquareHoleAgentMessageSubmitInput;
|
||||
pub use square_hole_agent_message_table::*;
|
||||
pub use square_hole_agent_session_create_input_type::SquareHoleAgentSessionCreateInput;
|
||||
pub use square_hole_agent_session_get_input_type::SquareHoleAgentSessionGetInput;
|
||||
pub use square_hole_agent_session_procedure_result_type::SquareHoleAgentSessionProcedureResult;
|
||||
pub use square_hole_agent_session_row_type::SquareHoleAgentSessionRow;
|
||||
pub use square_hole_agent_session_snapshot_type::SquareHoleAgentSessionSnapshot;
|
||||
pub use square_hole_agent_session_table::*;
|
||||
pub use square_hole_creator_config_snapshot_type::SquareHoleCreatorConfigSnapshot;
|
||||
pub use square_hole_draft_compile_input_type::SquareHoleDraftCompileInput;
|
||||
pub use square_hole_draft_snapshot_type::SquareHoleDraftSnapshot;
|
||||
pub use square_hole_drop_feedback_snapshot_type::SquareHoleDropFeedbackSnapshot;
|
||||
pub use square_hole_drop_shape_procedure_result_type::SquareHoleDropShapeProcedureResult;
|
||||
pub use square_hole_hole_option_snapshot_type::SquareHoleHoleOptionSnapshot;
|
||||
pub use square_hole_hole_snapshot_type::SquareHoleHoleSnapshot;
|
||||
pub use square_hole_run_drop_input_type::SquareHoleRunDropInput;
|
||||
pub use square_hole_run_get_input_type::SquareHoleRunGetInput;
|
||||
pub use square_hole_run_procedure_result_type::SquareHoleRunProcedureResult;
|
||||
pub use square_hole_run_restart_input_type::SquareHoleRunRestartInput;
|
||||
pub use square_hole_run_snapshot_type::SquareHoleRunSnapshot;
|
||||
pub use square_hole_run_start_input_type::SquareHoleRunStartInput;
|
||||
pub use square_hole_run_stop_input_type::SquareHoleRunStopInput;
|
||||
pub use square_hole_run_time_up_input_type::SquareHoleRunTimeUpInput;
|
||||
pub use square_hole_runtime_run_row_type::SquareHoleRuntimeRunRow;
|
||||
pub use square_hole_runtime_run_table::*;
|
||||
pub use square_hole_shape_option_snapshot_type::SquareHoleShapeOptionSnapshot;
|
||||
pub use square_hole_shape_snapshot_type::SquareHoleShapeSnapshot;
|
||||
pub use square_hole_work_delete_input_type::SquareHoleWorkDeleteInput;
|
||||
pub use square_hole_work_get_input_type::SquareHoleWorkGetInput;
|
||||
pub use square_hole_work_procedure_result_type::SquareHoleWorkProcedureResult;
|
||||
pub use square_hole_work_profile_row_type::SquareHoleWorkProfileRow;
|
||||
pub use square_hole_work_profile_table::*;
|
||||
pub use square_hole_work_publish_input_type::SquareHoleWorkPublishInput;
|
||||
pub use square_hole_work_snapshot_type::SquareHoleWorkSnapshot;
|
||||
pub use square_hole_work_update_input_type::SquareHoleWorkUpdateInput;
|
||||
pub use square_hole_works_list_input_type::SquareHoleWorksListInput;
|
||||
pub use square_hole_works_procedure_result_type::SquareHoleWorksProcedureResult;
|
||||
@@ -1795,31 +1685,24 @@ pub use user_browse_history_table::*;
|
||||
pub use user_browse_history_type::UserBrowseHistory;
|
||||
pub use visual_novel_agent_message_finalize_input_type::VisualNovelAgentMessageFinalizeInput;
|
||||
pub use visual_novel_agent_message_row_type::VisualNovelAgentMessageRow;
|
||||
pub use visual_novel_agent_message_snapshot_type::VisualNovelAgentMessageSnapshot;
|
||||
pub use visual_novel_agent_message_submit_input_type::VisualNovelAgentMessageSubmitInput;
|
||||
pub use visual_novel_agent_message_table::*;
|
||||
pub use visual_novel_agent_session_create_input_type::VisualNovelAgentSessionCreateInput;
|
||||
pub use visual_novel_agent_session_get_input_type::VisualNovelAgentSessionGetInput;
|
||||
pub use visual_novel_agent_session_procedure_result_type::VisualNovelAgentSessionProcedureResult;
|
||||
pub use visual_novel_agent_session_row_type::VisualNovelAgentSessionRow;
|
||||
pub use visual_novel_agent_session_snapshot_type::VisualNovelAgentSessionSnapshot;
|
||||
pub use visual_novel_agent_session_table::*;
|
||||
pub use visual_novel_history_procedure_result_type::VisualNovelHistoryProcedureResult;
|
||||
pub use visual_novel_json_field_type::VisualNovelJsonField;
|
||||
pub use visual_novel_json_value_type::VisualNovelJsonValue;
|
||||
pub use visual_novel_run_get_input_type::VisualNovelRunGetInput;
|
||||
pub use visual_novel_run_procedure_result_type::VisualNovelRunProcedureResult;
|
||||
pub use visual_novel_run_snapshot_type::VisualNovelRunSnapshot;
|
||||
pub use visual_novel_run_snapshot_upsert_input_type::VisualNovelRunSnapshotUpsertInput;
|
||||
pub use visual_novel_run_start_input_type::VisualNovelRunStartInput;
|
||||
pub use visual_novel_runtime_event_procedure_result_type::VisualNovelRuntimeEventProcedureResult;
|
||||
pub use visual_novel_runtime_event_record_input_type::VisualNovelRuntimeEventRecordInput;
|
||||
pub use visual_novel_runtime_event_snapshot_type::VisualNovelRuntimeEventSnapshot;
|
||||
pub use visual_novel_runtime_event_table::*;
|
||||
pub use visual_novel_runtime_event_type::VisualNovelRuntimeEvent;
|
||||
pub use visual_novel_runtime_history_append_input_type::VisualNovelRuntimeHistoryAppendInput;
|
||||
pub use visual_novel_runtime_history_entry_row_type::VisualNovelRuntimeHistoryEntryRow;
|
||||
pub use visual_novel_runtime_history_entry_snapshot_type::VisualNovelRuntimeHistoryEntrySnapshot;
|
||||
pub use visual_novel_runtime_history_entry_table::*;
|
||||
pub use visual_novel_runtime_history_list_input_type::VisualNovelRuntimeHistoryListInput;
|
||||
pub use visual_novel_runtime_run_row_type::VisualNovelRuntimeRunRow;
|
||||
@@ -1831,7 +1714,6 @@ pub use visual_novel_work_procedure_result_type::VisualNovelWorkProcedureResult;
|
||||
pub use visual_novel_work_profile_row_type::VisualNovelWorkProfileRow;
|
||||
pub use visual_novel_work_profile_table::*;
|
||||
pub use visual_novel_work_publish_input_type::VisualNovelWorkPublishInput;
|
||||
pub use visual_novel_work_snapshot_type::VisualNovelWorkSnapshot;
|
||||
pub use visual_novel_work_update_input_type::VisualNovelWorkUpdateInput;
|
||||
pub use visual_novel_works_list_input_type::VisualNovelWorksListInput;
|
||||
pub use visual_novel_works_procedure_result_type::VisualNovelWorksProcedureResult;
|
||||
@@ -2172,7 +2054,7 @@ pub struct DbUpdate {
|
||||
puzzle_agent_message: __sdk::TableUpdate<PuzzleAgentMessageRow>,
|
||||
puzzle_agent_session: __sdk::TableUpdate<PuzzleAgentSessionRow>,
|
||||
puzzle_event: __sdk::TableUpdate<PuzzleEvent>,
|
||||
puzzle_gallery_view: __sdk::TableUpdate<PuzzleWorkProfile>,
|
||||
puzzle_gallery_view: __sdk::TableUpdate<PuzzleGalleryViewRow>,
|
||||
puzzle_leaderboard_entry: __sdk::TableUpdate<PuzzleLeaderboardEntryRow>,
|
||||
puzzle_runtime_run: __sdk::TableUpdate<PuzzleRuntimeRunRow>,
|
||||
puzzle_work_profile: __sdk::TableUpdate<PuzzleWorkProfileRow>,
|
||||
@@ -2966,7 +2848,7 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
&self.visual_novel_work_profile,
|
||||
)
|
||||
.with_updates_by_pk(|row| &row.profile_id);
|
||||
diff.puzzle_gallery_view = cache.apply_diff_to_table::<PuzzleWorkProfile>(
|
||||
diff.puzzle_gallery_view = cache.apply_diff_to_table::<PuzzleGalleryViewRow>(
|
||||
"puzzle_gallery_view",
|
||||
&self.puzzle_gallery_view,
|
||||
);
|
||||
@@ -3611,7 +3493,7 @@ pub struct AppliedDiff<'r> {
|
||||
puzzle_agent_message: __sdk::TableAppliedDiff<'r, PuzzleAgentMessageRow>,
|
||||
puzzle_agent_session: __sdk::TableAppliedDiff<'r, PuzzleAgentSessionRow>,
|
||||
puzzle_event: __sdk::TableAppliedDiff<'r, PuzzleEvent>,
|
||||
puzzle_gallery_view: __sdk::TableAppliedDiff<'r, PuzzleWorkProfile>,
|
||||
puzzle_gallery_view: __sdk::TableAppliedDiff<'r, PuzzleGalleryViewRow>,
|
||||
puzzle_leaderboard_entry: __sdk::TableAppliedDiff<'r, PuzzleLeaderboardEntryRow>,
|
||||
puzzle_runtime_run: __sdk::TableAppliedDiff<'r, PuzzleRuntimeRunRow>,
|
||||
puzzle_work_profile: __sdk::TableAppliedDiff<'r, PuzzleWorkProfileRow>,
|
||||
@@ -3959,7 +3841,7 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
|
||||
&self.puzzle_event,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<PuzzleWorkProfile>(
|
||||
callbacks.invoke_table_row_callbacks::<PuzzleGalleryViewRow>(
|
||||
"puzzle_gallery_view",
|
||||
&self.puzzle_gallery_view,
|
||||
event,
|
||||
|
||||
@@ -2,12 +2,246 @@
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::puzzle_anchor_pack_type::PuzzleAnchorPack;
|
||||
use super::puzzle_draft_level_type::PuzzleDraftLevel;
|
||||
use super::puzzle_publication_status_type::PuzzlePublicationStatus;
|
||||
use super::puzzle_work_profile_type::PuzzleWorkProfile;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, Copy, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
#[derive(Eq, Hash)]
|
||||
pub enum PuzzleGalleryAnchorStatus {
|
||||
Missing,
|
||||
Inferred,
|
||||
Confirmed,
|
||||
Locked,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryAnchorItem {
|
||||
pub key: String,
|
||||
pub label: String,
|
||||
pub value: String,
|
||||
pub status: PuzzleGalleryAnchorStatus,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryAnchorPack {
|
||||
pub theme_promise: PuzzleGalleryAnchorItem,
|
||||
pub visual_subject: PuzzleGalleryAnchorItem,
|
||||
pub visual_mood: PuzzleGalleryAnchorItem,
|
||||
pub composition_hooks: PuzzleGalleryAnchorItem,
|
||||
pub tags_and_forbidden: PuzzleGalleryAnchorItem,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryGeneratedImageCandidate {
|
||||
pub candidate_id: String,
|
||||
pub image_src: String,
|
||||
pub asset_id: String,
|
||||
pub prompt: String,
|
||||
pub actual_prompt: Option<String>,
|
||||
pub source_type: String,
|
||||
pub selected: bool,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryAudioAsset {
|
||||
pub task_id: String,
|
||||
pub provider: String,
|
||||
pub asset_object_id: Option<String>,
|
||||
pub asset_kind: Option<String>,
|
||||
pub audio_src: String,
|
||||
pub prompt: Option<String>,
|
||||
pub title: Option<String>,
|
||||
pub updated_at: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryDraftLevel {
|
||||
pub level_id: String,
|
||||
pub level_name: String,
|
||||
pub picture_description: String,
|
||||
pub picture_reference: Option<String>,
|
||||
pub ui_background_prompt: Option<String>,
|
||||
pub ui_background_image_src: Option<String>,
|
||||
pub ui_background_image_object_key: Option<String>,
|
||||
pub background_music: Option<PuzzleGalleryAudioAsset>,
|
||||
pub candidates: Vec<PuzzleGalleryGeneratedImageCandidate>,
|
||||
pub selected_candidate_id: Option<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub cover_asset_id: Option<String>,
|
||||
pub generation_status: String,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, Copy, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
#[derive(Eq, Hash)]
|
||||
pub enum PuzzleGalleryPublicationStatus {
|
||||
Draft,
|
||||
Published,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryViewRow {
|
||||
pub work_id: String,
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_session_id: Option<String>,
|
||||
pub author_display_name: String,
|
||||
pub work_title: String,
|
||||
pub work_description: String,
|
||||
pub level_name: String,
|
||||
pub summary: String,
|
||||
pub theme_tags: Vec<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub cover_asset_id: Option<String>,
|
||||
pub levels: Vec<PuzzleGalleryDraftLevel>,
|
||||
pub publication_status: PuzzleGalleryPublicationStatus,
|
||||
pub updated_at_micros: i64,
|
||||
pub published_at_micros: Option<i64>,
|
||||
pub play_count: u32,
|
||||
pub remix_count: u32,
|
||||
pub like_count: u32,
|
||||
pub recent_play_count_7d: u32,
|
||||
pub point_incentive_total_half_points: u64,
|
||||
pub point_incentive_claimed_points: u64,
|
||||
pub publish_ready: bool,
|
||||
pub anchor_pack: PuzzleGalleryAnchorPack,
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryAnchorStatus> for module_puzzle::PuzzleAnchorStatus {
|
||||
fn from(status: PuzzleGalleryAnchorStatus) -> Self {
|
||||
match status {
|
||||
PuzzleGalleryAnchorStatus::Missing => Self::Missing,
|
||||
PuzzleGalleryAnchorStatus::Inferred => Self::Inferred,
|
||||
PuzzleGalleryAnchorStatus::Confirmed => Self::Confirmed,
|
||||
PuzzleGalleryAnchorStatus::Locked => Self::Locked,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryAnchorItem> for module_puzzle::PuzzleAnchorItem {
|
||||
fn from(item: PuzzleGalleryAnchorItem) -> Self {
|
||||
Self {
|
||||
key: item.key,
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
status: item.status.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryAnchorPack> for module_puzzle::PuzzleAnchorPack {
|
||||
fn from(pack: PuzzleGalleryAnchorPack) -> Self {
|
||||
Self {
|
||||
theme_promise: pack.theme_promise.into(),
|
||||
visual_subject: pack.visual_subject.into(),
|
||||
visual_mood: pack.visual_mood.into(),
|
||||
composition_hooks: pack.composition_hooks.into(),
|
||||
tags_and_forbidden: pack.tags_and_forbidden.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryGeneratedImageCandidate>
|
||||
for module_puzzle::PuzzleGeneratedImageCandidate
|
||||
{
|
||||
fn from(candidate: PuzzleGalleryGeneratedImageCandidate) -> Self {
|
||||
Self {
|
||||
candidate_id: candidate.candidate_id,
|
||||
image_src: candidate.image_src,
|
||||
asset_id: candidate.asset_id,
|
||||
prompt: candidate.prompt,
|
||||
actual_prompt: candidate.actual_prompt,
|
||||
source_type: candidate.source_type,
|
||||
selected: candidate.selected,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryAudioAsset> for module_puzzle::PuzzleAudioAsset {
|
||||
fn from(asset: PuzzleGalleryAudioAsset) -> Self {
|
||||
Self {
|
||||
task_id: asset.task_id,
|
||||
provider: asset.provider,
|
||||
asset_object_id: asset.asset_object_id,
|
||||
asset_kind: asset.asset_kind,
|
||||
audio_src: asset.audio_src,
|
||||
prompt: asset.prompt,
|
||||
title: asset.title,
|
||||
updated_at: asset.updated_at,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryDraftLevel> for module_puzzle::PuzzleDraftLevel {
|
||||
fn from(level: PuzzleGalleryDraftLevel) -> Self {
|
||||
Self {
|
||||
level_id: level.level_id,
|
||||
level_name: level.level_name,
|
||||
picture_description: level.picture_description,
|
||||
picture_reference: level.picture_reference,
|
||||
ui_background_prompt: level.ui_background_prompt,
|
||||
ui_background_image_src: level.ui_background_image_src,
|
||||
ui_background_image_object_key: level.ui_background_image_object_key,
|
||||
background_music: level.background_music.map(Into::into),
|
||||
candidates: level.candidates.into_iter().map(Into::into).collect(),
|
||||
selected_candidate_id: level.selected_candidate_id,
|
||||
cover_image_src: level.cover_image_src,
|
||||
cover_asset_id: level.cover_asset_id,
|
||||
generation_status: level.generation_status,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryPublicationStatus> for module_puzzle::PuzzlePublicationStatus {
|
||||
fn from(status: PuzzleGalleryPublicationStatus) -> Self {
|
||||
match status {
|
||||
PuzzleGalleryPublicationStatus::Draft => Self::Draft,
|
||||
PuzzleGalleryPublicationStatus::Published => Self::Published,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryViewRow> for module_puzzle::PuzzleWorkProfile {
|
||||
fn from(row: PuzzleGalleryViewRow) -> Self {
|
||||
Self {
|
||||
work_id: row.work_id,
|
||||
profile_id: row.profile_id,
|
||||
owner_user_id: row.owner_user_id,
|
||||
source_session_id: row.source_session_id,
|
||||
author_display_name: row.author_display_name,
|
||||
work_title: row.work_title,
|
||||
work_description: row.work_description,
|
||||
level_name: row.level_name,
|
||||
summary: row.summary,
|
||||
theme_tags: row.theme_tags,
|
||||
cover_image_src: row.cover_image_src,
|
||||
cover_asset_id: row.cover_asset_id,
|
||||
levels: row.levels.into_iter().map(Into::into).collect(),
|
||||
publication_status: row.publication_status.into(),
|
||||
updated_at_micros: row.updated_at_micros,
|
||||
published_at_micros: row.published_at_micros,
|
||||
play_count: row.play_count,
|
||||
remix_count: row.remix_count,
|
||||
like_count: row.like_count,
|
||||
recent_play_count_7d: row.recent_play_count_7d,
|
||||
point_incentive_total_half_points: row.point_incentive_total_half_points,
|
||||
point_incentive_claimed_points: row.point_incentive_claimed_points,
|
||||
publish_ready: row.publish_ready,
|
||||
anchor_pack: row.anchor_pack.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl __sdk::InModule for PuzzleGalleryViewRow {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Table handle for the table `puzzle_gallery_view`.
|
||||
///
|
||||
/// Obtain a handle from the [`PuzzleGalleryViewTableAccess::puzzle_gallery_view`] method on [`super::RemoteTables`],
|
||||
@@ -17,7 +251,7 @@ use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.puzzle_gallery_view().on_insert(...)`.
|
||||
pub struct PuzzleGalleryViewTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<PuzzleWorkProfile>,
|
||||
imp: __sdk::TableHandle<PuzzleGalleryViewRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
@@ -36,7 +270,7 @@ impl PuzzleGalleryViewTableAccess for super::RemoteTables {
|
||||
PuzzleGalleryViewTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<PuzzleWorkProfile>("puzzle_gallery_view"),
|
||||
.get_table::<PuzzleGalleryViewRow>("puzzle_gallery_view"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
@@ -46,13 +280,13 @@ pub struct PuzzleGalleryViewInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct PuzzleGalleryViewDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for PuzzleGalleryViewTableHandle<'ctx> {
|
||||
type Row = PuzzleWorkProfile;
|
||||
type Row = PuzzleGalleryViewRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = PuzzleWorkProfile> + '_ {
|
||||
fn iter(&self) -> impl Iterator<Item = PuzzleGalleryViewRow> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
@@ -85,32 +319,32 @@ impl<'ctx> __sdk::Table for PuzzleGalleryViewTableHandle<'ctx> {
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table = client_cache.get_or_make_table::<PuzzleWorkProfile>("puzzle_gallery_view");
|
||||
let _table = client_cache.get_or_make_table::<PuzzleGalleryViewRow>("puzzle_gallery_view");
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<PuzzleWorkProfile>> {
|
||||
) -> __sdk::Result<__sdk::TableUpdate<PuzzleGalleryViewRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<PuzzleWorkProfile>", "TableUpdate")
|
||||
__sdk::InternalError::failed_parse("TableUpdate<PuzzleGalleryViewRow>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `PuzzleWorkProfile`.
|
||||
/// Extension trait for query builder access to the table `PuzzleGalleryViewRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait puzzle_gallery_viewQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `PuzzleWorkProfile`.
|
||||
fn puzzle_gallery_view(&self) -> __sdk::__query_builder::Table<PuzzleWorkProfile>;
|
||||
/// Get a query builder for the table `PuzzleGalleryViewRow`.
|
||||
fn puzzle_gallery_view(&self) -> __sdk::__query_builder::Table<PuzzleGalleryViewRow>;
|
||||
}
|
||||
|
||||
impl puzzle_gallery_viewQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn puzzle_gallery_view(&self) -> __sdk::__query_builder::Table<PuzzleWorkProfile> {
|
||||
fn puzzle_gallery_view(&self) -> __sdk::__query_builder::Table<PuzzleGalleryViewRow> {
|
||||
__sdk::__query_builder::Table::new("puzzle_gallery_view")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,19 +9,22 @@ impl SpacetimeClient {
|
||||
validate_npc_battle_interaction_input(&input)?;
|
||||
let procedure_input = input.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.resolve_npc_battle_interaction_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_npc_battle_interaction_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"resolve_npc_battle_interaction_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.resolve_npc_battle_interaction_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_npc_battle_interaction_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("create_puzzle_agent_session", move |connection, sender| {
|
||||
connection.procedures().create_puzzle_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -83,7 +83,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_puzzle_agent_session", move |connection, sender| {
|
||||
connection.procedures().get_puzzle_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -108,7 +108,7 @@ impl SpacetimeClient {
|
||||
saved_at_micros: input.saved_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("save_puzzle_form_draft", move |connection, sender| {
|
||||
connection.procedures().save_puzzle_form_draft_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -134,7 +134,7 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("submit_puzzle_agent_message", move |connection, sender| {
|
||||
connection.procedures().submit_puzzle_agent_message_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -164,16 +164,19 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_puzzle_agent_message_turn_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_puzzle_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"finalize_puzzle_agent_message_turn",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_puzzle_agent_message_turn_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_puzzle_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -189,7 +192,7 @@ impl SpacetimeClient {
|
||||
compiled_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("compile_puzzle_agent_draft", move |connection, sender| {
|
||||
connection.procedures().compile_puzzle_agent_draft_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -216,7 +219,7 @@ impl SpacetimeClient {
|
||||
saved_at_micros: input.saved_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("save_puzzle_generated_images", move |connection, sender| {
|
||||
connection.procedures().save_puzzle_generated_images_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -245,7 +248,7 @@ impl SpacetimeClient {
|
||||
saved_at_micros: input.saved_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("save_puzzle_ui_background", move |connection, sender| {
|
||||
connection.procedures().save_puzzle_ui_background_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -271,7 +274,7 @@ impl SpacetimeClient {
|
||||
selected_at_micros: input.selected_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("select_puzzle_cover_image", move |connection, sender| {
|
||||
connection.procedures().select_puzzle_cover_image_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -304,7 +307,7 @@ impl SpacetimeClient {
|
||||
published_at_micros: input.published_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("publish_puzzle_work", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.publish_puzzle_work_then(procedure_input, move |_, result| {
|
||||
@@ -323,7 +326,7 @@ impl SpacetimeClient {
|
||||
) -> Result<Vec<PuzzleWorkProfileRecord>, SpacetimeClientError> {
|
||||
let procedure_input = PuzzleWorksListInput { owner_user_id };
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_puzzle_works", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.list_puzzle_works_then(procedure_input, move |_, result| {
|
||||
@@ -342,7 +345,7 @@ impl SpacetimeClient {
|
||||
) -> Result<PuzzleWorkProfileRecord, SpacetimeClientError> {
|
||||
let procedure_input = PuzzleWorkGetInput { profile_id };
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_puzzle_work_detail", move |connection, sender| {
|
||||
connection.procedures().get_puzzle_work_detail_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -374,7 +377,7 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("update_puzzle_work", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.update_puzzle_work_then(procedure_input, move |_, result| {
|
||||
@@ -397,7 +400,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("delete_puzzle_work", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.delete_puzzle_work_then(procedure_input, move |_, result| {
|
||||
@@ -420,16 +423,19 @@ impl SpacetimeClient {
|
||||
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);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"claim_puzzle_work_point_incentive",
|
||||
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
|
||||
}
|
||||
|
||||
@@ -443,7 +449,7 @@ impl SpacetimeClient {
|
||||
Ok(items
|
||||
.into_iter()
|
||||
.map(|item| {
|
||||
let mut record = map_puzzle_work_profile(item);
|
||||
let mut record = map_puzzle_work_profile(item.into());
|
||||
record.recent_play_count_7d = recent_play_counts
|
||||
.get(&record.profile_id)
|
||||
.copied()
|
||||
@@ -461,7 +467,7 @@ impl SpacetimeClient {
|
||||
) -> Result<PuzzleWorkProfileRecord, SpacetimeClientError> {
|
||||
let procedure_input = PuzzleWorkGetInput { profile_id };
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_puzzle_gallery_detail", move |connection, sender| {
|
||||
connection.procedures().get_puzzle_gallery_detail_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -485,7 +491,7 @@ impl SpacetimeClient {
|
||||
liked_at_micros: input.liked_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("record_puzzle_work_like", move |connection, sender| {
|
||||
connection.procedures().record_puzzle_work_like_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -514,7 +520,7 @@ impl SpacetimeClient {
|
||||
remixed_at_micros: input.remixed_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("remix_puzzle_work", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.remix_puzzle_work_then(procedure_input, move |_, result| {
|
||||
@@ -539,7 +545,7 @@ impl SpacetimeClient {
|
||||
started_at_micros: input.started_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("start_puzzle_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.start_puzzle_run_then(procedure_input, move |_, result| {
|
||||
@@ -562,7 +568,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_puzzle_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_puzzle_run_then(procedure_input, move |_, result| {
|
||||
@@ -587,7 +593,7 @@ impl SpacetimeClient {
|
||||
swapped_at_micros: input.swapped_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("swap_puzzle_pieces", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.swap_puzzle_pieces_then(procedure_input, move |_, result| {
|
||||
@@ -613,7 +619,7 @@ impl SpacetimeClient {
|
||||
dragged_at_micros: input.dragged_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("drag_puzzle_piece_or_group", move |connection, sender| {
|
||||
connection.procedures().drag_puzzle_piece_or_group_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -638,7 +644,7 @@ impl SpacetimeClient {
|
||||
advanced_at_micros: input.advanced_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("advance_puzzle_next_level", move |connection, sender| {
|
||||
connection.procedures().advance_puzzle_next_level_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -663,7 +669,7 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("update_puzzle_run_pause", move |connection, sender| {
|
||||
connection.procedures().update_puzzle_run_pause_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -689,7 +695,7 @@ impl SpacetimeClient {
|
||||
spent_points: input.spent_points,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("use_puzzle_runtime_prop", move |connection, sender| {
|
||||
connection.procedures().use_puzzle_runtime_prop_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -717,16 +723,19 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_puzzle_leaderboard_entry_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_puzzle_run_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"submit_puzzle_leaderboard_entry",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_puzzle_leaderboard_entry_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_puzzle_run_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ impl SpacetimeClient {
|
||||
pub async fn get_creation_entry_config(
|
||||
&self,
|
||||
) -> Result<CreationEntryConfigRecord, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_creation_entry_config", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_creation_entry_config_then(move |_, result| {
|
||||
@@ -22,16 +22,19 @@ impl SpacetimeClient {
|
||||
input: module_runtime::CreationEntryTypeAdminUpsertInput,
|
||||
) -> Result<CreationEntryConfigRecord, SpacetimeClientError> {
|
||||
let procedure_input: CreationEntryTypeAdminUpsertInput = input.into();
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_creation_entry_type_config_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_creation_entry_config_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"upsert_creation_entry_type_config",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_creation_entry_type_config_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_creation_entry_config_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -43,17 +46,20 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().get_runtime_setting_or_default_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_setting_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_runtime_setting_or_default",
|
||||
move |connection, sender| {
|
||||
connection.procedures().get_runtime_setting_or_default_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_setting_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -65,7 +71,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_platform_browse_history", move |connection, sender| {
|
||||
connection.procedures().list_platform_browse_history_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -87,7 +93,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_profile_dashboard", move |connection, sender| {
|
||||
connection.procedures().get_profile_dashboard_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -109,7 +115,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_profile_wallet_ledger", move |connection, sender| {
|
||||
connection.procedures().list_profile_wallet_ledger_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -131,19 +137,22 @@ impl SpacetimeClient {
|
||||
.map_err(|error| SpacetimeClientError::Runtime(error.to_string()))?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.grant_new_user_registration_wallet_reward_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_runtime_profile_wallet_adjustment_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"grant_new_user_registration_wallet_reward",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.grant_new_user_registration_wallet_reward_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_runtime_profile_wallet_adjustment_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -163,19 +172,22 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.consume_profile_wallet_points_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_wallet_adjustment_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"consume_profile_wallet_points_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.consume_profile_wallet_points_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_wallet_adjustment_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -195,16 +207,22 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.refund_profile_wallet_points_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_wallet_adjustment_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"refund_profile_wallet_points_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.refund_profile_wallet_points_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_wallet_adjustment_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -216,7 +234,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_profile_recharge_center", move |connection, sender| {
|
||||
connection.procedures().get_profile_recharge_center_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -252,19 +270,22 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_profile_recharge_order_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_recharge_order_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"create_profile_recharge_order_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_profile_recharge_order_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_recharge_order_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -282,16 +303,22 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_profile_recharge_order_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_recharge_order_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_profile_recharge_order_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_profile_recharge_order_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_recharge_order_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -315,19 +342,22 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.mark_profile_recharge_order_paid_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_recharge_order_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"mark_profile_recharge_order_paid_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.mark_profile_recharge_order_paid_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_recharge_order_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -349,16 +379,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_profile_feedback_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_feedback_submission_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"submit_profile_feedback_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_profile_feedback_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_feedback_submission_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -370,16 +403,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_profile_referral_invite_center_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_referral_invite_center_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_profile_referral_invite_center",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_profile_referral_invite_center_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_referral_invite_center_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -394,16 +430,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.redeem_profile_referral_invite_code_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_referral_redeem_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"redeem_profile_referral_invite_code",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.redeem_profile_referral_invite_code_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_referral_redeem_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -418,7 +457,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("redeem_profile_reward_code", move |connection, sender| {
|
||||
connection.procedures().redeem_profile_reward_code_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -481,16 +520,19 @@ impl SpacetimeClient {
|
||||
occurred_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_tracking_event_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_tracking_event_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"record_tracking_event_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_tracking_event_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_tracking_event_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -502,7 +544,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_profile_task_center", move |connection, sender| {
|
||||
connection.procedures().get_profile_task_center_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -525,16 +567,22 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.claim_profile_task_reward_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_task_claim_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"claim_profile_task_reward_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.claim_profile_task_reward_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_task_claim_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -550,7 +598,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("query_analytics_metric", move |connection, sender| {
|
||||
connection.procedures().query_analytics_metric_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -572,16 +620,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_list_profile_task_configs_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_task_config_admin_list_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"admin_list_profile_task_configs",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_list_profile_task_configs_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_task_config_admin_list_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -617,16 +668,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_upsert_profile_task_config_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_task_config_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"admin_upsert_profile_task_config",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_upsert_profile_task_config_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_task_config_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -644,16 +698,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_disable_profile_task_config_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_task_config_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"admin_disable_profile_task_config",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_disable_profile_task_config_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_task_config_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -666,16 +723,24 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_list_profile_recharge_products_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_recharge_product_admin_list_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"admin_list_profile_recharge_products",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_list_profile_recharge_products_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(
|
||||
map_runtime_profile_recharge_product_admin_list_procedure_result,
|
||||
);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -716,16 +781,24 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_upsert_profile_recharge_product_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_recharge_product_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"admin_upsert_profile_recharge_product",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_upsert_profile_recharge_product_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(
|
||||
map_runtime_profile_recharge_product_admin_procedure_result,
|
||||
);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -755,16 +828,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_upsert_profile_redeem_code_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_redeem_code_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"admin_upsert_profile_redeem_code",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_upsert_profile_redeem_code_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_redeem_code_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -776,16 +852,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_list_profile_redeem_codes_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_redeem_code_admin_list_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"admin_list_profile_redeem_codes",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_list_profile_redeem_codes_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_redeem_code_admin_list_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -803,16 +882,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_disable_profile_redeem_code_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_redeem_code_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"admin_disable_profile_redeem_code",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_disable_profile_redeem_code_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_redeem_code_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -836,16 +918,19 @@ impl SpacetimeClient {
|
||||
.map_err(|error| SpacetimeClientError::Runtime(error.to_string()))?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_upsert_profile_invite_code_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_runtime_profile_invite_code_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"admin_upsert_profile_invite_code",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_upsert_profile_invite_code_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_runtime_profile_invite_code_admin_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -857,16 +942,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_list_profile_invite_codes_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_invite_code_admin_list_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"admin_list_profile_invite_codes",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.admin_list_profile_invite_codes_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_invite_code_admin_list_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -878,7 +966,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_profile_play_stats", move |connection, sender| {
|
||||
connection.procedures().get_profile_play_stats_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -900,7 +988,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_runtime_snapshot", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_runtime_snapshot_then(procedure_input, move |_, result| {
|
||||
@@ -933,16 +1021,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_runtime_snapshot_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_snapshot_required_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"upsert_runtime_snapshot_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_runtime_snapshot_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_snapshot_required_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -954,16 +1045,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.delete_runtime_snapshot_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_snapshot_delete_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"delete_runtime_snapshot_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.delete_runtime_snapshot_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_snapshot_delete_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -975,7 +1069,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_profile_save_archives", move |connection, sender| {
|
||||
connection.procedures().list_profile_save_archives_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -999,16 +1093,22 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.resume_profile_save_archive_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_save_archive_resume_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"resume_profile_save_archive_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.resume_profile_save_archive_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_profile_save_archive_resume_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -1028,16 +1128,19 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_runtime_setting_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_setting_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"upsert_runtime_setting_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_runtime_setting_and_return_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_setting_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -1052,19 +1155,22 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_platform_browse_history_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_browse_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"upsert_platform_browse_history_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_platform_browse_history_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_browse_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -1076,19 +1182,22 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.clear_platform_browse_history_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_browse_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"clear_platform_browse_history_and_return",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.clear_platform_browse_history_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_runtime_browse_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,16 +16,19 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_square_hole_agent_session_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_square_hole_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"create_square_hole_agent_session",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_square_hole_agent_session_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_square_hole_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -39,17 +42,20 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().get_square_hole_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_square_hole_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_square_hole_agent_session",
|
||||
move |connection, sender| {
|
||||
connection.procedures().get_square_hole_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_square_hole_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -65,16 +71,19 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_square_hole_agent_message_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_square_hole_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"submit_square_hole_agent_message",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_square_hole_agent_message_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_square_hole_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -94,16 +103,22 @@ impl SpacetimeClient {
|
||||
error_message: input.error_message,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_square_hole_agent_message_turn_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_square_hole_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"finalize_square_hole_agent_message_turn",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_square_hole_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_square_hole_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -123,7 +138,7 @@ impl SpacetimeClient {
|
||||
compiled_at_micros: input.compiled_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("compile_square_hole_draft", move |connection, sender| {
|
||||
connection.procedures().compile_square_hole_draft_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -159,7 +174,7 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("update_square_hole_work", move |connection, sender| {
|
||||
connection.procedures().update_square_hole_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -185,7 +200,7 @@ impl SpacetimeClient {
|
||||
published_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("publish_square_hole_work", move |connection, sender| {
|
||||
connection.procedures().publish_square_hole_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -225,7 +240,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
procedure_input: SquareHoleWorksListInput,
|
||||
) -> Result<Vec<SquareHoleWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_square_hole_works", move |connection, sender| {
|
||||
connection.procedures().list_square_hole_works_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -249,7 +264,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_square_hole_work_detail", move |connection, sender| {
|
||||
connection.procedures().get_square_hole_work_detail_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -273,7 +288,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("delete_square_hole_work", move |connection, sender| {
|
||||
connection.procedures().delete_square_hole_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -298,7 +313,7 @@ impl SpacetimeClient {
|
||||
started_at_ms: input.started_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("start_square_hole_run", move |connection, sender| {
|
||||
connection.procedures().start_square_hole_run_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -322,7 +337,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_square_hole_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_square_hole_run_then(procedure_input, move |_, result| {
|
||||
@@ -349,7 +364,7 @@ impl SpacetimeClient {
|
||||
dropped_at_ms: input.dropped_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("drop_square_hole_shape", move |connection, sender| {
|
||||
connection.procedures().drop_square_hole_shape_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -379,7 +394,7 @@ impl SpacetimeClient {
|
||||
stopped_at_ms: input.stopped_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("stop_square_hole_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.stop_square_hole_run_then(procedure_input, move |_, result| {
|
||||
@@ -403,7 +418,7 @@ impl SpacetimeClient {
|
||||
restarted_at_ms: input.restarted_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("restart_square_hole_run", move |connection, sender| {
|
||||
connection.procedures().restart_square_hole_run_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -427,7 +442,7 @@ impl SpacetimeClient {
|
||||
finished_at_ms: input.finished_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("finish_square_hole_time_up", move |connection, sender| {
|
||||
connection.procedures().finish_square_hole_time_up_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
|
||||
@@ -23,17 +23,20 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().begin_story_session_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_story_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"begin_story_session_and_return",
|
||||
move |connection, sender| {
|
||||
connection.procedures().begin_story_session_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(SpacetimeClientError::from_sdk_error)
|
||||
.and_then(map_story_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -55,7 +58,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("continue_story_and_return", move |connection, sender| {
|
||||
connection.procedures().continue_story_and_return_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -77,7 +80,7 @@ impl SpacetimeClient {
|
||||
.map_err(SpacetimeClientError::validation_failed)?
|
||||
.into();
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_story_session_state", move |connection, sender| {
|
||||
connection.procedures().get_story_session_state_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
|
||||
75
server-rs/crates/spacetime-client/src/telemetry.rs
Normal file
75
server-rs/crates/spacetime-client/src/telemetry.rs
Normal file
@@ -0,0 +1,75 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use opentelemetry::{KeyValue, global, metrics::Counter};
|
||||
|
||||
use crate::SpacetimeClientError;
|
||||
|
||||
// SpacetimeDB procedure 指标只使用 procedure / status_class 等低基数字段,避免把用户或作品 ID 写进指标标签。
|
||||
pub(crate) struct ProcedureMetricsGuard {
|
||||
procedure: &'static str,
|
||||
started_at: std::time::Instant,
|
||||
}
|
||||
|
||||
pub(crate) fn begin_procedure(procedure: &'static str) -> ProcedureMetricsGuard {
|
||||
ProcedureMetricsGuard {
|
||||
procedure,
|
||||
started_at: std::time::Instant::now(),
|
||||
}
|
||||
}
|
||||
|
||||
impl ProcedureMetricsGuard {
|
||||
pub(crate) fn finish<T>(&self, result: &Result<T, SpacetimeClientError>) {
|
||||
let duration = self.started_at.elapsed();
|
||||
record_procedure(self.procedure, duration, result.is_err());
|
||||
}
|
||||
}
|
||||
|
||||
struct SpacetimeMetrics {
|
||||
calls: Counter<u64>,
|
||||
errors: Counter<u64>,
|
||||
duration_ms: opentelemetry::metrics::Histogram<f64>,
|
||||
}
|
||||
|
||||
fn spacetime_metrics() -> &'static SpacetimeMetrics {
|
||||
static METRICS: std::sync::OnceLock<SpacetimeMetrics> = std::sync::OnceLock::new();
|
||||
METRICS.get_or_init(|| {
|
||||
let meter = global::meter("genarrative-spacetime-client");
|
||||
SpacetimeMetrics {
|
||||
calls: meter
|
||||
.u64_counter("genarrative.spacetime.procedure.calls")
|
||||
.with_description("SpacetimeDB procedure call count")
|
||||
.build(),
|
||||
errors: meter
|
||||
.u64_counter("genarrative.spacetime.procedure.errors")
|
||||
.with_description("SpacetimeDB procedure error count")
|
||||
.build(),
|
||||
duration_ms: meter
|
||||
.f64_histogram("genarrative.spacetime.procedure.duration_ms")
|
||||
.with_unit("ms")
|
||||
.with_description("SpacetimeDB procedure duration in milliseconds")
|
||||
.build(),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn record_procedure(
|
||||
procedure: &'static str,
|
||||
duration: Duration,
|
||||
failed: bool,
|
||||
) {
|
||||
let labels = vec![
|
||||
KeyValue::new("procedure", procedure),
|
||||
KeyValue::new(
|
||||
"status_class",
|
||||
if failed { "error" } else { "ok" },
|
||||
),
|
||||
];
|
||||
let metrics = spacetime_metrics();
|
||||
metrics.calls.add(1, &labels);
|
||||
metrics
|
||||
.duration_ms
|
||||
.record(duration.as_secs_f64() * 1000.0, &labels);
|
||||
if failed {
|
||||
metrics.errors.add(1, &labels);
|
||||
}
|
||||
}
|
||||
@@ -28,16 +28,19 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_visual_novel_agent_session_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"create_visual_novel_agent_session",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.create_visual_novel_agent_session_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -51,17 +54,20 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().get_visual_novel_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"get_visual_novel_agent_session",
|
||||
move |connection, sender| {
|
||||
connection.procedures().get_visual_novel_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -77,16 +83,19 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_visual_novel_agent_message_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"submit_visual_novel_agent_message",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.submit_visual_novel_agent_message_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -107,19 +116,22 @@ impl SpacetimeClient {
|
||||
error_message: input.error_message,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_visual_novel_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"finalize_visual_novel_agent_message_turn",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_visual_novel_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -140,16 +152,19 @@ impl SpacetimeClient {
|
||||
compiled_at_micros: input.compiled_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.compile_visual_novel_work_profile_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"compile_visual_novel_work_profile",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.compile_visual_novel_work_profile_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -170,7 +185,7 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("update_visual_novel_work", move |connection, sender| {
|
||||
connection.procedures().update_visual_novel_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -196,7 +211,7 @@ impl SpacetimeClient {
|
||||
published_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("publish_visual_novel_work", move |connection, sender| {
|
||||
connection.procedures().publish_visual_novel_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -236,7 +251,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
procedure_input: VisualNovelWorksListInput,
|
||||
) -> Result<Vec<VisualNovelWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_visual_novel_works", move |connection, sender| {
|
||||
connection.procedures().list_visual_novel_works_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -260,7 +275,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_visual_novel_work_detail", move |connection, sender| {
|
||||
connection.procedures().get_visual_novel_work_detail_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -284,7 +299,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("delete_visual_novel_work", move |connection, sender| {
|
||||
connection.procedures().delete_visual_novel_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -311,7 +326,7 @@ impl SpacetimeClient {
|
||||
started_at_micros: input.started_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("start_visual_novel_run", move |connection, sender| {
|
||||
connection.procedures().start_visual_novel_run_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -335,7 +350,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_visual_novel_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_visual_novel_run_then(procedure_input, move |_, result| {
|
||||
@@ -367,16 +382,19 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_visual_novel_run_snapshot_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_run_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"upsert_visual_novel_run_snapshot",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.upsert_visual_novel_run_snapshot_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_run_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -397,19 +415,22 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.append_visual_novel_runtime_history_entry_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"append_visual_novel_runtime_history_entry",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.append_visual_novel_runtime_history_entry_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -423,16 +444,19 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.list_visual_novel_runtime_history_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"list_visual_novel_runtime_history",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.list_visual_novel_runtime_history_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_history_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -452,16 +476,19 @@ impl SpacetimeClient {
|
||||
occurred_at_micros: input.occurred_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_visual_novel_runtime_event_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_runtime_event_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"record_visual_novel_runtime_event",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.record_visual_novel_runtime_event_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_visual_novel_runtime_event_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user