feat: add puzzle clear template runtime
This commit is contained in:
@@ -16,6 +16,7 @@ module-wooden-fish = { workspace = true }
|
||||
module-match3d = { workspace = true }
|
||||
module-npc = { workspace = true }
|
||||
module-puzzle = { workspace = true }
|
||||
module-puzzle-clear = { workspace = true }
|
||||
module-runtime = { workspace = true }
|
||||
module-runtime-story = { workspace = true }
|
||||
module-runtime-item = { workspace = true }
|
||||
|
||||
@@ -1157,6 +1157,7 @@ mod tests {
|
||||
fn action(action_type: JumpHopActionType) -> JumpHopActionRequest {
|
||||
JumpHopActionRequest {
|
||||
action_type,
|
||||
profile_id: None,
|
||||
work_title: None,
|
||||
work_description: None,
|
||||
theme_tags: None,
|
||||
@@ -1165,6 +1166,10 @@ mod tests {
|
||||
character_prompt: None,
|
||||
tile_prompt: None,
|
||||
end_mood_prompt: None,
|
||||
character_asset: None,
|
||||
tile_atlas_asset: None,
|
||||
tile_assets: None,
|
||||
cover_composite: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,16 +52,24 @@ pub use mapper::{
|
||||
PuzzleAgentMessageSubmitRecordInput, PuzzleAgentSessionCreateRecordInput,
|
||||
PuzzleAgentSessionRecord, PuzzleAgentSuggestedActionRecord, PuzzleAnchorItemRecord,
|
||||
PuzzleAnchorPackRecord, PuzzleAudioAssetRecord, PuzzleBoardRecord, PuzzleCellPositionRecord,
|
||||
PuzzleCreatorIntentRecord, PuzzleDraftCompileFailureRecordInput, PuzzleDraftLevelRecord,
|
||||
PuzzleFormDraftRecord, PuzzleFormDraftSaveRecordInput, PuzzleGalleryCardRecord,
|
||||
PuzzleGeneratedImageCandidateRecord, PuzzleGeneratedImagesSaveRecordInput,
|
||||
PuzzleLeaderboardEntryRecord, PuzzleLeaderboardSubmitRecordInput, 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, 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,
|
||||
@@ -109,6 +117,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;
|
||||
@@ -575,6 +584,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",
|
||||
@@ -591,6 +601,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'",
|
||||
|
||||
@@ -14,6 +14,7 @@ mod match3d;
|
||||
mod npc;
|
||||
mod public_work;
|
||||
mod puzzle;
|
||||
mod puzzle_clear;
|
||||
mod runtime;
|
||||
mod runtime_profile;
|
||||
mod square_hole;
|
||||
@@ -114,6 +115,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,
|
||||
@@ -192,6 +204,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,
|
||||
|
||||
@@ -163,6 +163,7 @@ mod tests {
|
||||
let row = BarkBattleGalleryViewRow {
|
||||
work_id: "BB-33333333".to_string(),
|
||||
owner_user_id: "user-3".to_string(),
|
||||
author_display_name: "声浪玩家".to_string(),
|
||||
source_draft_id: Some("bark-battle-draft-3".to_string()),
|
||||
config_version: 1,
|
||||
ruleset_version: "bark-battle-ruleset-v1".to_string(),
|
||||
|
||||
289
server-rs/crates/spacetime-client/src/mapper/puzzle_clear.rs
Normal file
289
server-rs/crates/spacetime-client/src/mapper/puzzle_clear.rs
Normal 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",
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
@@ -212,6 +213,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;
|
||||
@@ -234,6 +236,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;
|
||||
@@ -378,6 +381,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;
|
||||
@@ -466,6 +472,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;
|
||||
@@ -473,6 +480,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 match_3_d_agent_message_finalize_input_type;
|
||||
pub mod match_3_d_agent_message_row_type;
|
||||
@@ -580,6 +588,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;
|
||||
@@ -606,6 +615,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;
|
||||
@@ -726,6 +773,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;
|
||||
@@ -896,6 +944,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;
|
||||
@@ -924,6 +973,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;
|
||||
@@ -942,6 +992,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;
|
||||
@@ -1064,6 +1115,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;
|
||||
@@ -1251,6 +1303,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;
|
||||
@@ -1273,6 +1326,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;
|
||||
@@ -1417,6 +1471,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;
|
||||
@@ -1505,6 +1562,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;
|
||||
@@ -1512,6 +1570,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 match_3_d_agent_message_finalize_input_type::Match3DAgentMessageFinalizeInput;
|
||||
pub use match_3_d_agent_message_row_type::Match3DAgentMessageRow;
|
||||
@@ -1619,6 +1678,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;
|
||||
@@ -1645,6 +1705,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;
|
||||
@@ -1765,6 +1863,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;
|
||||
@@ -1935,6 +2034,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;
|
||||
@@ -1963,6 +2063,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;
|
||||
@@ -1981,6 +2082,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;
|
||||
@@ -2430,6 +2532,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>,
|
||||
@@ -2706,6 +2814,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)?),
|
||||
@@ -3199,6 +3327,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>(
|
||||
@@ -3364,6 +3516,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,
|
||||
@@ -3618,6 +3779,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)?),
|
||||
@@ -3961,6 +4140,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)?),
|
||||
@@ -4160,6 +4357,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>,
|
||||
@@ -4568,6 +4771,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,
|
||||
@@ -5474,6 +5707,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);
|
||||
@@ -5586,6 +5825,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",
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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 {}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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 {}
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
@@ -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"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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 {}
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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 {}
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
1021
server-rs/crates/spacetime-client/src/puzzle_clear.rs
Normal file
1021
server-rs/crates/spacetime-client/src/puzzle_clear.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -813,9 +813,14 @@ mod tests {
|
||||
payload.back_button_asset = Some(generated_back_button_asset("generated-compile-back"));
|
||||
payload.hit_sound_asset = Some(generated_hit_sound_asset("generated-compile-sound"));
|
||||
|
||||
let (plan, draft) =
|
||||
build_wooden_fish_action_plan(&session, OWNER_USER_ID, &payload, NOW_MICROS)
|
||||
.expect("compile-draft should build plan");
|
||||
let (plan, draft) = build_wooden_fish_action_plan(
|
||||
&session,
|
||||
OWNER_USER_ID,
|
||||
"敲木鱼玩家",
|
||||
&payload,
|
||||
NOW_MICROS,
|
||||
)
|
||||
.expect("compile-draft should build plan");
|
||||
|
||||
let WoodenFishActionProcedure::Compile(input) = plan else {
|
||||
panic!("compile-draft should call compile_wooden_fish_draft");
|
||||
@@ -862,11 +867,16 @@ mod tests {
|
||||
payload.background_asset = Some(generated_background_asset("generated-compile-background"));
|
||||
payload.back_button_asset = Some(generated_back_button_asset("generated-compile-back"));
|
||||
|
||||
let error =
|
||||
match build_wooden_fish_action_plan(&session, OWNER_USER_ID, &payload, NOW_MICROS) {
|
||||
Ok(_) => panic!("compile-draft should not synthesize fake hit sound assets"),
|
||||
Err(error) => error,
|
||||
};
|
||||
let error = match build_wooden_fish_action_plan(
|
||||
&session,
|
||||
OWNER_USER_ID,
|
||||
"敲木鱼玩家",
|
||||
&payload,
|
||||
NOW_MICROS,
|
||||
) {
|
||||
Ok(_) => panic!("compile-draft should not synthesize fake hit sound assets"),
|
||||
Err(error) => error,
|
||||
};
|
||||
|
||||
assert!(
|
||||
error
|
||||
@@ -883,11 +893,16 @@ mod tests {
|
||||
payload.hit_sound_asset = Some(generated_hit_sound_asset("generated-compile-sound"));
|
||||
payload.back_button_asset = Some(generated_back_button_asset("generated-compile-back"));
|
||||
|
||||
let error =
|
||||
match build_wooden_fish_action_plan(&session, OWNER_USER_ID, &payload, NOW_MICROS) {
|
||||
Ok(_) => panic!("compile-draft should not publish without background asset"),
|
||||
Err(error) => error,
|
||||
};
|
||||
let error = match build_wooden_fish_action_plan(
|
||||
&session,
|
||||
OWNER_USER_ID,
|
||||
"敲木鱼玩家",
|
||||
&payload,
|
||||
NOW_MICROS,
|
||||
) {
|
||||
Ok(_) => panic!("compile-draft should not publish without background asset"),
|
||||
Err(error) => error,
|
||||
};
|
||||
|
||||
assert!(
|
||||
error
|
||||
@@ -904,11 +919,16 @@ mod tests {
|
||||
payload.background_asset = Some(generated_background_asset("generated-compile-background"));
|
||||
payload.hit_sound_asset = Some(generated_hit_sound_asset("generated-compile-sound"));
|
||||
|
||||
let error =
|
||||
match build_wooden_fish_action_plan(&session, OWNER_USER_ID, &payload, NOW_MICROS) {
|
||||
Ok(_) => panic!("compile-draft should not publish without back button asset"),
|
||||
Err(error) => error,
|
||||
};
|
||||
let error = match build_wooden_fish_action_plan(
|
||||
&session,
|
||||
OWNER_USER_ID,
|
||||
"敲木鱼玩家",
|
||||
&payload,
|
||||
NOW_MICROS,
|
||||
) {
|
||||
Ok(_) => panic!("compile-draft should not publish without back button asset"),
|
||||
Err(error) => error,
|
||||
};
|
||||
|
||||
assert!(
|
||||
error
|
||||
@@ -926,9 +946,14 @@ mod tests {
|
||||
payload.background_asset = Some(generated_background_asset("generated-background"));
|
||||
payload.back_button_asset = Some(generated_back_button_asset("generated-back"));
|
||||
|
||||
let (plan, _draft) =
|
||||
build_wooden_fish_action_plan(&session, OWNER_USER_ID, &payload, NOW_MICROS)
|
||||
.expect("regenerate-hit-object should build plan");
|
||||
let (plan, _draft) = build_wooden_fish_action_plan(
|
||||
&session,
|
||||
OWNER_USER_ID,
|
||||
"敲木鱼玩家",
|
||||
&payload,
|
||||
NOW_MICROS,
|
||||
)
|
||||
.expect("regenerate-hit-object should build plan");
|
||||
|
||||
let WoodenFishActionProcedure::Compile(input) = plan else {
|
||||
panic!("regenerate-hit-object should call compile_wooden_fish_draft");
|
||||
@@ -987,9 +1012,14 @@ mod tests {
|
||||
"健康+1".to_string(),
|
||||
]);
|
||||
|
||||
let (plan, draft) =
|
||||
build_wooden_fish_action_plan(&session, OWNER_USER_ID, &payload, NOW_MICROS)
|
||||
.expect("update-floating-words should build plan");
|
||||
let (plan, draft) = build_wooden_fish_action_plan(
|
||||
&session,
|
||||
OWNER_USER_ID,
|
||||
"敲木鱼玩家",
|
||||
&payload,
|
||||
NOW_MICROS,
|
||||
)
|
||||
.expect("update-floating-words should build plan");
|
||||
|
||||
let WoodenFishActionProcedure::Update(input) = plan else {
|
||||
panic!("update-floating-words should call update_wooden_fish_work");
|
||||
|
||||
Reference in New Issue
Block a user