This commit is contained in:
2026-04-24 16:19:40 +08:00
38 changed files with 2505 additions and 7488 deletions

View File

@@ -0,0 +1,163 @@
// 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::auth_identity_type::AuthIdentity;
/// Table handle for the table `auth_identity`.
///
/// Obtain a handle from the [`AuthIdentityTableAccess::auth_identity`] method on [`super::RemoteTables`],
/// like `ctx.db.auth_identity()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.auth_identity().on_insert(...)`.
pub struct AuthIdentityTableHandle<'ctx> {
imp: __sdk::TableHandle<AuthIdentity>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `auth_identity`.
///
/// Implemented for [`super::RemoteTables`].
pub trait AuthIdentityTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`AuthIdentityTableHandle`], which mediates access to the table `auth_identity`.
fn auth_identity(&self) -> AuthIdentityTableHandle<'_>;
}
impl AuthIdentityTableAccess for super::RemoteTables {
fn auth_identity(&self) -> AuthIdentityTableHandle<'_> {
AuthIdentityTableHandle {
imp: self.imp.get_table::<AuthIdentity>("auth_identity"),
ctx: std::marker::PhantomData,
}
}
}
pub struct AuthIdentityInsertCallbackId(__sdk::CallbackId);
pub struct AuthIdentityDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for AuthIdentityTableHandle<'ctx> {
type Row = AuthIdentity;
type EventContext = super::EventContext;
fn count(&self) -> u64 { self.imp.count() }
fn iter(&self) -> impl Iterator<Item = AuthIdentity> + '_ { self.imp.iter() }
type InsertCallbackId = AuthIdentityInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> AuthIdentityInsertCallbackId {
AuthIdentityInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: AuthIdentityInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = AuthIdentityDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> AuthIdentityDeleteCallbackId {
AuthIdentityDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: AuthIdentityDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct AuthIdentityUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for AuthIdentityTableHandle<'ctx> {
type UpdateCallbackId = AuthIdentityUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> AuthIdentityUpdateCallbackId {
AuthIdentityUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: AuthIdentityUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `identity_id` unique index on the table `auth_identity`,
/// which allows point queries on the field of the same name
/// via the [`AuthIdentityIdentityIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.auth_identity().identity_id().find(...)`.
pub struct AuthIdentityIdentityIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<AuthIdentity, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> AuthIdentityTableHandle<'ctx> {
/// Get a handle on the `identity_id` unique index on the table `auth_identity`.
pub fn identity_id(&self) -> AuthIdentityIdentityIdUnique<'ctx> {
AuthIdentityIdentityIdUnique {
imp: self.imp.get_unique_constraint::<String>("identity_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> AuthIdentityIdentityIdUnique<'ctx> {
/// Find the subscribed row whose `identity_id` column value is equal to `col_val`,
/// if such a row is present in the client cache.
pub fn find(&self, col_val: &String) -> Option<AuthIdentity> {
self.imp.find(col_val)
}
}
#[doc(hidden)]
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
let _table = client_cache.get_or_make_table::<AuthIdentity>("auth_identity");
_table.add_unique_constraint::<String>("identity_id", |row| &row.identity_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<AuthIdentity>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse(
"TableUpdate<AuthIdentity>",
"TableUpdate",
).with_cause(e).into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `AuthIdentity`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait auth_identityQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `AuthIdentity`.
fn auth_identity(&self) -> __sdk::__query_builder::Table<AuthIdentity>;
}
impl auth_identityQueryTableAccess for __sdk::QueryTableAccessor {
fn auth_identity(&self) -> __sdk::__query_builder::Table<AuthIdentity> {
__sdk::__query_builder::Table::new("auth_identity")
}
}

View File

@@ -0,0 +1,83 @@
// 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 AuthIdentity {
pub identity_id: String,
pub user_id: String,
pub provider: String,
pub provider_uid: String,
pub provider_union_id: Option::<String>,
pub phone_e_164: Option::<String>,
pub display_name: Option::<String>,
pub avatar_url: Option::<String>,
}
impl __sdk::InModule for AuthIdentity {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `AuthIdentity`.
///
/// Provides typed access to columns for query building.
pub struct AuthIdentityCols {
pub identity_id: __sdk::__query_builder::Col<AuthIdentity, String>,
pub user_id: __sdk::__query_builder::Col<AuthIdentity, String>,
pub provider: __sdk::__query_builder::Col<AuthIdentity, String>,
pub provider_uid: __sdk::__query_builder::Col<AuthIdentity, String>,
pub provider_union_id: __sdk::__query_builder::Col<AuthIdentity, Option::<String>>,
pub phone_e_164: __sdk::__query_builder::Col<AuthIdentity, Option::<String>>,
pub display_name: __sdk::__query_builder::Col<AuthIdentity, Option::<String>>,
pub avatar_url: __sdk::__query_builder::Col<AuthIdentity, Option::<String>>,
}
impl __sdk::__query_builder::HasCols for AuthIdentity {
type Cols = AuthIdentityCols;
fn cols(table_name: &'static str) -> Self::Cols {
AuthIdentityCols {
identity_id: __sdk::__query_builder::Col::new(table_name, "identity_id"),
user_id: __sdk::__query_builder::Col::new(table_name, "user_id"),
provider: __sdk::__query_builder::Col::new(table_name, "provider"),
provider_uid: __sdk::__query_builder::Col::new(table_name, "provider_uid"),
provider_union_id: __sdk::__query_builder::Col::new(table_name, "provider_union_id"),
phone_e_164: __sdk::__query_builder::Col::new(table_name, "phone_e_164"),
display_name: __sdk::__query_builder::Col::new(table_name, "display_name"),
avatar_url: __sdk::__query_builder::Col::new(table_name, "avatar_url"),
}
}
}
/// Indexed column accessor struct for the table `AuthIdentity`.
///
/// Provides typed access to indexed columns for query building.
pub struct AuthIdentityIxCols {
pub identity_id: __sdk::__query_builder::IxCol<AuthIdentity, String>,
pub user_id: __sdk::__query_builder::IxCol<AuthIdentity, String>,
}
impl __sdk::__query_builder::HasIxCols for AuthIdentity {
type IxCols = AuthIdentityIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
AuthIdentityIxCols {
identity_id: __sdk::__query_builder::IxCol::new(table_name, "identity_id"),
user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for AuthIdentity {}

View File

@@ -0,0 +1,26 @@
// 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::auth_store_snapshot_import_record_type::AuthStoreSnapshotImportRecord;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct AuthStoreSnapshotImportProcedureResult {
pub ok: bool,
pub record: Option::<AuthStoreSnapshotImportRecord>,
pub error_message: Option::<String>,
}
impl __sdk::InModule for AuthStoreSnapshotImportProcedureResult {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,25 @@
// 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 AuthStoreSnapshotImportRecord {
pub imported_user_count: u32,
pub imported_identity_count: u32,
pub imported_refresh_session_count: u32,
}
impl __sdk::InModule for AuthStoreSnapshotImportRecord {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,53 @@
// 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::auth_store_snapshot_procedure_result_type::AuthStoreSnapshotProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct ExportAuthStoreSnapshotFromTablesArgs {
}
impl __sdk::InModule for ExportAuthStoreSnapshotFromTablesArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `export_auth_store_snapshot_from_tables`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait export_auth_store_snapshot_from_tables {
fn export_auth_store_snapshot_from_tables(&self, ) {
self.export_auth_store_snapshot_from_tables_then( |_, _| {});
}
fn export_auth_store_snapshot_from_tables_then(
&self,
__callback: impl FnOnce(&super::ProcedureEventContext, Result<AuthStoreSnapshotProcedureResult, __sdk::InternalError>) + Send + 'static,
);
}
impl export_auth_store_snapshot_from_tables for super::RemoteProcedures {
fn export_auth_store_snapshot_from_tables_then(
&self,
__callback: impl FnOnce(&super::ProcedureEventContext, Result<AuthStoreSnapshotProcedureResult, __sdk::InternalError>) + Send + 'static,
) {
self.imp.invoke_procedure_with_callback::<_, AuthStoreSnapshotProcedureResult>(
"export_auth_store_snapshot_from_tables",
ExportAuthStoreSnapshotFromTablesArgs { },
__callback,
);
}
}

View File

@@ -0,0 +1,53 @@
// 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::auth_store_snapshot_import_procedure_result_type::AuthStoreSnapshotImportProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct ImportAuthStoreSnapshotArgs {
}
impl __sdk::InModule for ImportAuthStoreSnapshotArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `import_auth_store_snapshot`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait import_auth_store_snapshot {
fn import_auth_store_snapshot(&self, ) {
self.import_auth_store_snapshot_then( |_, _| {});
}
fn import_auth_store_snapshot_then(
&self,
__callback: impl FnOnce(&super::ProcedureEventContext, Result<AuthStoreSnapshotImportProcedureResult, __sdk::InternalError>) + Send + 'static,
);
}
impl import_auth_store_snapshot for super::RemoteProcedures {
fn import_auth_store_snapshot_then(
&self,
__callback: impl FnOnce(&super::ProcedureEventContext, Result<AuthStoreSnapshotImportProcedureResult, __sdk::InternalError>) + Send + 'static,
) {
self.imp.invoke_procedure_with_callback::<_, AuthStoreSnapshotImportProcedureResult>(
"import_auth_store_snapshot",
ImportAuthStoreSnapshotArgs { },
__callback,
);
}
}

View File

@@ -44,7 +44,10 @@ pub mod asset_object_access_policy_type;
pub mod asset_object_procedure_result_type;
pub mod asset_object_upsert_input_type;
pub mod asset_object_upsert_snapshot_type;
pub mod auth_identity_type;
pub mod auth_store_snapshot_type;
pub mod auth_store_snapshot_import_procedure_result_type;
pub mod auth_store_snapshot_import_record_type;
pub mod auth_store_snapshot_procedure_result_type;
pub mod auth_store_snapshot_record_type;
pub mod auth_store_snapshot_upsert_input_type;
@@ -112,7 +115,6 @@ pub mod custom_world_agent_message_submit_input_type;
pub mod custom_world_agent_operation_type;
pub mod custom_world_agent_operation_get_input_type;
pub mod custom_world_agent_operation_procedure_result_type;
pub mod custom_world_agent_operation_progress_input_type;
pub mod custom_world_agent_operation_snapshot_type;
pub mod custom_world_agent_session_type;
pub mod custom_world_agent_session_create_input_type;
@@ -243,6 +245,7 @@ pub mod quest_status_type;
pub mod quest_step_snapshot_type;
pub mod quest_treasure_inspected_signal_type;
pub mod quest_turn_in_input_type;
pub mod refresh_session_type;
pub mod resolve_combat_action_input_type;
pub mod resolve_combat_action_procedure_result_type;
pub mod resolve_combat_action_result_type;
@@ -313,6 +316,7 @@ pub mod treasure_record_procedure_result_type;
pub mod treasure_record_snapshot_type;
pub mod treasure_resolve_input_type;
pub mod unequip_inventory_item_input_type;
pub mod user_account_type;
pub mod user_browse_history_type;
pub mod accept_quest_reducer;
pub mod acknowledge_quest_completion_reducer;
@@ -344,6 +348,7 @@ pub mod ai_task_stage_table;
pub mod ai_text_chunk_table;
pub mod asset_entity_binding_table;
pub mod asset_object_table;
pub mod auth_identity_table;
pub mod auth_store_snapshot_table;
pub mod battle_state_table;
pub mod big_fish_agent_message_table;
@@ -371,11 +376,13 @@ pub mod puzzle_runtime_run_table;
pub mod puzzle_work_profile_table;
pub mod quest_log_table;
pub mod quest_record_table;
pub mod refresh_session_table;
pub mod runtime_setting_table;
pub mod runtime_snapshot_table;
pub mod story_event_table;
pub mod story_session_table;
pub mod treasure_record_table;
pub mod user_account_table;
pub mod user_browse_history_table;
pub mod advance_puzzle_next_level_procedure;
pub mod append_ai_text_chunk_and_return_procedure;
@@ -401,6 +408,7 @@ pub mod delete_custom_world_profile_and_return_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;
pub mod export_auth_store_snapshot_from_tables_procedure;
pub mod fail_ai_task_and_return_procedure;
pub mod finalize_big_fish_agent_message_turn_procedure;
pub mod finalize_custom_world_agent_message_turn_procedure;
@@ -429,6 +437,7 @@ pub mod get_runtime_setting_or_default_procedure;
pub mod get_runtime_snapshot_procedure;
pub mod get_story_session_state_procedure;
pub mod grant_player_progression_experience_and_return_procedure;
pub mod import_auth_store_snapshot_procedure;
pub mod list_big_fish_works_procedure;
pub mod list_custom_world_gallery_entries_procedure;
pub mod list_custom_world_profiles_procedure;
@@ -460,7 +469,6 @@ pub mod swap_puzzle_pieces_procedure;
pub mod unpublish_custom_world_profile_and_return_procedure;
pub mod update_puzzle_work_procedure;
pub mod upsert_auth_store_snapshot_procedure;
pub mod upsert_custom_world_agent_operation_progress_procedure;
pub mod upsert_chapter_progression_and_return_procedure;
pub mod upsert_custom_world_profile_and_return_procedure;
pub mod upsert_npc_state_and_return_procedure;
@@ -501,7 +509,10 @@ pub use asset_object_access_policy_type::AssetObjectAccessPolicy;
pub use asset_object_procedure_result_type::AssetObjectProcedureResult;
pub use asset_object_upsert_input_type::AssetObjectUpsertInput;
pub use asset_object_upsert_snapshot_type::AssetObjectUpsertSnapshot;
pub use auth_identity_type::AuthIdentity;
pub use auth_store_snapshot_type::AuthStoreSnapshot;
pub use auth_store_snapshot_import_procedure_result_type::AuthStoreSnapshotImportProcedureResult;
pub use auth_store_snapshot_import_record_type::AuthStoreSnapshotImportRecord;
pub use auth_store_snapshot_procedure_result_type::AuthStoreSnapshotProcedureResult;
pub use auth_store_snapshot_record_type::AuthStoreSnapshotRecord;
pub use auth_store_snapshot_upsert_input_type::AuthStoreSnapshotUpsertInput;
@@ -569,7 +580,6 @@ pub use custom_world_agent_message_submit_input_type::CustomWorldAgentMessageSub
pub use custom_world_agent_operation_type::CustomWorldAgentOperation;
pub use custom_world_agent_operation_get_input_type::CustomWorldAgentOperationGetInput;
pub use custom_world_agent_operation_procedure_result_type::CustomWorldAgentOperationProcedureResult;
pub use custom_world_agent_operation_progress_input_type::CustomWorldAgentOperationProgressInput;
pub use custom_world_agent_operation_snapshot_type::CustomWorldAgentOperationSnapshot;
pub use custom_world_agent_session_type::CustomWorldAgentSession;
pub use custom_world_agent_session_create_input_type::CustomWorldAgentSessionCreateInput;
@@ -700,6 +710,7 @@ pub use quest_status_type::QuestStatus;
pub use quest_step_snapshot_type::QuestStepSnapshot;
pub use quest_treasure_inspected_signal_type::QuestTreasureInspectedSignal;
pub use quest_turn_in_input_type::QuestTurnInInput;
pub use refresh_session_type::RefreshSession;
pub use resolve_combat_action_input_type::ResolveCombatActionInput;
pub use resolve_combat_action_procedure_result_type::ResolveCombatActionProcedureResult;
pub use resolve_combat_action_result_type::ResolveCombatActionResult;
@@ -770,6 +781,7 @@ pub use treasure_record_procedure_result_type::TreasureRecordProcedureResult;
pub use treasure_record_snapshot_type::TreasureRecordSnapshot;
pub use treasure_resolve_input_type::TreasureResolveInput;
pub use unequip_inventory_item_input_type::UnequipInventoryItemInput;
pub use user_account_type::UserAccount;
pub use user_browse_history_type::UserBrowseHistory;
pub use ai_result_reference_table::*;
pub use ai_task_table::*;
@@ -777,6 +789,7 @@ pub use ai_task_stage_table::*;
pub use ai_text_chunk_table::*;
pub use asset_entity_binding_table::*;
pub use asset_object_table::*;
pub use auth_identity_table::*;
pub use auth_store_snapshot_table::*;
pub use battle_state_table::*;
pub use big_fish_agent_message_table::*;
@@ -804,11 +817,13 @@ pub use puzzle_runtime_run_table::*;
pub use puzzle_work_profile_table::*;
pub use quest_log_table::*;
pub use quest_record_table::*;
pub use refresh_session_table::*;
pub use runtime_setting_table::*;
pub use runtime_snapshot_table::*;
pub use story_event_table::*;
pub use story_session_table::*;
pub use treasure_record_table::*;
pub use user_account_table::*;
pub use user_browse_history_table::*;
pub use accept_quest_reducer::accept_quest;
pub use acknowledge_quest_completion_reducer::acknowledge_quest_completion;
@@ -858,6 +873,7 @@ pub use delete_custom_world_profile_and_return_procedure::delete_custom_world_pr
pub use delete_runtime_snapshot_and_return_procedure::delete_runtime_snapshot_and_return;
pub use drag_puzzle_piece_or_group_procedure::drag_puzzle_piece_or_group;
pub use execute_custom_world_agent_action_procedure::execute_custom_world_agent_action;
pub use export_auth_store_snapshot_from_tables_procedure::export_auth_store_snapshot_from_tables;
pub use fail_ai_task_and_return_procedure::fail_ai_task_and_return;
pub use finalize_big_fish_agent_message_turn_procedure::finalize_big_fish_agent_message_turn;
pub use finalize_custom_world_agent_message_turn_procedure::finalize_custom_world_agent_message_turn;
@@ -886,6 +902,7 @@ pub use get_runtime_setting_or_default_procedure::get_runtime_setting_or_default
pub use get_runtime_snapshot_procedure::get_runtime_snapshot;
pub use get_story_session_state_procedure::get_story_session_state;
pub use grant_player_progression_experience_and_return_procedure::grant_player_progression_experience_and_return;
pub use import_auth_store_snapshot_procedure::import_auth_store_snapshot;
pub use list_big_fish_works_procedure::list_big_fish_works;
pub use list_custom_world_gallery_entries_procedure::list_custom_world_gallery_entries;
pub use list_custom_world_profiles_procedure::list_custom_world_profiles;
@@ -917,7 +934,6 @@ pub use swap_puzzle_pieces_procedure::swap_puzzle_pieces;
pub use unpublish_custom_world_profile_and_return_procedure::unpublish_custom_world_profile_and_return;
pub use update_puzzle_work_procedure::update_puzzle_work;
pub use upsert_auth_store_snapshot_procedure::upsert_auth_store_snapshot;
pub use upsert_custom_world_agent_operation_progress_procedure::upsert_custom_world_agent_operation_progress;
pub use upsert_chapter_progression_and_return_procedure::upsert_chapter_progression_and_return;
pub use upsert_custom_world_profile_and_return_procedure::upsert_custom_world_profile_and_return;
pub use upsert_npc_state_and_return_procedure::upsert_npc_state_and_return;
@@ -1180,6 +1196,7 @@ pub struct DbUpdate {
ai_text_chunk: __sdk::TableUpdate<AiTextChunk>,
asset_entity_binding: __sdk::TableUpdate<AssetEntityBinding>,
asset_object: __sdk::TableUpdate<AssetObject>,
auth_identity: __sdk::TableUpdate<AuthIdentity>,
auth_store_snapshot: __sdk::TableUpdate<AuthStoreSnapshot>,
battle_state: __sdk::TableUpdate<BattleState>,
big_fish_agent_message: __sdk::TableUpdate<BigFishAgentMessage>,
@@ -1207,11 +1224,13 @@ pub struct DbUpdate {
puzzle_work_profile: __sdk::TableUpdate<PuzzleWorkProfileRow>,
quest_log: __sdk::TableUpdate<QuestLog>,
quest_record: __sdk::TableUpdate<QuestRecord>,
refresh_session: __sdk::TableUpdate<RefreshSession>,
runtime_setting: __sdk::TableUpdate<RuntimeSetting>,
runtime_snapshot: __sdk::TableUpdate<RuntimeSnapshotRow>,
story_event: __sdk::TableUpdate<StoryEvent>,
story_session: __sdk::TableUpdate<StorySession>,
treasure_record: __sdk::TableUpdate<TreasureRecord>,
user_account: __sdk::TableUpdate<UserAccount>,
user_browse_history: __sdk::TableUpdate<UserBrowseHistory>,
}
@@ -1229,6 +1248,7 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
"ai_text_chunk" => db_update.ai_text_chunk.append(ai_text_chunk_table::parse_table_update(table_update)?),
"asset_entity_binding" => db_update.asset_entity_binding.append(asset_entity_binding_table::parse_table_update(table_update)?),
"asset_object" => db_update.asset_object.append(asset_object_table::parse_table_update(table_update)?),
"auth_identity" => db_update.auth_identity.append(auth_identity_table::parse_table_update(table_update)?),
"auth_store_snapshot" => db_update.auth_store_snapshot.append(auth_store_snapshot_table::parse_table_update(table_update)?),
"battle_state" => db_update.battle_state.append(battle_state_table::parse_table_update(table_update)?),
"big_fish_agent_message" => db_update.big_fish_agent_message.append(big_fish_agent_message_table::parse_table_update(table_update)?),
@@ -1256,11 +1276,13 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
"puzzle_work_profile" => db_update.puzzle_work_profile.append(puzzle_work_profile_table::parse_table_update(table_update)?),
"quest_log" => db_update.quest_log.append(quest_log_table::parse_table_update(table_update)?),
"quest_record" => db_update.quest_record.append(quest_record_table::parse_table_update(table_update)?),
"refresh_session" => db_update.refresh_session.append(refresh_session_table::parse_table_update(table_update)?),
"runtime_setting" => db_update.runtime_setting.append(runtime_setting_table::parse_table_update(table_update)?),
"runtime_snapshot" => db_update.runtime_snapshot.append(runtime_snapshot_table::parse_table_update(table_update)?),
"story_event" => db_update.story_event.append(story_event_table::parse_table_update(table_update)?),
"story_session" => db_update.story_session.append(story_session_table::parse_table_update(table_update)?),
"treasure_record" => db_update.treasure_record.append(treasure_record_table::parse_table_update(table_update)?),
"user_account" => db_update.user_account.append(user_account_table::parse_table_update(table_update)?),
"user_browse_history" => db_update.user_browse_history.append(user_browse_history_table::parse_table_update(table_update)?),
unknown => {
@@ -1290,6 +1312,7 @@ impl __sdk::DbUpdate for DbUpdate {
diff.ai_text_chunk = cache.apply_diff_to_table::<AiTextChunk>("ai_text_chunk", &self.ai_text_chunk).with_updates_by_pk(|row| &row.text_chunk_row_id);
diff.asset_entity_binding = cache.apply_diff_to_table::<AssetEntityBinding>("asset_entity_binding", &self.asset_entity_binding).with_updates_by_pk(|row| &row.binding_id);
diff.asset_object = cache.apply_diff_to_table::<AssetObject>("asset_object", &self.asset_object).with_updates_by_pk(|row| &row.asset_object_id);
diff.auth_identity = cache.apply_diff_to_table::<AuthIdentity>("auth_identity", &self.auth_identity).with_updates_by_pk(|row| &row.identity_id);
diff.auth_store_snapshot = cache.apply_diff_to_table::<AuthStoreSnapshot>("auth_store_snapshot", &self.auth_store_snapshot).with_updates_by_pk(|row| &row.snapshot_id);
diff.battle_state = cache.apply_diff_to_table::<BattleState>("battle_state", &self.battle_state).with_updates_by_pk(|row| &row.battle_state_id);
diff.big_fish_agent_message = cache.apply_diff_to_table::<BigFishAgentMessage>("big_fish_agent_message", &self.big_fish_agent_message).with_updates_by_pk(|row| &row.message_id);
@@ -1317,11 +1340,13 @@ impl __sdk::DbUpdate for DbUpdate {
diff.puzzle_work_profile = cache.apply_diff_to_table::<PuzzleWorkProfileRow>("puzzle_work_profile", &self.puzzle_work_profile).with_updates_by_pk(|row| &row.profile_id);
diff.quest_log = cache.apply_diff_to_table::<QuestLog>("quest_log", &self.quest_log).with_updates_by_pk(|row| &row.log_id);
diff.quest_record = cache.apply_diff_to_table::<QuestRecord>("quest_record", &self.quest_record).with_updates_by_pk(|row| &row.quest_id);
diff.refresh_session = cache.apply_diff_to_table::<RefreshSession>("refresh_session", &self.refresh_session).with_updates_by_pk(|row| &row.session_id);
diff.runtime_setting = cache.apply_diff_to_table::<RuntimeSetting>("runtime_setting", &self.runtime_setting).with_updates_by_pk(|row| &row.user_id);
diff.runtime_snapshot = cache.apply_diff_to_table::<RuntimeSnapshotRow>("runtime_snapshot", &self.runtime_snapshot).with_updates_by_pk(|row| &row.user_id);
diff.story_event = cache.apply_diff_to_table::<StoryEvent>("story_event", &self.story_event).with_updates_by_pk(|row| &row.event_id);
diff.story_session = cache.apply_diff_to_table::<StorySession>("story_session", &self.story_session).with_updates_by_pk(|row| &row.story_session_id);
diff.treasure_record = cache.apply_diff_to_table::<TreasureRecord>("treasure_record", &self.treasure_record).with_updates_by_pk(|row| &row.treasure_record_id);
diff.user_account = cache.apply_diff_to_table::<UserAccount>("user_account", &self.user_account).with_updates_by_pk(|row| &row.user_id);
diff.user_browse_history = cache.apply_diff_to_table::<UserBrowseHistory>("user_browse_history", &self.user_browse_history).with_updates_by_pk(|row| &row.browse_history_id);
diff
@@ -1336,6 +1361,7 @@ for table_rows in raw.tables {
"ai_text_chunk" => db_update.ai_text_chunk.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"asset_entity_binding" => db_update.asset_entity_binding.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"asset_object" => db_update.asset_object.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"auth_identity" => db_update.auth_identity.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"auth_store_snapshot" => db_update.auth_store_snapshot.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"battle_state" => db_update.battle_state.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"big_fish_agent_message" => db_update.big_fish_agent_message.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
@@ -1363,11 +1389,13 @@ for table_rows in raw.tables {
"puzzle_work_profile" => db_update.puzzle_work_profile.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"quest_log" => db_update.quest_log.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"quest_record" => db_update.quest_record.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"refresh_session" => db_update.refresh_session.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"runtime_setting" => db_update.runtime_setting.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"runtime_snapshot" => db_update.runtime_snapshot.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"story_event" => db_update.story_event.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"story_session" => db_update.story_session.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"treasure_record" => db_update.treasure_record.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"user_account" => db_update.user_account.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"user_browse_history" => db_update.user_browse_history.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into()); }
}} Ok(db_update)
@@ -1382,6 +1410,7 @@ for table_rows in raw.tables {
"ai_text_chunk" => db_update.ai_text_chunk.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"asset_entity_binding" => db_update.asset_entity_binding.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"asset_object" => db_update.asset_object.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"auth_identity" => db_update.auth_identity.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"auth_store_snapshot" => db_update.auth_store_snapshot.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"battle_state" => db_update.battle_state.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"big_fish_agent_message" => db_update.big_fish_agent_message.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
@@ -1409,11 +1438,13 @@ for table_rows in raw.tables {
"puzzle_work_profile" => db_update.puzzle_work_profile.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"quest_log" => db_update.quest_log.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"quest_record" => db_update.quest_record.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"refresh_session" => db_update.refresh_session.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"runtime_setting" => db_update.runtime_setting.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"runtime_snapshot" => db_update.runtime_snapshot.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"story_event" => db_update.story_event.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"story_session" => db_update.story_session.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"treasure_record" => db_update.treasure_record.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"user_account" => db_update.user_account.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"user_browse_history" => db_update.user_browse_history.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into()); }
}} Ok(db_update)
@@ -1430,6 +1461,7 @@ pub struct AppliedDiff<'r> {
ai_text_chunk: __sdk::TableAppliedDiff<'r, AiTextChunk>,
asset_entity_binding: __sdk::TableAppliedDiff<'r, AssetEntityBinding>,
asset_object: __sdk::TableAppliedDiff<'r, AssetObject>,
auth_identity: __sdk::TableAppliedDiff<'r, AuthIdentity>,
auth_store_snapshot: __sdk::TableAppliedDiff<'r, AuthStoreSnapshot>,
battle_state: __sdk::TableAppliedDiff<'r, BattleState>,
big_fish_agent_message: __sdk::TableAppliedDiff<'r, BigFishAgentMessage>,
@@ -1457,11 +1489,13 @@ pub struct AppliedDiff<'r> {
puzzle_work_profile: __sdk::TableAppliedDiff<'r, PuzzleWorkProfileRow>,
quest_log: __sdk::TableAppliedDiff<'r, QuestLog>,
quest_record: __sdk::TableAppliedDiff<'r, QuestRecord>,
refresh_session: __sdk::TableAppliedDiff<'r, RefreshSession>,
runtime_setting: __sdk::TableAppliedDiff<'r, RuntimeSetting>,
runtime_snapshot: __sdk::TableAppliedDiff<'r, RuntimeSnapshotRow>,
story_event: __sdk::TableAppliedDiff<'r, StoryEvent>,
story_session: __sdk::TableAppliedDiff<'r, StorySession>,
treasure_record: __sdk::TableAppliedDiff<'r, TreasureRecord>,
user_account: __sdk::TableAppliedDiff<'r, UserAccount>,
user_browse_history: __sdk::TableAppliedDiff<'r, UserBrowseHistory>,
__unused: std::marker::PhantomData<&'r ()>,
}
@@ -1479,6 +1513,7 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
callbacks.invoke_table_row_callbacks::<AiTextChunk>("ai_text_chunk", &self.ai_text_chunk, event);
callbacks.invoke_table_row_callbacks::<AssetEntityBinding>("asset_entity_binding", &self.asset_entity_binding, event);
callbacks.invoke_table_row_callbacks::<AssetObject>("asset_object", &self.asset_object, event);
callbacks.invoke_table_row_callbacks::<AuthIdentity>("auth_identity", &self.auth_identity, event);
callbacks.invoke_table_row_callbacks::<AuthStoreSnapshot>("auth_store_snapshot", &self.auth_store_snapshot, event);
callbacks.invoke_table_row_callbacks::<BattleState>("battle_state", &self.battle_state, event);
callbacks.invoke_table_row_callbacks::<BigFishAgentMessage>("big_fish_agent_message", &self.big_fish_agent_message, event);
@@ -1506,11 +1541,13 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
callbacks.invoke_table_row_callbacks::<PuzzleWorkProfileRow>("puzzle_work_profile", &self.puzzle_work_profile, event);
callbacks.invoke_table_row_callbacks::<QuestLog>("quest_log", &self.quest_log, event);
callbacks.invoke_table_row_callbacks::<QuestRecord>("quest_record", &self.quest_record, event);
callbacks.invoke_table_row_callbacks::<RefreshSession>("refresh_session", &self.refresh_session, event);
callbacks.invoke_table_row_callbacks::<RuntimeSetting>("runtime_setting", &self.runtime_setting, event);
callbacks.invoke_table_row_callbacks::<RuntimeSnapshotRow>("runtime_snapshot", &self.runtime_snapshot, event);
callbacks.invoke_table_row_callbacks::<StoryEvent>("story_event", &self.story_event, event);
callbacks.invoke_table_row_callbacks::<StorySession>("story_session", &self.story_session, event);
callbacks.invoke_table_row_callbacks::<TreasureRecord>("treasure_record", &self.treasure_record, event);
callbacks.invoke_table_row_callbacks::<UserAccount>("user_account", &self.user_account, event);
callbacks.invoke_table_row_callbacks::<UserBrowseHistory>("user_browse_history", &self.user_browse_history, event);
}
}
@@ -2169,6 +2206,7 @@ fn register_tables(client_cache: &mut __sdk::ClientCache<Self>) {
ai_text_chunk_table::register_table(client_cache);
asset_entity_binding_table::register_table(client_cache);
asset_object_table::register_table(client_cache);
auth_identity_table::register_table(client_cache);
auth_store_snapshot_table::register_table(client_cache);
battle_state_table::register_table(client_cache);
big_fish_agent_message_table::register_table(client_cache);
@@ -2196,11 +2234,13 @@ fn register_tables(client_cache: &mut __sdk::ClientCache<Self>) {
puzzle_work_profile_table::register_table(client_cache);
quest_log_table::register_table(client_cache);
quest_record_table::register_table(client_cache);
refresh_session_table::register_table(client_cache);
runtime_setting_table::register_table(client_cache);
runtime_snapshot_table::register_table(client_cache);
story_event_table::register_table(client_cache);
story_session_table::register_table(client_cache);
treasure_record_table::register_table(client_cache);
user_account_table::register_table(client_cache);
user_browse_history_table::register_table(client_cache);
}
const ALL_TABLE_NAMES: &'static [&'static str] = &[
@@ -2210,6 +2250,7 @@ const ALL_TABLE_NAMES: &'static [&'static str] = &[
"ai_text_chunk",
"asset_entity_binding",
"asset_object",
"auth_identity",
"auth_store_snapshot",
"battle_state",
"big_fish_agent_message",
@@ -2237,11 +2278,13 @@ const ALL_TABLE_NAMES: &'static [&'static str] = &[
"puzzle_work_profile",
"quest_log",
"quest_record",
"refresh_session",
"runtime_setting",
"runtime_snapshot",
"story_event",
"story_session",
"treasure_record",
"user_account",
"user_browse_history",
];
}

View File

@@ -0,0 +1,163 @@
// 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::refresh_session_type::RefreshSession;
/// Table handle for the table `refresh_session`.
///
/// Obtain a handle from the [`RefreshSessionTableAccess::refresh_session`] method on [`super::RemoteTables`],
/// like `ctx.db.refresh_session()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.refresh_session().on_insert(...)`.
pub struct RefreshSessionTableHandle<'ctx> {
imp: __sdk::TableHandle<RefreshSession>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `refresh_session`.
///
/// Implemented for [`super::RemoteTables`].
pub trait RefreshSessionTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`RefreshSessionTableHandle`], which mediates access to the table `refresh_session`.
fn refresh_session(&self) -> RefreshSessionTableHandle<'_>;
}
impl RefreshSessionTableAccess for super::RemoteTables {
fn refresh_session(&self) -> RefreshSessionTableHandle<'_> {
RefreshSessionTableHandle {
imp: self.imp.get_table::<RefreshSession>("refresh_session"),
ctx: std::marker::PhantomData,
}
}
}
pub struct RefreshSessionInsertCallbackId(__sdk::CallbackId);
pub struct RefreshSessionDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for RefreshSessionTableHandle<'ctx> {
type Row = RefreshSession;
type EventContext = super::EventContext;
fn count(&self) -> u64 { self.imp.count() }
fn iter(&self) -> impl Iterator<Item = RefreshSession> + '_ { self.imp.iter() }
type InsertCallbackId = RefreshSessionInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> RefreshSessionInsertCallbackId {
RefreshSessionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: RefreshSessionInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = RefreshSessionDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> RefreshSessionDeleteCallbackId {
RefreshSessionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: RefreshSessionDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct RefreshSessionUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for RefreshSessionTableHandle<'ctx> {
type UpdateCallbackId = RefreshSessionUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> RefreshSessionUpdateCallbackId {
RefreshSessionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: RefreshSessionUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `session_id` unique index on the table `refresh_session`,
/// which allows point queries on the field of the same name
/// via the [`RefreshSessionSessionIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.refresh_session().session_id().find(...)`.
pub struct RefreshSessionSessionIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<RefreshSession, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> RefreshSessionTableHandle<'ctx> {
/// Get a handle on the `session_id` unique index on the table `refresh_session`.
pub fn session_id(&self) -> RefreshSessionSessionIdUnique<'ctx> {
RefreshSessionSessionIdUnique {
imp: self.imp.get_unique_constraint::<String>("session_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> RefreshSessionSessionIdUnique<'ctx> {
/// Find the subscribed row whose `session_id` column value is equal to `col_val`,
/// if such a row is present in the client cache.
pub fn find(&self, col_val: &String) -> Option<RefreshSession> {
self.imp.find(col_val)
}
}
#[doc(hidden)]
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
let _table = client_cache.get_or_make_table::<RefreshSession>("refresh_session");
_table.add_unique_constraint::<String>("session_id", |row| &row.session_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<RefreshSession>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse(
"TableUpdate<RefreshSession>",
"TableUpdate",
).with_cause(e).into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `RefreshSession`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait refresh_sessionQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `RefreshSession`.
fn refresh_session(&self) -> __sdk::__query_builder::Table<RefreshSession>;
}
impl refresh_sessionQueryTableAccess for __sdk::QueryTableAccessor {
fn refresh_session(&self) -> __sdk::__query_builder::Table<RefreshSession> {
__sdk::__query_builder::Table::new("refresh_session")
}
}

View File

@@ -0,0 +1,91 @@
// 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 RefreshSession {
pub session_id: String,
pub user_id: String,
pub refresh_token_hash: String,
pub issued_by_provider: String,
pub client_info_json: String,
pub expires_at: String,
pub revoked_at: Option::<String>,
pub created_at: String,
pub updated_at: String,
pub last_seen_at: String,
}
impl __sdk::InModule for RefreshSession {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `RefreshSession`.
///
/// Provides typed access to columns for query building.
pub struct RefreshSessionCols {
pub session_id: __sdk::__query_builder::Col<RefreshSession, String>,
pub user_id: __sdk::__query_builder::Col<RefreshSession, String>,
pub refresh_token_hash: __sdk::__query_builder::Col<RefreshSession, String>,
pub issued_by_provider: __sdk::__query_builder::Col<RefreshSession, String>,
pub client_info_json: __sdk::__query_builder::Col<RefreshSession, String>,
pub expires_at: __sdk::__query_builder::Col<RefreshSession, String>,
pub revoked_at: __sdk::__query_builder::Col<RefreshSession, Option::<String>>,
pub created_at: __sdk::__query_builder::Col<RefreshSession, String>,
pub updated_at: __sdk::__query_builder::Col<RefreshSession, String>,
pub last_seen_at: __sdk::__query_builder::Col<RefreshSession, String>,
}
impl __sdk::__query_builder::HasCols for RefreshSession {
type Cols = RefreshSessionCols;
fn cols(table_name: &'static str) -> Self::Cols {
RefreshSessionCols {
session_id: __sdk::__query_builder::Col::new(table_name, "session_id"),
user_id: __sdk::__query_builder::Col::new(table_name, "user_id"),
refresh_token_hash: __sdk::__query_builder::Col::new(table_name, "refresh_token_hash"),
issued_by_provider: __sdk::__query_builder::Col::new(table_name, "issued_by_provider"),
client_info_json: __sdk::__query_builder::Col::new(table_name, "client_info_json"),
expires_at: __sdk::__query_builder::Col::new(table_name, "expires_at"),
revoked_at: __sdk::__query_builder::Col::new(table_name, "revoked_at"),
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
last_seen_at: __sdk::__query_builder::Col::new(table_name, "last_seen_at"),
}
}
}
/// Indexed column accessor struct for the table `RefreshSession`.
///
/// Provides typed access to indexed columns for query building.
pub struct RefreshSessionIxCols {
pub refresh_token_hash: __sdk::__query_builder::IxCol<RefreshSession, String>,
pub session_id: __sdk::__query_builder::IxCol<RefreshSession, String>,
pub user_id: __sdk::__query_builder::IxCol<RefreshSession, String>,
}
impl __sdk::__query_builder::HasIxCols for RefreshSession {
type IxCols = RefreshSessionIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
RefreshSessionIxCols {
refresh_token_hash: __sdk::__query_builder::IxCol::new(table_name, "refresh_token_hash"),
session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"),
user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for RefreshSession {}

View File

@@ -25,6 +25,10 @@ pub enum RpgAgentOperationType {
GenerateLandmarks,
DeleteCharacters,
DeleteLandmarks,
GenerateRoleAssets,
SyncRoleAssets,

View File

@@ -0,0 +1,163 @@
// 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::user_account_type::UserAccount;
/// Table handle for the table `user_account`.
///
/// Obtain a handle from the [`UserAccountTableAccess::user_account`] method on [`super::RemoteTables`],
/// like `ctx.db.user_account()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.user_account().on_insert(...)`.
pub struct UserAccountTableHandle<'ctx> {
imp: __sdk::TableHandle<UserAccount>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `user_account`.
///
/// Implemented for [`super::RemoteTables`].
pub trait UserAccountTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`UserAccountTableHandle`], which mediates access to the table `user_account`.
fn user_account(&self) -> UserAccountTableHandle<'_>;
}
impl UserAccountTableAccess for super::RemoteTables {
fn user_account(&self) -> UserAccountTableHandle<'_> {
UserAccountTableHandle {
imp: self.imp.get_table::<UserAccount>("user_account"),
ctx: std::marker::PhantomData,
}
}
}
pub struct UserAccountInsertCallbackId(__sdk::CallbackId);
pub struct UserAccountDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for UserAccountTableHandle<'ctx> {
type Row = UserAccount;
type EventContext = super::EventContext;
fn count(&self) -> u64 { self.imp.count() }
fn iter(&self) -> impl Iterator<Item = UserAccount> + '_ { self.imp.iter() }
type InsertCallbackId = UserAccountInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> UserAccountInsertCallbackId {
UserAccountInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: UserAccountInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = UserAccountDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> UserAccountDeleteCallbackId {
UserAccountDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: UserAccountDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct UserAccountUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for UserAccountTableHandle<'ctx> {
type UpdateCallbackId = UserAccountUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> UserAccountUpdateCallbackId {
UserAccountUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: UserAccountUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `user_id` unique index on the table `user_account`,
/// which allows point queries on the field of the same name
/// via the [`UserAccountUserIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.user_account().user_id().find(...)`.
pub struct UserAccountUserIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<UserAccount, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> UserAccountTableHandle<'ctx> {
/// Get a handle on the `user_id` unique index on the table `user_account`.
pub fn user_id(&self) -> UserAccountUserIdUnique<'ctx> {
UserAccountUserIdUnique {
imp: self.imp.get_unique_constraint::<String>("user_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> UserAccountUserIdUnique<'ctx> {
/// Find the subscribed row whose `user_id` column value is equal to `col_val`,
/// if such a row is present in the client cache.
pub fn find(&self, col_val: &String) -> Option<UserAccount> {
self.imp.find(col_val)
}
}
#[doc(hidden)]
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
let _table = client_cache.get_or_make_table::<UserAccount>("user_account");
_table.add_unique_constraint::<String>("user_id", |row| &row.user_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<UserAccount>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse(
"TableUpdate<UserAccount>",
"TableUpdate",
).with_cause(e).into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `UserAccount`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait user_accountQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `UserAccount`.
fn user_account(&self) -> __sdk::__query_builder::Table<UserAccount>;
}
impl user_accountQueryTableAccess for __sdk::QueryTableAccessor {
fn user_account(&self) -> __sdk::__query_builder::Table<UserAccount> {
__sdk::__query_builder::Table::new("user_account")
}
}

View File

@@ -0,0 +1,97 @@
// 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 UserAccount {
pub user_id: String,
pub public_user_code: String,
pub username: String,
pub display_name: String,
pub phone_number_masked: Option::<String>,
pub phone_number_e_164: Option::<String>,
pub login_method: String,
pub binding_status: String,
pub wechat_bound: bool,
pub password_hash: String,
pub password_login_enabled: bool,
pub token_version: u64,
}
impl __sdk::InModule for UserAccount {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `UserAccount`.
///
/// Provides typed access to columns for query building.
pub struct UserAccountCols {
pub user_id: __sdk::__query_builder::Col<UserAccount, String>,
pub public_user_code: __sdk::__query_builder::Col<UserAccount, String>,
pub username: __sdk::__query_builder::Col<UserAccount, String>,
pub display_name: __sdk::__query_builder::Col<UserAccount, String>,
pub phone_number_masked: __sdk::__query_builder::Col<UserAccount, Option::<String>>,
pub phone_number_e_164: __sdk::__query_builder::Col<UserAccount, Option::<String>>,
pub login_method: __sdk::__query_builder::Col<UserAccount, String>,
pub binding_status: __sdk::__query_builder::Col<UserAccount, String>,
pub wechat_bound: __sdk::__query_builder::Col<UserAccount, bool>,
pub password_hash: __sdk::__query_builder::Col<UserAccount, String>,
pub password_login_enabled: __sdk::__query_builder::Col<UserAccount, bool>,
pub token_version: __sdk::__query_builder::Col<UserAccount, u64>,
}
impl __sdk::__query_builder::HasCols for UserAccount {
type Cols = UserAccountCols;
fn cols(table_name: &'static str) -> Self::Cols {
UserAccountCols {
user_id: __sdk::__query_builder::Col::new(table_name, "user_id"),
public_user_code: __sdk::__query_builder::Col::new(table_name, "public_user_code"),
username: __sdk::__query_builder::Col::new(table_name, "username"),
display_name: __sdk::__query_builder::Col::new(table_name, "display_name"),
phone_number_masked: __sdk::__query_builder::Col::new(table_name, "phone_number_masked"),
phone_number_e_164: __sdk::__query_builder::Col::new(table_name, "phone_number_e_164"),
login_method: __sdk::__query_builder::Col::new(table_name, "login_method"),
binding_status: __sdk::__query_builder::Col::new(table_name, "binding_status"),
wechat_bound: __sdk::__query_builder::Col::new(table_name, "wechat_bound"),
password_hash: __sdk::__query_builder::Col::new(table_name, "password_hash"),
password_login_enabled: __sdk::__query_builder::Col::new(table_name, "password_login_enabled"),
token_version: __sdk::__query_builder::Col::new(table_name, "token_version"),
}
}
}
/// Indexed column accessor struct for the table `UserAccount`.
///
/// Provides typed access to indexed columns for query building.
pub struct UserAccountIxCols {
pub public_user_code: __sdk::__query_builder::IxCol<UserAccount, String>,
pub user_id: __sdk::__query_builder::IxCol<UserAccount, String>,
pub username: __sdk::__query_builder::IxCol<UserAccount, String>,
}
impl __sdk::__query_builder::HasIxCols for UserAccount {
type IxCols = UserAccountIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
UserAccountIxCols {
public_user_code: __sdk::__query_builder::IxCol::new(table_name, "public_user_code"),
user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"),
username: __sdk::__query_builder::IxCol::new(table_name, "username"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for UserAccount {}