This commit is contained in:
2026-05-14 21:33:34 +08:00
193 changed files with 17051 additions and 1203 deletions

View File

@@ -0,0 +1,138 @@
use super::*;
pub type BarkBattleDraftCreateRecordInput = BarkBattleDraftCreateInput;
pub type BarkBattleDraftConfigUpsertRecordInput = BarkBattleDraftConfigUpsertInput;
pub type BarkBattleWorkPublishRecordInput = BarkBattleWorkPublishInput;
pub type BarkBattleRunStartRecordInput = BarkBattleRunStartInput;
pub type BarkBattleRunFinishRecordInput = BarkBattleRunFinishInput;
impl SpacetimeClient {
pub async fn create_bark_battle_draft(
&self,
input: BarkBattleDraftCreateRecordInput,
) -> Result<BarkBattleDraftConfigRecord, SpacetimeClientError> {
self.call_after_connect(move |connection, sender| {
connection
.procedures()
.create_bark_battle_draft_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
}
pub async fn update_bark_battle_draft_config(
&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);
});
})
.await
}
pub async fn publish_bark_battle_work(
&self,
input: BarkBattleWorkPublishRecordInput,
) -> Result<BarkBattleRuntimeConfigRecord, SpacetimeClientError> {
self.call_after_connect(move |connection, sender| {
connection
.procedures()
.publish_bark_battle_work_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
}
pub async fn get_bark_battle_runtime_config(
&self,
work_id: String,
owner_user_id: Option<String>,
) -> Result<BarkBattleRuntimeConfigRecord, SpacetimeClientError> {
let input = BarkBattleRuntimeConfigGetInput {
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);
});
})
.await
}
pub async fn start_bark_battle_run(
&self,
input: BarkBattleRunStartRecordInput,
) -> Result<BarkBattleRunRecord, SpacetimeClientError> {
self.call_after_connect(move |connection, sender| {
connection
.procedures()
.start_bark_battle_run_then(input, move |_, result| {
let mapped = result
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
.and_then(map_bark_battle_run_procedure_result);
send_once(&sender, mapped);
});
})
.await
}
pub async fn finish_bark_battle_run(
&self,
input: BarkBattleRunFinishRecordInput,
) -> Result<BarkBattleRunRecord, SpacetimeClientError> {
self.call_after_connect(move |connection, sender| {
connection
.procedures()
.finish_bark_battle_run_then(input, move |_, result| {
let mapped = result
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
.and_then(map_bark_battle_run_procedure_result);
send_once(&sender, mapped);
});
})
.await
}
pub async fn get_bark_battle_run(
&self,
run_id: String,
owner_user_id: String,
) -> Result<BarkBattleRunRecord, SpacetimeClientError> {
let input = BarkBattleRunGetInput {
run_id,
owner_user_id,
};
self.call_after_connect(move |connection, sender| {
connection
.procedures()
.get_bark_battle_run_then(input, move |_, result| {
let mapped = result
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
.and_then(map_bark_battle_run_procedure_result);
send_once(&sender, mapped);
});
})
.await
}
}

View File

@@ -6,11 +6,12 @@ mod mapper;
use mapper::*;
pub use mapper::{
AiResultReferenceRecord, AiTaskMutationRecord, AiTaskRecord, AiTaskStageRecord,
AiTextChunkRecord, BattleStateRecord, BigFishAgentMessageRecord, BigFishAnchorItemRecord,
BigFishAnchorPackRecord, BigFishAssetCoverageRecord, BigFishAssetGenerateRecordInput,
BigFishAssetSlotRecord, BigFishBackgroundBlueprintRecord, BigFishDraftCompileRecordInput,
BigFishGameDraftRecord, BigFishInputSubmitRecordInput, BigFishLevelBlueprintRecord,
BigFishLikeReportRecordInput, BigFishMessageFinalizeRecordInput,
AiTextChunkRecord, BarkBattleDraftConfigRecord, BarkBattleRunRecord,
BarkBattleRuntimeConfigRecord, BattleStateRecord, BigFishAgentMessageRecord,
BigFishAnchorItemRecord, BigFishAnchorPackRecord, BigFishAssetCoverageRecord,
BigFishAssetGenerateRecordInput, BigFishAssetSlotRecord, BigFishBackgroundBlueprintRecord,
BigFishDraftCompileRecordInput, BigFishGameDraftRecord, BigFishInputSubmitRecordInput,
BigFishLevelBlueprintRecord, BigFishLikeReportRecordInput, BigFishMessageFinalizeRecordInput,
BigFishMessageSubmitRecordInput, BigFishPlayReportRecordInput, BigFishRunStartRecordInput,
BigFishRuntimeEntityRecord, BigFishRuntimeParamsRecord, BigFishRuntimeRunRecord,
BigFishSessionCreateRecordInput, BigFishSessionRecord, BigFishVector2Record,
@@ -74,6 +75,12 @@ pub use mapper::{
pub mod ai;
pub mod assets;
pub mod auth;
pub mod bark_battle;
pub use bark_battle::{
BarkBattleDraftConfigUpsertRecordInput, BarkBattleDraftCreateRecordInput,
BarkBattleRunFinishRecordInput, BarkBattleRunStartRecordInput,
BarkBattleWorkPublishRecordInput,
};
pub mod big_fish;
pub mod combat;
pub mod custom_world;

View File

@@ -732,6 +732,42 @@ pub(crate) fn map_asset_history_list_result(
.collect())
}
pub type BarkBattleDraftConfigRecord = serde_json::Value;
pub type BarkBattleRuntimeConfigRecord = serde_json::Value;
pub type BarkBattleRunRecord = serde_json::Value;
pub(crate) fn map_bark_battle_draft_config_procedure_result(
result: BarkBattleProcedureResult,
) -> Result<BarkBattleDraftConfigRecord, SpacetimeClientError> {
parse_bark_battle_row_json(result, "Bark Battle draft config")
}
pub(crate) fn map_bark_battle_runtime_config_procedure_result(
result: BarkBattleProcedureResult,
) -> Result<BarkBattleRuntimeConfigRecord, SpacetimeClientError> {
parse_bark_battle_row_json(result, "Bark Battle runtime config")
}
pub(crate) fn map_bark_battle_run_procedure_result(
result: BarkBattleProcedureResult,
) -> Result<BarkBattleRunRecord, SpacetimeClientError> {
parse_bark_battle_row_json(result, "Bark Battle run")
}
fn parse_bark_battle_row_json<T: serde::de::DeserializeOwned>(
result: BarkBattleProcedureResult,
label: &'static str,
) -> Result<T, SpacetimeClientError> {
if !result.ok {
return Err(SpacetimeClientError::procedure_failed(result.error_message));
}
let row_json = result
.row_json
.ok_or_else(|| SpacetimeClientError::missing_snapshot(label))?;
serde_json::from_str(&row_json)
.map_err(|error| SpacetimeClientError::Runtime(format!("{label} JSON 解析失败: {error}")))
}
pub type CreationEntryConfigRecord =
shared_contracts::creation_entry_config::CreationEntryConfigResponse;

View File

@@ -0,0 +1,86 @@
// 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 BarkBattleDraftConfigRow {
pub draft_id: String,
pub owner_user_id: String,
pub work_id: String,
pub config_version: u64,
pub ruleset_version: String,
pub difficulty_preset: String,
pub leaderboard_enabled: bool,
pub config_json: String,
pub editor_state_json: String,
pub created_at: __sdk::Timestamp,
pub updated_at: __sdk::Timestamp,
}
impl __sdk::InModule for BarkBattleDraftConfigRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `BarkBattleDraftConfigRow`.
///
/// Provides typed access to columns for query building.
pub struct BarkBattleDraftConfigRowCols {
pub draft_id: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, String>,
pub work_id: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, String>,
pub config_version: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, u64>,
pub ruleset_version: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, String>,
pub difficulty_preset: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, String>,
pub leaderboard_enabled: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, bool>,
pub config_json: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, String>,
pub editor_state_json: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, String>,
pub created_at: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, __sdk::Timestamp>,
pub updated_at: __sdk::__query_builder::Col<BarkBattleDraftConfigRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for BarkBattleDraftConfigRow {
type Cols = BarkBattleDraftConfigRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
BarkBattleDraftConfigRowCols {
draft_id: __sdk::__query_builder::Col::new(table_name, "draft_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
config_version: __sdk::__query_builder::Col::new(table_name, "config_version"),
ruleset_version: __sdk::__query_builder::Col::new(table_name, "ruleset_version"),
difficulty_preset: __sdk::__query_builder::Col::new(table_name, "difficulty_preset"),
leaderboard_enabled: __sdk::__query_builder::Col::new(
table_name,
"leaderboard_enabled",
),
config_json: __sdk::__query_builder::Col::new(table_name, "config_json"),
editor_state_json: __sdk::__query_builder::Col::new(table_name, "editor_state_json"),
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
}
}
}
/// Indexed column accessor struct for the table `BarkBattleDraftConfigRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct BarkBattleDraftConfigRowIxCols {
pub draft_id: __sdk::__query_builder::IxCol<BarkBattleDraftConfigRow, String>,
pub owner_user_id: __sdk::__query_builder::IxCol<BarkBattleDraftConfigRow, String>,
pub work_id: __sdk::__query_builder::IxCol<BarkBattleDraftConfigRow, String>,
}
impl __sdk::__query_builder::HasIxCols for BarkBattleDraftConfigRow {
type IxCols = BarkBattleDraftConfigRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
BarkBattleDraftConfigRowIxCols {
draft_id: __sdk::__query_builder::IxCol::new(table_name, "draft_id"),
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for BarkBattleDraftConfigRow {}

View File

@@ -0,0 +1,162 @@
// 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 super::bark_battle_draft_config_row_type::BarkBattleDraftConfigRow;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `bark_battle_draft_config`.
///
/// Obtain a handle from the [`BarkBattleDraftConfigTableAccess::bark_battle_draft_config`] method on [`super::RemoteTables`],
/// like `ctx.db.bark_battle_draft_config()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_draft_config().on_insert(...)`.
pub struct BarkBattleDraftConfigTableHandle<'ctx> {
imp: __sdk::TableHandle<BarkBattleDraftConfigRow>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `bark_battle_draft_config`.
///
/// Implemented for [`super::RemoteTables`].
pub trait BarkBattleDraftConfigTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`BarkBattleDraftConfigTableHandle`], which mediates access to the table `bark_battle_draft_config`.
fn bark_battle_draft_config(&self) -> BarkBattleDraftConfigTableHandle<'_>;
}
impl BarkBattleDraftConfigTableAccess for super::RemoteTables {
fn bark_battle_draft_config(&self) -> BarkBattleDraftConfigTableHandle<'_> {
BarkBattleDraftConfigTableHandle {
imp: self
.imp
.get_table::<BarkBattleDraftConfigRow>("bark_battle_draft_config"),
ctx: std::marker::PhantomData,
}
}
}
pub struct BarkBattleDraftConfigInsertCallbackId(__sdk::CallbackId);
pub struct BarkBattleDraftConfigDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for BarkBattleDraftConfigTableHandle<'ctx> {
type Row = BarkBattleDraftConfigRow;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = BarkBattleDraftConfigRow> + '_ {
self.imp.iter()
}
type InsertCallbackId = BarkBattleDraftConfigInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattleDraftConfigInsertCallbackId {
BarkBattleDraftConfigInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: BarkBattleDraftConfigInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = BarkBattleDraftConfigDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattleDraftConfigDeleteCallbackId {
BarkBattleDraftConfigDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: BarkBattleDraftConfigDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct BarkBattleDraftConfigUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattleDraftConfigTableHandle<'ctx> {
type UpdateCallbackId = BarkBattleDraftConfigUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> BarkBattleDraftConfigUpdateCallbackId {
BarkBattleDraftConfigUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: BarkBattleDraftConfigUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `draft_id` unique index on the table `bark_battle_draft_config`,
/// which allows point queries on the field of the same name
/// via the [`BarkBattleDraftConfigDraftIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_draft_config().draft_id().find(...)`.
pub struct BarkBattleDraftConfigDraftIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<BarkBattleDraftConfigRow, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> BarkBattleDraftConfigTableHandle<'ctx> {
/// Get a handle on the `draft_id` unique index on the table `bark_battle_draft_config`.
pub fn draft_id(&self) -> BarkBattleDraftConfigDraftIdUnique<'ctx> {
BarkBattleDraftConfigDraftIdUnique {
imp: self.imp.get_unique_constraint::<String>("draft_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> BarkBattleDraftConfigDraftIdUnique<'ctx> {
/// Find the subscribed row whose `draft_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<BarkBattleDraftConfigRow> {
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::<BarkBattleDraftConfigRow>("bark_battle_draft_config");
_table.add_unique_constraint::<String>("draft_id", |row| &row.draft_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<BarkBattleDraftConfigRow>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<BarkBattleDraftConfigRow>", "TableUpdate")
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `BarkBattleDraftConfigRow`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait bark_battle_draft_configQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `BarkBattleDraftConfigRow`.
fn bark_battle_draft_config(&self) -> __sdk::__query_builder::Table<BarkBattleDraftConfigRow>;
}
impl bark_battle_draft_configQueryTableAccess for __sdk::QueryTableAccessor {
fn bark_battle_draft_config(&self) -> __sdk::__query_builder::Table<BarkBattleDraftConfigRow> {
__sdk::__query_builder::Table::new("bark_battle_draft_config")
}
}

View File

@@ -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 BarkBattleDraftConfigUpsertInput {
pub draft_id: String,
pub owner_user_id: String,
pub work_id: String,
pub config_version: u64,
pub ruleset_version: String,
pub difficulty_preset: String,
pub leaderboard_enabled: bool,
pub config_json: String,
pub updated_at_micros: i64,
}
impl __sdk::InModule for BarkBattleDraftConfigUpsertInput {
type Module = super::RemoteModule;
}

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};
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct BarkBattleDraftCreateInput {
pub draft_id: String,
pub owner_user_id: String,
pub work_id: String,
pub title: Option<String>,
pub description: Option<String>,
pub theme_preset: String,
pub player_dog_skin_preset: String,
pub opponent_dog_skin_preset: String,
pub difficulty_preset: Option<String>,
pub leaderboard_enabled: Option<bool>,
pub editor_state_json: Option<String>,
pub created_at_micros: i64,
}
impl __sdk::InModule for BarkBattleDraftCreateInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,94 @@
// 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 BarkBattleLeaderboardEntryRow {
pub leaderboard_entry_id: String,
pub work_id: String,
pub owner_user_id: String,
pub run_id: String,
pub score_id: String,
pub leaderboard_score: u64,
pub final_energy: f32,
pub trigger_count: u64,
pub max_volume: f32,
pub duration_closeness_ms: u64,
pub finished_at_micros: i64,
pub created_at: __sdk::Timestamp,
pub updated_at: __sdk::Timestamp,
}
impl __sdk::InModule for BarkBattleLeaderboardEntryRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `BarkBattleLeaderboardEntryRow`.
///
/// Provides typed access to columns for query building.
pub struct BarkBattleLeaderboardEntryRowCols {
pub leaderboard_entry_id: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, String>,
pub work_id: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, String>,
pub run_id: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, String>,
pub score_id: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, String>,
pub leaderboard_score: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, u64>,
pub final_energy: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, f32>,
pub trigger_count: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, u64>,
pub max_volume: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, f32>,
pub duration_closeness_ms: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, u64>,
pub finished_at_micros: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, i64>,
pub created_at: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, __sdk::Timestamp>,
pub updated_at: __sdk::__query_builder::Col<BarkBattleLeaderboardEntryRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for BarkBattleLeaderboardEntryRow {
type Cols = BarkBattleLeaderboardEntryRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
BarkBattleLeaderboardEntryRowCols {
leaderboard_entry_id: __sdk::__query_builder::Col::new(
table_name,
"leaderboard_entry_id",
),
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
run_id: __sdk::__query_builder::Col::new(table_name, "run_id"),
score_id: __sdk::__query_builder::Col::new(table_name, "score_id"),
leaderboard_score: __sdk::__query_builder::Col::new(table_name, "leaderboard_score"),
final_energy: __sdk::__query_builder::Col::new(table_name, "final_energy"),
trigger_count: __sdk::__query_builder::Col::new(table_name, "trigger_count"),
max_volume: __sdk::__query_builder::Col::new(table_name, "max_volume"),
duration_closeness_ms: __sdk::__query_builder::Col::new(
table_name,
"duration_closeness_ms",
),
finished_at_micros: __sdk::__query_builder::Col::new(table_name, "finished_at_micros"),
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
}
}
}
/// Indexed column accessor struct for the table `BarkBattleLeaderboardEntryRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct BarkBattleLeaderboardEntryRowIxCols {
pub leaderboard_entry_id: __sdk::__query_builder::IxCol<BarkBattleLeaderboardEntryRow, String>,
}
impl __sdk::__query_builder::HasIxCols for BarkBattleLeaderboardEntryRow {
type IxCols = BarkBattleLeaderboardEntryRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
BarkBattleLeaderboardEntryRowIxCols {
leaderboard_entry_id: __sdk::__query_builder::IxCol::new(
table_name,
"leaderboard_entry_id",
),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for BarkBattleLeaderboardEntryRow {}

View File

@@ -0,0 +1,171 @@
// 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 super::bark_battle_leaderboard_entry_row_type::BarkBattleLeaderboardEntryRow;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `bark_battle_leaderboard_entry`.
///
/// Obtain a handle from the [`BarkBattleLeaderboardEntryTableAccess::bark_battle_leaderboard_entry`] method on [`super::RemoteTables`],
/// like `ctx.db.bark_battle_leaderboard_entry()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_leaderboard_entry().on_insert(...)`.
pub struct BarkBattleLeaderboardEntryTableHandle<'ctx> {
imp: __sdk::TableHandle<BarkBattleLeaderboardEntryRow>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `bark_battle_leaderboard_entry`.
///
/// Implemented for [`super::RemoteTables`].
pub trait BarkBattleLeaderboardEntryTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`BarkBattleLeaderboardEntryTableHandle`], which mediates access to the table `bark_battle_leaderboard_entry`.
fn bark_battle_leaderboard_entry(&self) -> BarkBattleLeaderboardEntryTableHandle<'_>;
}
impl BarkBattleLeaderboardEntryTableAccess for super::RemoteTables {
fn bark_battle_leaderboard_entry(&self) -> BarkBattleLeaderboardEntryTableHandle<'_> {
BarkBattleLeaderboardEntryTableHandle {
imp: self
.imp
.get_table::<BarkBattleLeaderboardEntryRow>("bark_battle_leaderboard_entry"),
ctx: std::marker::PhantomData,
}
}
}
pub struct BarkBattleLeaderboardEntryInsertCallbackId(__sdk::CallbackId);
pub struct BarkBattleLeaderboardEntryDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for BarkBattleLeaderboardEntryTableHandle<'ctx> {
type Row = BarkBattleLeaderboardEntryRow;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = BarkBattleLeaderboardEntryRow> + '_ {
self.imp.iter()
}
type InsertCallbackId = BarkBattleLeaderboardEntryInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattleLeaderboardEntryInsertCallbackId {
BarkBattleLeaderboardEntryInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: BarkBattleLeaderboardEntryInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = BarkBattleLeaderboardEntryDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattleLeaderboardEntryDeleteCallbackId {
BarkBattleLeaderboardEntryDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: BarkBattleLeaderboardEntryDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct BarkBattleLeaderboardEntryUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattleLeaderboardEntryTableHandle<'ctx> {
type UpdateCallbackId = BarkBattleLeaderboardEntryUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> BarkBattleLeaderboardEntryUpdateCallbackId {
BarkBattleLeaderboardEntryUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: BarkBattleLeaderboardEntryUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `leaderboard_entry_id` unique index on the table `bark_battle_leaderboard_entry`,
/// which allows point queries on the field of the same name
/// via the [`BarkBattleLeaderboardEntryLeaderboardEntryIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_leaderboard_entry().leaderboard_entry_id().find(...)`.
pub struct BarkBattleLeaderboardEntryLeaderboardEntryIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<BarkBattleLeaderboardEntryRow, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> BarkBattleLeaderboardEntryTableHandle<'ctx> {
/// Get a handle on the `leaderboard_entry_id` unique index on the table `bark_battle_leaderboard_entry`.
pub fn leaderboard_entry_id(&self) -> BarkBattleLeaderboardEntryLeaderboardEntryIdUnique<'ctx> {
BarkBattleLeaderboardEntryLeaderboardEntryIdUnique {
imp: self
.imp
.get_unique_constraint::<String>("leaderboard_entry_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> BarkBattleLeaderboardEntryLeaderboardEntryIdUnique<'ctx> {
/// Find the subscribed row whose `leaderboard_entry_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<BarkBattleLeaderboardEntryRow> {
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::<BarkBattleLeaderboardEntryRow>("bark_battle_leaderboard_entry");
_table.add_unique_constraint::<String>("leaderboard_entry_id", |row| &row.leaderboard_entry_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<BarkBattleLeaderboardEntryRow>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse(
"TableUpdate<BarkBattleLeaderboardEntryRow>",
"TableUpdate",
)
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `BarkBattleLeaderboardEntryRow`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait bark_battle_leaderboard_entryQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `BarkBattleLeaderboardEntryRow`.
fn bark_battle_leaderboard_entry(
&self,
) -> __sdk::__query_builder::Table<BarkBattleLeaderboardEntryRow>;
}
impl bark_battle_leaderboard_entryQueryTableAccess for __sdk::QueryTableAccessor {
fn bark_battle_leaderboard_entry(
&self,
) -> __sdk::__query_builder::Table<BarkBattleLeaderboardEntryRow> {
__sdk::__query_builder::Table::new("bark_battle_leaderboard_entry")
}
}

View File

@@ -0,0 +1,107 @@
// 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 BarkBattlePersonalBestProjectionRow {
pub personal_best_id: String,
pub owner_user_id: String,
pub work_id: String,
pub run_id: String,
pub score_id: String,
pub leaderboard_entry_id: Option<String>,
pub leaderboard_score: Option<u64>,
pub final_energy: f32,
pub trigger_count: u64,
pub max_volume: f32,
pub duration_closeness_ms: u64,
pub server_result: String,
pub validation_status: String,
pub finished_at_micros: i64,
pub summary_json: String,
pub updated_at: __sdk::Timestamp,
}
impl __sdk::InModule for BarkBattlePersonalBestProjectionRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `BarkBattlePersonalBestProjectionRow`.
///
/// Provides typed access to columns for query building.
pub struct BarkBattlePersonalBestProjectionRowCols {
pub personal_best_id: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, String>,
pub work_id: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, String>,
pub run_id: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, String>,
pub score_id: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, String>,
pub leaderboard_entry_id:
__sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, Option<String>>,
pub leaderboard_score:
__sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, Option<u64>>,
pub final_energy: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, f32>,
pub trigger_count: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, u64>,
pub max_volume: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, f32>,
pub duration_closeness_ms:
__sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, u64>,
pub server_result: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, String>,
pub validation_status: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, String>,
pub finished_at_micros: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, i64>,
pub summary_json: __sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, String>,
pub updated_at:
__sdk::__query_builder::Col<BarkBattlePersonalBestProjectionRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for BarkBattlePersonalBestProjectionRow {
type Cols = BarkBattlePersonalBestProjectionRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
BarkBattlePersonalBestProjectionRowCols {
personal_best_id: __sdk::__query_builder::Col::new(table_name, "personal_best_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
run_id: __sdk::__query_builder::Col::new(table_name, "run_id"),
score_id: __sdk::__query_builder::Col::new(table_name, "score_id"),
leaderboard_entry_id: __sdk::__query_builder::Col::new(
table_name,
"leaderboard_entry_id",
),
leaderboard_score: __sdk::__query_builder::Col::new(table_name, "leaderboard_score"),
final_energy: __sdk::__query_builder::Col::new(table_name, "final_energy"),
trigger_count: __sdk::__query_builder::Col::new(table_name, "trigger_count"),
max_volume: __sdk::__query_builder::Col::new(table_name, "max_volume"),
duration_closeness_ms: __sdk::__query_builder::Col::new(
table_name,
"duration_closeness_ms",
),
server_result: __sdk::__query_builder::Col::new(table_name, "server_result"),
validation_status: __sdk::__query_builder::Col::new(table_name, "validation_status"),
finished_at_micros: __sdk::__query_builder::Col::new(table_name, "finished_at_micros"),
summary_json: __sdk::__query_builder::Col::new(table_name, "summary_json"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
}
}
}
/// Indexed column accessor struct for the table `BarkBattlePersonalBestProjectionRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct BarkBattlePersonalBestProjectionRowIxCols {
pub personal_best_id:
__sdk::__query_builder::IxCol<BarkBattlePersonalBestProjectionRow, String>,
pub work_id: __sdk::__query_builder::IxCol<BarkBattlePersonalBestProjectionRow, String>,
}
impl __sdk::__query_builder::HasIxCols for BarkBattlePersonalBestProjectionRow {
type IxCols = BarkBattlePersonalBestProjectionRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
BarkBattlePersonalBestProjectionRowIxCols {
personal_best_id: __sdk::__query_builder::IxCol::new(table_name, "personal_best_id"),
work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for BarkBattlePersonalBestProjectionRow {}

View File

@@ -0,0 +1,174 @@
// 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 super::bark_battle_personal_best_projection_row_type::BarkBattlePersonalBestProjectionRow;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `bark_battle_personal_best_projection`.
///
/// Obtain a handle from the [`BarkBattlePersonalBestProjectionTableAccess::bark_battle_personal_best_projection`] method on [`super::RemoteTables`],
/// like `ctx.db.bark_battle_personal_best_projection()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_personal_best_projection().on_insert(...)`.
pub struct BarkBattlePersonalBestProjectionTableHandle<'ctx> {
imp: __sdk::TableHandle<BarkBattlePersonalBestProjectionRow>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `bark_battle_personal_best_projection`.
///
/// Implemented for [`super::RemoteTables`].
pub trait BarkBattlePersonalBestProjectionTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`BarkBattlePersonalBestProjectionTableHandle`], which mediates access to the table `bark_battle_personal_best_projection`.
fn bark_battle_personal_best_projection(
&self,
) -> BarkBattlePersonalBestProjectionTableHandle<'_>;
}
impl BarkBattlePersonalBestProjectionTableAccess for super::RemoteTables {
fn bark_battle_personal_best_projection(
&self,
) -> BarkBattlePersonalBestProjectionTableHandle<'_> {
BarkBattlePersonalBestProjectionTableHandle {
imp: self.imp.get_table::<BarkBattlePersonalBestProjectionRow>(
"bark_battle_personal_best_projection",
),
ctx: std::marker::PhantomData,
}
}
}
pub struct BarkBattlePersonalBestProjectionInsertCallbackId(__sdk::CallbackId);
pub struct BarkBattlePersonalBestProjectionDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for BarkBattlePersonalBestProjectionTableHandle<'ctx> {
type Row = BarkBattlePersonalBestProjectionRow;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = BarkBattlePersonalBestProjectionRow> + '_ {
self.imp.iter()
}
type InsertCallbackId = BarkBattlePersonalBestProjectionInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattlePersonalBestProjectionInsertCallbackId {
BarkBattlePersonalBestProjectionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: BarkBattlePersonalBestProjectionInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = BarkBattlePersonalBestProjectionDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattlePersonalBestProjectionDeleteCallbackId {
BarkBattlePersonalBestProjectionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: BarkBattlePersonalBestProjectionDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct BarkBattlePersonalBestProjectionUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattlePersonalBestProjectionTableHandle<'ctx> {
type UpdateCallbackId = BarkBattlePersonalBestProjectionUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> BarkBattlePersonalBestProjectionUpdateCallbackId {
BarkBattlePersonalBestProjectionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: BarkBattlePersonalBestProjectionUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `personal_best_id` unique index on the table `bark_battle_personal_best_projection`,
/// which allows point queries on the field of the same name
/// via the [`BarkBattlePersonalBestProjectionPersonalBestIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_personal_best_projection().personal_best_id().find(...)`.
pub struct BarkBattlePersonalBestProjectionPersonalBestIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<BarkBattlePersonalBestProjectionRow, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> BarkBattlePersonalBestProjectionTableHandle<'ctx> {
/// Get a handle on the `personal_best_id` unique index on the table `bark_battle_personal_best_projection`.
pub fn personal_best_id(&self) -> BarkBattlePersonalBestProjectionPersonalBestIdUnique<'ctx> {
BarkBattlePersonalBestProjectionPersonalBestIdUnique {
imp: self.imp.get_unique_constraint::<String>("personal_best_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> BarkBattlePersonalBestProjectionPersonalBestIdUnique<'ctx> {
/// Find the subscribed row whose `personal_best_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<BarkBattlePersonalBestProjectionRow> {
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::<BarkBattlePersonalBestProjectionRow>(
"bark_battle_personal_best_projection",
);
_table.add_unique_constraint::<String>("personal_best_id", |row| &row.personal_best_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<BarkBattlePersonalBestProjectionRow>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse(
"TableUpdate<BarkBattlePersonalBestProjectionRow>",
"TableUpdate",
)
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `BarkBattlePersonalBestProjectionRow`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait bark_battle_personal_best_projectionQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `BarkBattlePersonalBestProjectionRow`.
fn bark_battle_personal_best_projection(
&self,
) -> __sdk::__query_builder::Table<BarkBattlePersonalBestProjectionRow>;
}
impl bark_battle_personal_best_projectionQueryTableAccess for __sdk::QueryTableAccessor {
fn bark_battle_personal_best_projection(
&self,
) -> __sdk::__query_builder::Table<BarkBattlePersonalBestProjectionRow> {
__sdk::__query_builder::Table::new("bark_battle_personal_best_projection")
}
}

View File

@@ -0,0 +1,17 @@
// 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 BarkBattleProcedureResult {
pub ok: bool,
pub row_json: Option<String>,
pub error_message: Option<String>,
}
impl __sdk::InModule for BarkBattleProcedureResult {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,90 @@
// 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 BarkBattlePublishedConfigRow {
pub work_id: String,
pub owner_user_id: String,
pub source_draft_id: Option<String>,
pub config_version: u64,
pub ruleset_version: String,
pub difficulty_preset: String,
pub leaderboard_enabled: bool,
pub config_json: String,
pub published_snapshot_json: String,
pub created_at: __sdk::Timestamp,
pub updated_at: __sdk::Timestamp,
pub published_at: __sdk::Timestamp,
}
impl __sdk::InModule for BarkBattlePublishedConfigRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `BarkBattlePublishedConfigRow`.
///
/// Provides typed access to columns for query building.
pub struct BarkBattlePublishedConfigRowCols {
pub work_id: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, String>,
pub source_draft_id: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, Option<String>>,
pub config_version: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, u64>,
pub ruleset_version: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, String>,
pub difficulty_preset: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, String>,
pub leaderboard_enabled: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, bool>,
pub config_json: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, String>,
pub published_snapshot_json: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, String>,
pub created_at: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, __sdk::Timestamp>,
pub updated_at: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, __sdk::Timestamp>,
pub published_at: __sdk::__query_builder::Col<BarkBattlePublishedConfigRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for BarkBattlePublishedConfigRow {
type Cols = BarkBattlePublishedConfigRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
BarkBattlePublishedConfigRowCols {
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
source_draft_id: __sdk::__query_builder::Col::new(table_name, "source_draft_id"),
config_version: __sdk::__query_builder::Col::new(table_name, "config_version"),
ruleset_version: __sdk::__query_builder::Col::new(table_name, "ruleset_version"),
difficulty_preset: __sdk::__query_builder::Col::new(table_name, "difficulty_preset"),
leaderboard_enabled: __sdk::__query_builder::Col::new(
table_name,
"leaderboard_enabled",
),
config_json: __sdk::__query_builder::Col::new(table_name, "config_json"),
published_snapshot_json: __sdk::__query_builder::Col::new(
table_name,
"published_snapshot_json",
),
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
published_at: __sdk::__query_builder::Col::new(table_name, "published_at"),
}
}
}
/// Indexed column accessor struct for the table `BarkBattlePublishedConfigRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct BarkBattlePublishedConfigRowIxCols {
pub owner_user_id: __sdk::__query_builder::IxCol<BarkBattlePublishedConfigRow, String>,
pub work_id: __sdk::__query_builder::IxCol<BarkBattlePublishedConfigRow, String>,
}
impl __sdk::__query_builder::HasIxCols for BarkBattlePublishedConfigRow {
type IxCols = BarkBattlePublishedConfigRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
BarkBattlePublishedConfigRowIxCols {
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for BarkBattlePublishedConfigRow {}

View File

@@ -0,0 +1,169 @@
// 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 super::bark_battle_published_config_row_type::BarkBattlePublishedConfigRow;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `bark_battle_published_config`.
///
/// Obtain a handle from the [`BarkBattlePublishedConfigTableAccess::bark_battle_published_config`] method on [`super::RemoteTables`],
/// like `ctx.db.bark_battle_published_config()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_published_config().on_insert(...)`.
pub struct BarkBattlePublishedConfigTableHandle<'ctx> {
imp: __sdk::TableHandle<BarkBattlePublishedConfigRow>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `bark_battle_published_config`.
///
/// Implemented for [`super::RemoteTables`].
pub trait BarkBattlePublishedConfigTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`BarkBattlePublishedConfigTableHandle`], which mediates access to the table `bark_battle_published_config`.
fn bark_battle_published_config(&self) -> BarkBattlePublishedConfigTableHandle<'_>;
}
impl BarkBattlePublishedConfigTableAccess for super::RemoteTables {
fn bark_battle_published_config(&self) -> BarkBattlePublishedConfigTableHandle<'_> {
BarkBattlePublishedConfigTableHandle {
imp: self
.imp
.get_table::<BarkBattlePublishedConfigRow>("bark_battle_published_config"),
ctx: std::marker::PhantomData,
}
}
}
pub struct BarkBattlePublishedConfigInsertCallbackId(__sdk::CallbackId);
pub struct BarkBattlePublishedConfigDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for BarkBattlePublishedConfigTableHandle<'ctx> {
type Row = BarkBattlePublishedConfigRow;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = BarkBattlePublishedConfigRow> + '_ {
self.imp.iter()
}
type InsertCallbackId = BarkBattlePublishedConfigInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattlePublishedConfigInsertCallbackId {
BarkBattlePublishedConfigInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: BarkBattlePublishedConfigInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = BarkBattlePublishedConfigDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattlePublishedConfigDeleteCallbackId {
BarkBattlePublishedConfigDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: BarkBattlePublishedConfigDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct BarkBattlePublishedConfigUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattlePublishedConfigTableHandle<'ctx> {
type UpdateCallbackId = BarkBattlePublishedConfigUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> BarkBattlePublishedConfigUpdateCallbackId {
BarkBattlePublishedConfigUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: BarkBattlePublishedConfigUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `work_id` unique index on the table `bark_battle_published_config`,
/// which allows point queries on the field of the same name
/// via the [`BarkBattlePublishedConfigWorkIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_published_config().work_id().find(...)`.
pub struct BarkBattlePublishedConfigWorkIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<BarkBattlePublishedConfigRow, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> BarkBattlePublishedConfigTableHandle<'ctx> {
/// Get a handle on the `work_id` unique index on the table `bark_battle_published_config`.
pub fn work_id(&self) -> BarkBattlePublishedConfigWorkIdUnique<'ctx> {
BarkBattlePublishedConfigWorkIdUnique {
imp: self.imp.get_unique_constraint::<String>("work_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> BarkBattlePublishedConfigWorkIdUnique<'ctx> {
/// Find the subscribed row whose `work_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<BarkBattlePublishedConfigRow> {
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::<BarkBattlePublishedConfigRow>("bark_battle_published_config");
_table.add_unique_constraint::<String>("work_id", |row| &row.work_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<BarkBattlePublishedConfigRow>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse(
"TableUpdate<BarkBattlePublishedConfigRow>",
"TableUpdate",
)
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `BarkBattlePublishedConfigRow`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait bark_battle_published_configQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `BarkBattlePublishedConfigRow`.
fn bark_battle_published_config(
&self,
) -> __sdk::__query_builder::Table<BarkBattlePublishedConfigRow>;
}
impl bark_battle_published_configQueryTableAccess for __sdk::QueryTableAccessor {
fn bark_battle_published_config(
&self,
) -> __sdk::__query_builder::Table<BarkBattlePublishedConfigRow> {
__sdk::__query_builder::Table::new("bark_battle_published_config")
}
}

View File

@@ -0,0 +1,32 @@
// 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 BarkBattleRunFinishInput {
pub run_id: String,
pub run_token: String,
pub owner_user_id: String,
pub work_id: String,
pub config_version: u64,
pub ruleset_version: String,
pub difficulty_preset: String,
pub client_finished_at_micros: i64,
pub server_finished_at_micros: i64,
pub duration_ms: u64,
pub trigger_count: u64,
pub max_volume_millis: u32,
pub average_volume_millis: u32,
pub final_energy_millis: u32,
pub opponent_final_energy_millis: u32,
pub max_combo: u32,
pub metrics_json: String,
pub derived_metrics_json: String,
}
impl __sdk::InModule for BarkBattleRunFinishInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,16 @@
// 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 BarkBattleRunGetInput {
pub run_id: String,
pub owner_user_id: String,
}
impl __sdk::InModule for BarkBattleRunGetInput {
type Module = super::RemoteModule;
}

View File

@@ -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 BarkBattleRunStartInput {
pub run_id: String,
pub run_token: String,
pub owner_user_id: String,
pub work_id: String,
pub config_version: u64,
pub ruleset_version: String,
pub difficulty_preset: String,
pub client_started_at_micros: i64,
pub server_started_at_micros: i64,
}
impl __sdk::InModule for BarkBattleRunStartInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,16 @@
// 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 BarkBattleRuntimeConfigGetInput {
pub work_id: String,
pub owner_user_id: Option<String>,
}
impl __sdk::InModule for BarkBattleRuntimeConfigGetInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,127 @@
// 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 BarkBattleRuntimeRunRow {
pub run_id: String,
pub run_token_hash: String,
pub owner_user_id: String,
pub work_id: String,
pub config_version: u64,
pub ruleset_version: String,
pub difficulty_preset: String,
pub leaderboard_enabled: bool,
pub status: String,
pub client_started_at_micros: i64,
pub server_started_at: __sdk::Timestamp,
pub client_finished_at_micros: Option<i64>,
pub server_finished_at: Option<__sdk::Timestamp>,
pub metrics_json: String,
pub server_result: Option<String>,
pub validation_status: String,
pub anti_cheat_flags_json: String,
pub leaderboard_score: Option<u64>,
pub score_id: Option<String>,
pub created_at: __sdk::Timestamp,
pub updated_at: __sdk::Timestamp,
}
impl __sdk::InModule for BarkBattleRuntimeRunRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `BarkBattleRuntimeRunRow`.
///
/// Provides typed access to columns for query building.
pub struct BarkBattleRuntimeRunRowCols {
pub run_id: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, String>,
pub run_token_hash: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, String>,
pub work_id: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, String>,
pub config_version: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, u64>,
pub ruleset_version: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, String>,
pub difficulty_preset: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, String>,
pub leaderboard_enabled: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, bool>,
pub status: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, String>,
pub client_started_at_micros: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, i64>,
pub server_started_at: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, __sdk::Timestamp>,
pub client_finished_at_micros:
__sdk::__query_builder::Col<BarkBattleRuntimeRunRow, Option<i64>>,
pub server_finished_at:
__sdk::__query_builder::Col<BarkBattleRuntimeRunRow, Option<__sdk::Timestamp>>,
pub metrics_json: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, String>,
pub server_result: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, Option<String>>,
pub validation_status: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, String>,
pub anti_cheat_flags_json: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, String>,
pub leaderboard_score: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, Option<u64>>,
pub score_id: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, Option<String>>,
pub created_at: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, __sdk::Timestamp>,
pub updated_at: __sdk::__query_builder::Col<BarkBattleRuntimeRunRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for BarkBattleRuntimeRunRow {
type Cols = BarkBattleRuntimeRunRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
BarkBattleRuntimeRunRowCols {
run_id: __sdk::__query_builder::Col::new(table_name, "run_id"),
run_token_hash: __sdk::__query_builder::Col::new(table_name, "run_token_hash"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
config_version: __sdk::__query_builder::Col::new(table_name, "config_version"),
ruleset_version: __sdk::__query_builder::Col::new(table_name, "ruleset_version"),
difficulty_preset: __sdk::__query_builder::Col::new(table_name, "difficulty_preset"),
leaderboard_enabled: __sdk::__query_builder::Col::new(
table_name,
"leaderboard_enabled",
),
status: __sdk::__query_builder::Col::new(table_name, "status"),
client_started_at_micros: __sdk::__query_builder::Col::new(
table_name,
"client_started_at_micros",
),
server_started_at: __sdk::__query_builder::Col::new(table_name, "server_started_at"),
client_finished_at_micros: __sdk::__query_builder::Col::new(
table_name,
"client_finished_at_micros",
),
server_finished_at: __sdk::__query_builder::Col::new(table_name, "server_finished_at"),
metrics_json: __sdk::__query_builder::Col::new(table_name, "metrics_json"),
server_result: __sdk::__query_builder::Col::new(table_name, "server_result"),
validation_status: __sdk::__query_builder::Col::new(table_name, "validation_status"),
anti_cheat_flags_json: __sdk::__query_builder::Col::new(
table_name,
"anti_cheat_flags_json",
),
leaderboard_score: __sdk::__query_builder::Col::new(table_name, "leaderboard_score"),
score_id: __sdk::__query_builder::Col::new(table_name, "score_id"),
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
}
}
}
/// Indexed column accessor struct for the table `BarkBattleRuntimeRunRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct BarkBattleRuntimeRunRowIxCols {
pub owner_user_id: __sdk::__query_builder::IxCol<BarkBattleRuntimeRunRow, String>,
pub run_id: __sdk::__query_builder::IxCol<BarkBattleRuntimeRunRow, String>,
pub work_id: __sdk::__query_builder::IxCol<BarkBattleRuntimeRunRow, String>,
}
impl __sdk::__query_builder::HasIxCols for BarkBattleRuntimeRunRow {
type IxCols = BarkBattleRuntimeRunRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
BarkBattleRuntimeRunRowIxCols {
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"),
work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for BarkBattleRuntimeRunRow {}

View File

@@ -0,0 +1,162 @@
// 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 super::bark_battle_runtime_run_row_type::BarkBattleRuntimeRunRow;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `bark_battle_runtime_run`.
///
/// Obtain a handle from the [`BarkBattleRuntimeRunTableAccess::bark_battle_runtime_run`] method on [`super::RemoteTables`],
/// like `ctx.db.bark_battle_runtime_run()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_runtime_run().on_insert(...)`.
pub struct BarkBattleRuntimeRunTableHandle<'ctx> {
imp: __sdk::TableHandle<BarkBattleRuntimeRunRow>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `bark_battle_runtime_run`.
///
/// Implemented for [`super::RemoteTables`].
pub trait BarkBattleRuntimeRunTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`BarkBattleRuntimeRunTableHandle`], which mediates access to the table `bark_battle_runtime_run`.
fn bark_battle_runtime_run(&self) -> BarkBattleRuntimeRunTableHandle<'_>;
}
impl BarkBattleRuntimeRunTableAccess for super::RemoteTables {
fn bark_battle_runtime_run(&self) -> BarkBattleRuntimeRunTableHandle<'_> {
BarkBattleRuntimeRunTableHandle {
imp: self
.imp
.get_table::<BarkBattleRuntimeRunRow>("bark_battle_runtime_run"),
ctx: std::marker::PhantomData,
}
}
}
pub struct BarkBattleRuntimeRunInsertCallbackId(__sdk::CallbackId);
pub struct BarkBattleRuntimeRunDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for BarkBattleRuntimeRunTableHandle<'ctx> {
type Row = BarkBattleRuntimeRunRow;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = BarkBattleRuntimeRunRow> + '_ {
self.imp.iter()
}
type InsertCallbackId = BarkBattleRuntimeRunInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattleRuntimeRunInsertCallbackId {
BarkBattleRuntimeRunInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: BarkBattleRuntimeRunInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = BarkBattleRuntimeRunDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattleRuntimeRunDeleteCallbackId {
BarkBattleRuntimeRunDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: BarkBattleRuntimeRunDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct BarkBattleRuntimeRunUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattleRuntimeRunTableHandle<'ctx> {
type UpdateCallbackId = BarkBattleRuntimeRunUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> BarkBattleRuntimeRunUpdateCallbackId {
BarkBattleRuntimeRunUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: BarkBattleRuntimeRunUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `run_id` unique index on the table `bark_battle_runtime_run`,
/// which allows point queries on the field of the same name
/// via the [`BarkBattleRuntimeRunRunIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_runtime_run().run_id().find(...)`.
pub struct BarkBattleRuntimeRunRunIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<BarkBattleRuntimeRunRow, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> BarkBattleRuntimeRunTableHandle<'ctx> {
/// Get a handle on the `run_id` unique index on the table `bark_battle_runtime_run`.
pub fn run_id(&self) -> BarkBattleRuntimeRunRunIdUnique<'ctx> {
BarkBattleRuntimeRunRunIdUnique {
imp: self.imp.get_unique_constraint::<String>("run_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> BarkBattleRuntimeRunRunIdUnique<'ctx> {
/// Find the subscribed row whose `run_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<BarkBattleRuntimeRunRow> {
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::<BarkBattleRuntimeRunRow>("bark_battle_runtime_run");
_table.add_unique_constraint::<String>("run_id", |row| &row.run_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<BarkBattleRuntimeRunRow>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<BarkBattleRuntimeRunRow>", "TableUpdate")
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `BarkBattleRuntimeRunRow`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait bark_battle_runtime_runQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `BarkBattleRuntimeRunRow`.
fn bark_battle_runtime_run(&self) -> __sdk::__query_builder::Table<BarkBattleRuntimeRunRow>;
}
impl bark_battle_runtime_runQueryTableAccess for __sdk::QueryTableAccessor {
fn bark_battle_runtime_run(&self) -> __sdk::__query_builder::Table<BarkBattleRuntimeRunRow> {
__sdk::__query_builder::Table::new("bark_battle_runtime_run")
}
}

View File

@@ -0,0 +1,106 @@
// 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 BarkBattleScoreRecordRow {
pub score_id: String,
pub owner_user_id: String,
pub work_id: String,
pub run_id: String,
pub config_version: u64,
pub ruleset_version: String,
pub difficulty_preset: String,
pub leaderboard_enabled: bool,
pub metrics_json: String,
pub derived_metrics_json: String,
pub server_result: String,
pub validation_status: String,
pub anti_cheat_flags_json: String,
pub leaderboard_score: Option<u64>,
pub recorded_at: __sdk::Timestamp,
}
impl __sdk::InModule for BarkBattleScoreRecordRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `BarkBattleScoreRecordRow`.
///
/// Provides typed access to columns for query building.
pub struct BarkBattleScoreRecordRowCols {
pub score_id: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub work_id: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub run_id: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub config_version: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, u64>,
pub ruleset_version: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub difficulty_preset: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub leaderboard_enabled: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, bool>,
pub metrics_json: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub derived_metrics_json: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub server_result: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub validation_status: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub anti_cheat_flags_json: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, String>,
pub leaderboard_score: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, Option<u64>>,
pub recorded_at: __sdk::__query_builder::Col<BarkBattleScoreRecordRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for BarkBattleScoreRecordRow {
type Cols = BarkBattleScoreRecordRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
BarkBattleScoreRecordRowCols {
score_id: __sdk::__query_builder::Col::new(table_name, "score_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
run_id: __sdk::__query_builder::Col::new(table_name, "run_id"),
config_version: __sdk::__query_builder::Col::new(table_name, "config_version"),
ruleset_version: __sdk::__query_builder::Col::new(table_name, "ruleset_version"),
difficulty_preset: __sdk::__query_builder::Col::new(table_name, "difficulty_preset"),
leaderboard_enabled: __sdk::__query_builder::Col::new(
table_name,
"leaderboard_enabled",
),
metrics_json: __sdk::__query_builder::Col::new(table_name, "metrics_json"),
derived_metrics_json: __sdk::__query_builder::Col::new(
table_name,
"derived_metrics_json",
),
server_result: __sdk::__query_builder::Col::new(table_name, "server_result"),
validation_status: __sdk::__query_builder::Col::new(table_name, "validation_status"),
anti_cheat_flags_json: __sdk::__query_builder::Col::new(
table_name,
"anti_cheat_flags_json",
),
leaderboard_score: __sdk::__query_builder::Col::new(table_name, "leaderboard_score"),
recorded_at: __sdk::__query_builder::Col::new(table_name, "recorded_at"),
}
}
}
/// Indexed column accessor struct for the table `BarkBattleScoreRecordRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct BarkBattleScoreRecordRowIxCols {
pub owner_user_id: __sdk::__query_builder::IxCol<BarkBattleScoreRecordRow, String>,
pub run_id: __sdk::__query_builder::IxCol<BarkBattleScoreRecordRow, String>,
pub score_id: __sdk::__query_builder::IxCol<BarkBattleScoreRecordRow, String>,
pub work_id: __sdk::__query_builder::IxCol<BarkBattleScoreRecordRow, String>,
}
impl __sdk::__query_builder::HasIxCols for BarkBattleScoreRecordRow {
type IxCols = BarkBattleScoreRecordRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
BarkBattleScoreRecordRowIxCols {
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"),
score_id: __sdk::__query_builder::IxCol::new(table_name, "score_id"),
work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for BarkBattleScoreRecordRow {}

View File

@@ -0,0 +1,162 @@
// 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 super::bark_battle_score_record_row_type::BarkBattleScoreRecordRow;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `bark_battle_score_record`.
///
/// Obtain a handle from the [`BarkBattleScoreRecordTableAccess::bark_battle_score_record`] method on [`super::RemoteTables`],
/// like `ctx.db.bark_battle_score_record()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_score_record().on_insert(...)`.
pub struct BarkBattleScoreRecordTableHandle<'ctx> {
imp: __sdk::TableHandle<BarkBattleScoreRecordRow>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `bark_battle_score_record`.
///
/// Implemented for [`super::RemoteTables`].
pub trait BarkBattleScoreRecordTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`BarkBattleScoreRecordTableHandle`], which mediates access to the table `bark_battle_score_record`.
fn bark_battle_score_record(&self) -> BarkBattleScoreRecordTableHandle<'_>;
}
impl BarkBattleScoreRecordTableAccess for super::RemoteTables {
fn bark_battle_score_record(&self) -> BarkBattleScoreRecordTableHandle<'_> {
BarkBattleScoreRecordTableHandle {
imp: self
.imp
.get_table::<BarkBattleScoreRecordRow>("bark_battle_score_record"),
ctx: std::marker::PhantomData,
}
}
}
pub struct BarkBattleScoreRecordInsertCallbackId(__sdk::CallbackId);
pub struct BarkBattleScoreRecordDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for BarkBattleScoreRecordTableHandle<'ctx> {
type Row = BarkBattleScoreRecordRow;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = BarkBattleScoreRecordRow> + '_ {
self.imp.iter()
}
type InsertCallbackId = BarkBattleScoreRecordInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattleScoreRecordInsertCallbackId {
BarkBattleScoreRecordInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: BarkBattleScoreRecordInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = BarkBattleScoreRecordDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattleScoreRecordDeleteCallbackId {
BarkBattleScoreRecordDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: BarkBattleScoreRecordDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct BarkBattleScoreRecordUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattleScoreRecordTableHandle<'ctx> {
type UpdateCallbackId = BarkBattleScoreRecordUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> BarkBattleScoreRecordUpdateCallbackId {
BarkBattleScoreRecordUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: BarkBattleScoreRecordUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `score_id` unique index on the table `bark_battle_score_record`,
/// which allows point queries on the field of the same name
/// via the [`BarkBattleScoreRecordScoreIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_score_record().score_id().find(...)`.
pub struct BarkBattleScoreRecordScoreIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<BarkBattleScoreRecordRow, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> BarkBattleScoreRecordTableHandle<'ctx> {
/// Get a handle on the `score_id` unique index on the table `bark_battle_score_record`.
pub fn score_id(&self) -> BarkBattleScoreRecordScoreIdUnique<'ctx> {
BarkBattleScoreRecordScoreIdUnique {
imp: self.imp.get_unique_constraint::<String>("score_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> BarkBattleScoreRecordScoreIdUnique<'ctx> {
/// Find the subscribed row whose `score_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<BarkBattleScoreRecordRow> {
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::<BarkBattleScoreRecordRow>("bark_battle_score_record");
_table.add_unique_constraint::<String>("score_id", |row| &row.score_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<BarkBattleScoreRecordRow>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<BarkBattleScoreRecordRow>", "TableUpdate")
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `BarkBattleScoreRecordRow`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait bark_battle_score_recordQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `BarkBattleScoreRecordRow`.
fn bark_battle_score_record(&self) -> __sdk::__query_builder::Table<BarkBattleScoreRecordRow>;
}
impl bark_battle_score_recordQueryTableAccess for __sdk::QueryTableAccessor {
fn bark_battle_score_record(&self) -> __sdk::__query_builder::Table<BarkBattleScoreRecordRow> {
__sdk::__query_builder::Table::new("bark_battle_score_record")
}
}

View File

@@ -0,0 +1,19 @@
// 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 BarkBattleWorkPublishInput {
pub draft_id: String,
pub owner_user_id: String,
pub work_id: String,
pub published_snapshot_json: Option<String>,
pub published_at_micros: i64,
}
impl __sdk::InModule for BarkBattleWorkPublishInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,111 @@
// 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 BarkBattleWorkStatsProjectionRow {
pub work_id: String,
pub owner_user_id: String,
pub play_count: u64,
pub finished_count: u64,
pub accepted_score_count: u64,
pub leaderboard_entry_count: u64,
pub best_leaderboard_score: Option<u64>,
pub best_score_id: Option<String>,
pub best_run_id: Option<String>,
pub average_final_energy: f32,
pub average_trigger_count: f32,
pub last_finished_at_micros: Option<i64>,
pub stats_json: String,
pub updated_at: __sdk::Timestamp,
}
impl __sdk::InModule for BarkBattleWorkStatsProjectionRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `BarkBattleWorkStatsProjectionRow`.
///
/// Provides typed access to columns for query building.
pub struct BarkBattleWorkStatsProjectionRowCols {
pub work_id: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, String>,
pub play_count: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, u64>,
pub finished_count: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, u64>,
pub accepted_score_count: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, u64>,
pub leaderboard_entry_count: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, u64>,
pub best_leaderboard_score:
__sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, Option<u64>>,
pub best_score_id:
__sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, Option<String>>,
pub best_run_id: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, Option<String>>,
pub average_final_energy: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, f32>,
pub average_trigger_count: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, f32>,
pub last_finished_at_micros:
__sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, Option<i64>>,
pub stats_json: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, String>,
pub updated_at: __sdk::__query_builder::Col<BarkBattleWorkStatsProjectionRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for BarkBattleWorkStatsProjectionRow {
type Cols = BarkBattleWorkStatsProjectionRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
BarkBattleWorkStatsProjectionRowCols {
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
play_count: __sdk::__query_builder::Col::new(table_name, "play_count"),
finished_count: __sdk::__query_builder::Col::new(table_name, "finished_count"),
accepted_score_count: __sdk::__query_builder::Col::new(
table_name,
"accepted_score_count",
),
leaderboard_entry_count: __sdk::__query_builder::Col::new(
table_name,
"leaderboard_entry_count",
),
best_leaderboard_score: __sdk::__query_builder::Col::new(
table_name,
"best_leaderboard_score",
),
best_score_id: __sdk::__query_builder::Col::new(table_name, "best_score_id"),
best_run_id: __sdk::__query_builder::Col::new(table_name, "best_run_id"),
average_final_energy: __sdk::__query_builder::Col::new(
table_name,
"average_final_energy",
),
average_trigger_count: __sdk::__query_builder::Col::new(
table_name,
"average_trigger_count",
),
last_finished_at_micros: __sdk::__query_builder::Col::new(
table_name,
"last_finished_at_micros",
),
stats_json: __sdk::__query_builder::Col::new(table_name, "stats_json"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
}
}
}
/// Indexed column accessor struct for the table `BarkBattleWorkStatsProjectionRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct BarkBattleWorkStatsProjectionRowIxCols {
pub owner_user_id: __sdk::__query_builder::IxCol<BarkBattleWorkStatsProjectionRow, String>,
pub work_id: __sdk::__query_builder::IxCol<BarkBattleWorkStatsProjectionRow, String>,
}
impl __sdk::__query_builder::HasIxCols for BarkBattleWorkStatsProjectionRow {
type IxCols = BarkBattleWorkStatsProjectionRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
BarkBattleWorkStatsProjectionRowIxCols {
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
work_id: __sdk::__query_builder::IxCol::new(table_name, "work_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for BarkBattleWorkStatsProjectionRow {}

View File

@@ -0,0 +1,169 @@
// 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 super::bark_battle_work_stats_projection_row_type::BarkBattleWorkStatsProjectionRow;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `bark_battle_work_stats_projection`.
///
/// Obtain a handle from the [`BarkBattleWorkStatsProjectionTableAccess::bark_battle_work_stats_projection`] method on [`super::RemoteTables`],
/// like `ctx.db.bark_battle_work_stats_projection()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_work_stats_projection().on_insert(...)`.
pub struct BarkBattleWorkStatsProjectionTableHandle<'ctx> {
imp: __sdk::TableHandle<BarkBattleWorkStatsProjectionRow>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `bark_battle_work_stats_projection`.
///
/// Implemented for [`super::RemoteTables`].
pub trait BarkBattleWorkStatsProjectionTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`BarkBattleWorkStatsProjectionTableHandle`], which mediates access to the table `bark_battle_work_stats_projection`.
fn bark_battle_work_stats_projection(&self) -> BarkBattleWorkStatsProjectionTableHandle<'_>;
}
impl BarkBattleWorkStatsProjectionTableAccess for super::RemoteTables {
fn bark_battle_work_stats_projection(&self) -> BarkBattleWorkStatsProjectionTableHandle<'_> {
BarkBattleWorkStatsProjectionTableHandle {
imp: self
.imp
.get_table::<BarkBattleWorkStatsProjectionRow>("bark_battle_work_stats_projection"),
ctx: std::marker::PhantomData,
}
}
}
pub struct BarkBattleWorkStatsProjectionInsertCallbackId(__sdk::CallbackId);
pub struct BarkBattleWorkStatsProjectionDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for BarkBattleWorkStatsProjectionTableHandle<'ctx> {
type Row = BarkBattleWorkStatsProjectionRow;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = BarkBattleWorkStatsProjectionRow> + '_ {
self.imp.iter()
}
type InsertCallbackId = BarkBattleWorkStatsProjectionInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattleWorkStatsProjectionInsertCallbackId {
BarkBattleWorkStatsProjectionInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: BarkBattleWorkStatsProjectionInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = BarkBattleWorkStatsProjectionDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> BarkBattleWorkStatsProjectionDeleteCallbackId {
BarkBattleWorkStatsProjectionDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: BarkBattleWorkStatsProjectionDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
pub struct BarkBattleWorkStatsProjectionUpdateCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::TableWithPrimaryKey for BarkBattleWorkStatsProjectionTableHandle<'ctx> {
type UpdateCallbackId = BarkBattleWorkStatsProjectionUpdateCallbackId;
fn on_update(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static,
) -> BarkBattleWorkStatsProjectionUpdateCallbackId {
BarkBattleWorkStatsProjectionUpdateCallbackId(self.imp.on_update(Box::new(callback)))
}
fn remove_on_update(&self, callback: BarkBattleWorkStatsProjectionUpdateCallbackId) {
self.imp.remove_on_update(callback.0)
}
}
/// Access to the `work_id` unique index on the table `bark_battle_work_stats_projection`,
/// which allows point queries on the field of the same name
/// via the [`BarkBattleWorkStatsProjectionWorkIdUnique::find`] method.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.bark_battle_work_stats_projection().work_id().find(...)`.
pub struct BarkBattleWorkStatsProjectionWorkIdUnique<'ctx> {
imp: __sdk::UniqueConstraintHandle<BarkBattleWorkStatsProjectionRow, String>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
impl<'ctx> BarkBattleWorkStatsProjectionTableHandle<'ctx> {
/// Get a handle on the `work_id` unique index on the table `bark_battle_work_stats_projection`.
pub fn work_id(&self) -> BarkBattleWorkStatsProjectionWorkIdUnique<'ctx> {
BarkBattleWorkStatsProjectionWorkIdUnique {
imp: self.imp.get_unique_constraint::<String>("work_id"),
phantom: std::marker::PhantomData,
}
}
}
impl<'ctx> BarkBattleWorkStatsProjectionWorkIdUnique<'ctx> {
/// Find the subscribed row whose `work_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<BarkBattleWorkStatsProjectionRow> {
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::<BarkBattleWorkStatsProjectionRow>("bark_battle_work_stats_projection");
_table.add_unique_constraint::<String>("work_id", |row| &row.work_id);
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<BarkBattleWorkStatsProjectionRow>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse(
"TableUpdate<BarkBattleWorkStatsProjectionRow>",
"TableUpdate",
)
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `BarkBattleWorkStatsProjectionRow`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait bark_battle_work_stats_projectionQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `BarkBattleWorkStatsProjectionRow`.
fn bark_battle_work_stats_projection(
&self,
) -> __sdk::__query_builder::Table<BarkBattleWorkStatsProjectionRow>;
}
impl bark_battle_work_stats_projectionQueryTableAccess for __sdk::QueryTableAccessor {
fn bark_battle_work_stats_projection(
&self,
) -> __sdk::__query_builder::Table<BarkBattleWorkStatsProjectionRow> {
__sdk::__query_builder::Table::new("bark_battle_work_stats_projection")
}
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -92,6 +92,28 @@ pub mod auth_store_snapshot_table;
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_table;
pub mod bark_battle_draft_config_upsert_input_type;
pub mod bark_battle_draft_create_input_type;
pub mod bark_battle_leaderboard_entry_row_type;
pub mod bark_battle_leaderboard_entry_table;
pub mod bark_battle_personal_best_projection_row_type;
pub mod bark_battle_personal_best_projection_table;
pub mod bark_battle_procedure_result_type;
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_start_input_type;
pub mod bark_battle_runtime_config_get_input_type;
pub mod bark_battle_runtime_run_row_type;
pub mod bark_battle_runtime_run_table;
pub mod bark_battle_score_record_row_type;
pub mod bark_battle_score_record_table;
pub mod bark_battle_work_publish_input_type;
pub mod bark_battle_work_stats_projection_row_type;
pub mod bark_battle_work_stats_projection_table;
pub mod battle_mode_type;
pub mod battle_state_input_type;
pub mod battle_state_procedure_result_type;
@@ -181,6 +203,7 @@ pub mod continue_story_and_return_procedure;
pub mod continue_story_reducer;
pub mod create_ai_task_and_return_procedure;
pub mod create_ai_task_reducer;
pub mod create_bark_battle_draft_procedure;
pub mod create_battle_state_and_return_procedure;
pub mod create_battle_state_reducer;
pub mod create_big_fish_session_procedure;
@@ -298,10 +321,13 @@ pub mod finalize_match_3_d_agent_message_turn_procedure;
pub mod finalize_puzzle_agent_message_turn_procedure;
pub mod finalize_square_hole_agent_message_turn_procedure;
pub mod finalize_visual_novel_agent_message_turn_procedure;
pub mod finish_bark_battle_run_procedure;
pub mod finish_match_3_d_time_up_procedure;
pub mod finish_square_hole_time_up_procedure;
pub mod generate_big_fish_asset_procedure;
pub mod get_auth_store_snapshot_procedure;
pub mod get_bark_battle_run_procedure;
pub mod get_bark_battle_runtime_config_procedure;
pub mod get_battle_state_procedure;
pub mod get_big_fish_run_procedure;
pub mod get_big_fish_session_procedure;
@@ -454,6 +480,7 @@ pub mod public_work_like_table;
pub mod public_work_like_type;
pub mod public_work_play_daily_stat_table;
pub mod public_work_play_daily_stat_type;
pub mod publish_bark_battle_work_procedure;
pub mod publish_big_fish_game_procedure;
pub mod publish_custom_world_profile_and_return_procedure;
pub mod publish_custom_world_profile_reducer;
@@ -719,6 +746,7 @@ pub mod square_hole_works_list_input_type;
pub mod square_hole_works_procedure_result_type;
pub mod start_ai_task_reducer;
pub mod start_ai_task_stage_reducer;
pub mod start_bark_battle_run_procedure;
pub mod start_big_fish_run_procedure;
pub mod start_match_3_d_run_procedure;
pub mod start_puzzle_run_procedure;
@@ -763,6 +791,7 @@ pub mod turn_in_quest_reducer;
pub mod unequip_inventory_item_input_type;
pub mod unpublish_custom_world_profile_and_return_procedure;
pub mod unpublish_custom_world_profile_reducer;
pub mod update_bark_battle_draft_config_procedure;
pub mod update_match_3_d_work_procedure;
pub mod update_puzzle_run_pause_procedure;
pub mod update_puzzle_work_procedure;
@@ -907,6 +936,28 @@ pub use auth_store_snapshot_table::*;
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_table::*;
pub use bark_battle_draft_config_upsert_input_type::BarkBattleDraftConfigUpsertInput;
pub use bark_battle_draft_create_input_type::BarkBattleDraftCreateInput;
pub use bark_battle_leaderboard_entry_row_type::BarkBattleLeaderboardEntryRow;
pub use bark_battle_leaderboard_entry_table::*;
pub use bark_battle_personal_best_projection_row_type::BarkBattlePersonalBestProjectionRow;
pub use bark_battle_personal_best_projection_table::*;
pub use bark_battle_procedure_result_type::BarkBattleProcedureResult;
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_start_input_type::BarkBattleRunStartInput;
pub use bark_battle_runtime_config_get_input_type::BarkBattleRuntimeConfigGetInput;
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;
pub use bark_battle_score_record_table::*;
pub use bark_battle_work_publish_input_type::BarkBattleWorkPublishInput;
pub use bark_battle_work_stats_projection_row_type::BarkBattleWorkStatsProjectionRow;
pub use bark_battle_work_stats_projection_table::*;
pub use battle_mode_type::BattleMode;
pub use battle_state_input_type::BattleStateInput;
pub use battle_state_procedure_result_type::BattleStateProcedureResult;
@@ -996,6 +1047,7 @@ pub use continue_story_and_return_procedure::continue_story_and_return;
pub use continue_story_reducer::continue_story;
pub use create_ai_task_and_return_procedure::create_ai_task_and_return;
pub use create_ai_task_reducer::create_ai_task;
pub use create_bark_battle_draft_procedure::create_bark_battle_draft;
pub use create_battle_state_and_return_procedure::create_battle_state_and_return;
pub use create_battle_state_reducer::create_battle_state;
pub use create_big_fish_session_procedure::create_big_fish_session;
@@ -1113,10 +1165,13 @@ pub use finalize_match_3_d_agent_message_turn_procedure::finalize_match_3_d_agen
pub use finalize_puzzle_agent_message_turn_procedure::finalize_puzzle_agent_message_turn;
pub use finalize_square_hole_agent_message_turn_procedure::finalize_square_hole_agent_message_turn;
pub use finalize_visual_novel_agent_message_turn_procedure::finalize_visual_novel_agent_message_turn;
pub use finish_bark_battle_run_procedure::finish_bark_battle_run;
pub use finish_match_3_d_time_up_procedure::finish_match_3_d_time_up;
pub use finish_square_hole_time_up_procedure::finish_square_hole_time_up;
pub use generate_big_fish_asset_procedure::generate_big_fish_asset;
pub use get_auth_store_snapshot_procedure::get_auth_store_snapshot;
pub use get_bark_battle_run_procedure::get_bark_battle_run;
pub use get_bark_battle_runtime_config_procedure::get_bark_battle_runtime_config;
pub use get_battle_state_procedure::get_battle_state;
pub use get_big_fish_run_procedure::get_big_fish_run;
pub use get_big_fish_session_procedure::get_big_fish_session;
@@ -1269,6 +1324,7 @@ pub use public_work_like_table::*;
pub use public_work_like_type::PublicWorkLike;
pub use public_work_play_daily_stat_table::*;
pub use public_work_play_daily_stat_type::PublicWorkPlayDailyStat;
pub use publish_bark_battle_work_procedure::publish_bark_battle_work;
pub use publish_big_fish_game_procedure::publish_big_fish_game;
pub use publish_custom_world_profile_and_return_procedure::publish_custom_world_profile_and_return;
pub use publish_custom_world_profile_reducer::publish_custom_world_profile;
@@ -1534,6 +1590,7 @@ pub use square_hole_works_list_input_type::SquareHoleWorksListInput;
pub use square_hole_works_procedure_result_type::SquareHoleWorksProcedureResult;
pub use start_ai_task_reducer::start_ai_task;
pub use start_ai_task_stage_reducer::start_ai_task_stage;
pub use start_bark_battle_run_procedure::start_bark_battle_run;
pub use start_big_fish_run_procedure::start_big_fish_run;
pub use start_match_3_d_run_procedure::start_match_3_d_run;
pub use start_puzzle_run_procedure::start_puzzle_run;
@@ -1578,6 +1635,7 @@ pub use turn_in_quest_reducer::turn_in_quest;
pub use unequip_inventory_item_input_type::UnequipInventoryItemInput;
pub use unpublish_custom_world_profile_and_return_procedure::unpublish_custom_world_profile_and_return;
pub use unpublish_custom_world_profile_reducer::unpublish_custom_world_profile;
pub use update_bark_battle_draft_config_procedure::update_bark_battle_draft_config;
pub use update_match_3_d_work_procedure::update_match_3_d_work;
pub use update_puzzle_run_pause_procedure::update_puzzle_run_pause;
pub use update_puzzle_work_procedure::update_puzzle_work;
@@ -1920,6 +1978,13 @@ pub struct DbUpdate {
auth_identity: __sdk::TableUpdate<AuthIdentity>,
auth_store_projection_meta: __sdk::TableUpdate<AuthStoreProjectionMeta>,
auth_store_snapshot: __sdk::TableUpdate<AuthStoreSnapshot>,
bark_battle_draft_config: __sdk::TableUpdate<BarkBattleDraftConfigRow>,
bark_battle_leaderboard_entry: __sdk::TableUpdate<BarkBattleLeaderboardEntryRow>,
bark_battle_personal_best_projection: __sdk::TableUpdate<BarkBattlePersonalBestProjectionRow>,
bark_battle_published_config: __sdk::TableUpdate<BarkBattlePublishedConfigRow>,
bark_battle_runtime_run: __sdk::TableUpdate<BarkBattleRuntimeRunRow>,
bark_battle_score_record: __sdk::TableUpdate<BarkBattleScoreRecordRow>,
bark_battle_work_stats_projection: __sdk::TableUpdate<BarkBattleWorkStatsProjectionRow>,
battle_state: __sdk::TableUpdate<BattleState>,
big_fish_agent_message: __sdk::TableUpdate<BigFishAgentMessage>,
big_fish_asset_slot: __sdk::TableUpdate<BigFishAssetSlot>,
@@ -2033,6 +2098,33 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
"auth_store_snapshot" => db_update
.auth_store_snapshot
.append(auth_store_snapshot_table::parse_table_update(table_update)?),
"bark_battle_draft_config" => db_update.bark_battle_draft_config.append(
bark_battle_draft_config_table::parse_table_update(table_update)?,
),
"bark_battle_leaderboard_entry" => db_update.bark_battle_leaderboard_entry.append(
bark_battle_leaderboard_entry_table::parse_table_update(table_update)?,
),
"bark_battle_personal_best_projection" => {
db_update.bark_battle_personal_best_projection.append(
bark_battle_personal_best_projection_table::parse_table_update(
table_update,
)?,
)
}
"bark_battle_published_config" => db_update.bark_battle_published_config.append(
bark_battle_published_config_table::parse_table_update(table_update)?,
),
"bark_battle_runtime_run" => db_update.bark_battle_runtime_run.append(
bark_battle_runtime_run_table::parse_table_update(table_update)?,
),
"bark_battle_score_record" => db_update.bark_battle_score_record.append(
bark_battle_score_record_table::parse_table_update(table_update)?,
),
"bark_battle_work_stats_projection" => {
db_update.bark_battle_work_stats_projection.append(
bark_battle_work_stats_projection_table::parse_table_update(table_update)?,
)
}
"battle_state" => db_update
.battle_state
.append(battle_state_table::parse_table_update(table_update)?),
@@ -2317,6 +2409,48 @@ impl __sdk::DbUpdate for DbUpdate {
&self.auth_store_snapshot,
)
.with_updates_by_pk(|row| &row.snapshot_id);
diff.bark_battle_draft_config = cache
.apply_diff_to_table::<BarkBattleDraftConfigRow>(
"bark_battle_draft_config",
&self.bark_battle_draft_config,
)
.with_updates_by_pk(|row| &row.draft_id);
diff.bark_battle_leaderboard_entry = cache
.apply_diff_to_table::<BarkBattleLeaderboardEntryRow>(
"bark_battle_leaderboard_entry",
&self.bark_battle_leaderboard_entry,
)
.with_updates_by_pk(|row| &row.leaderboard_entry_id);
diff.bark_battle_personal_best_projection = cache
.apply_diff_to_table::<BarkBattlePersonalBestProjectionRow>(
"bark_battle_personal_best_projection",
&self.bark_battle_personal_best_projection,
)
.with_updates_by_pk(|row| &row.personal_best_id);
diff.bark_battle_published_config = cache
.apply_diff_to_table::<BarkBattlePublishedConfigRow>(
"bark_battle_published_config",
&self.bark_battle_published_config,
)
.with_updates_by_pk(|row| &row.work_id);
diff.bark_battle_runtime_run = cache
.apply_diff_to_table::<BarkBattleRuntimeRunRow>(
"bark_battle_runtime_run",
&self.bark_battle_runtime_run,
)
.with_updates_by_pk(|row| &row.run_id);
diff.bark_battle_score_record = cache
.apply_diff_to_table::<BarkBattleScoreRecordRow>(
"bark_battle_score_record",
&self.bark_battle_score_record,
)
.with_updates_by_pk(|row| &row.score_id);
diff.bark_battle_work_stats_projection = cache
.apply_diff_to_table::<BarkBattleWorkStatsProjectionRow>(
"bark_battle_work_stats_projection",
&self.bark_battle_work_stats_projection,
)
.with_updates_by_pk(|row| &row.work_id);
diff.battle_state = cache
.apply_diff_to_table::<BattleState>("battle_state", &self.battle_state)
.with_updates_by_pk(|row| &row.battle_state_id);
@@ -2717,6 +2851,27 @@ impl __sdk::DbUpdate for DbUpdate {
"auth_store_snapshot" => db_update
.auth_store_snapshot
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"bark_battle_draft_config" => db_update
.bark_battle_draft_config
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"bark_battle_leaderboard_entry" => db_update
.bark_battle_leaderboard_entry
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"bark_battle_personal_best_projection" => db_update
.bark_battle_personal_best_projection
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"bark_battle_published_config" => db_update
.bark_battle_published_config
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"bark_battle_runtime_run" => db_update
.bark_battle_runtime_run
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"bark_battle_score_record" => db_update
.bark_battle_score_record
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"bark_battle_work_stats_projection" => db_update
.bark_battle_work_stats_projection
.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)?),
@@ -2973,6 +3128,27 @@ impl __sdk::DbUpdate for DbUpdate {
"auth_store_snapshot" => db_update
.auth_store_snapshot
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"bark_battle_draft_config" => db_update
.bark_battle_draft_config
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"bark_battle_leaderboard_entry" => db_update
.bark_battle_leaderboard_entry
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"bark_battle_personal_best_projection" => db_update
.bark_battle_personal_best_projection
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"bark_battle_published_config" => db_update
.bark_battle_published_config
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"bark_battle_runtime_run" => db_update
.bark_battle_runtime_run
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"bark_battle_score_record" => db_update
.bark_battle_score_record
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"bark_battle_work_stats_projection" => db_update
.bark_battle_work_stats_projection
.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)?),
@@ -3207,6 +3383,15 @@ pub struct AppliedDiff<'r> {
auth_identity: __sdk::TableAppliedDiff<'r, AuthIdentity>,
auth_store_projection_meta: __sdk::TableAppliedDiff<'r, AuthStoreProjectionMeta>,
auth_store_snapshot: __sdk::TableAppliedDiff<'r, AuthStoreSnapshot>,
bark_battle_draft_config: __sdk::TableAppliedDiff<'r, BarkBattleDraftConfigRow>,
bark_battle_leaderboard_entry: __sdk::TableAppliedDiff<'r, BarkBattleLeaderboardEntryRow>,
bark_battle_personal_best_projection:
__sdk::TableAppliedDiff<'r, BarkBattlePersonalBestProjectionRow>,
bark_battle_published_config: __sdk::TableAppliedDiff<'r, BarkBattlePublishedConfigRow>,
bark_battle_runtime_run: __sdk::TableAppliedDiff<'r, BarkBattleRuntimeRunRow>,
bark_battle_score_record: __sdk::TableAppliedDiff<'r, BarkBattleScoreRecordRow>,
bark_battle_work_stats_projection:
__sdk::TableAppliedDiff<'r, BarkBattleWorkStatsProjectionRow>,
battle_state: __sdk::TableAppliedDiff<'r, BattleState>,
big_fish_agent_message: __sdk::TableAppliedDiff<'r, BigFishAgentMessage>,
big_fish_asset_slot: __sdk::TableAppliedDiff<'r, BigFishAssetSlot>,
@@ -3342,6 +3527,41 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
&self.auth_store_snapshot,
event,
);
callbacks.invoke_table_row_callbacks::<BarkBattleDraftConfigRow>(
"bark_battle_draft_config",
&self.bark_battle_draft_config,
event,
);
callbacks.invoke_table_row_callbacks::<BarkBattleLeaderboardEntryRow>(
"bark_battle_leaderboard_entry",
&self.bark_battle_leaderboard_entry,
event,
);
callbacks.invoke_table_row_callbacks::<BarkBattlePersonalBestProjectionRow>(
"bark_battle_personal_best_projection",
&self.bark_battle_personal_best_projection,
event,
);
callbacks.invoke_table_row_callbacks::<BarkBattlePublishedConfigRow>(
"bark_battle_published_config",
&self.bark_battle_published_config,
event,
);
callbacks.invoke_table_row_callbacks::<BarkBattleRuntimeRunRow>(
"bark_battle_runtime_run",
&self.bark_battle_runtime_run,
event,
);
callbacks.invoke_table_row_callbacks::<BarkBattleScoreRecordRow>(
"bark_battle_score_record",
&self.bark_battle_score_record,
event,
);
callbacks.invoke_table_row_callbacks::<BarkBattleWorkStatsProjectionRow>(
"bark_battle_work_stats_projection",
&self.bark_battle_work_stats_projection,
event,
);
callbacks.invoke_table_row_callbacks::<BattleState>(
"battle_state",
&self.battle_state,
@@ -4347,6 +4567,13 @@ impl __sdk::SpacetimeModule for RemoteModule {
auth_identity_table::register_table(client_cache);
auth_store_projection_meta_table::register_table(client_cache);
auth_store_snapshot_table::register_table(client_cache);
bark_battle_draft_config_table::register_table(client_cache);
bark_battle_leaderboard_entry_table::register_table(client_cache);
bark_battle_personal_best_projection_table::register_table(client_cache);
bark_battle_published_config_table::register_table(client_cache);
bark_battle_runtime_run_table::register_table(client_cache);
bark_battle_score_record_table::register_table(client_cache);
bark_battle_work_stats_projection_table::register_table(client_cache);
battle_state_table::register_table(client_cache);
big_fish_agent_message_table::register_table(client_cache);
big_fish_asset_slot_table::register_table(client_cache);
@@ -4430,6 +4657,13 @@ impl __sdk::SpacetimeModule for RemoteModule {
"auth_identity",
"auth_store_projection_meta",
"auth_store_snapshot",
"bark_battle_draft_config",
"bark_battle_leaderboard_entry",
"bark_battle_personal_best_projection",
"bark_battle_published_config",
"bark_battle_runtime_run",
"bark_battle_score_record",
"bark_battle_work_stats_projection",
"battle_state",
"big_fish_agent_message",
"big_fish_asset_slot",

View File

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

View File

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

View File

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