合并 master 并保留外部生成 worker 模式

合入 master 的拼消消、微信能力、OpenSSL 3.2 和 SpacetimeDB 2.4.1 更新
保留外部内容生成 queue/inline、worker lease 与动态扩缩容口径
补齐拼图后台图片生成队列轮询和运行态返回恢复
同步容器、生产运维和 Hermes 共享记忆中的 worker 文档
This commit is contained in:
2026-06-09 16:55:32 +08:00
497 changed files with 66318 additions and 13329 deletions

View File

@@ -3,6 +3,7 @@ use std::collections::HashMap;
pub type BarkBattleDraftCreateRecordInput = BarkBattleDraftCreateInput;
pub type BarkBattleDraftConfigUpsertRecordInput = BarkBattleDraftConfigUpsertInput;
pub type BarkBattleWorkDeleteRecordInput = BarkBattleWorkDeleteInput;
pub type BarkBattleWorkPublishRecordInput = BarkBattleWorkPublishInput;
pub type BarkBattleRunStartRecordInput = BarkBattleRunStartInput;
pub type BarkBattleRunFinishRecordInput = BarkBattleRunFinishInput;
@@ -88,6 +89,32 @@ impl SpacetimeClient {
.await
}
pub async fn delete_bark_battle_work(
&self,
input: BarkBattleWorkDeleteRecordInput,
) -> Result<Vec<serde_json::Value>, SpacetimeClientError> {
let owner_user_id = input.owner_user_id.clone();
self.call_after_connect("delete_bark_battle_work", move |connection, sender| {
connection
.procedures()
.delete_bark_battle_work_then(input, move |_, result| {
let mapped = result
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
.and_then(|result| {
if result.ok {
Ok(())
} else {
Err(SpacetimeClientError::procedure_failed(result.error_message))
}
});
send_once(&sender, mapped);
});
})
.await?;
self.list_bark_battle_works(owner_user_id).await
}
pub async fn get_bark_battle_runtime_config(
&self,
work_id: String,

View File

@@ -1,15 +1,15 @@
use super::*;
use crate::mapper::{
map_jump_hop_agent_session_procedure_result, map_jump_hop_gallery_card_view_row,
map_jump_hop_run_procedure_result, map_jump_hop_work_procedure_result,
map_jump_hop_works_procedure_result,
map_jump_hop_leaderboard_procedure_result, map_jump_hop_run_procedure_result,
map_jump_hop_work_procedure_result, map_jump_hop_works_procedure_result,
};
use shared_contracts::jump_hop::{
JumpHopActionRequest, JumpHopActionResponse, JumpHopActionType, JumpHopCharacterAsset,
JumpHopDifficulty, JumpHopDraftResponse, JumpHopGalleryResponse, JumpHopGenerationStatus,
JumpHopJumpRequest, JumpHopRestartRunRequest, JumpHopRuntimeRunSnapshotResponse,
JumpHopSessionSnapshotResponse, JumpHopStartRunRequest, JumpHopStylePreset, JumpHopTileAsset,
JumpHopTileType, JumpHopWorkProfileResponse,
JumpHopJumpRequest, JumpHopLeaderboardResponse, JumpHopRestartRunRequest,
JumpHopRuntimeRunSnapshotResponse, JumpHopSessionSnapshotResponse, JumpHopStartRunRequest,
JumpHopStylePreset, JumpHopWorkProfileResponse,
};
use shared_kernel::build_prefixed_uuid_id;
@@ -222,6 +222,29 @@ impl SpacetimeClient {
.await
}
pub async fn delete_jump_hop_work(
&self,
profile_id: String,
owner_user_id: String,
) -> Result<Vec<JumpHopWorkProfileResponse>, SpacetimeClientError> {
let procedure_input = JumpHopWorkDeleteInput {
profile_id,
owner_user_id,
};
self.call_after_connect("delete_jump_hop_work", move |connection, sender| {
connection
.procedures()
.delete_jump_hop_work_then(procedure_input, move |_, result| {
let mapped = result
.map_err(SpacetimeClientError::from_sdk_error)
.and_then(map_jump_hop_works_procedure_result);
send_once(&sender, mapped);
});
})
.await
}
pub async fn get_jump_hop_runtime_work(
&self,
profile_id: String,
@@ -229,7 +252,7 @@ impl SpacetimeClient {
let work = self
.get_jump_hop_work_profile(profile_id, String::new())
.await?;
validate_jump_hop_runtime_ready(&work)?;
validate_jump_hop_runtime_ready(&work, "published")?;
Ok(work)
}
@@ -238,17 +261,24 @@ impl SpacetimeClient {
payload: JumpHopStartRunRequest,
owner_user_id: String,
) -> Result<JumpHopRuntimeRunSnapshotResponse, SpacetimeClientError> {
let runtime_mode = normalize_jump_hop_runtime_mode(payload.runtime_mode.as_deref());
let profile_id = payload.profile_id;
let work_owner_user_id = if runtime_mode == "draft" {
owner_user_id.clone()
} else {
String::new()
};
let work = self
.get_jump_hop_work_profile(profile_id.clone(), String::new())
.get_jump_hop_work_profile(profile_id.clone(), work_owner_user_id)
.await?;
validate_jump_hop_runtime_ready(&work)?;
validate_jump_hop_runtime_ready(&work, runtime_mode)?;
let run_id = build_prefixed_uuid_id("jump-hop-run-");
let procedure_input = JumpHopRunStartInput {
client_event_id: format!("{run_id}:start"),
run_id,
owner_user_id,
profile_id,
runtime_mode: runtime_mode.to_string(),
started_at_ms: current_unix_micros().div_euclid(1000),
};
self.start_jump_hop_run_with_input(procedure_input).await
@@ -303,7 +333,9 @@ impl SpacetimeClient {
let procedure_input = JumpHopRunJumpInput {
run_id,
owner_user_id,
charge_ms: payload.charge_ms,
drag_distance: payload.drag_distance,
drag_vector_x: payload.drag_vector_x,
drag_vector_y: payload.drag_vector_y,
client_event_id: payload.client_event_id,
jumped_at_ms: current_unix_micros().div_euclid(1000),
};
@@ -396,13 +428,39 @@ impl SpacetimeClient {
self.get_jump_hop_work_profile(card.profile_id, String::new())
.await
}
pub async fn get_jump_hop_leaderboard(
&self,
profile_id: String,
viewer_player_id: String,
) -> Result<JumpHopLeaderboardResponse, SpacetimeClientError> {
let procedure_input = JumpHopLeaderboardGetInput {
profile_id,
viewer_player_id,
limit: 50,
};
self.call_after_connect("get_jump_hop_leaderboard", move |connection, sender| {
connection.procedures().get_jump_hop_leaderboard_then(
procedure_input,
move |_, result| {
let mapped = result
.map_err(SpacetimeClientError::from_sdk_error)
.and_then(map_jump_hop_leaderboard_procedure_result);
send_once(&sender, mapped);
},
);
})
.await
}
}
fn validate_jump_hop_runtime_ready(
work: &JumpHopWorkProfileResponse,
runtime_mode: &str,
) -> Result<(), SpacetimeClientError> {
let status = work.summary.publication_status.trim().to_ascii_lowercase();
if status != "published" {
if runtime_mode == "published" && status != "published" {
return Err(SpacetimeClientError::validation_failed(
"jump-hop runtime 只能启动已发布作品",
));
@@ -412,11 +470,11 @@ fn validate_jump_hop_runtime_ready(
"jump-hop runtime 需要 ready 状态作品",
));
}
validate_jump_hop_character_asset_ready(&work.character_asset, "character_asset")?;
validate_jump_hop_character_asset_ready(&work.tile_atlas_asset, "tile_atlas_asset")?;
if work.tile_assets.is_empty() {
validate_jump_hop_default_character_ready(work)?;
validate_jump_hop_tile_atlas_asset_ready(&work.tile_atlas_asset, "tile_atlas_asset")?;
if work.tile_assets.len() < 25 {
return Err(SpacetimeClientError::validation_failed(
"jump-hop runtime 缺少地块资产",
"jump-hop runtime 需要 25 个地块资产",
));
}
for (index, asset) in work.tile_assets.iter().enumerate() {
@@ -437,7 +495,34 @@ fn validate_jump_hop_runtime_ready(
Ok(())
}
fn validate_jump_hop_character_asset_ready(
fn normalize_jump_hop_runtime_mode(value: Option<&str>) -> &'static str {
if value
.map(|value| value.trim().eq_ignore_ascii_case("draft"))
.unwrap_or(false)
{
"draft"
} else {
"published"
}
}
fn validate_jump_hop_default_character_ready(
work: &JumpHopWorkProfileResponse,
) -> Result<(), SpacetimeClientError> {
let Some(default_character) = work.default_character.as_ref() else {
return Err(SpacetimeClientError::validation_failed(
"jump-hop runtime 缺少内置默认角色配置",
));
};
if default_character.model_kind.trim() != "builtin-three" {
return Err(SpacetimeClientError::validation_failed(
"jump-hop runtime 默认角色必须使用 builtin-three",
));
}
Ok(())
}
fn validate_jump_hop_tile_atlas_asset_ready(
asset: &JumpHopCharacterAsset,
field: &str,
) -> Result<(), SpacetimeClientError> {
@@ -475,7 +560,6 @@ enum JumpHopActionProcedure {
#[derive(Clone, Copy)]
enum JumpHopDraftMergeScope {
CompileDraft,
RegenerateCharacter,
RegenerateTiles,
UpdateWorkMeta,
UpdateDifficulty,
@@ -484,7 +568,6 @@ enum JumpHopDraftMergeScope {
#[derive(Clone, Copy)]
enum JumpHopAssetRefresh {
Preserve,
Character,
Tiles,
}
@@ -496,12 +579,18 @@ fn build_jump_hop_action_plan(
) -> Result<(JumpHopActionProcedure, JumpHopDraftResponse), SpacetimeClientError> {
let scope = match payload.action_type {
JumpHopActionType::CompileDraft => JumpHopDraftMergeScope::CompileDraft,
JumpHopActionType::RegenerateCharacter => JumpHopDraftMergeScope::RegenerateCharacter,
JumpHopActionType::RegenerateTiles => JumpHopDraftMergeScope::RegenerateTiles,
JumpHopActionType::UpdateWorkMeta => JumpHopDraftMergeScope::UpdateWorkMeta,
JumpHopActionType::UpdateDifficulty => JumpHopDraftMergeScope::UpdateDifficulty,
};
let mut draft = merge_action_into_draft(current.draft.clone(), payload, scope)?;
let mut base_draft = current.draft.clone();
if matches!(payload.action_type, JumpHopActionType::RegenerateTiles) {
if let Some(draft) = base_draft.as_mut() {
draft.tile_atlas_asset = None;
draft.tile_assets.clear();
}
}
let mut draft = merge_action_into_draft(base_draft, payload, scope)?;
let profile_id = resolve_jump_hop_profile_id(&draft, &payload.action_type)?;
draft.profile_id = Some(profile_id.clone());
@@ -514,16 +603,6 @@ fn build_jump_hop_action_plan(
JumpHopAssetRefresh::Preserve,
now_micros,
)?),
JumpHopActionType::RegenerateCharacter => {
JumpHopActionProcedure::Compile(build_compile_input(
current,
owner_user_id,
&profile_id,
&mut draft,
JumpHopAssetRefresh::Character,
now_micros,
)?)
}
JumpHopActionType::RegenerateTiles => JumpHopActionProcedure::Compile(build_compile_input(
current,
owner_user_id,
@@ -563,6 +642,13 @@ fn merge_action_into_draft(
{
draft.work_title = value.trim().to_string();
}
if let Some(value) = payload
.theme_text
.as_ref()
.filter(|value| !value.trim().is_empty())
{
draft.theme_text = value.trim().chars().take(60).collect();
}
if let Some(value) = payload.work_description.as_ref() {
draft.work_description = value.trim().to_string();
}
@@ -590,10 +676,7 @@ fn merge_action_into_draft(
.filter(|value| !value.is_empty());
}
}
if matches!(
scope,
JumpHopDraftMergeScope::CompileDraft | JumpHopDraftMergeScope::RegenerateCharacter
) {
if matches!(scope, JumpHopDraftMergeScope::CompileDraft) {
if let Some(value) = payload
.character_prompt
.as_ref()
@@ -622,10 +705,7 @@ fn merge_action_into_draft(
{
draft.profile_id = Some(profile_id.to_string());
}
if matches!(
scope,
JumpHopDraftMergeScope::CompileDraft | JumpHopDraftMergeScope::RegenerateCharacter
) {
if matches!(scope, JumpHopDraftMergeScope::CompileDraft) {
if let Some(asset) = payload.character_asset.clone() {
draft.character_asset = Some(asset);
}
@@ -649,6 +729,14 @@ fn merge_action_into_draft(
{
draft.cover_composite = Some(value.to_string());
}
if matches!(
scope,
JumpHopDraftMergeScope::CompileDraft | JumpHopDraftMergeScope::RegenerateTiles
) {
if let Some(asset) = payload.back_button_asset.clone() {
draft.back_button_asset = Some(asset);
}
}
if draft.work_title.trim().is_empty() {
return Err(SpacetimeClientError::validation_failed(
"jump-hop work_title 不能为空",
@@ -665,28 +753,19 @@ fn build_compile_input(
refresh: JumpHopAssetRefresh,
now_micros: i64,
) -> Result<JumpHopDraftCompileInput, SpacetimeClientError> {
let force_character = matches!(refresh, JumpHopAssetRefresh::Character);
let force_tiles = matches!(refresh, JumpHopAssetRefresh::Tiles);
if force_character {
draft.character_asset = None;
}
if force_tiles {
draft.tile_atlas_asset = None;
draft.tile_assets.clear();
}
let character_asset = draft.character_asset.clone().ok_or_else(|| {
SpacetimeClientError::validation_failed(
"jump-hop compile-draft 缺少真实角色资产,请先由 api-server 生成并持久化 asset_object",
)
})?;
let character_asset = draft.character_asset.clone().unwrap_or_else(|| {
build_jump_hop_default_character_asset(profile_id, draft.theme_text.as_str())
});
draft.character_asset = Some(character_asset.clone());
draft.default_character = Some(default_jump_hop_default_character());
let tile_atlas_asset = draft.tile_atlas_asset.clone().ok_or_else(|| {
SpacetimeClientError::validation_failed(
"jump-hop compile-draft 缺少真实地块图集资产,请先由 api-server 生成并持久化 asset_object",
)
})?;
let tile_assets = if draft.tile_assets.is_empty() {
let tile_assets = if draft.tile_assets.len() < 25 {
return Err(SpacetimeClientError::validation_failed(
"jump-hop compile-draft 缺少真实地块资产,请先由 api-server 生成并持久化 asset_object",
"jump-hop compile-draft 需要 25 个真实地块资产,请先由 api-server 生成并持久化 asset_object",
));
} else {
draft.tile_assets.clone()
@@ -705,7 +784,7 @@ fn build_compile_input(
work_title: draft.work_title.clone(),
work_description: draft.work_description.clone(),
theme_tags_json: Some(json_string(&draft.theme_tags)?),
theme_text: Some(draft.work_title.clone()),
theme_text: Some(draft.theme_text.clone()),
difficulty: Some(difficulty_to_str(&draft.difficulty).to_string()),
style_preset: Some(style_to_str(&draft.style_preset).to_string()),
character_prompt: Some(draft.character_prompt.clone()),
@@ -715,6 +794,11 @@ fn build_compile_input(
tile_atlas_asset_json: Some(json_string(&tile_atlas_asset)?),
tile_assets_json: Some(json_string(&tile_assets)?),
cover_composite,
back_button_asset_json: draft
.back_button_asset
.as_ref()
.map(json_string)
.transpose()?,
generation_status: Some("ready".to_string()),
compiled_at_micros: now_micros,
})
@@ -785,26 +869,29 @@ fn default_draft() -> JumpHopDraftResponse {
template_id: JUMP_HOP_TEMPLATE_ID.to_string(),
template_name: JUMP_HOP_TEMPLATE_NAME.to_string(),
profile_id: None,
theme_text: JUMP_HOP_TEMPLATE_NAME.to_string(),
work_title: JUMP_HOP_TEMPLATE_NAME.to_string(),
work_description: "俯视角跳跃闯关".to_string(),
theme_tags: vec!["跳一跳".to_string(), "休闲".to_string()],
difficulty: JumpHopDifficulty::Standard,
style_preset: JumpHopStylePreset::MinimalBlocks,
character_prompt: "俯视角可爱主角,透明背景".to_string(),
tile_prompt: "等距立体地块图集".to_string(),
default_character: Some(default_jump_hop_default_character()),
character_prompt: "内置默认 3D 角色".to_string(),
tile_prompt: "跳一跳主题的正面30度视角主题物体图集物体本身作为跳跃落点".to_string(),
end_mood_prompt: None,
character_asset: None,
tile_atlas_asset: None,
tile_assets: Vec::new(),
path: None,
cover_composite: None,
back_button_asset: None,
generation_status: JumpHopGenerationStatus::Draft,
}
}
fn build_config_json(draft: &JumpHopDraftResponse) -> Result<String, SpacetimeClientError> {
serde_json::to_string(&serde_json::json!({
"themeText": draft.work_title,
"themeText": draft.theme_text,
"difficulty": difficulty_to_str(&draft.difficulty),
"stylePreset": style_to_str(&draft.style_preset),
"characterPrompt": draft.character_prompt,
@@ -814,94 +901,6 @@ fn build_config_json(draft: &JumpHopDraftResponse) -> Result<String, SpacetimeCl
.map_err(SpacetimeClientError::validation_failed)
}
fn ensure_character_asset(
existing: Option<JumpHopCharacterAsset>,
profile_id: &str,
prompt: &str,
force_new: bool,
now_micros: i64,
) -> JumpHopCharacterAsset {
if !force_new {
if let Some(asset) = existing {
return asset;
}
}
let revision = force_new.then_some(now_micros);
let suffix = asset_revision_suffix(revision);
JumpHopCharacterAsset {
asset_id: format!("{profile_id}-character{suffix}"),
image_src: format!("/generated-jump-hop-assets/{profile_id}/character{suffix}.png"),
image_object_key: format!("generated-jump-hop-assets/{profile_id}/character{suffix}.png"),
asset_object_id: format!("{profile_id}-character{suffix}-object"),
generation_provider: "deterministic-placeholder".to_string(),
prompt: prompt.to_string(),
width: 768,
height: 768,
}
}
fn ensure_tile_atlas_asset(
existing: Option<JumpHopCharacterAsset>,
profile_id: &str,
prompt: &str,
force_new: bool,
now_micros: i64,
) -> JumpHopCharacterAsset {
if !force_new {
if let Some(asset) = existing {
return asset;
}
}
let revision = force_new.then_some(now_micros);
let suffix = asset_revision_suffix(revision);
JumpHopCharacterAsset {
asset_id: format!("{profile_id}-tile-atlas{suffix}"),
image_src: format!("/generated-jump-hop-assets/{profile_id}/tile-atlas{suffix}.png"),
image_object_key: format!("generated-jump-hop-assets/{profile_id}/tile-atlas{suffix}.png"),
asset_object_id: format!("{profile_id}-tile-atlas{suffix}-object"),
generation_provider: "deterministic-placeholder".to_string(),
prompt: prompt.to_string(),
width: 1024,
height: 1024,
}
}
fn ensure_tile_assets(
existing: Vec<JumpHopTileAsset>,
profile_id: &str,
force_new: bool,
now_micros: i64,
) -> Vec<JumpHopTileAsset> {
if !force_new && !existing.is_empty() {
return existing;
}
let suffix = asset_revision_suffix(force_new.then_some(now_micros));
[
JumpHopTileType::Start,
JumpHopTileType::Normal,
JumpHopTileType::Target,
JumpHopTileType::Finish,
JumpHopTileType::Bonus,
JumpHopTileType::Accent,
]
.into_iter()
.enumerate()
.map(|(index, tile_type)| JumpHopTileAsset {
tile_type,
image_src: format!("/generated-jump-hop-assets/{profile_id}/tiles/{index}{suffix}.png"),
image_object_key: format!(
"generated-jump-hop-assets/{profile_id}/tiles/{index}{suffix}.png"
),
asset_object_id: format!("{profile_id}-tile-{index}{suffix}-object"),
source_atlas_cell: format!("cell-{index}{suffix}"),
visual_width: 256,
visual_height: 192,
top_surface_radius: 42.0,
landing_radius: 34.0,
})
.collect()
}
fn resolve_cover_composite(
draft: &JumpHopDraftResponse,
profile_id: &str,
@@ -926,6 +925,22 @@ fn resolve_cover_composite(
))
}
fn build_jump_hop_default_character_asset(
profile_id: &str,
theme_text: &str,
) -> JumpHopCharacterAsset {
JumpHopCharacterAsset {
asset_id: format!("{profile_id}-builtin-character"),
image_src: "builtin://jump-hop/default-character".to_string(),
image_object_key: String::new(),
asset_object_id: format!("{profile_id}-builtin-character"),
generation_provider: "builtin-three".to_string(),
prompt: format!("内置默认 3D 角色:{}", theme_text.trim()),
width: 0,
height: 0,
}
}
fn asset_revision_suffix(revision: Option<i64>) -> String {
revision
.filter(|value| *value > 0)
@@ -957,6 +972,16 @@ fn style_to_str(value: &JumpHopStylePreset) -> &'static str {
}
}
fn default_jump_hop_default_character() -> shared_contracts::jump_hop::JumpHopDefaultCharacter {
shared_contracts::jump_hop::JumpHopDefaultCharacter {
character_id: "jump-hop-default-runner".to_string(),
display_name: "默认角色".to_string(),
model_kind: "builtin-three".to_string(),
body_color: "#f59e0b".to_string(),
accent_color: "#2563eb".to_string(),
}
}
#[cfg(test)]
mod tests {
use super::*;
@@ -968,8 +993,9 @@ mod tests {
const NOW_MICROS: i64 = 1_763_456_789_000_000;
#[test]
fn jump_hop_action_compile_draft_builds_compile_input_with_assets() {
let session = session_with_draft(draft_without_assets());
fn jump_hop_action_compile_draft_builds_compile_input_with_25_tile_assets_and_builtin_character()
{
let session = session_with_draft(draft_without_character_asset());
let payload = action(JumpHopActionType::CompileDraft);
let (plan, draft) =
@@ -987,7 +1013,7 @@ mod tests {
.character_asset_json
.as_deref()
.unwrap_or("")
.contains("-character")
.contains("builtin-three")
);
assert!(
input
@@ -1001,59 +1027,19 @@ mod tests {
.tile_assets_json
.as_deref()
.unwrap_or("")
.contains("tile-0-object")
.contains("old-tile-25-object")
);
assert_eq!(draft.tile_assets.len(), 25);
assert_eq!(draft.generation_status, JumpHopGenerationStatus::Ready);
}
#[test]
fn jump_hop_action_regenerate_character_replaces_only_character_asset_input() {
let session = session_with_draft(draft_with_assets());
let mut payload = action(JumpHopActionType::RegenerateCharacter);
payload.character_prompt = Some("新的主角提示词".to_string());
let (plan, _draft) =
build_jump_hop_action_plan(&session, OWNER_USER_ID, &payload, NOW_MICROS)
.expect("regenerate-character should build plan");
let JumpHopActionProcedure::Compile(input) = plan else {
panic!("regenerate-character should call compile_jump_hop_draft");
};
assert!(
!input
.character_asset_json
.as_deref()
.unwrap_or("")
.contains("old-character")
);
assert!(
input
.character_asset_json
.as_deref()
.unwrap_or("")
.contains(&NOW_MICROS.to_string())
);
assert!(
input
.tile_atlas_asset_json
.as_deref()
.unwrap_or("")
.contains("old-tile-atlas")
);
assert!(
input
.tile_assets_json
.as_deref()
.unwrap_or("")
.contains("old-normal-tile")
);
}
#[test]
fn jump_hop_action_regenerate_tiles_replaces_only_tile_asset_input() {
let session = session_with_draft(draft_with_assets());
let mut payload = action(JumpHopActionType::RegenerateTiles);
payload.tile_prompt = Some("新的地块提示词".to_string());
payload.tile_atlas_asset = Some(tile_atlas_asset("new-tile-atlas", NOW_MICROS));
payload.tile_assets = Some(tile_assets("new", 25));
let (plan, _draft) =
build_jump_hop_action_plan(&session, OWNER_USER_ID, &payload, NOW_MICROS)
@@ -1067,7 +1053,7 @@ mod tests {
.character_asset_json
.as_deref()
.unwrap_or("")
.contains("old-character")
.contains("builtin-three")
);
assert!(
!input
@@ -1081,24 +1067,43 @@ mod tests {
.tile_assets_json
.as_deref()
.unwrap_or("")
.contains("old-normal-tile")
.contains("old-tile-01-object")
);
assert!(
input
.tile_atlas_asset_json
.as_deref()
.unwrap_or("")
.contains(&NOW_MICROS.to_string())
.contains("new-tile-atlas")
);
assert!(
input
.tile_assets_json
.as_deref()
.unwrap_or("")
.contains(&NOW_MICROS.to_string())
.contains("new-tile-25-object")
);
}
#[test]
fn jump_hop_action_compile_draft_persists_theme_text_separately_from_title() {
let session = session_with_draft(draft_without_character_asset());
let mut payload = action(JumpHopActionType::CompileDraft);
payload.theme_text = Some(" 森林蘑菇跳台 ".to_string());
payload.work_title = Some("自动标题".to_string());
let (plan, draft) =
build_jump_hop_action_plan(&session, OWNER_USER_ID, &payload, NOW_MICROS)
.expect("compile-draft should build plan");
let JumpHopActionProcedure::Compile(input) = plan else {
panic!("compile-draft should call compile_jump_hop_draft");
};
assert_eq!(draft.theme_text, "森林蘑菇跳台");
assert_eq!(input.theme_text.as_deref(), Some("森林蘑菇跳台"));
assert_eq!(input.work_title, "自动标题");
}
#[test]
fn jump_hop_action_update_work_meta_builds_update_input_without_asset_compile() {
let session = session_with_draft(draft_with_assets());
@@ -1143,22 +1148,22 @@ mod tests {
.character_asset
.as_ref()
.map(|asset| asset.asset_id.as_str()),
Some("old-character")
Some("jump-hop-profile-test-builtin-character")
);
assert_eq!(
draft
.tile_assets
.first()
.map(|asset| asset.asset_object_id.as_str()),
Some("old-normal-tile-object")
Some("old-tile-01-object")
);
}
/// 构造不携带资产覆盖的 JumpHop action单测按需再覆盖字段。
fn action(action_type: JumpHopActionType) -> JumpHopActionRequest {
JumpHopActionRequest {
action_type,
profile_id: None,
theme_text: None,
work_title: None,
work_description: None,
theme_tags: None,
@@ -1171,6 +1176,7 @@ mod tests {
tile_atlas_asset: None,
tile_assets: None,
cover_composite: None,
back_button_asset: None,
}
}
@@ -1185,9 +1191,11 @@ mod tests {
}
}
fn draft_without_assets() -> JumpHopDraftResponse {
fn draft_without_character_asset() -> JumpHopDraftResponse {
JumpHopDraftResponse {
profile_id: None,
tile_atlas_asset: Some(tile_atlas_asset("old-tile-atlas", 0)),
tile_assets: tile_assets("old", 25),
..base_draft()
}
}
@@ -1195,37 +1203,9 @@ mod tests {
fn draft_with_assets() -> JumpHopDraftResponse {
JumpHopDraftResponse {
profile_id: Some(PROFILE_ID.to_string()),
character_asset: Some(JumpHopCharacterAsset {
asset_id: "old-character".to_string(),
image_src: "/generated-jump-hop-assets/old-character.png".to_string(),
image_object_key: "generated-jump-hop-assets/old-character.png".to_string(),
asset_object_id: "old-character-object".to_string(),
generation_provider: "old-provider".to_string(),
prompt: "旧角色提示词".to_string(),
width: 768,
height: 768,
}),
tile_atlas_asset: Some(JumpHopCharacterAsset {
asset_id: "old-tile-atlas".to_string(),
image_src: "/generated-jump-hop-assets/old-tile-atlas.png".to_string(),
image_object_key: "generated-jump-hop-assets/old-tile-atlas.png".to_string(),
asset_object_id: "old-tile-atlas-object".to_string(),
generation_provider: "old-provider".to_string(),
prompt: "旧地块提示词".to_string(),
width: 1024,
height: 1024,
}),
tile_assets: vec![JumpHopTileAsset {
tile_type: JumpHopTileType::Normal,
image_src: "/generated-jump-hop-assets/old-normal-tile.png".to_string(),
image_object_key: "generated-jump-hop-assets/old-normal-tile.png".to_string(),
asset_object_id: "old-normal-tile-object".to_string(),
source_atlas_cell: "old-cell".to_string(),
visual_width: 256,
visual_height: 192,
top_surface_radius: 42.0,
landing_radius: 34.0,
}],
character_asset: Some(build_jump_hop_default_character_asset(PROFILE_ID, "旧主题")),
tile_atlas_asset: Some(tile_atlas_asset("old-tile-atlas", 0)),
tile_assets: tile_assets("old", 25),
path: Some(sample_jump_hop_path()),
cover_composite: Some("/generated-jump-hop-assets/old-cover.png".to_string()),
generation_status: JumpHopGenerationStatus::Ready,
@@ -1233,16 +1213,58 @@ mod tests {
}
}
fn tile_atlas_asset(asset_id: &str, revision: i64) -> JumpHopCharacterAsset {
let suffix = asset_revision_suffix((revision > 0).then_some(revision));
JumpHopCharacterAsset {
asset_id: asset_id.to_string(),
image_src: format!("/generated-jump-hop-assets/{asset_id}{suffix}.png"),
image_object_key: format!("generated-jump-hop-assets/{asset_id}{suffix}.png"),
asset_object_id: format!("{asset_id}-object"),
generation_provider: "vector-engine-image2".to_string(),
prompt: "旧地块提示词".to_string(),
width: 1024,
height: 1024,
}
}
fn tile_assets(prefix: &str, count: usize) -> Vec<JumpHopTileAsset> {
(0..count)
.map(|index| JumpHopTileAsset {
tile_type: if index == 0 {
JumpHopTileType::Start
} else {
JumpHopTileType::Normal
},
tile_id: Some(format!("tile-{:02}", index + 1)),
image_src: format!("/generated-jump-hop-assets/{prefix}-tile-{}.png", index + 1),
image_object_key: format!(
"generated-jump-hop-assets/{prefix}-tile-{}.png",
index + 1
),
asset_object_id: format!("{prefix}-tile-{:02}-object", index + 1),
source_atlas_cell: format!("row-{}-col-{}", index / 5 + 1, index % 5 + 1),
atlas_row: Some(index as u32 / 5 + 1),
atlas_col: Some(index as u32 % 5 + 1),
visual_width: 256,
visual_height: 192,
top_surface_radius: 42.0,
landing_radius: 34.0,
})
.collect()
}
fn base_draft() -> JumpHopDraftResponse {
JumpHopDraftResponse {
template_id: JUMP_HOP_TEMPLATE_ID.to_string(),
template_name: JUMP_HOP_TEMPLATE_NAME.to_string(),
profile_id: None,
theme_text: "旧主题".to_string(),
work_title: "旧标题".to_string(),
work_description: "旧描述".to_string(),
theme_tags: vec!["旧标签".to_string()],
difficulty: JumpHopDifficulty::Standard,
style_preset: JumpHopStylePreset::MinimalBlocks,
default_character: Some(default_jump_hop_default_character()),
character_prompt: "旧角色提示词".to_string(),
tile_prompt: "旧地块提示词".to_string(),
end_mood_prompt: None,
@@ -1251,6 +1273,7 @@ mod tests {
tile_assets: Vec::new(),
path: None,
cover_composite: None,
back_button_asset: None,
generation_status: JumpHopGenerationStatus::Draft,
}
}

View File

@@ -55,16 +55,25 @@ pub use mapper::{
PuzzleAgentMessageSubmitRecordInput, PuzzleAgentSessionCreateRecordInput,
PuzzleAgentSessionRecord, PuzzleAgentSuggestedActionRecord, PuzzleAnchorItemRecord,
PuzzleAnchorPackRecord, PuzzleAudioAssetRecord, PuzzleBoardRecord, PuzzleCellPositionRecord,
PuzzleCreatorIntentRecord, PuzzleDraftCompileFailureRecordInput, PuzzleDraftLevelRecord,
PuzzleFormDraftRecord, PuzzleFormDraftSaveRecordInput, PuzzleGalleryCardRecord,
PuzzleGeneratedImageCandidateRecord, PuzzleGeneratedImagesSaveRecordInput,
PuzzleLeaderboardEntryRecord, PuzzleLeaderboardSubmitRecordInput,
PuzzleLevelGenerationFailureRecordInput, PuzzleMergedGroupRecord, PuzzlePieceStateRecord,
PuzzlePublishRecordInput, PuzzleRecommendedNextWorkRecord, PuzzleResultDraftRecord,
PuzzleResultPreviewBlockerRecord, PuzzleResultPreviewFindingRecord, PuzzleResultPreviewRecord,
PuzzleRunDragRecordInput, PuzzleRunNextLevelRecordInput, PuzzleRunPauseRecordInput,
PuzzleRunPropRecordInput, PuzzleRunRecord, PuzzleRunStartRecordInput, PuzzleRunSwapRecordInput,
PuzzleRuntimeLevelRecord, PuzzleSelectCoverImageRecordInput, PuzzleUiBackgroundSaveRecordInput,
PuzzleClearActionRequest, PuzzleClearActionResponse, PuzzleClearActionType,
PuzzleClearBoardCell, PuzzleClearBoardSnapshot, PuzzleClearCardAsset, PuzzleClearDraftResponse,
PuzzleClearGenerationStatus, PuzzleClearImageAsset, PuzzleClearNextLevelRequest,
PuzzleClearPatternGroup, PuzzleClearRetryLevelRequest, PuzzleClearRunResponse,
PuzzleClearRunStatus, PuzzleClearRuntimeSnapshotResponse, PuzzleClearSessionResponse,
PuzzleClearSessionSnapshotResponse, PuzzleClearStartRunRequest, PuzzleClearSwapRequest,
PuzzleClearTimeUpRequest, PuzzleClearWorkDetailResponse, PuzzleClearWorkMutationResponse,
PuzzleClearWorkProfileResponse, PuzzleClearWorkSummaryResponse, PuzzleClearWorksResponse,
PuzzleClearWorkspaceCreateRequest, PuzzleCreatorIntentRecord,
PuzzleDraftCompileFailureRecordInput, PuzzleDraftLevelRecord, PuzzleFormDraftRecord,
PuzzleFormDraftSaveRecordInput, PuzzleGalleryCardRecord, PuzzleGeneratedImageCandidateRecord,
PuzzleGeneratedImagesSaveRecordInput, PuzzleLeaderboardEntryRecord,
PuzzleLeaderboardSubmitRecordInput, PuzzleLevelGenerationFailureRecordInput,
PuzzleMergedGroupRecord, PuzzlePieceStateRecord, PuzzlePublishRecordInput,
PuzzleRecommendedNextWorkRecord, PuzzleResultDraftRecord, PuzzleResultPreviewBlockerRecord,
PuzzleResultPreviewFindingRecord, PuzzleResultPreviewRecord, PuzzleRunDragRecordInput,
PuzzleRunNextLevelRecordInput, PuzzleRunPauseRecordInput, PuzzleRunPropRecordInput,
PuzzleRunRecord, PuzzleRunStartRecordInput, PuzzleRunSwapRecordInput, PuzzleRuntimeLevelRecord,
PuzzleSelectCoverImageRecordInput, PuzzleUiBackgroundSaveRecordInput,
PuzzleWorkLikeReportRecordInput, PuzzleWorkPointIncentiveClaimRecordInput,
PuzzleWorkProfileRecord, PuzzleWorkRemixRecordInput, PuzzleWorkUpsertRecordInput,
ResolveCombatActionRecord, ResolveNpcBattleInteractionInput,
@@ -100,7 +109,7 @@ pub mod auth;
pub mod bark_battle;
pub use bark_battle::{
BarkBattleDraftConfigUpsertRecordInput, BarkBattleDraftCreateRecordInput,
BarkBattleRunFinishRecordInput, BarkBattleRunStartRecordInput,
BarkBattleRunFinishRecordInput, BarkBattleRunStartRecordInput, BarkBattleWorkDeleteRecordInput,
BarkBattleWorkPublishRecordInput,
};
pub mod big_fish;
@@ -113,6 +122,7 @@ pub mod match3d;
pub mod npc;
pub mod public_work;
pub mod puzzle;
pub mod puzzle_clear;
pub mod runtime;
pub mod square_hole;
pub mod story;
@@ -169,24 +179,6 @@ use module_npc::{
NpcStanceProfile as DomainNpcStanceProfile, NpcStateSnapshot as DomainNpcStateSnapshot,
ResolveNpcInteractionInput as DomainResolveNpcInteractionInput,
};
use module_puzzle::{
PuzzleAgentMessageSnapshot as DomainPuzzleAgentMessageSnapshot,
PuzzleAgentSessionSnapshot as DomainPuzzleAgentSessionSnapshot,
PuzzleAgentSuggestedAction as DomainPuzzleAgentSuggestedAction,
PuzzleAnchorItem as DomainPuzzleAnchorItem, PuzzleAnchorPack as DomainPuzzleAnchorPack,
PuzzleBoardSnapshot as DomainPuzzleBoardSnapshot,
PuzzleCellPosition as DomainPuzzleCellPosition,
PuzzleCreatorIntent as DomainPuzzleCreatorIntent, PuzzleDraftLevel as DomainPuzzleDraftLevel,
PuzzleGeneratedImageCandidate as DomainPuzzleGeneratedImageCandidate,
PuzzleMergedGroupState as DomainPuzzleMergedGroupState,
PuzzlePieceState as DomainPuzzlePieceState, PuzzleResultDraft as DomainPuzzleResultDraft,
PuzzleResultPreviewBlocker as DomainPuzzleResultPreviewBlocker,
PuzzleResultPreviewEnvelope as DomainPuzzleResultPreviewEnvelope,
PuzzleResultPreviewFinding as DomainPuzzleResultPreviewFinding,
PuzzleRunSnapshot as DomainPuzzleRunSnapshot,
PuzzleRuntimeLevelSnapshot as DomainPuzzleRuntimeLevelSnapshot,
PuzzleWorkProfile as DomainPuzzleWorkProfile,
};
use module_runtime::{
AnalyticsMetricQueryResponse as DomainAnalyticsMetricQueryResponse, RuntimeBrowseHistoryRecord,
RuntimePlatformTheme as DomainRuntimePlatformTheme, RuntimeProfileDashboardRecord,
@@ -579,6 +571,7 @@ impl SpacetimeClient {
"SELECT * FROM public_work_detail_entry",
"SELECT * FROM bark_battle_gallery_view",
"SELECT * FROM puzzle_gallery_card_view",
"SELECT * FROM puzzle_clear_gallery_card_view",
"SELECT * FROM jump_hop_gallery_card_view",
"SELECT * FROM wooden_fish_gallery_card_view",
"SELECT * FROM custom_world_gallery_entry",
@@ -595,6 +588,7 @@ impl SpacetimeClient {
for query in [
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'puzzle'",
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'puzzle-clear'",
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'jump-hop'",
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'wooden-fish'",
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'custom-world'",

View File

@@ -15,6 +15,7 @@ mod match3d;
mod npc;
mod public_work;
mod puzzle;
mod puzzle_clear;
mod runtime;
mod runtime_profile;
mod square_hole;
@@ -120,6 +121,17 @@ pub use self::puzzle::{
PuzzleWorkLikeReportRecordInput, PuzzleWorkPointIncentiveClaimRecordInput,
PuzzleWorkProfileRecord, PuzzleWorkRemixRecordInput, PuzzleWorkUpsertRecordInput,
};
pub use self::puzzle_clear::{
PuzzleClearActionRequest, PuzzleClearActionResponse, PuzzleClearActionType,
PuzzleClearBoardCell, PuzzleClearBoardSnapshot, PuzzleClearCardAsset, PuzzleClearDraftResponse,
PuzzleClearGenerationStatus, PuzzleClearImageAsset, PuzzleClearNextLevelRequest,
PuzzleClearPatternGroup, PuzzleClearRetryLevelRequest, PuzzleClearRunResponse,
PuzzleClearRunStatus, PuzzleClearRuntimeSnapshotResponse, PuzzleClearSessionResponse,
PuzzleClearSessionSnapshotResponse, PuzzleClearStartRunRequest, PuzzleClearSwapRequest,
PuzzleClearTimeUpRequest, PuzzleClearWorkDetailResponse, PuzzleClearWorkMutationResponse,
PuzzleClearWorkProfileResponse, PuzzleClearWorkSummaryResponse, PuzzleClearWorksResponse,
PuzzleClearWorkspaceCreateRequest,
};
pub use self::runtime::{
AdminWorkVisibilityRecord, BigFishGameDraftRecord, BigFishRuntimeEntityRecord,
BigFishRuntimeParamsRecord, BigFishRuntimeRunRecord, CreationEntryConfigRecord,
@@ -180,8 +192,8 @@ pub(crate) use self::inventory::{
};
pub(crate) use self::jump_hop::{
map_jump_hop_agent_session_procedure_result, map_jump_hop_gallery_card_view_row,
map_jump_hop_run_procedure_result, map_jump_hop_work_procedure_result,
map_jump_hop_works_procedure_result,
map_jump_hop_leaderboard_procedure_result, map_jump_hop_run_procedure_result,
map_jump_hop_work_procedure_result, map_jump_hop_works_procedure_result,
};
pub(crate) use self::match3d::{
map_match3d_agent_session_procedure_result, map_match3d_click_item_procedure_result,
@@ -201,6 +213,11 @@ pub(crate) use self::puzzle::{
map_puzzle_works_procedure_result, map_runtime_profile_wallet_ledger_source_type_back,
parse_puzzle_agent_stage_record,
};
pub(crate) use self::puzzle_clear::{
map_puzzle_clear_agent_session_procedure_result, map_puzzle_clear_gallery_card_view_row,
map_puzzle_clear_run_procedure_result, map_puzzle_clear_work_procedure_result,
map_puzzle_clear_works_procedure_result,
};
pub(crate) use self::runtime::{
build_admin_work_visibility_list_input, build_admin_work_visibility_update_input,
build_creation_entry_config_record_from_rows, map_admin_work_visibility_list_procedure_result,

View File

@@ -58,20 +58,6 @@ pub(crate) fn map_custom_world_library_detail_result(
})
}
pub(crate) fn map_custom_world_gallery_list_result(
result: CustomWorldGalleryListResult,
) -> Result<Vec<CustomWorldGalleryEntryRecord>, SpacetimeClientError> {
if !result.ok {
return Err(SpacetimeClientError::procedure_failed(result.error_message));
}
Ok(result
.entries
.into_iter()
.map(map_custom_world_gallery_entry_snapshot)
.collect::<Result<Vec<_>, _>>()?)
}
pub(crate) fn map_custom_world_library_mutation_result(
result: CustomWorldLibraryMutationResult,
) -> Result<CustomWorldLibraryMutationRecord, SpacetimeClientError> {

View File

@@ -1,10 +1,11 @@
use super::*;
pub use shared_contracts::jump_hop::{
JumpHopActionRequest, JumpHopActionResponse, JumpHopActionType, JumpHopCharacterAsset,
JumpHopDifficulty, JumpHopDraftResponse, JumpHopGalleryCardResponse,
JumpHopDefaultCharacter, JumpHopDifficulty, JumpHopDraftResponse, JumpHopGalleryCardResponse,
JumpHopGalleryDetailResponse, JumpHopGalleryResponse, JumpHopGenerationStatus,
JumpHopJumpRequest, JumpHopJumpResponse, JumpHopJumpResult, JumpHopLastJump, JumpHopPath,
JumpHopPlatform, JumpHopRestartRunRequest, JumpHopRunResponse, JumpHopRunStatus,
JumpHopJumpRequest, JumpHopJumpResponse, JumpHopJumpResult, JumpHopLastJump,
JumpHopLeaderboardEntry, JumpHopLeaderboardResponse, JumpHopPath, JumpHopPlatform,
JumpHopRestartRunRequest, JumpHopRunResponse, JumpHopRunStatus,
JumpHopRuntimeRunSnapshotResponse, JumpHopScoring, JumpHopSessionResponse,
JumpHopSessionSnapshotResponse, JumpHopStartRunRequest, JumpHopStylePreset, JumpHopTileAsset,
JumpHopTileType, JumpHopWorkDetailResponse, JumpHopWorkMutationResponse,
@@ -61,15 +62,40 @@ pub(crate) fn map_jump_hop_run_procedure_result(
Ok(map_jump_hop_run_snapshot(run))
}
pub(crate) fn map_jump_hop_leaderboard_procedure_result(
result: JumpHopLeaderboardProcedureResult,
) -> Result<JumpHopLeaderboardResponse, SpacetimeClientError> {
if !result.ok {
return Err(SpacetimeClientError::procedure_failed(result.error_message));
}
Ok(JumpHopLeaderboardResponse {
profile_id: result.profile_id,
items: result
.items
.into_iter()
.map(map_jump_hop_leaderboard_entry_snapshot)
.collect(),
viewer_best: result
.viewer_best
.map(map_jump_hop_leaderboard_entry_snapshot),
})
}
pub(crate) fn map_jump_hop_gallery_card_view_row(
row: JumpHopGalleryCardViewRow,
) -> JumpHopGalleryCardResponse {
let theme_text = if row.theme_text.trim().is_empty() {
row.work_title.clone()
} else {
row.theme_text.clone()
};
JumpHopGalleryCardResponse {
public_work_code: row.public_work_code,
work_id: row.work_id,
profile_id: row.profile_id,
owner_user_id: row.owner_user_id,
author_display_name: row.author_display_name,
theme_text,
work_title: row.work_title,
work_description: row.work_description,
cover_image_src: empty_string_to_none(row.cover_image_src),
@@ -104,15 +130,22 @@ fn map_jump_hop_session_snapshot(
fn map_jump_hop_work_snapshot(
snapshot: JumpHopWorkSnapshot,
) -> Result<JumpHopWorkProfileResponse, SpacetimeClientError> {
let theme_text = if snapshot.theme_text.trim().is_empty() {
snapshot.work_title.clone()
} else {
snapshot.theme_text.clone()
};
let draft = JumpHopDraftResponse {
template_id: "jump-hop".to_string(),
template_name: "跳一跳".to_string(),
profile_id: Some(snapshot.profile_id.clone()),
theme_text: theme_text.clone(),
work_title: snapshot.work_title.clone(),
work_description: snapshot.work_description.clone(),
theme_tags: snapshot.theme_tags.clone(),
difficulty: parse_difficulty(&snapshot.difficulty),
style_preset: parse_style_preset(&snapshot.style_preset),
default_character: Some(default_jump_hop_character()),
character_prompt: snapshot.character_prompt.clone(),
tile_prompt: snapshot.tile_prompt.clone(),
end_mood_prompt: snapshot.end_mood_prompt.clone(),
@@ -126,6 +159,7 @@ fn map_jump_hop_work_snapshot(
.collect(),
path: Some(map_jump_hop_path(snapshot.path.clone())),
cover_composite: snapshot.cover_composite.clone(),
back_button_asset: snapshot.back_button_asset.clone().map(map_character_asset),
generation_status: parse_generation_status(&snapshot.generation_status),
};
let character_asset = draft
@@ -143,6 +177,7 @@ fn map_jump_hop_work_snapshot(
profile_id: snapshot.profile_id,
owner_user_id: snapshot.owner_user_id,
source_session_id: empty_string_to_none(snapshot.source_session_id),
theme_text,
work_title: snapshot.work_title,
work_description: snapshot.work_description,
theme_tags: snapshot.theme_tags,
@@ -159,6 +194,7 @@ fn map_jump_hop_work_snapshot(
},
draft,
path: map_jump_hop_path(snapshot.path),
default_character: Some(default_jump_hop_character()),
character_asset,
tile_atlas_asset,
tile_assets: snapshot
@@ -166,19 +202,27 @@ fn map_jump_hop_work_snapshot(
.into_iter()
.map(map_tile_asset)
.collect(),
back_button_asset: snapshot.back_button_asset.map(map_character_asset),
})
}
fn map_jump_hop_draft_snapshot(snapshot: JumpHopDraftSnapshot) -> JumpHopDraftResponse {
let theme_text = if snapshot.theme_text.trim().is_empty() {
snapshot.work_title.clone()
} else {
snapshot.theme_text.clone()
};
JumpHopDraftResponse {
template_id: snapshot.template_id,
template_name: snapshot.template_name,
profile_id: snapshot.profile_id,
theme_text,
work_title: snapshot.work_title,
work_description: snapshot.work_description,
theme_tags: snapshot.theme_tags,
difficulty: parse_difficulty(&snapshot.difficulty),
style_preset: parse_style_preset(&snapshot.style_preset),
default_character: Some(default_jump_hop_character()),
character_prompt: snapshot.character_prompt,
tile_prompt: snapshot.tile_prompt,
end_mood_prompt: snapshot.end_mood_prompt,
@@ -191,6 +235,7 @@ fn map_jump_hop_draft_snapshot(snapshot: JumpHopDraftSnapshot) -> JumpHopDraftRe
.collect(),
path: snapshot.path.map(map_jump_hop_path),
cover_composite: snapshot.cover_composite,
back_button_asset: snapshot.back_button_asset.map(map_character_asset),
generation_status: parse_generation_status(&snapshot.generation_status),
}
}
@@ -211,10 +256,13 @@ fn map_character_asset(snapshot: JumpHopCharacterAssetSnapshot) -> JumpHopCharac
fn map_tile_asset(snapshot: JumpHopTileAssetSnapshot) -> JumpHopTileAsset {
JumpHopTileAsset {
tile_type: parse_tile_type(&snapshot.tile_type),
tile_id: snapshot.tile_id,
image_src: snapshot.image_src,
image_object_key: snapshot.image_object_key,
asset_object_id: snapshot.asset_object_id,
source_atlas_cell: snapshot.source_atlas_cell,
atlas_row: snapshot.atlas_row,
atlas_col: snapshot.atlas_col,
visual_width: snapshot.visual_width,
visual_height: snapshot.visual_height,
top_surface_radius: snapshot.top_surface_radius,
@@ -263,6 +311,8 @@ fn map_jump_hop_run_snapshot(snapshot: JumpHopRunSnapshot) -> JumpHopRuntimeRunS
crate::module_bindings::JumpHopRunStatus::Playing => JumpHopRunStatus::Playing,
},
current_platform_index: snapshot.current_platform_index,
successful_jump_count: snapshot.current_platform_index,
duration_ms: jump_hop_duration_ms(snapshot.started_at_ms, snapshot.finished_at_ms),
score: snapshot.score,
combo: snapshot.combo,
path: map_jump_hop_path(snapshot.path),
@@ -286,6 +336,35 @@ fn map_jump_hop_run_snapshot(snapshot: JumpHopRunSnapshot) -> JumpHopRuntimeRunS
}
}
fn map_jump_hop_leaderboard_entry_snapshot(
snapshot: JumpHopLeaderboardEntrySnapshot,
) -> JumpHopLeaderboardEntry {
JumpHopLeaderboardEntry {
rank: snapshot.rank,
player_id: snapshot.player_id,
display_name: String::new(),
successful_jump_count: snapshot.successful_jump_count,
duration_ms: snapshot.duration_ms,
updated_at: format_timestamp_micros(snapshot.updated_at_micros),
}
}
fn default_jump_hop_character() -> JumpHopDefaultCharacter {
JumpHopDefaultCharacter {
character_id: "jump-hop-default-runner".to_string(),
display_name: "默认角色".to_string(),
model_kind: "builtin-three".to_string(),
body_color: "#f59e0b".to_string(),
accent_color: "#2563eb".to_string(),
}
}
fn jump_hop_duration_ms(started_at_ms: u64, finished_at_ms: Option<u64>) -> u64 {
finished_at_ms
.unwrap_or(started_at_ms)
.saturating_sub(started_at_ms)
}
fn parse_difficulty(value: &str) -> JumpHopDifficulty {
match value {
"easy" => JumpHopDifficulty::Easy,

View File

@@ -0,0 +1,289 @@
use super::*;
pub use shared_contracts::puzzle_clear::{
PuzzleClearActionRequest, PuzzleClearActionResponse, PuzzleClearActionType,
PuzzleClearBoardCell, PuzzleClearBoardSnapshot, PuzzleClearCardAsset, PuzzleClearDraftResponse,
PuzzleClearGenerationStatus, PuzzleClearImageAsset, PuzzleClearNextLevelRequest,
PuzzleClearPatternGroup, PuzzleClearRetryLevelRequest, PuzzleClearRunResponse,
PuzzleClearRunStatus, PuzzleClearRuntimeSnapshotResponse, PuzzleClearSessionResponse,
PuzzleClearSessionSnapshotResponse, PuzzleClearStartRunRequest, PuzzleClearSwapRequest,
PuzzleClearTimeUpRequest, PuzzleClearWorkDetailResponse, PuzzleClearWorkMutationResponse,
PuzzleClearWorkProfileResponse, PuzzleClearWorkSummaryResponse, PuzzleClearWorksResponse,
PuzzleClearWorkspaceCreateRequest,
};
pub(crate) fn map_puzzle_clear_agent_session_procedure_result(
result: PuzzleClearAgentSessionProcedureResult,
) -> Result<PuzzleClearSessionSnapshotResponse, SpacetimeClientError> {
if !result.ok {
return Err(SpacetimeClientError::procedure_failed(result.error_message));
}
let session = result
.session
.ok_or_else(|| SpacetimeClientError::missing_snapshot("puzzle clear agent session 快照"))?;
Ok(map_puzzle_clear_session_snapshot(session))
}
pub(crate) fn map_puzzle_clear_work_procedure_result(
result: PuzzleClearWorkProcedureResult,
) -> Result<PuzzleClearWorkProfileResponse, SpacetimeClientError> {
if !result.ok {
return Err(SpacetimeClientError::procedure_failed(result.error_message));
}
let work = result
.work
.ok_or_else(|| SpacetimeClientError::missing_snapshot("puzzle clear work 快照"))?;
Ok(map_puzzle_clear_work_snapshot(work))
}
pub(crate) fn map_puzzle_clear_works_procedure_result(
result: PuzzleClearWorksProcedureResult,
) -> Result<Vec<PuzzleClearWorkProfileResponse>, SpacetimeClientError> {
if !result.ok {
return Err(SpacetimeClientError::procedure_failed(result.error_message));
}
Ok(result
.items
.into_iter()
.map(map_puzzle_clear_work_snapshot)
.collect())
}
pub(crate) fn map_puzzle_clear_run_procedure_result(
result: PuzzleClearRunProcedureResult,
) -> Result<PuzzleClearRuntimeSnapshotResponse, SpacetimeClientError> {
if !result.ok {
return Err(SpacetimeClientError::procedure_failed(result.error_message));
}
let run = result
.run
.ok_or_else(|| SpacetimeClientError::missing_snapshot("puzzle clear run 快照"))?;
Ok(map_puzzle_clear_run_snapshot(run))
}
pub(crate) fn map_puzzle_clear_gallery_card_view_row(
row: PuzzleClearGalleryCardViewRow,
) -> PuzzleClearWorkSummaryResponse {
PuzzleClearWorkSummaryResponse {
runtime_kind: "puzzle-clear".to_string(),
work_id: row.work_id,
profile_id: row.profile_id,
owner_user_id: row.owner_user_id,
source_session_id: None,
work_title: row.work_title,
work_description: row.work_description,
theme_prompt: row.theme_prompt,
cover_image_src: row.cover_image_src,
publication_status: normalize_publication_status(&row.publication_status).to_string(),
play_count: row.play_count,
updated_at: format_timestamp_micros(row.updated_at_micros),
published_at: row.published_at_micros.map(format_timestamp_micros),
publish_ready: true,
generation_status: parse_generation_status(&row.generation_status),
}
}
fn map_puzzle_clear_session_snapshot(
snapshot: PuzzleClearAgentSessionSnapshot,
) -> PuzzleClearSessionSnapshotResponse {
PuzzleClearSessionSnapshotResponse {
session_id: snapshot.session_id,
owner_user_id: snapshot.owner_user_id,
status: parse_generation_status(&snapshot.status),
draft: snapshot.draft.map(map_puzzle_clear_draft_snapshot),
created_at: format_timestamp_micros(snapshot.created_at_micros),
updated_at: format_timestamp_micros(snapshot.updated_at_micros),
}
}
fn map_puzzle_clear_work_snapshot(
snapshot: PuzzleClearWorkSnapshot,
) -> PuzzleClearWorkProfileResponse {
let atlas_asset = map_image_asset(snapshot.atlas_asset.clone());
let pattern_groups = snapshot
.pattern_groups
.clone()
.into_iter()
.map(map_pattern_group)
.collect::<Vec<_>>();
let card_assets = snapshot
.card_assets
.clone()
.into_iter()
.map(map_card_asset)
.collect::<Vec<_>>();
let board_background_asset = snapshot.board_background_asset.clone().map(map_image_asset);
let draft = PuzzleClearDraftResponse {
template_id: "puzzle-clear".to_string(),
template_name: "拼消消".to_string(),
profile_id: Some(snapshot.profile_id.clone()),
work_title: snapshot.work_title.clone(),
work_description: snapshot.work_description.clone(),
theme_prompt: snapshot.theme_prompt.clone(),
board_background_prompt: snapshot.board_background_prompt.clone(),
generate_board_background: snapshot.generate_board_background,
board_background_asset: board_background_asset.clone(),
card_back_image_src: snapshot.card_back_image_src.clone(),
atlas_asset: Some(atlas_asset.clone()),
pattern_groups: pattern_groups.clone(),
card_assets: card_assets.clone(),
generation_status: parse_generation_status(&snapshot.generation_status),
};
PuzzleClearWorkProfileResponse {
summary: PuzzleClearWorkSummaryResponse {
runtime_kind: "puzzle-clear".to_string(),
work_id: snapshot.work_id,
profile_id: snapshot.profile_id,
owner_user_id: snapshot.owner_user_id,
source_session_id: empty_string_to_none(snapshot.source_session_id),
work_title: snapshot.work_title,
work_description: snapshot.work_description,
theme_prompt: snapshot.theme_prompt,
cover_image_src: snapshot.cover_image_src,
publication_status: normalize_publication_status(&snapshot.publication_status)
.to_string(),
play_count: snapshot.play_count,
updated_at: format_timestamp_micros(snapshot.updated_at_micros),
published_at: snapshot.published_at_micros.map(format_timestamp_micros),
publish_ready: snapshot.publish_ready,
generation_status: parse_generation_status(&snapshot.generation_status),
},
draft,
board_background_asset,
atlas_asset,
pattern_groups,
card_assets,
}
}
fn map_puzzle_clear_draft_snapshot(snapshot: PuzzleClearDraftSnapshot) -> PuzzleClearDraftResponse {
PuzzleClearDraftResponse {
template_id: snapshot.template_id,
template_name: snapshot.template_name,
profile_id: snapshot.profile_id,
work_title: snapshot.work_title,
work_description: snapshot.work_description,
theme_prompt: snapshot.theme_prompt,
board_background_prompt: snapshot.board_background_prompt,
generate_board_background: snapshot.generate_board_background,
board_background_asset: snapshot.board_background_asset.map(map_image_asset),
card_back_image_src: snapshot.card_back_image_src,
atlas_asset: snapshot.atlas_asset.map(map_image_asset),
pattern_groups: snapshot
.pattern_groups
.into_iter()
.map(map_pattern_group)
.collect(),
card_assets: snapshot
.card_assets
.into_iter()
.map(map_card_asset)
.collect(),
generation_status: parse_generation_status(&snapshot.generation_status),
}
}
fn map_image_asset(snapshot: PuzzleClearImageAssetSnapshot) -> PuzzleClearImageAsset {
PuzzleClearImageAsset {
asset_id: snapshot.asset_id,
image_src: snapshot.image_src,
image_object_key: snapshot.image_object_key,
asset_object_id: snapshot.asset_object_id,
generation_provider: snapshot.generation_provider,
prompt: snapshot.prompt,
width: snapshot.width,
height: snapshot.height,
}
}
fn map_pattern_group(snapshot: PuzzleClearPatternGroupSnapshot) -> PuzzleClearPatternGroup {
PuzzleClearPatternGroup {
group_id: snapshot.group_id,
shape: snapshot.shape,
width: snapshot.width,
height: snapshot.height,
atlas_x: snapshot.atlas_x,
atlas_y: snapshot.atlas_y,
atlas_width: snapshot.atlas_width,
atlas_height: snapshot.atlas_height,
}
}
fn map_card_asset(snapshot: PuzzleClearCardAssetSnapshot) -> PuzzleClearCardAsset {
PuzzleClearCardAsset {
card_id: snapshot.card_id,
group_id: snapshot.group_id,
shape: snapshot.shape,
orientation: snapshot.orientation,
part_x: snapshot.part_x,
part_y: snapshot.part_y,
image_src: snapshot.image_src,
image_object_key: snapshot.image_object_key,
asset_object_id: snapshot.asset_object_id,
source_atlas_cell: snapshot.source_atlas_cell,
}
}
fn map_puzzle_clear_run_snapshot(
snapshot: PuzzleClearRuntimeSnapshot,
) -> PuzzleClearRuntimeSnapshotResponse {
PuzzleClearRuntimeSnapshotResponse {
run_id: snapshot.run_id,
profile_id: snapshot.profile_id,
owner_user_id: snapshot.owner_user_id,
runtime_mode: None,
status: parse_run_status(&snapshot.status),
level_index: snapshot.level_index,
clears_done: snapshot.clears_done,
target_clears: snapshot.target_clears,
level_duration_seconds: snapshot.level_duration_seconds,
level_started_at_ms: snapshot.level_started_at_ms,
board: PuzzleClearBoardSnapshot {
rows: snapshot.board.rows,
cols: snapshot.board.cols,
cells: snapshot
.board
.cells
.into_iter()
.map(|cell| PuzzleClearBoardCell {
row: cell.row,
col: cell.col,
card: cell.card.map(map_card_asset),
locked_group_id: cell.locked_group_id,
})
.collect(),
},
ready_columns: snapshot
.ready_columns
.into_iter()
.map(|column| column.into_iter().map(map_card_asset).collect())
.collect(),
started_at_ms: snapshot.started_at_ms,
finished_at_ms: snapshot.finished_at_ms,
}
}
fn parse_generation_status(value: &str) -> PuzzleClearGenerationStatus {
match value {
"generating" => PuzzleClearGenerationStatus::Generating,
"ready" => PuzzleClearGenerationStatus::Ready,
"failed" => PuzzleClearGenerationStatus::Failed,
_ => PuzzleClearGenerationStatus::Draft,
}
}
fn parse_run_status(value: &str) -> PuzzleClearRunStatus {
match value {
"level_failed" => PuzzleClearRunStatus::LevelFailed,
"level_cleared" => PuzzleClearRunStatus::LevelCleared,
"finished" => PuzzleClearRunStatus::Finished,
_ => PuzzleClearRunStatus::Playing,
}
}
fn normalize_publication_status(value: &str) -> &str {
match value {
"Published" | "published" => "published",
_ => "draft",
}
}

View File

@@ -296,26 +296,30 @@ pub(crate) fn build_creation_entry_config_record_from_rows(
event_banners_json: header.event_banners_json,
creation_types: creation_types
.into_iter()
.map(|item| module_runtime::CreationEntryTypeSnapshot {
id: item.id,
title: item.title,
subtitle: item.subtitle,
badge: item.badge,
image_src: item.image_src,
visible: item.visible,
open: item.open,
sort_order: item.sort_order,
category_id: creation_entry_text_or_default(
item.category_id,
module_runtime::DEFAULT_CREATION_ENTRY_CATEGORY_ID,
),
category_label: creation_entry_text_or_default(
item.category_label,
module_runtime::DEFAULT_CREATION_ENTRY_CATEGORY_LABEL,
),
category_sort_order: item.category_sort_order,
updated_at_micros: item.updated_at.to_micros_since_unix_epoch(),
unified_creation_spec_json: item.unified_creation_spec_json,
.map(|item| {
normalize_creation_entry_type_snapshot(
module_runtime::CreationEntryTypeSnapshot {
id: item.id,
title: item.title,
subtitle: item.subtitle,
badge: item.badge,
image_src: item.image_src,
visible: item.visible,
open: item.open,
sort_order: item.sort_order,
category_id: creation_entry_text_or_default(
item.category_id,
module_runtime::DEFAULT_CREATION_ENTRY_CATEGORY_ID,
),
category_label: creation_entry_text_or_default(
item.category_label,
module_runtime::DEFAULT_CREATION_ENTRY_CATEGORY_LABEL,
),
category_sort_order: item.category_sort_order,
updated_at_micros: item.updated_at.to_micros_since_unix_epoch(),
unified_creation_spec_json: item.unified_creation_spec_json,
},
)
})
.collect(),
updated_at_micros: header.updated_at.to_micros_since_unix_epoch(),
@@ -353,20 +357,22 @@ fn map_creation_entry_config_snapshot(
creation_types: snapshot
.creation_types
.into_iter()
.map(|item| module_runtime::CreationEntryTypeSnapshot {
id: item.id,
title: item.title,
subtitle: item.subtitle,
badge: item.badge,
image_src: item.image_src,
visible: item.visible,
open: item.open,
sort_order: item.sort_order,
category_id: item.category_id,
category_label: item.category_label,
category_sort_order: item.category_sort_order,
updated_at_micros: item.updated_at_micros,
unified_creation_spec_json: item.unified_creation_spec_json,
.map(|item| {
normalize_creation_entry_type_snapshot(module_runtime::CreationEntryTypeSnapshot {
id: item.id,
title: item.title,
subtitle: item.subtitle,
badge: item.badge,
image_src: item.image_src,
visible: item.visible,
open: item.open,
sort_order: item.sort_order,
category_id: item.category_id,
category_label: item.category_label,
category_sort_order: item.category_sort_order,
updated_at_micros: item.updated_at_micros,
unified_creation_spec_json: item.unified_creation_spec_json,
})
})
.collect(),
updated_at_micros: snapshot.updated_at_micros,
@@ -380,6 +386,150 @@ fn creation_entry_text_or_default(value: Option<String>, default_value: &str) ->
.unwrap_or_else(|| default_value.to_string())
}
fn normalize_creation_entry_type_snapshot(
item: module_runtime::CreationEntryTypeSnapshot,
) -> module_runtime::CreationEntryTypeSnapshot {
// 中文注释:旧库里残留的跳一跳系统默认入口行仍会从订阅缓存命中,这里统一做读模型纠偏,
// 这样无论走订阅缓存还是 procedure 回退,创作页都只会看到新的跳一跳入口口径。
if item.id == "jump-hop"
&& item.title == "跳一跳"
&& item.subtitle == "俯视角跳跃闯关"
&& item.badge == "可创建"
&& item.image_src == "/creation-type-references/puzzle.webp"
&& item.visible
&& item.open
&& item.sort_order == 45
{
return module_runtime::CreationEntryTypeSnapshot {
subtitle: "主题驱动平台跳跃".to_string(),
image_src: "/creation-type-references/jump-hop.webp".to_string(),
..item
};
}
item
}
#[cfg(test)]
mod tests {
use super::*;
use spacetimedb_sdk::Timestamp;
fn build_creation_entry_header() -> CreationEntryConfig {
CreationEntryConfig {
config_id: "creation-entry-config".to_string(),
start_title: "新建作品".to_string(),
start_description: "选择模板后进入对应的创作表单。".to_string(),
start_idle_badge: "模板 Tab".to_string(),
start_busy_badge: "正在开启".to_string(),
modal_title: "选择创作类型".to_string(),
modal_description: "先选玩法类型,再进入对应创作工作台。".to_string(),
updated_at: Timestamp::from_micros_since_unix_epoch(1_000_000),
event_title: None,
event_description: None,
event_cover_image_src: None,
event_prize_pool_mud_points: 0,
event_starts_at_text: None,
event_ends_at_text: None,
event_banners_json: None,
}
}
fn build_old_jump_hop_row() -> CreationEntryTypeConfig {
CreationEntryTypeConfig {
id: "jump-hop".to_string(),
title: "跳一跳".to_string(),
subtitle: "俯视角跳跃闯关".to_string(),
badge: "可创建".to_string(),
image_src: "/creation-type-references/puzzle.webp".to_string(),
visible: true,
open: true,
sort_order: 45,
updated_at: Timestamp::from_micros_since_unix_epoch(2_000_000),
category_id: Some("recommended".to_string()),
category_label: Some("热门推荐".to_string()),
category_sort_order: 20,
unified_creation_spec_json: None,
}
}
#[test]
fn build_creation_entry_config_record_from_rows_normalizes_old_jump_hop_row() {
let record = build_creation_entry_config_record_from_rows(
build_creation_entry_header(),
vec![build_old_jump_hop_row()],
);
let jump_hop = record
.creation_types
.iter()
.find(|item| item.id == "jump-hop")
.expect("should contain jump-hop");
assert_eq!(jump_hop.subtitle, "主题驱动平台跳跃");
assert_eq!(
jump_hop.image_src,
"/creation-type-references/jump-hop.webp"
);
}
#[test]
fn map_creation_entry_config_snapshot_normalizes_old_jump_hop_snapshot() {
let record = map_creation_entry_config_snapshot(CreationEntryConfigSnapshot {
config_id: "creation-entry-config".to_string(),
start_card: CreationEntryStartCardSnapshot {
title: "新建作品".to_string(),
description: "选择模板后进入对应的创作表单。".to_string(),
idle_badge: "模板 Tab".to_string(),
busy_badge: "正在开启".to_string(),
},
type_modal: CreationEntryTypeModalSnapshot {
title: "选择创作类型".to_string(),
description: "先选玩法类型,再进入对应创作工作台。".to_string(),
},
event_banner: CreationEntryEventBannerSnapshot {
title: "主题创作赛".to_string(),
description: "用温暖的色彩,捏出秋天的故事。".to_string(),
cover_image_src: "/branding/taonier-logo-spiral-reference-concepts/taonier-spiral-bouncy-clay.png".to_string(),
prize_pool_mud_points: 58_000,
starts_at_text: "2024.10.20 10:00".to_string(),
ends_at_text: "2024.11.20 23:59".to_string(),
render_mode: "structured".to_string(),
html_code: None,
},
event_banners_json: None,
creation_types: vec![CreationEntryTypeSnapshot {
id: "jump-hop".to_string(),
title: "跳一跳".to_string(),
subtitle: "俯视角跳跃闯关".to_string(),
badge: "可创建".to_string(),
image_src: "/creation-type-references/puzzle.webp".to_string(),
visible: true,
open: true,
sort_order: 45,
category_id: "recommended".to_string(),
category_label: "热门推荐".to_string(),
category_sort_order: 20,
updated_at_micros: 2_000_000,
unified_creation_spec_json: None,
}],
updated_at_micros: 1_000_000,
});
let jump_hop = record
.creation_types
.iter()
.find(|item| item.id == "jump-hop")
.expect("should contain jump-hop");
assert_eq!(jump_hop.subtitle, "主题驱动平台跳跃");
assert_eq!(
jump_hop.image_src,
"/creation-type-references/jump-hop.webp"
);
}
}
pub(crate) fn map_runtime_setting_procedure_result(
result: RuntimeSettingProcedureResult,
) -> Result<RuntimeSettingsRecord, SpacetimeClientError> {

View File

@@ -1,7 +1,7 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
// This was generated using spacetimedb cli version 2.3.0 (commit aa73d1c35b4b346b98eeba10a3d756b4ae72162f).
// This was generated using spacetimedb cli version 2.4.1 (commit 07b52763c9da8d7cf79780db222fec1ffcb84070).
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
@@ -25,6 +25,7 @@ pub mod admin_work_visibility_list_procedure_result_type;
pub mod admin_work_visibility_procedure_result_type;
pub mod admin_work_visibility_snapshot_type;
pub mod admin_work_visibility_update_input_type;
pub mod advance_puzzle_clear_next_level_procedure;
pub mod advance_puzzle_next_level_procedure;
pub mod ai_result_reference_input_type;
pub mod ai_result_reference_kind_type;
@@ -125,6 +126,7 @@ 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_delete_input_type;
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;
@@ -213,6 +215,7 @@ pub mod compile_custom_world_published_profile_procedure;
pub mod compile_jump_hop_draft_procedure;
pub mod compile_match_3_d_draft_procedure;
pub mod compile_puzzle_agent_draft_procedure;
pub mod compile_puzzle_clear_draft_procedure;
pub mod compile_square_hole_draft_procedure;
pub mod compile_visual_novel_work_profile_procedure;
pub mod compile_wooden_fish_draft_procedure;
@@ -236,6 +239,7 @@ pub mod create_jump_hop_agent_session_procedure;
pub mod create_match_3_d_agent_session_procedure;
pub mod create_profile_recharge_order_and_return_procedure;
pub mod create_puzzle_agent_session_procedure;
pub mod create_puzzle_clear_agent_session_procedure;
pub mod create_square_hole_agent_session_procedure;
pub mod create_visual_novel_agent_session_procedure;
pub mod create_wooden_fish_agent_session_procedure;
@@ -327,14 +331,17 @@ pub mod database_migration_procedure_result_type;
pub mod database_migration_revoke_operator_input_type;
pub mod database_migration_table_stat_type;
pub mod database_migration_warning_type;
pub mod delete_bark_battle_work_procedure;
pub mod delete_big_fish_work_procedure;
pub mod delete_custom_world_agent_session_procedure;
pub mod delete_custom_world_profile_and_return_procedure;
pub mod delete_jump_hop_work_procedure;
pub mod delete_match_3_d_work_procedure;
pub mod delete_puzzle_work_procedure;
pub mod delete_runtime_snapshot_and_return_procedure;
pub mod delete_square_hole_work_procedure;
pub mod delete_visual_novel_work_procedure;
pub mod delete_wooden_fish_work_procedure;
pub mod drag_puzzle_piece_or_group_procedure;
pub mod drop_square_hole_shape_procedure;
pub mod enqueue_external_generation_job_and_return_procedure;
@@ -379,6 +386,7 @@ pub mod get_custom_world_gallery_detail_by_code_procedure;
pub mod get_custom_world_gallery_detail_procedure;
pub mod get_custom_world_library_detail_procedure;
pub mod get_jump_hop_agent_session_procedure;
pub mod get_jump_hop_leaderboard_procedure;
pub mod get_jump_hop_run_procedure;
pub mod get_jump_hop_work_profile_procedure;
pub mod get_match_3_d_agent_session_procedure;
@@ -392,6 +400,9 @@ pub mod get_profile_recharge_order_and_return_procedure;
pub mod get_profile_referral_invite_center_procedure;
pub mod get_profile_task_center_procedure;
pub mod get_puzzle_agent_session_procedure;
pub mod get_puzzle_clear_agent_session_procedure;
pub mod get_puzzle_clear_runtime_run_procedure;
pub mod get_puzzle_clear_work_profile_procedure;
pub mod get_puzzle_gallery_detail_procedure;
pub mod get_puzzle_run_procedure;
pub mod get_puzzle_work_detail_procedure;
@@ -447,6 +458,11 @@ pub mod jump_hop_gallery_view_table;
pub mod jump_hop_jump_procedure;
pub mod jump_hop_jump_result_kind_type;
pub mod jump_hop_last_jump_type;
pub mod jump_hop_leaderboard_entry_row_type;
pub mod jump_hop_leaderboard_entry_snapshot_type;
pub mod jump_hop_leaderboard_entry_table;
pub mod jump_hop_leaderboard_get_input_type;
pub mod jump_hop_leaderboard_procedure_result_type;
pub mod jump_hop_path_type;
pub mod jump_hop_platform_type;
pub mod jump_hop_run_get_input_type;
@@ -461,6 +477,7 @@ pub mod jump_hop_runtime_run_table;
pub mod jump_hop_scoring_type;
pub mod jump_hop_tile_asset_snapshot_type;
pub mod jump_hop_tile_type_type;
pub mod jump_hop_work_delete_input_type;
pub mod jump_hop_work_get_input_type;
pub mod jump_hop_work_procedure_result_type;
pub mod jump_hop_work_profile_row_type;
@@ -480,6 +497,7 @@ pub mod list_match_3_d_works_procedure;
pub mod list_platform_browse_history_procedure;
pub mod list_profile_save_archives_procedure;
pub mod list_profile_wallet_ledger_procedure;
pub mod list_puzzle_clear_works_procedure;
pub mod list_puzzle_gallery_procedure;
pub mod list_puzzle_works_procedure;
pub mod list_square_hole_works_procedure;
@@ -487,6 +505,7 @@ pub mod list_visual_novel_runtime_history_procedure;
pub mod list_visual_novel_works_procedure;
pub mod list_wooden_fish_works_procedure;
pub mod mark_profile_recharge_order_paid_and_return_procedure;
pub mod mark_puzzle_clear_level_time_up_procedure;
pub mod mark_puzzle_draft_generation_failed_procedure;
pub mod mark_puzzle_level_generation_failed_procedure;
pub mod match_3_d_agent_message_finalize_input_type;
@@ -595,6 +614,7 @@ pub mod publish_custom_world_profile_reducer;
pub mod publish_custom_world_world_procedure;
pub mod publish_jump_hop_work_procedure;
pub mod publish_match_3_d_work_procedure;
pub mod publish_puzzle_clear_work_procedure;
pub mod publish_puzzle_work_procedure;
pub mod publish_square_hole_work_procedure;
pub mod publish_visual_novel_work_procedure;
@@ -621,6 +641,44 @@ pub mod puzzle_anchor_status_type;
pub mod puzzle_audio_asset_type;
pub mod puzzle_board_snapshot_type;
pub mod puzzle_cell_position_type;
pub mod puzzle_clear_agent_session_create_input_type;
pub mod puzzle_clear_agent_session_get_input_type;
pub mod puzzle_clear_agent_session_procedure_result_type;
pub mod puzzle_clear_agent_session_row_type;
pub mod puzzle_clear_agent_session_snapshot_type;
pub mod puzzle_clear_agent_session_table;
pub mod puzzle_clear_board_cell_snapshot_type;
pub mod puzzle_clear_board_snapshot_type;
pub mod puzzle_clear_card_asset_snapshot_type;
pub mod puzzle_clear_draft_compile_input_type;
pub mod puzzle_clear_draft_snapshot_type;
pub mod puzzle_clear_event_row_type;
pub mod puzzle_clear_event_table;
pub mod puzzle_clear_gallery_card_view_row_type;
pub mod puzzle_clear_gallery_card_view_table;
pub mod puzzle_clear_gallery_view_row_type;
pub mod puzzle_clear_gallery_view_table;
pub mod puzzle_clear_image_asset_snapshot_type;
pub mod puzzle_clear_pattern_group_snapshot_type;
pub mod puzzle_clear_run_get_input_type;
pub mod puzzle_clear_run_next_level_input_type;
pub mod puzzle_clear_run_procedure_result_type;
pub mod puzzle_clear_run_retry_level_input_type;
pub mod puzzle_clear_run_start_input_type;
pub mod puzzle_clear_run_swap_input_type;
pub mod puzzle_clear_run_time_up_input_type;
pub mod puzzle_clear_runtime_run_row_type;
pub mod puzzle_clear_runtime_run_table;
pub mod puzzle_clear_runtime_snapshot_type;
pub mod puzzle_clear_work_get_input_type;
pub mod puzzle_clear_work_procedure_result_type;
pub mod puzzle_clear_work_profile_row_type;
pub mod puzzle_clear_work_profile_table;
pub mod puzzle_clear_work_publish_input_type;
pub mod puzzle_clear_work_snapshot_type;
pub mod puzzle_clear_work_update_input_type;
pub mod puzzle_clear_works_list_input_type;
pub mod puzzle_clear_works_procedure_result_type;
pub mod puzzle_creator_intent_type;
pub mod puzzle_draft_compile_failure_input_type;
pub mod puzzle_draft_compile_input_type;
@@ -743,6 +801,7 @@ pub mod restart_jump_hop_run_procedure;
pub mod restart_match_3_d_run_procedure;
pub mod restart_square_hole_run_procedure;
pub mod resume_profile_save_archive_and_return_procedure;
pub mod retry_puzzle_clear_level_run_procedure;
pub mod revoke_database_migration_operator_procedure;
pub mod rpg_agent_draft_card_kind_type;
pub mod rpg_agent_draft_card_status_type;
@@ -913,6 +972,7 @@ pub mod start_bark_battle_run_procedure;
pub mod start_big_fish_run_procedure;
pub mod start_jump_hop_run_procedure;
pub mod start_match_3_d_run_procedure;
pub mod start_puzzle_clear_runtime_run_procedure;
pub mod start_puzzle_run_procedure;
pub mod start_square_hole_run_procedure;
pub mod start_visual_novel_run_procedure;
@@ -941,6 +1001,7 @@ pub mod submit_puzzle_agent_message_procedure;
pub mod submit_puzzle_leaderboard_entry_procedure;
pub mod submit_square_hole_agent_message_procedure;
pub mod submit_visual_novel_agent_message_procedure;
pub mod swap_puzzle_clear_cards_procedure;
pub mod swap_puzzle_pieces_procedure;
pub mod tracking_daily_stat_table;
pub mod tracking_daily_stat_type;
@@ -959,6 +1020,7 @@ pub mod unpublish_custom_world_profile_reducer;
pub mod update_bark_battle_draft_config_procedure;
pub mod update_jump_hop_work_procedure;
pub mod update_match_3_d_work_procedure;
pub mod update_puzzle_clear_work_procedure;
pub mod update_puzzle_run_pause_procedure;
pub mod update_puzzle_work_procedure;
pub mod update_square_hole_work_procedure;
@@ -1053,6 +1115,7 @@ pub mod wooden_fish_run_status_type;
pub mod wooden_fish_runtime_run_row_type;
pub mod wooden_fish_runtime_run_table;
pub mod wooden_fish_word_counter_type;
pub mod wooden_fish_work_delete_input_type;
pub mod wooden_fish_work_get_input_type;
pub mod wooden_fish_work_procedure_result_type;
pub mod wooden_fish_work_profile_row_type;
@@ -1082,6 +1145,7 @@ pub use admin_work_visibility_list_procedure_result_type::AdminWorkVisibilityLis
pub use admin_work_visibility_procedure_result_type::AdminWorkVisibilityProcedureResult;
pub use admin_work_visibility_snapshot_type::AdminWorkVisibilitySnapshot;
pub use admin_work_visibility_update_input_type::AdminWorkVisibilityUpdateInput;
pub use advance_puzzle_clear_next_level_procedure::advance_puzzle_clear_next_level;
pub use advance_puzzle_next_level_procedure::advance_puzzle_next_level;
pub use ai_result_reference_input_type::AiResultReferenceInput;
pub use ai_result_reference_kind_type::AiResultReferenceKind;
@@ -1182,6 +1246,7 @@ 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_delete_input_type::BarkBattleWorkDeleteInput;
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::*;
@@ -1270,6 +1335,7 @@ pub use compile_custom_world_published_profile_procedure::compile_custom_world_p
pub use compile_jump_hop_draft_procedure::compile_jump_hop_draft;
pub use compile_match_3_d_draft_procedure::compile_match_3_d_draft;
pub use compile_puzzle_agent_draft_procedure::compile_puzzle_agent_draft;
pub use compile_puzzle_clear_draft_procedure::compile_puzzle_clear_draft;
pub use compile_square_hole_draft_procedure::compile_square_hole_draft;
pub use compile_visual_novel_work_profile_procedure::compile_visual_novel_work_profile;
pub use compile_wooden_fish_draft_procedure::compile_wooden_fish_draft;
@@ -1293,6 +1359,7 @@ pub use create_jump_hop_agent_session_procedure::create_jump_hop_agent_session;
pub use create_match_3_d_agent_session_procedure::create_match_3_d_agent_session;
pub use create_profile_recharge_order_and_return_procedure::create_profile_recharge_order_and_return;
pub use create_puzzle_agent_session_procedure::create_puzzle_agent_session;
pub use create_puzzle_clear_agent_session_procedure::create_puzzle_clear_agent_session;
pub use create_square_hole_agent_session_procedure::create_square_hole_agent_session;
pub use create_visual_novel_agent_session_procedure::create_visual_novel_agent_session;
pub use create_wooden_fish_agent_session_procedure::create_wooden_fish_agent_session;
@@ -1384,14 +1451,17 @@ pub use database_migration_procedure_result_type::DatabaseMigrationProcedureResu
pub use database_migration_revoke_operator_input_type::DatabaseMigrationRevokeOperatorInput;
pub use database_migration_table_stat_type::DatabaseMigrationTableStat;
pub use database_migration_warning_type::DatabaseMigrationWarning;
pub use delete_bark_battle_work_procedure::delete_bark_battle_work;
pub use delete_big_fish_work_procedure::delete_big_fish_work;
pub use delete_custom_world_agent_session_procedure::delete_custom_world_agent_session;
pub use delete_custom_world_profile_and_return_procedure::delete_custom_world_profile_and_return;
pub use delete_jump_hop_work_procedure::delete_jump_hop_work;
pub use delete_match_3_d_work_procedure::delete_match_3_d_work;
pub use delete_puzzle_work_procedure::delete_puzzle_work;
pub use delete_runtime_snapshot_and_return_procedure::delete_runtime_snapshot_and_return;
pub use delete_square_hole_work_procedure::delete_square_hole_work;
pub use delete_visual_novel_work_procedure::delete_visual_novel_work;
pub use delete_wooden_fish_work_procedure::delete_wooden_fish_work;
pub use drag_puzzle_piece_or_group_procedure::drag_puzzle_piece_or_group;
pub use drop_square_hole_shape_procedure::drop_square_hole_shape;
pub use enqueue_external_generation_job_and_return_procedure::enqueue_external_generation_job_and_return;
@@ -1436,6 +1506,7 @@ pub use get_custom_world_gallery_detail_by_code_procedure::get_custom_world_gall
pub use get_custom_world_gallery_detail_procedure::get_custom_world_gallery_detail;
pub use get_custom_world_library_detail_procedure::get_custom_world_library_detail;
pub use get_jump_hop_agent_session_procedure::get_jump_hop_agent_session;
pub use get_jump_hop_leaderboard_procedure::get_jump_hop_leaderboard;
pub use get_jump_hop_run_procedure::get_jump_hop_run;
pub use get_jump_hop_work_profile_procedure::get_jump_hop_work_profile;
pub use get_match_3_d_agent_session_procedure::get_match_3_d_agent_session;
@@ -1449,6 +1520,9 @@ pub use get_profile_recharge_order_and_return_procedure::get_profile_recharge_or
pub use get_profile_referral_invite_center_procedure::get_profile_referral_invite_center;
pub use get_profile_task_center_procedure::get_profile_task_center;
pub use get_puzzle_agent_session_procedure::get_puzzle_agent_session;
pub use get_puzzle_clear_agent_session_procedure::get_puzzle_clear_agent_session;
pub use get_puzzle_clear_runtime_run_procedure::get_puzzle_clear_runtime_run;
pub use get_puzzle_clear_work_profile_procedure::get_puzzle_clear_work_profile;
pub use get_puzzle_gallery_detail_procedure::get_puzzle_gallery_detail;
pub use get_puzzle_run_procedure::get_puzzle_run;
pub use get_puzzle_work_detail_procedure::get_puzzle_work_detail;
@@ -1504,6 +1578,11 @@ pub use jump_hop_gallery_view_table::*;
pub use jump_hop_jump_procedure::jump_hop_jump;
pub use jump_hop_jump_result_kind_type::JumpHopJumpResultKind;
pub use jump_hop_last_jump_type::JumpHopLastJump;
pub use jump_hop_leaderboard_entry_row_type::JumpHopLeaderboardEntryRow;
pub use jump_hop_leaderboard_entry_snapshot_type::JumpHopLeaderboardEntrySnapshot;
pub use jump_hop_leaderboard_entry_table::*;
pub use jump_hop_leaderboard_get_input_type::JumpHopLeaderboardGetInput;
pub use jump_hop_leaderboard_procedure_result_type::JumpHopLeaderboardProcedureResult;
pub use jump_hop_path_type::JumpHopPath;
pub use jump_hop_platform_type::JumpHopPlatform;
pub use jump_hop_run_get_input_type::JumpHopRunGetInput;
@@ -1518,6 +1597,7 @@ pub use jump_hop_runtime_run_table::*;
pub use jump_hop_scoring_type::JumpHopScoring;
pub use jump_hop_tile_asset_snapshot_type::JumpHopTileAssetSnapshot;
pub use jump_hop_tile_type_type::JumpHopTileType;
pub use jump_hop_work_delete_input_type::JumpHopWorkDeleteInput;
pub use jump_hop_work_get_input_type::JumpHopWorkGetInput;
pub use jump_hop_work_procedure_result_type::JumpHopWorkProcedureResult;
pub use jump_hop_work_profile_row_type::JumpHopWorkProfileRow;
@@ -1537,6 +1617,7 @@ pub use list_match_3_d_works_procedure::list_match_3_d_works;
pub use list_platform_browse_history_procedure::list_platform_browse_history;
pub use list_profile_save_archives_procedure::list_profile_save_archives;
pub use list_profile_wallet_ledger_procedure::list_profile_wallet_ledger;
pub use list_puzzle_clear_works_procedure::list_puzzle_clear_works;
pub use list_puzzle_gallery_procedure::list_puzzle_gallery;
pub use list_puzzle_works_procedure::list_puzzle_works;
pub use list_square_hole_works_procedure::list_square_hole_works;
@@ -1544,6 +1625,7 @@ pub use list_visual_novel_runtime_history_procedure::list_visual_novel_runtime_h
pub use list_visual_novel_works_procedure::list_visual_novel_works;
pub use list_wooden_fish_works_procedure::list_wooden_fish_works;
pub use mark_profile_recharge_order_paid_and_return_procedure::mark_profile_recharge_order_paid_and_return;
pub use mark_puzzle_clear_level_time_up_procedure::mark_puzzle_clear_level_time_up;
pub use mark_puzzle_draft_generation_failed_procedure::mark_puzzle_draft_generation_failed;
pub use mark_puzzle_level_generation_failed_procedure::mark_puzzle_level_generation_failed;
pub use match_3_d_agent_message_finalize_input_type::Match3DAgentMessageFinalizeInput;
@@ -1652,6 +1734,7 @@ pub use publish_custom_world_profile_reducer::publish_custom_world_profile;
pub use publish_custom_world_world_procedure::publish_custom_world_world;
pub use publish_jump_hop_work_procedure::publish_jump_hop_work;
pub use publish_match_3_d_work_procedure::publish_match_3_d_work;
pub use publish_puzzle_clear_work_procedure::publish_puzzle_clear_work;
pub use publish_puzzle_work_procedure::publish_puzzle_work;
pub use publish_square_hole_work_procedure::publish_square_hole_work;
pub use publish_visual_novel_work_procedure::publish_visual_novel_work;
@@ -1678,6 +1761,44 @@ pub use puzzle_anchor_status_type::PuzzleAnchorStatus;
pub use puzzle_audio_asset_type::PuzzleAudioAsset;
pub use puzzle_board_snapshot_type::PuzzleBoardSnapshot;
pub use puzzle_cell_position_type::PuzzleCellPosition;
pub use puzzle_clear_agent_session_create_input_type::PuzzleClearAgentSessionCreateInput;
pub use puzzle_clear_agent_session_get_input_type::PuzzleClearAgentSessionGetInput;
pub use puzzle_clear_agent_session_procedure_result_type::PuzzleClearAgentSessionProcedureResult;
pub use puzzle_clear_agent_session_row_type::PuzzleClearAgentSessionRow;
pub use puzzle_clear_agent_session_snapshot_type::PuzzleClearAgentSessionSnapshot;
pub use puzzle_clear_agent_session_table::*;
pub use puzzle_clear_board_cell_snapshot_type::PuzzleClearBoardCellSnapshot;
pub use puzzle_clear_board_snapshot_type::PuzzleClearBoardSnapshot;
pub use puzzle_clear_card_asset_snapshot_type::PuzzleClearCardAssetSnapshot;
pub use puzzle_clear_draft_compile_input_type::PuzzleClearDraftCompileInput;
pub use puzzle_clear_draft_snapshot_type::PuzzleClearDraftSnapshot;
pub use puzzle_clear_event_row_type::PuzzleClearEventRow;
pub use puzzle_clear_event_table::*;
pub use puzzle_clear_gallery_card_view_row_type::PuzzleClearGalleryCardViewRow;
pub use puzzle_clear_gallery_card_view_table::*;
pub use puzzle_clear_gallery_view_row_type::PuzzleClearGalleryViewRow;
pub use puzzle_clear_gallery_view_table::*;
pub use puzzle_clear_image_asset_snapshot_type::PuzzleClearImageAssetSnapshot;
pub use puzzle_clear_pattern_group_snapshot_type::PuzzleClearPatternGroupSnapshot;
pub use puzzle_clear_run_get_input_type::PuzzleClearRunGetInput;
pub use puzzle_clear_run_next_level_input_type::PuzzleClearRunNextLevelInput;
pub use puzzle_clear_run_procedure_result_type::PuzzleClearRunProcedureResult;
pub use puzzle_clear_run_retry_level_input_type::PuzzleClearRunRetryLevelInput;
pub use puzzle_clear_run_start_input_type::PuzzleClearRunStartInput;
pub use puzzle_clear_run_swap_input_type::PuzzleClearRunSwapInput;
pub use puzzle_clear_run_time_up_input_type::PuzzleClearRunTimeUpInput;
pub use puzzle_clear_runtime_run_row_type::PuzzleClearRuntimeRunRow;
pub use puzzle_clear_runtime_run_table::*;
pub use puzzle_clear_runtime_snapshot_type::PuzzleClearRuntimeSnapshot;
pub use puzzle_clear_work_get_input_type::PuzzleClearWorkGetInput;
pub use puzzle_clear_work_procedure_result_type::PuzzleClearWorkProcedureResult;
pub use puzzle_clear_work_profile_row_type::PuzzleClearWorkProfileRow;
pub use puzzle_clear_work_profile_table::*;
pub use puzzle_clear_work_publish_input_type::PuzzleClearWorkPublishInput;
pub use puzzle_clear_work_snapshot_type::PuzzleClearWorkSnapshot;
pub use puzzle_clear_work_update_input_type::PuzzleClearWorkUpdateInput;
pub use puzzle_clear_works_list_input_type::PuzzleClearWorksListInput;
pub use puzzle_clear_works_procedure_result_type::PuzzleClearWorksProcedureResult;
pub use puzzle_creator_intent_type::PuzzleCreatorIntent;
pub use puzzle_draft_compile_failure_input_type::PuzzleDraftCompileFailureInput;
pub use puzzle_draft_compile_input_type::PuzzleDraftCompileInput;
@@ -1800,6 +1921,7 @@ pub use restart_jump_hop_run_procedure::restart_jump_hop_run;
pub use restart_match_3_d_run_procedure::restart_match_3_d_run;
pub use restart_square_hole_run_procedure::restart_square_hole_run;
pub use resume_profile_save_archive_and_return_procedure::resume_profile_save_archive_and_return;
pub use retry_puzzle_clear_level_run_procedure::retry_puzzle_clear_level_run;
pub use revoke_database_migration_operator_procedure::revoke_database_migration_operator;
pub use rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind;
pub use rpg_agent_draft_card_status_type::RpgAgentDraftCardStatus;
@@ -1970,6 +2092,7 @@ 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_jump_hop_run_procedure::start_jump_hop_run;
pub use start_match_3_d_run_procedure::start_match_3_d_run;
pub use start_puzzle_clear_runtime_run_procedure::start_puzzle_clear_runtime_run;
pub use start_puzzle_run_procedure::start_puzzle_run;
pub use start_square_hole_run_procedure::start_square_hole_run;
pub use start_visual_novel_run_procedure::start_visual_novel_run;
@@ -1998,6 +2121,7 @@ pub use submit_puzzle_agent_message_procedure::submit_puzzle_agent_message;
pub use submit_puzzle_leaderboard_entry_procedure::submit_puzzle_leaderboard_entry;
pub use submit_square_hole_agent_message_procedure::submit_square_hole_agent_message;
pub use submit_visual_novel_agent_message_procedure::submit_visual_novel_agent_message;
pub use swap_puzzle_clear_cards_procedure::swap_puzzle_clear_cards;
pub use swap_puzzle_pieces_procedure::swap_puzzle_pieces;
pub use tracking_daily_stat_table::*;
pub use tracking_daily_stat_type::TrackingDailyStat;
@@ -2016,6 +2140,7 @@ 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_jump_hop_work_procedure::update_jump_hop_work;
pub use update_match_3_d_work_procedure::update_match_3_d_work;
pub use update_puzzle_clear_work_procedure::update_puzzle_clear_work;
pub use update_puzzle_run_pause_procedure::update_puzzle_run_pause;
pub use update_puzzle_work_procedure::update_puzzle_work;
pub use update_square_hole_work_procedure::update_square_hole_work;
@@ -2110,6 +2235,7 @@ pub use wooden_fish_run_status_type::WoodenFishRunStatus;
pub use wooden_fish_runtime_run_row_type::WoodenFishRuntimeRunRow;
pub use wooden_fish_runtime_run_table::*;
pub use wooden_fish_word_counter_type::WoodenFishWordCounter;
pub use wooden_fish_work_delete_input_type::WoodenFishWorkDeleteInput;
pub use wooden_fish_work_get_input_type::WoodenFishWorkGetInput;
pub use wooden_fish_work_procedure_result_type::WoodenFishWorkProcedureResult;
pub use wooden_fish_work_profile_row_type::WoodenFishWorkProfileRow;
@@ -2437,6 +2563,7 @@ pub struct DbUpdate {
jump_hop_event: __sdk::TableUpdate<JumpHopEventRow>,
jump_hop_gallery_card_view: __sdk::TableUpdate<JumpHopGalleryCardViewRow>,
jump_hop_gallery_view: __sdk::TableUpdate<JumpHopGalleryViewRow>,
jump_hop_leaderboard_entry: __sdk::TableUpdate<JumpHopLeaderboardEntryRow>,
jump_hop_runtime_run: __sdk::TableUpdate<JumpHopRuntimeRunRow>,
jump_hop_work_profile: __sdk::TableUpdate<JumpHopWorkProfileRow>,
match_3_d_agent_message: __sdk::TableUpdate<Match3DAgentMessageRow>,
@@ -2467,6 +2594,12 @@ pub struct DbUpdate {
public_work_play_daily_stat: __sdk::TableUpdate<PublicWorkPlayDailyStat>,
puzzle_agent_message: __sdk::TableUpdate<PuzzleAgentMessageRow>,
puzzle_agent_session: __sdk::TableUpdate<PuzzleAgentSessionRow>,
puzzle_clear_agent_session: __sdk::TableUpdate<PuzzleClearAgentSessionRow>,
puzzle_clear_event: __sdk::TableUpdate<PuzzleClearEventRow>,
puzzle_clear_gallery_card_view: __sdk::TableUpdate<PuzzleClearGalleryCardViewRow>,
puzzle_clear_gallery_view: __sdk::TableUpdate<PuzzleClearGalleryViewRow>,
puzzle_clear_runtime_run: __sdk::TableUpdate<PuzzleClearRuntimeRunRow>,
puzzle_clear_work_profile: __sdk::TableUpdate<PuzzleClearWorkProfileRow>,
puzzle_event: __sdk::TableUpdate<PuzzleEvent>,
puzzle_gallery_card_view: __sdk::TableUpdate<PuzzleGalleryCardViewRow>,
puzzle_gallery_view: __sdk::TableUpdate<PuzzleWorkProfile>,
@@ -2654,6 +2787,9 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
"jump_hop_gallery_view" => db_update.jump_hop_gallery_view.append(
jump_hop_gallery_view_table::parse_table_update(table_update)?,
),
"jump_hop_leaderboard_entry" => db_update.jump_hop_leaderboard_entry.append(
jump_hop_leaderboard_entry_table::parse_table_update(table_update)?,
),
"jump_hop_runtime_run" => db_update.jump_hop_runtime_run.append(
jump_hop_runtime_run_table::parse_table_update(table_update)?,
),
@@ -2746,6 +2882,26 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
"puzzle_agent_session" => db_update.puzzle_agent_session.append(
puzzle_agent_session_table::parse_table_update(table_update)?,
),
"puzzle_clear_agent_session" => db_update.puzzle_clear_agent_session.append(
puzzle_clear_agent_session_table::parse_table_update(table_update)?,
),
"puzzle_clear_event" => db_update
.puzzle_clear_event
.append(puzzle_clear_event_table::parse_table_update(table_update)?),
"puzzle_clear_gallery_card_view" => {
db_update.puzzle_clear_gallery_card_view.append(
puzzle_clear_gallery_card_view_table::parse_table_update(table_update)?,
)
}
"puzzle_clear_gallery_view" => db_update.puzzle_clear_gallery_view.append(
puzzle_clear_gallery_view_table::parse_table_update(table_update)?,
),
"puzzle_clear_runtime_run" => db_update.puzzle_clear_runtime_run.append(
puzzle_clear_runtime_run_table::parse_table_update(table_update)?,
),
"puzzle_clear_work_profile" => db_update.puzzle_clear_work_profile.append(
puzzle_clear_work_profile_table::parse_table_update(table_update)?,
),
"puzzle_event" => db_update
.puzzle_event
.append(puzzle_event_table::parse_table_update(table_update)?),
@@ -3089,6 +3245,12 @@ impl __sdk::DbUpdate for DbUpdate {
diff.jump_hop_event = cache
.apply_diff_to_table::<JumpHopEventRow>("jump_hop_event", &self.jump_hop_event)
.with_updates_by_pk(|row| &row.event_id);
diff.jump_hop_leaderboard_entry = cache
.apply_diff_to_table::<JumpHopLeaderboardEntryRow>(
"jump_hop_leaderboard_entry",
&self.jump_hop_leaderboard_entry,
)
.with_updates_by_pk(|row| &row.entry_id);
diff.jump_hop_runtime_run = cache
.apply_diff_to_table::<JumpHopRuntimeRunRow>(
"jump_hop_runtime_run",
@@ -3245,6 +3407,30 @@ impl __sdk::DbUpdate for DbUpdate {
&self.puzzle_agent_session,
)
.with_updates_by_pk(|row| &row.session_id);
diff.puzzle_clear_agent_session = cache
.apply_diff_to_table::<PuzzleClearAgentSessionRow>(
"puzzle_clear_agent_session",
&self.puzzle_clear_agent_session,
)
.with_updates_by_pk(|row| &row.session_id);
diff.puzzle_clear_event = cache
.apply_diff_to_table::<PuzzleClearEventRow>(
"puzzle_clear_event",
&self.puzzle_clear_event,
)
.with_updates_by_pk(|row| &row.event_id);
diff.puzzle_clear_runtime_run = cache
.apply_diff_to_table::<PuzzleClearRuntimeRunRow>(
"puzzle_clear_runtime_run",
&self.puzzle_clear_runtime_run,
)
.with_updates_by_pk(|row| &row.run_id);
diff.puzzle_clear_work_profile = cache
.apply_diff_to_table::<PuzzleClearWorkProfileRow>(
"puzzle_clear_work_profile",
&self.puzzle_clear_work_profile,
)
.with_updates_by_pk(|row| &row.profile_id);
diff.puzzle_event = self.puzzle_event.into_event_diff();
diff.puzzle_leaderboard_entry = cache
.apply_diff_to_table::<PuzzleLeaderboardEntryRow>(
@@ -3410,6 +3596,15 @@ impl __sdk::DbUpdate for DbUpdate {
"public_work_gallery_entry",
&self.public_work_gallery_entry,
);
diff.puzzle_clear_gallery_card_view = cache
.apply_diff_to_table::<PuzzleClearGalleryCardViewRow>(
"puzzle_clear_gallery_card_view",
&self.puzzle_clear_gallery_card_view,
);
diff.puzzle_clear_gallery_view = cache.apply_diff_to_table::<PuzzleClearGalleryViewRow>(
"puzzle_clear_gallery_view",
&self.puzzle_clear_gallery_view,
);
diff.puzzle_gallery_card_view = cache.apply_diff_to_table::<PuzzleGalleryCardViewRow>(
"puzzle_gallery_card_view",
&self.puzzle_gallery_card_view,
@@ -3577,6 +3772,9 @@ impl __sdk::DbUpdate for DbUpdate {
"jump_hop_gallery_view" => db_update
.jump_hop_gallery_view
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"jump_hop_leaderboard_entry" => db_update
.jump_hop_leaderboard_entry
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"jump_hop_runtime_run" => db_update
.jump_hop_runtime_run
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
@@ -3667,6 +3865,24 @@ impl __sdk::DbUpdate for DbUpdate {
"puzzle_agent_session" => db_update
.puzzle_agent_session
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"puzzle_clear_agent_session" => db_update
.puzzle_clear_agent_session
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"puzzle_clear_event" => db_update
.puzzle_clear_event
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"puzzle_clear_gallery_card_view" => db_update
.puzzle_clear_gallery_card_view
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"puzzle_clear_gallery_view" => db_update
.puzzle_clear_gallery_view
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"puzzle_clear_runtime_run" => db_update
.puzzle_clear_runtime_run
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"puzzle_clear_work_profile" => db_update
.puzzle_clear_work_profile
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"puzzle_event" => db_update
.puzzle_event
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
@@ -3923,6 +4139,9 @@ impl __sdk::DbUpdate for DbUpdate {
"jump_hop_gallery_view" => db_update
.jump_hop_gallery_view
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"jump_hop_leaderboard_entry" => db_update
.jump_hop_leaderboard_entry
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"jump_hop_runtime_run" => db_update
.jump_hop_runtime_run
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
@@ -4013,6 +4232,24 @@ impl __sdk::DbUpdate for DbUpdate {
"puzzle_agent_session" => db_update
.puzzle_agent_session
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"puzzle_clear_agent_session" => db_update
.puzzle_clear_agent_session
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"puzzle_clear_event" => db_update
.puzzle_clear_event
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"puzzle_clear_gallery_card_view" => db_update
.puzzle_clear_gallery_card_view
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"puzzle_clear_gallery_view" => db_update
.puzzle_clear_gallery_view
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"puzzle_clear_runtime_run" => db_update
.puzzle_clear_runtime_run
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"puzzle_clear_work_profile" => db_update
.puzzle_clear_work_profile
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"puzzle_event" => db_update
.puzzle_event
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
@@ -4183,6 +4420,7 @@ pub struct AppliedDiff<'r> {
jump_hop_event: __sdk::TableAppliedDiff<'r, JumpHopEventRow>,
jump_hop_gallery_card_view: __sdk::TableAppliedDiff<'r, JumpHopGalleryCardViewRow>,
jump_hop_gallery_view: __sdk::TableAppliedDiff<'r, JumpHopGalleryViewRow>,
jump_hop_leaderboard_entry: __sdk::TableAppliedDiff<'r, JumpHopLeaderboardEntryRow>,
jump_hop_runtime_run: __sdk::TableAppliedDiff<'r, JumpHopRuntimeRunRow>,
jump_hop_work_profile: __sdk::TableAppliedDiff<'r, JumpHopWorkProfileRow>,
match_3_d_agent_message: __sdk::TableAppliedDiff<'r, Match3DAgentMessageRow>,
@@ -4213,6 +4451,12 @@ pub struct AppliedDiff<'r> {
public_work_play_daily_stat: __sdk::TableAppliedDiff<'r, PublicWorkPlayDailyStat>,
puzzle_agent_message: __sdk::TableAppliedDiff<'r, PuzzleAgentMessageRow>,
puzzle_agent_session: __sdk::TableAppliedDiff<'r, PuzzleAgentSessionRow>,
puzzle_clear_agent_session: __sdk::TableAppliedDiff<'r, PuzzleClearAgentSessionRow>,
puzzle_clear_event: __sdk::TableAppliedDiff<'r, PuzzleClearEventRow>,
puzzle_clear_gallery_card_view: __sdk::TableAppliedDiff<'r, PuzzleClearGalleryCardViewRow>,
puzzle_clear_gallery_view: __sdk::TableAppliedDiff<'r, PuzzleClearGalleryViewRow>,
puzzle_clear_runtime_run: __sdk::TableAppliedDiff<'r, PuzzleClearRuntimeRunRow>,
puzzle_clear_work_profile: __sdk::TableAppliedDiff<'r, PuzzleClearWorkProfileRow>,
puzzle_event: __sdk::TableAppliedDiff<'r, PuzzleEvent>,
puzzle_gallery_card_view: __sdk::TableAppliedDiff<'r, PuzzleGalleryCardViewRow>,
puzzle_gallery_view: __sdk::TableAppliedDiff<'r, PuzzleWorkProfile>,
@@ -4480,6 +4724,11 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
&self.jump_hop_gallery_view,
event,
);
callbacks.invoke_table_row_callbacks::<JumpHopLeaderboardEntryRow>(
"jump_hop_leaderboard_entry",
&self.jump_hop_leaderboard_entry,
event,
);
callbacks.invoke_table_row_callbacks::<JumpHopRuntimeRunRow>(
"jump_hop_runtime_run",
&self.jump_hop_runtime_run,
@@ -4626,6 +4875,36 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
&self.puzzle_agent_session,
event,
);
callbacks.invoke_table_row_callbacks::<PuzzleClearAgentSessionRow>(
"puzzle_clear_agent_session",
&self.puzzle_clear_agent_session,
event,
);
callbacks.invoke_table_row_callbacks::<PuzzleClearEventRow>(
"puzzle_clear_event",
&self.puzzle_clear_event,
event,
);
callbacks.invoke_table_row_callbacks::<PuzzleClearGalleryCardViewRow>(
"puzzle_clear_gallery_card_view",
&self.puzzle_clear_gallery_card_view,
event,
);
callbacks.invoke_table_row_callbacks::<PuzzleClearGalleryViewRow>(
"puzzle_clear_gallery_view",
&self.puzzle_clear_gallery_view,
event,
);
callbacks.invoke_table_row_callbacks::<PuzzleClearRuntimeRunRow>(
"puzzle_clear_runtime_run",
&self.puzzle_clear_runtime_run,
event,
);
callbacks.invoke_table_row_callbacks::<PuzzleClearWorkProfileRow>(
"puzzle_clear_work_profile",
&self.puzzle_clear_work_profile,
event,
);
callbacks.invoke_table_row_callbacks::<PuzzleEvent>(
"puzzle_event",
&self.puzzle_event,
@@ -5503,6 +5782,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
jump_hop_event_table::register_table(client_cache);
jump_hop_gallery_card_view_table::register_table(client_cache);
jump_hop_gallery_view_table::register_table(client_cache);
jump_hop_leaderboard_entry_table::register_table(client_cache);
jump_hop_runtime_run_table::register_table(client_cache);
jump_hop_work_profile_table::register_table(client_cache);
match_3_d_agent_message_table::register_table(client_cache);
@@ -5533,6 +5813,12 @@ impl __sdk::SpacetimeModule for RemoteModule {
public_work_play_daily_stat_table::register_table(client_cache);
puzzle_agent_message_table::register_table(client_cache);
puzzle_agent_session_table::register_table(client_cache);
puzzle_clear_agent_session_table::register_table(client_cache);
puzzle_clear_event_table::register_table(client_cache);
puzzle_clear_gallery_card_view_table::register_table(client_cache);
puzzle_clear_gallery_view_table::register_table(client_cache);
puzzle_clear_runtime_run_table::register_table(client_cache);
puzzle_clear_work_profile_table::register_table(client_cache);
puzzle_event_table::register_table(client_cache);
puzzle_gallery_card_view_table::register_table(client_cache);
puzzle_gallery_view_table::register_table(client_cache);
@@ -5616,6 +5902,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
"jump_hop_event",
"jump_hop_gallery_card_view",
"jump_hop_gallery_view",
"jump_hop_leaderboard_entry",
"jump_hop_runtime_run",
"jump_hop_work_profile",
"match_3_d_agent_message",
@@ -5646,6 +5933,12 @@ impl __sdk::SpacetimeModule for RemoteModule {
"public_work_play_daily_stat",
"puzzle_agent_message",
"puzzle_agent_session",
"puzzle_clear_agent_session",
"puzzle_clear_event",
"puzzle_clear_gallery_card_view",
"puzzle_clear_gallery_view",
"puzzle_clear_runtime_run",
"puzzle_clear_work_profile",
"puzzle_event",
"puzzle_gallery_card_view",
"puzzle_gallery_view",

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::puzzle_clear_run_next_level_input_type::PuzzleClearRunNextLevelInput;
use super::puzzle_clear_run_procedure_result_type::PuzzleClearRunProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct AdvancePuzzleClearNextLevelArgs {
pub input: PuzzleClearRunNextLevelInput,
}
impl __sdk::InModule for AdvancePuzzleClearNextLevelArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `advance_puzzle_clear_next_level`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait advance_puzzle_clear_next_level {
fn advance_puzzle_clear_next_level(&self, input: PuzzleClearRunNextLevelInput) {
self.advance_puzzle_clear_next_level_then(input, |_, _| {});
}
fn advance_puzzle_clear_next_level_then(
&self,
input: PuzzleClearRunNextLevelInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl advance_puzzle_clear_next_level for super::RemoteProcedures {
fn advance_puzzle_clear_next_level_then(
&self,
input: PuzzleClearRunNextLevelInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearRunProcedureResult>(
"advance_puzzle_clear_next_level",
AdvancePuzzleClearNextLevelArgs { input },
__callback,
);
}
}

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 BarkBattleWorkDeleteInput {
pub work_id: String,
pub owner_user_id: String,
}
impl __sdk::InModule for BarkBattleWorkDeleteInput {
type Module = super::RemoteModule;
}

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::puzzle_clear_agent_session_procedure_result_type::PuzzleClearAgentSessionProcedureResult;
use super::puzzle_clear_draft_compile_input_type::PuzzleClearDraftCompileInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct CompilePuzzleClearDraftArgs {
pub input: PuzzleClearDraftCompileInput,
}
impl __sdk::InModule for CompilePuzzleClearDraftArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `compile_puzzle_clear_draft`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait compile_puzzle_clear_draft {
fn compile_puzzle_clear_draft(&self, input: PuzzleClearDraftCompileInput) {
self.compile_puzzle_clear_draft_then(input, |_, _| {});
}
fn compile_puzzle_clear_draft_then(
&self,
input: PuzzleClearDraftCompileInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl compile_puzzle_clear_draft for super::RemoteProcedures {
fn compile_puzzle_clear_draft_then(
&self,
input: PuzzleClearDraftCompileInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearAgentSessionProcedureResult>(
"compile_puzzle_clear_draft",
CompilePuzzleClearDraftArgs { 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::puzzle_clear_agent_session_create_input_type::PuzzleClearAgentSessionCreateInput;
use super::puzzle_clear_agent_session_procedure_result_type::PuzzleClearAgentSessionProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct CreatePuzzleClearAgentSessionArgs {
pub input: PuzzleClearAgentSessionCreateInput,
}
impl __sdk::InModule for CreatePuzzleClearAgentSessionArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `create_puzzle_clear_agent_session`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait create_puzzle_clear_agent_session {
fn create_puzzle_clear_agent_session(&self, input: PuzzleClearAgentSessionCreateInput) {
self.create_puzzle_clear_agent_session_then(input, |_, _| {});
}
fn create_puzzle_clear_agent_session_then(
&self,
input: PuzzleClearAgentSessionCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl create_puzzle_clear_agent_session for super::RemoteProcedures {
fn create_puzzle_clear_agent_session_then(
&self,
input: PuzzleClearAgentSessionCreateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearAgentSessionProcedureResult>(
"create_puzzle_clear_agent_session",
CreatePuzzleClearAgentSessionArgs { 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_work_delete_input_type::BarkBattleWorkDeleteInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct DeleteBarkBattleWorkArgs {
pub input: BarkBattleWorkDeleteInput,
}
impl __sdk::InModule for DeleteBarkBattleWorkArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `delete_bark_battle_work`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait delete_bark_battle_work {
fn delete_bark_battle_work(&self, input: BarkBattleWorkDeleteInput) {
self.delete_bark_battle_work_then(input, |_, _| {});
}
fn delete_bark_battle_work_then(
&self,
input: BarkBattleWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BarkBattleProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl delete_bark_battle_work for super::RemoteProcedures {
fn delete_bark_battle_work_then(
&self,
input: BarkBattleWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<BarkBattleProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, BarkBattleProcedureResult>(
"delete_bark_battle_work",
DeleteBarkBattleWorkArgs { 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::jump_hop_work_delete_input_type::JumpHopWorkDeleteInput;
use super::jump_hop_works_procedure_result_type::JumpHopWorksProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct DeleteJumpHopWorkArgs {
pub input: JumpHopWorkDeleteInput,
}
impl __sdk::InModule for DeleteJumpHopWorkArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `delete_jump_hop_work`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait delete_jump_hop_work {
fn delete_jump_hop_work(&self, input: JumpHopWorkDeleteInput) {
self.delete_jump_hop_work_then(input, |_, _| {});
}
fn delete_jump_hop_work_then(
&self,
input: JumpHopWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<JumpHopWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl delete_jump_hop_work for super::RemoteProcedures {
fn delete_jump_hop_work_then(
&self,
input: JumpHopWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<JumpHopWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, JumpHopWorksProcedureResult>(
"delete_jump_hop_work",
DeleteJumpHopWorkArgs { 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::wooden_fish_work_delete_input_type::WoodenFishWorkDeleteInput;
use super::wooden_fish_works_procedure_result_type::WoodenFishWorksProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct DeleteWoodenFishWorkArgs {
pub input: WoodenFishWorkDeleteInput,
}
impl __sdk::InModule for DeleteWoodenFishWorkArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `delete_wooden_fish_work`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait delete_wooden_fish_work {
fn delete_wooden_fish_work(&self, input: WoodenFishWorkDeleteInput) {
self.delete_wooden_fish_work_then(input, |_, _| {});
}
fn delete_wooden_fish_work_then(
&self,
input: WoodenFishWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<WoodenFishWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl delete_wooden_fish_work for super::RemoteProcedures {
fn delete_wooden_fish_work_then(
&self,
input: WoodenFishWorkDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<WoodenFishWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, WoodenFishWorksProcedureResult>(
"delete_wooden_fish_work",
DeleteWoodenFishWorkArgs { 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::jump_hop_leaderboard_get_input_type::JumpHopLeaderboardGetInput;
use super::jump_hop_leaderboard_procedure_result_type::JumpHopLeaderboardProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct GetJumpHopLeaderboardArgs {
pub input: JumpHopLeaderboardGetInput,
}
impl __sdk::InModule for GetJumpHopLeaderboardArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `get_jump_hop_leaderboard`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait get_jump_hop_leaderboard {
fn get_jump_hop_leaderboard(&self, input: JumpHopLeaderboardGetInput) {
self.get_jump_hop_leaderboard_then(input, |_, _| {});
}
fn get_jump_hop_leaderboard_then(
&self,
input: JumpHopLeaderboardGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<JumpHopLeaderboardProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl get_jump_hop_leaderboard for super::RemoteProcedures {
fn get_jump_hop_leaderboard_then(
&self,
input: JumpHopLeaderboardGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<JumpHopLeaderboardProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, JumpHopLeaderboardProcedureResult>(
"get_jump_hop_leaderboard",
GetJumpHopLeaderboardArgs { 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::puzzle_clear_agent_session_get_input_type::PuzzleClearAgentSessionGetInput;
use super::puzzle_clear_agent_session_procedure_result_type::PuzzleClearAgentSessionProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct GetPuzzleClearAgentSessionArgs {
pub input: PuzzleClearAgentSessionGetInput,
}
impl __sdk::InModule for GetPuzzleClearAgentSessionArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `get_puzzle_clear_agent_session`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait get_puzzle_clear_agent_session {
fn get_puzzle_clear_agent_session(&self, input: PuzzleClearAgentSessionGetInput) {
self.get_puzzle_clear_agent_session_then(input, |_, _| {});
}
fn get_puzzle_clear_agent_session_then(
&self,
input: PuzzleClearAgentSessionGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl get_puzzle_clear_agent_session for super::RemoteProcedures {
fn get_puzzle_clear_agent_session_then(
&self,
input: PuzzleClearAgentSessionGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearAgentSessionProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearAgentSessionProcedureResult>(
"get_puzzle_clear_agent_session",
GetPuzzleClearAgentSessionArgs { 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::puzzle_clear_run_get_input_type::PuzzleClearRunGetInput;
use super::puzzle_clear_run_procedure_result_type::PuzzleClearRunProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct GetPuzzleClearRuntimeRunArgs {
pub input: PuzzleClearRunGetInput,
}
impl __sdk::InModule for GetPuzzleClearRuntimeRunArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `get_puzzle_clear_runtime_run`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait get_puzzle_clear_runtime_run {
fn get_puzzle_clear_runtime_run(&self, input: PuzzleClearRunGetInput) {
self.get_puzzle_clear_runtime_run_then(input, |_, _| {});
}
fn get_puzzle_clear_runtime_run_then(
&self,
input: PuzzleClearRunGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl get_puzzle_clear_runtime_run for super::RemoteProcedures {
fn get_puzzle_clear_runtime_run_then(
&self,
input: PuzzleClearRunGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearRunProcedureResult>(
"get_puzzle_clear_runtime_run",
GetPuzzleClearRuntimeRunArgs { 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::puzzle_clear_work_get_input_type::PuzzleClearWorkGetInput;
use super::puzzle_clear_work_procedure_result_type::PuzzleClearWorkProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct GetPuzzleClearWorkProfileArgs {
pub input: PuzzleClearWorkGetInput,
}
impl __sdk::InModule for GetPuzzleClearWorkProfileArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `get_puzzle_clear_work_profile`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait get_puzzle_clear_work_profile {
fn get_puzzle_clear_work_profile(&self, input: PuzzleClearWorkGetInput) {
self.get_puzzle_clear_work_profile_then(input, |_, _| {});
}
fn get_puzzle_clear_work_profile_then(
&self,
input: PuzzleClearWorkGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearWorkProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl get_puzzle_clear_work_profile for super::RemoteProcedures {
fn get_puzzle_clear_work_profile_then(
&self,
input: PuzzleClearWorkGetInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearWorkProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearWorkProcedureResult>(
"get_puzzle_clear_work_profile",
GetPuzzleClearWorkProfileArgs { input },
__callback,
);
}
}

View File

@@ -25,6 +25,7 @@ pub struct JumpHopDraftCompileInput {
pub tile_atlas_asset_json: Option<String>,
pub tile_assets_json: Option<String>,
pub cover_composite: Option<String>,
pub back_button_asset_json: Option<String>,
pub generation_status: Option<String>,
pub compiled_at_micros: i64,
}

View File

@@ -14,6 +14,7 @@ pub struct JumpHopDraftSnapshot {
pub template_id: String,
pub template_name: String,
pub profile_id: Option<String>,
pub theme_text: String,
pub work_title: String,
pub work_description: String,
pub theme_tags: Vec<String>,
@@ -27,6 +28,7 @@ pub struct JumpHopDraftSnapshot {
pub tile_assets: Vec<JumpHopTileAssetSnapshot>,
pub path: Option<JumpHopPath>,
pub cover_composite: Option<String>,
pub back_button_asset: Option<JumpHopCharacterAssetSnapshot>,
pub generation_status: String,
}

View File

@@ -12,6 +12,7 @@ pub struct JumpHopGalleryCardViewRow {
pub profile_id: String,
pub owner_user_id: String,
pub author_display_name: String,
pub theme_text: String,
pub work_title: String,
pub work_description: String,
pub theme_tags: Vec<String>,
@@ -38,6 +39,7 @@ pub struct JumpHopGalleryCardViewRowCols {
pub profile_id: __sdk::__query_builder::Col<JumpHopGalleryCardViewRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<JumpHopGalleryCardViewRow, String>,
pub author_display_name: __sdk::__query_builder::Col<JumpHopGalleryCardViewRow, String>,
pub theme_text: __sdk::__query_builder::Col<JumpHopGalleryCardViewRow, String>,
pub work_title: __sdk::__query_builder::Col<JumpHopGalleryCardViewRow, String>,
pub work_description: __sdk::__query_builder::Col<JumpHopGalleryCardViewRow, String>,
pub theme_tags: __sdk::__query_builder::Col<JumpHopGalleryCardViewRow, Vec<String>>,
@@ -63,6 +65,7 @@ impl __sdk::__query_builder::HasCols for JumpHopGalleryCardViewRow {
table_name,
"author_display_name",
),
theme_text: __sdk::__query_builder::Col::new(table_name, "theme_text"),
work_title: __sdk::__query_builder::Col::new(table_name, "work_title"),
work_description: __sdk::__query_builder::Col::new(table_name, "work_description"),
theme_tags: __sdk::__query_builder::Col::new(table_name, "theme_tags"),

View File

@@ -16,6 +16,7 @@ pub struct JumpHopGalleryViewRow {
pub owner_user_id: String,
pub source_session_id: String,
pub author_display_name: String,
pub theme_text: String,
pub work_title: String,
pub work_description: String,
pub theme_tags: Vec<String>,
@@ -51,6 +52,7 @@ pub struct JumpHopGalleryViewRowCols {
pub owner_user_id: __sdk::__query_builder::Col<JumpHopGalleryViewRow, String>,
pub source_session_id: __sdk::__query_builder::Col<JumpHopGalleryViewRow, String>,
pub author_display_name: __sdk::__query_builder::Col<JumpHopGalleryViewRow, String>,
pub theme_text: __sdk::__query_builder::Col<JumpHopGalleryViewRow, String>,
pub work_title: __sdk::__query_builder::Col<JumpHopGalleryViewRow, String>,
pub work_description: __sdk::__query_builder::Col<JumpHopGalleryViewRow, String>,
pub theme_tags: __sdk::__query_builder::Col<JumpHopGalleryViewRow, Vec<String>>,
@@ -88,6 +90,7 @@ impl __sdk::__query_builder::HasCols for JumpHopGalleryViewRow {
table_name,
"author_display_name",
),
theme_text: __sdk::__query_builder::Col::new(table_name, "theme_text"),
work_title: __sdk::__query_builder::Col::new(table_name, "work_title"),
work_description: __sdk::__query_builder::Col::new(table_name, "work_description"),
theme_tags: __sdk::__query_builder::Col::new(table_name, "theme_tags"),

View File

@@ -0,0 +1,72 @@
// 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 JumpHopLeaderboardEntryRow {
pub entry_id: String,
pub profile_id: String,
pub player_id: String,
pub successful_jump_count: u32,
pub duration_ms: u64,
pub run_id: String,
pub updated_at: __sdk::Timestamp,
}
impl __sdk::InModule for JumpHopLeaderboardEntryRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `JumpHopLeaderboardEntryRow`.
///
/// Provides typed access to columns for query building.
pub struct JumpHopLeaderboardEntryRowCols {
pub entry_id: __sdk::__query_builder::Col<JumpHopLeaderboardEntryRow, String>,
pub profile_id: __sdk::__query_builder::Col<JumpHopLeaderboardEntryRow, String>,
pub player_id: __sdk::__query_builder::Col<JumpHopLeaderboardEntryRow, String>,
pub successful_jump_count: __sdk::__query_builder::Col<JumpHopLeaderboardEntryRow, u32>,
pub duration_ms: __sdk::__query_builder::Col<JumpHopLeaderboardEntryRow, u64>,
pub run_id: __sdk::__query_builder::Col<JumpHopLeaderboardEntryRow, String>,
pub updated_at: __sdk::__query_builder::Col<JumpHopLeaderboardEntryRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for JumpHopLeaderboardEntryRow {
type Cols = JumpHopLeaderboardEntryRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
JumpHopLeaderboardEntryRowCols {
entry_id: __sdk::__query_builder::Col::new(table_name, "entry_id"),
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
player_id: __sdk::__query_builder::Col::new(table_name, "player_id"),
successful_jump_count: __sdk::__query_builder::Col::new(
table_name,
"successful_jump_count",
),
duration_ms: __sdk::__query_builder::Col::new(table_name, "duration_ms"),
run_id: __sdk::__query_builder::Col::new(table_name, "run_id"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
}
}
}
/// Indexed column accessor struct for the table `JumpHopLeaderboardEntryRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct JumpHopLeaderboardEntryRowIxCols {
pub entry_id: __sdk::__query_builder::IxCol<JumpHopLeaderboardEntryRow, String>,
pub profile_id: __sdk::__query_builder::IxCol<JumpHopLeaderboardEntryRow, String>,
}
impl __sdk::__query_builder::HasIxCols for JumpHopLeaderboardEntryRow {
type IxCols = JumpHopLeaderboardEntryRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
JumpHopLeaderboardEntryRowIxCols {
entry_id: __sdk::__query_builder::IxCol::new(table_name, "entry_id"),
profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for JumpHopLeaderboardEntryRow {}

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 JumpHopLeaderboardEntrySnapshot {
pub rank: u32,
pub player_id: String,
pub successful_jump_count: u32,
pub duration_ms: u64,
pub updated_at_micros: i64,
}
impl __sdk::InModule for JumpHopLeaderboardEntrySnapshot {
type Module = super::RemoteModule;
}

View File

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

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 JumpHopLeaderboardGetInput {
pub profile_id: String,
pub viewer_player_id: String,
pub limit: u32,
}
impl __sdk::InModule for JumpHopLeaderboardGetInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,21 @@
// 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::jump_hop_leaderboard_entry_snapshot_type::JumpHopLeaderboardEntrySnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct JumpHopLeaderboardProcedureResult {
pub ok: bool,
pub profile_id: String,
pub items: Vec<JumpHopLeaderboardEntrySnapshot>,
pub viewer_best: Option<JumpHopLeaderboardEntrySnapshot>,
pub error_message: Option<String>,
}
impl __sdk::InModule for JumpHopLeaderboardProcedureResult {
type Module = super::RemoteModule;
}

View File

@@ -9,7 +9,9 @@ use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
pub struct JumpHopRunJumpInput {
pub run_id: String,
pub owner_user_id: String,
pub charge_ms: u32,
pub drag_distance: f32,
pub drag_vector_x: Option<f32>,
pub drag_vector_y: Option<f32>,
pub client_event_id: String,
pub jumped_at_ms: i64,
}

View File

@@ -10,6 +10,7 @@ pub struct JumpHopRunStartInput {
pub run_id: String,
pub owner_user_id: String,
pub profile_id: String,
pub runtime_mode: String,
pub client_event_id: String,
pub started_at_ms: i64,
}

View File

@@ -19,6 +19,7 @@ pub struct JumpHopRuntimeRunRow {
pub snapshot_json: String,
pub created_at: __sdk::Timestamp,
pub updated_at: __sdk::Timestamp,
pub runtime_mode: Option<String>,
}
impl __sdk::InModule for JumpHopRuntimeRunRow {
@@ -41,6 +42,7 @@ pub struct JumpHopRuntimeRunRowCols {
pub snapshot_json: __sdk::__query_builder::Col<JumpHopRuntimeRunRow, String>,
pub created_at: __sdk::__query_builder::Col<JumpHopRuntimeRunRow, __sdk::Timestamp>,
pub updated_at: __sdk::__query_builder::Col<JumpHopRuntimeRunRow, __sdk::Timestamp>,
pub runtime_mode: __sdk::__query_builder::Col<JumpHopRuntimeRunRow, Option<String>>,
}
impl __sdk::__query_builder::HasCols for JumpHopRuntimeRunRow {
@@ -62,6 +64,7 @@ impl __sdk::__query_builder::HasCols for JumpHopRuntimeRunRow {
snapshot_json: __sdk::__query_builder::Col::new(table_name, "snapshot_json"),
created_at: __sdk::__query_builder::Col::new(table_name, "created_at"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
runtime_mode: __sdk::__query_builder::Col::new(table_name, "runtime_mode"),
}
}
}

View File

@@ -8,10 +8,13 @@ use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
#[sats(crate = __lib)]
pub struct JumpHopTileAssetSnapshot {
pub tile_type: String,
pub tile_id: Option<String>,
pub image_src: String,
pub image_object_key: String,
pub asset_object_id: String,
pub source_atlas_cell: String,
pub atlas_row: Option<u32>,
pub atlas_col: Option<u32>,
pub visual_width: u32,
pub visual_height: u32,
pub top_surface_radius: f32,

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 JumpHopWorkDeleteInput {
pub profile_id: String,
pub owner_user_id: String,
}
impl __sdk::InModule for JumpHopWorkDeleteInput {
type Module = super::RemoteModule;
}

View File

@@ -32,6 +32,8 @@ pub struct JumpHopWorkProfileRow {
pub updated_at: __sdk::Timestamp,
pub published_at: Option<__sdk::Timestamp>,
pub visible: bool,
pub theme_text: Option<String>,
pub back_button_asset_json: Option<String>,
}
impl __sdk::InModule for JumpHopWorkProfileRow {
@@ -67,6 +69,8 @@ pub struct JumpHopWorkProfileRowCols {
pub updated_at: __sdk::__query_builder::Col<JumpHopWorkProfileRow, __sdk::Timestamp>,
pub published_at: __sdk::__query_builder::Col<JumpHopWorkProfileRow, Option<__sdk::Timestamp>>,
pub visible: __sdk::__query_builder::Col<JumpHopWorkProfileRow, bool>,
pub theme_text: __sdk::__query_builder::Col<JumpHopWorkProfileRow, Option<String>>,
pub back_button_asset_json: __sdk::__query_builder::Col<JumpHopWorkProfileRow, Option<String>>,
}
impl __sdk::__query_builder::HasCols for JumpHopWorkProfileRow {
@@ -107,6 +111,11 @@ impl __sdk::__query_builder::HasCols for JumpHopWorkProfileRow {
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
published_at: __sdk::__query_builder::Col::new(table_name, "published_at"),
visible: __sdk::__query_builder::Col::new(table_name, "visible"),
theme_text: __sdk::__query_builder::Col::new(table_name, "theme_text"),
back_button_asset_json: __sdk::__query_builder::Col::new(
table_name,
"back_button_asset_json",
),
}
}
}

View File

@@ -16,6 +16,7 @@ pub struct JumpHopWorkSnapshot {
pub owner_user_id: String,
pub source_session_id: String,
pub author_display_name: String,
pub theme_text: String,
pub work_title: String,
pub work_description: String,
pub theme_tags: Vec<String>,
@@ -30,6 +31,7 @@ pub struct JumpHopWorkSnapshot {
pub path: JumpHopPath,
pub cover_image_src: String,
pub cover_composite: Option<String>,
pub back_button_asset: Option<JumpHopCharacterAssetSnapshot>,
pub publication_status: String,
pub publish_ready: bool,
pub play_count: u32,

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::puzzle_clear_works_list_input_type::PuzzleClearWorksListInput;
use super::puzzle_clear_works_procedure_result_type::PuzzleClearWorksProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct ListPuzzleClearWorksArgs {
pub input: PuzzleClearWorksListInput,
}
impl __sdk::InModule for ListPuzzleClearWorksArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `list_puzzle_clear_works`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait list_puzzle_clear_works {
fn list_puzzle_clear_works(&self, input: PuzzleClearWorksListInput) {
self.list_puzzle_clear_works_then(input, |_, _| {});
}
fn list_puzzle_clear_works_then(
&self,
input: PuzzleClearWorksListInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl list_puzzle_clear_works for super::RemoteProcedures {
fn list_puzzle_clear_works_then(
&self,
input: PuzzleClearWorksListInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearWorksProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearWorksProcedureResult>(
"list_puzzle_clear_works",
ListPuzzleClearWorksArgs { 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::puzzle_clear_run_procedure_result_type::PuzzleClearRunProcedureResult;
use super::puzzle_clear_run_time_up_input_type::PuzzleClearRunTimeUpInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct MarkPuzzleClearLevelTimeUpArgs {
pub input: PuzzleClearRunTimeUpInput,
}
impl __sdk::InModule for MarkPuzzleClearLevelTimeUpArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `mark_puzzle_clear_level_time_up`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait mark_puzzle_clear_level_time_up {
fn mark_puzzle_clear_level_time_up(&self, input: PuzzleClearRunTimeUpInput) {
self.mark_puzzle_clear_level_time_up_then(input, |_, _| {});
}
fn mark_puzzle_clear_level_time_up_then(
&self,
input: PuzzleClearRunTimeUpInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl mark_puzzle_clear_level_time_up for super::RemoteProcedures {
fn mark_puzzle_clear_level_time_up_then(
&self,
input: PuzzleClearRunTimeUpInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearRunProcedureResult>(
"mark_puzzle_clear_level_time_up",
MarkPuzzleClearLevelTimeUpArgs { 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::puzzle_clear_work_procedure_result_type::PuzzleClearWorkProcedureResult;
use super::puzzle_clear_work_publish_input_type::PuzzleClearWorkPublishInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct PublishPuzzleClearWorkArgs {
pub input: PuzzleClearWorkPublishInput,
}
impl __sdk::InModule for PublishPuzzleClearWorkArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `publish_puzzle_clear_work`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait publish_puzzle_clear_work {
fn publish_puzzle_clear_work(&self, input: PuzzleClearWorkPublishInput) {
self.publish_puzzle_clear_work_then(input, |_, _| {});
}
fn publish_puzzle_clear_work_then(
&self,
input: PuzzleClearWorkPublishInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearWorkProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl publish_puzzle_clear_work for super::RemoteProcedures {
fn publish_puzzle_clear_work_then(
&self,
input: PuzzleClearWorkPublishInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearWorkProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearWorkProcedureResult>(
"publish_puzzle_clear_work",
PublishPuzzleClearWorkArgs { input },
__callback,
);
}
}

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 PuzzleClearAgentSessionCreateInput {
pub session_id: String,
pub owner_user_id: String,
pub work_title: String,
pub work_description: String,
pub theme_prompt: String,
pub generate_board_background: bool,
pub board_background_asset_json: Option<String>,
pub board_background_prompt: String,
pub created_at_micros: i64,
}
impl __sdk::InModule for PuzzleClearAgentSessionCreateInput {
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 PuzzleClearAgentSessionGetInput {
pub session_id: String,
pub owner_user_id: String,
}
impl __sdk::InModule for PuzzleClearAgentSessionGetInput {
type Module = super::RemoteModule;
}

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};
use super::puzzle_clear_agent_session_snapshot_type::PuzzleClearAgentSessionSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearAgentSessionProcedureResult {
pub ok: bool,
pub session: Option<PuzzleClearAgentSessionSnapshot>,
pub error_message: Option<String>,
}
impl __sdk::InModule for PuzzleClearAgentSessionProcedureResult {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,72 @@
// 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 PuzzleClearAgentSessionRow {
pub session_id: String,
pub owner_user_id: String,
pub status: String,
pub draft_json: String,
pub published_profile_id: String,
pub created_at: __sdk::Timestamp,
pub updated_at: __sdk::Timestamp,
}
impl __sdk::InModule for PuzzleClearAgentSessionRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `PuzzleClearAgentSessionRow`.
///
/// Provides typed access to columns for query building.
pub struct PuzzleClearAgentSessionRowCols {
pub session_id: __sdk::__query_builder::Col<PuzzleClearAgentSessionRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<PuzzleClearAgentSessionRow, String>,
pub status: __sdk::__query_builder::Col<PuzzleClearAgentSessionRow, String>,
pub draft_json: __sdk::__query_builder::Col<PuzzleClearAgentSessionRow, String>,
pub published_profile_id: __sdk::__query_builder::Col<PuzzleClearAgentSessionRow, String>,
pub created_at: __sdk::__query_builder::Col<PuzzleClearAgentSessionRow, __sdk::Timestamp>,
pub updated_at: __sdk::__query_builder::Col<PuzzleClearAgentSessionRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for PuzzleClearAgentSessionRow {
type Cols = PuzzleClearAgentSessionRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
PuzzleClearAgentSessionRowCols {
session_id: __sdk::__query_builder::Col::new(table_name, "session_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
status: __sdk::__query_builder::Col::new(table_name, "status"),
draft_json: __sdk::__query_builder::Col::new(table_name, "draft_json"),
published_profile_id: __sdk::__query_builder::Col::new(
table_name,
"published_profile_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 `PuzzleClearAgentSessionRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct PuzzleClearAgentSessionRowIxCols {
pub owner_user_id: __sdk::__query_builder::IxCol<PuzzleClearAgentSessionRow, String>,
pub session_id: __sdk::__query_builder::IxCol<PuzzleClearAgentSessionRow, String>,
}
impl __sdk::__query_builder::HasIxCols for PuzzleClearAgentSessionRow {
type IxCols = PuzzleClearAgentSessionRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
PuzzleClearAgentSessionRowIxCols {
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for PuzzleClearAgentSessionRow {}

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};
use super::puzzle_clear_draft_snapshot_type::PuzzleClearDraftSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearAgentSessionSnapshot {
pub session_id: String,
pub owner_user_id: String,
pub status: String,
pub draft: Option<PuzzleClearDraftSnapshot>,
pub published_profile_id: Option<String>,
pub created_at_micros: i64,
pub updated_at_micros: i64,
}
impl __sdk::InModule for PuzzleClearAgentSessionSnapshot {
type Module = super::RemoteModule;
}

View File

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

View File

@@ -0,0 +1,20 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
use super::puzzle_clear_card_asset_snapshot_type::PuzzleClearCardAssetSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearBoardCellSnapshot {
pub row: u32,
pub col: u32,
pub card: Option<PuzzleClearCardAssetSnapshot>,
pub locked_group_id: Option<String>,
}
impl __sdk::InModule for PuzzleClearBoardCellSnapshot {
type Module = super::RemoteModule;
}

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};
use super::puzzle_clear_board_cell_snapshot_type::PuzzleClearBoardCellSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearBoardSnapshot {
pub rows: u32,
pub cols: u32,
pub cells: Vec<PuzzleClearBoardCellSnapshot>,
}
impl __sdk::InModule for PuzzleClearBoardSnapshot {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,24 @@
// 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 PuzzleClearCardAssetSnapshot {
pub card_id: String,
pub group_id: String,
pub shape: String,
pub orientation: String,
pub part_x: u32,
pub part_y: u32,
pub image_src: String,
pub image_object_key: String,
pub asset_object_id: String,
pub source_atlas_cell: String,
}
impl __sdk::InModule for PuzzleClearCardAssetSnapshot {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,29 @@
// 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 PuzzleClearDraftCompileInput {
pub session_id: String,
pub owner_user_id: String,
pub profile_id: String,
pub author_display_name: String,
pub work_title: String,
pub work_description: String,
pub theme_prompt: String,
pub generate_board_background: bool,
pub board_background_asset_json: Option<String>,
pub board_background_prompt: String,
pub atlas_asset_json: Option<String>,
pub pattern_groups_json: Option<String>,
pub card_assets_json: Option<String>,
pub generation_status: Option<String>,
pub compiled_at_micros: i64,
}
impl __sdk::InModule for PuzzleClearDraftCompileInput {
type Module = super::RemoteModule;
}

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};
use super::puzzle_clear_card_asset_snapshot_type::PuzzleClearCardAssetSnapshot;
use super::puzzle_clear_image_asset_snapshot_type::PuzzleClearImageAssetSnapshot;
use super::puzzle_clear_pattern_group_snapshot_type::PuzzleClearPatternGroupSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearDraftSnapshot {
pub template_id: String,
pub template_name: String,
pub profile_id: Option<String>,
pub work_title: String,
pub work_description: String,
pub theme_prompt: String,
pub generate_board_background: bool,
pub board_background_asset: Option<PuzzleClearImageAssetSnapshot>,
pub board_background_prompt: String,
pub card_back_image_src: Option<String>,
pub atlas_asset: Option<PuzzleClearImageAssetSnapshot>,
pub pattern_groups: Vec<PuzzleClearPatternGroupSnapshot>,
pub card_assets: Vec<PuzzleClearCardAssetSnapshot>,
pub generation_status: String,
}
impl __sdk::InModule for PuzzleClearDraftSnapshot {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,71 @@
// 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 PuzzleClearEventRow {
pub event_id: String,
pub owner_user_id: String,
pub profile_id: String,
pub run_id: String,
pub event_type: String,
pub result: String,
pub occurred_at: __sdk::Timestamp,
}
impl __sdk::InModule for PuzzleClearEventRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `PuzzleClearEventRow`.
///
/// Provides typed access to columns for query building.
pub struct PuzzleClearEventRowCols {
pub event_id: __sdk::__query_builder::Col<PuzzleClearEventRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<PuzzleClearEventRow, String>,
pub profile_id: __sdk::__query_builder::Col<PuzzleClearEventRow, String>,
pub run_id: __sdk::__query_builder::Col<PuzzleClearEventRow, String>,
pub event_type: __sdk::__query_builder::Col<PuzzleClearEventRow, String>,
pub result: __sdk::__query_builder::Col<PuzzleClearEventRow, String>,
pub occurred_at: __sdk::__query_builder::Col<PuzzleClearEventRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for PuzzleClearEventRow {
type Cols = PuzzleClearEventRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
PuzzleClearEventRowCols {
event_id: __sdk::__query_builder::Col::new(table_name, "event_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
run_id: __sdk::__query_builder::Col::new(table_name, "run_id"),
event_type: __sdk::__query_builder::Col::new(table_name, "event_type"),
result: __sdk::__query_builder::Col::new(table_name, "result"),
occurred_at: __sdk::__query_builder::Col::new(table_name, "occurred_at"),
}
}
}
/// Indexed column accessor struct for the table `PuzzleClearEventRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct PuzzleClearEventRowIxCols {
pub event_id: __sdk::__query_builder::IxCol<PuzzleClearEventRow, String>,
pub profile_id: __sdk::__query_builder::IxCol<PuzzleClearEventRow, String>,
pub run_id: __sdk::__query_builder::IxCol<PuzzleClearEventRow, String>,
}
impl __sdk::__query_builder::HasIxCols for PuzzleClearEventRow {
type IxCols = PuzzleClearEventRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
PuzzleClearEventRowIxCols {
event_id: __sdk::__query_builder::IxCol::new(table_name, "event_id"),
profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"),
run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for PuzzleClearEventRow {}

View File

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

View File

@@ -0,0 +1,77 @@
// 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 PuzzleClearGalleryCardViewRow {
pub public_work_code: String,
pub work_id: String,
pub profile_id: String,
pub owner_user_id: String,
pub author_display_name: String,
pub work_title: String,
pub work_description: String,
pub theme_prompt: String,
pub cover_image_src: Option<String>,
pub publication_status: String,
pub play_count: u32,
pub updated_at_micros: i64,
pub published_at_micros: Option<i64>,
pub generation_status: String,
}
impl __sdk::InModule for PuzzleClearGalleryCardViewRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `PuzzleClearGalleryCardViewRow`.
///
/// Provides typed access to columns for query building.
pub struct PuzzleClearGalleryCardViewRowCols {
pub public_work_code: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, String>,
pub work_id: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, String>,
pub profile_id: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, String>,
pub author_display_name: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, String>,
pub work_title: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, String>,
pub work_description: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, String>,
pub theme_prompt: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, String>,
pub cover_image_src: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, Option<String>>,
pub publication_status: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, String>,
pub play_count: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, u32>,
pub updated_at_micros: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, i64>,
pub published_at_micros:
__sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, Option<i64>>,
pub generation_status: __sdk::__query_builder::Col<PuzzleClearGalleryCardViewRow, String>,
}
impl __sdk::__query_builder::HasCols for PuzzleClearGalleryCardViewRow {
type Cols = PuzzleClearGalleryCardViewRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
PuzzleClearGalleryCardViewRowCols {
public_work_code: __sdk::__query_builder::Col::new(table_name, "public_work_code"),
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
author_display_name: __sdk::__query_builder::Col::new(
table_name,
"author_display_name",
),
work_title: __sdk::__query_builder::Col::new(table_name, "work_title"),
work_description: __sdk::__query_builder::Col::new(table_name, "work_description"),
theme_prompt: __sdk::__query_builder::Col::new(table_name, "theme_prompt"),
cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"),
publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"),
play_count: __sdk::__query_builder::Col::new(table_name, "play_count"),
updated_at_micros: __sdk::__query_builder::Col::new(table_name, "updated_at_micros"),
published_at_micros: __sdk::__query_builder::Col::new(
table_name,
"published_at_micros",
),
generation_status: __sdk::__query_builder::Col::new(table_name, "generation_status"),
}
}
}

View File

@@ -0,0 +1,121 @@
// 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::puzzle_clear_gallery_card_view_row_type::PuzzleClearGalleryCardViewRow;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `puzzle_clear_gallery_card_view`.
///
/// Obtain a handle from the [`PuzzleClearGalleryCardViewTableAccess::puzzle_clear_gallery_card_view`] method on [`super::RemoteTables`],
/// like `ctx.db.puzzle_clear_gallery_card_view()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.puzzle_clear_gallery_card_view().on_insert(...)`.
pub struct PuzzleClearGalleryCardViewTableHandle<'ctx> {
imp: __sdk::TableHandle<PuzzleClearGalleryCardViewRow>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `puzzle_clear_gallery_card_view`.
///
/// Implemented for [`super::RemoteTables`].
pub trait PuzzleClearGalleryCardViewTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`PuzzleClearGalleryCardViewTableHandle`], which mediates access to the table `puzzle_clear_gallery_card_view`.
fn puzzle_clear_gallery_card_view(&self) -> PuzzleClearGalleryCardViewTableHandle<'_>;
}
impl PuzzleClearGalleryCardViewTableAccess for super::RemoteTables {
fn puzzle_clear_gallery_card_view(&self) -> PuzzleClearGalleryCardViewTableHandle<'_> {
PuzzleClearGalleryCardViewTableHandle {
imp: self
.imp
.get_table::<PuzzleClearGalleryCardViewRow>("puzzle_clear_gallery_card_view"),
ctx: std::marker::PhantomData,
}
}
}
pub struct PuzzleClearGalleryCardViewInsertCallbackId(__sdk::CallbackId);
pub struct PuzzleClearGalleryCardViewDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for PuzzleClearGalleryCardViewTableHandle<'ctx> {
type Row = PuzzleClearGalleryCardViewRow;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = PuzzleClearGalleryCardViewRow> + '_ {
self.imp.iter()
}
type InsertCallbackId = PuzzleClearGalleryCardViewInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> PuzzleClearGalleryCardViewInsertCallbackId {
PuzzleClearGalleryCardViewInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: PuzzleClearGalleryCardViewInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = PuzzleClearGalleryCardViewDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> PuzzleClearGalleryCardViewDeleteCallbackId {
PuzzleClearGalleryCardViewDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: PuzzleClearGalleryCardViewDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
#[doc(hidden)]
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
let _table = client_cache
.get_or_make_table::<PuzzleClearGalleryCardViewRow>("puzzle_clear_gallery_card_view");
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<PuzzleClearGalleryCardViewRow>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse(
"TableUpdate<PuzzleClearGalleryCardViewRow>",
"TableUpdate",
)
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `PuzzleClearGalleryCardViewRow`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait puzzle_clear_gallery_card_viewQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `PuzzleClearGalleryCardViewRow`.
fn puzzle_clear_gallery_card_view(
&self,
) -> __sdk::__query_builder::Table<PuzzleClearGalleryCardViewRow>;
}
impl puzzle_clear_gallery_card_viewQueryTableAccess for __sdk::QueryTableAccessor {
fn puzzle_clear_gallery_card_view(
&self,
) -> __sdk::__query_builder::Table<PuzzleClearGalleryCardViewRow> {
__sdk::__query_builder::Table::new("puzzle_clear_gallery_card_view")
}
}

View File

@@ -0,0 +1,124 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
use super::puzzle_clear_card_asset_snapshot_type::PuzzleClearCardAssetSnapshot;
use super::puzzle_clear_image_asset_snapshot_type::PuzzleClearImageAssetSnapshot;
use super::puzzle_clear_pattern_group_snapshot_type::PuzzleClearPatternGroupSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearGalleryViewRow {
pub work_id: String,
pub profile_id: String,
pub owner_user_id: String,
pub source_session_id: String,
pub author_display_name: String,
pub work_title: String,
pub work_description: String,
pub theme_prompt: String,
pub generate_board_background: bool,
pub board_background_asset: Option<PuzzleClearImageAssetSnapshot>,
pub board_background_prompt: String,
pub card_back_image_src: Option<String>,
pub atlas_asset: PuzzleClearImageAssetSnapshot,
pub pattern_groups: Vec<PuzzleClearPatternGroupSnapshot>,
pub card_assets: Vec<PuzzleClearCardAssetSnapshot>,
pub cover_image_src: Option<String>,
pub publication_status: String,
pub publish_ready: bool,
pub play_count: u32,
pub generation_status: String,
pub updated_at_micros: i64,
pub published_at_micros: Option<i64>,
}
impl __sdk::InModule for PuzzleClearGalleryViewRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `PuzzleClearGalleryViewRow`.
///
/// Provides typed access to columns for query building.
pub struct PuzzleClearGalleryViewRowCols {
pub work_id: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub profile_id: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub source_session_id: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub author_display_name: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub work_title: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub work_description: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub theme_prompt: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub generate_board_background: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, bool>,
pub board_background_asset: __sdk::__query_builder::Col<
PuzzleClearGalleryViewRow,
Option<PuzzleClearImageAssetSnapshot>,
>,
pub board_background_prompt: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub card_back_image_src: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, Option<String>>,
pub atlas_asset:
__sdk::__query_builder::Col<PuzzleClearGalleryViewRow, PuzzleClearImageAssetSnapshot>,
pub pattern_groups: __sdk::__query_builder::Col<
PuzzleClearGalleryViewRow,
Vec<PuzzleClearPatternGroupSnapshot>,
>,
pub card_assets:
__sdk::__query_builder::Col<PuzzleClearGalleryViewRow, Vec<PuzzleClearCardAssetSnapshot>>,
pub cover_image_src: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, Option<String>>,
pub publication_status: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub publish_ready: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, bool>,
pub play_count: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, u32>,
pub generation_status: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, String>,
pub updated_at_micros: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, i64>,
pub published_at_micros: __sdk::__query_builder::Col<PuzzleClearGalleryViewRow, Option<i64>>,
}
impl __sdk::__query_builder::HasCols for PuzzleClearGalleryViewRow {
type Cols = PuzzleClearGalleryViewRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
PuzzleClearGalleryViewRowCols {
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
source_session_id: __sdk::__query_builder::Col::new(table_name, "source_session_id"),
author_display_name: __sdk::__query_builder::Col::new(
table_name,
"author_display_name",
),
work_title: __sdk::__query_builder::Col::new(table_name, "work_title"),
work_description: __sdk::__query_builder::Col::new(table_name, "work_description"),
theme_prompt: __sdk::__query_builder::Col::new(table_name, "theme_prompt"),
generate_board_background: __sdk::__query_builder::Col::new(
table_name,
"generate_board_background",
),
board_background_asset: __sdk::__query_builder::Col::new(
table_name,
"board_background_asset",
),
board_background_prompt: __sdk::__query_builder::Col::new(
table_name,
"board_background_prompt",
),
card_back_image_src: __sdk::__query_builder::Col::new(
table_name,
"card_back_image_src",
),
atlas_asset: __sdk::__query_builder::Col::new(table_name, "atlas_asset"),
pattern_groups: __sdk::__query_builder::Col::new(table_name, "pattern_groups"),
card_assets: __sdk::__query_builder::Col::new(table_name, "card_assets"),
cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"),
publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"),
publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"),
play_count: __sdk::__query_builder::Col::new(table_name, "play_count"),
generation_status: __sdk::__query_builder::Col::new(table_name, "generation_status"),
updated_at_micros: __sdk::__query_builder::Col::new(table_name, "updated_at_micros"),
published_at_micros: __sdk::__query_builder::Col::new(
table_name,
"published_at_micros",
),
}
}
}

View File

@@ -0,0 +1,120 @@
// 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::puzzle_clear_card_asset_snapshot_type::PuzzleClearCardAssetSnapshot;
use super::puzzle_clear_gallery_view_row_type::PuzzleClearGalleryViewRow;
use super::puzzle_clear_image_asset_snapshot_type::PuzzleClearImageAssetSnapshot;
use super::puzzle_clear_pattern_group_snapshot_type::PuzzleClearPatternGroupSnapshot;
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
/// Table handle for the table `puzzle_clear_gallery_view`.
///
/// Obtain a handle from the [`PuzzleClearGalleryViewTableAccess::puzzle_clear_gallery_view`] method on [`super::RemoteTables`],
/// like `ctx.db.puzzle_clear_gallery_view()`.
///
/// Users are encouraged not to explicitly reference this type,
/// but to directly chain method calls,
/// like `ctx.db.puzzle_clear_gallery_view().on_insert(...)`.
pub struct PuzzleClearGalleryViewTableHandle<'ctx> {
imp: __sdk::TableHandle<PuzzleClearGalleryViewRow>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the table `puzzle_clear_gallery_view`.
///
/// Implemented for [`super::RemoteTables`].
pub trait PuzzleClearGalleryViewTableAccess {
#[allow(non_snake_case)]
/// Obtain a [`PuzzleClearGalleryViewTableHandle`], which mediates access to the table `puzzle_clear_gallery_view`.
fn puzzle_clear_gallery_view(&self) -> PuzzleClearGalleryViewTableHandle<'_>;
}
impl PuzzleClearGalleryViewTableAccess for super::RemoteTables {
fn puzzle_clear_gallery_view(&self) -> PuzzleClearGalleryViewTableHandle<'_> {
PuzzleClearGalleryViewTableHandle {
imp: self
.imp
.get_table::<PuzzleClearGalleryViewRow>("puzzle_clear_gallery_view"),
ctx: std::marker::PhantomData,
}
}
}
pub struct PuzzleClearGalleryViewInsertCallbackId(__sdk::CallbackId);
pub struct PuzzleClearGalleryViewDeleteCallbackId(__sdk::CallbackId);
impl<'ctx> __sdk::Table for PuzzleClearGalleryViewTableHandle<'ctx> {
type Row = PuzzleClearGalleryViewRow;
type EventContext = super::EventContext;
fn count(&self) -> u64 {
self.imp.count()
}
fn iter(&self) -> impl Iterator<Item = PuzzleClearGalleryViewRow> + '_ {
self.imp.iter()
}
type InsertCallbackId = PuzzleClearGalleryViewInsertCallbackId;
fn on_insert(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> PuzzleClearGalleryViewInsertCallbackId {
PuzzleClearGalleryViewInsertCallbackId(self.imp.on_insert(Box::new(callback)))
}
fn remove_on_insert(&self, callback: PuzzleClearGalleryViewInsertCallbackId) {
self.imp.remove_on_insert(callback.0)
}
type DeleteCallbackId = PuzzleClearGalleryViewDeleteCallbackId;
fn on_delete(
&self,
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
) -> PuzzleClearGalleryViewDeleteCallbackId {
PuzzleClearGalleryViewDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
}
fn remove_on_delete(&self, callback: PuzzleClearGalleryViewDeleteCallbackId) {
self.imp.remove_on_delete(callback.0)
}
}
#[doc(hidden)]
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
let _table =
client_cache.get_or_make_table::<PuzzleClearGalleryViewRow>("puzzle_clear_gallery_view");
}
#[doc(hidden)]
pub(super) fn parse_table_update(
raw_updates: __ws::v2::TableUpdate,
) -> __sdk::Result<__sdk::TableUpdate<PuzzleClearGalleryViewRow>> {
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
__sdk::InternalError::failed_parse("TableUpdate<PuzzleClearGalleryViewRow>", "TableUpdate")
.with_cause(e)
.into()
})
}
#[allow(non_camel_case_types)]
/// Extension trait for query builder access to the table `PuzzleClearGalleryViewRow`.
///
/// Implemented for [`__sdk::QueryTableAccessor`].
pub trait puzzle_clear_gallery_viewQueryTableAccess {
#[allow(non_snake_case)]
/// Get a query builder for the table `PuzzleClearGalleryViewRow`.
fn puzzle_clear_gallery_view(&self)
-> __sdk::__query_builder::Table<PuzzleClearGalleryViewRow>;
}
impl puzzle_clear_gallery_viewQueryTableAccess for __sdk::QueryTableAccessor {
fn puzzle_clear_gallery_view(
&self,
) -> __sdk::__query_builder::Table<PuzzleClearGalleryViewRow> {
__sdk::__query_builder::Table::new("puzzle_clear_gallery_view")
}
}

View File

@@ -0,0 +1,22 @@
// 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 PuzzleClearImageAssetSnapshot {
pub asset_id: String,
pub image_src: String,
pub image_object_key: String,
pub asset_object_id: String,
pub generation_provider: String,
pub prompt: String,
pub width: u32,
pub height: u32,
}
impl __sdk::InModule for PuzzleClearImageAssetSnapshot {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,22 @@
// 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 PuzzleClearPatternGroupSnapshot {
pub group_id: String,
pub shape: String,
pub width: u32,
pub height: u32,
pub atlas_x: u32,
pub atlas_y: u32,
pub atlas_width: u32,
pub atlas_height: u32,
}
impl __sdk::InModule for PuzzleClearPatternGroupSnapshot {
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 PuzzleClearRunGetInput {
pub run_id: String,
pub owner_user_id: String,
}
impl __sdk::InModule for PuzzleClearRunGetInput {
type Module = super::RemoteModule;
}

View File

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

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};
use super::puzzle_clear_runtime_snapshot_type::PuzzleClearRuntimeSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearRunProcedureResult {
pub ok: bool,
pub run: Option<PuzzleClearRuntimeSnapshot>,
pub error_message: Option<String>,
}
impl __sdk::InModule for PuzzleClearRunProcedureResult {
type Module = super::RemoteModule;
}

View File

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

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 PuzzleClearRunStartInput {
pub run_id: String,
pub owner_user_id: String,
pub profile_id: String,
pub client_event_id: String,
pub started_at_ms: i64,
}
impl __sdk::InModule for PuzzleClearRunStartInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,22 @@
// 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 PuzzleClearRunSwapInput {
pub run_id: String,
pub owner_user_id: String,
pub from_row: u32,
pub from_col: u32,
pub to_row: u32,
pub to_col: u32,
pub client_action_id: String,
pub swapped_at_ms: i64,
}
impl __sdk::InModule for PuzzleClearRunSwapInput {
type Module = super::RemoteModule;
}

View File

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

View File

@@ -0,0 +1,83 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearRuntimeRunRow {
pub run_id: String,
pub owner_user_id: String,
pub profile_id: String,
pub status: String,
pub level_index: u32,
pub clears_done: u32,
pub snapshot_json: String,
pub started_at_ms: i64,
pub finished_at_ms: i64,
pub created_at: __sdk::Timestamp,
pub updated_at: __sdk::Timestamp,
}
impl __sdk::InModule for PuzzleClearRuntimeRunRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `PuzzleClearRuntimeRunRow`.
///
/// Provides typed access to columns for query building.
pub struct PuzzleClearRuntimeRunRowCols {
pub run_id: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, String>,
pub profile_id: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, String>,
pub status: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, String>,
pub level_index: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, u32>,
pub clears_done: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, u32>,
pub snapshot_json: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, String>,
pub started_at_ms: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, i64>,
pub finished_at_ms: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, i64>,
pub created_at: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, __sdk::Timestamp>,
pub updated_at: __sdk::__query_builder::Col<PuzzleClearRuntimeRunRow, __sdk::Timestamp>,
}
impl __sdk::__query_builder::HasCols for PuzzleClearRuntimeRunRow {
type Cols = PuzzleClearRuntimeRunRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
PuzzleClearRuntimeRunRowCols {
run_id: __sdk::__query_builder::Col::new(table_name, "run_id"),
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
status: __sdk::__query_builder::Col::new(table_name, "status"),
level_index: __sdk::__query_builder::Col::new(table_name, "level_index"),
clears_done: __sdk::__query_builder::Col::new(table_name, "clears_done"),
snapshot_json: __sdk::__query_builder::Col::new(table_name, "snapshot_json"),
started_at_ms: __sdk::__query_builder::Col::new(table_name, "started_at_ms"),
finished_at_ms: __sdk::__query_builder::Col::new(table_name, "finished_at_ms"),
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 `PuzzleClearRuntimeRunRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct PuzzleClearRuntimeRunRowIxCols {
pub owner_user_id: __sdk::__query_builder::IxCol<PuzzleClearRuntimeRunRow, String>,
pub profile_id: __sdk::__query_builder::IxCol<PuzzleClearRuntimeRunRow, String>,
pub run_id: __sdk::__query_builder::IxCol<PuzzleClearRuntimeRunRow, String>,
}
impl __sdk::__query_builder::HasIxCols for PuzzleClearRuntimeRunRow {
type IxCols = PuzzleClearRuntimeRunRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
PuzzleClearRuntimeRunRowIxCols {
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"),
run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for PuzzleClearRuntimeRunRow {}

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

View File

@@ -0,0 +1,30 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
use super::puzzle_clear_board_snapshot_type::PuzzleClearBoardSnapshot;
use super::puzzle_clear_card_asset_snapshot_type::PuzzleClearCardAssetSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearRuntimeSnapshot {
pub run_id: String,
pub profile_id: String,
pub owner_user_id: String,
pub status: String,
pub level_index: u32,
pub clears_done: u32,
pub target_clears: u32,
pub level_duration_seconds: u32,
pub level_started_at_ms: u64,
pub board: PuzzleClearBoardSnapshot,
pub ready_columns: Vec<Vec<PuzzleClearCardAssetSnapshot>>,
pub started_at_ms: u64,
pub finished_at_ms: Option<u64>,
}
impl __sdk::InModule for PuzzleClearRuntimeSnapshot {
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 PuzzleClearWorkGetInput {
pub profile_id: String,
pub owner_user_id: String,
}
impl __sdk::InModule for PuzzleClearWorkGetInput {
type Module = super::RemoteModule;
}

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};
use super::puzzle_clear_work_snapshot_type::PuzzleClearWorkSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearWorkProcedureResult {
pub ok: bool,
pub work: Option<PuzzleClearWorkSnapshot>,
pub error_message: Option<String>,
}
impl __sdk::InModule for PuzzleClearWorkProcedureResult {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,139 @@
// 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 PuzzleClearWorkProfileRow {
pub profile_id: String,
pub work_id: String,
pub owner_user_id: String,
pub source_session_id: String,
pub author_display_name: String,
pub work_title: String,
pub work_description: String,
pub theme_prompt: String,
pub generate_board_background: bool,
pub board_background_asset_json: String,
pub board_background_prompt: Option<String>,
pub card_back_image_src: String,
pub atlas_asset_json: String,
pub pattern_groups_json: String,
pub card_assets_json: String,
pub cover_image_src: String,
pub generation_status: String,
pub publication_status: String,
pub play_count: u32,
pub updated_at: __sdk::Timestamp,
pub published_at: Option<__sdk::Timestamp>,
pub visible: bool,
}
impl __sdk::InModule for PuzzleClearWorkProfileRow {
type Module = super::RemoteModule;
}
/// Column accessor struct for the table `PuzzleClearWorkProfileRow`.
///
/// Provides typed access to columns for query building.
pub struct PuzzleClearWorkProfileRowCols {
pub profile_id: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub work_id: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub owner_user_id: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub source_session_id: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub author_display_name: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub work_title: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub work_description: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub theme_prompt: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub generate_board_background: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, bool>,
pub board_background_asset_json: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub board_background_prompt:
__sdk::__query_builder::Col<PuzzleClearWorkProfileRow, Option<String>>,
pub card_back_image_src: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub atlas_asset_json: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub pattern_groups_json: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub card_assets_json: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub cover_image_src: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub generation_status: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub publication_status: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, String>,
pub play_count: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, u32>,
pub updated_at: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, __sdk::Timestamp>,
pub published_at:
__sdk::__query_builder::Col<PuzzleClearWorkProfileRow, Option<__sdk::Timestamp>>,
pub visible: __sdk::__query_builder::Col<PuzzleClearWorkProfileRow, bool>,
}
impl __sdk::__query_builder::HasCols for PuzzleClearWorkProfileRow {
type Cols = PuzzleClearWorkProfileRowCols;
fn cols(table_name: &'static str) -> Self::Cols {
PuzzleClearWorkProfileRowCols {
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_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"),
source_session_id: __sdk::__query_builder::Col::new(table_name, "source_session_id"),
author_display_name: __sdk::__query_builder::Col::new(
table_name,
"author_display_name",
),
work_title: __sdk::__query_builder::Col::new(table_name, "work_title"),
work_description: __sdk::__query_builder::Col::new(table_name, "work_description"),
theme_prompt: __sdk::__query_builder::Col::new(table_name, "theme_prompt"),
generate_board_background: __sdk::__query_builder::Col::new(
table_name,
"generate_board_background",
),
board_background_asset_json: __sdk::__query_builder::Col::new(
table_name,
"board_background_asset_json",
),
board_background_prompt: __sdk::__query_builder::Col::new(
table_name,
"board_background_prompt",
),
card_back_image_src: __sdk::__query_builder::Col::new(
table_name,
"card_back_image_src",
),
atlas_asset_json: __sdk::__query_builder::Col::new(table_name, "atlas_asset_json"),
pattern_groups_json: __sdk::__query_builder::Col::new(
table_name,
"pattern_groups_json",
),
card_assets_json: __sdk::__query_builder::Col::new(table_name, "card_assets_json"),
cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"),
generation_status: __sdk::__query_builder::Col::new(table_name, "generation_status"),
publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"),
play_count: __sdk::__query_builder::Col::new(table_name, "play_count"),
updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"),
published_at: __sdk::__query_builder::Col::new(table_name, "published_at"),
visible: __sdk::__query_builder::Col::new(table_name, "visible"),
}
}
}
/// Indexed column accessor struct for the table `PuzzleClearWorkProfileRow`.
///
/// Provides typed access to indexed columns for query building.
pub struct PuzzleClearWorkProfileRowIxCols {
pub owner_user_id: __sdk::__query_builder::IxCol<PuzzleClearWorkProfileRow, String>,
pub profile_id: __sdk::__query_builder::IxCol<PuzzleClearWorkProfileRow, String>,
pub publication_status: __sdk::__query_builder::IxCol<PuzzleClearWorkProfileRow, String>,
}
impl __sdk::__query_builder::HasIxCols for PuzzleClearWorkProfileRow {
type IxCols = PuzzleClearWorkProfileRowIxCols;
fn ix_cols(table_name: &'static str) -> Self::IxCols {
PuzzleClearWorkProfileRowIxCols {
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"),
publication_status: __sdk::__query_builder::IxCol::new(
table_name,
"publication_status",
),
}
}
}
impl __sdk::__query_builder::CanBeLookupTable for PuzzleClearWorkProfileRow {}

View File

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

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 PuzzleClearWorkPublishInput {
pub profile_id: String,
pub owner_user_id: String,
pub published_at_micros: i64,
}
impl __sdk::InModule for PuzzleClearWorkPublishInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,40 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
use super::puzzle_clear_card_asset_snapshot_type::PuzzleClearCardAssetSnapshot;
use super::puzzle_clear_image_asset_snapshot_type::PuzzleClearImageAssetSnapshot;
use super::puzzle_clear_pattern_group_snapshot_type::PuzzleClearPatternGroupSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearWorkSnapshot {
pub work_id: String,
pub profile_id: String,
pub owner_user_id: String,
pub source_session_id: String,
pub author_display_name: String,
pub work_title: String,
pub work_description: String,
pub theme_prompt: String,
pub generate_board_background: bool,
pub board_background_asset: Option<PuzzleClearImageAssetSnapshot>,
pub board_background_prompt: String,
pub card_back_image_src: Option<String>,
pub atlas_asset: PuzzleClearImageAssetSnapshot,
pub pattern_groups: Vec<PuzzleClearPatternGroupSnapshot>,
pub card_assets: Vec<PuzzleClearCardAssetSnapshot>,
pub cover_image_src: Option<String>,
pub publication_status: String,
pub publish_ready: bool,
pub play_count: u32,
pub generation_status: String,
pub updated_at_micros: i64,
pub published_at_micros: Option<i64>,
}
impl __sdk::InModule for PuzzleClearWorkSnapshot {
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 PuzzleClearWorkUpdateInput {
pub profile_id: String,
pub owner_user_id: String,
pub work_title: String,
pub work_description: String,
pub theme_prompt: String,
pub generate_board_background: bool,
pub board_background_asset_json: Option<String>,
pub board_background_prompt: String,
pub updated_at_micros: i64,
}
impl __sdk::InModule for PuzzleClearWorkUpdateInput {
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 PuzzleClearWorksListInput {
pub owner_user_id: String,
pub published_only: bool,
}
impl __sdk::InModule for PuzzleClearWorksListInput {
type Module = super::RemoteModule;
}

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};
use super::puzzle_clear_work_snapshot_type::PuzzleClearWorkSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct PuzzleClearWorksProcedureResult {
pub ok: bool,
pub items: Vec<PuzzleClearWorkSnapshot>,
pub error_message: Option<String>,
}
impl __sdk::InModule for PuzzleClearWorksProcedureResult {
type Module = super::RemoteModule;
}

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::puzzle_clear_run_procedure_result_type::PuzzleClearRunProcedureResult;
use super::puzzle_clear_run_retry_level_input_type::PuzzleClearRunRetryLevelInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct RetryPuzzleClearLevelRunArgs {
pub input: PuzzleClearRunRetryLevelInput,
}
impl __sdk::InModule for RetryPuzzleClearLevelRunArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `retry_puzzle_clear_level_run`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait retry_puzzle_clear_level_run {
fn retry_puzzle_clear_level_run(&self, input: PuzzleClearRunRetryLevelInput) {
self.retry_puzzle_clear_level_run_then(input, |_, _| {});
}
fn retry_puzzle_clear_level_run_then(
&self,
input: PuzzleClearRunRetryLevelInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl retry_puzzle_clear_level_run for super::RemoteProcedures {
fn retry_puzzle_clear_level_run_then(
&self,
input: PuzzleClearRunRetryLevelInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearRunProcedureResult>(
"retry_puzzle_clear_level_run",
RetryPuzzleClearLevelRunArgs { 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::puzzle_clear_run_procedure_result_type::PuzzleClearRunProcedureResult;
use super::puzzle_clear_run_start_input_type::PuzzleClearRunStartInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct StartPuzzleClearRuntimeRunArgs {
pub input: PuzzleClearRunStartInput,
}
impl __sdk::InModule for StartPuzzleClearRuntimeRunArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `start_puzzle_clear_runtime_run`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait start_puzzle_clear_runtime_run {
fn start_puzzle_clear_runtime_run(&self, input: PuzzleClearRunStartInput) {
self.start_puzzle_clear_runtime_run_then(input, |_, _| {});
}
fn start_puzzle_clear_runtime_run_then(
&self,
input: PuzzleClearRunStartInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl start_puzzle_clear_runtime_run for super::RemoteProcedures {
fn start_puzzle_clear_runtime_run_then(
&self,
input: PuzzleClearRunStartInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearRunProcedureResult>(
"start_puzzle_clear_runtime_run",
StartPuzzleClearRuntimeRunArgs { 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::puzzle_clear_run_procedure_result_type::PuzzleClearRunProcedureResult;
use super::puzzle_clear_run_swap_input_type::PuzzleClearRunSwapInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct SwapPuzzleClearCardsArgs {
pub input: PuzzleClearRunSwapInput,
}
impl __sdk::InModule for SwapPuzzleClearCardsArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `swap_puzzle_clear_cards`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait swap_puzzle_clear_cards {
fn swap_puzzle_clear_cards(&self, input: PuzzleClearRunSwapInput) {
self.swap_puzzle_clear_cards_then(input, |_, _| {});
}
fn swap_puzzle_clear_cards_then(
&self,
input: PuzzleClearRunSwapInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl swap_puzzle_clear_cards for super::RemoteProcedures {
fn swap_puzzle_clear_cards_then(
&self,
input: PuzzleClearRunSwapInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearRunProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearRunProcedureResult>(
"swap_puzzle_clear_cards",
SwapPuzzleClearCardsArgs { 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::puzzle_clear_work_procedure_result_type::PuzzleClearWorkProcedureResult;
use super::puzzle_clear_work_update_input_type::PuzzleClearWorkUpdateInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct UpdatePuzzleClearWorkArgs {
pub input: PuzzleClearWorkUpdateInput,
}
impl __sdk::InModule for UpdatePuzzleClearWorkArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `update_puzzle_clear_work`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait update_puzzle_clear_work {
fn update_puzzle_clear_work(&self, input: PuzzleClearWorkUpdateInput) {
self.update_puzzle_clear_work_then(input, |_, _| {});
}
fn update_puzzle_clear_work_then(
&self,
input: PuzzleClearWorkUpdateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearWorkProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl update_puzzle_clear_work for super::RemoteProcedures {
fn update_puzzle_clear_work_then(
&self,
input: PuzzleClearWorkUpdateInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<PuzzleClearWorkProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, PuzzleClearWorkProcedureResult>(
"update_puzzle_clear_work",
UpdatePuzzleClearWorkArgs { input },
__callback,
);
}
}

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 WoodenFishWorkDeleteInput {
pub profile_id: String,
pub owner_user_id: String,
}
impl __sdk::InModule for WoodenFishWorkDeleteInput {
type Module = super::RemoteModule;
}

File diff suppressed because it is too large Load Diff

View File

@@ -259,6 +259,30 @@ impl SpacetimeClient {
.await
}
pub async fn delete_wooden_fish_work(
&self,
profile_id: String,
owner_user_id: String,
) -> Result<Vec<WoodenFishWorkProfileResponse>, SpacetimeClientError> {
let procedure_input = WoodenFishWorkDeleteInput {
profile_id,
owner_user_id,
};
self.call_after_connect("delete_wooden_fish_work", move |connection, sender| {
connection.procedures().delete_wooden_fish_work_then(
procedure_input,
move |_, result| {
let mapped = result
.map_err(SpacetimeClientError::from_sdk_error)
.and_then(map_wooden_fish_works_procedure_result);
send_once(&sender, mapped);
},
);
})
.await
}
pub async fn get_wooden_fish_runtime_work(
&self,
profile_id: String,