Merge branch 'codex/backend-rewrite-spacetimedb' of http://82.157.175.59:3000/GenarrativeAI/Genarrative into codex/backend-rewrite-spacetimedb
# Conflicts: # server-rs/crates/spacetime-client/src/lib.rs # src/components/platform-entry/PlatformEntryFlowShellImpl.tsx
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use super::*;
|
||||
use crate::mapper::*;
|
||||
use crate::module_bindings::delete_big_fish_work_procedure::delete_big_fish_work;
|
||||
|
||||
impl SpacetimeClient {
|
||||
pub async fn create_big_fish_session(
|
||||
@@ -71,6 +72,29 @@ impl SpacetimeClient {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn delete_big_fish_work(
|
||||
&self,
|
||||
session_id: String,
|
||||
owner_user_id: String,
|
||||
) -> Result<Vec<BigFishWorkSummaryRecord>, SpacetimeClientError> {
|
||||
let procedure_input = BigFishWorkDeleteInput {
|
||||
session_id,
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.delete_big_fish_work_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_big_fish_works_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn submit_big_fish_message(
|
||||
&self,
|
||||
input: BigFishMessageSubmitRecordInput,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use super::*;
|
||||
use crate::mapper::*;
|
||||
use crate::module_bindings::delete_custom_world_agent_session_procedure::delete_custom_world_agent_session;
|
||||
|
||||
impl SpacetimeClient {
|
||||
pub async fn list_custom_world_profiles(
|
||||
@@ -310,6 +311,29 @@ impl SpacetimeClient {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn delete_custom_world_agent_session(
|
||||
&self,
|
||||
session_id: String,
|
||||
owner_user_id: String,
|
||||
) -> Result<Vec<CustomWorldWorkSummaryRecord>, SpacetimeClientError> {
|
||||
let procedure_input = CustomWorldAgentSessionGetInput {
|
||||
session_id,
|
||||
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(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_custom_world_works_list_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_custom_world_agent_card_detail(
|
||||
&self,
|
||||
session_id: String,
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{
|
||||
self as __sdk,
|
||||
__lib,
|
||||
__sats,
|
||||
__ws,
|
||||
};
|
||||
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct BigFishWorkDeleteInput {
|
||||
pub session_id: String,
|
||||
pub owner_user_id: String,
|
||||
}
|
||||
|
||||
|
||||
impl __sdk::InModule for BigFishWorkDeleteInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{
|
||||
self as __sdk,
|
||||
__lib,
|
||||
__sats,
|
||||
__ws,
|
||||
};
|
||||
|
||||
use super::big_fish_work_delete_input_type::BigFishWorkDeleteInput;
|
||||
use super::big_fish_works_procedure_result_type::BigFishWorksProcedureResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct DeleteBigFishWorkArgs {
|
||||
pub input: BigFishWorkDeleteInput,
|
||||
}
|
||||
|
||||
|
||||
impl __sdk::InModule for DeleteBigFishWorkArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `delete_big_fish_work`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait delete_big_fish_work {
|
||||
fn delete_big_fish_work(&self, input: BigFishWorkDeleteInput,
|
||||
) {
|
||||
self.delete_big_fish_work_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn delete_big_fish_work_then(
|
||||
&self,
|
||||
input: BigFishWorkDeleteInput,
|
||||
|
||||
__callback: impl FnOnce(&super::ProcedureEventContext, Result<BigFishWorksProcedureResult, __sdk::InternalError>) + Send + 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl delete_big_fish_work for super::RemoteProcedures {
|
||||
fn delete_big_fish_work_then(
|
||||
&self,
|
||||
input: BigFishWorkDeleteInput,
|
||||
|
||||
__callback: impl FnOnce(&super::ProcedureEventContext, Result<BigFishWorksProcedureResult, __sdk::InternalError>) + Send + 'static,
|
||||
) {
|
||||
self.imp.invoke_procedure_with_callback::<_, BigFishWorksProcedureResult>(
|
||||
"delete_big_fish_work",
|
||||
DeleteBigFishWorkArgs { input, },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{
|
||||
self as __sdk,
|
||||
__lib,
|
||||
__sats,
|
||||
__ws,
|
||||
};
|
||||
|
||||
use super::custom_world_agent_session_get_input_type::CustomWorldAgentSessionGetInput;
|
||||
use super::custom_world_works_list_result_type::CustomWorldWorksListResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct DeleteCustomWorldAgentSessionArgs {
|
||||
pub input: CustomWorldAgentSessionGetInput,
|
||||
}
|
||||
|
||||
|
||||
impl __sdk::InModule for DeleteCustomWorldAgentSessionArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `delete_custom_world_agent_session`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait delete_custom_world_agent_session {
|
||||
fn delete_custom_world_agent_session(&self, input: CustomWorldAgentSessionGetInput,
|
||||
) {
|
||||
self.delete_custom_world_agent_session_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn delete_custom_world_agent_session_then(
|
||||
&self,
|
||||
input: CustomWorldAgentSessionGetInput,
|
||||
|
||||
__callback: impl FnOnce(&super::ProcedureEventContext, Result<CustomWorldWorksListResult, __sdk::InternalError>) + Send + 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl delete_custom_world_agent_session for super::RemoteProcedures {
|
||||
fn delete_custom_world_agent_session_then(
|
||||
&self,
|
||||
input: CustomWorldAgentSessionGetInput,
|
||||
|
||||
__callback: impl FnOnce(&super::ProcedureEventContext, Result<CustomWorldWorksListResult, __sdk::InternalError>) + Send + 'static,
|
||||
) {
|
||||
self.imp.invoke_procedure_with_callback::<_, CustomWorldWorksListResult>(
|
||||
"delete_custom_world_agent_session",
|
||||
DeleteCustomWorldAgentSessionArgs { input, },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{
|
||||
self as __sdk,
|
||||
__lib,
|
||||
__sats,
|
||||
__ws,
|
||||
};
|
||||
|
||||
use super::puzzle_work_delete_input_type::PuzzleWorkDeleteInput;
|
||||
use super::puzzle_works_procedure_result_type::PuzzleWorksProcedureResult;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
struct DeletePuzzleWorkArgs {
|
||||
pub input: PuzzleWorkDeleteInput,
|
||||
}
|
||||
|
||||
|
||||
impl __sdk::InModule for DeletePuzzleWorkArgs {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the procedure `delete_puzzle_work`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteProcedures`].
|
||||
pub trait delete_puzzle_work {
|
||||
fn delete_puzzle_work(&self, input: PuzzleWorkDeleteInput,
|
||||
) {
|
||||
self.delete_puzzle_work_then(input, |_, _| {});
|
||||
}
|
||||
|
||||
fn delete_puzzle_work_then(
|
||||
&self,
|
||||
input: PuzzleWorkDeleteInput,
|
||||
|
||||
__callback: impl FnOnce(&super::ProcedureEventContext, Result<PuzzleWorksProcedureResult, __sdk::InternalError>) + Send + 'static,
|
||||
);
|
||||
}
|
||||
|
||||
impl delete_puzzle_work for super::RemoteProcedures {
|
||||
fn delete_puzzle_work_then(
|
||||
&self,
|
||||
input: PuzzleWorkDeleteInput,
|
||||
|
||||
__callback: impl FnOnce(&super::ProcedureEventContext, Result<PuzzleWorksProcedureResult, __sdk::InternalError>) + Send + 'static,
|
||||
) {
|
||||
self.imp.invoke_procedure_with_callback::<_, PuzzleWorksProcedureResult>(
|
||||
"delete_puzzle_work",
|
||||
DeletePuzzleWorkArgs { input, },
|
||||
__callback,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -94,6 +94,7 @@ 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_works_list_input_type;
|
||||
pub mod big_fish_works_procedure_result_type;
|
||||
pub mod chapter_pace_band_type;
|
||||
@@ -213,6 +214,7 @@ pub mod puzzle_run_start_input_type;
|
||||
pub mod puzzle_run_swap_input_type;
|
||||
pub mod puzzle_runtime_run_row_type;
|
||||
pub mod puzzle_select_cover_image_input_type;
|
||||
pub mod puzzle_work_delete_input_type;
|
||||
pub mod puzzle_work_get_input_type;
|
||||
pub mod puzzle_work_procedure_result_type;
|
||||
pub mod puzzle_work_profile_row_type;
|
||||
@@ -406,7 +408,10 @@ pub mod create_battle_state_and_return_procedure;
|
||||
pub mod create_big_fish_session_procedure;
|
||||
pub mod create_custom_world_agent_session_procedure;
|
||||
pub mod create_puzzle_agent_session_procedure;
|
||||
pub mod delete_big_fish_work_procedure;
|
||||
pub mod delete_custom_world_agent_session_procedure;
|
||||
pub mod delete_custom_world_profile_and_return_procedure;
|
||||
pub mod delete_puzzle_work_procedure;
|
||||
pub mod delete_runtime_snapshot_and_return_procedure;
|
||||
pub mod drag_puzzle_piece_or_group_procedure;
|
||||
pub mod execute_custom_world_agent_action_procedure;
|
||||
@@ -561,6 +566,7 @@ 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_works_list_input_type::BigFishWorksListInput;
|
||||
pub use big_fish_works_procedure_result_type::BigFishWorksProcedureResult;
|
||||
pub use chapter_pace_band_type::ChapterPaceBand;
|
||||
@@ -680,6 +686,7 @@ pub use puzzle_run_start_input_type::PuzzleRunStartInput;
|
||||
pub use puzzle_run_swap_input_type::PuzzleRunSwapInput;
|
||||
pub use puzzle_runtime_run_row_type::PuzzleRuntimeRunRow;
|
||||
pub use puzzle_select_cover_image_input_type::PuzzleSelectCoverImageInput;
|
||||
pub use puzzle_work_delete_input_type::PuzzleWorkDeleteInput;
|
||||
pub use puzzle_work_get_input_type::PuzzleWorkGetInput;
|
||||
pub use puzzle_work_procedure_result_type::PuzzleWorkProcedureResult;
|
||||
pub use puzzle_work_profile_row_type::PuzzleWorkProfileRow;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{
|
||||
self as __sdk,
|
||||
__lib,
|
||||
__sats,
|
||||
__ws,
|
||||
};
|
||||
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleWorkDeleteInput {
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
}
|
||||
|
||||
|
||||
impl __sdk::InModule for PuzzleWorkDeleteInput {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
use super::*;
|
||||
use crate::mapper::*;
|
||||
use crate::module_bindings::delete_puzzle_work_procedure::delete_puzzle_work;
|
||||
|
||||
impl SpacetimeClient {
|
||||
pub async fn create_puzzle_agent_session(
|
||||
@@ -280,6 +281,29 @@ impl SpacetimeClient {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn delete_puzzle_work(
|
||||
&self,
|
||||
profile_id: String,
|
||||
owner_user_id: String,
|
||||
) -> Result<Vec<PuzzleWorkProfileRecord>, SpacetimeClientError> {
|
||||
let procedure_input = PuzzleWorkDeleteInput {
|
||||
profile_id,
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.delete_puzzle_work_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_puzzle_works_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn list_puzzle_gallery(
|
||||
&self,
|
||||
) -> Result<Vec<PuzzleWorkProfileRecord>, SpacetimeClientError> {
|
||||
|
||||
Reference in New Issue
Block a user