From cd207dc237745653e5bf34ee87d209ffe5a295cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E7=89=A9?= <253518756@qq.com> Date: Thu, 23 Apr 2026 00:22:57 +0800 Subject: [PATCH] 1 --- ...ORLD_AGENT_LLM_REPLY_RESTORE_2026-04-22.md | 179 ++ ...UARD_AND_ASSET_404_DEDUP_FIX_2026-04-22.md | 10 +- docs/technical/README.md | 1 + server-rs/Cargo.lock | 23 + server-rs/crates/api-server/Cargo.toml | 1 + .../crates/api-server/src/custom_world.rs | 104 +- .../api-server/src/custom_world_agent_turn.rs | 2011 +++++++++++++++++ server-rs/crates/api-server/src/main.rs | 1 + .../crates/module-custom-world/src/lib.rs | 105 + server-rs/crates/spacetime-client/src/lib.rs | 110 + .../module_bindings/accept_quest_reducer.rs | 38 +- .../acknowledge_quest_completion_reducer.rs | 38 +- .../advance_puzzle_next_level_procedure.rs | 39 +- .../ai_result_reference_input_type.rs | 11 +- .../ai_result_reference_kind_type.rs | 11 +- .../ai_result_reference_snapshot_type.rs | 11 +- .../ai_result_reference_table.rs | 118 +- .../ai_result_reference_type.rs | 26 +- .../ai_stage_completion_input_type.rs | 15 +- .../ai_task_cancel_input_type.rs | 10 +- .../ai_task_create_input_type.rs | 15 +- .../ai_task_failure_input_type.rs | 10 +- .../ai_task_finish_input_type.rs | 10 +- .../src/module_bindings/ai_task_kind_type.rs | 11 +- .../ai_task_procedure_result_type.rs | 15 +- .../module_bindings/ai_task_snapshot_type.rs | 31 +- .../ai_task_stage_blueprint_type.rs | 9 +- .../ai_task_stage_kind_type.rs | 11 +- .../ai_task_stage_snapshot_type.rs | 19 +- .../ai_task_stage_start_input_type.rs | 9 +- .../ai_task_stage_status_type.rs | 11 +- .../module_bindings/ai_task_stage_table.rs | 108 +- .../src/module_bindings/ai_task_stage_type.rs | 37 +- .../ai_task_start_input_type.rs | 10 +- .../module_bindings/ai_task_status_type.rs | 11 +- .../src/module_bindings/ai_task_table.rs | 108 +- .../src/module_bindings/ai_task_type.rs | 50 +- .../ai_text_chunk_append_input_type.rs | 9 +- .../ai_text_chunk_snapshot_type.rs | 9 +- .../module_bindings/ai_text_chunk_table.rs | 110 +- .../src/module_bindings/ai_text_chunk_type.rs | 12 +- ...pend_ai_text_chunk_and_return_procedure.rs | 41 +- ...ssion_ledger_entry_and_return_procedure.rs | 42 +- ...hapter_progression_ledger_entry_reducer.rs | 43 +- .../apply_inventory_mutation_reducer.rs | 38 +- .../apply_quest_signal_reducer.rs | 38 +- .../asset_entity_binding_input_type.rs | 14 +- ...et_entity_binding_procedure_result_type.rs | 13 +- .../asset_entity_binding_snapshot_type.rs | 14 +- .../asset_entity_binding_table.rs | 110 +- .../asset_entity_binding_type.rs | 21 +- .../asset_object_access_policy_type.rs | 11 +- .../asset_object_procedure_result_type.rs | 13 +- .../src/module_bindings/asset_object_table.rs | 108 +- .../src/module_bindings/asset_object_type.rs | 36 +- .../asset_object_upsert_input_type.rs | 21 +- .../asset_object_upsert_snapshot_type.rs | 21 +- ...i_result_reference_and_return_procedure.rs | 41 +- .../src/module_bindings/battle_mode_type.rs | 11 +- .../battle_state_input_type.rs | 13 +- .../battle_state_procedure_result_type.rs | 13 +- .../battle_state_query_input_type.rs | 10 +- .../battle_state_snapshot_type.rs | 21 +- .../src/module_bindings/battle_state_table.rs | 110 +- .../src/module_bindings/battle_state_type.rs | 44 +- .../src/module_bindings/battle_status_type.rs | 11 +- ...egin_story_session_and_return_procedure.rs | 39 +- .../begin_story_session_reducer.rs | 38 +- .../big_fish_agent_message_kind_type.rs | 11 +- .../big_fish_agent_message_role_type.rs | 11 +- .../big_fish_agent_message_snapshot_type.rs | 11 +- .../big_fish_agent_message_table.rs | 114 +- .../big_fish_agent_message_type.rs | 14 +- .../big_fish_anchor_item_type.rs | 9 +- .../big_fish_anchor_pack_type.rs | 9 +- .../big_fish_anchor_status_type.rs | 11 +- .../big_fish_asset_coverage_type.rs | 12 +- .../big_fish_asset_generate_input_type.rs | 13 +- .../big_fish_asset_kind_type.rs | 11 +- .../big_fish_asset_slot_snapshot_type.rs | 15 +- .../big_fish_asset_slot_table.rs | 112 +- .../big_fish_asset_slot_type.rs | 24 +- .../big_fish_asset_status_type.rs | 11 +- .../big_fish_background_blueprint_type.rs | 10 +- .../big_fish_creation_session_table.rs | 113 +- .../big_fish_creation_session_type.rs | 30 +- .../big_fish_creation_stage_type.rs | 11 +- .../big_fish_draft_compile_input_type.rs | 10 +- .../big_fish_game_draft_type.rs | 13 +- .../big_fish_level_blueprint_type.rs | 16 +- .../big_fish_message_submit_input_type.rs | 10 +- .../big_fish_publish_input_type.rs | 10 +- .../big_fish_run_get_input_type.rs | 10 +- .../big_fish_run_input_submit_input_type.rs | 10 +- .../big_fish_run_procedure_result_type.rs | 13 +- .../big_fish_run_start_input_type.rs | 10 +- .../big_fish_run_status_type.rs | 11 +- .../big_fish_runtime_entity_type.rs | 9 +- .../big_fish_runtime_params_type.rs | 14 +- .../big_fish_runtime_run_table.rs | 112 +- .../big_fish_runtime_run_type.rs | 12 +- .../big_fish_runtime_snapshot_type.rs | 17 +- .../big_fish_session_create_input_type.rs | 10 +- .../big_fish_session_get_input_type.rs | 10 +- .../big_fish_session_procedure_result_type.rs | 13 +- .../big_fish_session_snapshot_type.rs | 25 +- .../module_bindings/big_fish_vector_2_type.rs | 10 +- ...t_object_to_entity_and_return_procedure.rs | 39 +- .../bind_asset_object_to_entity_reducer.rs | 38 +- .../cancel_ai_task_and_return_procedure.rs | 41 +- .../module_bindings/chapter_pace_band_type.rs | 11 +- .../chapter_progression_get_input_type.rs | 10 +- .../chapter_progression_input_type.rs | 9 +- .../chapter_progression_ledger_input_type.rs | 12 +- ...apter_progression_procedure_result_type.rs | 13 +- .../chapter_progression_snapshot_type.rs | 11 +- .../chapter_progression_table.rs | 118 +- .../chapter_progression_type.rs | 46 +- ...orm_browse_history_and_return_procedure.rs | 39 +- .../module_bindings/combat_outcome_type.rs | 11 +- .../compile_big_fish_draft_procedure.rs | 39 +- ...ustom_world_published_profile_procedure.rs | 42 +- .../compile_puzzle_agent_draft_procedure.rs | 41 +- .../complete_ai_stage_and_return_procedure.rs | 41 +- .../complete_ai_task_and_return_procedure.rs | 41 +- ...nfirm_asset_object_and_return_procedure.rs | 41 +- .../confirm_asset_object_reducer.rs | 38 +- .../consume_inventory_item_input_type.rs | 10 +- .../continue_story_and_return_procedure.rs | 41 +- .../module_bindings/continue_story_reducer.rs | 38 +- .../create_ai_task_and_return_procedure.rs | 41 +- .../module_bindings/create_ai_task_reducer.rs | 38 +- ...reate_battle_state_and_return_procedure.rs | 39 +- .../create_battle_state_reducer.rs | 38 +- .../create_big_fish_session_procedure.rs | 41 +- ...te_custom_world_agent_session_procedure.rs | 39 +- .../create_puzzle_agent_session_procedure.rs | 41 +- ...m_world_agent_action_execute_input_type.rs | 12 +- ..._world_agent_action_execute_result_type.rs | 13 +- ..._world_agent_card_detail_get_input_type.rs | 10 +- ...world_agent_message_finalize_input_type.rs | 48 + ...ustom_world_agent_message_snapshot_type.rs | 13 +- ...m_world_agent_message_submit_input_type.rs | 10 +- .../custom_world_agent_message_table.rs | 115 +- .../custom_world_agent_message_type.rs | 23 +- ...om_world_agent_operation_get_input_type.rs | 10 +- ...d_agent_operation_procedure_result_type.rs | 13 +- ...tom_world_agent_operation_snapshot_type.rs | 13 +- .../custom_world_agent_operation_table.rs | 119 +- .../custom_world_agent_operation_type.rs | 21 +- ...m_world_agent_session_create_input_type.rs | 18 +- ...stom_world_agent_session_get_input_type.rs | 10 +- ...rld_agent_session_procedure_result_type.rs | 13 +- ...ustom_world_agent_session_snapshot_type.rs | 37 +- .../custom_world_agent_session_table.rs | 113 +- .../custom_world_agent_session_type.rs | 94 +- ...tom_world_draft_card_detail_result_type.rs | 13 +- ...draft_card_detail_section_snapshot_type.rs | 10 +- ...m_world_draft_card_detail_snapshot_type.rs | 19 +- .../custom_world_draft_card_snapshot_type.rs | 17 +- .../custom_world_draft_card_table.rs | 112 +- .../custom_world_draft_card_type.rs | 32 +- .../custom_world_gallery_detail_input_type.rs | 10 +- ...ustom_world_gallery_entry_snapshot_type.rs | 11 +- .../custom_world_gallery_entry_table.rs | 113 +- .../custom_world_gallery_entry_type.rs | 21 +- .../custom_world_gallery_list_result_type.rs | 13 +- .../custom_world_generation_mode_type.rs | 11 +- .../custom_world_library_detail_input_type.rs | 10 +- ...stom_world_library_mutation_result_type.rs | 17 +- .../custom_world_profile_delete_input_type.rs | 10 +- .../custom_world_profile_list_input_type.rs | 10 +- .../custom_world_profile_list_result_type.rs | 13 +- ...custom_world_profile_publish_input_type.rs | 10 +- .../custom_world_profile_snapshot_type.rs | 19 +- .../custom_world_profile_table.rs | 112 +- .../custom_world_profile_type.rs | 56 +- ...stom_world_profile_unpublish_input_type.rs | 10 +- .../custom_world_profile_upsert_input_type.rs | 13 +- .../custom_world_publication_status_type.rs | 11 +- .../custom_world_publish_world_input_type.rs | 12 +- .../custom_world_publish_world_result_type.rs | 23 +- ...ld_published_profile_compile_input_type.rs | 12 +- ...d_published_profile_compile_result_type.rs | 13 +- ...published_profile_compile_snapshot_type.rs | 11 +- .../custom_world_role_asset_status_type.rs | 11 +- .../custom_world_session_status_type.rs | 11 +- .../custom_world_session_table.rs | 112 +- .../custom_world_session_type.rs | 39 +- .../custom_world_theme_mode_type.rs | 11 +- ...custom_world_work_summary_snapshot_type.rs | 29 +- .../custom_world_works_list_input_type.rs | 10 +- .../custom_world_works_list_result_type.rs | 13 +- ...stom_world_profile_and_return_procedure.rs | 39 +- ...e_runtime_snapshot_and_return_procedure.rs | 39 +- .../drag_puzzle_piece_or_group_procedure.rs | 41 +- .../equip_inventory_item_input_type.rs | 10 +- ...ute_custom_world_agent_action_procedure.rs | 39 +- .../fail_ai_task_and_return_procedure.rs | 41 +- ...stom_world_agent_message_turn_procedure.rs | 58 + .../generate_big_fish_asset_procedure.rs | 41 +- .../get_battle_state_procedure.rs | 39 +- .../get_big_fish_run_procedure.rs | 39 +- .../get_big_fish_session_procedure.rs | 41 +- .../get_chapter_progression_procedure.rs | 41 +- ...ustom_world_agent_card_detail_procedure.rs | 39 +- ..._custom_world_agent_operation_procedure.rs | 41 +- ...et_custom_world_agent_session_procedure.rs | 41 +- ...t_custom_world_gallery_detail_procedure.rs | 39 +- ...t_custom_world_library_detail_procedure.rs | 41 +- ...player_progression_or_default_procedure.rs | 39 +- .../get_profile_dashboard_procedure.rs | 39 +- .../get_profile_play_stats_procedure.rs | 39 +- .../get_puzzle_agent_session_procedure.rs | 41 +- .../get_puzzle_gallery_detail_procedure.rs | 39 +- .../get_puzzle_run_procedure.rs | 41 +- .../get_puzzle_work_detail_procedure.rs | 39 +- .../get_runtime_inventory_state_procedure.rs | 41 +- ...et_runtime_setting_or_default_procedure.rs | 39 +- .../get_runtime_snapshot_procedure.rs | 41 +- .../get_story_session_state_procedure.rs | 39 +- .../grant_inventory_item_input_type.rs | 9 +- ...ression_experience_and_return_procedure.rs | 41 +- ...t_player_progression_experience_reducer.rs | 41 +- .../inventory_container_kind_type.rs | 11 +- .../inventory_equipment_slot_type.rs | 11 +- .../inventory_item_rarity_type.rs | 11 +- .../inventory_item_snapshot_type.rs | 19 +- .../inventory_item_source_kind_type.rs | 11 +- .../inventory_mutation_input_type.rs | 11 +- .../inventory_mutation_type.rs | 13 +- .../inventory_slot_snapshot_type.rs | 23 +- .../module_bindings/inventory_slot_table.rs | 114 +- .../module_bindings/inventory_slot_type.rs | 47 +- ..._custom_world_gallery_entries_procedure.rs | 43 +- .../list_custom_world_profiles_procedure.rs | 41 +- .../list_custom_world_works_procedure.rs | 39 +- .../list_platform_browse_history_procedure.rs | 41 +- .../list_profile_save_archives_procedure.rs | 39 +- .../list_profile_wallet_ledger_procedure.rs | 39 +- .../list_puzzle_gallery_procedure.rs | 43 +- .../list_puzzle_works_procedure.rs | 41 +- .../src/module_bindings/mod.rs | 1744 +++++--------- ...attle_interaction_procedure_result_type.rs | 13 +- .../npc_battle_interaction_result_type.rs | 9 +- .../npc_interaction_battle_mode_type.rs | 11 +- .../npc_interaction_procedure_result_type.rs | 13 +- .../npc_interaction_result_type.rs | 17 +- .../npc_interaction_status_type.rs | 11 +- .../npc_relation_stance_type.rs | 11 +- .../npc_relation_state_type.rs | 9 +- .../npc_social_action_kind_type.rs | 11 +- .../npc_stance_profile_type.rs | 16 +- .../npc_state_procedure_result_type.rs | 13 +- .../npc_state_snapshot_type.rs | 17 +- .../src/module_bindings/npc_state_table.rs | 108 +- .../src/module_bindings/npc_state_type.rs | 53 +- .../npc_state_upsert_input_type.rs | 19 +- .../player_progression_get_input_type.rs | 10 +- .../player_progression_grant_input_type.rs | 9 +- .../player_progression_grant_source_type.rs | 11 +- ...layer_progression_procedure_result_type.rs | 13 +- .../player_progression_snapshot_type.rs | 11 +- .../player_progression_table.rs | 112 +- .../player_progression_type.rs | 22 +- .../profile_dashboard_state_table.rs | 110 +- .../profile_dashboard_state_type.rs | 13 +- .../profile_played_world_table.rs | 110 +- .../profile_played_world_type.rs | 30 +- .../profile_save_archive_table.rs | 110 +- .../profile_save_archive_type.rs | 33 +- .../profile_wallet_ledger_table.rs | 110 +- .../profile_wallet_ledger_type.rs | 15 +- .../publish_big_fish_game_procedure.rs | 41 +- ...stom_world_profile_and_return_procedure.rs | 39 +- .../publish_custom_world_profile_reducer.rs | 41 +- .../publish_custom_world_world_procedure.rs | 39 +- .../publish_puzzle_work_procedure.rs | 41 +- .../puzzle_agent_message_kind_type.rs | 11 +- .../puzzle_agent_message_role_type.rs | 11 +- .../puzzle_agent_message_row_type.rs | 14 +- .../puzzle_agent_message_submit_input_type.rs | 10 +- .../puzzle_agent_message_table.rs | 114 +- .../puzzle_agent_session_create_input_type.rs | 10 +- .../puzzle_agent_session_get_input_type.rs | 10 +- ...zle_agent_session_procedure_result_type.rs | 14 +- .../puzzle_agent_session_row_type.rs | 34 +- .../puzzle_agent_session_table.rs | 110 +- .../puzzle_agent_stage_type.rs | 11 +- .../puzzle_draft_compile_input_type.rs | 10 +- ...puzzle_generated_images_save_input_type.rs | 10 +- .../puzzle_publication_status_type.rs | 11 +- .../puzzle_publish_input_type.rs | 16 +- .../puzzle_run_drag_input_type.rs | 10 +- .../puzzle_run_get_input_type.rs | 10 +- .../puzzle_run_next_level_input_type.rs | 10 +- .../puzzle_run_procedure_result_type.rs | 14 +- .../puzzle_run_start_input_type.rs | 10 +- .../puzzle_run_swap_input_type.rs | 10 +- .../puzzle_runtime_run_row_type.rs | 33 +- .../puzzle_runtime_run_table.rs | 110 +- .../puzzle_select_cover_image_input_type.rs | 10 +- .../puzzle_work_get_input_type.rs | 10 +- .../puzzle_work_procedure_result_type.rs | 14 +- .../puzzle_work_profile_row_type.rs | 44 +- .../puzzle_work_profile_table.rs | 112 +- .../puzzle_work_upsert_input_type.rs | 16 +- .../puzzle_works_list_input_type.rs | 10 +- .../puzzle_works_procedure_result_type.rs | 14 +- .../quest_completion_ack_input_type.rs | 10 +- .../quest_hostile_npc_defeated_signal_type.rs | 12 +- .../quest_item_delivered_signal_type.rs | 10 +- .../quest_log_event_kind_type.rs | 11 +- .../src/module_bindings/quest_log_table.rs | 112 +- .../src/module_bindings/quest_log_type.rs | 39 +- .../quest_narrative_binding_snapshot_type.rs | 11 +- .../quest_narrative_origin_type.rs | 11 +- .../quest_narrative_type_type.rs | 11 +- .../quest_npc_spar_completed_signal_type.rs | 10 +- .../quest_npc_talk_completed_signal_type.rs | 10 +- .../quest_objective_kind_type.rs | 11 +- .../quest_objective_snapshot_type.rs | 17 +- .../quest_progress_signal_type.rs | 15 +- .../quest_record_input_type.rs | 37 +- .../src/module_bindings/quest_record_table.rs | 112 +- .../src/module_bindings/quest_record_type.rs | 94 +- .../quest_reward_equipment_slot_type.rs | 11 +- .../quest_reward_intel_type.rs | 12 +- .../quest_reward_item_rarity_type.rs | 11 +- .../module_bindings/quest_reward_item_type.rs | 17 +- .../quest_reward_snapshot_type.rs | 19 +- .../quest_scene_reached_signal_type.rs | 10 +- .../quest_signal_apply_input_type.rs | 9 +- .../module_bindings/quest_signal_kind_type.rs | 11 +- .../src/module_bindings/quest_status_type.rs | 11 +- .../quest_step_snapshot_type.rs | 17 +- .../quest_treasure_inspected_signal_type.rs | 12 +- .../quest_turn_in_input_type.rs | 10 +- ...olve_combat_action_and_return_procedure.rs | 39 +- .../resolve_combat_action_input_type.rs | 10 +- ...lve_combat_action_procedure_result_type.rs | 13 +- .../resolve_combat_action_reducer.rs | 38 +- .../resolve_combat_action_result_type.rs | 11 +- ...battle_interaction_and_return_procedure.rs | 41 +- ...solve_npc_battle_interaction_input_type.rs | 15 +- ...ve_npc_interaction_and_return_procedure.rs | 41 +- .../resolve_npc_interaction_input_type.rs | 12 +- .../resolve_npc_interaction_reducer.rs | 38 +- ..._npc_social_action_and_return_procedure.rs | 41 +- .../resolve_npc_social_action_input_type.rs | 13 +- .../resolve_npc_social_action_reducer.rs | 38 +- ...easure_interaction_and_return_procedure.rs | 41 +- .../resolve_treasure_interaction_reducer.rs | 38 +- ...ofile_save_archive_and_return_procedure.rs | 39 +- .../rpg_agent_draft_card_kind_type.rs | 11 +- .../rpg_agent_draft_card_status_type.rs | 11 +- .../rpg_agent_message_kind_type.rs | 11 +- .../rpg_agent_message_role_type.rs | 11 +- .../rpg_agent_operation_status_type.rs | 11 +- .../rpg_agent_operation_type_type.rs | 11 +- .../module_bindings/rpg_agent_stage_type.rs | 11 +- ...runtime_browse_history_clear_input_type.rs | 10 +- .../runtime_browse_history_list_input_type.rs | 10 +- ...me_browse_history_procedure_result_type.rs | 13 +- .../runtime_browse_history_snapshot_type.rs | 11 +- .../runtime_browse_history_sync_input_type.rs | 11 +- .../runtime_browse_history_theme_mode_type.rs | 11 +- ...runtime_browse_history_write_input_type.rs | 22 +- ...e_inventory_state_procedure_result_type.rs | 13 +- ...untime_inventory_state_query_input_type.rs | 10 +- .../runtime_inventory_state_snapshot_type.rs | 13 +- .../runtime_item_equipment_slot_type.rs | 11 +- .../runtime_item_reward_item_rarity_type.rs | 11 +- .../runtime_item_reward_item_snapshot_type.rs | 17 +- .../runtime_platform_theme_type.rs | 11 +- ...untime_profile_dashboard_get_input_type.rs | 10 +- ...profile_dashboard_procedure_result_type.rs | 13 +- ...runtime_profile_dashboard_snapshot_type.rs | 12 +- ...ntime_profile_play_stats_get_input_type.rs | 10 +- ...rofile_play_stats_procedure_result_type.rs | 13 +- ...untime_profile_play_stats_snapshot_type.rs | 13 +- ...time_profile_played_world_snapshot_type.rs | 16 +- ...me_profile_save_archive_list_input_type.rs | 10 +- ...file_save_archive_procedure_result_type.rs | 19 +- ..._profile_save_archive_resume_input_type.rs | 10 +- ...time_profile_save_archive_snapshot_type.rs | 20 +- ...ofile_wallet_ledger_entry_snapshot_type.rs | 9 +- ...e_profile_wallet_ledger_list_input_type.rs | 10 +- ...ile_wallet_ledger_procedure_result_type.rs | 13 +- ..._profile_wallet_ledger_source_type_type.rs | 11 +- .../runtime_setting_get_input_type.rs | 10 +- .../runtime_setting_procedure_result_type.rs | 13 +- .../runtime_setting_snapshot_type.rs | 9 +- .../module_bindings/runtime_setting_table.rs | 108 +- .../module_bindings/runtime_setting_type.rs | 12 +- .../runtime_setting_upsert_input_type.rs | 9 +- .../runtime_snapshot_delete_input_type.rs | 10 +- .../runtime_snapshot_get_input_type.rs | 10 +- .../runtime_snapshot_procedure_result_type.rs | 13 +- .../runtime_snapshot_row_type.rs | 17 +- .../module_bindings/runtime_snapshot_table.rs | 106 +- .../module_bindings/runtime_snapshot_type.rs | 12 +- .../runtime_snapshot_upsert_input_type.rs | 12 +- .../save_puzzle_generated_images_procedure.rs | 39 +- .../select_puzzle_cover_image_procedure.rs | 39 +- .../module_bindings/start_ai_task_reducer.rs | 38 +- .../start_ai_task_stage_reducer.rs | 38 +- .../start_big_fish_run_procedure.rs | 39 +- .../start_puzzle_run_procedure.rs | 39 +- .../story_continue_input_type.rs | 12 +- .../module_bindings/story_event_kind_type.rs | 11 +- .../story_event_snapshot_type.rs | 11 +- .../src/module_bindings/story_event_table.rs | 108 +- .../src/module_bindings/story_event_type.rs | 16 +- .../story_session_input_type.rs | 12 +- .../story_session_procedure_result_type.rs | 17 +- .../story_session_snapshot_type.rs | 13 +- .../story_session_state_input_type.rs | 10 +- ...ory_session_state_procedure_result_type.rs | 17 +- .../story_session_status_type.rs | 11 +- .../module_bindings/story_session_table.rs | 108 +- .../src/module_bindings/story_session_type.rs | 35 +- .../submit_big_fish_input_procedure.rs | 41 +- .../submit_big_fish_message_procedure.rs | 41 +- ...it_custom_world_agent_message_procedure.rs | 41 +- .../submit_puzzle_agent_message_procedure.rs | 41 +- .../swap_puzzle_pieces_procedure.rs | 39 +- .../treasure_interaction_action_type.rs | 11 +- .../treasure_record_procedure_result_type.rs | 13 +- .../treasure_record_snapshot_type.rs | 17 +- .../module_bindings/treasure_record_table.rs | 110 +- .../module_bindings/treasure_record_type.rs | 39 +- .../treasure_resolve_input_type.rs | 17 +- .../module_bindings/turn_in_quest_reducer.rs | 38 +- .../unequip_inventory_item_input_type.rs | 10 +- ...stom_world_profile_and_return_procedure.rs | 39 +- .../unpublish_custom_world_profile_reducer.rs | 41 +- .../update_puzzle_work_procedure.rs | 39 +- ...hapter_progression_and_return_procedure.rs | 41 +- .../upsert_chapter_progression_reducer.rs | 38 +- ...stom_world_profile_and_return_procedure.rs | 39 +- .../upsert_custom_world_profile_reducer.rs | 41 +- .../upsert_npc_state_and_return_procedure.rs | 39 +- .../upsert_npc_state_reducer.rs | 38 +- ...orm_browse_history_and_return_procedure.rs | 39 +- ...rt_runtime_setting_and_return_procedure.rs | 39 +- ...t_runtime_snapshot_and_return_procedure.rs | 39 +- .../user_browse_history_table.rs | 114 +- .../user_browse_history_type.rs | 21 +- server-rs/crates/spacetime-module/src/lib.rs | 266 ++- src/services/apiClient.test.ts | 9 +- src/services/apiClient.ts | 6 +- 452 files changed, 10980 insertions(+), 6574 deletions(-) create mode 100644 docs/technical/CUSTOM_WORLD_AGENT_LLM_REPLY_RESTORE_2026-04-22.md create mode 100644 server-rs/crates/api-server/src/custom_world_agent_turn.rs create mode 100644 server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_finalize_input_type.rs create mode 100644 server-rs/crates/spacetime-client/src/module_bindings/finalize_custom_world_agent_message_turn_procedure.rs diff --git a/docs/technical/CUSTOM_WORLD_AGENT_LLM_REPLY_RESTORE_2026-04-22.md b/docs/technical/CUSTOM_WORLD_AGENT_LLM_REPLY_RESTORE_2026-04-22.md new file mode 100644 index 00000000..8c8a36a3 --- /dev/null +++ b/docs/technical/CUSTOM_WORLD_AGENT_LLM_REPLY_RESTORE_2026-04-22.md @@ -0,0 +1,179 @@ +# Custom World Agent 大模型对话恢复设计 + +日期:`2026-04-22` + +## 1. 背景 + +当前 Rust `server-rs` 里的 Custom World Agent 聊天链路已经接上了会话、消息、operation 与 SSE 外壳,但**并没有真正调用大模型生成聊天回复**。 + +现状问题: + +1. `submit_custom_world_agent_message` 在 `spacetime-module` 中直接写死 assistant 回复。 +2. `/api/runtime/custom-world/agent/sessions/:sessionId/messages/stream` 只是把最后一条 assistant 文案一次性回放给前端。 +3. 旧 `server-node` 已经实现过完整的大模型单轮推理链,包括: + - 动态状态识别 + - 原样提示词拼装 + - 流式 `replyText` 截取 + - 回合结束后的 anchor / creator intent / readiness / clarification / suggested action 派生 + +用户本轮要求是: + +1. 恢复 Agent 聊天对话使用大模型推理生成回复。 +2. 把之前 Node 的提示词和后台流程恢复到 Rust 后端。 +3. **禁止修改提示词正文。** + +## 2. 目标 + +本轮只恢复 Custom World Agent 聊天主链的真实推理闭环: + +1. 用户发消息后,assistant 回复必须来自大模型。 +2. SSE `reply_delta` 必须来自真实流式推理增量。 +3. 回合结束后要把 session 派生状态一次性回写到 SpacetimeDB。 +4. 旧 Node `eightAnchorPrompts.ts` 的提示词正文保持原样,不改中文文案。 + +## 3. 约束 + +### 3.1 SpacetimeDB 约束 + +SpacetimeDB reducer / procedure 必须保持确定性,因此: + +1. 禁止在 `spacetime-module` 内直接发起 LLM 网络请求。 +2. LLM 调用必须放在 `api-server`。 +3. `spacetime-module` 只负责提交消息、记录 operation、回写最终结果。 + +### 3.2 提示词冻结约束 + +本轮严格复用旧 Node 的以下提示词内容: + +1. `server-node/src/prompts/eightAnchorPrompts.ts` +2. `BASE_SYSTEM_PROMPT` +3. `GLOBAL_HARD_RULES` +4. `MODE_RULES` +5. `USER_SIGNAL_RULES` +6. `QUICK_FILL_EXTRA_RULES` +7. `STATE_INFERENCE_SYSTEM_PROMPT` +8. `STATE_INFERENCE_OUTPUT_CONTRACT` +9. `OUTPUT_CONTRACT_REMINDER` + +允许做的只有: + +1. Rust 字符串字面量搬运 +2. Rust 函数式重组 +3. Rust/Serde 语法等价改写 + +不允许: + +1. 修改提示词正文 +2. 调整规则措辞 +3. 替换成新的 prompt 版本 + +## 4. 目标链路 + +恢复后的消息链路改成两阶段: + +### 4.1 阶段 A:提交消息 + +`submit_custom_world_agent_message` + +职责: + +1. 校验 session / message / operation id。 +2. 只写入 user message。 +3. 创建 `process_message` operation。 +4. operation 初始状态写为 `running`。 +5. 不直接写 assistant message。 +6. 不直接推进 progress / stage / current_turn。 + +### 4.2 阶段 B:完成单轮推理 + +`finalize_custom_world_agent_message_turn` + +职责: + +1. 校验 session 与 operation 所属关系。 +2. 追加 assistant message。 +3. 回写 session 聚合字段: + - `current_turn` + - `progress_percent` + - `stage` + - `focus_card_id` + - `anchor_content_json` + - `creator_intent_json` + - `creator_intent_readiness_json` + - `anchor_pack_json` + - `draft_profile_json` + - `last_assistant_reply` + - `pending_clarifications_json` + - `suggested_actions_json` + - `recommended_replies_json` + - `quality_findings_json` + - `asset_coverage_json` +3. 更新对应 operation 为 `completed` 或 `failed`。 + +## 5. `api-server` 责任 + +`api-server` 新增 Custom World Agent turn service,负责: + +1. 读取当前 session 快照。 +2. 按旧 Node 逻辑构造 chat history。 +3. 先走“动态状态识别”推理。 +4. 再走“正式单轮输出”推理。 +5. 流式阶段从 JSON 片段里增量截取 `replyText`,持续往 SSE 发 `reply_delta`。 +6. 回合结束后派生: + - creator intent + - readiness + - pending clarifications + - suggested actions + - anchor pack + - draft profile + - quality findings + - asset coverage +7. 最后调用 SpacetimeDB finalize procedure 回写真相。 + +## 6. 旧 Node 逻辑恢复范围 + +本轮恢复以下旧 Node 行为: + +1. `eightAnchorPrompts.ts` +2. `eightAnchorSingleTurnService.ts` +3. `customWorldAgentMessageTurnService.ts` +4. `customWorldAgentClarificationService.ts` +5. `customWorldAgentIntentExtractionService.ts` +6. `customWorldAgentSuggestedActionService.ts` +7. `eightAnchorCompatibilityService.ts` 中聊天链需要的 anchor / progress 派生 + +本轮不强制一比一恢复整条结果页重编译链,只恢复聊天链真正依赖的最小派生结果。 + +## 7. SSE 口径 + +恢复后 `/messages/stream` 必须按以下顺序输出: + +1. 多个 `reply_delta` +2. 一个 `session` +3. 一个 `done` + +错误时输出: + +1. `error` + +要求: + +1. `reply_delta.text` 来源于 `platform-llm.stream_text(...)` 的真实增量。 +2. `session` 必须来自 finalize 完成后的最新 session 真相。 + +## 8. 验收 + +1. 用户发一条 Agent 消息后,assistant 回复不再是固定文案。 +2. `quickFillRequested=true` 时,推理结果仍遵循旧 Node 的 `force_complete` 逻辑。 +3. SSE 能先看到逐步增长的 `reply_delta`,而不是一次性整段返回。 +4. finalize 完成后,前端拿到的 session 中: + - `lastAssistantReply` + - `messages` + - `currentTurn` + - `progressPercent` + - `stage` + - `pendingClarifications` + - `suggestedActions` + 已被真实更新。 +5. 提示词正文未被改写。 + diff --git a/docs/technical/PLATFORM_ENTRY_AUTH_GUARD_AND_ASSET_404_DEDUP_FIX_2026-04-22.md b/docs/technical/PLATFORM_ENTRY_AUTH_GUARD_AND_ASSET_404_DEDUP_FIX_2026-04-22.md index 162ba179..36c78327 100644 --- a/docs/technical/PLATFORM_ENTRY_AUTH_GUARD_AND_ASSET_404_DEDUP_FIX_2026-04-22.md +++ b/docs/technical/PLATFORM_ENTRY_AUTH_GUARD_AND_ASSET_404_DEDUP_FIX_2026-04-22.md @@ -99,10 +99,9 @@ 这次实际是前后端两层边界叠加: 1. Node 代理路由 `server-node/src/routes/puzzleProxyRoutes.ts` 已经完成外层 JWT 校验,并把用户 id 通过内部转发头带给 Rust API。 -2. Rust API `server-rs/crates/api-server/src/auth.rs` 之前只允许 `big-fish` 路径信任这类内部转发头,没有把 `/api/runtime/puzzle/**` 纳入白名单。 -3. 因此拼图代理链路会在 Node 首层通过后,Rust 二跳再次因为“缺少 Bearer”返回 `401`。 -4. 前端 `fetchWithApiAuth(...)` 在“首个 401 -> refresh 成功 -> 重试后的业务请求仍 401”时,又会把刚刷新到的 token 清掉并广播一次全局鉴权变更。 -5. `AuthGate` 监听到事件后重新 hydrate,平台入口又重新预取拼图作品列表,于是形成循环。 +2. Rust API `server-rs/crates/api-server/src/auth.rs` 现已允许 `/api/runtime/puzzle/**` 复用内部已鉴权转发头;如果本地进程未重启到新代码,仍可能出现旧行为。 +3. 前端 `fetchWithApiAuth(...)` 在“首个 401 -> refresh 成功 -> 重试后的业务请求仍 401”时,旧实现会把刚刷新到的 token 清掉并广播一次全局鉴权变更。 +4. `AuthGate` 监听到事件后重新 hydrate,平台入口又重新预取拼图作品列表,于是形成循环。 ### 6.3 修复策略 @@ -110,7 +109,8 @@ - `/api/runtime/big-fish/**` - `/api/runtime/puzzle/**` 2. 前端 `fetchWithApiAuth(...)` 调整 401 后置处理: - - 只有“尚未尝试 refresh”的 401,才清 token 并广播鉴权变化 + - refresh 成功后不再立即广播全局鉴权变化 + - 只有“尚未尝试 refresh 且最终确认登录态失效”的 401,才清 token 并广播鉴权变化 - 若 refresh 已成功,但重试请求仍返回 401,则保留新 token,把失败收敛为当前业务请求自身错误 3. 补充请求层回归测试,覆盖“refresh 成功但重试仍 401”的场景。 diff --git a/docs/technical/README.md b/docs/technical/README.md index fb2ff92b..671d68e3 100644 --- a/docs/technical/README.md +++ b/docs/technical/README.md @@ -4,6 +4,7 @@ ## 文档列表 +- [CUSTOM_WORLD_AGENT_LLM_REPLY_RESTORE_2026-04-22.md](./CUSTOM_WORLD_AGENT_LLM_REPLY_RESTORE_2026-04-22.md):恢复 Custom World Agent 聊天必须走大模型推理的 Rust 落地方案,冻结 submit/finalize 两阶段职责、旧 Node 提示词原样搬运、SSE 流式回复与 session 回写边界。 - [CREATION_HUB_CARD_ACTIONS_2026-04-22.md](./CREATION_HUB_CARD_ACTIONS_2026-04-22.md):冻结创作中心作品卡“体验 / 删除”入口的最小落地语义,明确 RPG 已发布作品软删除、卡片直达运行时,以及暂不扩草稿 / 拼图删除契约。 - [CREATION_CATEGORY_OPENING_TIMEOUT_GUARD_FIX_2026-04-22.md](./CREATION_CATEGORY_OPENING_TIMEOUT_GUARD_FIX_2026-04-22.md):记录创作中心点击类别后长时间停留在“正在开启”的根因与修复口径,收口前端创建会话启动超时、中文错误提示以及 Big Fish / 拼图代理上游超时兜底。 - [RUST_LOCAL_AND_REMOTE_DEPLOYMENT_SCRIPTS_2026-04-22.md](./RUST_LOCAL_AND_REMOTE_DEPLOYMENT_SCRIPTS_2026-04-22.md):冻结 Rust 本地一键联调脚本与 Ubuntu 发布包构建脚本的执行口径,覆盖 `npm run dev:rust`、`npm run build:rust:ubuntu`、Vite release、Linux `api-server`、SpacetimeDB wasm、启动停止脚本、默认 scp 上传和安全清库开关。 diff --git a/server-rs/Cargo.lock b/server-rs/Cargo.lock index 5765b502..9e3fca47 100644 --- a/server-rs/Cargo.lock +++ b/server-rs/Cargo.lock @@ -69,6 +69,7 @@ checksum = "170433209e817da6aae2c51aa0dd443009a613425dd041ebfb2492d1c4c11a25" name = "api-server" version = "0.1.0" dependencies = [ + "async-stream", "axum", "base64 0.22.1", "bytes", @@ -145,6 +146,28 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "atomic-waker" version = "1.1.2" diff --git a/server-rs/crates/api-server/Cargo.toml b/server-rs/crates/api-server/Cargo.toml index 15804d54..868b834d 100644 --- a/server-rs/crates/api-server/Cargo.toml +++ b/server-rs/crates/api-server/Cargo.toml @@ -5,6 +5,7 @@ version.workspace = true license.workspace = true [dependencies] +async-stream = "0.3" axum = "0.8" base64 = "0.22" bytes = "1" diff --git a/server-rs/crates/api-server/src/custom_world.rs b/server-rs/crates/api-server/src/custom_world.rs index 8a8241f9..dd8cbb92 100644 --- a/server-rs/crates/api-server/src/custom_world.rs +++ b/server-rs/crates/api-server/src/custom_world.rs @@ -41,6 +41,9 @@ use std::convert::Infallible; use crate::{ api_response::json_success_body, auth::AuthenticatedAccessToken, http_error::AppError, + custom_world_agent_turn::{ + CustomWorldAgentTurnRequest, build_finalize_record_input, run_custom_world_agent_turn, + }, request_context::RequestContext, state::AppState, }; @@ -528,21 +531,56 @@ pub async fn submit_custom_world_agent_message( )); } + let owner_user_id = authenticated.claims().user_id().to_string(); + let operation_id = build_prefixed_uuid_id("operation-"); + let submitted_at_micros = current_utc_micros(); let operation = state .spacetime_client() .submit_custom_world_agent_message(CustomWorldAgentMessageSubmitRecordInput { - session_id, - owner_user_id: authenticated.claims().user_id().to_string(), + session_id: session_id.clone(), + owner_user_id: owner_user_id.clone(), user_message_id: client_message_id, user_message_text: message_text, - operation_id: build_prefixed_uuid_id("operation-"), - submitted_at_micros: current_utc_micros(), + operation_id: operation_id.clone(), + submitted_at_micros, }) .await .map_err(|error| { custom_world_error_response(&request_context, map_custom_world_client_error(error)) })?; + let session = state + .spacetime_client() + .get_custom_world_agent_session(session_id.clone(), owner_user_id.clone()) + .await + .map_err(|error| { + custom_world_error_response(&request_context, map_custom_world_client_error(error)) + })?; + let turn_result = run_custom_world_agent_turn( + CustomWorldAgentTurnRequest { + llm_client: state.llm_client(), + session: &session, + quick_fill_requested: payload.quick_fill_requested.unwrap_or(false), + focus_card_id: payload.focus_card_id.clone(), + }, + |_| {}, + ) + .await; + state + .spacetime_client() + .finalize_custom_world_agent_message(build_finalize_record_input( + session_id, + owner_user_id, + operation_id, + format!("assistant-{}", operation.operation_id), + turn_result, + current_utc_micros(), + )) + .await + .map_err(|error| { + custom_world_error_response(&request_context, map_custom_world_client_error(error)) + })?; + Ok(json_success_body( Some(&request_context), json!({ @@ -591,7 +629,7 @@ pub async fn stream_custom_world_agent_message( } let owner_user_id = authenticated.claims().user_id().to_string(); - state + let operation = state .spacetime_client() .submit_custom_world_agent_message(CustomWorldAgentMessageSubmitRecordInput { session_id: session_id.clone(), @@ -607,31 +645,63 @@ pub async fn stream_custom_world_agent_message( })?; let session = state + .spacetime_client() + .get_custom_world_agent_session(session_id.clone(), owner_user_id.clone()) + .await + .map_err(|error| { + custom_world_error_response(&request_context, map_custom_world_client_error(error)) + })?; + let mut reply_updates = Vec::::new(); + let turn_result = run_custom_world_agent_turn( + CustomWorldAgentTurnRequest { + llm_client: state.llm_client(), + session: &session, + quick_fill_requested: payload.quick_fill_requested.unwrap_or(false), + focus_card_id: payload.focus_card_id.clone(), + }, + |text| { + reply_updates.push(text.to_string()); + }, + ) + .await; + state + .spacetime_client() + .finalize_custom_world_agent_message(build_finalize_record_input( + session_id.clone(), + owner_user_id.clone(), + operation.operation_id.clone(), + format!("assistant-{}", operation.operation_id), + turn_result, + current_utc_micros(), + )) + .await + .map_err(|error| { + custom_world_error_response(&request_context, map_custom_world_client_error(error)) + })?; + let final_session = state .spacetime_client() .get_custom_world_agent_session(session_id, owner_user_id) .await .map_err(|error| { custom_world_error_response(&request_context, map_custom_world_client_error(error)) })?; - let session_response = map_custom_world_agent_session_response(session); - let reply_text = resolve_stream_reply_text(&session_response); + let session_response = map_custom_world_agent_session_response(final_session); - // 这里仍保持“一次性返回完整事件序列”的兼容语义; - // SSE 编码、标准响应头与 body frame 交给 Axum 内建实现维护。 - let events = vec![ - custom_world_sse_json_event("reply_delta", json!({ "text": reply_text })) - .map_err(|error| custom_world_error_response(&request_context, error))?, + let mut events = reply_updates + .into_iter() + .map(|text| custom_world_sse_json_event("reply_delta", json!({ "text": text }))) + .collect::, _>>() + .map_err(|error| custom_world_error_response(&request_context, error))?; + events.push( custom_world_sse_json_event("session", json!({ "session": session_response })) .map_err(|error| custom_world_error_response(&request_context, error))?, + ); + events.push( custom_world_sse_json_event("done", json!({ "ok": true })) .map_err(|error| custom_world_error_response(&request_context, error))?, - ]; - let stream = tokio_stream::iter( - events - .into_iter() - .map(|event| Ok::(event)), ); + let stream = tokio_stream::iter(events.into_iter().map(|event| Ok::(event))); Ok(Sse::new(stream).into_response()) } diff --git a/server-rs/crates/api-server/src/custom_world_agent_turn.rs b/server-rs/crates/api-server/src/custom_world_agent_turn.rs new file mode 100644 index 00000000..d593edf7 --- /dev/null +++ b/server-rs/crates/api-server/src/custom_world_agent_turn.rs @@ -0,0 +1,2011 @@ +use module_custom_world::{ + empty_agent_anchor_content_json, empty_agent_asset_coverage_json, + empty_agent_creator_intent_readiness_json, empty_json_array, empty_json_object, +}; +use platform_llm::{LlmClient, LlmMessage, LlmStreamDelta, LlmTextRequest}; +use serde::{Deserialize, Serialize}; +use serde_json::{Value as JsonValue, json}; +use spacetime_client::{ + CustomWorldAgentMessageFinalizeRecordInput, CustomWorldAgentMessageRecord, + CustomWorldAgentSessionRecord, +}; + +#[derive(Clone, Debug)] +pub(crate) struct CustomWorldAgentTurnRequest<'a> { + pub llm_client: Option<&'a LlmClient>, + pub session: &'a CustomWorldAgentSessionRecord, + pub quick_fill_requested: bool, + pub focus_card_id: Option, +} + +#[derive(Clone, Debug)] +pub(crate) struct CustomWorldAgentTurnResult { + pub assistant_reply_text: String, + pub phase_label: String, + pub phase_detail: String, + pub operation_status: String, + pub operation_progress: u32, + pub stage: String, + pub progress_percent: u32, + pub focus_card_id: Option, + pub anchor_content_json: String, + pub creator_intent_json: Option, + pub creator_intent_readiness_json: String, + pub anchor_pack_json: Option, + pub draft_profile_json: Option, + pub pending_clarifications_json: String, + pub suggested_actions_json: String, + pub recommended_replies_json: String, + pub quality_findings_json: String, + pub asset_coverage_json: String, + pub error_message: Option, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum PromptUserInputSignal { + Rich, + Normal, + Sparse, + Correction, + Delegate, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum PromptDriftRisk { + Low, + Medium, + High, +} + +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +enum PromptConversationMode { + Bootstrap, + Expand, + Compress, + RepairDirection, + ForceComplete, + Closing, +} + +#[derive(Clone, Debug)] +struct PromptDynamicState { + current_turn: u32, + progress_percent: u32, + user_input_signal: PromptUserInputSignal, + drift_risk: PromptDriftRisk, + quick_fill_requested: bool, + conversation_mode: PromptConversationMode, + judgement_summary: String, +} + +#[derive(Clone, Debug, Default)] +struct PromptDynamicStateInference { + user_input_signal: Option, + drift_risk: Option, + conversation_mode: Option, + judgement_summary: Option, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct WorldPromiseValue { + #[serde(default)] + hook: String, + #[serde(default)] + differentiator: String, + #[serde(default)] + desired_experience: String, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct PlayerFantasyValue { + #[serde(default)] + player_role: String, + #[serde(default)] + core_pursuit: String, + #[serde(default)] + fear_of_loss: String, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct ThemeBoundaryValue { + #[serde(default)] + tone_keywords: Vec, + #[serde(default)] + aesthetic_directives: Vec, + #[serde(default)] + forbidden_directives: Vec, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct PlayerEntryPointValue { + #[serde(default)] + opening_identity: String, + #[serde(default)] + opening_problem: String, + #[serde(default)] + entry_motivation: String, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct CoreConflictValue { + #[serde(default)] + surface_conflicts: Vec, + #[serde(default)] + hidden_crisis: String, + #[serde(default)] + first_touched_conflict: String, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct KeyRelationshipValue { + #[serde(default)] + pairs: String, + #[serde(default)] + relationship_type: String, + #[serde(default)] + secret_or_cost: String, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct HiddenLineValue { + #[serde(default)] + hidden_truths: Vec, + #[serde(default)] + misdirection_hints: Vec, + #[serde(default)] + reveal_pacing: String, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct IconicElementValue { + #[serde(default)] + iconic_motifs: Vec, + #[serde(default)] + institutions_or_artifacts: Vec, + #[serde(default)] + hard_rules: Vec, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct EightAnchorContent { + #[serde(default)] + world_promise: Option, + #[serde(default)] + player_fantasy: Option, + #[serde(default)] + theme_boundary: Option, + #[serde(default)] + player_entry_point: Option, + #[serde(default)] + core_conflict: Option, + #[serde(default)] + key_relationships: Vec, + #[serde(default)] + hidden_lines: Option, + #[serde(default)] + iconic_elements: Option, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct CreatorCharacterSeedRecord { + id: String, + name: String, + role: String, + public_mask: String, + hidden_hook: String, + relation_to_player: String, + notes: String, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct CreatorLandmarkSeedRecord { + id: String, + name: String, + purpose: String, + mood: String, + secret: String, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct CreatorIntentRecord { + source_mode: String, + raw_setting_text: String, + world_hook: String, + theme_keywords: Vec, + tone_directives: Vec, + player_premise: String, + opening_situation: String, + core_conflicts: Vec, + key_characters: Vec, + key_landmarks: Vec, + iconic_elements: Vec, + forbidden_directives: Vec, +} + +#[derive(Clone, Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +struct CreatorIntentReadiness { + is_ready: bool, + completed_keys: Vec, + missing_keys: Vec, +} + +#[derive(Clone, Debug)] +struct SingleTurnModelOutput { + next_anchor_content: EightAnchorContent, + progress_percent: u32, + reply_text: String, + fallback_error: Option, +} + +const BASE_SYSTEM_PROMPT: &str = r#"你是一个负责共创游戏世界设定的专业策划。 + +你正在和用户一起共创一个游戏世界。每一轮你都必须读取: +1. 当前完整设定结构 +2. 用户聊天记录 + +然后输出: +1. 一版新的完整设定结构 +2. 当前 progress 百分比 +3. 一段直接回复用户的话 + +你必须把“新的完整设定结构”视为下一轮的唯一有效版本。 +你的输出会直接覆盖上一版设定结构。 + +你不是在做局部 patch。 +你不是在做解释报告。 +你不是在给开发者写分析。 +你是在同时完成: +1. 世界设定更新 +2. 当前推进程度判断 +3. 对用户的共创回复"#; + +const GLOBAL_HARD_RULES: &str = r#"全局硬约束: + +1. 必须输出完整的设定结构,而不是只输出变化部分。 +2. 新的设定结构会直接覆盖旧内容,因此不得随意丢失仍然成立的重要信息。 +3. 如果用户明确修正旧设定,必须在新的设定结构中直接体现修正结果。 +4. 如果用户输入信息不足,可以保留上一版中仍然成立的内容。 +5. progressPercent 最低为 0,不允许为负数。 +6. replyText 会直接发送给用户,因此要自然、直接、可继续聊天。 +7. 不要输出额外解释,不要输出 markdown 代码块,不要输出开发备注。 +8. replyText 不要写成长篇策划文,不要展开大段世界观百科。 +9. replyText 默认只推进当前最关键的一步,不要同时抛出很多话题。 +10. replyText 不要提及“八锚点”“锚点”“结构字段”“框架字段”等内部概念词。 +11. 你输出的 JSON 必须可以被直接解析。 +12. 输出字段顺序必须固定为:replyText、progressPercent、nextAnchorContent。"#; + +const QUICK_FILL_EXTRA_RULES: &str = r#"用户刚刚主动要求你自动补全剩余设定。 + +这表示用户接受你基于当前方向自动补完剩余设定。 + +本轮要求: +1. 不要再继续提问 +2. 直接输出一版尽量完整的设定结构 +3. progressPercent 直接输出为 100 +4. replyText 要告诉用户现在可以进入“生成游戏设定草稿”"#; + +const STATE_INFERENCE_SYSTEM_PROMPT: &str = r#"你是正式生成世界设定前的一步“创作状态识别器”。 +你的职责不是直接生成新设定,而是先判断:下一轮正式生成应该用什么推进策略,尤其要判断 replyText 应该更偏确认、吸收、收束、纠偏,还是启发式提问。 + +你必须综合以下信息判断: +1. 当前轮次 currentTurn +2. 当前完成度 progressPercent +3. 用户是否要求自动补全 quickFillRequested +4. 当前完整设定结构 +5. 最近聊天记录,尤其是最近 1 到 3 轮用户消息 + +你需要输出 4 个字段: +1. userInputSignal:只能是 rich / normal / sparse / correction / delegate +2. driftRisk:只能是 low / medium / high +3. conversationMode:只能是 bootstrap / expand / compress / repair_direction / force_complete / closing +4. judgementSummary:1 到 2 句中文,概括你为什么这样判断,以及正式生成时最该注意什么 + +请按下面的语义判断。 + +一、userInputSignal 定义 +1. rich +- 用户这一轮给了多条可直接落地的有效信息 +- 这些信息可能同时覆盖世界方向、玩家处境、开局事件、冲突、关系、标志元素中的多个 +- 正式生成时应优先高密度吸收,不要只更新一个点 + +2. normal +- 用户在顺着当前方向做正常补充 +- 信息量中等,有明确新增内容,但没有明显推翻旧方向,也没有把决定权交给系统 +- 正式生成时应稳定推进并自然接住用户内容 + +3. sparse +- 用户输入很短、很虚、很笼统,或几乎没有新增有效事实 +- 例如只有一个题材词、一个气质词、一句很概括的话、一个很短的倾向表达 +- 这种情况下,正式生成阶段的 replyText 应优先采用启发式提问 +- 启发式提问的要求是:只问一个最容易回答、最能推动落地设计的问题 + +4. correction +- 用户这轮核心动作是在修正、替换、推翻、重定向旧设定 +- 即使文字不长,只要主意图是“之前那个不对,现在改成这个”,也应优先判为 correction +- correction 的优先级高于 rich 和 normal + +5. delegate +- 用户把部分决定权交给系统 +- 例如“你来定”“你帮我补”“按你觉得合理的来”“先给我一个默认方案” +- delegate 关注的是授权关系,不只是信息多寡 + +二、driftRisk 定义 +1. low +- 当前轮输入与已有方向基本一致 +- 没有明显改口或冲突 + +2. medium +- 当前轮带来一定方向变化或扩张 +- 还没有明显推翻旧方向,但如果处理不好,容易让设定开始发散 + +3. high +- 用户明确纠偏、改口、替换方向,或最近多轮反复修正 +- 这时最重要的是防止旧方向重新回流到正式生成结果里 + +三、conversationMode 选择原则 +1. bootstrap +- 适用于前期、信息少、核心方向未稳定 +- replyText 更适合低压力确认和单点启发 + +2. expand +- 适用于方向已成形,正在顺着现有路线继续补充 +- replyText 更适合总结已接住的内容并往前推一步 + +3. compress +- 适用于中后段,已有骨架,需要开始收束 +- replyText 更适合聚焦最关键缺口,而不是继续开支线 + +4. repair_direction +- 适用于用户正在纠偏 +- replyText 更适合先承认修正,再沿修正后的方向继续推进 + +5. force_complete +- 适用于用户明确要求自动补全 +- replyText 不再提问,而应给出完成感和下一步引导 + +6. closing +- 适用于接近完成但并非强制一键补全 +- replyText 更像确认与收束,而不是前期式探索 + +四、优先级规则 +1. 如果 quickFillRequested 为 true,conversationMode 必须优先判为 force_complete +2. 如果用户核心意图是修正旧方向,userInputSignal 优先判为 correction,conversationMode 通常优先考虑 repair_direction +3. 如果用户核心意图是授权系统替他补完,userInputSignal 优先判为 delegate +4. 只有在没有明显纠偏、也没有明确自动补全要求时,才主要依据 currentTurn、progressPercent 和信息密度,在 bootstrap / expand / compress / closing 之间选择 + +五、关于 replyText 风格的专门判断要求 +1. 如果用户输入较少、较虚或不够落地,正式生成阶段的 replyText 应采用启发式提问 +2. 启发式提问一次最多只能提 1 个问题,不能连问两个或更多 +3. 启发式提问必须问“最能推动当前设计落地”的那个问题,而不是泛泛而谈 +4. 如果用户输入已经足够 rich,就不要再机械提问,优先吸收和推进 +5. 如果用户在 correction 或 delegate 状态下,replyText 是否提问要服从更高目标:纠偏生效或代为补全,不要机械套 sparse 的问法 + +六、关于 replyText 用语的硬约束 +1. replyText 禁止提及内部结构名、锚点名、字段名、schema 名、框架词 +2. 禁止出现这类内部表达:世界承诺、玩家幻想、主题边界、玩家入口、核心冲突、关键关系、隐藏线、标志元素、字段、结构、模块、八锚点 +3. replyText 只能用通俗、直接、面向创作沟通的语言回应用户 +4. replyText 应该围绕用户正在讨论的具体内容来落地,比如身份、开场处境、冲突、人物关系、地点、规则、气质,而不是抽象谈结构 +5. judgementSummary 可以简洁提到“这轮更适合启发式提问”或“这轮应优先吸收修正”,但也不要堆内部术语 + +七、关于 judgementSummary 的写法 +1. 必须简洁,不要写成长篇分析 +2. 必须直接服务于下一轮正式生成 +3. 最好同时包含两层信息: +- 为什么这么判断 +- 正式生成时最该优先做什么,或最该避免什么 + +八、硬性约束 +1. 只能输出 JSON,不能输出解释、代码块或额外说明 +2. 不能发明上下文里不存在的设定事实 +3. 你的任务是“判断生成策略”,不是“代替正式生成直接写新设定” +4. 即使信息不完全,也必须在给定枚举里选出最合理的一组状态 +5. judgementSummary 必须是中文 +6. 输出值必须严格落在给定枚举中"#; + +const STATE_INFERENCE_OUTPUT_CONTRACT: &str = r#"请严格按以下 JSON 结构输出,不要输出其他文字: +{ + "userInputSignal": "normal", + "driftRisk": "low", + "conversationMode": "expand", + "judgementSummary": "" +}"#; + +const OUTPUT_CONTRACT_REMINDER: &str = r#"请严格按以下 JSON 结构输出,不要输出其他文字: +{ + "replyText": "", + "progressPercent": 0, + "nextAnchorContent": { + "worldPromise": { + "hook": "", + "differentiator": "", + "desiredExperience": "" + }, + "playerFantasy": { + "playerRole": "", + "corePursuit": "", + "fearOfLoss": "" + }, + "themeBoundary": { + "toneKeywords": [], + "aestheticDirectives": [], + "forbiddenDirectives": [] + }, + "playerEntryPoint": { + "openingIdentity": "", + "openingProblem": "", + "entryMotivation": "" + }, + "coreConflict": { + "surfaceConflicts": [], + "hiddenCrisis": "", + "firstTouchedConflict": "" + }, + "keyRelationships": [ + { + "pairs": "", + "relationshipType": "", + "secretOrCost": "" + } + ], + "hiddenLines": { + "hiddenTruths": [], + "misdirectionHints": [], + "revealPacing": "" + }, + "iconicElements": { + "iconicMotifs": [], + "institutionsOrArtifacts": [], + "hardRules": [] + } + } +}"#; + +pub(crate) async fn run_custom_world_agent_turn( + request: CustomWorldAgentTurnRequest<'_>, + on_reply_update: F, +) -> CustomWorldAgentTurnResult +where + F: FnMut(&str), +{ + let current_anchor_content = normalize_eight_anchor_content(&request.session.anchor_content); + let should_preserve_draft_stage = matches!( + request.session.stage.as_str(), + "object_refining" | "visual_refining" + ) && !request.session.draft_cards.is_empty(); + let assistant_turn = stream_single_turn( + request.llm_client, + request.session.messages.as_slice(), + request.session.current_turn.saturating_add(1), + request.session.progress_percent, + request.quick_fill_requested, + ¤t_anchor_content, + on_reply_update, + ) + .await; + + let next_anchor_content = assistant_turn.next_anchor_content.clone(); + let next_creator_intent = build_creator_intent_from_eight_anchor_content(&next_anchor_content); + let progress_percent = assistant_turn.progress_percent; + let creator_intent_readiness = if progress_percent >= 100 { + CreatorIntentReadiness { + is_ready: true, + completed_keys: vec![ + "world_hook".to_string(), + "player_premise".to_string(), + "theme_and_tone".to_string(), + "core_conflict".to_string(), + "relationship_seed".to_string(), + "iconic_element".to_string(), + ], + missing_keys: Vec::new(), + } + } else { + evaluate_creator_intent_readiness(&next_creator_intent) + }; + let derived_stage = resolve_creator_intent_stage(true, &creator_intent_readiness); + let should_stay_in_draft_stage = should_preserve_draft_stage && progress_percent >= 100; + let next_stage = if should_stay_in_draft_stage { + if request.session.stage == "visual_refining" { + "visual_refining".to_string() + } else { + "object_refining".to_string() + } + } else { + derived_stage.to_string() + }; + + let anchor_content_json = serialize_json( + &serde_json::to_value(&next_anchor_content).unwrap_or_else(|_| json!({})), + &empty_agent_anchor_content_json(), + ); + let creator_intent_json = Some(serialize_json( + &serde_json::to_value(&next_creator_intent).unwrap_or_else(|_| json!({})), + &empty_json_object(), + )); + let creator_intent_readiness_json = serialize_json( + &serde_json::to_value(&creator_intent_readiness).unwrap_or_else(|_| json!({})), + &empty_agent_creator_intent_readiness_json(), + ); + let anchor_pack_json = Some(serialize_json( + &build_anchor_pack_from_eight_anchor_content(&next_anchor_content, progress_percent), + &empty_json_object(), + )); + + let pending_clarifications_json = if should_stay_in_draft_stage || progress_percent >= 100 { + empty_json_array() + } else { + serialize_json( + &JsonValue::Array(build_pending_clarifications( + &next_creator_intent, + &creator_intent_readiness, + )), + &empty_json_array(), + ) + }; + let suggested_actions_json = if should_stay_in_draft_stage { + serialize_json( + &JsonValue::Array( + request + .session + .suggested_actions + .iter() + .cloned() + .collect::>(), + ), + &empty_json_array(), + ) + } else if progress_percent >= 100 { + r#"[{"id":"draft_foundation","type":"draft_foundation","label":"生成游戏设定草稿"}]"# + .to_string() + } else { + empty_json_array() + }; + let recommended_replies_json = empty_json_array(); + let quality_findings_json = if should_stay_in_draft_stage { + serialize_json( + &JsonValue::Array( + request + .session + .quality_findings + .iter() + .cloned() + .collect::>(), + ), + &empty_json_array(), + ) + } else { + empty_json_array() + }; + let asset_coverage_json = if should_stay_in_draft_stage { + serialize_json(&request.session.asset_coverage, &empty_agent_asset_coverage_json()) + } else { + empty_agent_asset_coverage_json() + }; + let draft_profile_json = if should_stay_in_draft_stage { + Some(serialize_json( + &request.session.draft_profile, + &empty_json_object(), + )) + } else { + Some(serialize_json( + &build_minimal_draft_profile_from_intent(&next_creator_intent), + &empty_json_object(), + )) + }; + + let (phase_label, phase_detail, operation_status, operation_progress, error_message) = + match assistant_turn.fallback_error { + Some(message) => ( + "模型暂不可用".to_string(), + message.clone(), + "failed".to_string(), + 100, + Some(message), + ), + None => ( + "消息已处理".to_string(), + "本轮回复已由大模型生成并回写会话。".to_string(), + "completed".to_string(), + 100, + None, + ), + }; + + CustomWorldAgentTurnResult { + assistant_reply_text: assistant_turn.reply_text, + phase_label, + phase_detail, + operation_status, + operation_progress, + stage: next_stage, + progress_percent, + focus_card_id: if should_stay_in_draft_stage { + request.session.focus_card_id.clone() + } else { + request.focus_card_id + }, + anchor_content_json, + creator_intent_json, + creator_intent_readiness_json, + anchor_pack_json, + draft_profile_json, + pending_clarifications_json, + suggested_actions_json, + recommended_replies_json, + quality_findings_json, + asset_coverage_json, + error_message, + } +} + +pub(crate) fn build_finalize_record_input( + session_id: String, + owner_user_id: String, + operation_id: String, + assistant_message_id: String, + result: CustomWorldAgentTurnResult, + updated_at_micros: i64, +) -> CustomWorldAgentMessageFinalizeRecordInput { + CustomWorldAgentMessageFinalizeRecordInput { + session_id, + owner_user_id, + operation_id, + assistant_message_id, + assistant_reply_text: result.assistant_reply_text, + phase_label: result.phase_label, + phase_detail: result.phase_detail, + operation_status: result.operation_status, + operation_progress: result.operation_progress, + stage: result.stage, + progress_percent: result.progress_percent, + focus_card_id: result.focus_card_id, + anchor_content_json: result.anchor_content_json, + creator_intent_json: result.creator_intent_json, + creator_intent_readiness_json: result.creator_intent_readiness_json, + anchor_pack_json: result.anchor_pack_json, + draft_profile_json: result.draft_profile_json, + pending_clarifications_json: result.pending_clarifications_json, + suggested_actions_json: result.suggested_actions_json, + recommended_replies_json: result.recommended_replies_json, + quality_findings_json: result.quality_findings_json, + asset_coverage_json: result.asset_coverage_json, + error_message: result.error_message, + updated_at_micros, + } +} + +async fn stream_single_turn( + llm_client: Option<&LlmClient>, + messages: &[CustomWorldAgentMessageRecord], + current_turn: u32, + progress_percent: u32, + quick_fill_requested: bool, + current_anchor_content: &EightAnchorContent, + mut on_reply_update: F, +) -> SingleTurnModelOutput +where + F: FnMut(&str), +{ + if llm_client.is_none() { + let fallback = build_unavailable_output(current_anchor_content, progress_percent, true); + on_reply_update(fallback.reply_text.as_str()); + return fallback; + } + + let llm_client = llm_client.expect("checked above"); + let chat_history = build_chat_history(messages); + let dynamic_state = + resolve_dynamic_state(llm_client, current_turn, progress_percent, quick_fill_requested, current_anchor_content, &chat_history) + .await; + let prompt = build_eight_anchor_single_turn_prompt( + current_turn, + progress_percent, + quick_fill_requested, + current_anchor_content, + &chat_history, + &dynamic_state, + ); + let mut latest_reply_text = String::new(); + + let response = llm_client + .stream_text( + LlmTextRequest::new(vec![ + LlmMessage::system(prompt), + LlmMessage::user("请按约定输出这一轮的 JSON。"), + ]), + |delta: &LlmStreamDelta| { + if let Some(reply_progress) = + extract_reply_text_from_partial_json(delta.accumulated_text.as_str()) + && reply_progress != latest_reply_text + { + latest_reply_text = reply_progress.clone(); + on_reply_update(reply_progress.as_str()); + } + }, + ) + .await; + + let Ok(response) = response else { + let fallback = build_unavailable_output(current_anchor_content, progress_percent, false); + if fallback.reply_text != latest_reply_text { + on_reply_update(fallback.reply_text.as_str()); + } + return fallback; + }; + + let Ok(parsed) = parse_json_response_text(response.content.as_str()) else { + let fallback = build_unavailable_output(current_anchor_content, progress_percent, false); + if fallback.reply_text != latest_reply_text { + on_reply_update(fallback.reply_text.as_str()); + } + return fallback; + }; + + let next_anchor_content = normalize_eight_anchor_content( + parsed + .get("nextAnchorContent") + .unwrap_or(&JsonValue::Null), + ); + let progress_percent = if quick_fill_requested { + 100 + } else { + clamp_progress_percent(parsed.get("progressPercent")) + }; + let reply_text = to_text(parsed.get("replyText")).unwrap_or_else(|| { + build_unavailable_output(current_anchor_content, progress_percent, false).reply_text + }); + if reply_text != latest_reply_text { + on_reply_update(reply_text.as_str()); + } + + SingleTurnModelOutput { + next_anchor_content, + progress_percent, + reply_text, + fallback_error: None, + } +} + +async fn resolve_dynamic_state( + llm_client: &LlmClient, + current_turn: u32, + progress_percent: u32, + quick_fill_requested: bool, + current_anchor_content: &EightAnchorContent, + chat_history: &[JsonValue], +) -> PromptDynamicState { + let fallback = build_prompt_dynamic_state( + current_turn, + progress_percent, + quick_fill_requested, + current_anchor_content, + chat_history, + None, + ); + let (system_prompt, user_prompt) = build_prompt_dynamic_state_inference_prompt( + current_turn, + progress_percent, + quick_fill_requested, + current_anchor_content, + chat_history, + ); + + let response = llm_client + .request_text(LlmTextRequest::new(vec![ + LlmMessage::system(system_prompt), + LlmMessage::user(user_prompt), + ])) + .await; + let Ok(response) = response else { + return fallback; + }; + let Ok(parsed) = parse_json_response_text(response.content.as_str()) else { + return fallback; + }; + build_prompt_dynamic_state( + current_turn, + progress_percent, + quick_fill_requested, + current_anchor_content, + chat_history, + Some(PromptDynamicStateInference { + user_input_signal: parse_user_input_signal(parsed.get("userInputSignal")), + drift_risk: parse_drift_risk(parsed.get("driftRisk")), + conversation_mode: parse_conversation_mode(parsed.get("conversationMode")), + judgement_summary: to_text(parsed.get("judgementSummary")), + }), + ) +} + +fn build_prompt_dynamic_state( + current_turn: u32, + progress_percent: u32, + quick_fill_requested: bool, + current_anchor_content: &EightAnchorContent, + chat_history: &[JsonValue], + inference: Option, +) -> PromptDynamicState { + let fallback = build_rule_based_prompt_dynamic_state( + current_turn, + progress_percent, + quick_fill_requested, + current_anchor_content, + chat_history, + ); + let Some(inference) = inference else { + return fallback; + }; + let user_input_signal = inference.user_input_signal.unwrap_or(fallback.user_input_signal); + let drift_risk = inference.drift_risk.unwrap_or(fallback.drift_risk); + let conversation_mode = inference.conversation_mode.unwrap_or(fallback.conversation_mode); + let judgement_summary = inference + .judgement_summary + .filter(|value| !value.trim().is_empty()) + .unwrap_or_else(|| summarize_dynamic_state(user_input_signal, drift_risk, conversation_mode)); + + PromptDynamicState { + current_turn, + progress_percent, + user_input_signal, + drift_risk, + quick_fill_requested, + conversation_mode, + judgement_summary, + } +} + +fn build_rule_based_prompt_dynamic_state( + current_turn: u32, + progress_percent: u32, + quick_fill_requested: bool, + current_anchor_content: &EightAnchorContent, + chat_history: &[JsonValue], +) -> PromptDynamicState { + let user_input_signal = detect_user_input_signal(chat_history); + let drift_risk = detect_drift_risk(chat_history, current_anchor_content, progress_percent); + let conversation_mode = pick_conversation_mode( + current_turn, + progress_percent, + user_input_signal, + drift_risk, + quick_fill_requested, + ); + + PromptDynamicState { + current_turn, + progress_percent, + user_input_signal, + drift_risk, + quick_fill_requested, + conversation_mode, + judgement_summary: summarize_dynamic_state( + user_input_signal, + drift_risk, + conversation_mode, + ), + } +} + +fn build_prompt_dynamic_state_inference_prompt( + current_turn: u32, + progress_percent: u32, + quick_fill_requested: bool, + current_anchor_content: &EightAnchorContent, + chat_history: &[JsonValue], +) -> (String, String) { + ( + [STATE_INFERENCE_SYSTEM_PROMPT, STATE_INFERENCE_OUTPUT_CONTRACT].join("\n\n"), + [ + format!("当前轮次:{current_turn}"), + format!("当前完成度:{progress_percent}"), + format!( + "是否要求自动补全:{}", + if quick_fill_requested { "是" } else { "否" } + ), + render_current_anchor_context(current_anchor_content), + render_chat_history_context(chat_history), + ] + .join("\n\n"), + ) +} + +fn build_eight_anchor_single_turn_prompt( + current_turn: u32, + progress_percent: u32, + quick_fill_requested: bool, + current_anchor_content: &EightAnchorContent, + chat_history: &[JsonValue], + dynamic_state: &PromptDynamicState, +) -> String { + let mut blocks = vec![ + BASE_SYSTEM_PROMPT.to_string(), + GLOBAL_HARD_RULES.to_string(), + mode_rules(dynamic_state.conversation_mode).to_string(), + user_signal_rules(dynamic_state.user_input_signal).to_string(), + ]; + if quick_fill_requested { + blocks.push(QUICK_FILL_EXTRA_RULES.to_string()); + } + blocks.push(render_dynamic_state_context(dynamic_state)); + blocks.push(render_current_anchor_context(current_anchor_content)); + blocks.push(render_chat_history_context(chat_history)); + blocks.push(OUTPUT_CONTRACT_REMINDER.to_string()); + + blocks.join("\n\n") +} + +fn build_chat_history(messages: &[CustomWorldAgentMessageRecord]) -> Vec { + messages + .iter() + .filter(|message| { + (message.role == "user" || message.role == "assistant") && !message.text.trim().is_empty() + }) + .map(|message| { + json!({ + "role": message.role, + "content": message.text, + }) + }) + .collect() +} + +fn normalize_eight_anchor_content(value: &JsonValue) -> EightAnchorContent { + serde_json::from_value::(value.clone()).unwrap_or_default() +} + +fn build_creator_intent_from_eight_anchor_content( + anchor_content: &EightAnchorContent, +) -> CreatorIntentRecord { + let key_characters = anchor_content + .key_relationships + .iter() + .enumerate() + .map(|(index, entry)| { + let (lead_name, relation_to_player) = split_relationship_pair(entry.pairs.as_str()); + CreatorCharacterSeedRecord { + id: format!("creator-character-{}", index + 1), + name: if lead_name.is_empty() { + format!("关键人物{}", index + 1) + } else { + lead_name + }, + role: entry.relationship_type.clone(), + public_mask: String::new(), + hidden_hook: entry.secret_or_cost.clone(), + relation_to_player, + notes: String::new(), + } + }) + .collect::>(); + + let core_conflicts = anchor_content + .core_conflict + .as_ref() + .map(|value| { + value + .surface_conflicts + .iter() + .cloned() + .chain( + (!value.hidden_crisis.trim().is_empty()) + .then_some(value.hidden_crisis.clone()), + ) + .collect::>() + }) + .unwrap_or_default(); + + CreatorIntentRecord { + source_mode: "freeform".to_string(), + raw_setting_text: compact_lines([ + anchor_content + .world_promise + .as_ref() + .map(|value| value.differentiator.as_str()), + anchor_content + .player_fantasy + .as_ref() + .map(|value| value.core_pursuit.as_str()), + anchor_content + .hidden_lines + .as_ref() + .and_then(|value| value.hidden_truths.first().map(String::as_str)), + ]), + world_hook: compact_lines([ + anchor_content + .world_promise + .as_ref() + .map(|value| value.hook.as_str()), + anchor_content + .world_promise + .as_ref() + .map(|value| value.differentiator.as_str()), + ]), + theme_keywords: anchor_content + .theme_boundary + .as_ref() + .map(|value| value.tone_keywords.clone()) + .unwrap_or_default(), + tone_directives: anchor_content + .theme_boundary + .as_ref() + .map(|value| value.aesthetic_directives.clone()) + .unwrap_or_default(), + player_premise: compact_lines([ + anchor_content + .player_fantasy + .as_ref() + .map(|value| value.player_role.as_str()), + anchor_content + .player_entry_point + .as_ref() + .map(|value| value.opening_identity.as_str()), + ]), + opening_situation: compact_lines([ + anchor_content + .player_entry_point + .as_ref() + .map(|value| value.opening_problem.as_str()), + anchor_content + .player_entry_point + .as_ref() + .map(|value| value.entry_motivation.as_str()), + ]), + core_conflicts: dedupe_string_list(core_conflicts, 6), + key_characters, + key_landmarks: Vec::new(), + iconic_elements: dedupe_string_list( + anchor_content + .iconic_elements + .as_ref() + .map(|value| { + value + .iconic_motifs + .iter() + .cloned() + .chain(value.institutions_or_artifacts.iter().cloned()) + .collect::>() + }) + .unwrap_or_default(), + 8, + ), + forbidden_directives: dedupe_string_list( + anchor_content + .theme_boundary + .as_ref() + .map(|value| value.forbidden_directives.clone()) + .unwrap_or_default() + .into_iter() + .chain( + anchor_content + .iconic_elements + .as_ref() + .map(|value| value.hard_rules.clone()) + .unwrap_or_default(), + ) + .collect::>(), + 8, + ), + } +} + +fn evaluate_creator_intent_readiness(intent: &CreatorIntentRecord) -> CreatorIntentReadiness { + let relationship_ready = intent.key_characters.iter().any(|entry| { + !entry.name.trim().is_empty() + && (!entry.relation_to_player.trim().is_empty() || !entry.hidden_hook.trim().is_empty()) + }); + + let checks = [ + ( + "world_hook", + intent.world_hook.trim().chars().count() >= 8 + || intent.raw_setting_text.trim().chars().count() >= 24, + ), + ( + "player_premise", + !intent.player_premise.trim().is_empty() && !intent.opening_situation.trim().is_empty(), + ), + ( + "theme_and_tone", + !intent.theme_keywords.is_empty() && !intent.tone_directives.is_empty(), + ), + ("core_conflict", !intent.core_conflicts.is_empty()), + ( + "relationship_seed", + !intent.key_characters.is_empty() && relationship_ready, + ), + ("iconic_element", !intent.iconic_elements.is_empty()), + ]; + + let mut completed_keys = Vec::new(); + let mut missing_keys = Vec::new(); + for (key, ready) in checks { + if ready { + completed_keys.push(key.to_string()); + } else { + missing_keys.push(key.to_string()); + } + } + + CreatorIntentReadiness { + is_ready: missing_keys.is_empty(), + completed_keys, + missing_keys, + } +} + +fn resolve_creator_intent_stage(has_user_input: bool, readiness: &CreatorIntentReadiness) -> &'static str { + if readiness.is_ready { + "foundation_review" + } else if has_user_input { + "clarifying" + } else { + "collecting_intent" + } +} + +fn build_pending_clarifications( + _intent: &CreatorIntentRecord, + readiness: &CreatorIntentReadiness, +) -> Vec { + let definitions = [ + ( + "world_hook", + 1, + "世界一句话", + "先用一句话收住这个世界最独特的核心幻想,我会据此继续往下补。", + ), + ( + "player_premise", + 2, + "玩家身份与开局", + "玩家是谁,故事开场时卡在什么处境里?你可以把身份和开局困境一起告诉我。", + ), + ( + "core_conflict", + 3, + "核心冲突", + "现在推动这个世界往前走的主要冲突是什么?最好是能立刻形成剧情压力的那种。", + ), + ( + "theme_and_tone", + 4, + "主题气质", + "它整体更偏什么主题和气质?比如冷峻、压迫、浪漫、潮湿,也可以顺手告诉我不要什么。", + ), + ( + "relationship_seed", + 5, + "关键关系钩子", + "给我一个关键人物种子就行,他和玩家是什么关系,或者他藏着什么暗线?", + ), + ( + "iconic_element", + 6, + "标志性要素", + "这个世界至少给我 1 个一眼能认出来的标志性元素、机制或意象。", + ), + ]; + + definitions + .iter() + .filter(|(target_key, _, _, _)| readiness.missing_keys.iter().any(|key| key == target_key)) + .take(1) + .map(|(target_key, priority, label, question)| { + json!({ + "id": target_key, + "label": label, + "question": question, + "targetKey": target_key, + "priority": priority, + }) + }) + .collect() +} + +fn build_anchor_pack_from_eight_anchor_content( + anchor_content: &EightAnchorContent, + progress_percent: u32, +) -> JsonValue { + let intent = build_creator_intent_from_eight_anchor_content(anchor_content); + let completed_keys = if progress_percent >= 100 { + vec!["eight_anchor_minimum_loop".to_string()] + } else { + Vec::new() + }; + let missing_keys = if progress_percent >= 100 { + Vec::new() + } else { + vec!["eight_anchor_minimum_loop".to_string()] + }; + + json!({ + "worldSummary": clamp_text( + if !intent.world_hook.trim().is_empty() { + intent.world_hook.as_str() + } else { + intent.raw_setting_text.as_str() + }, + 96, + ), + "creatorIntentSummary": clamp_text(build_draft_summary_from_intent(&intent).as_str(), 180), + "completedKeys": completed_keys, + "missingKeys": missing_keys, + "keyCharacterAnchors": intent + .key_characters + .iter() + .map(|entry| { + json!({ + "id": entry.id, + "name": if entry.name.trim().is_empty() { + "未命名关键人物" + } else { + entry.name.as_str() + }, + "summary": clamp_text( + compact_lines([ + Some(entry.role.as_str()), + Some(entry.relation_to_player.as_str()), + Some(entry.hidden_hook.as_str()), + ]) + .as_str(), + 60, + ), + }) + }) + .collect::>(), + "motifDirectives": dedupe_string_list( + intent + .theme_keywords + .iter() + .cloned() + .chain(intent.tone_directives.iter().cloned()) + .chain(intent.iconic_elements.iter().cloned()) + .collect::>(), + 12, + ), + }) +} + +fn build_minimal_draft_profile_from_intent(intent: &CreatorIntentRecord) -> JsonValue { + let title = build_draft_title_from_intent(intent); + let summary = build_draft_summary_from_intent(intent); + let subtitle = clamp_text( + format!( + "{} · {}", + if !intent.player_premise.trim().is_empty() { + intent.player_premise.as_str() + } else { + "玩家入口待继续细化" + }, + intent + .core_conflicts + .first() + .map(String::as_str) + .unwrap_or("核心冲突仍在整理") + ) + .as_str(), + 40, + ); + let tone = clamp_text( + dedupe_string_list( + intent + .theme_keywords + .iter() + .cloned() + .chain(intent.tone_directives.iter().cloned()) + .collect::>(), + 8, + ) + .join("、") + .as_str(), + 60, + ); + let playable_npcs = intent + .key_characters + .iter() + .map(|entry| { + json!({ + "id": entry.id, + "name": entry.name, + "title": entry.role, + "role": entry.role, + "publicMask": entry.public_mask, + "publicIdentity": entry.public_mask, + "hiddenHook": entry.hidden_hook, + "currentPressure": entry.hidden_hook, + "relationToPlayer": entry.relation_to_player, + "summary": clamp_text( + compact_lines([ + Some(entry.role.as_str()), + Some(entry.relation_to_player.as_str()), + Some(entry.hidden_hook.as_str()), + ]) + .as_str(), + 120, + ), + "threadIds": [], + "skills": [], + }) + }) + .collect::>(); + let landmarks = intent + .key_landmarks + .iter() + .map(|entry| { + json!({ + "id": entry.id, + "name": entry.name, + "purpose": entry.purpose, + "mood": entry.mood, + "secret": entry.secret, + "summary": clamp_text( + compact_lines([ + Some(entry.purpose.as_str()), + Some(entry.mood.as_str()), + Some(entry.secret.as_str()), + ]) + .as_str(), + 120, + ), + }) + }) + .collect::>(); + + json!({ + "name": title, + "title": title, + "subtitle": subtitle, + "summary": summary, + "tone": if tone.is_empty() { "整体气质仍可继续精修" } else { tone.as_str() }, + "playerGoal": intent + .core_conflicts + .first() + .cloned() + .unwrap_or_else(|| "先站稳开局,再判断下一步".to_string()), + "worldHook": intent.world_hook, + "playerPremise": intent.player_premise, + "coreConflicts": intent.core_conflicts, + "playableNpcs": playable_npcs, + "storyNpcs": [], + "landmarks": landmarks, + "factions": [], + "threads": [], + "chapters": [], + "sceneChapters": [], + }) +} + +fn build_draft_title_from_intent(intent: &CreatorIntentRecord) -> String { + let world_hook = clamp_text(intent.world_hook.as_str(), 24); + if !world_hook.is_empty() { + return world_hook; + } + let raw_setting = clamp_text(intent.raw_setting_text.as_str(), 24); + if !raw_setting.is_empty() { + return raw_setting; + } + "未命名草稿".to_string() +} + +fn build_draft_summary_from_intent(intent: &CreatorIntentRecord) -> String { + let display = build_creator_intent_display_text(intent); + if !display.is_empty() { + return clamp_text(display.replace('\n', " · ").as_str(), 180); + } + let raw_setting = clamp_text(intent.raw_setting_text.as_str(), 180); + if !raw_setting.is_empty() { + return raw_setting; + } + "还在收集你的世界锚点。".to_string() +} + +fn build_creator_intent_display_text(intent: &CreatorIntentRecord) -> String { + let mut lines = Vec::new(); + if !intent.world_hook.trim().is_empty() { + lines.push(format!("世界一句话:{}", intent.world_hook)); + } + if !intent.player_premise.trim().is_empty() { + lines.push(format!("玩家身份:{}", intent.player_premise)); + } + if !intent.opening_situation.trim().is_empty() { + lines.push(format!("开局处境:{}", intent.opening_situation)); + } + if !intent.core_conflicts.is_empty() { + lines.push(format!("核心冲突:{}", intent.core_conflicts.join("、"))); + } + let theme_text = dedupe_string_list( + intent + .theme_keywords + .iter() + .cloned() + .chain(intent.tone_directives.iter().cloned()) + .collect::>(), + 8, + ) + .join("、"); + if !theme_text.is_empty() { + lines.push(format!("主题气质:{}", theme_text)); + } + if !intent.iconic_elements.is_empty() { + lines.push(format!("标志性要素:{}", intent.iconic_elements.join("、"))); + } + lines.join("\n") +} + +fn detect_user_input_signal(chat_history: &[JsonValue]) -> PromptUserInputSignal { + let latest_user_text = latest_user_text(chat_history); + if latest_user_text.is_empty() { + return PromptUserInputSignal::Sparse; + } + if contains_any(&latest_user_text, &["不是", "改成", "改为", "换成", "重来", "推翻", "修正"]) + { + return PromptUserInputSignal::Correction; + } + if contains_any(&latest_user_text, &["你帮我想", "你来定", "你决定", "你补完"]) { + return PromptUserInputSignal::Delegate; + } + let segments = split_sentences(&latest_user_text); + if latest_user_text.chars().count() <= 10 || segments.len() <= 1 { + return PromptUserInputSignal::Sparse; + } + if segments.len() >= 3 || latest_user_text.chars().count() >= 60 { + return PromptUserInputSignal::Rich; + } + PromptUserInputSignal::Normal +} + +fn detect_drift_risk( + chat_history: &[JsonValue], + anchor_content: &EightAnchorContent, + progress_percent: u32, +) -> PromptDriftRisk { + let latest_user_text = latest_user_text(chat_history); + let recent_user_messages = chat_history + .iter() + .filter_map(|entry| { + (entry.get("role").and_then(JsonValue::as_str) == Some("user")) + .then(|| entry.get("content").and_then(JsonValue::as_str).unwrap_or("").trim().to_string()) + }) + .filter(|value| !value.is_empty()) + .rev() + .take(3) + .collect::>(); + + let correction_count = recent_user_messages + .iter() + .filter(|entry| contains_any(entry, &["不是", "改成", "改为", "换成", "推翻", "重来", "修正"])) + .count(); + if correction_count >= 2 + || (progress_percent >= 65 + && contains_any(&latest_user_text, &["不是", "改成", "改为", "换成", "重来", "推翻"])) + { + return PromptDriftRisk::High; + } + + let filled_count = [ + anchor_content.world_promise.is_some(), + anchor_content.player_fantasy.is_some(), + anchor_content + .theme_boundary + .as_ref() + .map(|value| { + !value.tone_keywords.is_empty() + || !value.aesthetic_directives.is_empty() + || !value.forbidden_directives.is_empty() + }) + .unwrap_or(false), + anchor_content.player_entry_point.is_some(), + anchor_content.core_conflict.is_some(), + !anchor_content.key_relationships.is_empty(), + anchor_content + .hidden_lines + .as_ref() + .map(|value| { + !value.hidden_truths.is_empty() + || !value.misdirection_hints.is_empty() + || !value.reveal_pacing.trim().is_empty() + }) + .unwrap_or(false), + anchor_content + .iconic_elements + .as_ref() + .map(|value| { + !value.iconic_motifs.is_empty() + || !value.institutions_or_artifacts.is_empty() + || !value.hard_rules.is_empty() + }) + .unwrap_or(false), + ] + .iter() + .filter(|value| **value) + .count(); + + if filled_count >= 3 && latest_user_text.chars().count() >= 40 { + PromptDriftRisk::Medium + } else { + PromptDriftRisk::Low + } +} + +fn pick_conversation_mode( + current_turn: u32, + progress_percent: u32, + user_input_signal: PromptUserInputSignal, + drift_risk: PromptDriftRisk, + quick_fill_requested: bool, +) -> PromptConversationMode { + if quick_fill_requested { + return PromptConversationMode::ForceComplete; + } + if matches!(user_input_signal, PromptUserInputSignal::Correction) + || matches!(drift_risk, PromptDriftRisk::High) + { + return PromptConversationMode::RepairDirection; + } + if progress_percent >= 85 || current_turn >= 15 { + return PromptConversationMode::Closing; + } + if current_turn > 10 || progress_percent >= 65 { + return PromptConversationMode::Compress; + } + if current_turn <= 10 && progress_percent < 65 { + return PromptConversationMode::Expand; + } + PromptConversationMode::Bootstrap +} + +fn summarize_dynamic_state( + user_input_signal: PromptUserInputSignal, + drift_risk: PromptDriftRisk, + conversation_mode: PromptConversationMode, +) -> String { + format!( + "输入信号={},漂移风险={},本轮模式={}。正式生成时按这组状态执行。", + user_input_signal.as_str(), + drift_risk.as_str(), + conversation_mode.as_str() + ) +} + +fn render_dynamic_state_context(dynamic_state: &PromptDynamicState) -> String { + format!( + "上一轮预判得到的创作状态如下。\n正式生成时必须把它作为本轮策略输入直接执行,不要重新另起一套判断。\n\n创作状态:\n- userInputSignal: {}\n- driftRisk: {}\n- conversationMode: {}\n- judgementSummary: {}", + dynamic_state.user_input_signal.as_str(), + dynamic_state.drift_risk.as_str(), + dynamic_state.conversation_mode.as_str(), + dynamic_state.judgement_summary + ) +} + +fn render_current_anchor_context(anchor_content: &EightAnchorContent) -> String { + format!( + "当前完整设定结构如下。\n你必须把它视为上一版有效世界底子。\n\n如果用户没有否定其中某部分内容,且该部分仍然成立,可以继续保留。\n如果用户明确修正了某部分内容,新的完整设定结构必须体现修正后的版本。\n\n当前完整设定结构:\n{}", + serde_json::to_string_pretty(anchor_content).unwrap_or_else(|_| empty_agent_anchor_content_json()) + ) +} + +fn render_chat_history_context(chat_history: &[JsonValue]) -> String { + format!( + "以下是用户聊天记录。\n请重点理解最近几轮里用户新增、修正、强调的设定信息。\n不要把早期已经被用户否定的内容继续当成最终结论。\n\n用户聊天记录:\n{}", + serde_json::to_string_pretty(chat_history).unwrap_or_else(|_| "[]".to_string()) + ) +} + +fn build_unavailable_output( + current_anchor_content: &EightAnchorContent, + progress_percent: u32, + unavailable: bool, +) -> SingleTurnModelOutput { + SingleTurnModelOutput { + next_anchor_content: current_anchor_content.clone(), + progress_percent, + reply_text: if unavailable { + "当前模型不可用,这一轮设定先保留上一版。你可以稍后重试。".to_string() + } else { + "这一轮设定还没成功更新,我先保留上一版。你可以再发一次,我继续接着收。" + .to_string() + }, + fallback_error: Some(if unavailable { + "当前模型不可用,这一轮设定先保留上一版。".to_string() + } else { + "这一轮设定还没成功更新,我先保留上一版。".to_string() + }), + } +} + +fn parse_json_response_text(text: &str) -> Result { + let trimmed = text.trim(); + if let Some(start) = trimmed.find('{') + && let Some(end) = trimmed.rfind('}') + && end > start + { + return serde_json::from_str::(&trimmed[start..=end]); + } + serde_json::from_str::(trimmed) +} + +fn extract_reply_text_from_partial_json(text: &str) -> Option { + let key_index = text.find("\"replyText\"")?; + let colon_index = text[key_index..].find(':')? + key_index; + let mut cursor = colon_index + 1; + let bytes = text.as_bytes(); + while cursor < bytes.len() && bytes[cursor].is_ascii_whitespace() { + cursor += 1; + } + if bytes.get(cursor).copied() != Some(b'"') { + return None; + } + cursor += 1; + let mut decoded = String::new(); + while cursor < bytes.len() { + let current = bytes[cursor]; + if current == b'"' { + return Some(decoded); + } + if current == b'\\' { + cursor += 1; + if cursor >= bytes.len() { + break; + } + match bytes[cursor] { + b'"' => decoded.push('"'), + b'\\' => decoded.push('\\'), + b'/' => decoded.push('/'), + b'b' => decoded.push('\u{0008}'), + b'f' => decoded.push('\u{000C}'), + b'n' => decoded.push('\n'), + b'r' => decoded.push('\r'), + b't' => decoded.push('\t'), + b'u' => { + if cursor + 4 < bytes.len() + && let Ok(hex) = std::str::from_utf8(&bytes[cursor + 1..cursor + 5]) + && let Ok(code) = u16::from_str_radix(hex, 16) + && let Some(character) = char::from_u32(code as u32) + { + decoded.push(character); + cursor += 5; + continue; + } + decoded.push('u'); + } + other => decoded.push(other as char), + } + cursor += 1; + continue; + } + decoded.push(current as char); + cursor += 1; + } + Some(decoded) +} + +fn parse_user_input_signal(value: Option<&JsonValue>) -> Option { + match value.and_then(JsonValue::as_str)? { + "rich" => Some(PromptUserInputSignal::Rich), + "normal" => Some(PromptUserInputSignal::Normal), + "sparse" => Some(PromptUserInputSignal::Sparse), + "correction" => Some(PromptUserInputSignal::Correction), + "delegate" => Some(PromptUserInputSignal::Delegate), + _ => None, + } +} + +fn parse_drift_risk(value: Option<&JsonValue>) -> Option { + match value.and_then(JsonValue::as_str)? { + "low" => Some(PromptDriftRisk::Low), + "medium" => Some(PromptDriftRisk::Medium), + "high" => Some(PromptDriftRisk::High), + _ => None, + } +} + +fn parse_conversation_mode(value: Option<&JsonValue>) -> Option { + match value.and_then(JsonValue::as_str)? { + "bootstrap" => Some(PromptConversationMode::Bootstrap), + "expand" => Some(PromptConversationMode::Expand), + "compress" => Some(PromptConversationMode::Compress), + "repair_direction" => Some(PromptConversationMode::RepairDirection), + "force_complete" => Some(PromptConversationMode::ForceComplete), + "closing" => Some(PromptConversationMode::Closing), + _ => None, + } +} + +fn mode_rules(mode: PromptConversationMode) -> &'static str { + match mode { + PromptConversationMode::Bootstrap => r#"当前模式:bootstrap + +目标: +1. 先把世界的基本方向抓住 +2. 不要一次塞太多新设定 +3. 回复要降低用户开口压力 + +本轮行为要求: +1. 优先从用户输入里抓世界方向、玩家视角、主题边界的线索 +2. 如果用户信息很少,不要强行把整套结构一次补满 +3. replyText 要像共创搭档,而不是像审问 +4. 默认只推进一个最关键的问题方向 +5. 如果用户刚开口,优先给“被理解感”,再轻轻推进下一步 +6. 可以用一句很短的话先确认你抓到的核心方向,再提一个最好回答的问题 +7. 不要把问题问得像表单采集,不要一口气追问多个维度 + +用户体验要求: +1. 让用户觉得“现在很容易继续往下说” +2. 不要制造被考试、被拷问、被策划问卷追着跑的感觉 +3. replyText 最好短、稳、可接话 +4. 如果用户信息很少,也不要显得冷淡或机械"#, + PromptConversationMode::Expand => r#"当前模式:expand + +目标: +1. 在保持现有方向的前提下,把设定结构逐步补全 +2. 尽量让一轮输入覆盖多个关键维度 + +本轮行为要求: +1. 继续保留上一版里仍成立的设定 +2. 优先把用户本轮输入映射进多个关键维度,而不是只更新一个字段 +3. replyText 要明确体现“你已经理解了哪些内容” +4. 不要突然大幅改写已经成形的世界 +5. 如果用户这一轮给了多条有效信息,replyText 应先把这些信息自然串起来,再决定下一步 +6. 可以适度替用户整理,但不要把回复写成总结报告 +7. 默认继续往前推一步,不要在还没必要时突然收束或突然跳到成稿感 + +用户体验要求: +1. 让用户感到“我刚说的内容都被接住了” +2. 回复里可以带一点顺势整理感,但不要太像会议纪要 +3. 不要无视用户刚提供的高价值细节 +4. 不要让用户觉得系统在自顾自重写世界"#, + PromptConversationMode::Compress => r#"当前模式:compress + +目标: +1. 开始收束当前设定 +2. 减少无效发散 +3. 让 progress 更接近可进入下一阶段 + +本轮行为要求: +1. 新的设定结构优先保留稳定内容,不要无端重写 +2. 对用户本轮输入做高密度吸收 +3. replyText 要更聚焦,不要绕圈 +4. 默认只推进当前最影响 completion 的一步 +5. 如果用户还在补细节,优先把细节挂回现有骨架,而不是继续开新分支 +6. 可以适度提醒“还差哪类关键空位”,但不要把回复写成 checklist +7. 如果已有信息足够,replyText 可以更像“确认并收束”,少一点继续发散式追问 + +用户体验要求: +1. 让用户感觉世界正在变得更稳,而不是越来越散 +2. 让推进感更明确,但不要显得催促 +3. 回复语气应更笃定一些,减少反复横跳 +4. 不要把用户刚补进来的细节又冲淡掉"#, + PromptConversationMode::RepairDirection => r#"当前模式:repair_direction + +目标: +1. 处理用户对既有设定的修正 +2. 避免世界方向飘散或自相矛盾 + +本轮行为要求: +1. 如果用户明确改口,新的设定结构必须体现修正后的方向 +2. 对已经不再成立的旧设定,不要机械保留 +3. progressPercent 可以停滞,也可以小幅回落,但不能为负 +4. replyText 要承认用户的修正,并顺着修正后的方向继续聊 +5. 先处理“改掉什么”,再决定“往哪里继续推” +6. 不要一边口头承认用户修正,一边在设定结构里偷偷留住旧方向 +7. 如果修正幅度很大,replyText 可以帮助用户确认新方向已经接管当前语境 + +用户体验要求: +1. 让用户感到“我刚刚的纠偏真的生效了” +2. 不要和用户辩论旧方案为什么也行 +3. 不要表现出对修正的不情愿 +4. 回复要体现重心已经切到新方向,而不是停留在旧世界观惯性里"#, + PromptConversationMode::ForceComplete => r#"当前模式:force_complete + +目标: +1. 基于当前方向直接补齐剩余设定 +2. 生成一版尽量完整、可进入下一阶段的设定结构 +3. 结束当前收集阶段 + +本轮行为要求: +1. 尽量保留已经形成的世界方向 +2. 对明显缺失的关键维度进行合理补全 +3. 不要继续拉长聊天,不要再追问用户 +4. progressPercent 直接输出为 100 +5. replyText 要自然引导用户点击“生成游戏设定草稿” +6. 补全时要优先做“顺着已有方向补齐”,而不是突然换题材、换气质、换主冲突 +7. 可以让结果更完整,但不要补得过满、过死、过像定稿圣经 +8. replyText 更像阶段完成提示,不再像继续采集信息的对话 + +用户体验要求: +1. 让用户感到“系统已经帮我把能补的补好了” +2. 不要在这一步突然冒出很多陌生设定把用户吓出戏 +3. 回复要有完成感,但不要太官话 +4. 清楚告诉用户下一步可以做什么"#, + PromptConversationMode::Closing => r#"当前模式:closing + +目标: +1. 尽量形成一版可用的设定底子 +2. 不再继续发散新世界观 + +本轮行为要求: +1. 优先收束,而不是扩写 +2. 不要大改已经成形的核心设定 +3. progressPercent 接近完成时,replyText 要更像确认与推进 +4. 如果用户没有大改方向,尽量让下一版内容更稳定 +5. 可以轻微补足缺口,但不要再大开新支线 +6. replyText 应减少探索式措辞,增加“已经基本成形”的稳定感 +7. 如果只差少量空位,优先把这些空位自然补平,而不是重新打开大话题 + +用户体验要求: +1. 让用户感觉作品已经快成了,而不是还在无穷试探 +2. 回复可以更像确认和轻推,不要继续像前期那样频繁试探 +3. 保持留白感,不要把所有东西都一次说死 +4. 让用户自然过渡到下一阶段,而不是突然被切断对话"#, + } +} + +fn user_signal_rules(signal: PromptUserInputSignal) -> &'static str { + match signal { + PromptUserInputSignal::Rich => r#"本轮用户输入信息密度高。 +请尽量从这一轮里提取多个锚点,不要只更新单一方向。 +如果一条输入同时影响世界方向、冲突和关系,请在新的完整设定结构中一起体现。"#, + PromptUserInputSignal::Normal => r#"本轮用户输入为正常补充。 +请优先顺着当前方向稳定更新,不要主动扩写太多新设定。"#, + PromptUserInputSignal::Sparse => r#"本轮用户输入较少或较虚。 +请保留上一版中仍然成立的内容,不要为了凑完整度而强行发明过多新设定。 +replyText 要让用户容易继续往下说。"#, + PromptUserInputSignal::Correction => r#"本轮用户在修正或推翻旧设定。 +请优先吸收修正,不要机械复读旧版本。 +新的完整设定结构必须以修正后的方向为准。"#, + PromptUserInputSignal::Delegate => r#"本轮用户把部分决定权交给你。 +你可以在 replyText 中给出有限度的建议,但不要突然补满整套设定。 +新的完整设定结构仍应尽量建立在已有世界方向上,而不是完全重做。"#, + } +} + +fn latest_user_text(chat_history: &[JsonValue]) -> String { + chat_history + .iter() + .rev() + .find(|entry| entry.get("role").and_then(JsonValue::as_str) == Some("user")) + .and_then(|entry| entry.get("content").and_then(JsonValue::as_str)) + .map(str::trim) + .unwrap_or_default() + .to_string() +} + +fn split_sentences(text: &str) -> Vec { + text.split(|character| matches!(character, '。' | '!' | '?' | ';' | '\n')) + .map(str::trim) + .filter(|value| !value.is_empty()) + .map(str::to_string) + .collect() +} + +fn compact_lines(items: I) -> String +where + I: IntoIterator>, + S: AsRef, +{ + items + .into_iter() + .filter_map(|item| item.map(|value| value.as_ref().trim().to_string())) + .filter(|value| !value.is_empty()) + .collect::>() + .join(";") +} + +fn split_relationship_pair(value: &str) -> (String, String) { + let replaced = value.replace(['、', '/', '/', '&', '|'], " "); + let segments = replaced + .split(['与', '和', ' ']) + .map(str::trim) + .filter(|value| !value.is_empty()) + .collect::>(); + let meaningful = segments + .iter() + .copied() + .filter(|item| !matches!(*item, "玩家" | "主角" | "我")) + .collect::>(); + ( + meaningful.first().copied().unwrap_or_default().to_string(), + if segments.len() >= 2 { + segments.join(" / ") + } else { + value.trim().to_string() + }, + ) +} + +fn dedupe_string_list(values: Vec, max_count: usize) -> Vec { + let mut seen = std::collections::BTreeSet::new(); + let mut result = Vec::new(); + for value in values { + let normalized = value.trim().to_string(); + if normalized.is_empty() || !seen.insert(normalized.clone()) { + continue; + } + result.push(normalized); + if result.len() >= max_count { + break; + } + } + result +} + +fn contains_any(text: &str, patterns: &[&str]) -> bool { + patterns.iter().any(|pattern| text.contains(pattern)) +} + +fn clamp_text(value: &str, max_length: usize) -> String { + let normalized = value.split_whitespace().collect::>().join(" "); + if normalized.is_empty() { + return String::new(); + } + if normalized.chars().count() <= max_length { + return normalized; + } + normalized.chars().take(max_length.saturating_sub(1)).collect::() + "…" +} + +fn clamp_progress_percent(value: Option<&JsonValue>) -> u32 { + let Some(number) = value.and_then(JsonValue::as_f64) else { + return 0; + }; + number.round().clamp(0.0, 100.0) as u32 +} + +fn to_text(value: Option<&JsonValue>) -> Option { + value.and_then(JsonValue::as_str) + .map(str::trim) + .filter(|value| !value.is_empty()) + .map(str::to_string) +} + +fn serialize_json(value: &JsonValue, fallback: &str) -> String { + serde_json::to_string(value).unwrap_or_else(|_| fallback.to_string()) +} + +impl PromptUserInputSignal { + fn as_str(self) -> &'static str { + match self { + Self::Rich => "rich", + Self::Normal => "normal", + Self::Sparse => "sparse", + Self::Correction => "correction", + Self::Delegate => "delegate", + } + } +} + +impl PromptDriftRisk { + fn as_str(self) -> &'static str { + match self { + Self::Low => "low", + Self::Medium => "medium", + Self::High => "high", + } + } +} + +impl PromptConversationMode { + fn as_str(self) -> &'static str { + match self { + Self::Bootstrap => "bootstrap", + Self::Expand => "expand", + Self::Compress => "compress", + Self::RepairDirection => "repair_direction", + Self::ForceComplete => "force_complete", + Self::Closing => "closing", + } + } +} diff --git a/server-rs/crates/api-server/src/main.rs b/server-rs/crates/api-server/src/main.rs index 67722227..c5ba45fb 100644 --- a/server-rs/crates/api-server/src/main.rs +++ b/server-rs/crates/api-server/src/main.rs @@ -11,6 +11,7 @@ mod character_animation_assets; mod character_visual_assets; mod config; mod custom_world; +mod custom_world_agent_turn; mod custom_world_ai; mod error_middleware; mod health; diff --git a/server-rs/crates/module-custom-world/src/lib.rs b/server-rs/crates/module-custom-world/src/lib.rs index d617f6e1..66dbf0b1 100644 --- a/server-rs/crates/module-custom-world/src/lib.rs +++ b/server-rs/crates/module-custom-world/src/lib.rs @@ -508,6 +508,35 @@ pub struct CustomWorldAgentMessageSubmitInput { pub submitted_at_micros: i64, } +#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))] +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct CustomWorldAgentMessageFinalizeInput { + pub session_id: String, + pub owner_user_id: String, + pub operation_id: String, + pub assistant_message_id: String, + pub assistant_reply_text: String, + pub phase_label: String, + pub phase_detail: String, + pub operation_status: RpgAgentOperationStatus, + pub operation_progress: u32, + pub stage: RpgAgentStage, + pub progress_percent: u32, + pub focus_card_id: Option, + pub anchor_content_json: String, + pub creator_intent_json: Option, + pub creator_intent_readiness_json: String, + pub anchor_pack_json: Option, + pub draft_profile_json: Option, + pub pending_clarifications_json: String, + pub suggested_actions_json: String, + pub recommended_replies_json: String, + pub quality_findings_json: String, + pub asset_coverage_json: String, + pub error_message: Option, + pub updated_at_micros: i64, +} + #[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))] #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct CustomWorldAgentOperationGetInput { @@ -1070,6 +1099,47 @@ pub fn validate_custom_world_agent_message_submit_input( Ok(()) } +pub fn validate_custom_world_agent_message_finalize_input( + input: &CustomWorldAgentMessageFinalizeInput, +) -> Result<(), CustomWorldFieldError> { + if input.owner_user_id.trim().is_empty() { + return Err(CustomWorldFieldError::MissingOwnerUserId); + } + + validate_custom_world_agent_message_fields( + &input.assistant_message_id, + &input.session_id, + &input.assistant_reply_text, + )?; + validate_custom_world_agent_operation_fields( + &input.operation_id, + &input.session_id, + &input.phase_label, + input.operation_progress, + )?; + validate_custom_world_agent_session_fields( + &input.session_id, + &input.owner_user_id, + &input.anchor_content_json, + &input.creator_intent_readiness_json, + &input.pending_clarifications_json, + &input.asset_coverage_json, + input.progress_percent, + )?; + ensure_json_object(&input.anchor_content_json)?; + ensure_optional_json_object(input.creator_intent_json.as_deref())?; + ensure_json_object(&input.creator_intent_readiness_json)?; + ensure_optional_json_object(input.anchor_pack_json.as_deref())?; + ensure_optional_json_object(input.draft_profile_json.as_deref())?; + ensure_json_array(&input.pending_clarifications_json)?; + ensure_json_array(&input.suggested_actions_json)?; + ensure_json_array(&input.recommended_replies_json)?; + ensure_json_array(&input.quality_findings_json)?; + ensure_json_object(&input.asset_coverage_json)?; + + Ok(()) +} + pub fn validate_custom_world_agent_operation_get_input( input: &CustomWorldAgentOperationGetInput, ) -> Result<(), CustomWorldFieldError> { @@ -1656,6 +1726,41 @@ mod tests { assert_eq!(error, CustomWorldFieldError::MissingProfileId); } + #[test] + fn agent_message_finalize_requires_valid_json_payloads() { + let error = validate_custom_world_agent_message_finalize_input( + &CustomWorldAgentMessageFinalizeInput { + session_id: "session_001".to_string(), + owner_user_id: "user_001".to_string(), + operation_id: "operation_001".to_string(), + assistant_message_id: "message_001".to_string(), + assistant_reply_text: "已生成回复".to_string(), + phase_label: "消息已处理".to_string(), + phase_detail: "这一轮已完成推理并写回".to_string(), + operation_status: RpgAgentOperationStatus::Completed, + operation_progress: 100, + stage: RpgAgentStage::FoundationReview, + progress_percent: 100, + focus_card_id: None, + anchor_content_json: "[]".to_string(), + creator_intent_json: Some("{}".to_string()), + creator_intent_readiness_json: "{}".to_string(), + anchor_pack_json: Some("{}".to_string()), + draft_profile_json: Some("{}".to_string()), + pending_clarifications_json: "[]".to_string(), + suggested_actions_json: "[]".to_string(), + recommended_replies_json: "[]".to_string(), + quality_findings_json: "[]".to_string(), + asset_coverage_json: "{}".to_string(), + error_message: None, + updated_at_micros: 1, + }, + ) + .expect_err("invalid anchor content should fail"); + + assert_eq!(error, CustomWorldFieldError::InvalidJsonPayload); + } + #[test] fn published_profile_compile_merges_legacy_theme_and_latest_assets() { let snapshot = build_custom_world_published_profile_compile_snapshot( diff --git a/server-rs/crates/spacetime-client/src/lib.rs b/server-rs/crates/spacetime-client/src/lib.rs index 222c6692..d719d3bc 100644 --- a/server-rs/crates/spacetime-client/src/lib.rs +++ b/server-rs/crates/spacetime-client/src/lib.rs @@ -154,6 +154,7 @@ use crate::module_bindings::{ CustomWorldAgentActionExecuteInput as BindingCustomWorldAgentActionExecuteInput, CustomWorldAgentActionExecuteResult as BindingCustomWorldAgentActionExecuteResult, CustomWorldAgentCardDetailGetInput as BindingCustomWorldAgentCardDetailGetInput, + CustomWorldAgentMessageFinalizeInput as BindingCustomWorldAgentMessageFinalizeInput, CustomWorldAgentMessageSnapshot as BindingCustomWorldAgentMessageSnapshot, CustomWorldAgentMessageSubmitInput as BindingCustomWorldAgentMessageSubmitInput, CustomWorldAgentOperationGetInput as BindingCustomWorldAgentOperationGetInput, @@ -290,6 +291,7 @@ use crate::module_bindings::{ drag_puzzle_piece_or_group_procedure::drag_puzzle_piece_or_group as _, execute_custom_world_agent_action_procedure::execute_custom_world_agent_action as _, fail_ai_task_and_return_procedure::fail_ai_task_and_return as _, + finalize_custom_world_agent_message_turn_procedure::finalize_custom_world_agent_message_turn as _, generate_big_fish_asset_procedure::generate_big_fish_asset as _, get_battle_state_procedure::get_battle_state as _, get_big_fish_run_procedure::get_big_fish_run as _, @@ -1627,6 +1629,53 @@ impl SpacetimeClient { .await } + pub async fn finalize_custom_world_agent_message( + &self, + input: CustomWorldAgentMessageFinalizeRecordInput, + ) -> Result { + let procedure_input = BindingCustomWorldAgentMessageFinalizeInput { + session_id: input.session_id, + owner_user_id: input.owner_user_id, + operation_id: input.operation_id, + assistant_message_id: input.assistant_message_id, + assistant_reply_text: input.assistant_reply_text, + phase_label: input.phase_label, + phase_detail: input.phase_detail, + operation_status: parse_rpg_agent_operation_status_record( + input.operation_status.as_str(), + )?, + operation_progress: input.operation_progress, + stage: parse_rpg_agent_stage_record(input.stage.as_str())?, + progress_percent: input.progress_percent, + focus_card_id: input.focus_card_id, + anchor_content_json: input.anchor_content_json, + creator_intent_json: input.creator_intent_json, + creator_intent_readiness_json: input.creator_intent_readiness_json, + anchor_pack_json: input.anchor_pack_json, + draft_profile_json: input.draft_profile_json, + pending_clarifications_json: input.pending_clarifications_json, + suggested_actions_json: input.suggested_actions_json, + recommended_replies_json: input.recommended_replies_json, + quality_findings_json: input.quality_findings_json, + asset_coverage_json: input.asset_coverage_json, + error_message: input.error_message, + updated_at_micros: input.updated_at_micros, + }; + + self.call_after_connect(move |connection, sender| { + connection.procedures().finalize_custom_world_agent_message_turn_then( + procedure_input, + move |_, result| { + let mapped = result + .map_err(|error| SpacetimeClientError::Procedure(error.to_string())) + .and_then(map_custom_world_agent_operation_procedure_result); + send_once(&sender, mapped); + }, + ); + }) + .await + } + pub async fn get_custom_world_agent_operation( &self, session_id: String, @@ -4806,6 +4855,25 @@ fn map_rpg_agent_stage(value: crate::module_bindings::RpgAgentStage) -> String { .to_string() } +fn parse_rpg_agent_stage_record( + value: &str, +) -> Result { + match value.trim() { + "collecting_intent" => Ok(crate::module_bindings::RpgAgentStage::CollectingIntent), + "clarifying" => Ok(crate::module_bindings::RpgAgentStage::Clarifying), + "foundation_review" => Ok(crate::module_bindings::RpgAgentStage::FoundationReview), + "object_refining" => Ok(crate::module_bindings::RpgAgentStage::ObjectRefining), + "visual_refining" => Ok(crate::module_bindings::RpgAgentStage::VisualRefining), + "long_tail_review" => Ok(crate::module_bindings::RpgAgentStage::LongTailReview), + "ready_to_publish" => Ok(crate::module_bindings::RpgAgentStage::ReadyToPublish), + "published" => Ok(crate::module_bindings::RpgAgentStage::Published), + "error" => Ok(crate::module_bindings::RpgAgentStage::Error), + other => Err(SpacetimeClientError::Runtime(format!( + "未知 rpg agent stage: {other}" + ))), + } +} + fn format_rpg_agent_message_role( value: crate::module_bindings::RpgAgentMessageRole, ) -> &'static str { @@ -4862,6 +4930,20 @@ fn format_rpg_agent_operation_status( } } +fn parse_rpg_agent_operation_status_record( + value: &str, +) -> Result { + match value.trim() { + "queued" => Ok(crate::module_bindings::RpgAgentOperationStatus::Queued), + "running" => Ok(crate::module_bindings::RpgAgentOperationStatus::Running), + "completed" => Ok(crate::module_bindings::RpgAgentOperationStatus::Completed), + "failed" => Ok(crate::module_bindings::RpgAgentOperationStatus::Failed), + other => Err(SpacetimeClientError::Runtime(format!( + "未知 rpg agent operation status: {other}" + ))), + } +} + fn format_rpg_agent_draft_card_kind( value: crate::module_bindings::RpgAgentDraftCardKind, ) -> &'static str { @@ -5701,6 +5783,34 @@ pub struct CustomWorldAgentMessageSubmitRecordInput { pub submitted_at_micros: i64, } +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct CustomWorldAgentMessageFinalizeRecordInput { + pub session_id: String, + pub owner_user_id: String, + pub operation_id: String, + pub assistant_message_id: String, + pub assistant_reply_text: String, + pub phase_label: String, + pub phase_detail: String, + pub operation_status: String, + pub operation_progress: u32, + pub stage: String, + pub progress_percent: u32, + pub focus_card_id: Option, + pub anchor_content_json: String, + pub creator_intent_json: Option, + pub creator_intent_readiness_json: String, + pub anchor_pack_json: Option, + pub draft_profile_json: Option, + pub pending_clarifications_json: String, + pub suggested_actions_json: String, + pub recommended_replies_json: String, + pub quality_findings_json: String, + pub asset_coverage_json: String, + pub error_message: Option, + pub updated_at_micros: i64, +} + #[derive(Clone, Debug, PartialEq, Eq)] pub struct CustomWorldAgentActionExecuteRecordInput { pub session_id: String, diff --git a/server-rs/crates/spacetime-client/src/module_bindings/accept_quest_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/accept_quest_reducer.rs index 61e6b9c5..b9e670d6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/accept_quest_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/accept_quest_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_record_input_type::QuestRecordInput; @@ -14,8 +19,10 @@ pub(super) struct AcceptQuestArgs { impl From for super::Reducer { fn from(args: AcceptQuestArgs) -> Self { - Self::AcceptQuest { input: args.input } - } + Self::AcceptQuest { + input: args.input, +} +} } impl __sdk::InModule for AcceptQuestArgs { @@ -33,8 +40,9 @@ pub trait accept_quest { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`accept_quest:accept_quest_then`] to run a callback after the reducer completes. - fn accept_quest(&self, input: QuestRecordInput) -> __sdk::Result<()> { - self.accept_quest_then(input, |_, _| {}) + fn accept_quest(&self, input: QuestRecordInput, +) -> __sdk::Result<()> { + self.accept_quest_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `accept_quest` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait accept_quest { &self, input: QuestRecordInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl accept_quest for super::RemoteReducers { &self, input: QuestRecordInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(AcceptQuestArgs { input }, callback) + self.imp.invoke_reducer_with_callback(AcceptQuestArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_quest_completion_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_quest_completion_reducer.rs index b1419fb7..6027c9f6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_quest_completion_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/acknowledge_quest_completion_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_completion_ack_input_type::QuestCompletionAckInput; @@ -14,8 +19,10 @@ pub(super) struct AcknowledgeQuestCompletionArgs { impl From for super::Reducer { fn from(args: AcknowledgeQuestCompletionArgs) -> Self { - Self::AcknowledgeQuestCompletion { input: args.input } - } + Self::AcknowledgeQuestCompletion { + input: args.input, +} +} } impl __sdk::InModule for AcknowledgeQuestCompletionArgs { @@ -33,8 +40,9 @@ pub trait acknowledge_quest_completion { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`acknowledge_quest_completion:acknowledge_quest_completion_then`] to run a callback after the reducer completes. - fn acknowledge_quest_completion(&self, input: QuestCompletionAckInput) -> __sdk::Result<()> { - self.acknowledge_quest_completion_then(input, |_, _| {}) + fn acknowledge_quest_completion(&self, input: QuestCompletionAckInput, +) -> __sdk::Result<()> { + self.acknowledge_quest_completion_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `acknowledge_quest_completion` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait acknowledge_quest_completion { &self, input: QuestCompletionAckInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl acknowledge_quest_completion for super::RemoteReducers { &self, input: QuestCompletionAckInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(AcknowledgeQuestCompletionArgs { input }, callback) + self.imp.invoke_reducer_with_callback(AcknowledgeQuestCompletionArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/advance_puzzle_next_level_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/advance_puzzle_next_level_procedure.rs index 7cb4f8f4..4a7804c7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/advance_puzzle_next_level_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/advance_puzzle_next_level_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_run_next_level_input_type::PuzzleRunNextLevelInput; use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct AdvancePuzzleNextLevelArgs { + struct AdvancePuzzleNextLevelArgs { pub input: PuzzleRunNextLevelInput, } + impl __sdk::InModule for AdvancePuzzleNextLevelArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for AdvancePuzzleNextLevelArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait advance_puzzle_next_level { - fn advance_puzzle_next_level(&self, input: PuzzleRunNextLevelInput) { - self.advance_puzzle_next_level_then(input, |_, _| {}); + fn advance_puzzle_next_level(&self, input: PuzzleRunNextLevelInput, +) { + self.advance_puzzle_next_level_then(input, |_, _| {}); } fn advance_puzzle_next_level_then( &self, input: PuzzleRunNextLevelInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl advance_puzzle_next_level for super::RemoteProcedures { &self, input: PuzzleRunNextLevelInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( - "advance_puzzle_next_level", - AdvancePuzzleNextLevelArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( + "advance_puzzle_next_level", + AdvancePuzzleNextLevelArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_input_type.rs index b63aad41..c22d39dd 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_result_reference_kind_type::AiResultReferenceKind; @@ -12,10 +17,12 @@ pub struct AiResultReferenceInput { pub task_id: String, pub reference_kind: AiResultReferenceKind, pub reference_id: String, - pub label: Option, + pub label: Option::, pub created_at_micros: i64, } + impl __sdk::InModule for AiResultReferenceInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_kind_type.rs index 0e5f045b..9b9a5a43 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +24,12 @@ pub enum AiResultReferenceKind { RuntimeItemRecord, AssetObject, + } + + impl __sdk::InModule for AiResultReferenceKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_snapshot_type.rs index f949db7f..7522ac4c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_result_reference_kind_type::AiResultReferenceKind; @@ -13,10 +18,12 @@ pub struct AiResultReferenceSnapshot { pub task_id: String, pub reference_kind: AiResultReferenceKind, pub reference_id: String, - pub label: Option, + pub label: Option::, pub created_at_micros: i64, } + impl __sdk::InModule for AiResultReferenceSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_table.rs index 09b7c492..6a648b5b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::ai_result_reference_kind_type::AiResultReferenceKind; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_result_reference_type::AiResultReference; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::ai_result_reference_kind_type::AiResultReferenceKind; /// Table handle for the table `ai_result_reference`. /// @@ -32,9 +37,7 @@ pub trait AiResultReferenceTableAccess { impl AiResultReferenceTableAccess for super::RemoteTables { fn ai_result_reference(&self) -> AiResultReferenceTableHandle<'_> { AiResultReferenceTableHandle { - imp: self - .imp - .get_table::("ai_result_reference"), + imp: self.imp.get_table::("ai_result_reference"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for AiResultReferenceTableHandle<'ctx> { type Row = AiResultReference; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = AiResultReferenceInsertCallbackId; @@ -98,44 +97,41 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AiResultReferenceTableHandle<'ctx> { } } -/// Access to the `result_reference_row_id` unique index on the table `ai_result_reference`, -/// which allows point queries on the field of the same name -/// via the [`AiResultReferenceResultReferenceRowIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.ai_result_reference().result_reference_row_id().find(...)`. -pub struct AiResultReferenceResultReferenceRowIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> AiResultReferenceTableHandle<'ctx> { - /// Get a handle on the `result_reference_row_id` unique index on the table `ai_result_reference`. - pub fn result_reference_row_id(&self) -> AiResultReferenceResultReferenceRowIdUnique<'ctx> { - AiResultReferenceResultReferenceRowIdUnique { - imp: self - .imp - .get_unique_constraint::("result_reference_row_id"), - phantom: std::marker::PhantomData, + /// Access to the `result_reference_row_id` unique index on the table `ai_result_reference`, + /// which allows point queries on the field of the same name + /// via the [`AiResultReferenceResultReferenceRowIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.ai_result_reference().result_reference_row_id().find(...)`. + pub struct AiResultReferenceResultReferenceRowIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> AiResultReferenceResultReferenceRowIdUnique<'ctx> { - /// Find the subscribed row whose `result_reference_row_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 { - self.imp.find(col_val) - } -} + impl<'ctx> AiResultReferenceTableHandle<'ctx> { + /// Get a handle on the `result_reference_row_id` unique index on the table `ai_result_reference`. + pub fn result_reference_row_id(&self) -> AiResultReferenceResultReferenceRowIdUnique<'ctx> { + AiResultReferenceResultReferenceRowIdUnique { + imp: self.imp.get_unique_constraint::("result_reference_row_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> AiResultReferenceResultReferenceRowIdUnique<'ctx> { + /// Find the subscribed row whose `result_reference_row_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("ai_result_reference"); - _table.add_unique_constraint::("result_reference_row_id", |row| { - &row.result_reference_row_id - }); + _table.add_unique_constraint::("result_reference_row_id", |row| &row.result_reference_row_id); } #[doc(hidden)] @@ -143,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `AiResultReference`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait ai_result_referenceQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AiResultReference`. - fn ai_result_reference(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `AiResultReference`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait ai_result_referenceQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AiResultReference`. + fn ai_result_reference(&self) -> __sdk::__query_builder::Table; + } + + impl ai_result_referenceQueryTableAccess for __sdk::QueryTableAccessor { + fn ai_result_reference(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("ai_result_reference") + } + } -impl ai_result_referenceQueryTableAccess for __sdk::QueryTableAccessor { - fn ai_result_reference(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("ai_result_reference") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_type.rs index 3b1121b0..d9e32eaf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_result_reference_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_result_reference_kind_type::AiResultReferenceKind; @@ -14,14 +19,16 @@ pub struct AiResultReference { pub task_id: String, pub reference_kind: AiResultReferenceKind, pub reference_id: String, - pub label: Option, + pub label: Option::, pub created_at: __sdk::Timestamp, } + impl __sdk::InModule for AiResultReference { type Module = super::RemoteModule; } + /// Column accessor struct for the table `AiResultReference`. /// /// Provides typed access to columns for query building. @@ -31,7 +38,7 @@ pub struct AiResultReferenceCols { pub task_id: __sdk::__query_builder::Col, pub reference_kind: __sdk::__query_builder::Col, pub reference_id: __sdk::__query_builder::Col, - pub label: __sdk::__query_builder::Col>, + pub label: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, } @@ -39,16 +46,14 @@ impl __sdk::__query_builder::HasCols for AiResultReference { type Cols = AiResultReferenceCols; fn cols(table_name: &'static str) -> Self::Cols { AiResultReferenceCols { - result_reference_row_id: __sdk::__query_builder::Col::new( - table_name, - "result_reference_row_id", - ), + result_reference_row_id: __sdk::__query_builder::Col::new(table_name, "result_reference_row_id"), result_ref_id: __sdk::__query_builder::Col::new(table_name, "result_ref_id"), task_id: __sdk::__query_builder::Col::new(table_name, "task_id"), reference_kind: __sdk::__query_builder::Col::new(table_name, "reference_kind"), reference_id: __sdk::__query_builder::Col::new(table_name, "reference_id"), label: __sdk::__query_builder::Col::new(table_name, "label"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), + } } } @@ -65,13 +70,12 @@ impl __sdk::__query_builder::HasIxCols for AiResultReference { type IxCols = AiResultReferenceIxCols; fn ix_cols(table_name: &'static str) -> Self::IxCols { AiResultReferenceIxCols { - result_reference_row_id: __sdk::__query_builder::IxCol::new( - table_name, - "result_reference_row_id", - ), + result_reference_row_id: __sdk::__query_builder::IxCol::new(table_name, "result_reference_row_id"), task_id: __sdk::__query_builder::IxCol::new(table_name, "task_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for AiResultReference {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_stage_completion_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_stage_completion_input_type.rs index 7ce33006..c165fc55 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_stage_completion_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_stage_completion_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -11,12 +16,14 @@ use super::ai_task_stage_kind_type::AiTaskStageKind; pub struct AiStageCompletionInput { pub task_id: String, pub stage_kind: AiTaskStageKind, - pub text_output: Option, - pub structured_payload_json: Option, - pub warning_messages: Vec, + pub text_output: Option::, + pub structured_payload_json: Option::, + pub warning_messages: Vec::, pub completed_at_micros: i64, } + impl __sdk::InModule for AiStageCompletionInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_cancel_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_cancel_input_type.rs index 93b697a6..1c5af5fa 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_cancel_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_cancel_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct AiTaskCancelInput { pub completed_at_micros: i64, } + impl __sdk::InModule for AiTaskCancelInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_create_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_create_input_type.rs index 95b0506a..2d53ad93 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_create_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_create_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_kind_type::AiTaskKind; use super::ai_task_stage_blueprint_type::AiTaskStageBlueprint; @@ -15,12 +20,14 @@ pub struct AiTaskCreateInput { pub owner_user_id: String, pub request_label: String, pub source_module: String, - pub source_entity_id: Option, - pub request_payload_json: Option, - pub stages: Vec, + pub source_entity_id: Option::, + pub request_payload_json: Option::, + pub stages: Vec::, pub created_at_micros: i64, } + impl __sdk::InModule for AiTaskCreateInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_failure_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_failure_input_type.rs index 91a87cf5..dfdd6ee6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_failure_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_failure_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,6 +18,8 @@ pub struct AiTaskFailureInput { pub completed_at_micros: i64, } + impl __sdk::InModule for AiTaskFailureInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_finish_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_finish_input_type.rs index d8fe6713..f7bc9735 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_finish_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_finish_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct AiTaskFinishInput { pub completed_at_micros: i64, } + impl __sdk::InModule for AiTaskFinishInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_kind_type.rs index 9468bc95..7724e312 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +24,12 @@ pub enum AiTaskKind { QuestIntent, RuntimeItemIntent, + } + + impl __sdk::InModule for AiTaskKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_procedure_result_type.rs index 57728f6e..f0457945 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_snapshot_type::AiTaskSnapshot; use super::ai_text_chunk_snapshot_type::AiTextChunkSnapshot; @@ -11,11 +16,13 @@ use super::ai_text_chunk_snapshot_type::AiTextChunkSnapshot; #[sats(crate = __lib)] pub struct AiTaskProcedureResult { pub ok: bool, - pub task: Option, - pub text_chunk: Option, - pub error_message: Option, + pub task: Option::, + pub text_chunk: Option::, + pub error_message: Option::, } + impl __sdk::InModule for AiTaskProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_snapshot_type.rs index 66fa9a15..c0259393 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_snapshot_type.rs @@ -2,12 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::ai_result_reference_snapshot_type::AiResultReferenceSnapshot; use super::ai_task_kind_type::AiTaskKind; -use super::ai_task_stage_snapshot_type::AiTaskStageSnapshot; use super::ai_task_status_type::AiTaskStatus; +use super::ai_task_stage_snapshot_type::AiTaskStageSnapshot; +use super::ai_result_reference_snapshot_type::AiResultReferenceSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,21 +22,23 @@ pub struct AiTaskSnapshot { pub owner_user_id: String, pub request_label: String, pub source_module: String, - pub source_entity_id: Option, - pub request_payload_json: Option, + pub source_entity_id: Option::, + pub request_payload_json: Option::, pub status: AiTaskStatus, - pub failure_message: Option, - pub stages: Vec, - pub result_references: Vec, - pub latest_text_output: Option, - pub latest_structured_payload_json: Option, + pub failure_message: Option::, + pub stages: Vec::, + pub result_references: Vec::, + pub latest_text_output: Option::, + pub latest_structured_payload_json: Option::, pub version: u32, pub created_at_micros: i64, - pub started_at_micros: Option, - pub completed_at_micros: Option, + pub started_at_micros: Option::, + pub completed_at_micros: Option::, pub updated_at_micros: i64, } + impl __sdk::InModule for AiTaskSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_blueprint_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_blueprint_type.rs index 8ed04d04..366ca586 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_blueprint_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_blueprint_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -15,6 +20,8 @@ pub struct AiTaskStageBlueprint { pub order: u32, } + impl __sdk::InModule for AiTaskStageBlueprint { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_kind_type.rs index 1d7405de..679241ae 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum AiTaskStageKind { NormalizeResult, PersistResult, + } + + impl __sdk::InModule for AiTaskStageKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_snapshot_type.rs index 30cdb845..9d449d38 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_stage_kind_type::AiTaskStageKind; use super::ai_task_stage_status_type::AiTaskStageStatus; @@ -15,13 +20,15 @@ pub struct AiTaskStageSnapshot { pub detail: String, pub order: u32, pub status: AiTaskStageStatus, - pub text_output: Option, - pub structured_payload_json: Option, - pub warning_messages: Vec, - pub started_at_micros: Option, - pub completed_at_micros: Option, + pub text_output: Option::, + pub structured_payload_json: Option::, + pub warning_messages: Vec::, + pub started_at_micros: Option::, + pub completed_at_micros: Option::, } + impl __sdk::InModule for AiTaskStageSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_start_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_start_input_type.rs index 956fff88..8571c6d8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_start_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_start_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -14,6 +19,8 @@ pub struct AiTaskStageStartInput { pub started_at_micros: i64, } + impl __sdk::InModule for AiTaskStageStartInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_status_type.rs index e1a28d7c..3f60897b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,8 +20,12 @@ pub enum AiTaskStageStatus { Completed, Skipped, + } + + impl __sdk::InModule for AiTaskStageStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_table.rs index 0bd84f77..ae1617de 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_table.rs @@ -2,10 +2,15 @@ // 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::ai_task_stage_type::AiTaskStage; use super::ai_task_stage_kind_type::AiTaskStageKind; use super::ai_task_stage_status_type::AiTaskStageStatus; -use super::ai_task_stage_type::AiTaskStage; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `ai_task_stage`. /// @@ -46,12 +51,8 @@ impl<'ctx> __sdk::Table for AiTaskStageTableHandle<'ctx> { type Row = AiTaskStage; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = AiTaskStageInsertCallbackId; @@ -97,38 +98,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AiTaskStageTableHandle<'ctx> { } } -/// Access to the `task_stage_id` unique index on the table `ai_task_stage`, -/// which allows point queries on the field of the same name -/// via the [`AiTaskStageTaskStageIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.ai_task_stage().task_stage_id().find(...)`. -pub struct AiTaskStageTaskStageIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> AiTaskStageTableHandle<'ctx> { - /// Get a handle on the `task_stage_id` unique index on the table `ai_task_stage`. - pub fn task_stage_id(&self) -> AiTaskStageTaskStageIdUnique<'ctx> { - AiTaskStageTaskStageIdUnique { - imp: self.imp.get_unique_constraint::("task_stage_id"), - phantom: std::marker::PhantomData, + /// Access to the `task_stage_id` unique index on the table `ai_task_stage`, + /// which allows point queries on the field of the same name + /// via the [`AiTaskStageTaskStageIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.ai_task_stage().task_stage_id().find(...)`. + pub struct AiTaskStageTaskStageIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> AiTaskStageTaskStageIdUnique<'ctx> { - /// Find the subscribed row whose `task_stage_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 { - self.imp.find(col_val) - } -} + impl<'ctx> AiTaskStageTableHandle<'ctx> { + /// Get a handle on the `task_stage_id` unique index on the table `ai_task_stage`. + pub fn task_stage_id(&self) -> AiTaskStageTaskStageIdUnique<'ctx> { + AiTaskStageTaskStageIdUnique { + imp: self.imp.get_unique_constraint::("task_stage_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> AiTaskStageTaskStageIdUnique<'ctx> { + /// Find the subscribed row whose `task_stage_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("ai_task_stage"); _table.add_unique_constraint::("task_stage_id", |row| &row.task_stage_id); } @@ -138,24 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `AiTaskStage`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait ai_task_stageQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AiTaskStage`. - fn ai_task_stage(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `AiTaskStage`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait ai_task_stageQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AiTaskStage`. + fn ai_task_stage(&self) -> __sdk::__query_builder::Table; + } + + impl ai_task_stageQueryTableAccess for __sdk::QueryTableAccessor { + fn ai_task_stage(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("ai_task_stage") + } + } -impl ai_task_stageQueryTableAccess for __sdk::QueryTableAccessor { - fn ai_task_stage(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("ai_task_stage") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_type.rs index f4c902de..56a4094e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_stage_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_stage_kind_type::AiTaskStageKind; use super::ai_task_stage_status_type::AiTaskStageStatus; @@ -17,17 +22,19 @@ pub struct AiTaskStage { pub detail: String, pub stage_order: u32, pub status: AiTaskStageStatus, - pub text_output: Option, - pub structured_payload_json: Option, - pub warning_messages: Vec, - pub started_at: Option<__sdk::Timestamp>, - pub completed_at: Option<__sdk::Timestamp>, + pub text_output: Option::, + pub structured_payload_json: Option::, + pub warning_messages: Vec::, + pub started_at: Option::<__sdk::Timestamp>, + pub completed_at: Option::<__sdk::Timestamp>, } + impl __sdk::InModule for AiTaskStage { type Module = super::RemoteModule; } + /// Column accessor struct for the table `AiTaskStage`. /// /// Provides typed access to columns for query building. @@ -39,11 +46,11 @@ pub struct AiTaskStageCols { pub detail: __sdk::__query_builder::Col, pub stage_order: __sdk::__query_builder::Col, pub status: __sdk::__query_builder::Col, - pub text_output: __sdk::__query_builder::Col>, - pub structured_payload_json: __sdk::__query_builder::Col>, - pub warning_messages: __sdk::__query_builder::Col>, - pub started_at: __sdk::__query_builder::Col>, - pub completed_at: __sdk::__query_builder::Col>, + pub text_output: __sdk::__query_builder::Col>, + pub structured_payload_json: __sdk::__query_builder::Col>, + pub warning_messages: __sdk::__query_builder::Col>, + pub started_at: __sdk::__query_builder::Col>, + pub completed_at: __sdk::__query_builder::Col>, } impl __sdk::__query_builder::HasCols for AiTaskStage { @@ -58,13 +65,11 @@ impl __sdk::__query_builder::HasCols for AiTaskStage { stage_order: __sdk::__query_builder::Col::new(table_name, "stage_order"), status: __sdk::__query_builder::Col::new(table_name, "status"), text_output: __sdk::__query_builder::Col::new(table_name, "text_output"), - structured_payload_json: __sdk::__query_builder::Col::new( - table_name, - "structured_payload_json", - ), + structured_payload_json: __sdk::__query_builder::Col::new(table_name, "structured_payload_json"), warning_messages: __sdk::__query_builder::Col::new(table_name, "warning_messages"), started_at: __sdk::__query_builder::Col::new(table_name, "started_at"), completed_at: __sdk::__query_builder::Col::new(table_name, "completed_at"), + } } } @@ -83,8 +88,10 @@ impl __sdk::__query_builder::HasIxCols for AiTaskStage { AiTaskStageIxCols { task_id: __sdk::__query_builder::IxCol::new(table_name, "task_id"), task_stage_id: __sdk::__query_builder::IxCol::new(table_name, "task_stage_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for AiTaskStage {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_start_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_start_input_type.rs index d2145e81..14fa5acb 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_start_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_start_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct AiTaskStartInput { pub started_at_micros: i64, } + impl __sdk::InModule for AiTaskStartInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_status_type.rs index 3c59cd6a..58f1f7a2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum AiTaskStatus { Failed, Cancelled, + } + + impl __sdk::InModule for AiTaskStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_table.rs index 83c04b8a..60172196 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_table.rs @@ -2,10 +2,15 @@ // 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::ai_task_type::AiTask; use super::ai_task_kind_type::AiTaskKind; use super::ai_task_status_type::AiTaskStatus; -use super::ai_task_type::AiTask; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `ai_task`. /// @@ -46,12 +51,8 @@ impl<'ctx> __sdk::Table for AiTaskTableHandle<'ctx> { type Row = AiTask; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = AiTaskInsertCallbackId; @@ -97,38 +98,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AiTaskTableHandle<'ctx> { } } -/// Access to the `task_id` unique index on the table `ai_task`, -/// which allows point queries on the field of the same name -/// via the [`AiTaskTaskIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.ai_task().task_id().find(...)`. -pub struct AiTaskTaskIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> AiTaskTableHandle<'ctx> { - /// Get a handle on the `task_id` unique index on the table `ai_task`. - pub fn task_id(&self) -> AiTaskTaskIdUnique<'ctx> { - AiTaskTaskIdUnique { - imp: self.imp.get_unique_constraint::("task_id"), - phantom: std::marker::PhantomData, + /// Access to the `task_id` unique index on the table `ai_task`, + /// which allows point queries on the field of the same name + /// via the [`AiTaskTaskIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.ai_task().task_id().find(...)`. + pub struct AiTaskTaskIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> AiTaskTaskIdUnique<'ctx> { - /// Find the subscribed row whose `task_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 { - self.imp.find(col_val) - } -} + impl<'ctx> AiTaskTableHandle<'ctx> { + /// Get a handle on the `task_id` unique index on the table `ai_task`. + pub fn task_id(&self) -> AiTaskTaskIdUnique<'ctx> { + AiTaskTaskIdUnique { + imp: self.imp.get_unique_constraint::("task_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> AiTaskTaskIdUnique<'ctx> { + /// Find the subscribed row whose `task_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("ai_task"); _table.add_unique_constraint::("task_id", |row| &row.task_id); } @@ -138,24 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `AiTask`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait ai_taskQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AiTask`. - fn ai_task(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `AiTask`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait ai_taskQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AiTask`. + fn ai_task(&self) -> __sdk::__query_builder::Table; + } + + impl ai_taskQueryTableAccess for __sdk::QueryTableAccessor { + fn ai_task(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("ai_task") + } + } -impl ai_taskQueryTableAccess for __sdk::QueryTableAccessor { - fn ai_task(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("ai_task") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_type.rs index 6b2845fc..96d4077f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_task_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_task_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_kind_type::AiTaskKind; use super::ai_task_status_type::AiTaskStatus; @@ -15,23 +20,25 @@ pub struct AiTask { pub owner_user_id: String, pub request_label: String, pub source_module: String, - pub source_entity_id: Option, - pub request_payload_json: Option, + pub source_entity_id: Option::, + pub request_payload_json: Option::, pub status: AiTaskStatus, - pub failure_message: Option, - pub latest_text_output: Option, - pub latest_structured_payload_json: Option, + pub failure_message: Option::, + pub latest_text_output: Option::, + pub latest_structured_payload_json: Option::, pub version: u32, pub created_at: __sdk::Timestamp, - pub started_at: Option<__sdk::Timestamp>, - pub completed_at: Option<__sdk::Timestamp>, + pub started_at: Option::<__sdk::Timestamp>, + pub completed_at: Option::<__sdk::Timestamp>, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for AiTask { type Module = super::RemoteModule; } + /// Column accessor struct for the table `AiTask`. /// /// Provides typed access to columns for query building. @@ -41,16 +48,16 @@ pub struct AiTaskCols { pub owner_user_id: __sdk::__query_builder::Col, pub request_label: __sdk::__query_builder::Col, pub source_module: __sdk::__query_builder::Col, - pub source_entity_id: __sdk::__query_builder::Col>, - pub request_payload_json: __sdk::__query_builder::Col>, + pub source_entity_id: __sdk::__query_builder::Col>, + pub request_payload_json: __sdk::__query_builder::Col>, pub status: __sdk::__query_builder::Col, - pub failure_message: __sdk::__query_builder::Col>, - pub latest_text_output: __sdk::__query_builder::Col>, - pub latest_structured_payload_json: __sdk::__query_builder::Col>, + pub failure_message: __sdk::__query_builder::Col>, + pub latest_text_output: __sdk::__query_builder::Col>, + pub latest_structured_payload_json: __sdk::__query_builder::Col>, pub version: __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, - pub started_at: __sdk::__query_builder::Col>, - pub completed_at: __sdk::__query_builder::Col>, + pub started_at: __sdk::__query_builder::Col>, + pub completed_at: __sdk::__query_builder::Col>, pub updated_at: __sdk::__query_builder::Col, } @@ -64,22 +71,17 @@ impl __sdk::__query_builder::HasCols for AiTask { request_label: __sdk::__query_builder::Col::new(table_name, "request_label"), source_module: __sdk::__query_builder::Col::new(table_name, "source_module"), source_entity_id: __sdk::__query_builder::Col::new(table_name, "source_entity_id"), - request_payload_json: __sdk::__query_builder::Col::new( - table_name, - "request_payload_json", - ), + request_payload_json: __sdk::__query_builder::Col::new(table_name, "request_payload_json"), status: __sdk::__query_builder::Col::new(table_name, "status"), failure_message: __sdk::__query_builder::Col::new(table_name, "failure_message"), latest_text_output: __sdk::__query_builder::Col::new(table_name, "latest_text_output"), - latest_structured_payload_json: __sdk::__query_builder::Col::new( - table_name, - "latest_structured_payload_json", - ), + latest_structured_payload_json: __sdk::__query_builder::Col::new(table_name, "latest_structured_payload_json"), version: __sdk::__query_builder::Col::new(table_name, "version"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), started_at: __sdk::__query_builder::Col::new(table_name, "started_at"), completed_at: __sdk::__query_builder::Col::new(table_name, "completed_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -102,8 +104,10 @@ impl __sdk::__query_builder::HasIxCols for AiTask { status: __sdk::__query_builder::IxCol::new(table_name, "status"), task_id: __sdk::__query_builder::IxCol::new(table_name, "task_id"), task_kind: __sdk::__query_builder::IxCol::new(table_name, "task_kind"), + } } } impl __sdk::__query_builder::CanBeLookupTable for AiTask {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_append_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_append_input_type.rs index 0f462690..11b5da68 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_append_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_append_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -16,6 +21,8 @@ pub struct AiTextChunkAppendInput { pub created_at_micros: i64, } + impl __sdk::InModule for AiTextChunkAppendInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_snapshot_type.rs index f386071c..81cb2ce9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -17,6 +22,8 @@ pub struct AiTextChunkSnapshot { pub created_at_micros: i64, } + impl __sdk::InModule for AiTextChunkSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_table.rs index 7311d79f..2ef5c6ad 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::ai_task_stage_kind_type::AiTaskStageKind; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_text_chunk_type::AiTextChunk; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::ai_task_stage_kind_type::AiTaskStageKind; /// Table handle for the table `ai_text_chunk`. /// @@ -45,12 +50,8 @@ impl<'ctx> __sdk::Table for AiTextChunkTableHandle<'ctx> { type Row = AiTextChunk; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = AiTextChunkInsertCallbackId; @@ -96,40 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AiTextChunkTableHandle<'ctx> { } } -/// Access to the `text_chunk_row_id` unique index on the table `ai_text_chunk`, -/// which allows point queries on the field of the same name -/// via the [`AiTextChunkTextChunkRowIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.ai_text_chunk().text_chunk_row_id().find(...)`. -pub struct AiTextChunkTextChunkRowIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> AiTextChunkTableHandle<'ctx> { - /// Get a handle on the `text_chunk_row_id` unique index on the table `ai_text_chunk`. - pub fn text_chunk_row_id(&self) -> AiTextChunkTextChunkRowIdUnique<'ctx> { - AiTextChunkTextChunkRowIdUnique { - imp: self - .imp - .get_unique_constraint::("text_chunk_row_id"), - phantom: std::marker::PhantomData, + /// Access to the `text_chunk_row_id` unique index on the table `ai_text_chunk`, + /// which allows point queries on the field of the same name + /// via the [`AiTextChunkTextChunkRowIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.ai_text_chunk().text_chunk_row_id().find(...)`. + pub struct AiTextChunkTextChunkRowIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> AiTextChunkTextChunkRowIdUnique<'ctx> { - /// Find the subscribed row whose `text_chunk_row_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 { - self.imp.find(col_val) - } -} + impl<'ctx> AiTextChunkTableHandle<'ctx> { + /// Get a handle on the `text_chunk_row_id` unique index on the table `ai_text_chunk`. + pub fn text_chunk_row_id(&self) -> AiTextChunkTextChunkRowIdUnique<'ctx> { + AiTextChunkTextChunkRowIdUnique { + imp: self.imp.get_unique_constraint::("text_chunk_row_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> AiTextChunkTextChunkRowIdUnique<'ctx> { + /// Find the subscribed row whose `text_chunk_row_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("ai_text_chunk"); _table.add_unique_constraint::("text_chunk_row_id", |row| &row.text_chunk_row_id); } @@ -139,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `AiTextChunk`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait ai_text_chunkQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AiTextChunk`. - fn ai_text_chunk(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `AiTextChunk`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait ai_text_chunkQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AiTextChunk`. + fn ai_text_chunk(&self) -> __sdk::__query_builder::Table; + } + + impl ai_text_chunkQueryTableAccess for __sdk::QueryTableAccessor { + fn ai_text_chunk(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("ai_text_chunk") + } + } -impl ai_text_chunkQueryTableAccess for __sdk::QueryTableAccessor { - fn ai_text_chunk(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("ai_text_chunk") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_type.rs index 8a1a8c93..df60c3a7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/ai_text_chunk_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_stage_kind_type::AiTaskStageKind; @@ -18,10 +23,12 @@ pub struct AiTextChunk { pub created_at: __sdk::Timestamp, } + impl __sdk::InModule for AiTextChunk { type Module = super::RemoteModule; } + /// Column accessor struct for the table `AiTextChunk`. /// /// Provides typed access to columns for query building. @@ -46,6 +53,7 @@ impl __sdk::__query_builder::HasCols for AiTextChunk { sequence: __sdk::__query_builder::Col::new(table_name, "sequence"), delta_text: __sdk::__query_builder::Col::new(table_name, "delta_text"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), + } } } @@ -64,8 +72,10 @@ impl __sdk::__query_builder::HasIxCols for AiTextChunk { AiTextChunkIxCols { task_id: __sdk::__query_builder::IxCol::new(table_name, "task_id"), text_chunk_row_id: __sdk::__query_builder::IxCol::new(table_name, "text_chunk_row_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for AiTextChunk {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/append_ai_text_chunk_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/append_ai_text_chunk_and_return_procedure.rs index 191e2ea7..2edd4cbc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/append_ai_text_chunk_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/append_ai_text_chunk_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::ai_task_procedure_result_type::AiTaskProcedureResult; use super::ai_text_chunk_append_input_type::AiTextChunkAppendInput; +use super::ai_task_procedure_result_type::AiTaskProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct AppendAiTextChunkAndReturnArgs { + struct AppendAiTextChunkAndReturnArgs { pub input: AiTextChunkAppendInput, } + impl __sdk::InModule for AppendAiTextChunkAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for AppendAiTextChunkAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait append_ai_text_chunk_and_return { - fn append_ai_text_chunk_and_return(&self, input: AiTextChunkAppendInput) { - self.append_ai_text_chunk_and_return_then(input, |_, _| {}); + fn append_ai_text_chunk_and_return(&self, input: AiTextChunkAppendInput, +) { + self.append_ai_text_chunk_and_return_then(input, |_, _| {}); } fn append_ai_text_chunk_and_return_then( &self, input: AiTextChunkAppendInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl append_ai_text_chunk_and_return for super::RemoteProcedures { &self, input: AiTextChunkAppendInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "append_ai_text_chunk_and_return", - AppendAiTextChunkAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "append_ai_text_chunk_and_return", + AppendAiTextChunkAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_and_return_procedure.rs index 4a949906..e76eac6e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::chapter_progression_ledger_input_type::ChapterProgressionLedgerInput; use super::chapter_progression_procedure_result_type::ChapterProgressionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ApplyChapterProgressionLedgerEntryAndReturnArgs { + struct ApplyChapterProgressionLedgerEntryAndReturnArgs { pub input: ChapterProgressionLedgerInput, } + impl __sdk::InModule for ApplyChapterProgressionLedgerEntryAndReturnArgs { type Module = super::RemoteModule; } @@ -22,22 +28,16 @@ impl __sdk::InModule for ApplyChapterProgressionLedgerEntryAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait apply_chapter_progression_ledger_entry_and_return { - fn apply_chapter_progression_ledger_entry_and_return( - &self, - input: ChapterProgressionLedgerInput, - ) { - self.apply_chapter_progression_ledger_entry_and_return_then(input, |_, _| {}); + fn apply_chapter_progression_ledger_entry_and_return(&self, input: ChapterProgressionLedgerInput, +) { + self.apply_chapter_progression_ledger_entry_and_return_then(input, |_, _| {}); } fn apply_chapter_progression_ledger_entry_and_return_then( &self, input: ChapterProgressionLedgerInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -46,17 +46,13 @@ impl apply_chapter_progression_ledger_entry_and_return for super::RemoteProcedur &self, input: ChapterProgressionLedgerInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( - "apply_chapter_progression_ledger_entry_and_return", - ApplyChapterProgressionLedgerEntryAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( + "apply_chapter_progression_ledger_entry_and_return", + ApplyChapterProgressionLedgerEntryAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_reducer.rs index 44596083..04f54e54 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/apply_chapter_progression_ledger_entry_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::chapter_progression_ledger_input_type::ChapterProgressionLedgerInput; @@ -14,8 +19,10 @@ pub(super) struct ApplyChapterProgressionLedgerEntryArgs { impl From for super::Reducer { fn from(args: ApplyChapterProgressionLedgerEntryArgs) -> Self { - Self::ApplyChapterProgressionLedgerEntry { input: args.input } - } + Self::ApplyChapterProgressionLedgerEntry { + input: args.input, +} +} } impl __sdk::InModule for ApplyChapterProgressionLedgerEntryArgs { @@ -33,11 +40,9 @@ pub trait apply_chapter_progression_ledger_entry { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`apply_chapter_progression_ledger_entry:apply_chapter_progression_ledger_entry_then`] to run a callback after the reducer completes. - fn apply_chapter_progression_ledger_entry( - &self, - input: ChapterProgressionLedgerInput, - ) -> __sdk::Result<()> { - self.apply_chapter_progression_ledger_entry_then(input, |_, _| {}) + fn apply_chapter_progression_ledger_entry(&self, input: ChapterProgressionLedgerInput, +) -> __sdk::Result<()> { + self.apply_chapter_progression_ledger_entry_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `apply_chapter_progression_ledger_entry` to run as soon as possible, @@ -50,11 +55,9 @@ pub trait apply_chapter_progression_ledger_entry { &self, input: ChapterProgressionLedgerInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -63,15 +66,11 @@ impl apply_chapter_progression_ledger_entry for super::RemoteReducers { &self, input: ChapterProgressionLedgerInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp.invoke_reducer_with_callback( - ApplyChapterProgressionLedgerEntryArgs { input }, - callback, - ) + self.imp.invoke_reducer_with_callback(ApplyChapterProgressionLedgerEntryArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/apply_inventory_mutation_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/apply_inventory_mutation_reducer.rs index d9b4240d..4270f52a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/apply_inventory_mutation_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/apply_inventory_mutation_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::inventory_mutation_input_type::InventoryMutationInput; @@ -14,8 +19,10 @@ pub(super) struct ApplyInventoryMutationArgs { impl From for super::Reducer { fn from(args: ApplyInventoryMutationArgs) -> Self { - Self::ApplyInventoryMutation { input: args.input } - } + Self::ApplyInventoryMutation { + input: args.input, +} +} } impl __sdk::InModule for ApplyInventoryMutationArgs { @@ -33,8 +40,9 @@ pub trait apply_inventory_mutation { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`apply_inventory_mutation:apply_inventory_mutation_then`] to run a callback after the reducer completes. - fn apply_inventory_mutation(&self, input: InventoryMutationInput) -> __sdk::Result<()> { - self.apply_inventory_mutation_then(input, |_, _| {}) + fn apply_inventory_mutation(&self, input: InventoryMutationInput, +) -> __sdk::Result<()> { + self.apply_inventory_mutation_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `apply_inventory_mutation` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait apply_inventory_mutation { &self, input: InventoryMutationInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl apply_inventory_mutation for super::RemoteReducers { &self, input: InventoryMutationInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(ApplyInventoryMutationArgs { input }, callback) + self.imp.invoke_reducer_with_callback(ApplyInventoryMutationArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/apply_quest_signal_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/apply_quest_signal_reducer.rs index 6b4c310b..6976f6aa 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/apply_quest_signal_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/apply_quest_signal_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_signal_apply_input_type::QuestSignalApplyInput; @@ -14,8 +19,10 @@ pub(super) struct ApplyQuestSignalArgs { impl From for super::Reducer { fn from(args: ApplyQuestSignalArgs) -> Self { - Self::ApplyQuestSignal { input: args.input } - } + Self::ApplyQuestSignal { + input: args.input, +} +} } impl __sdk::InModule for ApplyQuestSignalArgs { @@ -33,8 +40,9 @@ pub trait apply_quest_signal { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`apply_quest_signal:apply_quest_signal_then`] to run a callback after the reducer completes. - fn apply_quest_signal(&self, input: QuestSignalApplyInput) -> __sdk::Result<()> { - self.apply_quest_signal_then(input, |_, _| {}) + fn apply_quest_signal(&self, input: QuestSignalApplyInput, +) -> __sdk::Result<()> { + self.apply_quest_signal_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `apply_quest_signal` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait apply_quest_signal { &self, input: QuestSignalApplyInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl apply_quest_signal for super::RemoteReducers { &self, input: QuestSignalApplyInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(ApplyQuestSignalArgs { input }, callback) + self.imp.invoke_reducer_with_callback(ApplyQuestSignalArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_input_type.rs index 10a39937..10dab835 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,11 +19,13 @@ pub struct AssetEntityBindingInput { pub entity_id: String, pub slot: String, pub asset_kind: String, - pub owner_user_id: Option, - pub profile_id: Option, + pub owner_user_id: Option::, + pub profile_id: Option::, pub updated_at_micros: i64, } + impl __sdk::InModule for AssetEntityBindingInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_procedure_result_type.rs index 1c51596f..73eff3a6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::asset_entity_binding_snapshot_type::AssetEntityBindingSnapshot; @@ -10,10 +15,12 @@ use super::asset_entity_binding_snapshot_type::AssetEntityBindingSnapshot; #[sats(crate = __lib)] pub struct AssetEntityBindingProcedureResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for AssetEntityBindingProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_snapshot_type.rs index d559ea04..862d1b14 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_snapshot_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,12 +19,14 @@ pub struct AssetEntityBindingSnapshot { pub entity_id: String, pub slot: String, pub asset_kind: String, - pub owner_user_id: Option, - pub profile_id: Option, + pub owner_user_id: Option::, + pub profile_id: Option::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for AssetEntityBindingSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_table.rs index 971704ae..13f7b47f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_table.rs @@ -2,8 +2,13 @@ // 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::asset_entity_binding_type::AssetEntityBinding; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `asset_entity_binding`. /// @@ -31,9 +36,7 @@ pub trait AssetEntityBindingTableAccess { impl AssetEntityBindingTableAccess for super::RemoteTables { fn asset_entity_binding(&self) -> AssetEntityBindingTableHandle<'_> { AssetEntityBindingTableHandle { - imp: self - .imp - .get_table::("asset_entity_binding"), + imp: self.imp.get_table::("asset_entity_binding"), ctx: std::marker::PhantomData, } } @@ -46,12 +49,8 @@ impl<'ctx> __sdk::Table for AssetEntityBindingTableHandle<'ctx> { type Row = AssetEntityBinding; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = AssetEntityBindingInsertCallbackId; @@ -97,38 +96,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AssetEntityBindingTableHandle<'ctx> { } } -/// Access to the `binding_id` unique index on the table `asset_entity_binding`, -/// which allows point queries on the field of the same name -/// via the [`AssetEntityBindingBindingIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.asset_entity_binding().binding_id().find(...)`. -pub struct AssetEntityBindingBindingIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> AssetEntityBindingTableHandle<'ctx> { - /// Get a handle on the `binding_id` unique index on the table `asset_entity_binding`. - pub fn binding_id(&self) -> AssetEntityBindingBindingIdUnique<'ctx> { - AssetEntityBindingBindingIdUnique { - imp: self.imp.get_unique_constraint::("binding_id"), - phantom: std::marker::PhantomData, + /// Access to the `binding_id` unique index on the table `asset_entity_binding`, + /// which allows point queries on the field of the same name + /// via the [`AssetEntityBindingBindingIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.asset_entity_binding().binding_id().find(...)`. + pub struct AssetEntityBindingBindingIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> AssetEntityBindingBindingIdUnique<'ctx> { - /// Find the subscribed row whose `binding_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 { - self.imp.find(col_val) - } -} + impl<'ctx> AssetEntityBindingTableHandle<'ctx> { + /// Get a handle on the `binding_id` unique index on the table `asset_entity_binding`. + pub fn binding_id(&self) -> AssetEntityBindingBindingIdUnique<'ctx> { + AssetEntityBindingBindingIdUnique { + imp: self.imp.get_unique_constraint::("binding_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> AssetEntityBindingBindingIdUnique<'ctx> { + /// Find the subscribed row whose `binding_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("asset_entity_binding"); _table.add_unique_constraint::("binding_id", |row| &row.binding_id); } @@ -138,24 +138,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `AssetEntityBinding`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait asset_entity_bindingQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AssetEntityBinding`. - fn asset_entity_binding(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `AssetEntityBinding`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait asset_entity_bindingQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AssetEntityBinding`. + fn asset_entity_binding(&self) -> __sdk::__query_builder::Table; + } + + impl asset_entity_bindingQueryTableAccess for __sdk::QueryTableAccessor { + fn asset_entity_binding(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("asset_entity_binding") + } + } -impl asset_entity_bindingQueryTableAccess for __sdk::QueryTableAccessor { - fn asset_entity_binding(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("asset_entity_binding") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_type.rs index f12154e1..8f5423b6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_entity_binding_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,16 +19,18 @@ pub struct AssetEntityBinding { pub entity_id: String, pub slot: String, pub asset_kind: String, - pub owner_user_id: Option, - pub profile_id: Option, + pub owner_user_id: Option::, + pub profile_id: Option::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for AssetEntityBinding { type Module = super::RemoteModule; } + /// Column accessor struct for the table `AssetEntityBinding`. /// /// Provides typed access to columns for query building. @@ -33,8 +41,8 @@ pub struct AssetEntityBindingCols { pub entity_id: __sdk::__query_builder::Col, pub slot: __sdk::__query_builder::Col, pub asset_kind: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col>, - pub profile_id: __sdk::__query_builder::Col>, + pub owner_user_id: __sdk::__query_builder::Col>, + pub profile_id: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -53,6 +61,7 @@ impl __sdk::__query_builder::HasCols for AssetEntityBinding { profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -71,8 +80,10 @@ impl __sdk::__query_builder::HasIxCols for AssetEntityBinding { AssetEntityBindingIxCols { asset_object_id: __sdk::__query_builder::IxCol::new(table_name, "asset_object_id"), binding_id: __sdk::__query_builder::IxCol::new(table_name, "binding_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for AssetEntityBinding {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_access_policy_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_access_policy_type.rs index 17d02930..3d6203bb 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_access_policy_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_access_policy_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum AssetObjectAccessPolicy { Private, PublicRead, + } + + impl __sdk::InModule for AssetObjectAccessPolicy { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_procedure_result_type.rs index 9ccf22ed..ea327af9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::asset_object_upsert_snapshot_type::AssetObjectUpsertSnapshot; @@ -10,10 +15,12 @@ use super::asset_object_upsert_snapshot_type::AssetObjectUpsertSnapshot; #[sats(crate = __lib)] pub struct AssetObjectProcedureResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for AssetObjectProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_table.rs index 526fa287..2aeb9a22 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::asset_object_access_policy_type::AssetObjectAccessPolicy; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::asset_object_type::AssetObject; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::asset_object_access_policy_type::AssetObjectAccessPolicy; /// Table handle for the table `asset_object`. /// @@ -45,12 +50,8 @@ impl<'ctx> __sdk::Table for AssetObjectTableHandle<'ctx> { type Row = AssetObject; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = AssetObjectInsertCallbackId; @@ -96,38 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for AssetObjectTableHandle<'ctx> { } } -/// Access to the `asset_object_id` unique index on the table `asset_object`, -/// which allows point queries on the field of the same name -/// via the [`AssetObjectAssetObjectIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.asset_object().asset_object_id().find(...)`. -pub struct AssetObjectAssetObjectIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> AssetObjectTableHandle<'ctx> { - /// Get a handle on the `asset_object_id` unique index on the table `asset_object`. - pub fn asset_object_id(&self) -> AssetObjectAssetObjectIdUnique<'ctx> { - AssetObjectAssetObjectIdUnique { - imp: self.imp.get_unique_constraint::("asset_object_id"), - phantom: std::marker::PhantomData, + /// Access to the `asset_object_id` unique index on the table `asset_object`, + /// which allows point queries on the field of the same name + /// via the [`AssetObjectAssetObjectIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.asset_object().asset_object_id().find(...)`. + pub struct AssetObjectAssetObjectIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> AssetObjectAssetObjectIdUnique<'ctx> { - /// Find the subscribed row whose `asset_object_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 { - self.imp.find(col_val) - } -} + impl<'ctx> AssetObjectTableHandle<'ctx> { + /// Get a handle on the `asset_object_id` unique index on the table `asset_object`. + pub fn asset_object_id(&self) -> AssetObjectAssetObjectIdUnique<'ctx> { + AssetObjectAssetObjectIdUnique { + imp: self.imp.get_unique_constraint::("asset_object_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> AssetObjectAssetObjectIdUnique<'ctx> { + /// Find the subscribed row whose `asset_object_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("asset_object"); _table.add_unique_constraint::("asset_object_id", |row| &row.asset_object_id); } @@ -137,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `AssetObject`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait asset_objectQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `AssetObject`. - fn asset_object(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `AssetObject`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait asset_objectQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `AssetObject`. + fn asset_object(&self) -> __sdk::__query_builder::Table; + } + + impl asset_objectQueryTableAccess for __sdk::QueryTableAccessor { + fn asset_object(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("asset_object") + } + } -impl asset_objectQueryTableAccess for __sdk::QueryTableAccessor { - fn asset_object(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("asset_object") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_type.rs index c9d57ac5..75935935 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::asset_object_access_policy_type::AssetObjectAccessPolicy; @@ -13,23 +18,25 @@ pub struct AssetObject { pub bucket: String, pub object_key: String, pub access_policy: AssetObjectAccessPolicy, - pub content_type: Option, + pub content_type: Option::, pub content_length: u64, - pub content_hash: Option, + pub content_hash: Option::, pub version: u32, - pub source_job_id: Option, - pub owner_user_id: Option, - pub profile_id: Option, - pub entity_id: Option, + pub source_job_id: Option::, + pub owner_user_id: Option::, + pub profile_id: Option::, + pub entity_id: Option::, pub asset_kind: String, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for AssetObject { type Module = super::RemoteModule; } + /// Column accessor struct for the table `AssetObject`. /// /// Provides typed access to columns for query building. @@ -38,14 +45,14 @@ pub struct AssetObjectCols { pub bucket: __sdk::__query_builder::Col, pub object_key: __sdk::__query_builder::Col, pub access_policy: __sdk::__query_builder::Col, - pub content_type: __sdk::__query_builder::Col>, + pub content_type: __sdk::__query_builder::Col>, pub content_length: __sdk::__query_builder::Col, - pub content_hash: __sdk::__query_builder::Col>, + pub content_hash: __sdk::__query_builder::Col>, pub version: __sdk::__query_builder::Col, - pub source_job_id: __sdk::__query_builder::Col>, - pub owner_user_id: __sdk::__query_builder::Col>, - pub profile_id: __sdk::__query_builder::Col>, - pub entity_id: __sdk::__query_builder::Col>, + pub source_job_id: __sdk::__query_builder::Col>, + pub owner_user_id: __sdk::__query_builder::Col>, + pub profile_id: __sdk::__query_builder::Col>, + pub entity_id: __sdk::__query_builder::Col>, pub asset_kind: __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, @@ -70,6 +77,7 @@ impl __sdk::__query_builder::HasCols for AssetObject { asset_kind: __sdk::__query_builder::Col::new(table_name, "asset_kind"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -88,8 +96,10 @@ impl __sdk::__query_builder::HasIxCols for AssetObject { AssetObjectIxCols { asset_kind: __sdk::__query_builder::IxCol::new(table_name, "asset_kind"), asset_object_id: __sdk::__query_builder::IxCol::new(table_name, "asset_object_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for AssetObject {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_input_type.rs index 85fcadc6..7e48cffa 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::asset_object_access_policy_type::AssetObjectAccessPolicy; @@ -13,18 +18,20 @@ pub struct AssetObjectUpsertInput { pub bucket: String, pub object_key: String, pub access_policy: AssetObjectAccessPolicy, - pub content_type: Option, + pub content_type: Option::, pub content_length: u64, - pub content_hash: Option, + pub content_hash: Option::, pub version: u32, - pub source_job_id: Option, - pub owner_user_id: Option, - pub profile_id: Option, - pub entity_id: Option, + pub source_job_id: Option::, + pub owner_user_id: Option::, + pub profile_id: Option::, + pub entity_id: Option::, pub asset_kind: String, pub updated_at_micros: i64, } + impl __sdk::InModule for AssetObjectUpsertInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_snapshot_type.rs index b349f18d..7b5d3860 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/asset_object_upsert_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::asset_object_access_policy_type::AssetObjectAccessPolicy; @@ -13,19 +18,21 @@ pub struct AssetObjectUpsertSnapshot { pub bucket: String, pub object_key: String, pub access_policy: AssetObjectAccessPolicy, - pub content_type: Option, + pub content_type: Option::, pub content_length: u64, - pub content_hash: Option, + pub content_hash: Option::, pub version: u32, - pub source_job_id: Option, - pub owner_user_id: Option, - pub profile_id: Option, - pub entity_id: Option, + pub source_job_id: Option::, + pub owner_user_id: Option::, + pub profile_id: Option::, + pub entity_id: Option::, pub asset_kind: String, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for AssetObjectUpsertSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/attach_ai_result_reference_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/attach_ai_result_reference_and_return_procedure.rs index 94d41850..c7eb0e22 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/attach_ai_result_reference_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/attach_ai_result_reference_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::ai_result_reference_input_type::AiResultReferenceInput; use super::ai_task_procedure_result_type::AiTaskProcedureResult; +use super::ai_result_reference_input_type::AiResultReferenceInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct AttachAiResultReferenceAndReturnArgs { + struct AttachAiResultReferenceAndReturnArgs { pub input: AiResultReferenceInput, } + impl __sdk::InModule for AttachAiResultReferenceAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for AttachAiResultReferenceAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait attach_ai_result_reference_and_return { - fn attach_ai_result_reference_and_return(&self, input: AiResultReferenceInput) { - self.attach_ai_result_reference_and_return_then(input, |_, _| {}); + fn attach_ai_result_reference_and_return(&self, input: AiResultReferenceInput, +) { + self.attach_ai_result_reference_and_return_then(input, |_, _| {}); } fn attach_ai_result_reference_and_return_then( &self, input: AiResultReferenceInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl attach_ai_result_reference_and_return for super::RemoteProcedures { &self, input: AiResultReferenceInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "attach_ai_result_reference_and_return", - AttachAiResultReferenceAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "attach_ai_result_reference_and_return", + AttachAiResultReferenceAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_mode_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_mode_type.rs index a88c25f4..1961ac69 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_mode_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_mode_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum BattleMode { Fight, Spar, + } + + impl __sdk::InModule for BattleMode { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_input_type.rs index 6a176e2d..104b96cb 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::battle_mode_type::BattleMode; use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; @@ -14,7 +19,7 @@ pub struct BattleStateInput { pub story_session_id: String, pub runtime_session_id: String, pub actor_user_id: String, - pub chapter_id: Option, + pub chapter_id: Option::, pub target_npc_id: String, pub target_name: String, pub battle_mode: BattleMode, @@ -25,10 +30,12 @@ pub struct BattleStateInput { pub target_hp: i32, pub target_max_hp: i32, pub experience_reward: u32, - pub reward_items: Vec, + pub reward_items: Vec::, pub created_at_micros: i64, } + impl __sdk::InModule for BattleStateInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_procedure_result_type.rs index e66352ad..cadc80d8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::battle_state_snapshot_type::BattleStateSnapshot; @@ -10,10 +15,12 @@ use super::battle_state_snapshot_type::BattleStateSnapshot; #[sats(crate = __lib)] pub struct BattleStateProcedureResult { pub ok: bool, - pub snapshot: Option, - pub error_message: Option, + pub snapshot: Option::, + pub error_message: Option::, } + impl __sdk::InModule for BattleStateProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_query_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_query_input_type.rs index 53053cca..6b9298d4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_query_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_query_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct BattleStateQueryInput { pub battle_state_id: String, } + impl __sdk::InModule for BattleStateQueryInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_snapshot_type.rs index 925d8468..c20ec25c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_snapshot_type.rs @@ -2,12 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::battle_mode_type::BattleMode; use super::battle_status_type::BattleStatus; -use super::combat_outcome_type::CombatOutcome; use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; +use super::combat_outcome_type::CombatOutcome; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,7 +21,7 @@ pub struct BattleStateSnapshot { pub story_session_id: String, pub runtime_session_id: String, pub actor_user_id: String, - pub chapter_id: Option, + pub chapter_id: Option::, pub target_npc_id: String, pub target_name: String, pub battle_mode: BattleMode, @@ -28,11 +33,11 @@ pub struct BattleStateSnapshot { pub target_hp: i32, pub target_max_hp: i32, pub experience_reward: u32, - pub reward_items: Vec, + pub reward_items: Vec::, pub turn_index: u32, - pub last_action_function_id: Option, - pub last_action_text: Option, - pub last_result_text: Option, + pub last_action_function_id: Option::, + pub last_action_text: Option::, + pub last_result_text: Option::, pub last_damage_dealt: i32, pub last_damage_taken: i32, pub last_outcome: CombatOutcome, @@ -41,6 +46,8 @@ pub struct BattleStateSnapshot { pub updated_at_micros: i64, } + impl __sdk::InModule for BattleStateSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_table.rs index 98a289a4..53dc1ebb 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_table.rs @@ -2,12 +2,17 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::battle_mode_type::BattleMode; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::battle_state_type::BattleState; +use super::battle_mode_type::BattleMode; use super::battle_status_type::BattleStatus; -use super::combat_outcome_type::CombatOutcome; use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::combat_outcome_type::CombatOutcome; /// Table handle for the table `battle_state`. /// @@ -48,12 +53,8 @@ impl<'ctx> __sdk::Table for BattleStateTableHandle<'ctx> { type Row = BattleState; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = BattleStateInsertCallbackId; @@ -99,38 +100,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BattleStateTableHandle<'ctx> { } } -/// Access to the `battle_state_id` unique index on the table `battle_state`, -/// which allows point queries on the field of the same name -/// via the [`BattleStateBattleStateIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.battle_state().battle_state_id().find(...)`. -pub struct BattleStateBattleStateIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BattleStateTableHandle<'ctx> { - /// Get a handle on the `battle_state_id` unique index on the table `battle_state`. - pub fn battle_state_id(&self) -> BattleStateBattleStateIdUnique<'ctx> { - BattleStateBattleStateIdUnique { - imp: self.imp.get_unique_constraint::("battle_state_id"), - phantom: std::marker::PhantomData, + /// Access to the `battle_state_id` unique index on the table `battle_state`, + /// which allows point queries on the field of the same name + /// via the [`BattleStateBattleStateIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.battle_state().battle_state_id().find(...)`. + pub struct BattleStateBattleStateIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> BattleStateBattleStateIdUnique<'ctx> { - /// Find the subscribed row whose `battle_state_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 { - self.imp.find(col_val) - } -} + impl<'ctx> BattleStateTableHandle<'ctx> { + /// Get a handle on the `battle_state_id` unique index on the table `battle_state`. + pub fn battle_state_id(&self) -> BattleStateBattleStateIdUnique<'ctx> { + BattleStateBattleStateIdUnique { + imp: self.imp.get_unique_constraint::("battle_state_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> BattleStateBattleStateIdUnique<'ctx> { + /// Find the subscribed row whose `battle_state_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("battle_state"); _table.add_unique_constraint::("battle_state_id", |row| &row.battle_state_id); } @@ -140,24 +142,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BattleState`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait battle_stateQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BattleState`. - fn battle_state(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `BattleState`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait battle_stateQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `BattleState`. + fn battle_state(&self) -> __sdk::__query_builder::Table; + } + + impl battle_stateQueryTableAccess for __sdk::QueryTableAccessor { + fn battle_state(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("battle_state") + } + } -impl battle_stateQueryTableAccess for __sdk::QueryTableAccessor { - fn battle_state(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("battle_state") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_type.rs index 9d9b852f..1b7e0420 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_state_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_state_type.rs @@ -2,12 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::battle_mode_type::BattleMode; use super::battle_status_type::BattleStatus; -use super::combat_outcome_type::CombatOutcome; use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; +use super::combat_outcome_type::CombatOutcome; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,7 +21,7 @@ pub struct BattleState { pub story_session_id: String, pub runtime_session_id: String, pub actor_user_id: String, - pub chapter_id: Option, + pub chapter_id: Option::, pub target_npc_id: String, pub target_name: String, pub battle_mode: BattleMode, @@ -28,11 +33,11 @@ pub struct BattleState { pub target_hp: i32, pub target_max_hp: i32, pub experience_reward: u32, - pub reward_items: Vec, + pub reward_items: Vec::, pub turn_index: u32, - pub last_action_function_id: Option, - pub last_action_text: Option, - pub last_result_text: Option, + pub last_action_function_id: Option::, + pub last_action_text: Option::, + pub last_result_text: Option::, pub last_damage_dealt: i32, pub last_damage_taken: i32, pub last_outcome: CombatOutcome, @@ -41,10 +46,12 @@ pub struct BattleState { pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for BattleState { type Module = super::RemoteModule; } + /// Column accessor struct for the table `BattleState`. /// /// Provides typed access to columns for query building. @@ -53,7 +60,7 @@ pub struct BattleStateCols { pub story_session_id: __sdk::__query_builder::Col, pub runtime_session_id: __sdk::__query_builder::Col, pub actor_user_id: __sdk::__query_builder::Col, - pub chapter_id: __sdk::__query_builder::Col>, + pub chapter_id: __sdk::__query_builder::Col>, pub target_npc_id: __sdk::__query_builder::Col, pub target_name: __sdk::__query_builder::Col, pub battle_mode: __sdk::__query_builder::Col, @@ -65,11 +72,11 @@ pub struct BattleStateCols { pub target_hp: __sdk::__query_builder::Col, pub target_max_hp: __sdk::__query_builder::Col, pub experience_reward: __sdk::__query_builder::Col, - pub reward_items: __sdk::__query_builder::Col>, + pub reward_items: __sdk::__query_builder::Col>, pub turn_index: __sdk::__query_builder::Col, - pub last_action_function_id: __sdk::__query_builder::Col>, - pub last_action_text: __sdk::__query_builder::Col>, - pub last_result_text: __sdk::__query_builder::Col>, + pub last_action_function_id: __sdk::__query_builder::Col>, + pub last_action_text: __sdk::__query_builder::Col>, + pub last_result_text: __sdk::__query_builder::Col>, pub last_damage_dealt: __sdk::__query_builder::Col, pub last_damage_taken: __sdk::__query_builder::Col, pub last_outcome: __sdk::__query_builder::Col, @@ -100,10 +107,7 @@ impl __sdk::__query_builder::HasCols for BattleState { experience_reward: __sdk::__query_builder::Col::new(table_name, "experience_reward"), reward_items: __sdk::__query_builder::Col::new(table_name, "reward_items"), turn_index: __sdk::__query_builder::Col::new(table_name, "turn_index"), - last_action_function_id: __sdk::__query_builder::Col::new( - table_name, - "last_action_function_id", - ), + last_action_function_id: __sdk::__query_builder::Col::new(table_name, "last_action_function_id"), last_action_text: __sdk::__query_builder::Col::new(table_name, "last_action_text"), last_result_text: __sdk::__query_builder::Col::new(table_name, "last_result_text"), last_damage_dealt: __sdk::__query_builder::Col::new(table_name, "last_damage_dealt"), @@ -112,6 +116,7 @@ impl __sdk::__query_builder::HasCols for BattleState { version: __sdk::__query_builder::Col::new(table_name, "version"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -132,13 +137,12 @@ impl __sdk::__query_builder::HasIxCols for BattleState { BattleStateIxCols { actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), battle_state_id: __sdk::__query_builder::IxCol::new(table_name, "battle_state_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), + runtime_session_id: __sdk::__query_builder::IxCol::new(table_name, "runtime_session_id"), story_session_id: __sdk::__query_builder::IxCol::new(table_name, "story_session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for BattleState {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/battle_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/battle_status_type.rs index 0aba4f43..e869befe 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/battle_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/battle_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum BattleStatus { Resolved, Aborted, + } + + impl __sdk::InModule for BattleStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_and_return_procedure.rs index 304b2e0c..75c19e04 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::story_session_input_type::StorySessionInput; use super::story_session_procedure_result_type::StorySessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct BeginStorySessionAndReturnArgs { + struct BeginStorySessionAndReturnArgs { pub input: StorySessionInput, } + impl __sdk::InModule for BeginStorySessionAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for BeginStorySessionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait begin_story_session_and_return { - fn begin_story_session_and_return(&self, input: StorySessionInput) { - self.begin_story_session_and_return_then(input, |_, _| {}); + fn begin_story_session_and_return(&self, input: StorySessionInput, +) { + self.begin_story_session_and_return_then(input, |_, _| {}); } fn begin_story_session_and_return_then( &self, input: StorySessionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl begin_story_session_and_return for super::RemoteProcedures { &self, input: StorySessionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, StorySessionProcedureResult>( - "begin_story_session_and_return", - BeginStorySessionAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, StorySessionProcedureResult>( + "begin_story_session_and_return", + BeginStorySessionAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_reducer.rs index 22bc4add..582bb850 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/begin_story_session_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::story_session_input_type::StorySessionInput; @@ -14,8 +19,10 @@ pub(super) struct BeginStorySessionArgs { impl From for super::Reducer { fn from(args: BeginStorySessionArgs) -> Self { - Self::BeginStorySession { input: args.input } - } + Self::BeginStorySession { + input: args.input, +} +} } impl __sdk::InModule for BeginStorySessionArgs { @@ -33,8 +40,9 @@ pub trait begin_story_session { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`begin_story_session:begin_story_session_then`] to run a callback after the reducer completes. - fn begin_story_session(&self, input: StorySessionInput) -> __sdk::Result<()> { - self.begin_story_session_then(input, |_, _| {}) + fn begin_story_session(&self, input: StorySessionInput, +) -> __sdk::Result<()> { + self.begin_story_session_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `begin_story_session` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait begin_story_session { &self, input: StorySessionInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl begin_story_session for super::RemoteReducers { &self, input: StorySessionInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(BeginStorySessionArgs { input }, callback) + self.imp.invoke_reducer_with_callback(BeginStorySessionArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_kind_type.rs index 00f36e4e..174e55f8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,8 +20,12 @@ pub enum BigFishAgentMessageKind { ActionResult, Warning, + } + + impl __sdk::InModule for BigFishAgentMessageKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_role_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_role_type.rs index d8a1a82c..9f8a0458 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_role_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_role_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum BigFishAgentMessageRole { Assistant, System, + } + + impl __sdk::InModule for BigFishAgentMessageRole { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_snapshot_type.rs index acc31e57..d6b00fc5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_snapshot_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::big_fish_agent_message_kind_type::BigFishAgentMessageKind; use super::big_fish_agent_message_role_type::BigFishAgentMessageRole; +use super::big_fish_agent_message_kind_type::BigFishAgentMessageKind; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,6 +23,8 @@ pub struct BigFishAgentMessageSnapshot { pub created_at_micros: i64, } + impl __sdk::InModule for BigFishAgentMessageSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_table.rs index cbb48abe..59185a0b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_table.rs @@ -2,10 +2,15 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::big_fish_agent_message_kind_type::BigFishAgentMessageKind; -use super::big_fish_agent_message_role_type::BigFishAgentMessageRole; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_agent_message_type::BigFishAgentMessage; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::big_fish_agent_message_role_type::BigFishAgentMessageRole; +use super::big_fish_agent_message_kind_type::BigFishAgentMessageKind; /// Table handle for the table `big_fish_agent_message`. /// @@ -33,9 +38,7 @@ pub trait BigFishAgentMessageTableAccess { impl BigFishAgentMessageTableAccess for super::RemoteTables { fn big_fish_agent_message(&self) -> BigFishAgentMessageTableHandle<'_> { BigFishAgentMessageTableHandle { - imp: self - .imp - .get_table::("big_fish_agent_message"), + imp: self.imp.get_table::("big_fish_agent_message"), ctx: std::marker::PhantomData, } } @@ -48,12 +51,8 @@ impl<'ctx> __sdk::Table for BigFishAgentMessageTableHandle<'ctx> { type Row = BigFishAgentMessage; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = BigFishAgentMessageInsertCallbackId; @@ -99,38 +98,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BigFishAgentMessageTableHandle<'ctx> { } } -/// Access to the `message_id` unique index on the table `big_fish_agent_message`, -/// which allows point queries on the field of the same name -/// via the [`BigFishAgentMessageMessageIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_agent_message().message_id().find(...)`. -pub struct BigFishAgentMessageMessageIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BigFishAgentMessageTableHandle<'ctx> { - /// Get a handle on the `message_id` unique index on the table `big_fish_agent_message`. - pub fn message_id(&self) -> BigFishAgentMessageMessageIdUnique<'ctx> { - BigFishAgentMessageMessageIdUnique { - imp: self.imp.get_unique_constraint::("message_id"), - phantom: std::marker::PhantomData, + /// Access to the `message_id` unique index on the table `big_fish_agent_message`, + /// which allows point queries on the field of the same name + /// via the [`BigFishAgentMessageMessageIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.big_fish_agent_message().message_id().find(...)`. + pub struct BigFishAgentMessageMessageIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> BigFishAgentMessageMessageIdUnique<'ctx> { - /// Find the subscribed row whose `message_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 { - self.imp.find(col_val) - } -} + impl<'ctx> BigFishAgentMessageTableHandle<'ctx> { + /// Get a handle on the `message_id` unique index on the table `big_fish_agent_message`. + pub fn message_id(&self) -> BigFishAgentMessageMessageIdUnique<'ctx> { + BigFishAgentMessageMessageIdUnique { + imp: self.imp.get_unique_constraint::("message_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> BigFishAgentMessageMessageIdUnique<'ctx> { + /// Find the subscribed row whose `message_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("big_fish_agent_message"); _table.add_unique_constraint::("message_id", |row| &row.message_id); } @@ -140,24 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BigFishAgentMessage`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait big_fish_agent_messageQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BigFishAgentMessage`. - fn big_fish_agent_message(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `BigFishAgentMessage`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait big_fish_agent_messageQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `BigFishAgentMessage`. + fn big_fish_agent_message(&self) -> __sdk::__query_builder::Table; + } + + impl big_fish_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { + fn big_fish_agent_message(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("big_fish_agent_message") + } + } -impl big_fish_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { - fn big_fish_agent_message(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("big_fish_agent_message") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_type.rs index a5e70272..c55ecc3d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_agent_message_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::big_fish_agent_message_kind_type::BigFishAgentMessageKind; use super::big_fish_agent_message_role_type::BigFishAgentMessageRole; +use super::big_fish_agent_message_kind_type::BigFishAgentMessageKind; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,10 +23,12 @@ pub struct BigFishAgentMessage { pub created_at: __sdk::Timestamp, } + impl __sdk::InModule for BigFishAgentMessage { type Module = super::RemoteModule; } + /// Column accessor struct for the table `BigFishAgentMessage`. /// /// Provides typed access to columns for query building. @@ -44,6 +51,7 @@ impl __sdk::__query_builder::HasCols for BigFishAgentMessage { kind: __sdk::__query_builder::Col::new(table_name, "kind"), text: __sdk::__query_builder::Col::new(table_name, "text"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), + } } } @@ -62,8 +70,10 @@ impl __sdk::__query_builder::HasIxCols for BigFishAgentMessage { BigFishAgentMessageIxCols { message_id: __sdk::__query_builder::IxCol::new(table_name, "message_id"), session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for BigFishAgentMessage {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_item_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_item_type.rs index d876588e..80ecc407 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_item_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_item_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_anchor_status_type::BigFishAnchorStatus; @@ -15,6 +20,8 @@ pub struct BigFishAnchorItem { pub status: BigFishAnchorStatus, } + impl __sdk::InModule for BigFishAnchorItem { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_pack_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_pack_type.rs index 5d93c291..6f93262e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_pack_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_pack_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_anchor_item_type::BigFishAnchorItem; @@ -15,6 +20,8 @@ pub struct BigFishAnchorPack { pub risk_tempo: BigFishAnchorItem, } + impl __sdk::InModule for BigFishAnchorPack { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_status_type.rs index bcfe701e..d1ed8bb3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_anchor_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,8 +20,12 @@ pub enum BigFishAnchorStatus { Missing, Locked, + } + + impl __sdk::InModule for BigFishAnchorStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_coverage_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_coverage_type.rs index 607a8c39..c1b3429a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_coverage_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_coverage_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,9 +18,11 @@ pub struct BigFishAssetCoverage { pub background_ready: bool, pub required_level_count: u32, pub publish_ready: bool, - pub blockers: Vec, + pub blockers: Vec::, } + impl __sdk::InModule for BigFishAssetCoverage { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_generate_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_generate_input_type.rs index d85e9259..e57057d1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_generate_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_generate_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_asset_kind_type::BigFishAssetKind; @@ -12,11 +17,13 @@ pub struct BigFishAssetGenerateInput { pub session_id: String, pub owner_user_id: String, pub asset_kind: BigFishAssetKind, - pub level: Option, - pub motion_key: Option, + pub level: Option::, + pub motion_key: Option::, pub generated_at_micros: i64, } + impl __sdk::InModule for BigFishAssetGenerateInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_kind_type.rs index b4c9dcd1..a5d6c3ed 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum BigFishAssetKind { LevelMotion, StageBackground, + } + + impl __sdk::InModule for BigFishAssetKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_snapshot_type.rs index 200b1a6d..911e51fc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_asset_kind_type::BigFishAssetKind; use super::big_fish_asset_status_type::BigFishAssetStatus; @@ -13,14 +18,16 @@ pub struct BigFishAssetSlotSnapshot { pub slot_id: String, pub session_id: String, pub asset_kind: BigFishAssetKind, - pub level: Option, - pub motion_key: Option, + pub level: Option::, + pub motion_key: Option::, pub status: BigFishAssetStatus, - pub asset_url: Option, + pub asset_url: Option::, pub prompt_snapshot: String, pub updated_at_micros: i64, } + impl __sdk::InModule for BigFishAssetSlotSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_table.rs index d4817cf0..8b296390 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_table.rs @@ -2,10 +2,15 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::big_fish_asset_kind_type::BigFishAssetKind; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_asset_slot_type::BigFishAssetSlot; +use super::big_fish_asset_kind_type::BigFishAssetKind; use super::big_fish_asset_status_type::BigFishAssetStatus; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `big_fish_asset_slot`. /// @@ -33,9 +38,7 @@ pub trait BigFishAssetSlotTableAccess { impl BigFishAssetSlotTableAccess for super::RemoteTables { fn big_fish_asset_slot(&self) -> BigFishAssetSlotTableHandle<'_> { BigFishAssetSlotTableHandle { - imp: self - .imp - .get_table::("big_fish_asset_slot"), + imp: self.imp.get_table::("big_fish_asset_slot"), ctx: std::marker::PhantomData, } } @@ -48,12 +51,8 @@ impl<'ctx> __sdk::Table for BigFishAssetSlotTableHandle<'ctx> { type Row = BigFishAssetSlot; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = BigFishAssetSlotInsertCallbackId; @@ -99,38 +98,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BigFishAssetSlotTableHandle<'ctx> { } } -/// Access to the `slot_id` unique index on the table `big_fish_asset_slot`, -/// which allows point queries on the field of the same name -/// via the [`BigFishAssetSlotSlotIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_asset_slot().slot_id().find(...)`. -pub struct BigFishAssetSlotSlotIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BigFishAssetSlotTableHandle<'ctx> { - /// Get a handle on the `slot_id` unique index on the table `big_fish_asset_slot`. - pub fn slot_id(&self) -> BigFishAssetSlotSlotIdUnique<'ctx> { - BigFishAssetSlotSlotIdUnique { - imp: self.imp.get_unique_constraint::("slot_id"), - phantom: std::marker::PhantomData, + /// Access to the `slot_id` unique index on the table `big_fish_asset_slot`, + /// which allows point queries on the field of the same name + /// via the [`BigFishAssetSlotSlotIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.big_fish_asset_slot().slot_id().find(...)`. + pub struct BigFishAssetSlotSlotIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> BigFishAssetSlotSlotIdUnique<'ctx> { - /// Find the subscribed row whose `slot_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 { - self.imp.find(col_val) - } -} + impl<'ctx> BigFishAssetSlotTableHandle<'ctx> { + /// Get a handle on the `slot_id` unique index on the table `big_fish_asset_slot`. + pub fn slot_id(&self) -> BigFishAssetSlotSlotIdUnique<'ctx> { + BigFishAssetSlotSlotIdUnique { + imp: self.imp.get_unique_constraint::("slot_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> BigFishAssetSlotSlotIdUnique<'ctx> { + /// Find the subscribed row whose `slot_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("big_fish_asset_slot"); _table.add_unique_constraint::("slot_id", |row| &row.slot_id); } @@ -140,24 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BigFishAssetSlot`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait big_fish_asset_slotQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BigFishAssetSlot`. - fn big_fish_asset_slot(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `BigFishAssetSlot`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait big_fish_asset_slotQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `BigFishAssetSlot`. + fn big_fish_asset_slot(&self) -> __sdk::__query_builder::Table; + } + + impl big_fish_asset_slotQueryTableAccess for __sdk::QueryTableAccessor { + fn big_fish_asset_slot(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("big_fish_asset_slot") + } + } -impl big_fish_asset_slotQueryTableAccess for __sdk::QueryTableAccessor { - fn big_fish_asset_slot(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("big_fish_asset_slot") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_type.rs index 406c151d..a6cb0813 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_slot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_asset_kind_type::BigFishAssetKind; use super::big_fish_asset_status_type::BigFishAssetStatus; @@ -13,18 +18,20 @@ pub struct BigFishAssetSlot { pub slot_id: String, pub session_id: String, pub asset_kind: BigFishAssetKind, - pub level: Option, - pub motion_key: Option, + pub level: Option::, + pub motion_key: Option::, pub status: BigFishAssetStatus, - pub asset_url: Option, + pub asset_url: Option::, pub prompt_snapshot: String, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for BigFishAssetSlot { type Module = super::RemoteModule; } + /// Column accessor struct for the table `BigFishAssetSlot`. /// /// Provides typed access to columns for query building. @@ -32,10 +39,10 @@ pub struct BigFishAssetSlotCols { pub slot_id: __sdk::__query_builder::Col, pub session_id: __sdk::__query_builder::Col, pub asset_kind: __sdk::__query_builder::Col, - pub level: __sdk::__query_builder::Col>, - pub motion_key: __sdk::__query_builder::Col>, + pub level: __sdk::__query_builder::Col>, + pub motion_key: __sdk::__query_builder::Col>, pub status: __sdk::__query_builder::Col, - pub asset_url: __sdk::__query_builder::Col>, + pub asset_url: __sdk::__query_builder::Col>, pub prompt_snapshot: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -53,6 +60,7 @@ impl __sdk::__query_builder::HasCols for BigFishAssetSlot { asset_url: __sdk::__query_builder::Col::new(table_name, "asset_url"), prompt_snapshot: __sdk::__query_builder::Col::new(table_name, "prompt_snapshot"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -71,8 +79,10 @@ impl __sdk::__query_builder::HasIxCols for BigFishAssetSlot { BigFishAssetSlotIxCols { session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), slot_id: __sdk::__query_builder::IxCol::new(table_name, "slot_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for BigFishAssetSlot {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_status_type.rs index c673f0f3..25ed0f6a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_asset_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum BigFishAssetStatus { Missing, Ready, + } + + impl __sdk::InModule for BigFishAssetStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_background_blueprint_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_background_blueprint_type.rs index b28e3196..bda8e3be 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_background_blueprint_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_background_blueprint_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,6 +23,8 @@ pub struct BigFishBackgroundBlueprint { pub background_prompt_seed: String, } + impl __sdk::InModule for BigFishBackgroundBlueprint { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_table.rs index d7b82298..3eff808d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_creation_session_type::BigFishCreationSession; use super::big_fish_creation_stage_type::BigFishCreationStage; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `big_fish_creation_session`. /// @@ -32,9 +37,7 @@ pub trait BigFishCreationSessionTableAccess { impl BigFishCreationSessionTableAccess for super::RemoteTables { fn big_fish_creation_session(&self) -> BigFishCreationSessionTableHandle<'_> { BigFishCreationSessionTableHandle { - imp: self - .imp - .get_table::("big_fish_creation_session"), + imp: self.imp.get_table::("big_fish_creation_session"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for BigFishCreationSessionTableHandle<'ctx> { type Row = BigFishCreationSession; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = BigFishCreationSessionInsertCallbackId; @@ -98,40 +97,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BigFishCreationSessionTableHandle<'ctx } } -/// Access to the `session_id` unique index on the table `big_fish_creation_session`, -/// which allows point queries on the field of the same name -/// via the [`BigFishCreationSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_creation_session().session_id().find(...)`. -pub struct BigFishCreationSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BigFishCreationSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `big_fish_creation_session`. - pub fn session_id(&self) -> BigFishCreationSessionSessionIdUnique<'ctx> { - BigFishCreationSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, + /// Access to the `session_id` unique index on the table `big_fish_creation_session`, + /// which allows point queries on the field of the same name + /// via the [`BigFishCreationSessionSessionIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.big_fish_creation_session().session_id().find(...)`. + pub struct BigFishCreationSessionSessionIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> BigFishCreationSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} + impl<'ctx> BigFishCreationSessionTableHandle<'ctx> { + /// Get a handle on the `session_id` unique index on the table `big_fish_creation_session`. + pub fn session_id(&self) -> BigFishCreationSessionSessionIdUnique<'ctx> { + BigFishCreationSessionSessionIdUnique { + imp: self.imp.get_unique_constraint::("session_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> BigFishCreationSessionSessionIdUnique<'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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("big_fish_creation_session"); + + let _table = client_cache.get_or_make_table::("big_fish_creation_session"); _table.add_unique_constraint::("session_id", |row| &row.session_id); } @@ -140,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BigFishCreationSession`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait big_fish_creation_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BigFishCreationSession`. - fn big_fish_creation_session(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `BigFishCreationSession`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait big_fish_creation_sessionQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `BigFishCreationSession`. + fn big_fish_creation_session(&self) -> __sdk::__query_builder::Table; + } + + impl big_fish_creation_sessionQueryTableAccess for __sdk::QueryTableAccessor { + fn big_fish_creation_session(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("big_fish_creation_session") + } + } -impl big_fish_creation_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn big_fish_creation_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("big_fish_creation_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_type.rs index 353343fd..b45590fe 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_session_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_creation_stage_type::BigFishCreationStage; @@ -16,18 +21,20 @@ pub struct BigFishCreationSession { pub progress_percent: u32, pub stage: BigFishCreationStage, pub anchor_pack_json: String, - pub draft_json: Option, + pub draft_json: Option::, pub asset_coverage_json: String, - pub last_assistant_reply: Option, + pub last_assistant_reply: Option::, pub publish_ready: bool, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for BigFishCreationSession { type Module = super::RemoteModule; } + /// Column accessor struct for the table `BigFishCreationSession`. /// /// Provides typed access to columns for query building. @@ -39,9 +46,9 @@ pub struct BigFishCreationSessionCols { pub progress_percent: __sdk::__query_builder::Col, pub stage: __sdk::__query_builder::Col, pub anchor_pack_json: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col>, + pub draft_json: __sdk::__query_builder::Col>, pub asset_coverage_json: __sdk::__query_builder::Col, - pub last_assistant_reply: __sdk::__query_builder::Col>, + pub last_assistant_reply: __sdk::__query_builder::Col>, pub publish_ready: __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, @@ -59,17 +66,12 @@ impl __sdk::__query_builder::HasCols for BigFishCreationSession { stage: __sdk::__query_builder::Col::new(table_name, "stage"), anchor_pack_json: __sdk::__query_builder::Col::new(table_name, "anchor_pack_json"), draft_json: __sdk::__query_builder::Col::new(table_name, "draft_json"), - asset_coverage_json: __sdk::__query_builder::Col::new( - table_name, - "asset_coverage_json", - ), - last_assistant_reply: __sdk::__query_builder::Col::new( - table_name, - "last_assistant_reply", - ), + asset_coverage_json: __sdk::__query_builder::Col::new(table_name, "asset_coverage_json"), + last_assistant_reply: __sdk::__query_builder::Col::new(table_name, "last_assistant_reply"), publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -88,8 +90,10 @@ impl __sdk::__query_builder::HasIxCols for BigFishCreationSession { BigFishCreationSessionIxCols { 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 BigFishCreationSession {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_stage_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_stage_type.rs index c878d467..b96fb5e4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_stage_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_creation_stage_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum BigFishCreationStage { ReadyToPublish, Published, + } + + impl __sdk::InModule for BigFishCreationStage { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_draft_compile_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_draft_compile_input_type.rs index 9cf25ddc..25792484 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_draft_compile_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_draft_compile_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,6 +18,8 @@ pub struct BigFishDraftCompileInput { pub compiled_at_micros: i64, } + impl __sdk::InModule for BigFishDraftCompileInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_game_draft_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_game_draft_type.rs index 0c661176..43810d9b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_game_draft_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_game_draft_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::big_fish_background_blueprint_type::BigFishBackgroundBlueprint; use super::big_fish_level_blueprint_type::BigFishLevelBlueprint; +use super::big_fish_background_blueprint_type::BigFishBackgroundBlueprint; use super::big_fish_runtime_params_type::BigFishRuntimeParams; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] @@ -15,11 +20,13 @@ pub struct BigFishGameDraft { pub subtitle: String, pub core_fun: String, pub ecology_theme: String, - pub levels: Vec, + pub levels: Vec::, pub background: BigFishBackgroundBlueprint, pub runtime_params: BigFishRuntimeParams, } + impl __sdk::InModule for BigFishGameDraft { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_level_blueprint_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_level_blueprint_type.rs index b8ea2493..3953e1ff 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_level_blueprint_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_level_blueprint_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -14,12 +20,14 @@ pub struct BigFishLevelBlueprint { pub size_ratio: f32, pub visual_prompt_seed: String, pub motion_prompt_seed: String, - pub merge_source_level: Option, - pub prey_window: Vec, - pub threat_window: Vec, + pub merge_source_level: Option::, + pub prey_window: Vec::, + pub threat_window: Vec::, pub is_final_level: bool, } + impl __sdk::InModule for BigFishLevelBlueprint { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_message_submit_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_message_submit_input_type.rs index b0e41147..40dfe964 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_message_submit_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_message_submit_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,6 +21,8 @@ pub struct BigFishMessageSubmitInput { pub submitted_at_micros: i64, } + impl __sdk::InModule for BigFishMessageSubmitInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_publish_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_publish_input_type.rs index ec00bf84..a1a0fcca 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_publish_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_publish_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,6 +18,8 @@ pub struct BigFishPublishInput { pub published_at_micros: i64, } + impl __sdk::InModule for BigFishPublishInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_get_input_type.rs index 8e0d0d8d..0940b187 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct BigFishRunGetInput { pub owner_user_id: String, } + impl __sdk::InModule for BigFishRunGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_input_submit_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_input_submit_input_type.rs index f3175d40..ae5f1367 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_input_submit_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_input_submit_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -14,6 +20,8 @@ pub struct BigFishRunInputSubmitInput { pub submitted_at_micros: i64, } + impl __sdk::InModule for BigFishRunInputSubmitInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_procedure_result_type.rs index 86d73fc2..12e6eb95 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_runtime_snapshot_type::BigFishRuntimeSnapshot; @@ -10,10 +15,12 @@ use super::big_fish_runtime_snapshot_type::BigFishRuntimeSnapshot; #[sats(crate = __lib)] pub struct BigFishRunProcedureResult { pub ok: bool, - pub run: Option, - pub error_message: Option, + pub run: Option::, + pub error_message: Option::, } + impl __sdk::InModule for BigFishRunProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_start_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_start_input_type.rs index 944fa6da..4e166892 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_start_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_start_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,6 +19,8 @@ pub struct BigFishRunStartInput { pub started_at_micros: i64, } + impl __sdk::InModule for BigFishRunStartInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_status_type.rs index 6bb94f36..ab1b80cd 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_run_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum BigFishRunStatus { Won, Failed, + } + + impl __sdk::InModule for BigFishRunStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_entity_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_entity_type.rs index ee7c160c..f1a82061 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_entity_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_entity_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_vector_2_type::BigFishVector2; @@ -16,6 +21,8 @@ pub struct BigFishRuntimeEntity { pub offscreen_seconds: f32, } + impl __sdk::InModule for BigFishRuntimeEntity { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_params_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_params_type.rs index 78117371..1fece110 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_params_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_params_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,11 +19,13 @@ pub struct BigFishRuntimeParams { pub leader_move_speed: f32, pub follower_catch_up_speed: f32, pub offscreen_cull_seconds: f32, - pub prey_spawn_delta_levels: Vec, - pub threat_spawn_delta_levels: Vec, + pub prey_spawn_delta_levels: Vec::, + pub threat_spawn_delta_levels: Vec::, pub win_level: u32, } + impl __sdk::InModule for BigFishRuntimeParams { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_table.rs index bbf7ef94..9ed2da19 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::big_fish_run_status_type::BigFishRunStatus; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_runtime_run_type::BigFishRuntimeRun; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::big_fish_run_status_type::BigFishRunStatus; /// Table handle for the table `big_fish_runtime_run`. /// @@ -32,9 +37,7 @@ pub trait BigFishRuntimeRunTableAccess { impl BigFishRuntimeRunTableAccess for super::RemoteTables { fn big_fish_runtime_run(&self) -> BigFishRuntimeRunTableHandle<'_> { BigFishRuntimeRunTableHandle { - imp: self - .imp - .get_table::("big_fish_runtime_run"), + imp: self.imp.get_table::("big_fish_runtime_run"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for BigFishRuntimeRunTableHandle<'ctx> { type Row = BigFishRuntimeRun; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = BigFishRuntimeRunInsertCallbackId; @@ -98,38 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for BigFishRuntimeRunTableHandle<'ctx> { } } -/// Access to the `run_id` unique index on the table `big_fish_runtime_run`, -/// which allows point queries on the field of the same name -/// via the [`BigFishRuntimeRunRunIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.big_fish_runtime_run().run_id().find(...)`. -pub struct BigFishRuntimeRunRunIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> BigFishRuntimeRunTableHandle<'ctx> { - /// Get a handle on the `run_id` unique index on the table `big_fish_runtime_run`. - pub fn run_id(&self) -> BigFishRuntimeRunRunIdUnique<'ctx> { - BigFishRuntimeRunRunIdUnique { - imp: self.imp.get_unique_constraint::("run_id"), - phantom: std::marker::PhantomData, + /// Access to the `run_id` unique index on the table `big_fish_runtime_run`, + /// which allows point queries on the field of the same name + /// via the [`BigFishRuntimeRunRunIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.big_fish_runtime_run().run_id().find(...)`. + pub struct BigFishRuntimeRunRunIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> BigFishRuntimeRunRunIdUnique<'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 { - self.imp.find(col_val) - } -} + impl<'ctx> BigFishRuntimeRunTableHandle<'ctx> { + /// Get a handle on the `run_id` unique index on the table `big_fish_runtime_run`. + pub fn run_id(&self) -> BigFishRuntimeRunRunIdUnique<'ctx> { + BigFishRuntimeRunRunIdUnique { + imp: self.imp.get_unique_constraint::("run_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> BigFishRuntimeRunRunIdUnique<'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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("big_fish_runtime_run"); _table.add_unique_constraint::("run_id", |row| &row.run_id); } @@ -139,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `BigFishRuntimeRun`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait big_fish_runtime_runQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `BigFishRuntimeRun`. - fn big_fish_runtime_run(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `BigFishRuntimeRun`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait big_fish_runtime_runQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `BigFishRuntimeRun`. + fn big_fish_runtime_run(&self) -> __sdk::__query_builder::Table; + } + + impl big_fish_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { + fn big_fish_runtime_run(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("big_fish_runtime_run") + } + } -impl big_fish_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn big_fish_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("big_fish_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_type.rs index 01852b9c..20ac1aa1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_run_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_run_status_type::BigFishRunStatus; @@ -21,10 +26,12 @@ pub struct BigFishRuntimeRun { pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for BigFishRuntimeRun { type Module = super::RemoteModule; } + /// Column accessor struct for the table `BigFishRuntimeRun`. /// /// Provides typed access to columns for query building. @@ -55,6 +62,7 @@ impl __sdk::__query_builder::HasCols for BigFishRuntimeRun { tick: __sdk::__query_builder::Col::new(table_name, "tick"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -75,8 +83,10 @@ impl __sdk::__query_builder::HasIxCols for BigFishRuntimeRun { owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"), session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for BigFishRuntimeRun {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_snapshot_type.rs index 32f2a80c..0a367449 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_runtime_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_run_status_type::BigFishRunStatus; use super::big_fish_runtime_entity_type::BigFishRuntimeEntity; @@ -17,15 +22,17 @@ pub struct BigFishRuntimeSnapshot { pub tick: u64, pub player_level: u32, pub win_level: u32, - pub leader_entity_id: Option, - pub owned_entities: Vec, - pub wild_entities: Vec, + pub leader_entity_id: Option::, + pub owned_entities: Vec::, + pub wild_entities: Vec::, pub camera_center: BigFishVector2, pub last_input: BigFishVector2, - pub event_log: Vec, + pub event_log: Vec::, pub updated_at_micros: i64, } + impl __sdk::InModule for BigFishRuntimeSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_create_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_create_input_type.rs index 13533785..f7ae7eb7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_create_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_create_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,6 +21,8 @@ pub struct BigFishSessionCreateInput { pub created_at_micros: i64, } + impl __sdk::InModule for BigFishSessionCreateInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_get_input_type.rs index 396808f4..88ef9cfa 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct BigFishSessionGetInput { pub owner_user_id: String, } + impl __sdk::InModule for BigFishSessionGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_procedure_result_type.rs index 1f2f7666..db8af7c7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_session_snapshot_type::BigFishSessionSnapshot; @@ -10,10 +15,12 @@ use super::big_fish_session_snapshot_type::BigFishSessionSnapshot; #[sats(crate = __lib)] pub struct BigFishSessionProcedureResult { pub ok: bool, - pub session: Option, - pub error_message: Option, + pub session: Option::, + pub error_message: Option::, } + impl __sdk::InModule for BigFishSessionProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_snapshot_type.rs index 11e6a141..abff56b6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_session_snapshot_type.rs @@ -2,14 +2,19 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::big_fish_agent_message_snapshot_type::BigFishAgentMessageSnapshot; -use super::big_fish_anchor_pack_type::BigFishAnchorPack; -use super::big_fish_asset_coverage_type::BigFishAssetCoverage; -use super::big_fish_asset_slot_snapshot_type::BigFishAssetSlotSnapshot; use super::big_fish_creation_stage_type::BigFishCreationStage; +use super::big_fish_anchor_pack_type::BigFishAnchorPack; use super::big_fish_game_draft_type::BigFishGameDraft; +use super::big_fish_asset_slot_snapshot_type::BigFishAssetSlotSnapshot; +use super::big_fish_asset_coverage_type::BigFishAssetCoverage; +use super::big_fish_agent_message_snapshot_type::BigFishAgentMessageSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -21,16 +26,18 @@ pub struct BigFishSessionSnapshot { pub progress_percent: u32, pub stage: BigFishCreationStage, pub anchor_pack: BigFishAnchorPack, - pub draft: Option, - pub asset_slots: Vec, + pub draft: Option::, + pub asset_slots: Vec::, pub asset_coverage: BigFishAssetCoverage, - pub messages: Vec, - pub last_assistant_reply: Option, + pub messages: Vec::, + pub last_assistant_reply: Option::, pub publish_ready: bool, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for BigFishSessionSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_vector_2_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_vector_2_type.rs index 745063ad..534f83e9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/big_fish_vector_2_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/big_fish_vector_2_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct BigFishVector2 { pub y: f32, } + impl __sdk::InModule for BigFishVector2 { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_and_return_procedure.rs index 78c80aee..aebf2217 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::asset_entity_binding_input_type::AssetEntityBindingInput; use super::asset_entity_binding_procedure_result_type::AssetEntityBindingProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct BindAssetObjectToEntityAndReturnArgs { + struct BindAssetObjectToEntityAndReturnArgs { pub input: AssetEntityBindingInput, } + impl __sdk::InModule for BindAssetObjectToEntityAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for BindAssetObjectToEntityAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait bind_asset_object_to_entity_and_return { - fn bind_asset_object_to_entity_and_return(&self, input: AssetEntityBindingInput) { - self.bind_asset_object_to_entity_and_return_then(input, |_, _| {}); + fn bind_asset_object_to_entity_and_return(&self, input: AssetEntityBindingInput, +) { + self.bind_asset_object_to_entity_and_return_then(input, |_, _| {}); } fn bind_asset_object_to_entity_and_return_then( &self, input: AssetEntityBindingInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl bind_asset_object_to_entity_and_return for super::RemoteProcedures { &self, input: AssetEntityBindingInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, AssetEntityBindingProcedureResult>( - "bind_asset_object_to_entity_and_return", - BindAssetObjectToEntityAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, AssetEntityBindingProcedureResult>( + "bind_asset_object_to_entity_and_return", + BindAssetObjectToEntityAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_reducer.rs index caf48b26..ca2154f7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/bind_asset_object_to_entity_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::asset_entity_binding_input_type::AssetEntityBindingInput; @@ -14,8 +19,10 @@ pub(super) struct BindAssetObjectToEntityArgs { impl From for super::Reducer { fn from(args: BindAssetObjectToEntityArgs) -> Self { - Self::BindAssetObjectToEntity { input: args.input } - } + Self::BindAssetObjectToEntity { + input: args.input, +} +} } impl __sdk::InModule for BindAssetObjectToEntityArgs { @@ -33,8 +40,9 @@ pub trait bind_asset_object_to_entity { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`bind_asset_object_to_entity:bind_asset_object_to_entity_then`] to run a callback after the reducer completes. - fn bind_asset_object_to_entity(&self, input: AssetEntityBindingInput) -> __sdk::Result<()> { - self.bind_asset_object_to_entity_then(input, |_, _| {}) + fn bind_asset_object_to_entity(&self, input: AssetEntityBindingInput, +) -> __sdk::Result<()> { + self.bind_asset_object_to_entity_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `bind_asset_object_to_entity` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait bind_asset_object_to_entity { &self, input: AssetEntityBindingInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl bind_asset_object_to_entity for super::RemoteReducers { &self, input: AssetEntityBindingInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(BindAssetObjectToEntityArgs { input }, callback) + self.imp.invoke_reducer_with_callback(BindAssetObjectToEntityArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/cancel_ai_task_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/cancel_ai_task_and_return_procedure.rs index 0c5dc3eb..1a4a6394 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/cancel_ai_task_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/cancel_ai_task_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::ai_task_cancel_input_type::AiTaskCancelInput; use super::ai_task_procedure_result_type::AiTaskProcedureResult; +use super::ai_task_cancel_input_type::AiTaskCancelInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CancelAiTaskAndReturnArgs { + struct CancelAiTaskAndReturnArgs { pub input: AiTaskCancelInput, } + impl __sdk::InModule for CancelAiTaskAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for CancelAiTaskAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait cancel_ai_task_and_return { - fn cancel_ai_task_and_return(&self, input: AiTaskCancelInput) { - self.cancel_ai_task_and_return_then(input, |_, _| {}); + fn cancel_ai_task_and_return(&self, input: AiTaskCancelInput, +) { + self.cancel_ai_task_and_return_then(input, |_, _| {}); } fn cancel_ai_task_and_return_then( &self, input: AiTaskCancelInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl cancel_ai_task_and_return for super::RemoteProcedures { &self, input: AiTaskCancelInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "cancel_ai_task_and_return", - CancelAiTaskAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "cancel_ai_task_and_return", + CancelAiTaskAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_pace_band_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_pace_band_type.rs index effbeb9d..fe7d5e3a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_pace_band_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_pace_band_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,8 +20,12 @@ pub enum ChapterPaceBand { Pressure, FinaleDense, + } + + impl __sdk::InModule for ChapterPaceBand { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_get_input_type.rs index 927a4b04..cc88d00b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct ChapterProgressionGetInput { pub chapter_id: String, } + impl __sdk::InModule for ChapterProgressionGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_input_type.rs index dae51fa0..ed9aa5ca 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::chapter_pace_band_type::ChapterPaceBand; @@ -26,6 +31,8 @@ pub struct ChapterProgressionInput { pub updated_at_micros: i64, } + impl __sdk::InModule for ChapterProgressionInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_ledger_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_ledger_input_type.rs index a599ffc9..a9e0a8c3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_ledger_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_ledger_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,10 +18,12 @@ pub struct ChapterProgressionLedgerInput { pub granted_quest_xp: u32, pub granted_hostile_xp: u32, pub hostile_defeat_increment: u32, - pub level_at_exit: Option, + pub level_at_exit: Option::, pub updated_at_micros: i64, } + impl __sdk::InModule for ChapterProgressionLedgerInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_procedure_result_type.rs index 276b3a26..6a7d01af 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::chapter_progression_snapshot_type::ChapterProgressionSnapshot; @@ -10,10 +15,12 @@ use super::chapter_progression_snapshot_type::ChapterProgressionSnapshot; #[sats(crate = __lib)] pub struct ChapterProgressionProcedureResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for ChapterProgressionProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_snapshot_type.rs index e1fde7fe..d1eaad92 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::chapter_pace_band_type::ChapterPaceBand; @@ -25,12 +30,14 @@ pub struct ChapterProgressionSnapshot { pub expected_hostile_defeat_count: u32, pub actual_hostile_defeat_count: u32, pub level_at_entry: u32, - pub level_at_exit: Option, + pub level_at_exit: Option::, pub pace_band: ChapterPaceBand, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for ChapterProgressionSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_table.rs index 2fb6c042..5bd5c38c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::chapter_pace_band_type::ChapterPaceBand; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::chapter_progression_type::ChapterProgression; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::chapter_pace_band_type::ChapterPaceBand; /// Table handle for the table `chapter_progression`. /// @@ -32,9 +37,7 @@ pub trait ChapterProgressionTableAccess { impl ChapterProgressionTableAccess for super::RemoteTables { fn chapter_progression(&self) -> ChapterProgressionTableHandle<'_> { ChapterProgressionTableHandle { - imp: self - .imp - .get_table::("chapter_progression"), + imp: self.imp.get_table::("chapter_progression"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for ChapterProgressionTableHandle<'ctx> { type Row = ChapterProgression; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = ChapterProgressionInsertCallbackId; @@ -98,44 +97,41 @@ impl<'ctx> __sdk::TableWithPrimaryKey for ChapterProgressionTableHandle<'ctx> { } } -/// Access to the `chapter_progression_id` unique index on the table `chapter_progression`, -/// which allows point queries on the field of the same name -/// via the [`ChapterProgressionChapterProgressionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.chapter_progression().chapter_progression_id().find(...)`. -pub struct ChapterProgressionChapterProgressionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> ChapterProgressionTableHandle<'ctx> { - /// Get a handle on the `chapter_progression_id` unique index on the table `chapter_progression`. - pub fn chapter_progression_id(&self) -> ChapterProgressionChapterProgressionIdUnique<'ctx> { - ChapterProgressionChapterProgressionIdUnique { - imp: self - .imp - .get_unique_constraint::("chapter_progression_id"), - phantom: std::marker::PhantomData, + /// Access to the `chapter_progression_id` unique index on the table `chapter_progression`, + /// which allows point queries on the field of the same name + /// via the [`ChapterProgressionChapterProgressionIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.chapter_progression().chapter_progression_id().find(...)`. + pub struct ChapterProgressionChapterProgressionIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> ChapterProgressionChapterProgressionIdUnique<'ctx> { - /// Find the subscribed row whose `chapter_progression_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 { - self.imp.find(col_val) - } -} + impl<'ctx> ChapterProgressionTableHandle<'ctx> { + /// Get a handle on the `chapter_progression_id` unique index on the table `chapter_progression`. + pub fn chapter_progression_id(&self) -> ChapterProgressionChapterProgressionIdUnique<'ctx> { + ChapterProgressionChapterProgressionIdUnique { + imp: self.imp.get_unique_constraint::("chapter_progression_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> ChapterProgressionChapterProgressionIdUnique<'ctx> { + /// Find the subscribed row whose `chapter_progression_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("chapter_progression"); - _table.add_unique_constraint::("chapter_progression_id", |row| { - &row.chapter_progression_id - }); + _table.add_unique_constraint::("chapter_progression_id", |row| &row.chapter_progression_id); } #[doc(hidden)] @@ -143,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `ChapterProgression`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait chapter_progressionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ChapterProgression`. - fn chapter_progression(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `ChapterProgression`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait chapter_progressionQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `ChapterProgression`. + fn chapter_progression(&self) -> __sdk::__query_builder::Table; + } + + impl chapter_progressionQueryTableAccess for __sdk::QueryTableAccessor { + fn chapter_progression(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("chapter_progression") + } + } -impl chapter_progressionQueryTableAccess for __sdk::QueryTableAccessor { - fn chapter_progression(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("chapter_progression") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_type.rs index c94a7196..c5600eb7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/chapter_progression_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::chapter_pace_band_type::ChapterPaceBand; @@ -26,16 +31,18 @@ pub struct ChapterProgression { pub expected_hostile_defeat_count: u32, pub actual_hostile_defeat_count: u32, pub level_at_entry: u32, - pub level_at_exit: Option, + pub level_at_exit: Option::, pub pace_band: ChapterPaceBand, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for ChapterProgression { type Module = super::RemoteModule; } + /// Column accessor struct for the table `ChapterProgression`. /// /// Provides typed access to columns for query building. @@ -57,7 +64,7 @@ pub struct ChapterProgressionCols { pub expected_hostile_defeat_count: __sdk::__query_builder::Col, pub actual_hostile_defeat_count: __sdk::__query_builder::Col, pub level_at_entry: __sdk::__query_builder::Col, - pub level_at_exit: __sdk::__query_builder::Col>, + pub level_at_exit: __sdk::__query_builder::Col>, pub pace_band: __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, @@ -67,22 +74,13 @@ impl __sdk::__query_builder::HasCols for ChapterProgression { type Cols = ChapterProgressionCols; fn cols(table_name: &'static str) -> Self::Cols { ChapterProgressionCols { - chapter_progression_id: __sdk::__query_builder::Col::new( - table_name, - "chapter_progression_id", - ), + chapter_progression_id: __sdk::__query_builder::Col::new(table_name, "chapter_progression_id"), user_id: __sdk::__query_builder::Col::new(table_name, "user_id"), chapter_id: __sdk::__query_builder::Col::new(table_name, "chapter_id"), chapter_index: __sdk::__query_builder::Col::new(table_name, "chapter_index"), total_chapters: __sdk::__query_builder::Col::new(table_name, "total_chapters"), - entry_pseudo_level_millis: __sdk::__query_builder::Col::new( - table_name, - "entry_pseudo_level_millis", - ), - exit_pseudo_level_millis: __sdk::__query_builder::Col::new( - table_name, - "exit_pseudo_level_millis", - ), + entry_pseudo_level_millis: __sdk::__query_builder::Col::new(table_name, "entry_pseudo_level_millis"), + exit_pseudo_level_millis: __sdk::__query_builder::Col::new(table_name, "exit_pseudo_level_millis"), entry_level: __sdk::__query_builder::Col::new(table_name, "entry_level"), exit_level: __sdk::__query_builder::Col::new(table_name, "exit_level"), planned_total_xp: __sdk::__query_builder::Col::new(table_name, "planned_total_xp"), @@ -90,19 +88,14 @@ impl __sdk::__query_builder::HasCols for ChapterProgression { planned_hostile_xp: __sdk::__query_builder::Col::new(table_name, "planned_hostile_xp"), actual_quest_xp: __sdk::__query_builder::Col::new(table_name, "actual_quest_xp"), actual_hostile_xp: __sdk::__query_builder::Col::new(table_name, "actual_hostile_xp"), - expected_hostile_defeat_count: __sdk::__query_builder::Col::new( - table_name, - "expected_hostile_defeat_count", - ), - actual_hostile_defeat_count: __sdk::__query_builder::Col::new( - table_name, - "actual_hostile_defeat_count", - ), + expected_hostile_defeat_count: __sdk::__query_builder::Col::new(table_name, "expected_hostile_defeat_count"), + actual_hostile_defeat_count: __sdk::__query_builder::Col::new(table_name, "actual_hostile_defeat_count"), level_at_entry: __sdk::__query_builder::Col::new(table_name, "level_at_entry"), level_at_exit: __sdk::__query_builder::Col::new(table_name, "level_at_exit"), pace_band: __sdk::__query_builder::Col::new(table_name, "pace_band"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -121,13 +114,12 @@ impl __sdk::__query_builder::HasIxCols for ChapterProgression { fn ix_cols(table_name: &'static str) -> Self::IxCols { ChapterProgressionIxCols { chapter_id: __sdk::__query_builder::IxCol::new(table_name, "chapter_id"), - chapter_progression_id: __sdk::__query_builder::IxCol::new( - table_name, - "chapter_progression_id", - ), + chapter_progression_id: __sdk::__query_builder::IxCol::new(table_name, "chapter_progression_id"), user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for ChapterProgression {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/clear_platform_browse_history_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/clear_platform_browse_history_and_return_procedure.rs index c8ba8d49..5b9a2c9e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/clear_platform_browse_history_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/clear_platform_browse_history_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_browse_history_clear_input_type::RuntimeBrowseHistoryClearInput; use super::runtime_browse_history_procedure_result_type::RuntimeBrowseHistoryProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ClearPlatformBrowseHistoryAndReturnArgs { + struct ClearPlatformBrowseHistoryAndReturnArgs { pub input: RuntimeBrowseHistoryClearInput, } + impl __sdk::InModule for ClearPlatformBrowseHistoryAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ClearPlatformBrowseHistoryAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait clear_platform_browse_history_and_return { - fn clear_platform_browse_history_and_return(&self, input: RuntimeBrowseHistoryClearInput) { - self.clear_platform_browse_history_and_return_then(input, |_, _| {}); + fn clear_platform_browse_history_and_return(&self, input: RuntimeBrowseHistoryClearInput, +) { + self.clear_platform_browse_history_and_return_then(input, |_, _| {}); } fn clear_platform_browse_history_and_return_then( &self, input: RuntimeBrowseHistoryClearInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl clear_platform_browse_history_and_return for super::RemoteProcedures { &self, input: RuntimeBrowseHistoryClearInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( - "clear_platform_browse_history_and_return", - ClearPlatformBrowseHistoryAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( + "clear_platform_browse_history_and_return", + ClearPlatformBrowseHistoryAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/combat_outcome_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/combat_outcome_type.rs index 731563dd..5ef77940 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/combat_outcome_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/combat_outcome_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,8 +20,12 @@ pub enum CombatOutcome { SparComplete, Escaped, + } + + impl __sdk::InModule for CombatOutcome { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/compile_big_fish_draft_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/compile_big_fish_draft_procedure.rs index bafe95a6..ba45db0a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/compile_big_fish_draft_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/compile_big_fish_draft_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_draft_compile_input_type::BigFishDraftCompileInput; use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CompileBigFishDraftArgs { + struct CompileBigFishDraftArgs { pub input: BigFishDraftCompileInput, } + impl __sdk::InModule for CompileBigFishDraftArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for CompileBigFishDraftArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait compile_big_fish_draft { - fn compile_big_fish_draft(&self, input: BigFishDraftCompileInput) { - self.compile_big_fish_draft_then(input, |_, _| {}); + fn compile_big_fish_draft(&self, input: BigFishDraftCompileInput, +) { + self.compile_big_fish_draft_then(input, |_, _| {}); } fn compile_big_fish_draft_then( &self, input: BigFishDraftCompileInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl compile_big_fish_draft for super::RemoteProcedures { &self, input: BigFishDraftCompileInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "compile_big_fish_draft", - CompileBigFishDraftArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "compile_big_fish_draft", + CompileBigFishDraftArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/compile_custom_world_published_profile_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/compile_custom_world_published_profile_procedure.rs index 67706fab..767a3954 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/compile_custom_world_published_profile_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/compile_custom_world_published_profile_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_published_profile_compile_input_type::CustomWorldPublishedProfileCompileInput; use super::custom_world_published_profile_compile_result_type::CustomWorldPublishedProfileCompileResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CompileCustomWorldPublishedProfileArgs { + struct CompileCustomWorldPublishedProfileArgs { pub input: CustomWorldPublishedProfileCompileInput, } + impl __sdk::InModule for CompileCustomWorldPublishedProfileArgs { type Module = super::RemoteModule; } @@ -22,22 +28,16 @@ impl __sdk::InModule for CompileCustomWorldPublishedProfileArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait compile_custom_world_published_profile { - fn compile_custom_world_published_profile( - &self, - input: CustomWorldPublishedProfileCompileInput, - ) { - self.compile_custom_world_published_profile_then(input, |_, _| {}); + fn compile_custom_world_published_profile(&self, input: CustomWorldPublishedProfileCompileInput, +) { + self.compile_custom_world_published_profile_then(input, |_, _| {}); } fn compile_custom_world_published_profile_then( &self, input: CustomWorldPublishedProfileCompileInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -46,17 +46,13 @@ impl compile_custom_world_published_profile for super::RemoteProcedures { &self, input: CustomWorldPublishedProfileCompileInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldPublishedProfileCompileResult>( - "compile_custom_world_published_profile", - CompileCustomWorldPublishedProfileArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldPublishedProfileCompileResult>( + "compile_custom_world_published_profile", + CompileCustomWorldPublishedProfileArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/compile_puzzle_agent_draft_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/compile_puzzle_agent_draft_procedure.rs index 177c0c40..d90769dc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/compile_puzzle_agent_draft_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/compile_puzzle_agent_draft_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; use super::puzzle_draft_compile_input_type::PuzzleDraftCompileInput; +use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CompilePuzzleAgentDraftArgs { + struct CompilePuzzleAgentDraftArgs { pub input: PuzzleDraftCompileInput, } + impl __sdk::InModule for CompilePuzzleAgentDraftArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for CompilePuzzleAgentDraftArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait compile_puzzle_agent_draft { - fn compile_puzzle_agent_draft(&self, input: PuzzleDraftCompileInput) { - self.compile_puzzle_agent_draft_then(input, |_, _| {}); + fn compile_puzzle_agent_draft(&self, input: PuzzleDraftCompileInput, +) { + self.compile_puzzle_agent_draft_then(input, |_, _| {}); } fn compile_puzzle_agent_draft_then( &self, input: PuzzleDraftCompileInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl compile_puzzle_agent_draft for super::RemoteProcedures { &self, input: PuzzleDraftCompileInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "compile_puzzle_agent_draft", - CompilePuzzleAgentDraftArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "compile_puzzle_agent_draft", + CompilePuzzleAgentDraftArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_stage_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_stage_and_return_procedure.rs index e59ab8f0..f921c224 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_stage_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_stage_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::ai_stage_completion_input_type::AiStageCompletionInput; use super::ai_task_procedure_result_type::AiTaskProcedureResult; +use super::ai_stage_completion_input_type::AiStageCompletionInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CompleteAiStageAndReturnArgs { + struct CompleteAiStageAndReturnArgs { pub input: AiStageCompletionInput, } + impl __sdk::InModule for CompleteAiStageAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for CompleteAiStageAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait complete_ai_stage_and_return { - fn complete_ai_stage_and_return(&self, input: AiStageCompletionInput) { - self.complete_ai_stage_and_return_then(input, |_, _| {}); + fn complete_ai_stage_and_return(&self, input: AiStageCompletionInput, +) { + self.complete_ai_stage_and_return_then(input, |_, _| {}); } fn complete_ai_stage_and_return_then( &self, input: AiStageCompletionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl complete_ai_stage_and_return for super::RemoteProcedures { &self, input: AiStageCompletionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "complete_ai_stage_and_return", - CompleteAiStageAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "complete_ai_stage_and_return", + CompleteAiStageAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_task_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_task_and_return_procedure.rs index ca7eab9f..47ae2af1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_task_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/complete_ai_task_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::ai_task_finish_input_type::AiTaskFinishInput; use super::ai_task_procedure_result_type::AiTaskProcedureResult; +use super::ai_task_finish_input_type::AiTaskFinishInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CompleteAiTaskAndReturnArgs { + struct CompleteAiTaskAndReturnArgs { pub input: AiTaskFinishInput, } + impl __sdk::InModule for CompleteAiTaskAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for CompleteAiTaskAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait complete_ai_task_and_return { - fn complete_ai_task_and_return(&self, input: AiTaskFinishInput) { - self.complete_ai_task_and_return_then(input, |_, _| {}); + fn complete_ai_task_and_return(&self, input: AiTaskFinishInput, +) { + self.complete_ai_task_and_return_then(input, |_, _| {}); } fn complete_ai_task_and_return_then( &self, input: AiTaskFinishInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl complete_ai_task_and_return for super::RemoteProcedures { &self, input: AiTaskFinishInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "complete_ai_task_and_return", - CompleteAiTaskAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "complete_ai_task_and_return", + CompleteAiTaskAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_and_return_procedure.rs index cc65f744..11c079e4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::asset_object_procedure_result_type::AssetObjectProcedureResult; use super::asset_object_upsert_input_type::AssetObjectUpsertInput; +use super::asset_object_procedure_result_type::AssetObjectProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ConfirmAssetObjectAndReturnArgs { + struct ConfirmAssetObjectAndReturnArgs { pub input: AssetObjectUpsertInput, } + impl __sdk::InModule for ConfirmAssetObjectAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ConfirmAssetObjectAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait confirm_asset_object_and_return { - fn confirm_asset_object_and_return(&self, input: AssetObjectUpsertInput) { - self.confirm_asset_object_and_return_then(input, |_, _| {}); + fn confirm_asset_object_and_return(&self, input: AssetObjectUpsertInput, +) { + self.confirm_asset_object_and_return_then(input, |_, _| {}); } fn confirm_asset_object_and_return_then( &self, input: AssetObjectUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl confirm_asset_object_and_return for super::RemoteProcedures { &self, input: AssetObjectUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, AssetObjectProcedureResult>( - "confirm_asset_object_and_return", - ConfirmAssetObjectAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, AssetObjectProcedureResult>( + "confirm_asset_object_and_return", + ConfirmAssetObjectAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_reducer.rs index f5edb63a..fb6acde2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/confirm_asset_object_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::asset_object_upsert_input_type::AssetObjectUpsertInput; @@ -14,8 +19,10 @@ pub(super) struct ConfirmAssetObjectArgs { impl From for super::Reducer { fn from(args: ConfirmAssetObjectArgs) -> Self { - Self::ConfirmAssetObject { input: args.input } - } + Self::ConfirmAssetObject { + input: args.input, +} +} } impl __sdk::InModule for ConfirmAssetObjectArgs { @@ -33,8 +40,9 @@ pub trait confirm_asset_object { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`confirm_asset_object:confirm_asset_object_then`] to run a callback after the reducer completes. - fn confirm_asset_object(&self, input: AssetObjectUpsertInput) -> __sdk::Result<()> { - self.confirm_asset_object_then(input, |_, _| {}) + fn confirm_asset_object(&self, input: AssetObjectUpsertInput, +) -> __sdk::Result<()> { + self.confirm_asset_object_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `confirm_asset_object` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait confirm_asset_object { &self, input: AssetObjectUpsertInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl confirm_asset_object for super::RemoteReducers { &self, input: AssetObjectUpsertInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(ConfirmAssetObjectArgs { input }, callback) + self.imp.invoke_reducer_with_callback(ConfirmAssetObjectArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/consume_inventory_item_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/consume_inventory_item_input_type.rs index 0e867e21..3bd69ba8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/consume_inventory_item_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/consume_inventory_item_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct ConsumeInventoryItemInput { pub quantity: u32, } + impl __sdk::InModule for ConsumeInventoryItemInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/continue_story_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/continue_story_and_return_procedure.rs index 1c2b51d8..0713f423 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/continue_story_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/continue_story_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::story_continue_input_type::StoryContinueInput; use super::story_session_procedure_result_type::StorySessionProcedureResult; +use super::story_continue_input_type::StoryContinueInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ContinueStoryAndReturnArgs { + struct ContinueStoryAndReturnArgs { pub input: StoryContinueInput, } + impl __sdk::InModule for ContinueStoryAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ContinueStoryAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait continue_story_and_return { - fn continue_story_and_return(&self, input: StoryContinueInput) { - self.continue_story_and_return_then(input, |_, _| {}); + fn continue_story_and_return(&self, input: StoryContinueInput, +) { + self.continue_story_and_return_then(input, |_, _| {}); } fn continue_story_and_return_then( &self, input: StoryContinueInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl continue_story_and_return for super::RemoteProcedures { &self, input: StoryContinueInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, StorySessionProcedureResult>( - "continue_story_and_return", - ContinueStoryAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, StorySessionProcedureResult>( + "continue_story_and_return", + ContinueStoryAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/continue_story_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/continue_story_reducer.rs index fb35bd1f..9c2b310a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/continue_story_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/continue_story_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::story_continue_input_type::StoryContinueInput; @@ -14,8 +19,10 @@ pub(super) struct ContinueStoryArgs { impl From for super::Reducer { fn from(args: ContinueStoryArgs) -> Self { - Self::ContinueStory { input: args.input } - } + Self::ContinueStory { + input: args.input, +} +} } impl __sdk::InModule for ContinueStoryArgs { @@ -33,8 +40,9 @@ pub trait continue_story { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`continue_story:continue_story_then`] to run a callback after the reducer completes. - fn continue_story(&self, input: StoryContinueInput) -> __sdk::Result<()> { - self.continue_story_then(input, |_, _| {}) + fn continue_story(&self, input: StoryContinueInput, +) -> __sdk::Result<()> { + self.continue_story_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `continue_story` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait continue_story { &self, input: StoryContinueInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl continue_story for super::RemoteReducers { &self, input: StoryContinueInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(ContinueStoryArgs { input }, callback) + self.imp.invoke_reducer_with_callback(ContinueStoryArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_and_return_procedure.rs index a2f40fd0..cee9ffd8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::ai_task_create_input_type::AiTaskCreateInput; use super::ai_task_procedure_result_type::AiTaskProcedureResult; +use super::ai_task_create_input_type::AiTaskCreateInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CreateAiTaskAndReturnArgs { + struct CreateAiTaskAndReturnArgs { pub input: AiTaskCreateInput, } + impl __sdk::InModule for CreateAiTaskAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for CreateAiTaskAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait create_ai_task_and_return { - fn create_ai_task_and_return(&self, input: AiTaskCreateInput) { - self.create_ai_task_and_return_then(input, |_, _| {}); + fn create_ai_task_and_return(&self, input: AiTaskCreateInput, +) { + self.create_ai_task_and_return_then(input, |_, _| {}); } fn create_ai_task_and_return_then( &self, input: AiTaskCreateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl create_ai_task_and_return for super::RemoteProcedures { &self, input: AiTaskCreateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "create_ai_task_and_return", - CreateAiTaskAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "create_ai_task_and_return", + CreateAiTaskAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_reducer.rs index b87207f0..d57e7291 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_ai_task_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_create_input_type::AiTaskCreateInput; @@ -14,8 +19,10 @@ pub(super) struct CreateAiTaskArgs { impl From for super::Reducer { fn from(args: CreateAiTaskArgs) -> Self { - Self::CreateAiTask { input: args.input } - } + Self::CreateAiTask { + input: args.input, +} +} } impl __sdk::InModule for CreateAiTaskArgs { @@ -33,8 +40,9 @@ pub trait create_ai_task { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`create_ai_task:create_ai_task_then`] to run a callback after the reducer completes. - fn create_ai_task(&self, input: AiTaskCreateInput) -> __sdk::Result<()> { - self.create_ai_task_then(input, |_, _| {}) + fn create_ai_task(&self, input: AiTaskCreateInput, +) -> __sdk::Result<()> { + self.create_ai_task_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `create_ai_task` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait create_ai_task { &self, input: AiTaskCreateInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl create_ai_task for super::RemoteReducers { &self, input: AiTaskCreateInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(CreateAiTaskArgs { input }, callback) + self.imp.invoke_reducer_with_callback(CreateAiTaskArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_and_return_procedure.rs index c028ba4e..bfee133e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::battle_state_input_type::BattleStateInput; use super::battle_state_procedure_result_type::BattleStateProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CreateBattleStateAndReturnArgs { + struct CreateBattleStateAndReturnArgs { pub input: BattleStateInput, } + impl __sdk::InModule for CreateBattleStateAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for CreateBattleStateAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait create_battle_state_and_return { - fn create_battle_state_and_return(&self, input: BattleStateInput) { - self.create_battle_state_and_return_then(input, |_, _| {}); + fn create_battle_state_and_return(&self, input: BattleStateInput, +) { + self.create_battle_state_and_return_then(input, |_, _| {}); } fn create_battle_state_and_return_then( &self, input: BattleStateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl create_battle_state_and_return for super::RemoteProcedures { &self, input: BattleStateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BattleStateProcedureResult>( - "create_battle_state_and_return", - CreateBattleStateAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BattleStateProcedureResult>( + "create_battle_state_and_return", + CreateBattleStateAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_reducer.rs index 7f34eab2..258d5af2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_battle_state_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::battle_state_input_type::BattleStateInput; @@ -14,8 +19,10 @@ pub(super) struct CreateBattleStateArgs { impl From for super::Reducer { fn from(args: CreateBattleStateArgs) -> Self { - Self::CreateBattleState { input: args.input } - } + Self::CreateBattleState { + input: args.input, +} +} } impl __sdk::InModule for CreateBattleStateArgs { @@ -33,8 +40,9 @@ pub trait create_battle_state { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`create_battle_state:create_battle_state_then`] to run a callback after the reducer completes. - fn create_battle_state(&self, input: BattleStateInput) -> __sdk::Result<()> { - self.create_battle_state_then(input, |_, _| {}) + fn create_battle_state(&self, input: BattleStateInput, +) -> __sdk::Result<()> { + self.create_battle_state_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `create_battle_state` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait create_battle_state { &self, input: BattleStateInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl create_battle_state for super::RemoteReducers { &self, input: BattleStateInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(CreateBattleStateArgs { input }, callback) + self.imp.invoke_reducer_with_callback(CreateBattleStateArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_big_fish_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_big_fish_session_procedure.rs index 6e48521a..cf4398e6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_big_fish_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_big_fish_session_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::big_fish_session_create_input_type::BigFishSessionCreateInput; use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; +use super::big_fish_session_create_input_type::BigFishSessionCreateInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CreateBigFishSessionArgs { + struct CreateBigFishSessionArgs { pub input: BigFishSessionCreateInput, } + impl __sdk::InModule for CreateBigFishSessionArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for CreateBigFishSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait create_big_fish_session { - fn create_big_fish_session(&self, input: BigFishSessionCreateInput) { - self.create_big_fish_session_then(input, |_, _| {}); + fn create_big_fish_session(&self, input: BigFishSessionCreateInput, +) { + self.create_big_fish_session_then(input, |_, _| {}); } fn create_big_fish_session_then( &self, input: BigFishSessionCreateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl create_big_fish_session for super::RemoteProcedures { &self, input: BigFishSessionCreateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "create_big_fish_session", - CreateBigFishSessionArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "create_big_fish_session", + CreateBigFishSessionArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_custom_world_agent_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_custom_world_agent_session_procedure.rs index 96a21162..18065e71 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_custom_world_agent_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_custom_world_agent_session_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_agent_session_create_input_type::CustomWorldAgentSessionCreateInput; use super::custom_world_agent_session_procedure_result_type::CustomWorldAgentSessionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CreateCustomWorldAgentSessionArgs { + struct CreateCustomWorldAgentSessionArgs { pub input: CustomWorldAgentSessionCreateInput, } + impl __sdk::InModule for CreateCustomWorldAgentSessionArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for CreateCustomWorldAgentSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait create_custom_world_agent_session { - fn create_custom_world_agent_session(&self, input: CustomWorldAgentSessionCreateInput) { - self.create_custom_world_agent_session_then(input, |_, _| {}); + fn create_custom_world_agent_session(&self, input: CustomWorldAgentSessionCreateInput, +) { + self.create_custom_world_agent_session_then(input, |_, _| {}); } fn create_custom_world_agent_session_then( &self, input: CustomWorldAgentSessionCreateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl create_custom_world_agent_session for super::RemoteProcedures { &self, input: CustomWorldAgentSessionCreateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldAgentSessionProcedureResult>( - "create_custom_world_agent_session", - CreateCustomWorldAgentSessionArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentSessionProcedureResult>( + "create_custom_world_agent_session", + CreateCustomWorldAgentSessionArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/create_puzzle_agent_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/create_puzzle_agent_session_procedure.rs index 62b77081..d5c79fa4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/create_puzzle_agent_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/create_puzzle_agent_session_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::puzzle_agent_session_create_input_type::PuzzleAgentSessionCreateInput; use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; +use super::puzzle_agent_session_create_input_type::PuzzleAgentSessionCreateInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct CreatePuzzleAgentSessionArgs { + struct CreatePuzzleAgentSessionArgs { pub input: PuzzleAgentSessionCreateInput, } + impl __sdk::InModule for CreatePuzzleAgentSessionArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for CreatePuzzleAgentSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait create_puzzle_agent_session { - fn create_puzzle_agent_session(&self, input: PuzzleAgentSessionCreateInput) { - self.create_puzzle_agent_session_then(input, |_, _| {}); + fn create_puzzle_agent_session(&self, input: PuzzleAgentSessionCreateInput, +) { + self.create_puzzle_agent_session_then(input, |_, _| {}); } fn create_puzzle_agent_session_then( &self, input: PuzzleAgentSessionCreateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl create_puzzle_agent_session for super::RemoteProcedures { &self, input: PuzzleAgentSessionCreateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "create_puzzle_agent_session", - CreatePuzzleAgentSessionArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "create_puzzle_agent_session", + CreatePuzzleAgentSessionArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_input_type.rs index 9663e12d..3281a80a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,10 +17,12 @@ pub struct CustomWorldAgentActionExecuteInput { pub owner_user_id: String, pub operation_id: String, pub action: String, - pub payload_json: Option, + pub payload_json: Option::, pub submitted_at_micros: i64, } + impl __sdk::InModule for CustomWorldAgentActionExecuteInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_result_type.rs index 39aeb7e0..6729b4db 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_action_execute_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperationSnapshot; @@ -10,10 +15,12 @@ use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperation #[sats(crate = __lib)] pub struct CustomWorldAgentActionExecuteResult { pub ok: bool, - pub operation: Option, - pub error_message: Option, + pub operation: Option::, + pub error_message: Option::, } + impl __sdk::InModule for CustomWorldAgentActionExecuteResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_card_detail_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_card_detail_get_input_type.rs index 2b8cde47..c6cdeb3b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_card_detail_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_card_detail_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,6 +18,8 @@ pub struct CustomWorldAgentCardDetailGetInput { pub card_id: String, } + impl __sdk::InModule for CustomWorldAgentCardDetailGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_finalize_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_finalize_input_type.rs new file mode 100644 index 00000000..dcb9cb9d --- /dev/null +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_finalize_input_type.rs @@ -0,0 +1,48 @@ +// 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::rpg_agent_stage_type::RpgAgentStage; +use super::rpg_agent_operation_status_type::RpgAgentOperationStatus; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub struct CustomWorldAgentMessageFinalizeInput { + pub session_id: String, + pub owner_user_id: String, + pub operation_id: String, + pub assistant_message_id: String, + pub assistant_reply_text: String, + pub phase_label: String, + pub phase_detail: String, + pub operation_status: RpgAgentOperationStatus, + pub operation_progress: u32, + pub stage: RpgAgentStage, + pub progress_percent: u32, + pub focus_card_id: Option::, + pub anchor_content_json: String, + pub creator_intent_json: Option::, + pub creator_intent_readiness_json: String, + pub anchor_pack_json: Option::, + pub draft_profile_json: Option::, + pub pending_clarifications_json: String, + pub suggested_actions_json: String, + pub recommended_replies_json: String, + pub quality_findings_json: String, + pub asset_coverage_json: String, + pub error_message: Option::, + pub updated_at_micros: i64, +} + + +impl __sdk::InModule for CustomWorldAgentMessageFinalizeInput { + type Module = super::RemoteModule; +} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_snapshot_type.rs index 69368214..e57b9839 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_snapshot_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::rpg_agent_message_kind_type::RpgAgentMessageKind; use super::rpg_agent_message_role_type::RpgAgentMessageRole; +use super::rpg_agent_message_kind_type::RpgAgentMessageKind; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,10 +20,12 @@ pub struct CustomWorldAgentMessageSnapshot { pub role: RpgAgentMessageRole, pub kind: RpgAgentMessageKind, pub text: String, - pub related_operation_id: Option, + pub related_operation_id: Option::, pub created_at_micros: i64, } + impl __sdk::InModule for CustomWorldAgentMessageSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_submit_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_submit_input_type.rs index cf3a4230..bc2da116 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_submit_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_submit_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,6 +21,8 @@ pub struct CustomWorldAgentMessageSubmitInput { pub submitted_at_micros: i64, } + impl __sdk::InModule for CustomWorldAgentMessageSubmitInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_table.rs index 1d0886e7..12cae6f1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_table.rs @@ -2,10 +2,15 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_agent_message_type::CustomWorldAgentMessage; -use super::rpg_agent_message_kind_type::RpgAgentMessageKind; use super::rpg_agent_message_role_type::RpgAgentMessageRole; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::rpg_agent_message_kind_type::RpgAgentMessageKind; /// Table handle for the table `custom_world_agent_message`. /// @@ -33,9 +38,7 @@ pub trait CustomWorldAgentMessageTableAccess { impl CustomWorldAgentMessageTableAccess for super::RemoteTables { fn custom_world_agent_message(&self) -> CustomWorldAgentMessageTableHandle<'_> { CustomWorldAgentMessageTableHandle { - imp: self - .imp - .get_table::("custom_world_agent_message"), + imp: self.imp.get_table::("custom_world_agent_message"), ctx: std::marker::PhantomData, } } @@ -48,12 +51,8 @@ impl<'ctx> __sdk::Table for CustomWorldAgentMessageTableHandle<'ctx> { type Row = CustomWorldAgentMessage; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = CustomWorldAgentMessageInsertCallbackId; @@ -99,40 +98,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentMessageTableHandle<'ct } } -/// Access to the `message_id` unique index on the table `custom_world_agent_message`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldAgentMessageMessageIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_agent_message().message_id().find(...)`. -pub struct CustomWorldAgentMessageMessageIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldAgentMessageTableHandle<'ctx> { - /// Get a handle on the `message_id` unique index on the table `custom_world_agent_message`. - pub fn message_id(&self) -> CustomWorldAgentMessageMessageIdUnique<'ctx> { - CustomWorldAgentMessageMessageIdUnique { - imp: self.imp.get_unique_constraint::("message_id"), - phantom: std::marker::PhantomData, + /// Access to the `message_id` unique index on the table `custom_world_agent_message`, + /// which allows point queries on the field of the same name + /// via the [`CustomWorldAgentMessageMessageIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.custom_world_agent_message().message_id().find(...)`. + pub struct CustomWorldAgentMessageMessageIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> CustomWorldAgentMessageMessageIdUnique<'ctx> { - /// Find the subscribed row whose `message_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 { - self.imp.find(col_val) - } -} + impl<'ctx> CustomWorldAgentMessageTableHandle<'ctx> { + /// Get a handle on the `message_id` unique index on the table `custom_world_agent_message`. + pub fn message_id(&self) -> CustomWorldAgentMessageMessageIdUnique<'ctx> { + CustomWorldAgentMessageMessageIdUnique { + imp: self.imp.get_unique_constraint::("message_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> CustomWorldAgentMessageMessageIdUnique<'ctx> { + /// Find the subscribed row whose `message_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("custom_world_agent_message"); + + let _table = client_cache.get_or_make_table::("custom_world_agent_message"); _table.add_unique_constraint::("message_id", |row| &row.message_id); } @@ -141,24 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldAgentMessage`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_agent_messageQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldAgentMessage`. - fn custom_world_agent_message(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `CustomWorldAgentMessage`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait custom_world_agent_messageQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `CustomWorldAgentMessage`. + fn custom_world_agent_message(&self) -> __sdk::__query_builder::Table; + } + + impl custom_world_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { + fn custom_world_agent_message(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("custom_world_agent_message") + } + } -impl custom_world_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_agent_message(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_agent_message") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_type.rs index 75110860..e33b5c4a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_message_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::rpg_agent_message_kind_type::RpgAgentMessageKind; use super::rpg_agent_message_role_type::RpgAgentMessageRole; +use super::rpg_agent_message_kind_type::RpgAgentMessageKind; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,14 +20,16 @@ pub struct CustomWorldAgentMessage { pub role: RpgAgentMessageRole, pub kind: RpgAgentMessageKind, pub text: String, - pub related_operation_id: Option, + pub related_operation_id: Option::, pub created_at: __sdk::Timestamp, } + impl __sdk::InModule for CustomWorldAgentMessage { type Module = super::RemoteModule; } + /// Column accessor struct for the table `CustomWorldAgentMessage`. /// /// Provides typed access to columns for query building. @@ -32,7 +39,7 @@ pub struct CustomWorldAgentMessageCols { pub role: __sdk::__query_builder::Col, pub kind: __sdk::__query_builder::Col, pub text: __sdk::__query_builder::Col, - pub related_operation_id: __sdk::__query_builder::Col>, + pub related_operation_id: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, } @@ -45,11 +52,9 @@ impl __sdk::__query_builder::HasCols for CustomWorldAgentMessage { role: __sdk::__query_builder::Col::new(table_name, "role"), kind: __sdk::__query_builder::Col::new(table_name, "kind"), text: __sdk::__query_builder::Col::new(table_name, "text"), - related_operation_id: __sdk::__query_builder::Col::new( - table_name, - "related_operation_id", - ), + related_operation_id: __sdk::__query_builder::Col::new(table_name, "related_operation_id"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), + } } } @@ -68,8 +73,10 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldAgentMessage { CustomWorldAgentMessageIxCols { message_id: __sdk::__query_builder::IxCol::new(table_name, "message_id"), session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for CustomWorldAgentMessage {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_get_input_type.rs index 1e249edf..2aa3b05b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,6 +18,8 @@ pub struct CustomWorldAgentOperationGetInput { pub operation_id: String, } + impl __sdk::InModule for CustomWorldAgentOperationGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_procedure_result_type.rs index 39d0e493..f9bf13da 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperationSnapshot; @@ -10,10 +15,12 @@ use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperation #[sats(crate = __lib)] pub struct CustomWorldAgentOperationProcedureResult { pub ok: bool, - pub operation: Option, - pub error_message: Option, + pub operation: Option::, + pub error_message: Option::, } + impl __sdk::InModule for CustomWorldAgentOperationProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_snapshot_type.rs index 61e86eb3..954a809c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_snapshot_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::rpg_agent_operation_status_type::RpgAgentOperationStatus; use super::rpg_agent_operation_type_type::RpgAgentOperationType; +use super::rpg_agent_operation_status_type::RpgAgentOperationStatus; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,11 +22,13 @@ pub struct CustomWorldAgentOperationSnapshot { pub phase_label: String, pub phase_detail: String, pub progress: u32, - pub error_message: Option, + pub error_message: Option::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for CustomWorldAgentOperationSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_table.rs index 316a95b1..7e6b6b11 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_table.rs @@ -2,10 +2,15 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_agent_operation_type::CustomWorldAgentOperation; -use super::rpg_agent_operation_status_type::RpgAgentOperationStatus; use super::rpg_agent_operation_type_type::RpgAgentOperationType; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::rpg_agent_operation_status_type::RpgAgentOperationStatus; /// Table handle for the table `custom_world_agent_operation`. /// @@ -33,9 +38,7 @@ pub trait CustomWorldAgentOperationTableAccess { impl CustomWorldAgentOperationTableAccess for super::RemoteTables { fn custom_world_agent_operation(&self) -> CustomWorldAgentOperationTableHandle<'_> { CustomWorldAgentOperationTableHandle { - imp: self - .imp - .get_table::("custom_world_agent_operation"), + imp: self.imp.get_table::("custom_world_agent_operation"), ctx: std::marker::PhantomData, } } @@ -48,12 +51,8 @@ impl<'ctx> __sdk::Table for CustomWorldAgentOperationTableHandle<'ctx> { type Row = CustomWorldAgentOperation; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = CustomWorldAgentOperationInsertCallbackId; @@ -99,40 +98,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentOperationTableHandle<' } } -/// Access to the `operation_id` unique index on the table `custom_world_agent_operation`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldAgentOperationOperationIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_agent_operation().operation_id().find(...)`. -pub struct CustomWorldAgentOperationOperationIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldAgentOperationTableHandle<'ctx> { - /// Get a handle on the `operation_id` unique index on the table `custom_world_agent_operation`. - pub fn operation_id(&self) -> CustomWorldAgentOperationOperationIdUnique<'ctx> { - CustomWorldAgentOperationOperationIdUnique { - imp: self.imp.get_unique_constraint::("operation_id"), - phantom: std::marker::PhantomData, + /// Access to the `operation_id` unique index on the table `custom_world_agent_operation`, + /// which allows point queries on the field of the same name + /// via the [`CustomWorldAgentOperationOperationIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.custom_world_agent_operation().operation_id().find(...)`. + pub struct CustomWorldAgentOperationOperationIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> CustomWorldAgentOperationOperationIdUnique<'ctx> { - /// Find the subscribed row whose `operation_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 { - self.imp.find(col_val) - } -} + impl<'ctx> CustomWorldAgentOperationTableHandle<'ctx> { + /// Get a handle on the `operation_id` unique index on the table `custom_world_agent_operation`. + pub fn operation_id(&self) -> CustomWorldAgentOperationOperationIdUnique<'ctx> { + CustomWorldAgentOperationOperationIdUnique { + imp: self.imp.get_unique_constraint::("operation_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> CustomWorldAgentOperationOperationIdUnique<'ctx> { + /// Find the subscribed row whose `operation_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("custom_world_agent_operation"); + + let _table = client_cache.get_or_make_table::("custom_world_agent_operation"); _table.add_unique_constraint::("operation_id", |row| &row.operation_id); } @@ -141,28 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldAgentOperation`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_agent_operationQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldAgentOperation`. - fn custom_world_agent_operation( - &self, - ) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `CustomWorldAgentOperation`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait custom_world_agent_operationQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `CustomWorldAgentOperation`. + fn custom_world_agent_operation(&self) -> __sdk::__query_builder::Table; + } + + impl custom_world_agent_operationQueryTableAccess for __sdk::QueryTableAccessor { + fn custom_world_agent_operation(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("custom_world_agent_operation") + } + } -impl custom_world_agent_operationQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_agent_operation( - &self, - ) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_agent_operation") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_type.rs index 41957317..b195855d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_operation_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::rpg_agent_operation_status_type::RpgAgentOperationStatus; use super::rpg_agent_operation_type_type::RpgAgentOperationType; +use super::rpg_agent_operation_status_type::RpgAgentOperationStatus; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,28 +22,29 @@ pub struct CustomWorldAgentOperation { pub phase_label: String, pub phase_detail: String, pub progress: u32, - pub error_message: Option, + pub error_message: Option::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for CustomWorldAgentOperation { type Module = super::RemoteModule; } + /// Column accessor struct for the table `CustomWorldAgentOperation`. /// /// Provides typed access to columns for query building. pub struct CustomWorldAgentOperationCols { pub operation_id: __sdk::__query_builder::Col, pub session_id: __sdk::__query_builder::Col, - pub operation_type: - __sdk::__query_builder::Col, + pub operation_type: __sdk::__query_builder::Col, pub status: __sdk::__query_builder::Col, pub phase_label: __sdk::__query_builder::Col, pub phase_detail: __sdk::__query_builder::Col, pub progress: __sdk::__query_builder::Col, - pub error_message: __sdk::__query_builder::Col>, + pub error_message: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -57,6 +63,7 @@ impl __sdk::__query_builder::HasCols for CustomWorldAgentOperation { error_message: __sdk::__query_builder::Col::new(table_name, "error_message"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -75,8 +82,10 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldAgentOperation { CustomWorldAgentOperationIxCols { operation_id: __sdk::__query_builder::IxCol::new(table_name, "operation_id"), session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for CustomWorldAgentOperation {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_create_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_create_input_type.rs index d2ea6be9..7a36c77b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_create_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_create_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,11 +19,11 @@ pub struct CustomWorldAgentSessionCreateInput { pub welcome_message_id: String, pub welcome_message_text: String, pub anchor_content_json: String, - pub creator_intent_json: Option, + pub creator_intent_json: Option::, pub creator_intent_readiness_json: String, - pub anchor_pack_json: Option, - pub lock_state_json: Option, - pub draft_profile_json: Option, + pub anchor_pack_json: Option::, + pub lock_state_json: Option::, + pub draft_profile_json: Option::, pub pending_clarifications_json: String, pub suggested_actions_json: String, pub recommended_replies_json: String, @@ -27,6 +33,8 @@ pub struct CustomWorldAgentSessionCreateInput { pub created_at_micros: i64, } + impl __sdk::InModule for CustomWorldAgentSessionCreateInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_get_input_type.rs index 733eaecb..0e4f3319 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct CustomWorldAgentSessionGetInput { pub owner_user_id: String, } + impl __sdk::InModule for CustomWorldAgentSessionGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_procedure_result_type.rs index 1ca24f19..4da0e11a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_agent_session_snapshot_type::CustomWorldAgentSessionSnapshot; @@ -10,10 +15,12 @@ use super::custom_world_agent_session_snapshot_type::CustomWorldAgentSessionSnap #[sats(crate = __lib)] pub struct CustomWorldAgentSessionProcedureResult { pub ok: bool, - pub session: Option, - pub error_message: Option, + pub session: Option::, + pub error_message: Option::, } + impl __sdk::InModule for CustomWorldAgentSessionProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_snapshot_type.rs index 6a50455e..e263df53 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_snapshot_type.rs @@ -2,12 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_agent_message_snapshot_type::CustomWorldAgentMessageSnapshot; -use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperationSnapshot; -use super::custom_world_draft_card_snapshot_type::CustomWorldDraftCardSnapshot; use super::rpg_agent_stage_type::RpgAgentStage; +use super::custom_world_agent_message_snapshot_type::CustomWorldAgentMessageSnapshot; +use super::custom_world_draft_card_snapshot_type::CustomWorldDraftCardSnapshot; +use super::custom_world_agent_operation_snapshot_type::CustomWorldAgentOperationSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,16 +23,16 @@ pub struct CustomWorldAgentSessionSnapshot { pub current_turn: u32, pub progress_percent: u32, pub stage: RpgAgentStage, - pub focus_card_id: Option, + pub focus_card_id: Option::, pub anchor_content_json: String, - pub creator_intent_json: Option, + pub creator_intent_json: Option::, pub creator_intent_readiness_json: String, - pub anchor_pack_json: Option, - pub lock_state_json: Option, - pub draft_profile_json: Option, - pub last_assistant_reply: Option, - pub publish_gate_json: Option, - pub result_preview_json: Option, + pub anchor_pack_json: Option::, + pub lock_state_json: Option::, + pub draft_profile_json: Option::, + pub last_assistant_reply: Option::, + pub publish_gate_json: Option::, + pub result_preview_json: Option::, pub pending_clarifications_json: String, pub quality_findings_json: String, pub suggested_actions_json: String, @@ -35,13 +40,15 @@ pub struct CustomWorldAgentSessionSnapshot { pub asset_coverage_json: String, pub checkpoints_json: String, pub supported_actions_json: String, - pub messages: Vec, - pub draft_cards: Vec, - pub operations: Vec, + pub messages: Vec::, + pub draft_cards: Vec::, + pub operations: Vec::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for CustomWorldAgentSessionSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_table.rs index d63d156c..8b907a69 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_agent_session_type::CustomWorldAgentSession; use super::rpg_agent_stage_type::RpgAgentStage; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `custom_world_agent_session`. /// @@ -32,9 +37,7 @@ pub trait CustomWorldAgentSessionTableAccess { impl CustomWorldAgentSessionTableAccess for super::RemoteTables { fn custom_world_agent_session(&self) -> CustomWorldAgentSessionTableHandle<'_> { CustomWorldAgentSessionTableHandle { - imp: self - .imp - .get_table::("custom_world_agent_session"), + imp: self.imp.get_table::("custom_world_agent_session"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for CustomWorldAgentSessionTableHandle<'ctx> { type Row = CustomWorldAgentSession; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = CustomWorldAgentSessionInsertCallbackId; @@ -98,40 +97,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldAgentSessionTableHandle<'ct } } -/// Access to the `session_id` unique index on the table `custom_world_agent_session`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldAgentSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_agent_session().session_id().find(...)`. -pub struct CustomWorldAgentSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldAgentSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `custom_world_agent_session`. - pub fn session_id(&self) -> CustomWorldAgentSessionSessionIdUnique<'ctx> { - CustomWorldAgentSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, + /// Access to the `session_id` unique index on the table `custom_world_agent_session`, + /// which allows point queries on the field of the same name + /// via the [`CustomWorldAgentSessionSessionIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.custom_world_agent_session().session_id().find(...)`. + pub struct CustomWorldAgentSessionSessionIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> CustomWorldAgentSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} + impl<'ctx> CustomWorldAgentSessionTableHandle<'ctx> { + /// Get a handle on the `session_id` unique index on the table `custom_world_agent_session`. + pub fn session_id(&self) -> CustomWorldAgentSessionSessionIdUnique<'ctx> { + CustomWorldAgentSessionSessionIdUnique { + imp: self.imp.get_unique_constraint::("session_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> CustomWorldAgentSessionSessionIdUnique<'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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("custom_world_agent_session"); + + let _table = client_cache.get_or_make_table::("custom_world_agent_session"); _table.add_unique_constraint::("session_id", |row| &row.session_id); } @@ -140,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldAgentSession`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_agent_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldAgentSession`. - fn custom_world_agent_session(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `CustomWorldAgentSession`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait custom_world_agent_sessionQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `CustomWorldAgentSession`. + fn custom_world_agent_session(&self) -> __sdk::__query_builder::Table; + } + + impl custom_world_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { + fn custom_world_agent_session(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("custom_world_agent_session") + } + } -impl custom_world_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_agent_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_agent_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_type.rs index 105bc924..128d93e3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_agent_session_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::rpg_agent_stage_type::RpgAgentStage; @@ -15,16 +20,16 @@ pub struct CustomWorldAgentSession { pub current_turn: u32, pub progress_percent: u32, pub stage: RpgAgentStage, - pub focus_card_id: Option, + pub focus_card_id: Option::, pub anchor_content_json: String, - pub creator_intent_json: Option, + pub creator_intent_json: Option::, pub creator_intent_readiness_json: String, - pub anchor_pack_json: Option, - pub lock_state_json: Option, - pub draft_profile_json: Option, - pub last_assistant_reply: Option, - pub publish_gate_json: Option, - pub result_preview_json: Option, + pub anchor_pack_json: Option::, + pub lock_state_json: Option::, + pub draft_profile_json: Option::, + pub last_assistant_reply: Option::, + pub publish_gate_json: Option::, + pub result_preview_json: Option::, pub pending_clarifications_json: String, pub quality_findings_json: String, pub suggested_actions_json: String, @@ -35,10 +40,12 @@ pub struct CustomWorldAgentSession { pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for CustomWorldAgentSession { type Module = super::RemoteModule; } + /// Column accessor struct for the table `CustomWorldAgentSession`. /// /// Provides typed access to columns for query building. @@ -49,16 +56,16 @@ pub struct CustomWorldAgentSessionCols { pub current_turn: __sdk::__query_builder::Col, pub progress_percent: __sdk::__query_builder::Col, pub stage: __sdk::__query_builder::Col, - pub focus_card_id: __sdk::__query_builder::Col>, + pub focus_card_id: __sdk::__query_builder::Col>, pub anchor_content_json: __sdk::__query_builder::Col, - pub creator_intent_json: __sdk::__query_builder::Col>, + pub creator_intent_json: __sdk::__query_builder::Col>, pub creator_intent_readiness_json: __sdk::__query_builder::Col, - pub anchor_pack_json: __sdk::__query_builder::Col>, - pub lock_state_json: __sdk::__query_builder::Col>, - pub draft_profile_json: __sdk::__query_builder::Col>, - pub last_assistant_reply: __sdk::__query_builder::Col>, - pub publish_gate_json: __sdk::__query_builder::Col>, - pub result_preview_json: __sdk::__query_builder::Col>, + pub anchor_pack_json: __sdk::__query_builder::Col>, + pub lock_state_json: __sdk::__query_builder::Col>, + pub draft_profile_json: __sdk::__query_builder::Col>, + pub last_assistant_reply: __sdk::__query_builder::Col>, + pub publish_gate_json: __sdk::__query_builder::Col>, + pub result_preview_json: __sdk::__query_builder::Col>, pub pending_clarifications_json: __sdk::__query_builder::Col, pub quality_findings_json: __sdk::__query_builder::Col, pub suggested_actions_json: __sdk::__query_builder::Col, @@ -80,53 +87,24 @@ impl __sdk::__query_builder::HasCols for CustomWorldAgentSession { progress_percent: __sdk::__query_builder::Col::new(table_name, "progress_percent"), stage: __sdk::__query_builder::Col::new(table_name, "stage"), focus_card_id: __sdk::__query_builder::Col::new(table_name, "focus_card_id"), - anchor_content_json: __sdk::__query_builder::Col::new( - table_name, - "anchor_content_json", - ), - creator_intent_json: __sdk::__query_builder::Col::new( - table_name, - "creator_intent_json", - ), - creator_intent_readiness_json: __sdk::__query_builder::Col::new( - table_name, - "creator_intent_readiness_json", - ), + anchor_content_json: __sdk::__query_builder::Col::new(table_name, "anchor_content_json"), + creator_intent_json: __sdk::__query_builder::Col::new(table_name, "creator_intent_json"), + creator_intent_readiness_json: __sdk::__query_builder::Col::new(table_name, "creator_intent_readiness_json"), anchor_pack_json: __sdk::__query_builder::Col::new(table_name, "anchor_pack_json"), lock_state_json: __sdk::__query_builder::Col::new(table_name, "lock_state_json"), draft_profile_json: __sdk::__query_builder::Col::new(table_name, "draft_profile_json"), - last_assistant_reply: __sdk::__query_builder::Col::new( - table_name, - "last_assistant_reply", - ), + last_assistant_reply: __sdk::__query_builder::Col::new(table_name, "last_assistant_reply"), publish_gate_json: __sdk::__query_builder::Col::new(table_name, "publish_gate_json"), - result_preview_json: __sdk::__query_builder::Col::new( - table_name, - "result_preview_json", - ), - pending_clarifications_json: __sdk::__query_builder::Col::new( - table_name, - "pending_clarifications_json", - ), - quality_findings_json: __sdk::__query_builder::Col::new( - table_name, - "quality_findings_json", - ), - suggested_actions_json: __sdk::__query_builder::Col::new( - table_name, - "suggested_actions_json", - ), - recommended_replies_json: __sdk::__query_builder::Col::new( - table_name, - "recommended_replies_json", - ), - asset_coverage_json: __sdk::__query_builder::Col::new( - table_name, - "asset_coverage_json", - ), + result_preview_json: __sdk::__query_builder::Col::new(table_name, "result_preview_json"), + pending_clarifications_json: __sdk::__query_builder::Col::new(table_name, "pending_clarifications_json"), + quality_findings_json: __sdk::__query_builder::Col::new(table_name, "quality_findings_json"), + suggested_actions_json: __sdk::__query_builder::Col::new(table_name, "suggested_actions_json"), + recommended_replies_json: __sdk::__query_builder::Col::new(table_name, "recommended_replies_json"), + asset_coverage_json: __sdk::__query_builder::Col::new(table_name, "asset_coverage_json"), checkpoints_json: __sdk::__query_builder::Col::new(table_name, "checkpoints_json"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -147,8 +125,10 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldAgentSession { owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), stage: __sdk::__query_builder::IxCol::new(table_name, "stage"), + } } } impl __sdk::__query_builder::CanBeLookupTable for CustomWorldAgentSession {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_result_type.rs index ee8f9ba4..384a2c8c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_draft_card_detail_snapshot_type::CustomWorldDraftCardDetailSnapshot; @@ -10,10 +15,12 @@ use super::custom_world_draft_card_detail_snapshot_type::CustomWorldDraftCardDet #[sats(crate = __lib)] pub struct CustomWorldDraftCardDetailResult { pub ok: bool, - pub card: Option, - pub error_message: Option, + pub card: Option::, + pub error_message: Option::, } + impl __sdk::InModule for CustomWorldDraftCardDetailResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_section_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_section_snapshot_type.rs index b7f30c00..2e256890 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_section_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_section_snapshot_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,6 +18,8 @@ pub struct CustomWorldDraftCardDetailSectionSnapshot { pub value: String, } + impl __sdk::InModule for CustomWorldDraftCardDetailSectionSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_snapshot_type.rs index fab895fe..6bb20096 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_detail_snapshot_type.rs @@ -2,11 +2,16 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_draft_card_detail_section_snapshot_type::CustomWorldDraftCardDetailSectionSnapshot; -use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; use super::rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind; +use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; +use super::custom_world_draft_card_detail_section_snapshot_type::CustomWorldDraftCardDetailSectionSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -14,16 +19,18 @@ pub struct CustomWorldDraftCardDetailSnapshot { pub card_id: String, pub kind: RpgAgentDraftCardKind, pub title: String, - pub sections: Vec, + pub sections: Vec::, pub linked_ids_json: String, pub locked: bool, pub editable: bool, pub editable_section_ids_json: String, pub warning_messages_json: String, - pub asset_status: Option, - pub asset_status_label: Option, + pub asset_status: Option::, + pub asset_status_label: Option::, } + impl __sdk::InModule for CustomWorldDraftCardDetailSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_snapshot_type.rs index 84108f6e..c9497003 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_snapshot_type.rs @@ -2,11 +2,16 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; use super::rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind; use super::rpg_agent_draft_card_status_type::RpgAgentDraftCardStatus; +use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,13 +25,15 @@ pub struct CustomWorldDraftCardSnapshot { pub summary: String, pub linked_ids_json: String, pub warning_count: u32, - pub asset_status: Option, - pub asset_status_label: Option, - pub detail_payload_json: Option, + pub asset_status: Option::, + pub asset_status_label: Option::, + pub detail_payload_json: Option::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for CustomWorldDraftCardSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_table.rs index 6f175998..9d197db6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_table.rs @@ -2,11 +2,16 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_draft_card_type::CustomWorldDraftCard; -use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; use super::rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind; use super::rpg_agent_draft_card_status_type::RpgAgentDraftCardStatus; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; /// Table handle for the table `custom_world_draft_card`. /// @@ -34,9 +39,7 @@ pub trait CustomWorldDraftCardTableAccess { impl CustomWorldDraftCardTableAccess for super::RemoteTables { fn custom_world_draft_card(&self) -> CustomWorldDraftCardTableHandle<'_> { CustomWorldDraftCardTableHandle { - imp: self - .imp - .get_table::("custom_world_draft_card"), + imp: self.imp.get_table::("custom_world_draft_card"), ctx: std::marker::PhantomData, } } @@ -49,12 +52,8 @@ impl<'ctx> __sdk::Table for CustomWorldDraftCardTableHandle<'ctx> { type Row = CustomWorldDraftCard; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = CustomWorldDraftCardInsertCallbackId; @@ -100,38 +99,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldDraftCardTableHandle<'ctx> } } -/// Access to the `card_id` unique index on the table `custom_world_draft_card`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldDraftCardCardIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_draft_card().card_id().find(...)`. -pub struct CustomWorldDraftCardCardIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldDraftCardTableHandle<'ctx> { - /// Get a handle on the `card_id` unique index on the table `custom_world_draft_card`. - pub fn card_id(&self) -> CustomWorldDraftCardCardIdUnique<'ctx> { - CustomWorldDraftCardCardIdUnique { - imp: self.imp.get_unique_constraint::("card_id"), - phantom: std::marker::PhantomData, + /// Access to the `card_id` unique index on the table `custom_world_draft_card`, + /// which allows point queries on the field of the same name + /// via the [`CustomWorldDraftCardCardIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.custom_world_draft_card().card_id().find(...)`. + pub struct CustomWorldDraftCardCardIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> CustomWorldDraftCardCardIdUnique<'ctx> { - /// Find the subscribed row whose `card_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 { - self.imp.find(col_val) - } -} + impl<'ctx> CustomWorldDraftCardTableHandle<'ctx> { + /// Get a handle on the `card_id` unique index on the table `custom_world_draft_card`. + pub fn card_id(&self) -> CustomWorldDraftCardCardIdUnique<'ctx> { + CustomWorldDraftCardCardIdUnique { + imp: self.imp.get_unique_constraint::("card_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> CustomWorldDraftCardCardIdUnique<'ctx> { + /// Find the subscribed row whose `card_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("custom_world_draft_card"); _table.add_unique_constraint::("card_id", |row| &row.card_id); } @@ -141,24 +141,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldDraftCard`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_draft_cardQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldDraftCard`. - fn custom_world_draft_card(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `CustomWorldDraftCard`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait custom_world_draft_cardQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `CustomWorldDraftCard`. + fn custom_world_draft_card(&self) -> __sdk::__query_builder::Table; + } + + impl custom_world_draft_cardQueryTableAccess for __sdk::QueryTableAccessor { + fn custom_world_draft_card(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("custom_world_draft_card") + } + } -impl custom_world_draft_cardQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_draft_card(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_draft_card") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_type.rs index 600c1f31..64dd162a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_draft_card_type.rs @@ -2,11 +2,16 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; use super::rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind; use super::rpg_agent_draft_card_status_type::RpgAgentDraftCardStatus; +use super::custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -20,17 +25,19 @@ pub struct CustomWorldDraftCard { pub summary: String, pub linked_ids_json: String, pub warning_count: u32, - pub asset_status: Option, - pub asset_status_label: Option, - pub detail_payload_json: Option, + pub asset_status: Option::, + pub asset_status_label: Option::, + pub detail_payload_json: Option::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for CustomWorldDraftCard { type Module = super::RemoteModule; } + /// Column accessor struct for the table `CustomWorldDraftCard`. /// /// Provides typed access to columns for query building. @@ -44,10 +51,9 @@ pub struct CustomWorldDraftCardCols { pub summary: __sdk::__query_builder::Col, pub linked_ids_json: __sdk::__query_builder::Col, pub warning_count: __sdk::__query_builder::Col, - pub asset_status: - __sdk::__query_builder::Col>, - pub asset_status_label: __sdk::__query_builder::Col>, - pub detail_payload_json: __sdk::__query_builder::Col>, + pub asset_status: __sdk::__query_builder::Col>, + pub asset_status_label: __sdk::__query_builder::Col>, + pub detail_payload_json: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -67,12 +73,10 @@ impl __sdk::__query_builder::HasCols for CustomWorldDraftCard { warning_count: __sdk::__query_builder::Col::new(table_name, "warning_count"), asset_status: __sdk::__query_builder::Col::new(table_name, "asset_status"), asset_status_label: __sdk::__query_builder::Col::new(table_name, "asset_status_label"), - detail_payload_json: __sdk::__query_builder::Col::new( - table_name, - "detail_payload_json", - ), + detail_payload_json: __sdk::__query_builder::Col::new(table_name, "detail_payload_json"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -93,8 +97,10 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldDraftCard { card_id: __sdk::__query_builder::IxCol::new(table_name, "card_id"), kind: __sdk::__query_builder::IxCol::new(table_name, "kind"), session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for CustomWorldDraftCard {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_detail_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_detail_input_type.rs index 64724446..5df002ea 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_detail_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_detail_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct CustomWorldGalleryDetailInput { pub profile_id: String, } + impl __sdk::InModule for CustomWorldGalleryDetailInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_snapshot_type.rs index c2a84ee3..9d81b728 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_theme_mode_type::CustomWorldThemeMode; @@ -15,7 +20,7 @@ pub struct CustomWorldGalleryEntrySnapshot { pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option, + pub cover_image_src: Option::, pub theme_mode: CustomWorldThemeMode, pub playable_npc_count: u32, pub landmark_count: u32, @@ -23,6 +28,8 @@ pub struct CustomWorldGalleryEntrySnapshot { pub updated_at_micros: i64, } + impl __sdk::InModule for CustomWorldGalleryEntrySnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_table.rs index 425b6a12..f215d0c9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_gallery_entry_type::CustomWorldGalleryEntry; use super::custom_world_theme_mode_type::CustomWorldThemeMode; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `custom_world_gallery_entry`. /// @@ -32,9 +37,7 @@ pub trait CustomWorldGalleryEntryTableAccess { impl CustomWorldGalleryEntryTableAccess for super::RemoteTables { fn custom_world_gallery_entry(&self) -> CustomWorldGalleryEntryTableHandle<'_> { CustomWorldGalleryEntryTableHandle { - imp: self - .imp - .get_table::("custom_world_gallery_entry"), + imp: self.imp.get_table::("custom_world_gallery_entry"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for CustomWorldGalleryEntryTableHandle<'ctx> { type Row = CustomWorldGalleryEntry; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = CustomWorldGalleryEntryInsertCallbackId; @@ -98,40 +97,40 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldGalleryEntryTableHandle<'ct } } -/// Access to the `profile_id` unique index on the table `custom_world_gallery_entry`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldGalleryEntryProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_gallery_entry().profile_id().find(...)`. -pub struct CustomWorldGalleryEntryProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldGalleryEntryTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `custom_world_gallery_entry`. - pub fn profile_id(&self) -> CustomWorldGalleryEntryProfileIdUnique<'ctx> { - CustomWorldGalleryEntryProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, + /// Access to the `profile_id` unique index on the table `custom_world_gallery_entry`, + /// which allows point queries on the field of the same name + /// via the [`CustomWorldGalleryEntryProfileIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.custom_world_gallery_entry().profile_id().find(...)`. + pub struct CustomWorldGalleryEntryProfileIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> CustomWorldGalleryEntryProfileIdUnique<'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 { - self.imp.find(col_val) - } -} + impl<'ctx> CustomWorldGalleryEntryTableHandle<'ctx> { + /// Get a handle on the `profile_id` unique index on the table `custom_world_gallery_entry`. + pub fn profile_id(&self) -> CustomWorldGalleryEntryProfileIdUnique<'ctx> { + CustomWorldGalleryEntryProfileIdUnique { + imp: self.imp.get_unique_constraint::("profile_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> CustomWorldGalleryEntryProfileIdUnique<'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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { - let _table = - client_cache.get_or_make_table::("custom_world_gallery_entry"); + + let _table = client_cache.get_or_make_table::("custom_world_gallery_entry"); _table.add_unique_constraint::("profile_id", |row| &row.profile_id); } @@ -140,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldGalleryEntry`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_gallery_entryQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldGalleryEntry`. - fn custom_world_gallery_entry(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `CustomWorldGalleryEntry`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait custom_world_gallery_entryQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `CustomWorldGalleryEntry`. + fn custom_world_gallery_entry(&self) -> __sdk::__query_builder::Table; + } + + impl custom_world_gallery_entryQueryTableAccess for __sdk::QueryTableAccessor { + fn custom_world_gallery_entry(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("custom_world_gallery_entry") + } + } -impl custom_world_gallery_entryQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_gallery_entry(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_gallery_entry") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_type.rs index 03ad4584..471ad9fb 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_entry_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_theme_mode_type::CustomWorldThemeMode; @@ -15,7 +20,7 @@ pub struct CustomWorldGalleryEntry { pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option, + pub cover_image_src: Option::, pub theme_mode: CustomWorldThemeMode, pub playable_npc_count: u32, pub landmark_count: u32, @@ -23,10 +28,12 @@ pub struct CustomWorldGalleryEntry { pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for CustomWorldGalleryEntry { type Module = super::RemoteModule; } + /// Column accessor struct for the table `CustomWorldGalleryEntry`. /// /// Provides typed access to columns for query building. @@ -37,7 +44,7 @@ pub struct CustomWorldGalleryEntryCols { pub world_name: __sdk::__query_builder::Col, pub subtitle: __sdk::__query_builder::Col, pub summary_text: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col>, + pub cover_image_src: __sdk::__query_builder::Col>, pub theme_mode: __sdk::__query_builder::Col, pub playable_npc_count: __sdk::__query_builder::Col, pub landmark_count: __sdk::__query_builder::Col, @@ -51,10 +58,7 @@ impl __sdk::__query_builder::HasCols for CustomWorldGalleryEntry { CustomWorldGalleryEntryCols { 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", - ), + author_display_name: __sdk::__query_builder::Col::new(table_name, "author_display_name"), world_name: __sdk::__query_builder::Col::new(table_name, "world_name"), subtitle: __sdk::__query_builder::Col::new(table_name, "subtitle"), summary_text: __sdk::__query_builder::Col::new(table_name, "summary_text"), @@ -64,6 +68,7 @@ impl __sdk::__query_builder::HasCols for CustomWorldGalleryEntry { landmark_count: __sdk::__query_builder::Col::new(table_name, "landmark_count"), published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -84,8 +89,10 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldGalleryEntry { owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), profile_id: __sdk::__query_builder::IxCol::new(table_name, "profile_id"), theme_mode: __sdk::__query_builder::IxCol::new(table_name, "theme_mode"), + } } } impl __sdk::__query_builder::CanBeLookupTable for CustomWorldGalleryEntry {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_list_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_list_result_type.rs index bf101ef1..357c32c5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_list_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_gallery_list_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; @@ -10,10 +15,12 @@ use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnap #[sats(crate = __lib)] pub struct CustomWorldGalleryListResult { pub ok: bool, - pub entries: Vec, - pub error_message: Option, + pub entries: Vec::, + pub error_message: Option::, } + impl __sdk::InModule for CustomWorldGalleryListResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_generation_mode_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_generation_mode_type.rs index 8b424a9a..375a464c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_generation_mode_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_generation_mode_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum CustomWorldGenerationMode { Fast, Full, + } + + impl __sdk::InModule for CustomWorldGenerationMode { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_detail_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_detail_input_type.rs index 472c1b80..e29dbaa9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_detail_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_detail_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct CustomWorldLibraryDetailInput { pub profile_id: String, } + impl __sdk::InModule for CustomWorldLibraryDetailInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_mutation_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_mutation_result_type.rs index 3c3bb3b3..6fd0d2ff 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_mutation_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_library_mutation_result_type.rs @@ -2,20 +2,27 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; +use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct CustomWorldLibraryMutationResult { pub ok: bool, - pub entry: Option, - pub gallery_entry: Option, - pub error_message: Option, + pub entry: Option::, + pub gallery_entry: Option::, + pub error_message: Option::, } + impl __sdk::InModule for CustomWorldLibraryMutationResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_delete_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_delete_input_type.rs index f9d4a10f..65a7d4ab 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_delete_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_delete_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,6 +18,8 @@ pub struct CustomWorldProfileDeleteInput { pub deleted_at_micros: i64, } + impl __sdk::InModule for CustomWorldProfileDeleteInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_input_type.rs index 53c46830..2d4b431e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct CustomWorldProfileListInput { pub owner_user_id: String, } + impl __sdk::InModule for CustomWorldProfileListInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_result_type.rs index 10db7d0e..4e6a5a4a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_list_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; @@ -10,10 +15,12 @@ use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; #[sats(crate = __lib)] pub struct CustomWorldProfileListResult { pub ok: bool, - pub entries: Vec, - pub error_message: Option, + pub entries: Vec::, + pub error_message: Option::, } + impl __sdk::InModule for CustomWorldProfileListResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_publish_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_publish_input_type.rs index 16d06654..42b63f84 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_publish_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_publish_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,6 +19,8 @@ pub struct CustomWorldProfilePublishInput { pub published_at_micros: i64, } + impl __sdk::InModule for CustomWorldProfilePublishInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_snapshot_type.rs index ece3168d..7c64effa 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_snapshot_type.rs @@ -2,33 +2,40 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_publication_status_type::CustomWorldPublicationStatus; use super::custom_world_theme_mode_type::CustomWorldThemeMode; +use super::custom_world_publication_status_type::CustomWorldPublicationStatus; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct CustomWorldProfileSnapshot { pub profile_id: String, pub owner_user_id: String, - pub source_agent_session_id: Option, + pub source_agent_session_id: Option::, pub publication_status: CustomWorldPublicationStatus, pub world_name: String, pub subtitle: String, pub summary_text: String, pub theme_mode: CustomWorldThemeMode, - pub cover_image_src: Option, + pub cover_image_src: Option::, pub profile_payload_json: String, pub playable_npc_count: u32, pub landmark_count: u32, pub author_display_name: String, - pub published_at_micros: Option, - pub deleted_at_micros: Option, + pub published_at_micros: Option::, + pub deleted_at_micros: Option::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for CustomWorldProfileSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_table.rs index 22692434..69639bf3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_table.rs @@ -2,10 +2,15 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_profile_type::CustomWorldProfile; -use super::custom_world_publication_status_type::CustomWorldPublicationStatus; use super::custom_world_theme_mode_type::CustomWorldThemeMode; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::custom_world_publication_status_type::CustomWorldPublicationStatus; /// Table handle for the table `custom_world_profile`. /// @@ -33,9 +38,7 @@ pub trait CustomWorldProfileTableAccess { impl CustomWorldProfileTableAccess for super::RemoteTables { fn custom_world_profile(&self) -> CustomWorldProfileTableHandle<'_> { CustomWorldProfileTableHandle { - imp: self - .imp - .get_table::("custom_world_profile"), + imp: self.imp.get_table::("custom_world_profile"), ctx: std::marker::PhantomData, } } @@ -48,12 +51,8 @@ impl<'ctx> __sdk::Table for CustomWorldProfileTableHandle<'ctx> { type Row = CustomWorldProfile; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = CustomWorldProfileInsertCallbackId; @@ -99,38 +98,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldProfileTableHandle<'ctx> { } } -/// Access to the `profile_id` unique index on the table `custom_world_profile`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldProfileProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_profile().profile_id().find(...)`. -pub struct CustomWorldProfileProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldProfileTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `custom_world_profile`. - pub fn profile_id(&self) -> CustomWorldProfileProfileIdUnique<'ctx> { - CustomWorldProfileProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, + /// Access to the `profile_id` unique index on the table `custom_world_profile`, + /// which allows point queries on the field of the same name + /// via the [`CustomWorldProfileProfileIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.custom_world_profile().profile_id().find(...)`. + pub struct CustomWorldProfileProfileIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> CustomWorldProfileProfileIdUnique<'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 { - self.imp.find(col_val) - } -} + impl<'ctx> CustomWorldProfileTableHandle<'ctx> { + /// Get a handle on the `profile_id` unique index on the table `custom_world_profile`. + pub fn profile_id(&self) -> CustomWorldProfileProfileIdUnique<'ctx> { + CustomWorldProfileProfileIdUnique { + imp: self.imp.get_unique_constraint::("profile_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> CustomWorldProfileProfileIdUnique<'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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("custom_world_profile"); _table.add_unique_constraint::("profile_id", |row| &row.profile_id); } @@ -140,24 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldProfile`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_profileQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldProfile`. - fn custom_world_profile(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `CustomWorldProfile`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait custom_world_profileQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `CustomWorldProfile`. + fn custom_world_profile(&self) -> __sdk::__query_builder::Table; + } + + impl custom_world_profileQueryTableAccess for __sdk::QueryTableAccessor { + fn custom_world_profile(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("custom_world_profile") + } + } -impl custom_world_profileQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_profile(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_profile") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_type.rs index 4fddf669..49405210 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_type.rs @@ -2,57 +2,63 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_publication_status_type::CustomWorldPublicationStatus; use super::custom_world_theme_mode_type::CustomWorldThemeMode; +use super::custom_world_publication_status_type::CustomWorldPublicationStatus; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct CustomWorldProfile { pub profile_id: String, pub owner_user_id: String, - pub source_agent_session_id: Option, + pub source_agent_session_id: Option::, pub publication_status: CustomWorldPublicationStatus, pub world_name: String, pub subtitle: String, pub summary_text: String, pub theme_mode: CustomWorldThemeMode, - pub cover_image_src: Option, + pub cover_image_src: Option::, pub profile_payload_json: String, pub playable_npc_count: u32, pub landmark_count: u32, pub author_display_name: String, - pub published_at: Option<__sdk::Timestamp>, - pub deleted_at: Option<__sdk::Timestamp>, + pub published_at: Option::<__sdk::Timestamp>, + pub deleted_at: Option::<__sdk::Timestamp>, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for CustomWorldProfile { type Module = super::RemoteModule; } + /// Column accessor struct for the table `CustomWorldProfile`. /// /// Provides typed access to columns for query building. pub struct CustomWorldProfileCols { pub profile_id: __sdk::__query_builder::Col, pub owner_user_id: __sdk::__query_builder::Col, - pub source_agent_session_id: __sdk::__query_builder::Col>, - pub publication_status: - __sdk::__query_builder::Col, + pub source_agent_session_id: __sdk::__query_builder::Col>, + pub publication_status: __sdk::__query_builder::Col, pub world_name: __sdk::__query_builder::Col, pub subtitle: __sdk::__query_builder::Col, pub summary_text: __sdk::__query_builder::Col, pub theme_mode: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col>, + pub cover_image_src: __sdk::__query_builder::Col>, pub profile_payload_json: __sdk::__query_builder::Col, pub playable_npc_count: __sdk::__query_builder::Col, pub landmark_count: __sdk::__query_builder::Col, pub author_display_name: __sdk::__query_builder::Col, - pub published_at: __sdk::__query_builder::Col>, - pub deleted_at: __sdk::__query_builder::Col>, + pub published_at: __sdk::__query_builder::Col>, + pub deleted_at: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -63,30 +69,22 @@ impl __sdk::__query_builder::HasCols for CustomWorldProfile { CustomWorldProfileCols { 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_agent_session_id: __sdk::__query_builder::Col::new( - table_name, - "source_agent_session_id", - ), + source_agent_session_id: __sdk::__query_builder::Col::new(table_name, "source_agent_session_id"), publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"), world_name: __sdk::__query_builder::Col::new(table_name, "world_name"), subtitle: __sdk::__query_builder::Col::new(table_name, "subtitle"), summary_text: __sdk::__query_builder::Col::new(table_name, "summary_text"), theme_mode: __sdk::__query_builder::Col::new(table_name, "theme_mode"), cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"), - profile_payload_json: __sdk::__query_builder::Col::new( - table_name, - "profile_payload_json", - ), + profile_payload_json: __sdk::__query_builder::Col::new(table_name, "profile_payload_json"), playable_npc_count: __sdk::__query_builder::Col::new(table_name, "playable_npc_count"), landmark_count: __sdk::__query_builder::Col::new(table_name, "landmark_count"), - author_display_name: __sdk::__query_builder::Col::new( - table_name, - "author_display_name", - ), + author_display_name: __sdk::__query_builder::Col::new(table_name, "author_display_name"), published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), deleted_at: __sdk::__query_builder::Col::new(table_name, "deleted_at"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -97,8 +95,7 @@ impl __sdk::__query_builder::HasCols for CustomWorldProfile { pub struct CustomWorldProfileIxCols { pub owner_user_id: __sdk::__query_builder::IxCol, pub profile_id: __sdk::__query_builder::IxCol, - pub publication_status: - __sdk::__query_builder::IxCol, + pub publication_status: __sdk::__query_builder::IxCol, } impl __sdk::__query_builder::HasIxCols for CustomWorldProfile { @@ -107,12 +104,11 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldProfile { CustomWorldProfileIxCols { 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", - ), + publication_status: __sdk::__query_builder::IxCol::new(table_name, "publication_status"), + } } } impl __sdk::__query_builder::CanBeLookupTable for CustomWorldProfile {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_unpublish_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_unpublish_input_type.rs index 7d688d96..79aa9ff6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_unpublish_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_unpublish_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,6 +19,8 @@ pub struct CustomWorldProfileUnpublishInput { pub updated_at_micros: i64, } + impl __sdk::InModule for CustomWorldProfileUnpublishInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_upsert_input_type.rs index f9a00111..53761a14 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_profile_upsert_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_theme_mode_type::CustomWorldThemeMode; @@ -11,12 +16,12 @@ use super::custom_world_theme_mode_type::CustomWorldThemeMode; pub struct CustomWorldProfileUpsertInput { pub profile_id: String, pub owner_user_id: String, - pub source_agent_session_id: Option, + pub source_agent_session_id: Option::, pub world_name: String, pub subtitle: String, pub summary_text: String, pub theme_mode: CustomWorldThemeMode, - pub cover_image_src: Option, + pub cover_image_src: Option::, pub profile_payload_json: String, pub playable_npc_count: u32, pub landmark_count: u32, @@ -24,6 +29,8 @@ pub struct CustomWorldProfileUpsertInput { pub updated_at_micros: i64, } + impl __sdk::InModule for CustomWorldProfileUpsertInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publication_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publication_status_type.rs index f21186ff..d81681f4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publication_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publication_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum CustomWorldPublicationStatus { Draft, Published, + } + + impl __sdk::InModule for CustomWorldPublicationStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_input_type.rs index 206dffb9..f59454ef 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,12 +17,14 @@ pub struct CustomWorldPublishWorldInput { pub profile_id: String, pub owner_user_id: String, pub draft_profile_json: String, - pub legacy_result_profile_json: Option, + pub legacy_result_profile_json: Option::, pub setting_text: String, pub author_display_name: String, pub published_at_micros: i64, } + impl __sdk::InModule for CustomWorldPublishWorldInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_result_type.rs index a44ca2b1..542810a3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_publish_world_result_type.rs @@ -2,24 +2,31 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; -use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; use super::custom_world_published_profile_compile_snapshot_type::CustomWorldPublishedProfileCompileSnapshot; use super::rpg_agent_stage_type::RpgAgentStage; +use super::custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; +use super::custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct CustomWorldPublishWorldResult { pub ok: bool, - pub compiled_record: Option, - pub entry: Option, - pub gallery_entry: Option, - pub session_stage: Option, - pub error_message: Option, + pub compiled_record: Option::, + pub entry: Option::, + pub gallery_entry: Option::, + pub session_stage: Option::, + pub error_message: Option::, } + impl __sdk::InModule for CustomWorldPublishWorldResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_input_type.rs index fda3d08b..c78399a4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,12 +17,14 @@ pub struct CustomWorldPublishedProfileCompileInput { pub profile_id: String, pub owner_user_id: String, pub draft_profile_json: String, - pub legacy_result_profile_json: Option, + pub legacy_result_profile_json: Option::, pub setting_text: String, pub author_display_name: String, pub updated_at_micros: i64, } + impl __sdk::InModule for CustomWorldPublishedProfileCompileInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_result_type.rs index 4783f889..42d770b5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_published_profile_compile_snapshot_type::CustomWorldPublishedProfileCompileSnapshot; @@ -10,10 +15,12 @@ use super::custom_world_published_profile_compile_snapshot_type::CustomWorldPubl #[sats(crate = __lib)] pub struct CustomWorldPublishedProfileCompileResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for CustomWorldPublishedProfileCompileResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_snapshot_type.rs index 0af4d59e..9214b492 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_published_profile_compile_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_theme_mode_type::CustomWorldThemeMode; @@ -15,7 +20,7 @@ pub struct CustomWorldPublishedProfileCompileSnapshot { pub subtitle: String, pub summary_text: String, pub theme_mode: CustomWorldThemeMode, - pub cover_image_src: Option, + pub cover_image_src: Option::, pub playable_npc_count: u32, pub landmark_count: u32, pub author_display_name: String, @@ -23,6 +28,8 @@ pub struct CustomWorldPublishedProfileCompileSnapshot { pub updated_at_micros: i64, } + impl __sdk::InModule for CustomWorldPublishedProfileCompileSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_role_asset_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_role_asset_status_type.rs index 1ab238e9..a969aa55 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_role_asset_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_role_asset_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,8 +20,12 @@ pub enum CustomWorldRoleAssetStatus { AnimationsReady, Complete, + } + + impl __sdk::InModule for CustomWorldRoleAssetStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_status_type.rs index 9b640e4f..f7fe499d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum CustomWorldSessionStatus { Completed, GenerationError, + } + + impl __sdk::InModule for CustomWorldSessionStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_table.rs index 2813b6e2..4d44d0ff 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_table.rs @@ -2,10 +2,15 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; +use super::custom_world_session_type::CustomWorldSession; use super::custom_world_generation_mode_type::CustomWorldGenerationMode; use super::custom_world_session_status_type::CustomWorldSessionStatus; -use super::custom_world_session_type::CustomWorldSession; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `custom_world_session`. /// @@ -33,9 +38,7 @@ pub trait CustomWorldSessionTableAccess { impl CustomWorldSessionTableAccess for super::RemoteTables { fn custom_world_session(&self) -> CustomWorldSessionTableHandle<'_> { CustomWorldSessionTableHandle { - imp: self - .imp - .get_table::("custom_world_session"), + imp: self.imp.get_table::("custom_world_session"), ctx: std::marker::PhantomData, } } @@ -48,12 +51,8 @@ impl<'ctx> __sdk::Table for CustomWorldSessionTableHandle<'ctx> { type Row = CustomWorldSession; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = CustomWorldSessionInsertCallbackId; @@ -99,38 +98,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for CustomWorldSessionTableHandle<'ctx> { } } -/// Access to the `session_id` unique index on the table `custom_world_session`, -/// which allows point queries on the field of the same name -/// via the [`CustomWorldSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.custom_world_session().session_id().find(...)`. -pub struct CustomWorldSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> CustomWorldSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `custom_world_session`. - pub fn session_id(&self) -> CustomWorldSessionSessionIdUnique<'ctx> { - CustomWorldSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, + /// Access to the `session_id` unique index on the table `custom_world_session`, + /// which allows point queries on the field of the same name + /// via the [`CustomWorldSessionSessionIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.custom_world_session().session_id().find(...)`. + pub struct CustomWorldSessionSessionIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> CustomWorldSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} + impl<'ctx> CustomWorldSessionTableHandle<'ctx> { + /// Get a handle on the `session_id` unique index on the table `custom_world_session`. + pub fn session_id(&self) -> CustomWorldSessionSessionIdUnique<'ctx> { + CustomWorldSessionSessionIdUnique { + imp: self.imp.get_unique_constraint::("session_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> CustomWorldSessionSessionIdUnique<'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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("custom_world_session"); _table.add_unique_constraint::("session_id", |row| &row.session_id); } @@ -140,24 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `CustomWorldSession`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait custom_world_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `CustomWorldSession`. - fn custom_world_session(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `CustomWorldSession`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait custom_world_sessionQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `CustomWorldSession`. + fn custom_world_session(&self) -> __sdk::__query_builder::Table; + } + + impl custom_world_sessionQueryTableAccess for __sdk::QueryTableAccessor { + fn custom_world_session(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("custom_world_session") + } + } -impl custom_world_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn custom_world_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("custom_world_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_type.rs index 58e9f40c..2646073e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_session_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_generation_mode_type::CustomWorldGenerationMode; use super::custom_world_session_status_type::CustomWorldSessionStatus; @@ -15,18 +20,20 @@ pub struct CustomWorldSession { pub generation_mode: CustomWorldGenerationMode, pub status: CustomWorldSessionStatus, pub setting_text: String, - pub creator_intent_json: Option, + pub creator_intent_json: Option::, pub question_snapshot_json: String, - pub result_payload_json: Option, - pub last_error_message: Option, + pub result_payload_json: Option::, + pub last_error_message: Option::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for CustomWorldSession { type Module = super::RemoteModule; } + /// Column accessor struct for the table `CustomWorldSession`. /// /// Provides typed access to columns for query building. @@ -36,10 +43,10 @@ pub struct CustomWorldSessionCols { pub generation_mode: __sdk::__query_builder::Col, pub status: __sdk::__query_builder::Col, pub setting_text: __sdk::__query_builder::Col, - pub creator_intent_json: __sdk::__query_builder::Col>, + pub creator_intent_json: __sdk::__query_builder::Col>, pub question_snapshot_json: __sdk::__query_builder::Col, - pub result_payload_json: __sdk::__query_builder::Col>, - pub last_error_message: __sdk::__query_builder::Col>, + pub result_payload_json: __sdk::__query_builder::Col>, + pub last_error_message: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -53,21 +60,13 @@ impl __sdk::__query_builder::HasCols for CustomWorldSession { generation_mode: __sdk::__query_builder::Col::new(table_name, "generation_mode"), status: __sdk::__query_builder::Col::new(table_name, "status"), setting_text: __sdk::__query_builder::Col::new(table_name, "setting_text"), - creator_intent_json: __sdk::__query_builder::Col::new( - table_name, - "creator_intent_json", - ), - question_snapshot_json: __sdk::__query_builder::Col::new( - table_name, - "question_snapshot_json", - ), - result_payload_json: __sdk::__query_builder::Col::new( - table_name, - "result_payload_json", - ), + creator_intent_json: __sdk::__query_builder::Col::new(table_name, "creator_intent_json"), + question_snapshot_json: __sdk::__query_builder::Col::new(table_name, "question_snapshot_json"), + result_payload_json: __sdk::__query_builder::Col::new(table_name, "result_payload_json"), last_error_message: __sdk::__query_builder::Col::new(table_name, "last_error_message"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -86,8 +85,10 @@ impl __sdk::__query_builder::HasIxCols for CustomWorldSession { CustomWorldSessionIxCols { 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 CustomWorldSession {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_theme_mode_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_theme_mode_type.rs index 2084ea04..766d1d08 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_theme_mode_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_theme_mode_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +24,12 @@ pub enum CustomWorldThemeMode { Rift, Mythic, + } + + impl __sdk::InModule for CustomWorldThemeMode { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_work_summary_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_work_summary_snapshot_type.rs index ed735fc3..e81345b0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_work_summary_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_work_summary_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::rpg_agent_stage_type::RpgAgentStage; @@ -15,26 +20,28 @@ pub struct CustomWorldWorkSummarySnapshot { pub title: String, pub subtitle: String, pub summary: String, - pub cover_image_src: Option, - pub cover_render_mode: Option, + pub cover_image_src: Option::, + pub cover_render_mode: Option::, pub cover_character_image_srcs_json: String, pub updated_at_micros: i64, - pub published_at_micros: Option, - pub stage: Option, - pub stage_label: Option, + pub published_at_micros: Option::, + pub stage: Option::, + pub stage_label: Option::, pub playable_npc_count: u32, pub landmark_count: u32, - pub role_visual_ready_count: Option, - pub role_animation_ready_count: Option, - pub role_asset_summary_label: Option, - pub session_id: Option, - pub profile_id: Option, + pub role_visual_ready_count: Option::, + pub role_animation_ready_count: Option::, + pub role_asset_summary_label: Option::, + pub session_id: Option::, + pub profile_id: Option::, pub can_resume: bool, pub can_enter_world: bool, pub blocker_count: u32, pub publish_ready: bool, } + impl __sdk::InModule for CustomWorldWorkSummarySnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_input_type.rs index a007007b..073faecf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct CustomWorldWorksListInput { pub owner_user_id: String, } + impl __sdk::InModule for CustomWorldWorksListInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_result_type.rs index 9296740e..937b450e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/custom_world_works_list_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_work_summary_snapshot_type::CustomWorldWorkSummarySnapshot; @@ -10,10 +15,12 @@ use super::custom_world_work_summary_snapshot_type::CustomWorldWorkSummarySnapsh #[sats(crate = __lib)] pub struct CustomWorldWorksListResult { pub ok: bool, - pub items: Vec, - pub error_message: Option, + pub items: Vec::, + pub error_message: Option::, } + impl __sdk::InModule for CustomWorldWorksListResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/delete_custom_world_profile_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/delete_custom_world_profile_and_return_procedure.rs index 5dc9da2f..4dfc8daf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/delete_custom_world_profile_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/delete_custom_world_profile_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_profile_delete_input_type::CustomWorldProfileDeleteInput; use super::custom_world_profile_list_result_type::CustomWorldProfileListResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct DeleteCustomWorldProfileAndReturnArgs { + struct DeleteCustomWorldProfileAndReturnArgs { pub input: CustomWorldProfileDeleteInput, } + impl __sdk::InModule for DeleteCustomWorldProfileAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for DeleteCustomWorldProfileAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait delete_custom_world_profile_and_return { - fn delete_custom_world_profile_and_return(&self, input: CustomWorldProfileDeleteInput) { - self.delete_custom_world_profile_and_return_then(input, |_, _| {}); + fn delete_custom_world_profile_and_return(&self, input: CustomWorldProfileDeleteInput, +) { + self.delete_custom_world_profile_and_return_then(input, |_, _| {}); } fn delete_custom_world_profile_and_return_then( &self, input: CustomWorldProfileDeleteInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl delete_custom_world_profile_and_return for super::RemoteProcedures { &self, input: CustomWorldProfileDeleteInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldProfileListResult>( - "delete_custom_world_profile_and_return", - DeleteCustomWorldProfileAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldProfileListResult>( + "delete_custom_world_profile_and_return", + DeleteCustomWorldProfileAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/delete_runtime_snapshot_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/delete_runtime_snapshot_and_return_procedure.rs index 9173255a..6c38b74b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/delete_runtime_snapshot_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/delete_runtime_snapshot_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_snapshot_delete_input_type::RuntimeSnapshotDeleteInput; use super::runtime_snapshot_procedure_result_type::RuntimeSnapshotProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct DeleteRuntimeSnapshotAndReturnArgs { + struct DeleteRuntimeSnapshotAndReturnArgs { pub input: RuntimeSnapshotDeleteInput, } + impl __sdk::InModule for DeleteRuntimeSnapshotAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for DeleteRuntimeSnapshotAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait delete_runtime_snapshot_and_return { - fn delete_runtime_snapshot_and_return(&self, input: RuntimeSnapshotDeleteInput) { - self.delete_runtime_snapshot_and_return_then(input, |_, _| {}); + fn delete_runtime_snapshot_and_return(&self, input: RuntimeSnapshotDeleteInput, +) { + self.delete_runtime_snapshot_and_return_then(input, |_, _| {}); } fn delete_runtime_snapshot_and_return_then( &self, input: RuntimeSnapshotDeleteInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl delete_runtime_snapshot_and_return for super::RemoteProcedures { &self, input: RuntimeSnapshotDeleteInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( - "delete_runtime_snapshot_and_return", - DeleteRuntimeSnapshotAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( + "delete_runtime_snapshot_and_return", + DeleteRuntimeSnapshotAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/drag_puzzle_piece_or_group_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/drag_puzzle_piece_or_group_procedure.rs index 1207f7b5..49c4ee1c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/drag_puzzle_piece_or_group_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/drag_puzzle_piece_or_group_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::puzzle_run_drag_input_type::PuzzleRunDragInput; use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; +use super::puzzle_run_drag_input_type::PuzzleRunDragInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct DragPuzzlePieceOrGroupArgs { + struct DragPuzzlePieceOrGroupArgs { pub input: PuzzleRunDragInput, } + impl __sdk::InModule for DragPuzzlePieceOrGroupArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for DragPuzzlePieceOrGroupArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait drag_puzzle_piece_or_group { - fn drag_puzzle_piece_or_group(&self, input: PuzzleRunDragInput) { - self.drag_puzzle_piece_or_group_then(input, |_, _| {}); + fn drag_puzzle_piece_or_group(&self, input: PuzzleRunDragInput, +) { + self.drag_puzzle_piece_or_group_then(input, |_, _| {}); } fn drag_puzzle_piece_or_group_then( &self, input: PuzzleRunDragInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl drag_puzzle_piece_or_group for super::RemoteProcedures { &self, input: PuzzleRunDragInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( - "drag_puzzle_piece_or_group", - DragPuzzlePieceOrGroupArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( + "drag_puzzle_piece_or_group", + DragPuzzlePieceOrGroupArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/equip_inventory_item_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/equip_inventory_item_input_type.rs index 775ad7fa..19545699 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/equip_inventory_item_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/equip_inventory_item_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct EquipInventoryItemInput { pub slot_id: String, } + impl __sdk::InModule for EquipInventoryItemInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/execute_custom_world_agent_action_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/execute_custom_world_agent_action_procedure.rs index c1008466..390871f5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/execute_custom_world_agent_action_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/execute_custom_world_agent_action_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_agent_action_execute_input_type::CustomWorldAgentActionExecuteInput; use super::custom_world_agent_action_execute_result_type::CustomWorldAgentActionExecuteResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ExecuteCustomWorldAgentActionArgs { + struct ExecuteCustomWorldAgentActionArgs { pub input: CustomWorldAgentActionExecuteInput, } + impl __sdk::InModule for ExecuteCustomWorldAgentActionArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ExecuteCustomWorldAgentActionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait execute_custom_world_agent_action { - fn execute_custom_world_agent_action(&self, input: CustomWorldAgentActionExecuteInput) { - self.execute_custom_world_agent_action_then(input, |_, _| {}); + fn execute_custom_world_agent_action(&self, input: CustomWorldAgentActionExecuteInput, +) { + self.execute_custom_world_agent_action_then(input, |_, _| {}); } fn execute_custom_world_agent_action_then( &self, input: CustomWorldAgentActionExecuteInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl execute_custom_world_agent_action for super::RemoteProcedures { &self, input: CustomWorldAgentActionExecuteInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldAgentActionExecuteResult>( - "execute_custom_world_agent_action", - ExecuteCustomWorldAgentActionArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentActionExecuteResult>( + "execute_custom_world_agent_action", + ExecuteCustomWorldAgentActionArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/fail_ai_task_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/fail_ai_task_and_return_procedure.rs index 3194799b..b92e796d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/fail_ai_task_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/fail_ai_task_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::ai_task_failure_input_type::AiTaskFailureInput; use super::ai_task_procedure_result_type::AiTaskProcedureResult; +use super::ai_task_failure_input_type::AiTaskFailureInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct FailAiTaskAndReturnArgs { + struct FailAiTaskAndReturnArgs { pub input: AiTaskFailureInput, } + impl __sdk::InModule for FailAiTaskAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for FailAiTaskAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait fail_ai_task_and_return { - fn fail_ai_task_and_return(&self, input: AiTaskFailureInput) { - self.fail_ai_task_and_return_then(input, |_, _| {}); + fn fail_ai_task_and_return(&self, input: AiTaskFailureInput, +) { + self.fail_ai_task_and_return_then(input, |_, _| {}); } fn fail_ai_task_and_return_then( &self, input: AiTaskFailureInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl fail_ai_task_and_return for super::RemoteProcedures { &self, input: AiTaskFailureInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, AiTaskProcedureResult>( - "fail_ai_task_and_return", - FailAiTaskAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, AiTaskProcedureResult>( + "fail_ai_task_and_return", + FailAiTaskAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/finalize_custom_world_agent_message_turn_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/finalize_custom_world_agent_message_turn_procedure.rs new file mode 100644 index 00000000..e9b3f1d9 --- /dev/null +++ b/server-rs/crates/spacetime-client/src/module_bindings/finalize_custom_world_agent_message_turn_procedure.rs @@ -0,0 +1,58 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + +use super::custom_world_agent_message_finalize_input_type::CustomWorldAgentMessageFinalizeInput; +use super::custom_world_agent_operation_procedure_result_type::CustomWorldAgentOperationProcedureResult; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] + struct FinalizeCustomWorldAgentMessageTurnArgs { + pub input: CustomWorldAgentMessageFinalizeInput, +} + + +impl __sdk::InModule for FinalizeCustomWorldAgentMessageTurnArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the procedure `finalize_custom_world_agent_message_turn`. +/// +/// Implemented for [`super::RemoteProcedures`]. +pub trait finalize_custom_world_agent_message_turn { + fn finalize_custom_world_agent_message_turn(&self, input: CustomWorldAgentMessageFinalizeInput, +) { + self.finalize_custom_world_agent_message_turn_then(input, |_, _| {}); + } + + fn finalize_custom_world_agent_message_turn_then( + &self, + input: CustomWorldAgentMessageFinalizeInput, + + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + ); +} + +impl finalize_custom_world_agent_message_turn for super::RemoteProcedures { + fn finalize_custom_world_agent_message_turn_then( + &self, + input: CustomWorldAgentMessageFinalizeInput, + + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, + ) { + self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>( + "finalize_custom_world_agent_message_turn", + FinalizeCustomWorldAgentMessageTurnArgs { input, }, + __callback, + ); + } +} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/generate_big_fish_asset_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/generate_big_fish_asset_procedure.rs index 144c5d40..6ee820f7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/generate_big_fish_asset_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/generate_big_fish_asset_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::big_fish_asset_generate_input_type::BigFishAssetGenerateInput; use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; +use super::big_fish_asset_generate_input_type::BigFishAssetGenerateInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GenerateBigFishAssetArgs { + struct GenerateBigFishAssetArgs { pub input: BigFishAssetGenerateInput, } + impl __sdk::InModule for GenerateBigFishAssetArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GenerateBigFishAssetArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait generate_big_fish_asset { - fn generate_big_fish_asset(&self, input: BigFishAssetGenerateInput) { - self.generate_big_fish_asset_then(input, |_, _| {}); + fn generate_big_fish_asset(&self, input: BigFishAssetGenerateInput, +) { + self.generate_big_fish_asset_then(input, |_, _| {}); } fn generate_big_fish_asset_then( &self, input: BigFishAssetGenerateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl generate_big_fish_asset for super::RemoteProcedures { &self, input: BigFishAssetGenerateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "generate_big_fish_asset", - GenerateBigFishAssetArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "generate_big_fish_asset", + GenerateBigFishAssetArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_battle_state_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_battle_state_procedure.rs index 0fcc276c..c6f93416 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_battle_state_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_battle_state_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::battle_state_procedure_result_type::BattleStateProcedureResult; use super::battle_state_query_input_type::BattleStateQueryInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetBattleStateArgs { + struct GetBattleStateArgs { pub input: BattleStateQueryInput, } + impl __sdk::InModule for GetBattleStateArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetBattleStateArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_battle_state { - fn get_battle_state(&self, input: BattleStateQueryInput) { - self.get_battle_state_then(input, |_, _| {}); + fn get_battle_state(&self, input: BattleStateQueryInput, +) { + self.get_battle_state_then(input, |_, _| {}); } fn get_battle_state_then( &self, input: BattleStateQueryInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_battle_state for super::RemoteProcedures { &self, input: BattleStateQueryInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BattleStateProcedureResult>( - "get_battle_state", - GetBattleStateArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BattleStateProcedureResult>( + "get_battle_state", + GetBattleStateArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_run_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_run_procedure.rs index 9a601ff2..a16bbc76 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_run_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_run_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_run_get_input_type::BigFishRunGetInput; use super::big_fish_run_procedure_result_type::BigFishRunProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetBigFishRunArgs { + struct GetBigFishRunArgs { pub input: BigFishRunGetInput, } + impl __sdk::InModule for GetBigFishRunArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetBigFishRunArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_big_fish_run { - fn get_big_fish_run(&self, input: BigFishRunGetInput) { - self.get_big_fish_run_then(input, |_, _| {}); + fn get_big_fish_run(&self, input: BigFishRunGetInput, +) { + self.get_big_fish_run_then(input, |_, _| {}); } fn get_big_fish_run_then( &self, input: BigFishRunGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_big_fish_run for super::RemoteProcedures { &self, input: BigFishRunGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( - "get_big_fish_run", - GetBigFishRunArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( + "get_big_fish_run", + GetBigFishRunArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_session_procedure.rs index 7f52f94b..f54dc9e4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_big_fish_session_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::big_fish_session_get_input_type::BigFishSessionGetInput; use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; +use super::big_fish_session_get_input_type::BigFishSessionGetInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetBigFishSessionArgs { + struct GetBigFishSessionArgs { pub input: BigFishSessionGetInput, } + impl __sdk::InModule for GetBigFishSessionArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetBigFishSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_big_fish_session { - fn get_big_fish_session(&self, input: BigFishSessionGetInput) { - self.get_big_fish_session_then(input, |_, _| {}); + fn get_big_fish_session(&self, input: BigFishSessionGetInput, +) { + self.get_big_fish_session_then(input, |_, _| {}); } fn get_big_fish_session_then( &self, input: BigFishSessionGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_big_fish_session for super::RemoteProcedures { &self, input: BigFishSessionGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "get_big_fish_session", - GetBigFishSessionArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "get_big_fish_session", + GetBigFishSessionArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_chapter_progression_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_chapter_progression_procedure.rs index 18f9ae27..dc75dc77 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_chapter_progression_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_chapter_progression_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::chapter_progression_get_input_type::ChapterProgressionGetInput; use super::chapter_progression_procedure_result_type::ChapterProgressionProcedureResult; +use super::chapter_progression_get_input_type::ChapterProgressionGetInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetChapterProgressionArgs { + struct GetChapterProgressionArgs { pub input: ChapterProgressionGetInput, } + impl __sdk::InModule for GetChapterProgressionArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetChapterProgressionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_chapter_progression { - fn get_chapter_progression(&self, input: ChapterProgressionGetInput) { - self.get_chapter_progression_then(input, |_, _| {}); + fn get_chapter_progression(&self, input: ChapterProgressionGetInput, +) { + self.get_chapter_progression_then(input, |_, _| {}); } fn get_chapter_progression_then( &self, input: ChapterProgressionGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_chapter_progression for super::RemoteProcedures { &self, input: ChapterProgressionGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( - "get_chapter_progression", - GetChapterProgressionArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( + "get_chapter_progression", + GetChapterProgressionArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_card_detail_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_card_detail_procedure.rs index e1034345..f0e38f3b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_card_detail_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_card_detail_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_agent_card_detail_get_input_type::CustomWorldAgentCardDetailGetInput; use super::custom_world_draft_card_detail_result_type::CustomWorldDraftCardDetailResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetCustomWorldAgentCardDetailArgs { + struct GetCustomWorldAgentCardDetailArgs { pub input: CustomWorldAgentCardDetailGetInput, } + impl __sdk::InModule for GetCustomWorldAgentCardDetailArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetCustomWorldAgentCardDetailArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_custom_world_agent_card_detail { - fn get_custom_world_agent_card_detail(&self, input: CustomWorldAgentCardDetailGetInput) { - self.get_custom_world_agent_card_detail_then(input, |_, _| {}); + fn get_custom_world_agent_card_detail(&self, input: CustomWorldAgentCardDetailGetInput, +) { + self.get_custom_world_agent_card_detail_then(input, |_, _| {}); } fn get_custom_world_agent_card_detail_then( &self, input: CustomWorldAgentCardDetailGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_custom_world_agent_card_detail for super::RemoteProcedures { &self, input: CustomWorldAgentCardDetailGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldDraftCardDetailResult>( - "get_custom_world_agent_card_detail", - GetCustomWorldAgentCardDetailArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldDraftCardDetailResult>( + "get_custom_world_agent_card_detail", + GetCustomWorldAgentCardDetailArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_operation_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_operation_procedure.rs index cce1dbb5..45ffda03 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_operation_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_operation_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_agent_operation_get_input_type::CustomWorldAgentOperationGetInput; use super::custom_world_agent_operation_procedure_result_type::CustomWorldAgentOperationProcedureResult; +use super::custom_world_agent_operation_get_input_type::CustomWorldAgentOperationGetInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetCustomWorldAgentOperationArgs { + struct GetCustomWorldAgentOperationArgs { pub input: CustomWorldAgentOperationGetInput, } + impl __sdk::InModule for GetCustomWorldAgentOperationArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetCustomWorldAgentOperationArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_custom_world_agent_operation { - fn get_custom_world_agent_operation(&self, input: CustomWorldAgentOperationGetInput) { - self.get_custom_world_agent_operation_then(input, |_, _| {}); + fn get_custom_world_agent_operation(&self, input: CustomWorldAgentOperationGetInput, +) { + self.get_custom_world_agent_operation_then(input, |_, _| {}); } fn get_custom_world_agent_operation_then( &self, input: CustomWorldAgentOperationGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_custom_world_agent_operation for super::RemoteProcedures { &self, input: CustomWorldAgentOperationGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>( - "get_custom_world_agent_operation", - GetCustomWorldAgentOperationArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>( + "get_custom_world_agent_operation", + GetCustomWorldAgentOperationArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_session_procedure.rs index f4b678e9..e1660a95 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_agent_session_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_agent_session_get_input_type::CustomWorldAgentSessionGetInput; use super::custom_world_agent_session_procedure_result_type::CustomWorldAgentSessionProcedureResult; +use super::custom_world_agent_session_get_input_type::CustomWorldAgentSessionGetInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetCustomWorldAgentSessionArgs { + struct GetCustomWorldAgentSessionArgs { pub input: CustomWorldAgentSessionGetInput, } + impl __sdk::InModule for GetCustomWorldAgentSessionArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetCustomWorldAgentSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_custom_world_agent_session { - fn get_custom_world_agent_session(&self, input: CustomWorldAgentSessionGetInput) { - self.get_custom_world_agent_session_then(input, |_, _| {}); + fn get_custom_world_agent_session(&self, input: CustomWorldAgentSessionGetInput, +) { + self.get_custom_world_agent_session_then(input, |_, _| {}); } fn get_custom_world_agent_session_then( &self, input: CustomWorldAgentSessionGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_custom_world_agent_session for super::RemoteProcedures { &self, input: CustomWorldAgentSessionGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldAgentSessionProcedureResult>( - "get_custom_world_agent_session", - GetCustomWorldAgentSessionArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentSessionProcedureResult>( + "get_custom_world_agent_session", + GetCustomWorldAgentSessionArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_gallery_detail_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_gallery_detail_procedure.rs index d0e029ff..79050c11 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_gallery_detail_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_gallery_detail_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_gallery_detail_input_type::CustomWorldGalleryDetailInput; use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetCustomWorldGalleryDetailArgs { + struct GetCustomWorldGalleryDetailArgs { pub input: CustomWorldGalleryDetailInput, } + impl __sdk::InModule for GetCustomWorldGalleryDetailArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetCustomWorldGalleryDetailArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_custom_world_gallery_detail { - fn get_custom_world_gallery_detail(&self, input: CustomWorldGalleryDetailInput) { - self.get_custom_world_gallery_detail_then(input, |_, _| {}); + fn get_custom_world_gallery_detail(&self, input: CustomWorldGalleryDetailInput, +) { + self.get_custom_world_gallery_detail_then(input, |_, _| {}); } fn get_custom_world_gallery_detail_then( &self, input: CustomWorldGalleryDetailInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_custom_world_gallery_detail for super::RemoteProcedures { &self, input: CustomWorldGalleryDetailInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( - "get_custom_world_gallery_detail", - GetCustomWorldGalleryDetailArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( + "get_custom_world_gallery_detail", + GetCustomWorldGalleryDetailArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_library_detail_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_library_detail_procedure.rs index 82bd1c3c..175758c2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_library_detail_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_custom_world_library_detail_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_library_detail_input_type::CustomWorldLibraryDetailInput; use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; +use super::custom_world_library_detail_input_type::CustomWorldLibraryDetailInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetCustomWorldLibraryDetailArgs { + struct GetCustomWorldLibraryDetailArgs { pub input: CustomWorldLibraryDetailInput, } + impl __sdk::InModule for GetCustomWorldLibraryDetailArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetCustomWorldLibraryDetailArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_custom_world_library_detail { - fn get_custom_world_library_detail(&self, input: CustomWorldLibraryDetailInput) { - self.get_custom_world_library_detail_then(input, |_, _| {}); + fn get_custom_world_library_detail(&self, input: CustomWorldLibraryDetailInput, +) { + self.get_custom_world_library_detail_then(input, |_, _| {}); } fn get_custom_world_library_detail_then( &self, input: CustomWorldLibraryDetailInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_custom_world_library_detail for super::RemoteProcedures { &self, input: CustomWorldLibraryDetailInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( - "get_custom_world_library_detail", - GetCustomWorldLibraryDetailArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( + "get_custom_world_library_detail", + GetCustomWorldLibraryDetailArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_player_progression_or_default_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_player_progression_or_default_procedure.rs index 38a1525a..73490884 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_player_progression_or_default_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_player_progression_or_default_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::player_progression_get_input_type::PlayerProgressionGetInput; use super::player_progression_procedure_result_type::PlayerProgressionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetPlayerProgressionOrDefaultArgs { + struct GetPlayerProgressionOrDefaultArgs { pub input: PlayerProgressionGetInput, } + impl __sdk::InModule for GetPlayerProgressionOrDefaultArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetPlayerProgressionOrDefaultArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_player_progression_or_default { - fn get_player_progression_or_default(&self, input: PlayerProgressionGetInput) { - self.get_player_progression_or_default_then(input, |_, _| {}); + fn get_player_progression_or_default(&self, input: PlayerProgressionGetInput, +) { + self.get_player_progression_or_default_then(input, |_, _| {}); } fn get_player_progression_or_default_then( &self, input: PlayerProgressionGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_player_progression_or_default for super::RemoteProcedures { &self, input: PlayerProgressionGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PlayerProgressionProcedureResult>( - "get_player_progression_or_default", - GetPlayerProgressionOrDefaultArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PlayerProgressionProcedureResult>( + "get_player_progression_or_default", + GetPlayerProgressionOrDefaultArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_dashboard_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_dashboard_procedure.rs index 6c48fafb..616a11b8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_dashboard_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_dashboard_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_dashboard_get_input_type::RuntimeProfileDashboardGetInput; use super::runtime_profile_dashboard_procedure_result_type::RuntimeProfileDashboardProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetProfileDashboardArgs { + struct GetProfileDashboardArgs { pub input: RuntimeProfileDashboardGetInput, } + impl __sdk::InModule for GetProfileDashboardArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetProfileDashboardArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_profile_dashboard { - fn get_profile_dashboard(&self, input: RuntimeProfileDashboardGetInput) { - self.get_profile_dashboard_then(input, |_, _| {}); + fn get_profile_dashboard(&self, input: RuntimeProfileDashboardGetInput, +) { + self.get_profile_dashboard_then(input, |_, _| {}); } fn get_profile_dashboard_then( &self, input: RuntimeProfileDashboardGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_profile_dashboard for super::RemoteProcedures { &self, input: RuntimeProfileDashboardGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeProfileDashboardProcedureResult>( - "get_profile_dashboard", - GetProfileDashboardArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeProfileDashboardProcedureResult>( + "get_profile_dashboard", + GetProfileDashboardArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_play_stats_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_play_stats_procedure.rs index 088f4812..466c6902 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_profile_play_stats_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_profile_play_stats_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_play_stats_get_input_type::RuntimeProfilePlayStatsGetInput; use super::runtime_profile_play_stats_procedure_result_type::RuntimeProfilePlayStatsProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetProfilePlayStatsArgs { + struct GetProfilePlayStatsArgs { pub input: RuntimeProfilePlayStatsGetInput, } + impl __sdk::InModule for GetProfilePlayStatsArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetProfilePlayStatsArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_profile_play_stats { - fn get_profile_play_stats(&self, input: RuntimeProfilePlayStatsGetInput) { - self.get_profile_play_stats_then(input, |_, _| {}); + fn get_profile_play_stats(&self, input: RuntimeProfilePlayStatsGetInput, +) { + self.get_profile_play_stats_then(input, |_, _| {}); } fn get_profile_play_stats_then( &self, input: RuntimeProfilePlayStatsGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_profile_play_stats for super::RemoteProcedures { &self, input: RuntimeProfilePlayStatsGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeProfilePlayStatsProcedureResult>( - "get_profile_play_stats", - GetProfilePlayStatsArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeProfilePlayStatsProcedureResult>( + "get_profile_play_stats", + GetProfilePlayStatsArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_agent_session_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_agent_session_procedure.rs index 8aa5a78f..8946764b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_agent_session_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_agent_session_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::puzzle_agent_session_get_input_type::PuzzleAgentSessionGetInput; use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; +use super::puzzle_agent_session_get_input_type::PuzzleAgentSessionGetInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetPuzzleAgentSessionArgs { + struct GetPuzzleAgentSessionArgs { pub input: PuzzleAgentSessionGetInput, } + impl __sdk::InModule for GetPuzzleAgentSessionArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetPuzzleAgentSessionArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_puzzle_agent_session { - fn get_puzzle_agent_session(&self, input: PuzzleAgentSessionGetInput) { - self.get_puzzle_agent_session_then(input, |_, _| {}); + fn get_puzzle_agent_session(&self, input: PuzzleAgentSessionGetInput, +) { + self.get_puzzle_agent_session_then(input, |_, _| {}); } fn get_puzzle_agent_session_then( &self, input: PuzzleAgentSessionGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_puzzle_agent_session for super::RemoteProcedures { &self, input: PuzzleAgentSessionGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "get_puzzle_agent_session", - GetPuzzleAgentSessionArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "get_puzzle_agent_session", + GetPuzzleAgentSessionArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_gallery_detail_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_gallery_detail_procedure.rs index 85b70081..0c78ac7c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_gallery_detail_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_gallery_detail_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_work_get_input_type::PuzzleWorkGetInput; use super::puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetPuzzleGalleryDetailArgs { + struct GetPuzzleGalleryDetailArgs { pub input: PuzzleWorkGetInput, } + impl __sdk::InModule for GetPuzzleGalleryDetailArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetPuzzleGalleryDetailArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_puzzle_gallery_detail { - fn get_puzzle_gallery_detail(&self, input: PuzzleWorkGetInput) { - self.get_puzzle_gallery_detail_then(input, |_, _| {}); + fn get_puzzle_gallery_detail(&self, input: PuzzleWorkGetInput, +) { + self.get_puzzle_gallery_detail_then(input, |_, _| {}); } fn get_puzzle_gallery_detail_then( &self, input: PuzzleWorkGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_puzzle_gallery_detail for super::RemoteProcedures { &self, input: PuzzleWorkGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( - "get_puzzle_gallery_detail", - GetPuzzleGalleryDetailArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( + "get_puzzle_gallery_detail", + GetPuzzleGalleryDetailArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_run_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_run_procedure.rs index d09fc285..c409b79d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_run_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_run_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::puzzle_run_get_input_type::PuzzleRunGetInput; use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; +use super::puzzle_run_get_input_type::PuzzleRunGetInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetPuzzleRunArgs { + struct GetPuzzleRunArgs { pub input: PuzzleRunGetInput, } + impl __sdk::InModule for GetPuzzleRunArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetPuzzleRunArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_puzzle_run { - fn get_puzzle_run(&self, input: PuzzleRunGetInput) { - self.get_puzzle_run_then(input, |_, _| {}); + fn get_puzzle_run(&self, input: PuzzleRunGetInput, +) { + self.get_puzzle_run_then(input, |_, _| {}); } fn get_puzzle_run_then( &self, input: PuzzleRunGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_puzzle_run for super::RemoteProcedures { &self, input: PuzzleRunGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( - "get_puzzle_run", - GetPuzzleRunArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( + "get_puzzle_run", + GetPuzzleRunArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_work_detail_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_work_detail_procedure.rs index 0d6c4f70..c21d1048 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_work_detail_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_puzzle_work_detail_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_work_get_input_type::PuzzleWorkGetInput; use super::puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetPuzzleWorkDetailArgs { + struct GetPuzzleWorkDetailArgs { pub input: PuzzleWorkGetInput, } + impl __sdk::InModule for GetPuzzleWorkDetailArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetPuzzleWorkDetailArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_puzzle_work_detail { - fn get_puzzle_work_detail(&self, input: PuzzleWorkGetInput) { - self.get_puzzle_work_detail_then(input, |_, _| {}); + fn get_puzzle_work_detail(&self, input: PuzzleWorkGetInput, +) { + self.get_puzzle_work_detail_then(input, |_, _| {}); } fn get_puzzle_work_detail_then( &self, input: PuzzleWorkGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_puzzle_work_detail for super::RemoteProcedures { &self, input: PuzzleWorkGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( - "get_puzzle_work_detail", - GetPuzzleWorkDetailArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( + "get_puzzle_work_detail", + GetPuzzleWorkDetailArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_inventory_state_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_inventory_state_procedure.rs index c8dfefac..d5137496 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_inventory_state_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_inventory_state_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::runtime_inventory_state_procedure_result_type::RuntimeInventoryStateProcedureResult; use super::runtime_inventory_state_query_input_type::RuntimeInventoryStateQueryInput; +use super::runtime_inventory_state_procedure_result_type::RuntimeInventoryStateProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetRuntimeInventoryStateArgs { + struct GetRuntimeInventoryStateArgs { pub input: RuntimeInventoryStateQueryInput, } + impl __sdk::InModule for GetRuntimeInventoryStateArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetRuntimeInventoryStateArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_runtime_inventory_state { - fn get_runtime_inventory_state(&self, input: RuntimeInventoryStateQueryInput) { - self.get_runtime_inventory_state_then(input, |_, _| {}); + fn get_runtime_inventory_state(&self, input: RuntimeInventoryStateQueryInput, +) { + self.get_runtime_inventory_state_then(input, |_, _| {}); } fn get_runtime_inventory_state_then( &self, input: RuntimeInventoryStateQueryInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_runtime_inventory_state for super::RemoteProcedures { &self, input: RuntimeInventoryStateQueryInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeInventoryStateProcedureResult>( - "get_runtime_inventory_state", - GetRuntimeInventoryStateArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeInventoryStateProcedureResult>( + "get_runtime_inventory_state", + GetRuntimeInventoryStateArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_setting_or_default_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_setting_or_default_procedure.rs index 4ca8b03e..a58e515c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_setting_or_default_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_setting_or_default_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_setting_get_input_type::RuntimeSettingGetInput; use super::runtime_setting_procedure_result_type::RuntimeSettingProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetRuntimeSettingOrDefaultArgs { + struct GetRuntimeSettingOrDefaultArgs { pub input: RuntimeSettingGetInput, } + impl __sdk::InModule for GetRuntimeSettingOrDefaultArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetRuntimeSettingOrDefaultArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_runtime_setting_or_default { - fn get_runtime_setting_or_default(&self, input: RuntimeSettingGetInput) { - self.get_runtime_setting_or_default_then(input, |_, _| {}); + fn get_runtime_setting_or_default(&self, input: RuntimeSettingGetInput, +) { + self.get_runtime_setting_or_default_then(input, |_, _| {}); } fn get_runtime_setting_or_default_then( &self, input: RuntimeSettingGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_runtime_setting_or_default for super::RemoteProcedures { &self, input: RuntimeSettingGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeSettingProcedureResult>( - "get_runtime_setting_or_default", - GetRuntimeSettingOrDefaultArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeSettingProcedureResult>( + "get_runtime_setting_or_default", + GetRuntimeSettingOrDefaultArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_snapshot_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_snapshot_procedure.rs index 7f9feb4f..75117d98 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_snapshot_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_runtime_snapshot_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::runtime_snapshot_get_input_type::RuntimeSnapshotGetInput; use super::runtime_snapshot_procedure_result_type::RuntimeSnapshotProcedureResult; +use super::runtime_snapshot_get_input_type::RuntimeSnapshotGetInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetRuntimeSnapshotArgs { + struct GetRuntimeSnapshotArgs { pub input: RuntimeSnapshotGetInput, } + impl __sdk::InModule for GetRuntimeSnapshotArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetRuntimeSnapshotArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_runtime_snapshot { - fn get_runtime_snapshot(&self, input: RuntimeSnapshotGetInput) { - self.get_runtime_snapshot_then(input, |_, _| {}); + fn get_runtime_snapshot(&self, input: RuntimeSnapshotGetInput, +) { + self.get_runtime_snapshot_then(input, |_, _| {}); } fn get_runtime_snapshot_then( &self, input: RuntimeSnapshotGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_runtime_snapshot for super::RemoteProcedures { &self, input: RuntimeSnapshotGetInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( - "get_runtime_snapshot", - GetRuntimeSnapshotArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( + "get_runtime_snapshot", + GetRuntimeSnapshotArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/get_story_session_state_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/get_story_session_state_procedure.rs index 44b48ada..b454ab5d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/get_story_session_state_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/get_story_session_state_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::story_session_state_input_type::StorySessionStateInput; use super::story_session_state_procedure_result_type::StorySessionStateProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GetStorySessionStateArgs { + struct GetStorySessionStateArgs { pub input: StorySessionStateInput, } + impl __sdk::InModule for GetStorySessionStateArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GetStorySessionStateArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait get_story_session_state { - fn get_story_session_state(&self, input: StorySessionStateInput) { - self.get_story_session_state_then(input, |_, _| {}); + fn get_story_session_state(&self, input: StorySessionStateInput, +) { + self.get_story_session_state_then(input, |_, _| {}); } fn get_story_session_state_then( &self, input: StorySessionStateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl get_story_session_state for super::RemoteProcedures { &self, input: StorySessionStateInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, StorySessionStateProcedureResult>( - "get_story_session_state", - GetStorySessionStateArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, StorySessionStateProcedureResult>( + "get_story_session_state", + GetStorySessionStateArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/grant_inventory_item_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/grant_inventory_item_input_type.rs index 553aff65..c9389060 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/grant_inventory_item_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/grant_inventory_item_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::inventory_item_snapshot_type::InventoryItemSnapshot; @@ -13,6 +18,8 @@ pub struct GrantInventoryItemInput { pub item: InventoryItemSnapshot, } + impl __sdk::InModule for GrantInventoryItemInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_and_return_procedure.rs index a3f2aa9e..04e0ae9a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::player_progression_grant_input_type::PlayerProgressionGrantInput; use super::player_progression_procedure_result_type::PlayerProgressionProcedureResult; +use super::player_progression_grant_input_type::PlayerProgressionGrantInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct GrantPlayerProgressionExperienceAndReturnArgs { + struct GrantPlayerProgressionExperienceAndReturnArgs { pub input: PlayerProgressionGrantInput, } + impl __sdk::InModule for GrantPlayerProgressionExperienceAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for GrantPlayerProgressionExperienceAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait grant_player_progression_experience_and_return { - fn grant_player_progression_experience_and_return(&self, input: PlayerProgressionGrantInput) { - self.grant_player_progression_experience_and_return_then(input, |_, _| {}); + fn grant_player_progression_experience_and_return(&self, input: PlayerProgressionGrantInput, +) { + self.grant_player_progression_experience_and_return_then(input, |_, _| {}); } fn grant_player_progression_experience_and_return_then( &self, input: PlayerProgressionGrantInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl grant_player_progression_experience_and_return for super::RemoteProcedures &self, input: PlayerProgressionGrantInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PlayerProgressionProcedureResult>( - "grant_player_progression_experience_and_return", - GrantPlayerProgressionExperienceAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PlayerProgressionProcedureResult>( + "grant_player_progression_experience_and_return", + GrantPlayerProgressionExperienceAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_reducer.rs index bd07115e..324bb57f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/grant_player_progression_experience_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::player_progression_grant_input_type::PlayerProgressionGrantInput; @@ -14,8 +19,10 @@ pub(super) struct GrantPlayerProgressionExperienceArgs { impl From for super::Reducer { fn from(args: GrantPlayerProgressionExperienceArgs) -> Self { - Self::GrantPlayerProgressionExperience { input: args.input } - } + Self::GrantPlayerProgressionExperience { + input: args.input, +} +} } impl __sdk::InModule for GrantPlayerProgressionExperienceArgs { @@ -33,11 +40,9 @@ pub trait grant_player_progression_experience { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`grant_player_progression_experience:grant_player_progression_experience_then`] to run a callback after the reducer completes. - fn grant_player_progression_experience( - &self, - input: PlayerProgressionGrantInput, - ) -> __sdk::Result<()> { - self.grant_player_progression_experience_then(input, |_, _| {}) + fn grant_player_progression_experience(&self, input: PlayerProgressionGrantInput, +) -> __sdk::Result<()> { + self.grant_player_progression_experience_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `grant_player_progression_experience` to run as soon as possible, @@ -50,11 +55,9 @@ pub trait grant_player_progression_experience { &self, input: PlayerProgressionGrantInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -63,13 +66,11 @@ impl grant_player_progression_experience for super::RemoteReducers { &self, input: PlayerProgressionGrantInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(GrantPlayerProgressionExperienceArgs { input }, callback) + self.imp.invoke_reducer_with_callback(GrantPlayerProgressionExperienceArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_container_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_container_kind_type.rs index 45522ce7..23de3559 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_container_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_container_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum InventoryContainerKind { Backpack, Equipment, + } + + impl __sdk::InModule for InventoryContainerKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_equipment_slot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_equipment_slot_type.rs index e2055f6a..81154f9f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_equipment_slot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_equipment_slot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum InventoryEquipmentSlot { Armor, Relic, + } + + impl __sdk::InModule for InventoryEquipmentSlot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_rarity_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_rarity_type.rs index 85b46090..e277c402 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_rarity_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_rarity_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum InventoryItemRarity { Epic, Legendary, + } + + impl __sdk::InModule for InventoryItemRarity { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_snapshot_type.rs index 3769735e..7e962e4d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_snapshot_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::inventory_equipment_slot_type::InventoryEquipmentSlot; use super::inventory_item_rarity_type::InventoryItemRarity; +use super::inventory_equipment_slot_type::InventoryEquipmentSlot; use super::inventory_item_source_kind_type::InventoryItemSourceKind; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] @@ -14,17 +19,19 @@ pub struct InventoryItemSnapshot { pub item_id: String, pub category: String, pub name: String, - pub description: Option, + pub description: Option::, pub quantity: u32, pub rarity: InventoryItemRarity, - pub tags: Vec, + pub tags: Vec::, pub stackable: bool, pub stack_key: String, - pub equipment_slot_id: Option, + pub equipment_slot_id: Option::, pub source_kind: InventoryItemSourceKind, - pub source_reference_id: Option, + pub source_reference_id: Option::, } + impl __sdk::InModule for InventoryItemSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_source_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_source_kind_type.rs index 1d3961bc..5303c581 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_source_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_item_source_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -25,8 +30,12 @@ pub enum InventoryItemSourceKind { ForgeReforge, ManualPatch, + } + + impl __sdk::InModule for InventoryItemSourceKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_input_type.rs index 3540ad3b..c696e383 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::inventory_mutation_type::InventoryMutation; @@ -11,12 +16,14 @@ use super::inventory_mutation_type::InventoryMutation; pub struct InventoryMutationInput { pub mutation_id: String, pub runtime_session_id: String, - pub story_session_id: Option, + pub story_session_id: Option::, pub actor_user_id: String, pub mutation: InventoryMutation, pub updated_at_micros: i64, } + impl __sdk::InModule for InventoryMutationInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_type.rs index 3d0d0e4f..d7b64029 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_mutation_type.rs @@ -2,11 +2,16 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; +use super::grant_inventory_item_input_type::GrantInventoryItemInput; use super::consume_inventory_item_input_type::ConsumeInventoryItemInput; use super::equip_inventory_item_input_type::EquipInventoryItemInput; -use super::grant_inventory_item_input_type::GrantInventoryItemInput; use super::unequip_inventory_item_input_type::UnequipInventoryItemInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] @@ -19,8 +24,12 @@ pub enum InventoryMutation { EquipItem(EquipInventoryItemInput), UnequipItem(UnequipInventoryItemInput), + } + + impl __sdk::InModule for InventoryMutation { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_snapshot_type.rs index f20e5451..4ce26de5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_snapshot_type.rs @@ -2,38 +2,45 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::inventory_container_kind_type::InventoryContainerKind; -use super::inventory_equipment_slot_type::InventoryEquipmentSlot; use super::inventory_item_rarity_type::InventoryItemRarity; +use super::inventory_equipment_slot_type::InventoryEquipmentSlot; use super::inventory_item_source_kind_type::InventoryItemSourceKind; +use super::inventory_container_kind_type::InventoryContainerKind; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct InventorySlotSnapshot { pub slot_id: String, pub runtime_session_id: String, - pub story_session_id: Option, + pub story_session_id: Option::, pub actor_user_id: String, pub container_kind: InventoryContainerKind, pub slot_key: String, pub item_id: String, pub category: String, pub name: String, - pub description: Option, + pub description: Option::, pub quantity: u32, pub rarity: InventoryItemRarity, - pub tags: Vec, + pub tags: Vec::, pub stackable: bool, pub stack_key: String, - pub equipment_slot_id: Option, + pub equipment_slot_id: Option::, pub source_kind: InventoryItemSourceKind, - pub source_reference_id: Option, + pub source_reference_id: Option::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for InventorySlotSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_table.rs index 277df68a..da04ff99 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_table.rs @@ -2,12 +2,17 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::inventory_container_kind_type::InventoryContainerKind; -use super::inventory_equipment_slot_type::InventoryEquipmentSlot; -use super::inventory_item_rarity_type::InventoryItemRarity; -use super::inventory_item_source_kind_type::InventoryItemSourceKind; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::inventory_slot_type::InventorySlot; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::inventory_item_rarity_type::InventoryItemRarity; +use super::inventory_equipment_slot_type::InventoryEquipmentSlot; +use super::inventory_item_source_kind_type::InventoryItemSourceKind; +use super::inventory_container_kind_type::InventoryContainerKind; /// Table handle for the table `inventory_slot`. /// @@ -48,12 +53,8 @@ impl<'ctx> __sdk::Table for InventorySlotTableHandle<'ctx> { type Row = InventorySlot; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = InventorySlotInsertCallbackId; @@ -99,38 +100,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for InventorySlotTableHandle<'ctx> { } } -/// Access to the `slot_id` unique index on the table `inventory_slot`, -/// which allows point queries on the field of the same name -/// via the [`InventorySlotSlotIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.inventory_slot().slot_id().find(...)`. -pub struct InventorySlotSlotIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> InventorySlotTableHandle<'ctx> { - /// Get a handle on the `slot_id` unique index on the table `inventory_slot`. - pub fn slot_id(&self) -> InventorySlotSlotIdUnique<'ctx> { - InventorySlotSlotIdUnique { - imp: self.imp.get_unique_constraint::("slot_id"), - phantom: std::marker::PhantomData, + /// Access to the `slot_id` unique index on the table `inventory_slot`, + /// which allows point queries on the field of the same name + /// via the [`InventorySlotSlotIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.inventory_slot().slot_id().find(...)`. + pub struct InventorySlotSlotIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> InventorySlotSlotIdUnique<'ctx> { - /// Find the subscribed row whose `slot_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 { - self.imp.find(col_val) - } -} + impl<'ctx> InventorySlotTableHandle<'ctx> { + /// Get a handle on the `slot_id` unique index on the table `inventory_slot`. + pub fn slot_id(&self) -> InventorySlotSlotIdUnique<'ctx> { + InventorySlotSlotIdUnique { + imp: self.imp.get_unique_constraint::("slot_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> InventorySlotSlotIdUnique<'ctx> { + /// Find the subscribed row whose `slot_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("inventory_slot"); _table.add_unique_constraint::("slot_id", |row| &row.slot_id); } @@ -140,24 +142,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `InventorySlot`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait inventory_slotQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `InventorySlot`. - fn inventory_slot(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `InventorySlot`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait inventory_slotQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `InventorySlot`. + fn inventory_slot(&self) -> __sdk::__query_builder::Table; + } + + impl inventory_slotQueryTableAccess for __sdk::QueryTableAccessor { + fn inventory_slot(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("inventory_slot") + } + } -impl inventory_slotQueryTableAccess for __sdk::QueryTableAccessor { - fn inventory_slot(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("inventory_slot") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_type.rs index fcfbab6a..c824c438 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/inventory_slot_type.rs @@ -2,65 +2,71 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::inventory_container_kind_type::InventoryContainerKind; -use super::inventory_equipment_slot_type::InventoryEquipmentSlot; use super::inventory_item_rarity_type::InventoryItemRarity; +use super::inventory_equipment_slot_type::InventoryEquipmentSlot; use super::inventory_item_source_kind_type::InventoryItemSourceKind; +use super::inventory_container_kind_type::InventoryContainerKind; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct InventorySlot { pub slot_id: String, pub runtime_session_id: String, - pub story_session_id: Option, + pub story_session_id: Option::, pub actor_user_id: String, pub container_kind: InventoryContainerKind, pub slot_key: String, pub item_id: String, pub category: String, pub name: String, - pub description: Option, + pub description: Option::, pub quantity: u32, pub rarity: InventoryItemRarity, - pub tags: Vec, + pub tags: Vec::, pub stackable: bool, pub stack_key: String, - pub equipment_slot_id: Option, + pub equipment_slot_id: Option::, pub source_kind: InventoryItemSourceKind, - pub source_reference_id: Option, + pub source_reference_id: Option::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for InventorySlot { type Module = super::RemoteModule; } + /// Column accessor struct for the table `InventorySlot`. /// /// Provides typed access to columns for query building. pub struct InventorySlotCols { pub slot_id: __sdk::__query_builder::Col, pub runtime_session_id: __sdk::__query_builder::Col, - pub story_session_id: __sdk::__query_builder::Col>, + pub story_session_id: __sdk::__query_builder::Col>, pub actor_user_id: __sdk::__query_builder::Col, pub container_kind: __sdk::__query_builder::Col, pub slot_key: __sdk::__query_builder::Col, pub item_id: __sdk::__query_builder::Col, pub category: __sdk::__query_builder::Col, pub name: __sdk::__query_builder::Col, - pub description: __sdk::__query_builder::Col>, + pub description: __sdk::__query_builder::Col>, pub quantity: __sdk::__query_builder::Col, pub rarity: __sdk::__query_builder::Col, - pub tags: __sdk::__query_builder::Col>, + pub tags: __sdk::__query_builder::Col>, pub stackable: __sdk::__query_builder::Col, pub stack_key: __sdk::__query_builder::Col, - pub equipment_slot_id: - __sdk::__query_builder::Col>, + pub equipment_slot_id: __sdk::__query_builder::Col>, pub source_kind: __sdk::__query_builder::Col, - pub source_reference_id: __sdk::__query_builder::Col>, + pub source_reference_id: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -86,12 +92,10 @@ impl __sdk::__query_builder::HasCols for InventorySlot { stack_key: __sdk::__query_builder::Col::new(table_name, "stack_key"), equipment_slot_id: __sdk::__query_builder::Col::new(table_name, "equipment_slot_id"), source_kind: __sdk::__query_builder::Col::new(table_name, "source_kind"), - source_reference_id: __sdk::__query_builder::Col::new( - table_name, - "source_reference_id", - ), + source_reference_id: __sdk::__query_builder::Col::new(table_name, "source_reference_id"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -112,13 +116,12 @@ impl __sdk::__query_builder::HasIxCols for InventorySlot { InventorySlotIxCols { actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), item_id: __sdk::__query_builder::IxCol::new(table_name, "item_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), + runtime_session_id: __sdk::__query_builder::IxCol::new(table_name, "runtime_session_id"), slot_id: __sdk::__query_builder::IxCol::new(table_name, "slot_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for InventorySlot {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_gallery_entries_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_gallery_entries_procedure.rs index 01f6cb0c..507757cf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_gallery_entries_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_gallery_entries_procedure.rs @@ -2,13 +2,20 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_gallery_list_result_type::CustomWorldGalleryListResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ListCustomWorldGalleryEntriesArgs {} + struct ListCustomWorldGalleryEntriesArgs { + } + impl __sdk::InModule for ListCustomWorldGalleryEntriesArgs { type Module = super::RemoteModule; @@ -19,36 +26,28 @@ impl __sdk::InModule for ListCustomWorldGalleryEntriesArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_custom_world_gallery_entries { - fn list_custom_world_gallery_entries(&self) { - self.list_custom_world_gallery_entries_then(|_, _| {}); + fn list_custom_world_gallery_entries(&self, ) { + self.list_custom_world_gallery_entries_then( |_, _| {}); } fn list_custom_world_gallery_entries_then( &self, - - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } impl list_custom_world_gallery_entries for super::RemoteProcedures { fn list_custom_world_gallery_entries_then( &self, - - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldGalleryListResult>( - "list_custom_world_gallery_entries", - ListCustomWorldGalleryEntriesArgs {}, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldGalleryListResult>( + "list_custom_world_gallery_entries", + ListCustomWorldGalleryEntriesArgs { }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_profiles_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_profiles_procedure.rs index c42ce2c6..2a591015 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_profiles_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_profiles_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_profile_list_input_type::CustomWorldProfileListInput; use super::custom_world_profile_list_result_type::CustomWorldProfileListResult; +use super::custom_world_profile_list_input_type::CustomWorldProfileListInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ListCustomWorldProfilesArgs { + struct ListCustomWorldProfilesArgs { pub input: CustomWorldProfileListInput, } + impl __sdk::InModule for ListCustomWorldProfilesArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ListCustomWorldProfilesArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_custom_world_profiles { - fn list_custom_world_profiles(&self, input: CustomWorldProfileListInput) { - self.list_custom_world_profiles_then(input, |_, _| {}); + fn list_custom_world_profiles(&self, input: CustomWorldProfileListInput, +) { + self.list_custom_world_profiles_then(input, |_, _| {}); } fn list_custom_world_profiles_then( &self, input: CustomWorldProfileListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl list_custom_world_profiles for super::RemoteProcedures { &self, input: CustomWorldProfileListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldProfileListResult>( - "list_custom_world_profiles", - ListCustomWorldProfilesArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldProfileListResult>( + "list_custom_world_profiles", + ListCustomWorldProfilesArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_works_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_works_procedure.rs index 77f48ba6..aca87254 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_works_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_custom_world_works_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_works_list_input_type::CustomWorldWorksListInput; use super::custom_world_works_list_result_type::CustomWorldWorksListResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ListCustomWorldWorksArgs { + struct ListCustomWorldWorksArgs { pub input: CustomWorldWorksListInput, } + impl __sdk::InModule for ListCustomWorldWorksArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ListCustomWorldWorksArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_custom_world_works { - fn list_custom_world_works(&self, input: CustomWorldWorksListInput) { - self.list_custom_world_works_then(input, |_, _| {}); + fn list_custom_world_works(&self, input: CustomWorldWorksListInput, +) { + self.list_custom_world_works_then(input, |_, _| {}); } fn list_custom_world_works_then( &self, input: CustomWorldWorksListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl list_custom_world_works for super::RemoteProcedures { &self, input: CustomWorldWorksListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldWorksListResult>( - "list_custom_world_works", - ListCustomWorldWorksArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldWorksListResult>( + "list_custom_world_works", + ListCustomWorldWorksArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_platform_browse_history_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_platform_browse_history_procedure.rs index 00176656..0c10f6c3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_platform_browse_history_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_platform_browse_history_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::runtime_browse_history_list_input_type::RuntimeBrowseHistoryListInput; use super::runtime_browse_history_procedure_result_type::RuntimeBrowseHistoryProcedureResult; +use super::runtime_browse_history_list_input_type::RuntimeBrowseHistoryListInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ListPlatformBrowseHistoryArgs { + struct ListPlatformBrowseHistoryArgs { pub input: RuntimeBrowseHistoryListInput, } + impl __sdk::InModule for ListPlatformBrowseHistoryArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ListPlatformBrowseHistoryArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_platform_browse_history { - fn list_platform_browse_history(&self, input: RuntimeBrowseHistoryListInput) { - self.list_platform_browse_history_then(input, |_, _| {}); + fn list_platform_browse_history(&self, input: RuntimeBrowseHistoryListInput, +) { + self.list_platform_browse_history_then(input, |_, _| {}); } fn list_platform_browse_history_then( &self, input: RuntimeBrowseHistoryListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl list_platform_browse_history for super::RemoteProcedures { &self, input: RuntimeBrowseHistoryListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( - "list_platform_browse_history", - ListPlatformBrowseHistoryArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( + "list_platform_browse_history", + ListPlatformBrowseHistoryArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_save_archives_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_save_archives_procedure.rs index 1c7176cf..6476c3ac 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_save_archives_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_save_archives_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_save_archive_list_input_type::RuntimeProfileSaveArchiveListInput; use super::runtime_profile_save_archive_procedure_result_type::RuntimeProfileSaveArchiveProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ListProfileSaveArchivesArgs { + struct ListProfileSaveArchivesArgs { pub input: RuntimeProfileSaveArchiveListInput, } + impl __sdk::InModule for ListProfileSaveArchivesArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ListProfileSaveArchivesArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_profile_save_archives { - fn list_profile_save_archives(&self, input: RuntimeProfileSaveArchiveListInput) { - self.list_profile_save_archives_then(input, |_, _| {}); + fn list_profile_save_archives(&self, input: RuntimeProfileSaveArchiveListInput, +) { + self.list_profile_save_archives_then(input, |_, _| {}); } fn list_profile_save_archives_then( &self, input: RuntimeProfileSaveArchiveListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl list_profile_save_archives for super::RemoteProcedures { &self, input: RuntimeProfileSaveArchiveListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeProfileSaveArchiveProcedureResult>( - "list_profile_save_archives", - ListProfileSaveArchivesArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeProfileSaveArchiveProcedureResult>( + "list_profile_save_archives", + ListProfileSaveArchivesArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_wallet_ledger_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_wallet_ledger_procedure.rs index d51f0df2..4ae618f0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_profile_wallet_ledger_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_profile_wallet_ledger_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_wallet_ledger_list_input_type::RuntimeProfileWalletLedgerListInput; use super::runtime_profile_wallet_ledger_procedure_result_type::RuntimeProfileWalletLedgerProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ListProfileWalletLedgerArgs { + struct ListProfileWalletLedgerArgs { pub input: RuntimeProfileWalletLedgerListInput, } + impl __sdk::InModule for ListProfileWalletLedgerArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ListProfileWalletLedgerArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_profile_wallet_ledger { - fn list_profile_wallet_ledger(&self, input: RuntimeProfileWalletLedgerListInput) { - self.list_profile_wallet_ledger_then(input, |_, _| {}); + fn list_profile_wallet_ledger(&self, input: RuntimeProfileWalletLedgerListInput, +) { + self.list_profile_wallet_ledger_then(input, |_, _| {}); } fn list_profile_wallet_ledger_then( &self, input: RuntimeProfileWalletLedgerListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl list_profile_wallet_ledger for super::RemoteProcedures { &self, input: RuntimeProfileWalletLedgerListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeProfileWalletLedgerProcedureResult>( - "list_profile_wallet_ledger", - ListProfileWalletLedgerArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeProfileWalletLedgerProcedureResult>( + "list_profile_wallet_ledger", + ListProfileWalletLedgerArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_gallery_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_gallery_procedure.rs index e62fd064..329e53a4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_gallery_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_gallery_procedure.rs @@ -2,13 +2,20 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_works_procedure_result_type::PuzzleWorksProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ListPuzzleGalleryArgs {} + struct ListPuzzleGalleryArgs { + } + impl __sdk::InModule for ListPuzzleGalleryArgs { type Module = super::RemoteModule; @@ -19,36 +26,28 @@ impl __sdk::InModule for ListPuzzleGalleryArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_puzzle_gallery { - fn list_puzzle_gallery(&self) { - self.list_puzzle_gallery_then(|_, _| {}); + fn list_puzzle_gallery(&self, ) { + self.list_puzzle_gallery_then( |_, _| {}); } fn list_puzzle_gallery_then( &self, - - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } impl list_puzzle_gallery for super::RemoteProcedures { fn list_puzzle_gallery_then( &self, - - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleWorksProcedureResult>( - "list_puzzle_gallery", - ListPuzzleGalleryArgs {}, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleWorksProcedureResult>( + "list_puzzle_gallery", + ListPuzzleGalleryArgs { }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_works_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_works_procedure.rs index 1da004e9..980a3698 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_works_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/list_puzzle_works_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::puzzle_works_list_input_type::PuzzleWorksListInput; use super::puzzle_works_procedure_result_type::PuzzleWorksProcedureResult; +use super::puzzle_works_list_input_type::PuzzleWorksListInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ListPuzzleWorksArgs { + struct ListPuzzleWorksArgs { pub input: PuzzleWorksListInput, } + impl __sdk::InModule for ListPuzzleWorksArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ListPuzzleWorksArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait list_puzzle_works { - fn list_puzzle_works(&self, input: PuzzleWorksListInput) { - self.list_puzzle_works_then(input, |_, _| {}); + fn list_puzzle_works(&self, input: PuzzleWorksListInput, +) { + self.list_puzzle_works_then(input, |_, _| {}); } fn list_puzzle_works_then( &self, input: PuzzleWorksListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl list_puzzle_works for super::RemoteProcedures { &self, input: PuzzleWorksListInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleWorksProcedureResult>( - "list_puzzle_works", - ListPuzzleWorksArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleWorksProcedureResult>( + "list_puzzle_works", + ListPuzzleWorksArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/mod.rs b/server-rs/crates/spacetime-client/src/module_bindings/mod.rs index 0fa47a5a..3af1a265 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/mod.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/mod.rs @@ -4,17 +4,19 @@ // This was generated using spacetimedb cli version 2.1.0 (commit 6981f48b4bc1a71c8dd9bdfe5a2c343f6370243d). #![allow(unused, clippy::all)] -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -pub mod accept_quest_reducer; -pub mod acknowledge_quest_completion_reducer; -pub mod advance_puzzle_next_level_procedure; +pub mod ai_result_reference_type; pub mod ai_result_reference_input_type; pub mod ai_result_reference_kind_type; pub mod ai_result_reference_snapshot_type; -pub mod ai_result_reference_table; -pub mod ai_result_reference_type; pub mod ai_stage_completion_input_type; +pub mod ai_task_type; pub mod ai_task_cancel_input_type; pub mod ai_task_create_input_type; pub mod ai_task_failure_input_type; @@ -22,65 +24,47 @@ pub mod ai_task_finish_input_type; pub mod ai_task_kind_type; pub mod ai_task_procedure_result_type; pub mod ai_task_snapshot_type; +pub mod ai_task_stage_type; pub mod ai_task_stage_blueprint_type; pub mod ai_task_stage_kind_type; pub mod ai_task_stage_snapshot_type; pub mod ai_task_stage_start_input_type; pub mod ai_task_stage_status_type; -pub mod ai_task_stage_table; -pub mod ai_task_stage_type; pub mod ai_task_start_input_type; pub mod ai_task_status_type; -pub mod ai_task_table; -pub mod ai_task_type; +pub mod ai_text_chunk_type; pub mod ai_text_chunk_append_input_type; pub mod ai_text_chunk_snapshot_type; -pub mod ai_text_chunk_table; -pub mod ai_text_chunk_type; -pub mod append_ai_text_chunk_and_return_procedure; -pub mod apply_chapter_progression_ledger_entry_and_return_procedure; -pub mod apply_chapter_progression_ledger_entry_reducer; -pub mod apply_inventory_mutation_reducer; -pub mod apply_quest_signal_reducer; +pub mod asset_entity_binding_type; pub mod asset_entity_binding_input_type; pub mod asset_entity_binding_procedure_result_type; pub mod asset_entity_binding_snapshot_type; -pub mod asset_entity_binding_table; -pub mod asset_entity_binding_type; +pub mod asset_object_type; pub mod asset_object_access_policy_type; pub mod asset_object_procedure_result_type; -pub mod asset_object_table; -pub mod asset_object_type; pub mod asset_object_upsert_input_type; pub mod asset_object_upsert_snapshot_type; -pub mod attach_ai_result_reference_and_return_procedure; pub mod battle_mode_type; +pub mod battle_state_type; pub mod battle_state_input_type; pub mod battle_state_procedure_result_type; pub mod battle_state_query_input_type; pub mod battle_state_snapshot_type; -pub mod battle_state_table; -pub mod battle_state_type; pub mod battle_status_type; -pub mod begin_story_session_and_return_procedure; -pub mod begin_story_session_reducer; +pub mod big_fish_agent_message_type; pub mod big_fish_agent_message_kind_type; pub mod big_fish_agent_message_role_type; pub mod big_fish_agent_message_snapshot_type; -pub mod big_fish_agent_message_table; -pub mod big_fish_agent_message_type; pub mod big_fish_anchor_item_type; pub mod big_fish_anchor_pack_type; pub mod big_fish_anchor_status_type; pub mod big_fish_asset_coverage_type; pub mod big_fish_asset_generate_input_type; pub mod big_fish_asset_kind_type; -pub mod big_fish_asset_slot_snapshot_type; -pub mod big_fish_asset_slot_table; pub mod big_fish_asset_slot_type; +pub mod big_fish_asset_slot_snapshot_type; pub mod big_fish_asset_status_type; pub mod big_fish_background_blueprint_type; -pub mod big_fish_creation_session_table; pub mod big_fish_creation_session_type; pub mod big_fish_creation_stage_type; pub mod big_fish_draft_compile_input_type; @@ -95,7 +79,6 @@ pub mod big_fish_run_start_input_type; pub mod big_fish_run_status_type; pub mod big_fish_runtime_entity_type; pub mod big_fish_runtime_params_type; -pub mod big_fish_runtime_run_table; pub mod big_fish_runtime_run_type; pub mod big_fish_runtime_snapshot_type; pub mod big_fish_session_create_input_type; @@ -103,75 +86,49 @@ pub mod big_fish_session_get_input_type; pub mod big_fish_session_procedure_result_type; pub mod big_fish_session_snapshot_type; pub mod big_fish_vector_2_type; -pub mod bind_asset_object_to_entity_and_return_procedure; -pub mod bind_asset_object_to_entity_reducer; -pub mod cancel_ai_task_and_return_procedure; pub mod chapter_pace_band_type; +pub mod chapter_progression_type; pub mod chapter_progression_get_input_type; pub mod chapter_progression_input_type; pub mod chapter_progression_ledger_input_type; pub mod chapter_progression_procedure_result_type; pub mod chapter_progression_snapshot_type; -pub mod chapter_progression_table; -pub mod chapter_progression_type; -pub mod clear_platform_browse_history_and_return_procedure; pub mod combat_outcome_type; -pub mod compile_big_fish_draft_procedure; -pub mod compile_custom_world_published_profile_procedure; -pub mod compile_puzzle_agent_draft_procedure; -pub mod complete_ai_stage_and_return_procedure; -pub mod complete_ai_task_and_return_procedure; -pub mod confirm_asset_object_and_return_procedure; -pub mod confirm_asset_object_reducer; pub mod consume_inventory_item_input_type; -pub mod continue_story_and_return_procedure; -pub mod continue_story_reducer; -pub mod create_ai_task_and_return_procedure; -pub mod create_ai_task_reducer; -pub mod create_battle_state_and_return_procedure; -pub mod create_battle_state_reducer; -pub mod create_big_fish_session_procedure; -pub mod create_custom_world_agent_session_procedure; -pub mod create_puzzle_agent_session_procedure; pub mod custom_world_agent_action_execute_input_type; pub mod custom_world_agent_action_execute_result_type; pub mod custom_world_agent_card_detail_get_input_type; +pub mod custom_world_agent_message_type; +pub mod custom_world_agent_message_finalize_input_type; pub mod custom_world_agent_message_snapshot_type; pub mod custom_world_agent_message_submit_input_type; -pub mod custom_world_agent_message_table; -pub mod custom_world_agent_message_type; +pub mod custom_world_agent_operation_type; pub mod custom_world_agent_operation_get_input_type; pub mod custom_world_agent_operation_procedure_result_type; pub mod custom_world_agent_operation_snapshot_type; -pub mod custom_world_agent_operation_table; -pub mod custom_world_agent_operation_type; +pub mod custom_world_agent_session_type; pub mod custom_world_agent_session_create_input_type; pub mod custom_world_agent_session_get_input_type; pub mod custom_world_agent_session_procedure_result_type; pub mod custom_world_agent_session_snapshot_type; -pub mod custom_world_agent_session_table; -pub mod custom_world_agent_session_type; +pub mod custom_world_draft_card_type; pub mod custom_world_draft_card_detail_result_type; pub mod custom_world_draft_card_detail_section_snapshot_type; pub mod custom_world_draft_card_detail_snapshot_type; pub mod custom_world_draft_card_snapshot_type; -pub mod custom_world_draft_card_table; -pub mod custom_world_draft_card_type; pub mod custom_world_gallery_detail_input_type; -pub mod custom_world_gallery_entry_snapshot_type; -pub mod custom_world_gallery_entry_table; pub mod custom_world_gallery_entry_type; +pub mod custom_world_gallery_entry_snapshot_type; pub mod custom_world_gallery_list_result_type; pub mod custom_world_generation_mode_type; pub mod custom_world_library_detail_input_type; pub mod custom_world_library_mutation_result_type; +pub mod custom_world_profile_type; pub mod custom_world_profile_delete_input_type; pub mod custom_world_profile_list_input_type; pub mod custom_world_profile_list_result_type; pub mod custom_world_profile_publish_input_type; pub mod custom_world_profile_snapshot_type; -pub mod custom_world_profile_table; -pub mod custom_world_profile_type; pub mod custom_world_profile_unpublish_input_type; pub mod custom_world_profile_upsert_input_type; pub mod custom_world_publication_status_type; @@ -181,61 +138,23 @@ pub mod custom_world_published_profile_compile_input_type; pub mod custom_world_published_profile_compile_result_type; pub mod custom_world_published_profile_compile_snapshot_type; pub mod custom_world_role_asset_status_type; -pub mod custom_world_session_status_type; -pub mod custom_world_session_table; pub mod custom_world_session_type; +pub mod custom_world_session_status_type; pub mod custom_world_theme_mode_type; pub mod custom_world_work_summary_snapshot_type; pub mod custom_world_works_list_input_type; pub mod custom_world_works_list_result_type; -pub mod delete_custom_world_profile_and_return_procedure; -pub mod delete_runtime_snapshot_and_return_procedure; -pub mod drag_puzzle_piece_or_group_procedure; pub mod equip_inventory_item_input_type; -pub mod execute_custom_world_agent_action_procedure; -pub mod fail_ai_task_and_return_procedure; -pub mod generate_big_fish_asset_procedure; -pub mod get_battle_state_procedure; -pub mod get_big_fish_run_procedure; -pub mod get_big_fish_session_procedure; -pub mod get_chapter_progression_procedure; -pub mod get_custom_world_agent_card_detail_procedure; -pub mod get_custom_world_agent_operation_procedure; -pub mod get_custom_world_agent_session_procedure; -pub mod get_custom_world_gallery_detail_procedure; -pub mod get_custom_world_library_detail_procedure; -pub mod get_player_progression_or_default_procedure; -pub mod get_profile_dashboard_procedure; -pub mod get_profile_play_stats_procedure; -pub mod get_puzzle_agent_session_procedure; -pub mod get_puzzle_gallery_detail_procedure; -pub mod get_puzzle_run_procedure; -pub mod get_puzzle_work_detail_procedure; -pub mod get_runtime_inventory_state_procedure; -pub mod get_runtime_setting_or_default_procedure; -pub mod get_runtime_snapshot_procedure; -pub mod get_story_session_state_procedure; pub mod grant_inventory_item_input_type; -pub mod grant_player_progression_experience_and_return_procedure; -pub mod grant_player_progression_experience_reducer; pub mod inventory_container_kind_type; pub mod inventory_equipment_slot_type; pub mod inventory_item_rarity_type; pub mod inventory_item_snapshot_type; pub mod inventory_item_source_kind_type; -pub mod inventory_mutation_input_type; pub mod inventory_mutation_type; -pub mod inventory_slot_snapshot_type; -pub mod inventory_slot_table; +pub mod inventory_mutation_input_type; pub mod inventory_slot_type; -pub mod list_custom_world_gallery_entries_procedure; -pub mod list_custom_world_profiles_procedure; -pub mod list_custom_world_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_gallery_procedure; -pub mod list_puzzle_works_procedure; +pub mod inventory_slot_snapshot_type; pub mod npc_battle_interaction_procedure_result_type; pub mod npc_battle_interaction_result_type; pub mod npc_interaction_battle_mode_type; @@ -246,41 +165,28 @@ pub mod npc_relation_stance_type; pub mod npc_relation_state_type; pub mod npc_social_action_kind_type; pub mod npc_stance_profile_type; +pub mod npc_state_type; pub mod npc_state_procedure_result_type; pub mod npc_state_snapshot_type; -pub mod npc_state_table; -pub mod npc_state_type; pub mod npc_state_upsert_input_type; +pub mod player_progression_type; pub mod player_progression_get_input_type; pub mod player_progression_grant_input_type; pub mod player_progression_grant_source_type; pub mod player_progression_procedure_result_type; pub mod player_progression_snapshot_type; -pub mod player_progression_table; -pub mod player_progression_type; -pub mod profile_dashboard_state_table; pub mod profile_dashboard_state_type; -pub mod profile_played_world_table; pub mod profile_played_world_type; -pub mod profile_save_archive_table; pub mod profile_save_archive_type; -pub mod profile_wallet_ledger_table; pub mod profile_wallet_ledger_type; -pub mod publish_big_fish_game_procedure; -pub mod publish_custom_world_profile_and_return_procedure; -pub mod publish_custom_world_profile_reducer; -pub mod publish_custom_world_world_procedure; -pub mod publish_puzzle_work_procedure; pub mod puzzle_agent_message_kind_type; pub mod puzzle_agent_message_role_type; pub mod puzzle_agent_message_row_type; pub mod puzzle_agent_message_submit_input_type; -pub mod puzzle_agent_message_table; pub mod puzzle_agent_session_create_input_type; pub mod puzzle_agent_session_get_input_type; pub mod puzzle_agent_session_procedure_result_type; pub mod puzzle_agent_session_row_type; -pub mod puzzle_agent_session_table; pub mod puzzle_agent_stage_type; pub mod puzzle_draft_compile_input_type; pub mod puzzle_generated_images_save_input_type; @@ -293,21 +199,18 @@ pub mod puzzle_run_procedure_result_type; pub mod puzzle_run_start_input_type; pub mod puzzle_run_swap_input_type; pub mod puzzle_runtime_run_row_type; -pub mod puzzle_runtime_run_table; pub mod puzzle_select_cover_image_input_type; pub mod puzzle_work_get_input_type; pub mod puzzle_work_procedure_result_type; pub mod puzzle_work_profile_row_type; -pub mod puzzle_work_profile_table; pub mod puzzle_work_upsert_input_type; pub mod puzzle_works_list_input_type; pub mod puzzle_works_procedure_result_type; pub mod quest_completion_ack_input_type; pub mod quest_hostile_npc_defeated_signal_type; pub mod quest_item_delivered_signal_type; -pub mod quest_log_event_kind_type; -pub mod quest_log_table; pub mod quest_log_type; +pub mod quest_log_event_kind_type; pub mod quest_narrative_binding_snapshot_type; pub mod quest_narrative_origin_type; pub mod quest_narrative_type_type; @@ -316,13 +219,12 @@ pub mod quest_npc_talk_completed_signal_type; pub mod quest_objective_kind_type; pub mod quest_objective_snapshot_type; pub mod quest_progress_signal_type; -pub mod quest_record_input_type; -pub mod quest_record_table; pub mod quest_record_type; +pub mod quest_record_input_type; pub mod quest_reward_equipment_slot_type; pub mod quest_reward_intel_type; -pub mod quest_reward_item_rarity_type; pub mod quest_reward_item_type; +pub mod quest_reward_item_rarity_type; pub mod quest_reward_snapshot_type; pub mod quest_scene_reached_signal_type; pub mod quest_signal_apply_input_type; @@ -331,22 +233,12 @@ pub mod quest_status_type; pub mod quest_step_snapshot_type; pub mod quest_treasure_inspected_signal_type; pub mod quest_turn_in_input_type; -pub mod resolve_combat_action_and_return_procedure; pub mod resolve_combat_action_input_type; pub mod resolve_combat_action_procedure_result_type; -pub mod resolve_combat_action_reducer; pub mod resolve_combat_action_result_type; -pub mod resolve_npc_battle_interaction_and_return_procedure; pub mod resolve_npc_battle_interaction_input_type; -pub mod resolve_npc_interaction_and_return_procedure; pub mod resolve_npc_interaction_input_type; -pub mod resolve_npc_interaction_reducer; -pub mod resolve_npc_social_action_and_return_procedure; pub mod resolve_npc_social_action_input_type; -pub mod resolve_npc_social_action_reducer; -pub mod resolve_treasure_interaction_and_return_procedure; -pub mod resolve_treasure_interaction_reducer; -pub mod resume_profile_save_archive_and_return_procedure; pub mod rpg_agent_draft_card_kind_type; pub mod rpg_agent_draft_card_status_type; pub mod rpg_agent_message_kind_type; @@ -383,75 +275,187 @@ pub mod runtime_profile_wallet_ledger_entry_snapshot_type; pub mod runtime_profile_wallet_ledger_list_input_type; pub mod runtime_profile_wallet_ledger_procedure_result_type; pub mod runtime_profile_wallet_ledger_source_type_type; +pub mod runtime_setting_type; pub mod runtime_setting_get_input_type; pub mod runtime_setting_procedure_result_type; pub mod runtime_setting_snapshot_type; -pub mod runtime_setting_table; -pub mod runtime_setting_type; pub mod runtime_setting_upsert_input_type; +pub mod runtime_snapshot_type; pub mod runtime_snapshot_delete_input_type; pub mod runtime_snapshot_get_input_type; pub mod runtime_snapshot_procedure_result_type; pub mod runtime_snapshot_row_type; -pub mod runtime_snapshot_table; -pub mod runtime_snapshot_type; pub mod runtime_snapshot_upsert_input_type; -pub mod save_puzzle_generated_images_procedure; -pub mod select_puzzle_cover_image_procedure; -pub mod start_ai_task_reducer; -pub mod start_ai_task_stage_reducer; -pub mod start_big_fish_run_procedure; -pub mod start_puzzle_run_procedure; pub mod story_continue_input_type; +pub mod story_event_type; pub mod story_event_kind_type; pub mod story_event_snapshot_type; -pub mod story_event_table; -pub mod story_event_type; +pub mod story_session_type; pub mod story_session_input_type; pub mod story_session_procedure_result_type; pub mod story_session_snapshot_type; pub mod story_session_state_input_type; pub mod story_session_state_procedure_result_type; pub mod story_session_status_type; +pub mod treasure_interaction_action_type; +pub mod treasure_record_type; +pub mod treasure_record_procedure_result_type; +pub mod treasure_record_snapshot_type; +pub mod treasure_resolve_input_type; +pub mod unequip_inventory_item_input_type; +pub mod user_browse_history_type; +pub mod accept_quest_reducer; +pub mod acknowledge_quest_completion_reducer; +pub mod apply_chapter_progression_ledger_entry_reducer; +pub mod apply_inventory_mutation_reducer; +pub mod apply_quest_signal_reducer; +pub mod begin_story_session_reducer; +pub mod bind_asset_object_to_entity_reducer; +pub mod confirm_asset_object_reducer; +pub mod continue_story_reducer; +pub mod create_ai_task_reducer; +pub mod create_battle_state_reducer; +pub mod grant_player_progression_experience_reducer; +pub mod publish_custom_world_profile_reducer; +pub mod resolve_combat_action_reducer; +pub mod resolve_npc_interaction_reducer; +pub mod resolve_npc_social_action_reducer; +pub mod resolve_treasure_interaction_reducer; +pub mod start_ai_task_reducer; +pub mod start_ai_task_stage_reducer; +pub mod turn_in_quest_reducer; +pub mod unpublish_custom_world_profile_reducer; +pub mod upsert_chapter_progression_reducer; +pub mod upsert_custom_world_profile_reducer; +pub mod upsert_npc_state_reducer; +pub mod ai_result_reference_table; +pub mod ai_task_table; +pub mod ai_task_stage_table; +pub mod ai_text_chunk_table; +pub mod asset_entity_binding_table; +pub mod asset_object_table; +pub mod battle_state_table; +pub mod big_fish_agent_message_table; +pub mod big_fish_asset_slot_table; +pub mod big_fish_creation_session_table; +pub mod big_fish_runtime_run_table; +pub mod chapter_progression_table; +pub mod custom_world_agent_message_table; +pub mod custom_world_agent_operation_table; +pub mod custom_world_agent_session_table; +pub mod custom_world_draft_card_table; +pub mod custom_world_gallery_entry_table; +pub mod custom_world_profile_table; +pub mod custom_world_session_table; +pub mod inventory_slot_table; +pub mod npc_state_table; +pub mod player_progression_table; +pub mod profile_dashboard_state_table; +pub mod profile_played_world_table; +pub mod profile_save_archive_table; +pub mod profile_wallet_ledger_table; +pub mod puzzle_agent_message_table; +pub mod puzzle_agent_session_table; +pub mod puzzle_runtime_run_table; +pub mod puzzle_work_profile_table; +pub mod quest_log_table; +pub mod quest_record_table; +pub mod runtime_setting_table; +pub mod runtime_snapshot_table; +pub mod story_event_table; pub mod story_session_table; -pub mod story_session_type; +pub mod treasure_record_table; +pub mod user_browse_history_table; +pub mod advance_puzzle_next_level_procedure; +pub mod append_ai_text_chunk_and_return_procedure; +pub mod apply_chapter_progression_ledger_entry_and_return_procedure; +pub mod attach_ai_result_reference_and_return_procedure; +pub mod begin_story_session_and_return_procedure; +pub mod bind_asset_object_to_entity_and_return_procedure; +pub mod cancel_ai_task_and_return_procedure; +pub mod clear_platform_browse_history_and_return_procedure; +pub mod compile_big_fish_draft_procedure; +pub mod compile_custom_world_published_profile_procedure; +pub mod compile_puzzle_agent_draft_procedure; +pub mod complete_ai_stage_and_return_procedure; +pub mod complete_ai_task_and_return_procedure; +pub mod confirm_asset_object_and_return_procedure; +pub mod continue_story_and_return_procedure; +pub mod create_ai_task_and_return_procedure; +pub mod create_battle_state_and_return_procedure; +pub mod create_big_fish_session_procedure; +pub mod create_custom_world_agent_session_procedure; +pub mod create_puzzle_agent_session_procedure; +pub mod delete_custom_world_profile_and_return_procedure; +pub mod delete_runtime_snapshot_and_return_procedure; +pub mod drag_puzzle_piece_or_group_procedure; +pub mod execute_custom_world_agent_action_procedure; +pub mod fail_ai_task_and_return_procedure; +pub mod finalize_custom_world_agent_message_turn_procedure; +pub mod generate_big_fish_asset_procedure; +pub mod get_battle_state_procedure; +pub mod get_big_fish_run_procedure; +pub mod get_big_fish_session_procedure; +pub mod get_chapter_progression_procedure; +pub mod get_custom_world_agent_card_detail_procedure; +pub mod get_custom_world_agent_operation_procedure; +pub mod get_custom_world_agent_session_procedure; +pub mod get_custom_world_gallery_detail_procedure; +pub mod get_custom_world_library_detail_procedure; +pub mod get_player_progression_or_default_procedure; +pub mod get_profile_dashboard_procedure; +pub mod get_profile_play_stats_procedure; +pub mod get_puzzle_agent_session_procedure; +pub mod get_puzzle_gallery_detail_procedure; +pub mod get_puzzle_run_procedure; +pub mod get_puzzle_work_detail_procedure; +pub mod get_runtime_inventory_state_procedure; +pub mod get_runtime_setting_or_default_procedure; +pub mod get_runtime_snapshot_procedure; +pub mod get_story_session_state_procedure; +pub mod grant_player_progression_experience_and_return_procedure; +pub mod list_custom_world_gallery_entries_procedure; +pub mod list_custom_world_profiles_procedure; +pub mod list_custom_world_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_gallery_procedure; +pub mod list_puzzle_works_procedure; +pub mod publish_big_fish_game_procedure; +pub mod publish_custom_world_profile_and_return_procedure; +pub mod publish_custom_world_world_procedure; +pub mod publish_puzzle_work_procedure; +pub mod resolve_combat_action_and_return_procedure; +pub mod resolve_npc_battle_interaction_and_return_procedure; +pub mod resolve_npc_interaction_and_return_procedure; +pub mod resolve_npc_social_action_and_return_procedure; +pub mod resolve_treasure_interaction_and_return_procedure; +pub mod resume_profile_save_archive_and_return_procedure; +pub mod save_puzzle_generated_images_procedure; +pub mod select_puzzle_cover_image_procedure; +pub mod start_big_fish_run_procedure; +pub mod start_puzzle_run_procedure; pub mod submit_big_fish_input_procedure; pub mod submit_big_fish_message_procedure; pub mod submit_custom_world_agent_message_procedure; pub mod submit_puzzle_agent_message_procedure; pub mod swap_puzzle_pieces_procedure; -pub mod treasure_interaction_action_type; -pub mod treasure_record_procedure_result_type; -pub mod treasure_record_snapshot_type; -pub mod treasure_record_table; -pub mod treasure_record_type; -pub mod treasure_resolve_input_type; -pub mod turn_in_quest_reducer; -pub mod unequip_inventory_item_input_type; pub mod unpublish_custom_world_profile_and_return_procedure; -pub mod unpublish_custom_world_profile_reducer; pub mod update_puzzle_work_procedure; pub mod upsert_chapter_progression_and_return_procedure; -pub mod upsert_chapter_progression_reducer; pub mod upsert_custom_world_profile_and_return_procedure; -pub mod upsert_custom_world_profile_reducer; pub mod upsert_npc_state_and_return_procedure; -pub mod upsert_npc_state_reducer; pub mod upsert_platform_browse_history_and_return_procedure; pub mod upsert_runtime_setting_and_return_procedure; pub mod upsert_runtime_snapshot_and_return_procedure; -pub mod user_browse_history_table; -pub mod user_browse_history_type; -pub use accept_quest_reducer::accept_quest; -pub use acknowledge_quest_completion_reducer::acknowledge_quest_completion; -pub use advance_puzzle_next_level_procedure::advance_puzzle_next_level; +pub use ai_result_reference_type::AiResultReference; pub use ai_result_reference_input_type::AiResultReferenceInput; pub use ai_result_reference_kind_type::AiResultReferenceKind; pub use ai_result_reference_snapshot_type::AiResultReferenceSnapshot; -pub use ai_result_reference_table::*; -pub use ai_result_reference_type::AiResultReference; pub use ai_stage_completion_input_type::AiStageCompletionInput; +pub use ai_task_type::AiTask; pub use ai_task_cancel_input_type::AiTaskCancelInput; pub use ai_task_create_input_type::AiTaskCreateInput; pub use ai_task_failure_input_type::AiTaskFailureInput; @@ -459,65 +463,47 @@ pub use ai_task_finish_input_type::AiTaskFinishInput; pub use ai_task_kind_type::AiTaskKind; pub use ai_task_procedure_result_type::AiTaskProcedureResult; pub use ai_task_snapshot_type::AiTaskSnapshot; +pub use ai_task_stage_type::AiTaskStage; pub use ai_task_stage_blueprint_type::AiTaskStageBlueprint; pub use ai_task_stage_kind_type::AiTaskStageKind; pub use ai_task_stage_snapshot_type::AiTaskStageSnapshot; pub use ai_task_stage_start_input_type::AiTaskStageStartInput; pub use ai_task_stage_status_type::AiTaskStageStatus; -pub use ai_task_stage_table::*; -pub use ai_task_stage_type::AiTaskStage; pub use ai_task_start_input_type::AiTaskStartInput; pub use ai_task_status_type::AiTaskStatus; -pub use ai_task_table::*; -pub use ai_task_type::AiTask; +pub use ai_text_chunk_type::AiTextChunk; pub use ai_text_chunk_append_input_type::AiTextChunkAppendInput; pub use ai_text_chunk_snapshot_type::AiTextChunkSnapshot; -pub use ai_text_chunk_table::*; -pub use ai_text_chunk_type::AiTextChunk; -pub use append_ai_text_chunk_and_return_procedure::append_ai_text_chunk_and_return; -pub use apply_chapter_progression_ledger_entry_and_return_procedure::apply_chapter_progression_ledger_entry_and_return; -pub use apply_chapter_progression_ledger_entry_reducer::apply_chapter_progression_ledger_entry; -pub use apply_inventory_mutation_reducer::apply_inventory_mutation; -pub use apply_quest_signal_reducer::apply_quest_signal; +pub use asset_entity_binding_type::AssetEntityBinding; pub use asset_entity_binding_input_type::AssetEntityBindingInput; pub use asset_entity_binding_procedure_result_type::AssetEntityBindingProcedureResult; pub use asset_entity_binding_snapshot_type::AssetEntityBindingSnapshot; -pub use asset_entity_binding_table::*; -pub use asset_entity_binding_type::AssetEntityBinding; +pub use asset_object_type::AssetObject; pub use asset_object_access_policy_type::AssetObjectAccessPolicy; pub use asset_object_procedure_result_type::AssetObjectProcedureResult; -pub use asset_object_table::*; -pub use asset_object_type::AssetObject; pub use asset_object_upsert_input_type::AssetObjectUpsertInput; pub use asset_object_upsert_snapshot_type::AssetObjectUpsertSnapshot; -pub use attach_ai_result_reference_and_return_procedure::attach_ai_result_reference_and_return; pub use battle_mode_type::BattleMode; +pub use battle_state_type::BattleState; pub use battle_state_input_type::BattleStateInput; pub use battle_state_procedure_result_type::BattleStateProcedureResult; pub use battle_state_query_input_type::BattleStateQueryInput; pub use battle_state_snapshot_type::BattleStateSnapshot; -pub use battle_state_table::*; -pub use battle_state_type::BattleState; pub use battle_status_type::BattleStatus; -pub use begin_story_session_and_return_procedure::begin_story_session_and_return; -pub use begin_story_session_reducer::begin_story_session; +pub use big_fish_agent_message_type::BigFishAgentMessage; pub use big_fish_agent_message_kind_type::BigFishAgentMessageKind; pub use big_fish_agent_message_role_type::BigFishAgentMessageRole; pub use big_fish_agent_message_snapshot_type::BigFishAgentMessageSnapshot; -pub use big_fish_agent_message_table::*; -pub use big_fish_agent_message_type::BigFishAgentMessage; pub use big_fish_anchor_item_type::BigFishAnchorItem; pub use big_fish_anchor_pack_type::BigFishAnchorPack; pub use big_fish_anchor_status_type::BigFishAnchorStatus; pub use big_fish_asset_coverage_type::BigFishAssetCoverage; pub use big_fish_asset_generate_input_type::BigFishAssetGenerateInput; pub use big_fish_asset_kind_type::BigFishAssetKind; -pub use big_fish_asset_slot_snapshot_type::BigFishAssetSlotSnapshot; -pub use big_fish_asset_slot_table::*; pub use big_fish_asset_slot_type::BigFishAssetSlot; +pub use big_fish_asset_slot_snapshot_type::BigFishAssetSlotSnapshot; pub use big_fish_asset_status_type::BigFishAssetStatus; pub use big_fish_background_blueprint_type::BigFishBackgroundBlueprint; -pub use big_fish_creation_session_table::*; pub use big_fish_creation_session_type::BigFishCreationSession; pub use big_fish_creation_stage_type::BigFishCreationStage; pub use big_fish_draft_compile_input_type::BigFishDraftCompileInput; @@ -532,7 +518,6 @@ pub use big_fish_run_start_input_type::BigFishRunStartInput; pub use big_fish_run_status_type::BigFishRunStatus; pub use big_fish_runtime_entity_type::BigFishRuntimeEntity; pub use big_fish_runtime_params_type::BigFishRuntimeParams; -pub use big_fish_runtime_run_table::*; pub use big_fish_runtime_run_type::BigFishRuntimeRun; pub use big_fish_runtime_snapshot_type::BigFishRuntimeSnapshot; pub use big_fish_session_create_input_type::BigFishSessionCreateInput; @@ -540,75 +525,49 @@ pub use big_fish_session_get_input_type::BigFishSessionGetInput; pub use big_fish_session_procedure_result_type::BigFishSessionProcedureResult; pub use big_fish_session_snapshot_type::BigFishSessionSnapshot; pub use big_fish_vector_2_type::BigFishVector2; -pub use bind_asset_object_to_entity_and_return_procedure::bind_asset_object_to_entity_and_return; -pub use bind_asset_object_to_entity_reducer::bind_asset_object_to_entity; -pub use cancel_ai_task_and_return_procedure::cancel_ai_task_and_return; pub use chapter_pace_band_type::ChapterPaceBand; +pub use chapter_progression_type::ChapterProgression; pub use chapter_progression_get_input_type::ChapterProgressionGetInput; pub use chapter_progression_input_type::ChapterProgressionInput; pub use chapter_progression_ledger_input_type::ChapterProgressionLedgerInput; pub use chapter_progression_procedure_result_type::ChapterProgressionProcedureResult; pub use chapter_progression_snapshot_type::ChapterProgressionSnapshot; -pub use chapter_progression_table::*; -pub use chapter_progression_type::ChapterProgression; -pub use clear_platform_browse_history_and_return_procedure::clear_platform_browse_history_and_return; pub use combat_outcome_type::CombatOutcome; -pub use compile_big_fish_draft_procedure::compile_big_fish_draft; -pub use compile_custom_world_published_profile_procedure::compile_custom_world_published_profile; -pub use compile_puzzle_agent_draft_procedure::compile_puzzle_agent_draft; -pub use complete_ai_stage_and_return_procedure::complete_ai_stage_and_return; -pub use complete_ai_task_and_return_procedure::complete_ai_task_and_return; -pub use confirm_asset_object_and_return_procedure::confirm_asset_object_and_return; -pub use confirm_asset_object_reducer::confirm_asset_object; pub use consume_inventory_item_input_type::ConsumeInventoryItemInput; -pub use continue_story_and_return_procedure::continue_story_and_return; -pub use continue_story_reducer::continue_story; -pub use create_ai_task_and_return_procedure::create_ai_task_and_return; -pub use create_ai_task_reducer::create_ai_task; -pub use create_battle_state_and_return_procedure::create_battle_state_and_return; -pub use create_battle_state_reducer::create_battle_state; -pub use create_big_fish_session_procedure::create_big_fish_session; -pub use create_custom_world_agent_session_procedure::create_custom_world_agent_session; -pub use create_puzzle_agent_session_procedure::create_puzzle_agent_session; pub use custom_world_agent_action_execute_input_type::CustomWorldAgentActionExecuteInput; pub use custom_world_agent_action_execute_result_type::CustomWorldAgentActionExecuteResult; pub use custom_world_agent_card_detail_get_input_type::CustomWorldAgentCardDetailGetInput; +pub use custom_world_agent_message_type::CustomWorldAgentMessage; +pub use custom_world_agent_message_finalize_input_type::CustomWorldAgentMessageFinalizeInput; pub use custom_world_agent_message_snapshot_type::CustomWorldAgentMessageSnapshot; pub use custom_world_agent_message_submit_input_type::CustomWorldAgentMessageSubmitInput; -pub use custom_world_agent_message_table::*; -pub use custom_world_agent_message_type::CustomWorldAgentMessage; +pub use custom_world_agent_operation_type::CustomWorldAgentOperation; pub use custom_world_agent_operation_get_input_type::CustomWorldAgentOperationGetInput; pub use custom_world_agent_operation_procedure_result_type::CustomWorldAgentOperationProcedureResult; pub use custom_world_agent_operation_snapshot_type::CustomWorldAgentOperationSnapshot; -pub use custom_world_agent_operation_table::*; -pub use custom_world_agent_operation_type::CustomWorldAgentOperation; +pub use custom_world_agent_session_type::CustomWorldAgentSession; pub use custom_world_agent_session_create_input_type::CustomWorldAgentSessionCreateInput; pub use custom_world_agent_session_get_input_type::CustomWorldAgentSessionGetInput; pub use custom_world_agent_session_procedure_result_type::CustomWorldAgentSessionProcedureResult; pub use custom_world_agent_session_snapshot_type::CustomWorldAgentSessionSnapshot; -pub use custom_world_agent_session_table::*; -pub use custom_world_agent_session_type::CustomWorldAgentSession; +pub use custom_world_draft_card_type::CustomWorldDraftCard; pub use custom_world_draft_card_detail_result_type::CustomWorldDraftCardDetailResult; pub use custom_world_draft_card_detail_section_snapshot_type::CustomWorldDraftCardDetailSectionSnapshot; pub use custom_world_draft_card_detail_snapshot_type::CustomWorldDraftCardDetailSnapshot; pub use custom_world_draft_card_snapshot_type::CustomWorldDraftCardSnapshot; -pub use custom_world_draft_card_table::*; -pub use custom_world_draft_card_type::CustomWorldDraftCard; pub use custom_world_gallery_detail_input_type::CustomWorldGalleryDetailInput; -pub use custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; -pub use custom_world_gallery_entry_table::*; pub use custom_world_gallery_entry_type::CustomWorldGalleryEntry; +pub use custom_world_gallery_entry_snapshot_type::CustomWorldGalleryEntrySnapshot; pub use custom_world_gallery_list_result_type::CustomWorldGalleryListResult; pub use custom_world_generation_mode_type::CustomWorldGenerationMode; pub use custom_world_library_detail_input_type::CustomWorldLibraryDetailInput; pub use custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; +pub use custom_world_profile_type::CustomWorldProfile; pub use custom_world_profile_delete_input_type::CustomWorldProfileDeleteInput; pub use custom_world_profile_list_input_type::CustomWorldProfileListInput; pub use custom_world_profile_list_result_type::CustomWorldProfileListResult; pub use custom_world_profile_publish_input_type::CustomWorldProfilePublishInput; pub use custom_world_profile_snapshot_type::CustomWorldProfileSnapshot; -pub use custom_world_profile_table::*; -pub use custom_world_profile_type::CustomWorldProfile; pub use custom_world_profile_unpublish_input_type::CustomWorldProfileUnpublishInput; pub use custom_world_profile_upsert_input_type::CustomWorldProfileUpsertInput; pub use custom_world_publication_status_type::CustomWorldPublicationStatus; @@ -618,61 +577,23 @@ pub use custom_world_published_profile_compile_input_type::CustomWorldPublishedP pub use custom_world_published_profile_compile_result_type::CustomWorldPublishedProfileCompileResult; pub use custom_world_published_profile_compile_snapshot_type::CustomWorldPublishedProfileCompileSnapshot; pub use custom_world_role_asset_status_type::CustomWorldRoleAssetStatus; -pub use custom_world_session_status_type::CustomWorldSessionStatus; -pub use custom_world_session_table::*; pub use custom_world_session_type::CustomWorldSession; +pub use custom_world_session_status_type::CustomWorldSessionStatus; pub use custom_world_theme_mode_type::CustomWorldThemeMode; pub use custom_world_work_summary_snapshot_type::CustomWorldWorkSummarySnapshot; pub use custom_world_works_list_input_type::CustomWorldWorksListInput; pub use custom_world_works_list_result_type::CustomWorldWorksListResult; -pub use delete_custom_world_profile_and_return_procedure::delete_custom_world_profile_and_return; -pub use delete_runtime_snapshot_and_return_procedure::delete_runtime_snapshot_and_return; -pub use drag_puzzle_piece_or_group_procedure::drag_puzzle_piece_or_group; pub use equip_inventory_item_input_type::EquipInventoryItemInput; -pub use execute_custom_world_agent_action_procedure::execute_custom_world_agent_action; -pub use fail_ai_task_and_return_procedure::fail_ai_task_and_return; -pub use generate_big_fish_asset_procedure::generate_big_fish_asset; -pub use get_battle_state_procedure::get_battle_state; -pub use get_big_fish_run_procedure::get_big_fish_run; -pub use get_big_fish_session_procedure::get_big_fish_session; -pub use get_chapter_progression_procedure::get_chapter_progression; -pub use get_custom_world_agent_card_detail_procedure::get_custom_world_agent_card_detail; -pub use get_custom_world_agent_operation_procedure::get_custom_world_agent_operation; -pub use get_custom_world_agent_session_procedure::get_custom_world_agent_session; -pub use get_custom_world_gallery_detail_procedure::get_custom_world_gallery_detail; -pub use get_custom_world_library_detail_procedure::get_custom_world_library_detail; -pub use get_player_progression_or_default_procedure::get_player_progression_or_default; -pub use get_profile_dashboard_procedure::get_profile_dashboard; -pub use get_profile_play_stats_procedure::get_profile_play_stats; -pub use get_puzzle_agent_session_procedure::get_puzzle_agent_session; -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; -pub use get_runtime_inventory_state_procedure::get_runtime_inventory_state; -pub use get_runtime_setting_or_default_procedure::get_runtime_setting_or_default; -pub use get_runtime_snapshot_procedure::get_runtime_snapshot; -pub use get_story_session_state_procedure::get_story_session_state; pub use grant_inventory_item_input_type::GrantInventoryItemInput; -pub use grant_player_progression_experience_and_return_procedure::grant_player_progression_experience_and_return; -pub use grant_player_progression_experience_reducer::grant_player_progression_experience; pub use inventory_container_kind_type::InventoryContainerKind; pub use inventory_equipment_slot_type::InventoryEquipmentSlot; pub use inventory_item_rarity_type::InventoryItemRarity; pub use inventory_item_snapshot_type::InventoryItemSnapshot; pub use inventory_item_source_kind_type::InventoryItemSourceKind; -pub use inventory_mutation_input_type::InventoryMutationInput; pub use inventory_mutation_type::InventoryMutation; -pub use inventory_slot_snapshot_type::InventorySlotSnapshot; -pub use inventory_slot_table::*; +pub use inventory_mutation_input_type::InventoryMutationInput; pub use inventory_slot_type::InventorySlot; -pub use list_custom_world_gallery_entries_procedure::list_custom_world_gallery_entries; -pub use list_custom_world_profiles_procedure::list_custom_world_profiles; -pub use list_custom_world_works_procedure::list_custom_world_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_gallery_procedure::list_puzzle_gallery; -pub use list_puzzle_works_procedure::list_puzzle_works; +pub use inventory_slot_snapshot_type::InventorySlotSnapshot; pub use npc_battle_interaction_procedure_result_type::NpcBattleInteractionProcedureResult; pub use npc_battle_interaction_result_type::NpcBattleInteractionResult; pub use npc_interaction_battle_mode_type::NpcInteractionBattleMode; @@ -683,41 +604,28 @@ pub use npc_relation_stance_type::NpcRelationStance; pub use npc_relation_state_type::NpcRelationState; pub use npc_social_action_kind_type::NpcSocialActionKind; pub use npc_stance_profile_type::NpcStanceProfile; +pub use npc_state_type::NpcState; pub use npc_state_procedure_result_type::NpcStateProcedureResult; pub use npc_state_snapshot_type::NpcStateSnapshot; -pub use npc_state_table::*; -pub use npc_state_type::NpcState; pub use npc_state_upsert_input_type::NpcStateUpsertInput; +pub use player_progression_type::PlayerProgression; pub use player_progression_get_input_type::PlayerProgressionGetInput; pub use player_progression_grant_input_type::PlayerProgressionGrantInput; pub use player_progression_grant_source_type::PlayerProgressionGrantSource; pub use player_progression_procedure_result_type::PlayerProgressionProcedureResult; pub use player_progression_snapshot_type::PlayerProgressionSnapshot; -pub use player_progression_table::*; -pub use player_progression_type::PlayerProgression; -pub use profile_dashboard_state_table::*; pub use profile_dashboard_state_type::ProfileDashboardState; -pub use profile_played_world_table::*; pub use profile_played_world_type::ProfilePlayedWorld; -pub use profile_save_archive_table::*; pub use profile_save_archive_type::ProfileSaveArchive; -pub use profile_wallet_ledger_table::*; pub use profile_wallet_ledger_type::ProfileWalletLedger; -pub use publish_big_fish_game_procedure::publish_big_fish_game; -pub use publish_custom_world_profile_and_return_procedure::publish_custom_world_profile_and_return; -pub use publish_custom_world_profile_reducer::publish_custom_world_profile; -pub use publish_custom_world_world_procedure::publish_custom_world_world; -pub use publish_puzzle_work_procedure::publish_puzzle_work; pub use puzzle_agent_message_kind_type::PuzzleAgentMessageKind; pub use puzzle_agent_message_role_type::PuzzleAgentMessageRole; pub use puzzle_agent_message_row_type::PuzzleAgentMessageRow; pub use puzzle_agent_message_submit_input_type::PuzzleAgentMessageSubmitInput; -pub use puzzle_agent_message_table::*; pub use puzzle_agent_session_create_input_type::PuzzleAgentSessionCreateInput; pub use puzzle_agent_session_get_input_type::PuzzleAgentSessionGetInput; pub use puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; pub use puzzle_agent_session_row_type::PuzzleAgentSessionRow; -pub use puzzle_agent_session_table::*; pub use puzzle_agent_stage_type::PuzzleAgentStage; pub use puzzle_draft_compile_input_type::PuzzleDraftCompileInput; pub use puzzle_generated_images_save_input_type::PuzzleGeneratedImagesSaveInput; @@ -730,21 +638,18 @@ pub use puzzle_run_procedure_result_type::PuzzleRunProcedureResult; pub use puzzle_run_start_input_type::PuzzleRunStartInput; pub use puzzle_run_swap_input_type::PuzzleRunSwapInput; pub use puzzle_runtime_run_row_type::PuzzleRuntimeRunRow; -pub use puzzle_runtime_run_table::*; pub use puzzle_select_cover_image_input_type::PuzzleSelectCoverImageInput; pub use puzzle_work_get_input_type::PuzzleWorkGetInput; pub use puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; pub use puzzle_work_profile_row_type::PuzzleWorkProfileRow; -pub use puzzle_work_profile_table::*; pub use puzzle_work_upsert_input_type::PuzzleWorkUpsertInput; pub use puzzle_works_list_input_type::PuzzleWorksListInput; pub use puzzle_works_procedure_result_type::PuzzleWorksProcedureResult; pub use quest_completion_ack_input_type::QuestCompletionAckInput; pub use quest_hostile_npc_defeated_signal_type::QuestHostileNpcDefeatedSignal; pub use quest_item_delivered_signal_type::QuestItemDeliveredSignal; -pub use quest_log_event_kind_type::QuestLogEventKind; -pub use quest_log_table::*; pub use quest_log_type::QuestLog; +pub use quest_log_event_kind_type::QuestLogEventKind; pub use quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; pub use quest_narrative_origin_type::QuestNarrativeOrigin; pub use quest_narrative_type_type::QuestNarrativeType; @@ -753,13 +658,12 @@ pub use quest_npc_talk_completed_signal_type::QuestNpcTalkCompletedSignal; pub use quest_objective_kind_type::QuestObjectiveKind; pub use quest_objective_snapshot_type::QuestObjectiveSnapshot; pub use quest_progress_signal_type::QuestProgressSignal; -pub use quest_record_input_type::QuestRecordInput; -pub use quest_record_table::*; pub use quest_record_type::QuestRecord; +pub use quest_record_input_type::QuestRecordInput; pub use quest_reward_equipment_slot_type::QuestRewardEquipmentSlot; pub use quest_reward_intel_type::QuestRewardIntel; -pub use quest_reward_item_rarity_type::QuestRewardItemRarity; pub use quest_reward_item_type::QuestRewardItem; +pub use quest_reward_item_rarity_type::QuestRewardItemRarity; pub use quest_reward_snapshot_type::QuestRewardSnapshot; pub use quest_scene_reached_signal_type::QuestSceneReachedSignal; pub use quest_signal_apply_input_type::QuestSignalApplyInput; @@ -768,22 +672,12 @@ pub use quest_status_type::QuestStatus; pub use quest_step_snapshot_type::QuestStepSnapshot; pub use quest_treasure_inspected_signal_type::QuestTreasureInspectedSignal; pub use quest_turn_in_input_type::QuestTurnInInput; -pub use resolve_combat_action_and_return_procedure::resolve_combat_action_and_return; pub use resolve_combat_action_input_type::ResolveCombatActionInput; pub use resolve_combat_action_procedure_result_type::ResolveCombatActionProcedureResult; -pub use resolve_combat_action_reducer::resolve_combat_action; pub use resolve_combat_action_result_type::ResolveCombatActionResult; -pub use resolve_npc_battle_interaction_and_return_procedure::resolve_npc_battle_interaction_and_return; pub use resolve_npc_battle_interaction_input_type::ResolveNpcBattleInteractionInput; -pub use resolve_npc_interaction_and_return_procedure::resolve_npc_interaction_and_return; pub use resolve_npc_interaction_input_type::ResolveNpcInteractionInput; -pub use resolve_npc_interaction_reducer::resolve_npc_interaction; -pub use resolve_npc_social_action_and_return_procedure::resolve_npc_social_action_and_return; pub use resolve_npc_social_action_input_type::ResolveNpcSocialActionInput; -pub use resolve_npc_social_action_reducer::resolve_npc_social_action; -pub use resolve_treasure_interaction_and_return_procedure::resolve_treasure_interaction_and_return; -pub use resolve_treasure_interaction_reducer::resolve_treasure_interaction; -pub use resume_profile_save_archive_and_return_procedure::resume_profile_save_archive_and_return; pub use rpg_agent_draft_card_kind_type::RpgAgentDraftCardKind; pub use rpg_agent_draft_card_status_type::RpgAgentDraftCardStatus; pub use rpg_agent_message_kind_type::RpgAgentMessageKind; @@ -820,65 +714,180 @@ pub use runtime_profile_wallet_ledger_entry_snapshot_type::RuntimeProfileWalletL pub use runtime_profile_wallet_ledger_list_input_type::RuntimeProfileWalletLedgerListInput; pub use runtime_profile_wallet_ledger_procedure_result_type::RuntimeProfileWalletLedgerProcedureResult; pub use runtime_profile_wallet_ledger_source_type_type::RuntimeProfileWalletLedgerSourceType; +pub use runtime_setting_type::RuntimeSetting; pub use runtime_setting_get_input_type::RuntimeSettingGetInput; pub use runtime_setting_procedure_result_type::RuntimeSettingProcedureResult; pub use runtime_setting_snapshot_type::RuntimeSettingSnapshot; -pub use runtime_setting_table::*; -pub use runtime_setting_type::RuntimeSetting; pub use runtime_setting_upsert_input_type::RuntimeSettingUpsertInput; +pub use runtime_snapshot_type::RuntimeSnapshot; pub use runtime_snapshot_delete_input_type::RuntimeSnapshotDeleteInput; pub use runtime_snapshot_get_input_type::RuntimeSnapshotGetInput; pub use runtime_snapshot_procedure_result_type::RuntimeSnapshotProcedureResult; pub use runtime_snapshot_row_type::RuntimeSnapshotRow; -pub use runtime_snapshot_table::*; -pub use runtime_snapshot_type::RuntimeSnapshot; pub use runtime_snapshot_upsert_input_type::RuntimeSnapshotUpsertInput; -pub use save_puzzle_generated_images_procedure::save_puzzle_generated_images; -pub use select_puzzle_cover_image_procedure::select_puzzle_cover_image; -pub use start_ai_task_reducer::start_ai_task; -pub use start_ai_task_stage_reducer::start_ai_task_stage; -pub use start_big_fish_run_procedure::start_big_fish_run; -pub use start_puzzle_run_procedure::start_puzzle_run; pub use story_continue_input_type::StoryContinueInput; +pub use story_event_type::StoryEvent; pub use story_event_kind_type::StoryEventKind; pub use story_event_snapshot_type::StoryEventSnapshot; -pub use story_event_table::*; -pub use story_event_type::StoryEvent; +pub use story_session_type::StorySession; pub use story_session_input_type::StorySessionInput; pub use story_session_procedure_result_type::StorySessionProcedureResult; pub use story_session_snapshot_type::StorySessionSnapshot; pub use story_session_state_input_type::StorySessionStateInput; pub use story_session_state_procedure_result_type::StorySessionStateProcedureResult; pub use story_session_status_type::StorySessionStatus; +pub use treasure_interaction_action_type::TreasureInteractionAction; +pub use treasure_record_type::TreasureRecord; +pub use treasure_record_procedure_result_type::TreasureRecordProcedureResult; +pub use treasure_record_snapshot_type::TreasureRecordSnapshot; +pub use treasure_resolve_input_type::TreasureResolveInput; +pub use unequip_inventory_item_input_type::UnequipInventoryItemInput; +pub use user_browse_history_type::UserBrowseHistory; +pub use ai_result_reference_table::*; +pub use ai_task_table::*; +pub use ai_task_stage_table::*; +pub use ai_text_chunk_table::*; +pub use asset_entity_binding_table::*; +pub use asset_object_table::*; +pub use battle_state_table::*; +pub use big_fish_agent_message_table::*; +pub use big_fish_asset_slot_table::*; +pub use big_fish_creation_session_table::*; +pub use big_fish_runtime_run_table::*; +pub use chapter_progression_table::*; +pub use custom_world_agent_message_table::*; +pub use custom_world_agent_operation_table::*; +pub use custom_world_agent_session_table::*; +pub use custom_world_draft_card_table::*; +pub use custom_world_gallery_entry_table::*; +pub use custom_world_profile_table::*; +pub use custom_world_session_table::*; +pub use inventory_slot_table::*; +pub use npc_state_table::*; +pub use player_progression_table::*; +pub use profile_dashboard_state_table::*; +pub use profile_played_world_table::*; +pub use profile_save_archive_table::*; +pub use profile_wallet_ledger_table::*; +pub use puzzle_agent_message_table::*; +pub use puzzle_agent_session_table::*; +pub use puzzle_runtime_run_table::*; +pub use puzzle_work_profile_table::*; +pub use quest_log_table::*; +pub use quest_record_table::*; +pub use runtime_setting_table::*; +pub use runtime_snapshot_table::*; +pub use story_event_table::*; pub use story_session_table::*; -pub use story_session_type::StorySession; +pub use treasure_record_table::*; +pub use user_browse_history_table::*; +pub use accept_quest_reducer::accept_quest; +pub use acknowledge_quest_completion_reducer::acknowledge_quest_completion; +pub use apply_chapter_progression_ledger_entry_reducer::apply_chapter_progression_ledger_entry; +pub use apply_inventory_mutation_reducer::apply_inventory_mutation; +pub use apply_quest_signal_reducer::apply_quest_signal; +pub use begin_story_session_reducer::begin_story_session; +pub use bind_asset_object_to_entity_reducer::bind_asset_object_to_entity; +pub use confirm_asset_object_reducer::confirm_asset_object; +pub use continue_story_reducer::continue_story; +pub use create_ai_task_reducer::create_ai_task; +pub use create_battle_state_reducer::create_battle_state; +pub use grant_player_progression_experience_reducer::grant_player_progression_experience; +pub use publish_custom_world_profile_reducer::publish_custom_world_profile; +pub use resolve_combat_action_reducer::resolve_combat_action; +pub use resolve_npc_interaction_reducer::resolve_npc_interaction; +pub use resolve_npc_social_action_reducer::resolve_npc_social_action; +pub use resolve_treasure_interaction_reducer::resolve_treasure_interaction; +pub use start_ai_task_reducer::start_ai_task; +pub use start_ai_task_stage_reducer::start_ai_task_stage; +pub use turn_in_quest_reducer::turn_in_quest; +pub use unpublish_custom_world_profile_reducer::unpublish_custom_world_profile; +pub use upsert_chapter_progression_reducer::upsert_chapter_progression; +pub use upsert_custom_world_profile_reducer::upsert_custom_world_profile; +pub use upsert_npc_state_reducer::upsert_npc_state; +pub use advance_puzzle_next_level_procedure::advance_puzzle_next_level; +pub use append_ai_text_chunk_and_return_procedure::append_ai_text_chunk_and_return; +pub use apply_chapter_progression_ledger_entry_and_return_procedure::apply_chapter_progression_ledger_entry_and_return; +pub use attach_ai_result_reference_and_return_procedure::attach_ai_result_reference_and_return; +pub use begin_story_session_and_return_procedure::begin_story_session_and_return; +pub use bind_asset_object_to_entity_and_return_procedure::bind_asset_object_to_entity_and_return; +pub use cancel_ai_task_and_return_procedure::cancel_ai_task_and_return; +pub use clear_platform_browse_history_and_return_procedure::clear_platform_browse_history_and_return; +pub use compile_big_fish_draft_procedure::compile_big_fish_draft; +pub use compile_custom_world_published_profile_procedure::compile_custom_world_published_profile; +pub use compile_puzzle_agent_draft_procedure::compile_puzzle_agent_draft; +pub use complete_ai_stage_and_return_procedure::complete_ai_stage_and_return; +pub use complete_ai_task_and_return_procedure::complete_ai_task_and_return; +pub use confirm_asset_object_and_return_procedure::confirm_asset_object_and_return; +pub use continue_story_and_return_procedure::continue_story_and_return; +pub use create_ai_task_and_return_procedure::create_ai_task_and_return; +pub use create_battle_state_and_return_procedure::create_battle_state_and_return; +pub use create_big_fish_session_procedure::create_big_fish_session; +pub use create_custom_world_agent_session_procedure::create_custom_world_agent_session; +pub use create_puzzle_agent_session_procedure::create_puzzle_agent_session; +pub use delete_custom_world_profile_and_return_procedure::delete_custom_world_profile_and_return; +pub use delete_runtime_snapshot_and_return_procedure::delete_runtime_snapshot_and_return; +pub use drag_puzzle_piece_or_group_procedure::drag_puzzle_piece_or_group; +pub use execute_custom_world_agent_action_procedure::execute_custom_world_agent_action; +pub use fail_ai_task_and_return_procedure::fail_ai_task_and_return; +pub use finalize_custom_world_agent_message_turn_procedure::finalize_custom_world_agent_message_turn; +pub use generate_big_fish_asset_procedure::generate_big_fish_asset; +pub use get_battle_state_procedure::get_battle_state; +pub use get_big_fish_run_procedure::get_big_fish_run; +pub use get_big_fish_session_procedure::get_big_fish_session; +pub use get_chapter_progression_procedure::get_chapter_progression; +pub use get_custom_world_agent_card_detail_procedure::get_custom_world_agent_card_detail; +pub use get_custom_world_agent_operation_procedure::get_custom_world_agent_operation; +pub use get_custom_world_agent_session_procedure::get_custom_world_agent_session; +pub use get_custom_world_gallery_detail_procedure::get_custom_world_gallery_detail; +pub use get_custom_world_library_detail_procedure::get_custom_world_library_detail; +pub use get_player_progression_or_default_procedure::get_player_progression_or_default; +pub use get_profile_dashboard_procedure::get_profile_dashboard; +pub use get_profile_play_stats_procedure::get_profile_play_stats; +pub use get_puzzle_agent_session_procedure::get_puzzle_agent_session; +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; +pub use get_runtime_inventory_state_procedure::get_runtime_inventory_state; +pub use get_runtime_setting_or_default_procedure::get_runtime_setting_or_default; +pub use get_runtime_snapshot_procedure::get_runtime_snapshot; +pub use get_story_session_state_procedure::get_story_session_state; +pub use grant_player_progression_experience_and_return_procedure::grant_player_progression_experience_and_return; +pub use list_custom_world_gallery_entries_procedure::list_custom_world_gallery_entries; +pub use list_custom_world_profiles_procedure::list_custom_world_profiles; +pub use list_custom_world_works_procedure::list_custom_world_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_gallery_procedure::list_puzzle_gallery; +pub use list_puzzle_works_procedure::list_puzzle_works; +pub use publish_big_fish_game_procedure::publish_big_fish_game; +pub use publish_custom_world_profile_and_return_procedure::publish_custom_world_profile_and_return; +pub use publish_custom_world_world_procedure::publish_custom_world_world; +pub use publish_puzzle_work_procedure::publish_puzzle_work; +pub use resolve_combat_action_and_return_procedure::resolve_combat_action_and_return; +pub use resolve_npc_battle_interaction_and_return_procedure::resolve_npc_battle_interaction_and_return; +pub use resolve_npc_interaction_and_return_procedure::resolve_npc_interaction_and_return; +pub use resolve_npc_social_action_and_return_procedure::resolve_npc_social_action_and_return; +pub use resolve_treasure_interaction_and_return_procedure::resolve_treasure_interaction_and_return; +pub use resume_profile_save_archive_and_return_procedure::resume_profile_save_archive_and_return; +pub use save_puzzle_generated_images_procedure::save_puzzle_generated_images; +pub use select_puzzle_cover_image_procedure::select_puzzle_cover_image; +pub use start_big_fish_run_procedure::start_big_fish_run; +pub use start_puzzle_run_procedure::start_puzzle_run; pub use submit_big_fish_input_procedure::submit_big_fish_input; pub use submit_big_fish_message_procedure::submit_big_fish_message; pub use submit_custom_world_agent_message_procedure::submit_custom_world_agent_message; pub use submit_puzzle_agent_message_procedure::submit_puzzle_agent_message; pub use swap_puzzle_pieces_procedure::swap_puzzle_pieces; -pub use treasure_interaction_action_type::TreasureInteractionAction; -pub use treasure_record_procedure_result_type::TreasureRecordProcedureResult; -pub use treasure_record_snapshot_type::TreasureRecordSnapshot; -pub use treasure_record_table::*; -pub use treasure_record_type::TreasureRecord; -pub use treasure_resolve_input_type::TreasureResolveInput; -pub use turn_in_quest_reducer::turn_in_quest; -pub use unequip_inventory_item_input_type::UnequipInventoryItemInput; pub use unpublish_custom_world_profile_and_return_procedure::unpublish_custom_world_profile_and_return; -pub use unpublish_custom_world_profile_reducer::unpublish_custom_world_profile; pub use update_puzzle_work_procedure::update_puzzle_work; pub use upsert_chapter_progression_and_return_procedure::upsert_chapter_progression_and_return; -pub use upsert_chapter_progression_reducer::upsert_chapter_progression; pub use upsert_custom_world_profile_and_return_procedure::upsert_custom_world_profile_and_return; -pub use upsert_custom_world_profile_reducer::upsert_custom_world_profile; pub use upsert_npc_state_and_return_procedure::upsert_npc_state_and_return; -pub use upsert_npc_state_reducer::upsert_npc_state; pub use upsert_platform_browse_history_and_return_procedure::upsert_platform_browse_history_and_return; pub use upsert_runtime_setting_and_return_procedure::upsert_runtime_setting_and_return; pub use upsert_runtime_snapshot_and_return_procedure::upsert_runtime_snapshot_and_return; -pub use user_browse_history_table::*; -pub use user_browse_history_type::UserBrowseHistory; #[derive(Clone, PartialEq, Debug)] @@ -888,80 +897,81 @@ pub use user_browse_history_type::UserBrowseHistory; /// to indicate which reducer caused the event. pub enum Reducer { - AcceptQuest { + AcceptQuest { input: QuestRecordInput, - }, +} , AcknowledgeQuestCompletion { input: QuestCompletionAckInput, - }, +} , ApplyChapterProgressionLedgerEntry { input: ChapterProgressionLedgerInput, - }, +} , ApplyInventoryMutation { input: InventoryMutationInput, - }, +} , ApplyQuestSignal { input: QuestSignalApplyInput, - }, +} , BeginStorySession { input: StorySessionInput, - }, +} , BindAssetObjectToEntity { input: AssetEntityBindingInput, - }, +} , ConfirmAssetObject { input: AssetObjectUpsertInput, - }, +} , ContinueStory { input: StoryContinueInput, - }, +} , CreateAiTask { input: AiTaskCreateInput, - }, +} , CreateBattleState { input: BattleStateInput, - }, +} , GrantPlayerProgressionExperience { input: PlayerProgressionGrantInput, - }, +} , PublishCustomWorldProfile { input: CustomWorldProfilePublishInput, - }, +} , ResolveCombatAction { input: ResolveCombatActionInput, - }, +} , ResolveNpcInteraction { input: ResolveNpcInteractionInput, - }, +} , ResolveNpcSocialAction { input: ResolveNpcSocialActionInput, - }, +} , ResolveTreasureInteraction { input: TreasureResolveInput, - }, +} , StartAiTask { input: AiTaskStartInput, - }, +} , StartAiTaskStage { input: AiTaskStageStartInput, - }, +} , TurnInQuest { input: QuestTurnInInput, - }, +} , UnpublishCustomWorldProfile { input: CustomWorldProfileUnpublishInput, - }, +} , UpsertChapterProgression { input: ChapterProgressionInput, - }, +} , UpsertCustomWorldProfile { input: CustomWorldProfileUpsertInput, - }, +} , UpsertNpcState { input: NpcStateUpsertInput, - }, +} , } + impl __sdk::InModule for Reducer { type Module = RemoteModule; } @@ -969,11 +979,9 @@ impl __sdk::InModule for Reducer { impl __sdk::Reducer for Reducer { fn reducer_name(&self) -> &'static str { match self { - Reducer::AcceptQuest { .. } => "accept_quest", + Reducer::AcceptQuest { .. } => "accept_quest", Reducer::AcknowledgeQuestCompletion { .. } => "acknowledge_quest_completion", - Reducer::ApplyChapterProgressionLedgerEntry { .. } => { - "apply_chapter_progression_ledger_entry" - } + Reducer::ApplyChapterProgressionLedgerEntry { .. } => "apply_chapter_progression_ledger_entry", Reducer::ApplyInventoryMutation { .. } => "apply_inventory_mutation", Reducer::ApplyQuestSignal { .. } => "apply_quest_signal", Reducer::BeginStorySession { .. } => "begin_story_session", @@ -982,9 +990,7 @@ impl __sdk::Reducer for Reducer { Reducer::ContinueStory { .. } => "continue_story", Reducer::CreateAiTask { .. } => "create_ai_task", Reducer::CreateBattleState { .. } => "create_battle_state", - Reducer::GrantPlayerProgressionExperience { .. } => { - "grant_player_progression_experience" - } + Reducer::GrantPlayerProgressionExperience { .. } => "grant_player_progression_experience", Reducer::PublishCustomWorldProfile { .. } => "publish_custom_world_profile", Reducer::ResolveCombatAction { .. } => "resolve_combat_action", Reducer::ResolveNpcInteraction { .. } => "resolve_npc_interaction", @@ -998,10 +1004,10 @@ impl __sdk::Reducer for Reducer { Reducer::UpsertCustomWorldProfile { .. } => "upsert_custom_world_profile", Reducer::UpsertNpcState { .. } => "upsert_npc_state", _ => unreachable!(), - } - } +} +} #[allow(clippy::clone_on_copy)] - fn args_bsatn(&self) -> Result, __sats::bsatn::EncodeError> { +fn args_bsatn(&self) -> Result, __sats::bsatn::EncodeError> { match self { Reducer::AcceptQuest{ input, @@ -1125,14 +1131,14 @@ impl __sdk::Reducer for Reducer { }), _ => unreachable!(), } - } +} } #[derive(Default, Debug)] #[allow(non_snake_case)] #[doc(hidden)] pub struct DbUpdate { - ai_result_reference: __sdk::TableUpdate, + ai_result_reference: __sdk::TableUpdate, ai_task: __sdk::TableUpdate, ai_task_stage: __sdk::TableUpdate, ai_text_chunk: __sdk::TableUpdate, @@ -1172,134 +1178,59 @@ pub struct DbUpdate { user_browse_history: __sdk::TableUpdate, } + impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate { type Error = __sdk::Error; fn try_from(raw: __ws::v2::TransactionUpdate) -> Result { let mut db_update = DbUpdate::default(); for table_update in __sdk::transaction_update_iter_table_updates(raw) { match &table_update.table_name[..] { - "ai_result_reference" => db_update - .ai_result_reference - .append(ai_result_reference_table::parse_table_update(table_update)?), - "ai_task" => db_update - .ai_task - .append(ai_task_table::parse_table_update(table_update)?), - "ai_task_stage" => db_update - .ai_task_stage - .append(ai_task_stage_table::parse_table_update(table_update)?), - "ai_text_chunk" => db_update - .ai_text_chunk - .append(ai_text_chunk_table::parse_table_update(table_update)?), - "asset_entity_binding" => db_update.asset_entity_binding.append( - asset_entity_binding_table::parse_table_update(table_update)?, - ), - "asset_object" => db_update - .asset_object - .append(asset_object_table::parse_table_update(table_update)?), - "battle_state" => db_update - .battle_state - .append(battle_state_table::parse_table_update(table_update)?), - "big_fish_agent_message" => db_update.big_fish_agent_message.append( - big_fish_agent_message_table::parse_table_update(table_update)?, - ), - "big_fish_asset_slot" => db_update - .big_fish_asset_slot - .append(big_fish_asset_slot_table::parse_table_update(table_update)?), - "big_fish_creation_session" => db_update.big_fish_creation_session.append( - big_fish_creation_session_table::parse_table_update(table_update)?, - ), - "big_fish_runtime_run" => db_update.big_fish_runtime_run.append( - big_fish_runtime_run_table::parse_table_update(table_update)?, - ), - "chapter_progression" => db_update - .chapter_progression - .append(chapter_progression_table::parse_table_update(table_update)?), - "custom_world_agent_message" => db_update.custom_world_agent_message.append( - custom_world_agent_message_table::parse_table_update(table_update)?, - ), - "custom_world_agent_operation" => db_update.custom_world_agent_operation.append( - custom_world_agent_operation_table::parse_table_update(table_update)?, - ), - "custom_world_agent_session" => db_update.custom_world_agent_session.append( - custom_world_agent_session_table::parse_table_update(table_update)?, - ), - "custom_world_draft_card" => db_update.custom_world_draft_card.append( - custom_world_draft_card_table::parse_table_update(table_update)?, - ), - "custom_world_gallery_entry" => db_update.custom_world_gallery_entry.append( - custom_world_gallery_entry_table::parse_table_update(table_update)?, - ), - "custom_world_profile" => db_update.custom_world_profile.append( - custom_world_profile_table::parse_table_update(table_update)?, - ), - "custom_world_session" => db_update.custom_world_session.append( - custom_world_session_table::parse_table_update(table_update)?, - ), - "inventory_slot" => db_update - .inventory_slot - .append(inventory_slot_table::parse_table_update(table_update)?), - "npc_state" => db_update - .npc_state - .append(npc_state_table::parse_table_update(table_update)?), - "player_progression" => db_update - .player_progression - .append(player_progression_table::parse_table_update(table_update)?), - "profile_dashboard_state" => db_update.profile_dashboard_state.append( - profile_dashboard_state_table::parse_table_update(table_update)?, - ), - "profile_played_world" => db_update.profile_played_world.append( - profile_played_world_table::parse_table_update(table_update)?, - ), - "profile_save_archive" => db_update.profile_save_archive.append( - profile_save_archive_table::parse_table_update(table_update)?, - ), - "profile_wallet_ledger" => db_update.profile_wallet_ledger.append( - profile_wallet_ledger_table::parse_table_update(table_update)?, - ), - "puzzle_agent_message" => db_update.puzzle_agent_message.append( - puzzle_agent_message_table::parse_table_update(table_update)?, - ), - "puzzle_agent_session" => db_update.puzzle_agent_session.append( - puzzle_agent_session_table::parse_table_update(table_update)?, - ), - "puzzle_runtime_run" => db_update - .puzzle_runtime_run - .append(puzzle_runtime_run_table::parse_table_update(table_update)?), - "puzzle_work_profile" => db_update - .puzzle_work_profile - .append(puzzle_work_profile_table::parse_table_update(table_update)?), - "quest_log" => db_update - .quest_log - .append(quest_log_table::parse_table_update(table_update)?), - "quest_record" => db_update - .quest_record - .append(quest_record_table::parse_table_update(table_update)?), - "runtime_setting" => db_update - .runtime_setting - .append(runtime_setting_table::parse_table_update(table_update)?), - "runtime_snapshot" => db_update - .runtime_snapshot - .append(runtime_snapshot_table::parse_table_update(table_update)?), - "story_event" => db_update - .story_event - .append(story_event_table::parse_table_update(table_update)?), - "story_session" => db_update - .story_session - .append(story_session_table::parse_table_update(table_update)?), - "treasure_record" => db_update - .treasure_record - .append(treasure_record_table::parse_table_update(table_update)?), - "user_browse_history" => db_update - .user_browse_history - .append(user_browse_history_table::parse_table_update(table_update)?), + + "ai_result_reference" => db_update.ai_result_reference.append(ai_result_reference_table::parse_table_update(table_update)?), + "ai_task" => db_update.ai_task.append(ai_task_table::parse_table_update(table_update)?), + "ai_task_stage" => db_update.ai_task_stage.append(ai_task_stage_table::parse_table_update(table_update)?), + "ai_text_chunk" => db_update.ai_text_chunk.append(ai_text_chunk_table::parse_table_update(table_update)?), + "asset_entity_binding" => db_update.asset_entity_binding.append(asset_entity_binding_table::parse_table_update(table_update)?), + "asset_object" => db_update.asset_object.append(asset_object_table::parse_table_update(table_update)?), + "battle_state" => db_update.battle_state.append(battle_state_table::parse_table_update(table_update)?), + "big_fish_agent_message" => db_update.big_fish_agent_message.append(big_fish_agent_message_table::parse_table_update(table_update)?), + "big_fish_asset_slot" => db_update.big_fish_asset_slot.append(big_fish_asset_slot_table::parse_table_update(table_update)?), + "big_fish_creation_session" => db_update.big_fish_creation_session.append(big_fish_creation_session_table::parse_table_update(table_update)?), + "big_fish_runtime_run" => db_update.big_fish_runtime_run.append(big_fish_runtime_run_table::parse_table_update(table_update)?), + "chapter_progression" => db_update.chapter_progression.append(chapter_progression_table::parse_table_update(table_update)?), + "custom_world_agent_message" => db_update.custom_world_agent_message.append(custom_world_agent_message_table::parse_table_update(table_update)?), + "custom_world_agent_operation" => db_update.custom_world_agent_operation.append(custom_world_agent_operation_table::parse_table_update(table_update)?), + "custom_world_agent_session" => db_update.custom_world_agent_session.append(custom_world_agent_session_table::parse_table_update(table_update)?), + "custom_world_draft_card" => db_update.custom_world_draft_card.append(custom_world_draft_card_table::parse_table_update(table_update)?), + "custom_world_gallery_entry" => db_update.custom_world_gallery_entry.append(custom_world_gallery_entry_table::parse_table_update(table_update)?), + "custom_world_profile" => db_update.custom_world_profile.append(custom_world_profile_table::parse_table_update(table_update)?), + "custom_world_session" => db_update.custom_world_session.append(custom_world_session_table::parse_table_update(table_update)?), + "inventory_slot" => db_update.inventory_slot.append(inventory_slot_table::parse_table_update(table_update)?), + "npc_state" => db_update.npc_state.append(npc_state_table::parse_table_update(table_update)?), + "player_progression" => db_update.player_progression.append(player_progression_table::parse_table_update(table_update)?), + "profile_dashboard_state" => db_update.profile_dashboard_state.append(profile_dashboard_state_table::parse_table_update(table_update)?), + "profile_played_world" => db_update.profile_played_world.append(profile_played_world_table::parse_table_update(table_update)?), + "profile_save_archive" => db_update.profile_save_archive.append(profile_save_archive_table::parse_table_update(table_update)?), + "profile_wallet_ledger" => db_update.profile_wallet_ledger.append(profile_wallet_ledger_table::parse_table_update(table_update)?), + "puzzle_agent_message" => db_update.puzzle_agent_message.append(puzzle_agent_message_table::parse_table_update(table_update)?), + "puzzle_agent_session" => db_update.puzzle_agent_session.append(puzzle_agent_session_table::parse_table_update(table_update)?), + "puzzle_runtime_run" => db_update.puzzle_runtime_run.append(puzzle_runtime_run_table::parse_table_update(table_update)?), + "puzzle_work_profile" => db_update.puzzle_work_profile.append(puzzle_work_profile_table::parse_table_update(table_update)?), + "quest_log" => db_update.quest_log.append(quest_log_table::parse_table_update(table_update)?), + "quest_record" => db_update.quest_record.append(quest_record_table::parse_table_update(table_update)?), + "runtime_setting" => db_update.runtime_setting.append(runtime_setting_table::parse_table_update(table_update)?), + "runtime_snapshot" => db_update.runtime_snapshot.append(runtime_snapshot_table::parse_table_update(table_update)?), + "story_event" => db_update.story_event.append(story_event_table::parse_table_update(table_update)?), + "story_session" => db_update.story_session.append(story_session_table::parse_table_update(table_update)?), + "treasure_record" => db_update.treasure_record.append(treasure_record_table::parse_table_update(table_update)?), + "user_browse_history" => db_update.user_browse_history.append(user_browse_history_table::parse_table_update(table_update)?), unknown => { return Err(__sdk::InternalError::unknown_name( "table", unknown, "DatabaseUpdate", - ) - .into()); + ).into()); } } } @@ -1312,462 +1243,147 @@ impl __sdk::InModule for DbUpdate { } impl __sdk::DbUpdate for DbUpdate { - fn apply_to_client_cache( - &self, - cache: &mut __sdk::ClientCache, - ) -> AppliedDiff<'_> { - let mut diff = AppliedDiff::default(); + fn apply_to_client_cache(&self, cache: &mut __sdk::ClientCache) -> AppliedDiff<'_> { + let mut diff = AppliedDiff::default(); + + diff.ai_result_reference = cache.apply_diff_to_table::("ai_result_reference", &self.ai_result_reference).with_updates_by_pk(|row| &row.result_reference_row_id); + diff.ai_task = cache.apply_diff_to_table::("ai_task", &self.ai_task).with_updates_by_pk(|row| &row.task_id); + diff.ai_task_stage = cache.apply_diff_to_table::("ai_task_stage", &self.ai_task_stage).with_updates_by_pk(|row| &row.task_stage_id); + diff.ai_text_chunk = cache.apply_diff_to_table::("ai_text_chunk", &self.ai_text_chunk).with_updates_by_pk(|row| &row.text_chunk_row_id); + diff.asset_entity_binding = cache.apply_diff_to_table::("asset_entity_binding", &self.asset_entity_binding).with_updates_by_pk(|row| &row.binding_id); + diff.asset_object = cache.apply_diff_to_table::("asset_object", &self.asset_object).with_updates_by_pk(|row| &row.asset_object_id); + diff.battle_state = cache.apply_diff_to_table::("battle_state", &self.battle_state).with_updates_by_pk(|row| &row.battle_state_id); + diff.big_fish_agent_message = cache.apply_diff_to_table::("big_fish_agent_message", &self.big_fish_agent_message).with_updates_by_pk(|row| &row.message_id); + diff.big_fish_asset_slot = cache.apply_diff_to_table::("big_fish_asset_slot", &self.big_fish_asset_slot).with_updates_by_pk(|row| &row.slot_id); + diff.big_fish_creation_session = cache.apply_diff_to_table::("big_fish_creation_session", &self.big_fish_creation_session).with_updates_by_pk(|row| &row.session_id); + diff.big_fish_runtime_run = cache.apply_diff_to_table::("big_fish_runtime_run", &self.big_fish_runtime_run).with_updates_by_pk(|row| &row.run_id); + diff.chapter_progression = cache.apply_diff_to_table::("chapter_progression", &self.chapter_progression).with_updates_by_pk(|row| &row.chapter_progression_id); + diff.custom_world_agent_message = cache.apply_diff_to_table::("custom_world_agent_message", &self.custom_world_agent_message).with_updates_by_pk(|row| &row.message_id); + diff.custom_world_agent_operation = cache.apply_diff_to_table::("custom_world_agent_operation", &self.custom_world_agent_operation).with_updates_by_pk(|row| &row.operation_id); + diff.custom_world_agent_session = cache.apply_diff_to_table::("custom_world_agent_session", &self.custom_world_agent_session).with_updates_by_pk(|row| &row.session_id); + diff.custom_world_draft_card = cache.apply_diff_to_table::("custom_world_draft_card", &self.custom_world_draft_card).with_updates_by_pk(|row| &row.card_id); + diff.custom_world_gallery_entry = cache.apply_diff_to_table::("custom_world_gallery_entry", &self.custom_world_gallery_entry).with_updates_by_pk(|row| &row.profile_id); + diff.custom_world_profile = cache.apply_diff_to_table::("custom_world_profile", &self.custom_world_profile).with_updates_by_pk(|row| &row.profile_id); + diff.custom_world_session = cache.apply_diff_to_table::("custom_world_session", &self.custom_world_session).with_updates_by_pk(|row| &row.session_id); + diff.inventory_slot = cache.apply_diff_to_table::("inventory_slot", &self.inventory_slot).with_updates_by_pk(|row| &row.slot_id); + diff.npc_state = cache.apply_diff_to_table::("npc_state", &self.npc_state).with_updates_by_pk(|row| &row.npc_state_id); + diff.player_progression = cache.apply_diff_to_table::("player_progression", &self.player_progression).with_updates_by_pk(|row| &row.user_id); + diff.profile_dashboard_state = cache.apply_diff_to_table::("profile_dashboard_state", &self.profile_dashboard_state).with_updates_by_pk(|row| &row.user_id); + diff.profile_played_world = cache.apply_diff_to_table::("profile_played_world", &self.profile_played_world).with_updates_by_pk(|row| &row.played_world_id); + diff.profile_save_archive = cache.apply_diff_to_table::("profile_save_archive", &self.profile_save_archive).with_updates_by_pk(|row| &row.archive_id); + diff.profile_wallet_ledger = cache.apply_diff_to_table::("profile_wallet_ledger", &self.profile_wallet_ledger).with_updates_by_pk(|row| &row.wallet_ledger_id); + diff.puzzle_agent_message = cache.apply_diff_to_table::("puzzle_agent_message", &self.puzzle_agent_message).with_updates_by_pk(|row| &row.message_id); + diff.puzzle_agent_session = cache.apply_diff_to_table::("puzzle_agent_session", &self.puzzle_agent_session).with_updates_by_pk(|row| &row.session_id); + diff.puzzle_runtime_run = cache.apply_diff_to_table::("puzzle_runtime_run", &self.puzzle_runtime_run).with_updates_by_pk(|row| &row.run_id); + diff.puzzle_work_profile = cache.apply_diff_to_table::("puzzle_work_profile", &self.puzzle_work_profile).with_updates_by_pk(|row| &row.profile_id); + diff.quest_log = cache.apply_diff_to_table::("quest_log", &self.quest_log).with_updates_by_pk(|row| &row.log_id); + diff.quest_record = cache.apply_diff_to_table::("quest_record", &self.quest_record).with_updates_by_pk(|row| &row.quest_id); + diff.runtime_setting = cache.apply_diff_to_table::("runtime_setting", &self.runtime_setting).with_updates_by_pk(|row| &row.user_id); + diff.runtime_snapshot = cache.apply_diff_to_table::("runtime_snapshot", &self.runtime_snapshot).with_updates_by_pk(|row| &row.user_id); + diff.story_event = cache.apply_diff_to_table::("story_event", &self.story_event).with_updates_by_pk(|row| &row.event_id); + diff.story_session = cache.apply_diff_to_table::("story_session", &self.story_session).with_updates_by_pk(|row| &row.story_session_id); + diff.treasure_record = cache.apply_diff_to_table::("treasure_record", &self.treasure_record).with_updates_by_pk(|row| &row.treasure_record_id); + diff.user_browse_history = cache.apply_diff_to_table::("user_browse_history", &self.user_browse_history).with_updates_by_pk(|row| &row.browse_history_id); - diff.ai_result_reference = cache - .apply_diff_to_table::( - "ai_result_reference", - &self.ai_result_reference, - ) - .with_updates_by_pk(|row| &row.result_reference_row_id); - diff.ai_task = cache - .apply_diff_to_table::("ai_task", &self.ai_task) - .with_updates_by_pk(|row| &row.task_id); - diff.ai_task_stage = cache - .apply_diff_to_table::("ai_task_stage", &self.ai_task_stage) - .with_updates_by_pk(|row| &row.task_stage_id); - diff.ai_text_chunk = cache - .apply_diff_to_table::("ai_text_chunk", &self.ai_text_chunk) - .with_updates_by_pk(|row| &row.text_chunk_row_id); - diff.asset_entity_binding = cache - .apply_diff_to_table::( - "asset_entity_binding", - &self.asset_entity_binding, - ) - .with_updates_by_pk(|row| &row.binding_id); - diff.asset_object = cache - .apply_diff_to_table::("asset_object", &self.asset_object) - .with_updates_by_pk(|row| &row.asset_object_id); - diff.battle_state = cache - .apply_diff_to_table::("battle_state", &self.battle_state) - .with_updates_by_pk(|row| &row.battle_state_id); - diff.big_fish_agent_message = cache - .apply_diff_to_table::( - "big_fish_agent_message", - &self.big_fish_agent_message, - ) - .with_updates_by_pk(|row| &row.message_id); - diff.big_fish_asset_slot = cache - .apply_diff_to_table::( - "big_fish_asset_slot", - &self.big_fish_asset_slot, - ) - .with_updates_by_pk(|row| &row.slot_id); - diff.big_fish_creation_session = cache - .apply_diff_to_table::( - "big_fish_creation_session", - &self.big_fish_creation_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.big_fish_runtime_run = cache - .apply_diff_to_table::( - "big_fish_runtime_run", - &self.big_fish_runtime_run, - ) - .with_updates_by_pk(|row| &row.run_id); - diff.chapter_progression = cache - .apply_diff_to_table::( - "chapter_progression", - &self.chapter_progression, - ) - .with_updates_by_pk(|row| &row.chapter_progression_id); - diff.custom_world_agent_message = cache - .apply_diff_to_table::( - "custom_world_agent_message", - &self.custom_world_agent_message, - ) - .with_updates_by_pk(|row| &row.message_id); - diff.custom_world_agent_operation = cache - .apply_diff_to_table::( - "custom_world_agent_operation", - &self.custom_world_agent_operation, - ) - .with_updates_by_pk(|row| &row.operation_id); - diff.custom_world_agent_session = cache - .apply_diff_to_table::( - "custom_world_agent_session", - &self.custom_world_agent_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.custom_world_draft_card = cache - .apply_diff_to_table::( - "custom_world_draft_card", - &self.custom_world_draft_card, - ) - .with_updates_by_pk(|row| &row.card_id); - diff.custom_world_gallery_entry = cache - .apply_diff_to_table::( - "custom_world_gallery_entry", - &self.custom_world_gallery_entry, - ) - .with_updates_by_pk(|row| &row.profile_id); - diff.custom_world_profile = cache - .apply_diff_to_table::( - "custom_world_profile", - &self.custom_world_profile, - ) - .with_updates_by_pk(|row| &row.profile_id); - diff.custom_world_session = cache - .apply_diff_to_table::( - "custom_world_session", - &self.custom_world_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.inventory_slot = cache - .apply_diff_to_table::("inventory_slot", &self.inventory_slot) - .with_updates_by_pk(|row| &row.slot_id); - diff.npc_state = cache - .apply_diff_to_table::("npc_state", &self.npc_state) - .with_updates_by_pk(|row| &row.npc_state_id); - diff.player_progression = cache - .apply_diff_to_table::( - "player_progression", - &self.player_progression, - ) - .with_updates_by_pk(|row| &row.user_id); - diff.profile_dashboard_state = cache - .apply_diff_to_table::( - "profile_dashboard_state", - &self.profile_dashboard_state, - ) - .with_updates_by_pk(|row| &row.user_id); - diff.profile_played_world = cache - .apply_diff_to_table::( - "profile_played_world", - &self.profile_played_world, - ) - .with_updates_by_pk(|row| &row.played_world_id); - diff.profile_save_archive = cache - .apply_diff_to_table::( - "profile_save_archive", - &self.profile_save_archive, - ) - .with_updates_by_pk(|row| &row.archive_id); - diff.profile_wallet_ledger = cache - .apply_diff_to_table::( - "profile_wallet_ledger", - &self.profile_wallet_ledger, - ) - .with_updates_by_pk(|row| &row.wallet_ledger_id); - diff.puzzle_agent_message = cache - .apply_diff_to_table::( - "puzzle_agent_message", - &self.puzzle_agent_message, - ) - .with_updates_by_pk(|row| &row.message_id); - diff.puzzle_agent_session = cache - .apply_diff_to_table::( - "puzzle_agent_session", - &self.puzzle_agent_session, - ) - .with_updates_by_pk(|row| &row.session_id); - diff.puzzle_runtime_run = cache - .apply_diff_to_table::( - "puzzle_runtime_run", - &self.puzzle_runtime_run, - ) - .with_updates_by_pk(|row| &row.run_id); - diff.puzzle_work_profile = cache - .apply_diff_to_table::( - "puzzle_work_profile", - &self.puzzle_work_profile, - ) - .with_updates_by_pk(|row| &row.profile_id); - diff.quest_log = cache - .apply_diff_to_table::("quest_log", &self.quest_log) - .with_updates_by_pk(|row| &row.log_id); - diff.quest_record = cache - .apply_diff_to_table::("quest_record", &self.quest_record) - .with_updates_by_pk(|row| &row.quest_id); - diff.runtime_setting = cache - .apply_diff_to_table::("runtime_setting", &self.runtime_setting) - .with_updates_by_pk(|row| &row.user_id); - diff.runtime_snapshot = cache - .apply_diff_to_table::("runtime_snapshot", &self.runtime_snapshot) - .with_updates_by_pk(|row| &row.user_id); - diff.story_event = cache - .apply_diff_to_table::("story_event", &self.story_event) - .with_updates_by_pk(|row| &row.event_id); - diff.story_session = cache - .apply_diff_to_table::("story_session", &self.story_session) - .with_updates_by_pk(|row| &row.story_session_id); - diff.treasure_record = cache - .apply_diff_to_table::("treasure_record", &self.treasure_record) - .with_updates_by_pk(|row| &row.treasure_record_id); - diff.user_browse_history = cache - .apply_diff_to_table::( - "user_browse_history", - &self.user_browse_history, - ) - .with_updates_by_pk(|row| &row.browse_history_id); - - diff - } - fn parse_initial_rows(raw: __ws::v2::QueryRows) -> __sdk::Result { - let mut db_update = DbUpdate::default(); - for table_rows in raw.tables { - match &table_rows.table[..] { - "ai_result_reference" => db_update - .ai_result_reference - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "ai_task" => db_update - .ai_task - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "ai_task_stage" => db_update - .ai_task_stage - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "ai_text_chunk" => db_update - .ai_text_chunk - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "asset_entity_binding" => db_update - .asset_entity_binding - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "asset_object" => db_update - .asset_object - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "battle_state" => db_update - .battle_state - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "big_fish_agent_message" => db_update - .big_fish_agent_message - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "big_fish_asset_slot" => db_update - .big_fish_asset_slot - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "big_fish_creation_session" => db_update - .big_fish_creation_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "big_fish_runtime_run" => db_update - .big_fish_runtime_run - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "chapter_progression" => db_update - .chapter_progression - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_agent_message" => db_update - .custom_world_agent_message - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_agent_operation" => db_update - .custom_world_agent_operation - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_agent_session" => db_update - .custom_world_agent_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_draft_card" => db_update - .custom_world_draft_card - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_gallery_entry" => db_update - .custom_world_gallery_entry - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_profile" => db_update - .custom_world_profile - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "custom_world_session" => db_update - .custom_world_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "inventory_slot" => db_update - .inventory_slot - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "npc_state" => db_update - .npc_state - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "player_progression" => db_update - .player_progression - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "profile_dashboard_state" => db_update - .profile_dashboard_state - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "profile_played_world" => db_update - .profile_played_world - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "profile_save_archive" => db_update - .profile_save_archive - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "profile_wallet_ledger" => db_update - .profile_wallet_ledger - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_agent_message" => db_update - .puzzle_agent_message - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_agent_session" => db_update - .puzzle_agent_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_runtime_run" => db_update - .puzzle_runtime_run - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "puzzle_work_profile" => db_update - .puzzle_work_profile - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "quest_log" => db_update - .quest_log - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "quest_record" => db_update - .quest_record - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "runtime_setting" => db_update - .runtime_setting - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "runtime_snapshot" => db_update - .runtime_snapshot - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "story_event" => db_update - .story_event - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "story_session" => db_update - .story_session - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "treasure_record" => db_update - .treasure_record - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - "user_browse_history" => db_update - .user_browse_history - .append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), - unknown => { - return Err( - __sdk::InternalError::unknown_name("table", unknown, "QueryRows").into(), - ); + diff } - } - } - Ok(db_update) - } - fn parse_unsubscribe_rows(raw: __ws::v2::QueryRows) -> __sdk::Result { - let mut db_update = DbUpdate::default(); - for table_rows in raw.tables { +fn parse_initial_rows(raw: __ws::v2::QueryRows) -> __sdk::Result { + let mut db_update = DbUpdate::default(); +for table_rows in raw.tables { match &table_rows.table[..] { - "ai_result_reference" => db_update - .ai_result_reference - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "ai_task" => db_update - .ai_task - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "ai_task_stage" => db_update - .ai_task_stage - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "ai_text_chunk" => db_update - .ai_text_chunk - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "asset_entity_binding" => db_update - .asset_entity_binding - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "asset_object" => db_update - .asset_object - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "battle_state" => db_update - .battle_state - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "big_fish_agent_message" => db_update - .big_fish_agent_message - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "big_fish_asset_slot" => db_update - .big_fish_asset_slot - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "big_fish_creation_session" => db_update - .big_fish_creation_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "big_fish_runtime_run" => db_update - .big_fish_runtime_run - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "chapter_progression" => db_update - .chapter_progression - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_agent_message" => db_update - .custom_world_agent_message - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_agent_operation" => db_update - .custom_world_agent_operation - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_agent_session" => db_update - .custom_world_agent_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_draft_card" => db_update - .custom_world_draft_card - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_gallery_entry" => db_update - .custom_world_gallery_entry - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_profile" => db_update - .custom_world_profile - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "custom_world_session" => db_update - .custom_world_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "inventory_slot" => db_update - .inventory_slot - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "npc_state" => db_update - .npc_state - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "player_progression" => db_update - .player_progression - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "profile_dashboard_state" => db_update - .profile_dashboard_state - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "profile_played_world" => db_update - .profile_played_world - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "profile_save_archive" => db_update - .profile_save_archive - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "profile_wallet_ledger" => db_update - .profile_wallet_ledger - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_agent_message" => db_update - .puzzle_agent_message - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_agent_session" => db_update - .puzzle_agent_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_runtime_run" => db_update - .puzzle_runtime_run - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "puzzle_work_profile" => db_update - .puzzle_work_profile - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "quest_log" => db_update - .quest_log - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "quest_record" => db_update - .quest_record - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "runtime_setting" => db_update - .runtime_setting - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "runtime_snapshot" => db_update - .runtime_snapshot - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "story_event" => db_update - .story_event - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "story_session" => db_update - .story_session - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "treasure_record" => db_update - .treasure_record - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - "user_browse_history" => db_update - .user_browse_history - .append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), - unknown => { - return Err( - __sdk::InternalError::unknown_name("table", unknown, "QueryRows").into(), - ); - } - } - } - Ok(db_update) - } + "ai_result_reference" => db_update.ai_result_reference.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "ai_task" => db_update.ai_task.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "ai_task_stage" => db_update.ai_task_stage.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "ai_text_chunk" => db_update.ai_text_chunk.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "asset_entity_binding" => db_update.asset_entity_binding.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "asset_object" => db_update.asset_object.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "battle_state" => db_update.battle_state.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "big_fish_agent_message" => db_update.big_fish_agent_message.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "big_fish_asset_slot" => db_update.big_fish_asset_slot.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "big_fish_creation_session" => db_update.big_fish_creation_session.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "big_fish_runtime_run" => db_update.big_fish_runtime_run.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "chapter_progression" => db_update.chapter_progression.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "custom_world_agent_message" => db_update.custom_world_agent_message.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "custom_world_agent_operation" => db_update.custom_world_agent_operation.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "custom_world_agent_session" => db_update.custom_world_agent_session.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "custom_world_draft_card" => db_update.custom_world_draft_card.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "custom_world_gallery_entry" => db_update.custom_world_gallery_entry.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "custom_world_profile" => db_update.custom_world_profile.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "custom_world_session" => db_update.custom_world_session.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "inventory_slot" => db_update.inventory_slot.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "npc_state" => db_update.npc_state.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "player_progression" => db_update.player_progression.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "profile_dashboard_state" => db_update.profile_dashboard_state.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "profile_played_world" => db_update.profile_played_world.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "profile_save_archive" => db_update.profile_save_archive.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "profile_wallet_ledger" => db_update.profile_wallet_ledger.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "puzzle_agent_message" => db_update.puzzle_agent_message.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "puzzle_agent_session" => db_update.puzzle_agent_session.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "puzzle_runtime_run" => db_update.puzzle_runtime_run.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "puzzle_work_profile" => db_update.puzzle_work_profile.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "quest_log" => db_update.quest_log.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "quest_record" => db_update.quest_record.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "runtime_setting" => db_update.runtime_setting.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "runtime_snapshot" => db_update.runtime_snapshot.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "story_event" => db_update.story_event.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "story_session" => db_update.story_session.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "treasure_record" => db_update.treasure_record.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + "user_browse_history" => db_update.user_browse_history.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?), + unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into()); } +}} Ok(db_update) +} +fn parse_unsubscribe_rows(raw: __ws::v2::QueryRows) -> __sdk::Result { + let mut db_update = DbUpdate::default(); +for table_rows in raw.tables { + match &table_rows.table[..] { + "ai_result_reference" => db_update.ai_result_reference.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "ai_task" => db_update.ai_task.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "ai_task_stage" => db_update.ai_task_stage.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "ai_text_chunk" => db_update.ai_text_chunk.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "asset_entity_binding" => db_update.asset_entity_binding.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "asset_object" => db_update.asset_object.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "battle_state" => db_update.battle_state.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "big_fish_agent_message" => db_update.big_fish_agent_message.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "big_fish_asset_slot" => db_update.big_fish_asset_slot.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "big_fish_creation_session" => db_update.big_fish_creation_session.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "big_fish_runtime_run" => db_update.big_fish_runtime_run.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "chapter_progression" => db_update.chapter_progression.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "custom_world_agent_message" => db_update.custom_world_agent_message.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "custom_world_agent_operation" => db_update.custom_world_agent_operation.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "custom_world_agent_session" => db_update.custom_world_agent_session.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "custom_world_draft_card" => db_update.custom_world_draft_card.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "custom_world_gallery_entry" => db_update.custom_world_gallery_entry.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "custom_world_profile" => db_update.custom_world_profile.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "custom_world_session" => db_update.custom_world_session.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "inventory_slot" => db_update.inventory_slot.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "npc_state" => db_update.npc_state.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "player_progression" => db_update.player_progression.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "profile_dashboard_state" => db_update.profile_dashboard_state.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "profile_played_world" => db_update.profile_played_world.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "profile_save_archive" => db_update.profile_save_archive.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "profile_wallet_ledger" => db_update.profile_wallet_ledger.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "puzzle_agent_message" => db_update.puzzle_agent_message.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "puzzle_agent_session" => db_update.puzzle_agent_session.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "puzzle_runtime_run" => db_update.puzzle_runtime_run.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "puzzle_work_profile" => db_update.puzzle_work_profile.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "quest_log" => db_update.quest_log.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "quest_record" => db_update.quest_record.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "runtime_setting" => db_update.runtime_setting.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "runtime_snapshot" => db_update.runtime_snapshot.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "story_event" => db_update.story_event.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "story_session" => db_update.story_session.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "treasure_record" => db_update.treasure_record.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + "user_browse_history" => db_update.user_browse_history.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?), + unknown => { return Err(__sdk::InternalError::unknown_name("table", unknown, "QueryRows").into()); } +}} Ok(db_update) +} } #[derive(Default)] #[allow(non_snake_case)] #[doc(hidden)] pub struct AppliedDiff<'r> { - ai_result_reference: __sdk::TableAppliedDiff<'r, AiResultReference>, + ai_result_reference: __sdk::TableAppliedDiff<'r, AiResultReference>, ai_task: __sdk::TableAppliedDiff<'r, AiTask>, ai_task_stage: __sdk::TableAppliedDiff<'r, AiTaskStage>, ai_text_chunk: __sdk::TableAppliedDiff<'r, AiTextChunk>, @@ -1808,192 +1424,54 @@ pub struct AppliedDiff<'r> { __unused: std::marker::PhantomData<&'r ()>, } + impl __sdk::InModule for AppliedDiff<'_> { type Module = RemoteModule; } impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> { - fn invoke_row_callbacks( - &self, - event: &EventContext, - callbacks: &mut __sdk::DbCallbacks, - ) { - callbacks.invoke_table_row_callbacks::( - "ai_result_reference", - &self.ai_result_reference, - event, - ); + fn invoke_row_callbacks(&self, event: &EventContext, callbacks: &mut __sdk::DbCallbacks) { + callbacks.invoke_table_row_callbacks::("ai_result_reference", &self.ai_result_reference, event); callbacks.invoke_table_row_callbacks::("ai_task", &self.ai_task, event); - callbacks.invoke_table_row_callbacks::( - "ai_task_stage", - &self.ai_task_stage, - event, - ); - callbacks.invoke_table_row_callbacks::( - "ai_text_chunk", - &self.ai_text_chunk, - event, - ); - callbacks.invoke_table_row_callbacks::( - "asset_entity_binding", - &self.asset_entity_binding, - event, - ); - callbacks.invoke_table_row_callbacks::( - "asset_object", - &self.asset_object, - event, - ); - callbacks.invoke_table_row_callbacks::( - "battle_state", - &self.battle_state, - event, - ); - callbacks.invoke_table_row_callbacks::( - "big_fish_agent_message", - &self.big_fish_agent_message, - event, - ); - callbacks.invoke_table_row_callbacks::( - "big_fish_asset_slot", - &self.big_fish_asset_slot, - event, - ); - callbacks.invoke_table_row_callbacks::( - "big_fish_creation_session", - &self.big_fish_creation_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "big_fish_runtime_run", - &self.big_fish_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "chapter_progression", - &self.chapter_progression, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_agent_message", - &self.custom_world_agent_message, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_agent_operation", - &self.custom_world_agent_operation, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_agent_session", - &self.custom_world_agent_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_draft_card", - &self.custom_world_draft_card, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_gallery_entry", - &self.custom_world_gallery_entry, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_profile", - &self.custom_world_profile, - event, - ); - callbacks.invoke_table_row_callbacks::( - "custom_world_session", - &self.custom_world_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "inventory_slot", - &self.inventory_slot, - event, - ); + callbacks.invoke_table_row_callbacks::("ai_task_stage", &self.ai_task_stage, event); + callbacks.invoke_table_row_callbacks::("ai_text_chunk", &self.ai_text_chunk, event); + callbacks.invoke_table_row_callbacks::("asset_entity_binding", &self.asset_entity_binding, event); + callbacks.invoke_table_row_callbacks::("asset_object", &self.asset_object, event); + callbacks.invoke_table_row_callbacks::("battle_state", &self.battle_state, event); + callbacks.invoke_table_row_callbacks::("big_fish_agent_message", &self.big_fish_agent_message, event); + callbacks.invoke_table_row_callbacks::("big_fish_asset_slot", &self.big_fish_asset_slot, event); + callbacks.invoke_table_row_callbacks::("big_fish_creation_session", &self.big_fish_creation_session, event); + callbacks.invoke_table_row_callbacks::("big_fish_runtime_run", &self.big_fish_runtime_run, event); + callbacks.invoke_table_row_callbacks::("chapter_progression", &self.chapter_progression, event); + callbacks.invoke_table_row_callbacks::("custom_world_agent_message", &self.custom_world_agent_message, event); + callbacks.invoke_table_row_callbacks::("custom_world_agent_operation", &self.custom_world_agent_operation, event); + callbacks.invoke_table_row_callbacks::("custom_world_agent_session", &self.custom_world_agent_session, event); + callbacks.invoke_table_row_callbacks::("custom_world_draft_card", &self.custom_world_draft_card, event); + callbacks.invoke_table_row_callbacks::("custom_world_gallery_entry", &self.custom_world_gallery_entry, event); + callbacks.invoke_table_row_callbacks::("custom_world_profile", &self.custom_world_profile, event); + callbacks.invoke_table_row_callbacks::("custom_world_session", &self.custom_world_session, event); + callbacks.invoke_table_row_callbacks::("inventory_slot", &self.inventory_slot, event); callbacks.invoke_table_row_callbacks::("npc_state", &self.npc_state, event); - callbacks.invoke_table_row_callbacks::( - "player_progression", - &self.player_progression, - event, - ); - callbacks.invoke_table_row_callbacks::( - "profile_dashboard_state", - &self.profile_dashboard_state, - event, - ); - callbacks.invoke_table_row_callbacks::( - "profile_played_world", - &self.profile_played_world, - event, - ); - callbacks.invoke_table_row_callbacks::( - "profile_save_archive", - &self.profile_save_archive, - event, - ); - callbacks.invoke_table_row_callbacks::( - "profile_wallet_ledger", - &self.profile_wallet_ledger, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_agent_message", - &self.puzzle_agent_message, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_agent_session", - &self.puzzle_agent_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_runtime_run", - &self.puzzle_runtime_run, - event, - ); - callbacks.invoke_table_row_callbacks::( - "puzzle_work_profile", - &self.puzzle_work_profile, - event, - ); + callbacks.invoke_table_row_callbacks::("player_progression", &self.player_progression, event); + callbacks.invoke_table_row_callbacks::("profile_dashboard_state", &self.profile_dashboard_state, event); + callbacks.invoke_table_row_callbacks::("profile_played_world", &self.profile_played_world, event); + callbacks.invoke_table_row_callbacks::("profile_save_archive", &self.profile_save_archive, event); + callbacks.invoke_table_row_callbacks::("profile_wallet_ledger", &self.profile_wallet_ledger, event); + callbacks.invoke_table_row_callbacks::("puzzle_agent_message", &self.puzzle_agent_message, event); + callbacks.invoke_table_row_callbacks::("puzzle_agent_session", &self.puzzle_agent_session, event); + callbacks.invoke_table_row_callbacks::("puzzle_runtime_run", &self.puzzle_runtime_run, event); + callbacks.invoke_table_row_callbacks::("puzzle_work_profile", &self.puzzle_work_profile, event); callbacks.invoke_table_row_callbacks::("quest_log", &self.quest_log, event); - callbacks.invoke_table_row_callbacks::( - "quest_record", - &self.quest_record, - event, - ); - callbacks.invoke_table_row_callbacks::( - "runtime_setting", - &self.runtime_setting, - event, - ); - callbacks.invoke_table_row_callbacks::( - "runtime_snapshot", - &self.runtime_snapshot, - event, - ); + callbacks.invoke_table_row_callbacks::("quest_record", &self.quest_record, event); + callbacks.invoke_table_row_callbacks::("runtime_setting", &self.runtime_setting, event); + callbacks.invoke_table_row_callbacks::("runtime_snapshot", &self.runtime_snapshot, event); callbacks.invoke_table_row_callbacks::("story_event", &self.story_event, event); - callbacks.invoke_table_row_callbacks::( - "story_session", - &self.story_session, - event, - ); - callbacks.invoke_table_row_callbacks::( - "treasure_record", - &self.treasure_record, - event, - ); - callbacks.invoke_table_row_callbacks::( - "user_browse_history", - &self.user_browse_history, - event, - ); - } + callbacks.invoke_table_row_callbacks::("story_session", &self.story_session, event); + callbacks.invoke_table_row_callbacks::("treasure_record", &self.treasure_record, event); + callbacks.invoke_table_row_callbacks::("user_browse_history", &self.user_browse_history, event); } +} + #[doc(hidden)] #[derive(Debug)] @@ -2042,16 +1520,10 @@ impl __sdk::InModule for RemoteTables { /// /// - [`DbConnection::frame_tick`]. #[cfg_attr(not(target_arch = "wasm32"), doc = "- [`DbConnection::run_threaded`].")] -#[cfg_attr( - target_arch = "wasm32", - doc = "- [`DbConnection::run_background_task`]." -)] +#[cfg_attr(target_arch = "wasm32", doc = "- [`DbConnection::run_background_task`].")] /// - [`DbConnection::run_async`]. /// - [`DbConnection::advance_one_message`]. -#[cfg_attr( - not(target_arch = "wasm32"), - doc = "- [`DbConnection::advance_one_message_blocking`]." -)] +#[cfg_attr(not(target_arch = "wasm32"), doc = "- [`DbConnection::advance_one_message_blocking`].")] /// - [`DbConnection::advance_one_message_async`]. /// /// Which of these methods you should call depends on the specific needs of your application, @@ -2238,6 +1710,7 @@ impl __sdk::SubscriptionHandle for SubscriptionHandle { fn unsubscribe(self) -> __sdk::Result<()> { self.imp.unsubscribe_then(None) } + } /// Alias trait for a [`__sdk::DbContext`] connected to this module, @@ -2245,23 +1718,17 @@ impl __sdk::SubscriptionHandle for SubscriptionHandle { /// /// Users can use this trait as a boundary on definitions which should accept /// either a [`DbConnection`] or an [`EventContext`] and operate on either. -pub trait RemoteDbContext: - __sdk::DbContext< - DbView = RemoteTables, - Reducers = RemoteReducers, - SubscriptionBuilder = __sdk::SubscriptionBuilder, - > -{ -} -impl< - Ctx: __sdk::DbContext< - DbView = RemoteTables, - Reducers = RemoteReducers, - SubscriptionBuilder = __sdk::SubscriptionBuilder, - >, -> RemoteDbContext for Ctx -{ -} +pub trait RemoteDbContext: __sdk::DbContext< + DbView = RemoteTables, + Reducers = RemoteReducers, + SubscriptionBuilder = __sdk::SubscriptionBuilder, +> {} +impl, +>> RemoteDbContext for Ctx {} + /// An [`__sdk::DbContext`] augmented with a [`__sdk::Event`], /// passed to [`__sdk::Table::on_insert`], [`__sdk::Table::on_delete`] and [`__sdk::TableWithPrimaryKey::on_update`] callbacks. @@ -2636,6 +2103,7 @@ impl __sdk::DbContext for ErrorContext { impl __sdk::ErrorContext for ErrorContext {} impl __sdk::SpacetimeModule for RemoteModule { + type DbConnection = DbConnection; type EventContext = EventContext; type ReducerEventContext = ReducerEventContext; @@ -2651,8 +2119,8 @@ impl __sdk::SpacetimeModule for RemoteModule { type SubscriptionHandle = SubscriptionHandle; type QueryBuilder = __sdk::QueryBuilder; - fn register_tables(client_cache: &mut __sdk::ClientCache) { - ai_result_reference_table::register_table(client_cache); +fn register_tables(client_cache: &mut __sdk::ClientCache) { + ai_result_reference_table::register_table(client_cache); ai_task_table::register_table(client_cache); ai_task_stage_table::register_table(client_cache); ai_text_chunk_table::register_table(client_cache); @@ -2690,9 +2158,9 @@ impl __sdk::SpacetimeModule for RemoteModule { story_session_table::register_table(client_cache); treasure_record_table::register_table(client_cache); user_browse_history_table::register_table(client_cache); - } - const ALL_TABLE_NAMES: &'static [&'static str] = &[ - "ai_result_reference", +} +const ALL_TABLE_NAMES: &'static [&'static str] = &[ + "ai_result_reference", "ai_task", "ai_task_stage", "ai_text_chunk", @@ -2730,5 +2198,5 @@ impl __sdk::SpacetimeModule for RemoteModule { "story_session", "treasure_record", "user_browse_history", - ]; +]; } diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_procedure_result_type.rs index d5f16a3f..1682f3ac 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::npc_battle_interaction_result_type::NpcBattleInteractionResult; @@ -10,10 +15,12 @@ use super::npc_battle_interaction_result_type::NpcBattleInteractionResult; #[sats(crate = __lib)] pub struct NpcBattleInteractionProcedureResult { pub ok: bool, - pub result: Option, - pub error_message: Option, + pub result: Option::, + pub error_message: Option::, } + impl __sdk::InModule for NpcBattleInteractionProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_result_type.rs index c276f969..fc8ca1c9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_battle_interaction_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::battle_state_snapshot_type::BattleStateSnapshot; use super::npc_interaction_result_type::NpcInteractionResult; @@ -14,6 +19,8 @@ pub struct NpcBattleInteractionResult { pub battle_state: BattleStateSnapshot, } + impl __sdk::InModule for NpcBattleInteractionResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_battle_mode_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_battle_mode_type.rs index dc8e8819..e891d6a9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_battle_mode_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_battle_mode_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum NpcInteractionBattleMode { Fight, Spar, + } + + impl __sdk::InModule for NpcInteractionBattleMode { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_procedure_result_type.rs index 383dce2a..ef11fa63 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::npc_interaction_result_type::NpcInteractionResult; @@ -10,10 +15,12 @@ use super::npc_interaction_result_type::NpcInteractionResult; #[sats(crate = __lib)] pub struct NpcInteractionProcedureResult { pub ok: bool, - pub result: Option, - pub error_message: Option, + pub result: Option::, + pub error_message: Option::, } + impl __sdk::InModule for NpcInteractionProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_result_type.rs index 83624807..d457b697 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_result_type.rs @@ -2,11 +2,16 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::npc_interaction_battle_mode_type::NpcInteractionBattleMode; -use super::npc_interaction_status_type::NpcInteractionStatus; use super::npc_state_snapshot_type::NpcStateSnapshot; +use super::npc_interaction_status_type::NpcInteractionStatus; +use super::npc_interaction_battle_mode_type::NpcInteractionBattleMode; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,14 +20,16 @@ pub struct NpcInteractionResult { pub interaction_status: NpcInteractionStatus, pub action_text: String, pub result_text: String, - pub story_text: Option, - pub battle_mode: Option, + pub story_text: Option::, + pub battle_mode: Option::, pub encounter_closed: bool, pub affinity_changed: bool, pub previous_affinity: i32, pub next_affinity: i32, } + impl __sdk::InModule for NpcInteractionResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_status_type.rs index 8032abf9..cba6b5ac 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_interaction_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +24,12 @@ pub enum NpcInteractionStatus { BattlePending, Left, + } + + impl __sdk::InModule for NpcInteractionStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_stance_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_stance_type.rs index 48e8ac70..2a45f52c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_stance_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_stance_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum NpcRelationStance { Cooperative, Bonded, + } + + impl __sdk::InModule for NpcRelationStance { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_state_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_state_type.rs index b6bbc07d..cccb0cc5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_state_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_relation_state_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::npc_relation_stance_type::NpcRelationStance; @@ -13,6 +18,8 @@ pub struct NpcRelationState { pub stance: NpcRelationStance, } + impl __sdk::InModule for NpcRelationState { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_social_action_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_social_action_kind_type.rs index 9c6d2c1e..cc79b8c5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_social_action_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_social_action_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum NpcSocialActionKind { Recruit, QuestAccept, + } + + impl __sdk::InModule for NpcSocialActionKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_stance_profile_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_stance_profile_type.rs index 73177673..5a0d7497 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_stance_profile_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_stance_profile_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,11 +18,13 @@ pub struct NpcStanceProfile { pub ideological_fit: u8, pub fear_or_guard: u8, pub loyalty: u8, - pub current_conflict_tag: Option, - pub recent_approvals: Vec, - pub recent_disapprovals: Vec, + pub current_conflict_tag: Option::, + pub recent_approvals: Vec::, + pub recent_disapprovals: Vec::, } + impl __sdk::InModule for NpcStanceProfile { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_procedure_result_type.rs index c4e60bef..39a8ed60 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::npc_state_snapshot_type::NpcStateSnapshot; @@ -10,10 +15,12 @@ use super::npc_state_snapshot_type::NpcStateSnapshot; #[sats(crate = __lib)] pub struct NpcStateProcedureResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for NpcStateProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_snapshot_type.rs index 351b45ae..c11e0ef8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::npc_relation_state_type::NpcRelationState; use super::npc_stance_profile_type::NpcStanceProfile; @@ -20,16 +25,18 @@ pub struct NpcStateSnapshot { pub chatted_count: u32, pub gifts_given: u32, pub recruited: bool, - pub trade_stock_signature: Option, - pub revealed_facts: Vec, - pub known_attribute_rumors: Vec, + pub trade_stock_signature: Option::, + pub revealed_facts: Vec::, + pub known_attribute_rumors: Vec::, pub first_meaningful_contact_resolved: bool, - pub seen_backstory_chapter_ids: Vec, + pub seen_backstory_chapter_ids: Vec::, pub stance_profile: NpcStanceProfile, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for NpcStateSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_table.rs index 26e7fcf5..917742d6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_table.rs @@ -2,10 +2,15 @@ // 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::npc_state_type::NpcState; use super::npc_relation_state_type::NpcRelationState; use super::npc_stance_profile_type::NpcStanceProfile; -use super::npc_state_type::NpcState; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `npc_state`. /// @@ -46,12 +51,8 @@ impl<'ctx> __sdk::Table for NpcStateTableHandle<'ctx> { type Row = NpcState; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = NpcStateInsertCallbackId; @@ -97,38 +98,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for NpcStateTableHandle<'ctx> { } } -/// Access to the `npc_state_id` unique index on the table `npc_state`, -/// which allows point queries on the field of the same name -/// via the [`NpcStateNpcStateIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.npc_state().npc_state_id().find(...)`. -pub struct NpcStateNpcStateIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> NpcStateTableHandle<'ctx> { - /// Get a handle on the `npc_state_id` unique index on the table `npc_state`. - pub fn npc_state_id(&self) -> NpcStateNpcStateIdUnique<'ctx> { - NpcStateNpcStateIdUnique { - imp: self.imp.get_unique_constraint::("npc_state_id"), - phantom: std::marker::PhantomData, + /// Access to the `npc_state_id` unique index on the table `npc_state`, + /// which allows point queries on the field of the same name + /// via the [`NpcStateNpcStateIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.npc_state().npc_state_id().find(...)`. + pub struct NpcStateNpcStateIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> NpcStateNpcStateIdUnique<'ctx> { - /// Find the subscribed row whose `npc_state_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 { - self.imp.find(col_val) - } -} + impl<'ctx> NpcStateTableHandle<'ctx> { + /// Get a handle on the `npc_state_id` unique index on the table `npc_state`. + pub fn npc_state_id(&self) -> NpcStateNpcStateIdUnique<'ctx> { + NpcStateNpcStateIdUnique { + imp: self.imp.get_unique_constraint::("npc_state_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> NpcStateNpcStateIdUnique<'ctx> { + /// Find the subscribed row whose `npc_state_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("npc_state"); _table.add_unique_constraint::("npc_state_id", |row| &row.npc_state_id); } @@ -138,24 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `NpcState`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait npc_stateQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `NpcState`. - fn npc_state(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `NpcState`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait npc_stateQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `NpcState`. + fn npc_state(&self) -> __sdk::__query_builder::Table; + } + + impl npc_stateQueryTableAccess for __sdk::QueryTableAccessor { + fn npc_state(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("npc_state") + } + } -impl npc_stateQueryTableAccess for __sdk::QueryTableAccessor { - fn npc_state(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("npc_state") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_type.rs index 1ddeec42..9e8f87ae 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::npc_relation_state_type::NpcRelationState; use super::npc_stance_profile_type::NpcStanceProfile; @@ -20,20 +25,22 @@ pub struct NpcState { pub chatted_count: u32, pub gifts_given: u32, pub recruited: bool, - pub trade_stock_signature: Option, - pub revealed_facts: Vec, - pub known_attribute_rumors: Vec, + pub trade_stock_signature: Option::, + pub revealed_facts: Vec::, + pub known_attribute_rumors: Vec::, pub first_meaningful_contact_resolved: bool, - pub seen_backstory_chapter_ids: Vec, + pub seen_backstory_chapter_ids: Vec::, pub stance_profile: NpcStanceProfile, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for NpcState { type Module = super::RemoteModule; } + /// Column accessor struct for the table `NpcState`. /// /// Provides typed access to columns for query building. @@ -48,11 +55,11 @@ pub struct NpcStateCols { pub chatted_count: __sdk::__query_builder::Col, pub gifts_given: __sdk::__query_builder::Col, pub recruited: __sdk::__query_builder::Col, - pub trade_stock_signature: __sdk::__query_builder::Col>, - pub revealed_facts: __sdk::__query_builder::Col>, - pub known_attribute_rumors: __sdk::__query_builder::Col>, + pub trade_stock_signature: __sdk::__query_builder::Col>, + pub revealed_facts: __sdk::__query_builder::Col>, + pub known_attribute_rumors: __sdk::__query_builder::Col>, pub first_meaningful_contact_resolved: __sdk::__query_builder::Col, - pub seen_backstory_chapter_ids: __sdk::__query_builder::Col>, + pub seen_backstory_chapter_ids: __sdk::__query_builder::Col>, pub stance_profile: __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, @@ -72,26 +79,15 @@ impl __sdk::__query_builder::HasCols for NpcState { chatted_count: __sdk::__query_builder::Col::new(table_name, "chatted_count"), gifts_given: __sdk::__query_builder::Col::new(table_name, "gifts_given"), recruited: __sdk::__query_builder::Col::new(table_name, "recruited"), - trade_stock_signature: __sdk::__query_builder::Col::new( - table_name, - "trade_stock_signature", - ), + trade_stock_signature: __sdk::__query_builder::Col::new(table_name, "trade_stock_signature"), revealed_facts: __sdk::__query_builder::Col::new(table_name, "revealed_facts"), - known_attribute_rumors: __sdk::__query_builder::Col::new( - table_name, - "known_attribute_rumors", - ), - first_meaningful_contact_resolved: __sdk::__query_builder::Col::new( - table_name, - "first_meaningful_contact_resolved", - ), - seen_backstory_chapter_ids: __sdk::__query_builder::Col::new( - table_name, - "seen_backstory_chapter_ids", - ), + known_attribute_rumors: __sdk::__query_builder::Col::new(table_name, "known_attribute_rumors"), + first_meaningful_contact_resolved: __sdk::__query_builder::Col::new(table_name, "first_meaningful_contact_resolved"), + seen_backstory_chapter_ids: __sdk::__query_builder::Col::new(table_name, "seen_backstory_chapter_ids"), stance_profile: __sdk::__query_builder::Col::new(table_name, "stance_profile"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -111,12 +107,11 @@ impl __sdk::__query_builder::HasIxCols for NpcState { NpcStateIxCols { npc_id: __sdk::__query_builder::IxCol::new(table_name, "npc_id"), npc_state_id: __sdk::__query_builder::IxCol::new(table_name, "npc_state_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), + runtime_session_id: __sdk::__query_builder::IxCol::new(table_name, "runtime_session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for NpcState {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_upsert_input_type.rs index c31346e7..ff59315a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/npc_state_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/npc_state_upsert_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::npc_stance_profile_type::NpcStanceProfile; @@ -17,15 +22,17 @@ pub struct NpcStateUpsertInput { pub chatted_count: u32, pub gifts_given: u32, pub recruited: bool, - pub trade_stock_signature: Option, - pub revealed_facts: Vec, - pub known_attribute_rumors: Vec, + pub trade_stock_signature: Option::, + pub revealed_facts: Vec::, + pub known_attribute_rumors: Vec::, pub first_meaningful_contact_resolved: bool, - pub seen_backstory_chapter_ids: Vec, - pub stance_profile: Option, + pub seen_backstory_chapter_ids: Vec::, + pub stance_profile: Option::, pub updated_at_micros: i64, } + impl __sdk::InModule for NpcStateUpsertInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_get_input_type.rs index a4dd27f5..eb031dc3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct PlayerProgressionGetInput { pub user_id: String, } + impl __sdk::InModule for PlayerProgressionGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_input_type.rs index b5761753..66a8696c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::player_progression_grant_source_type::PlayerProgressionGrantSource; @@ -15,6 +20,8 @@ pub struct PlayerProgressionGrantInput { pub updated_at_micros: i64, } + impl __sdk::InModule for PlayerProgressionGrantInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_source_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_source_type.rs index bf3ae257..c45b9dd6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_source_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_grant_source_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum PlayerProgressionGrantSource { Quest, HostileNpc, + } + + impl __sdk::InModule for PlayerProgressionGrantSource { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_procedure_result_type.rs index 413c1208..0f3686ec 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::player_progression_snapshot_type::PlayerProgressionSnapshot; @@ -10,10 +15,12 @@ use super::player_progression_snapshot_type::PlayerProgressionSnapshot; #[sats(crate = __lib)] pub struct PlayerProgressionProcedureResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for PlayerProgressionProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_snapshot_type.rs index 1361178e..116938c5 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::player_progression_grant_source_type::PlayerProgressionGrantSource; @@ -15,11 +20,13 @@ pub struct PlayerProgressionSnapshot { pub total_xp: u32, pub xp_to_next_level: u32, pub pending_level_ups: u32, - pub last_granted_source: Option, + pub last_granted_source: Option::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for PlayerProgressionSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_table.rs index 66961930..27262e2f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::player_progression_grant_source_type::PlayerProgressionGrantSource; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::player_progression_type::PlayerProgression; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::player_progression_grant_source_type::PlayerProgressionGrantSource; /// Table handle for the table `player_progression`. /// @@ -32,9 +37,7 @@ pub trait PlayerProgressionTableAccess { impl PlayerProgressionTableAccess for super::RemoteTables { fn player_progression(&self) -> PlayerProgressionTableHandle<'_> { PlayerProgressionTableHandle { - imp: self - .imp - .get_table::("player_progression"), + imp: self.imp.get_table::("player_progression"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for PlayerProgressionTableHandle<'ctx> { type Row = PlayerProgression; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = PlayerProgressionInsertCallbackId; @@ -98,38 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PlayerProgressionTableHandle<'ctx> { } } -/// Access to the `user_id` unique index on the table `player_progression`, -/// which allows point queries on the field of the same name -/// via the [`PlayerProgressionUserIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.player_progression().user_id().find(...)`. -pub struct PlayerProgressionUserIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PlayerProgressionTableHandle<'ctx> { - /// Get a handle on the `user_id` unique index on the table `player_progression`. - pub fn user_id(&self) -> PlayerProgressionUserIdUnique<'ctx> { - PlayerProgressionUserIdUnique { - imp: self.imp.get_unique_constraint::("user_id"), - phantom: std::marker::PhantomData, + /// Access to the `user_id` unique index on the table `player_progression`, + /// which allows point queries on the field of the same name + /// via the [`PlayerProgressionUserIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.player_progression().user_id().find(...)`. + pub struct PlayerProgressionUserIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> PlayerProgressionUserIdUnique<'ctx> { - /// Find the subscribed row whose `user_id` column value is equal to `col_val`, - /// if such a row is present in the client cache. - pub fn find(&self, col_val: &String) -> Option { - self.imp.find(col_val) - } -} + impl<'ctx> PlayerProgressionTableHandle<'ctx> { + /// Get a handle on the `user_id` unique index on the table `player_progression`. + pub fn user_id(&self) -> PlayerProgressionUserIdUnique<'ctx> { + PlayerProgressionUserIdUnique { + imp: self.imp.get_unique_constraint::("user_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> PlayerProgressionUserIdUnique<'ctx> { + /// Find the subscribed row whose `user_id` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &String) -> Option { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("player_progression"); _table.add_unique_constraint::("user_id", |row| &row.user_id); } @@ -139,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PlayerProgression`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait player_progressionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PlayerProgression`. - fn player_progression(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `PlayerProgression`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait player_progressionQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `PlayerProgression`. + fn player_progression(&self) -> __sdk::__query_builder::Table; + } + + impl player_progressionQueryTableAccess for __sdk::QueryTableAccessor { + fn player_progression(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("player_progression") + } + } -impl player_progressionQueryTableAccess for __sdk::QueryTableAccessor { - fn player_progression(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("player_progression") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_type.rs index c734d1c2..04af99cc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/player_progression_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/player_progression_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::player_progression_grant_source_type::PlayerProgressionGrantSource; @@ -15,15 +20,17 @@ pub struct PlayerProgression { pub total_xp: u32, pub xp_to_next_level: u32, pub pending_level_ups: u32, - pub last_granted_source: Option, + pub last_granted_source: Option::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for PlayerProgression { type Module = super::RemoteModule; } + /// Column accessor struct for the table `PlayerProgression`. /// /// Provides typed access to columns for query building. @@ -34,8 +41,7 @@ pub struct PlayerProgressionCols { pub total_xp: __sdk::__query_builder::Col, pub xp_to_next_level: __sdk::__query_builder::Col, pub pending_level_ups: __sdk::__query_builder::Col, - pub last_granted_source: - __sdk::__query_builder::Col>, + pub last_granted_source: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -50,12 +56,10 @@ impl __sdk::__query_builder::HasCols for PlayerProgression { total_xp: __sdk::__query_builder::Col::new(table_name, "total_xp"), xp_to_next_level: __sdk::__query_builder::Col::new(table_name, "xp_to_next_level"), pending_level_ups: __sdk::__query_builder::Col::new(table_name, "pending_level_ups"), - last_granted_source: __sdk::__query_builder::Col::new( - table_name, - "last_granted_source", - ), + last_granted_source: __sdk::__query_builder::Col::new(table_name, "last_granted_source"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -72,8 +76,10 @@ impl __sdk::__query_builder::HasIxCols for PlayerProgression { fn ix_cols(table_name: &'static str) -> Self::IxCols { PlayerProgressionIxCols { user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for PlayerProgression {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_table.rs index c79f8b0c..4e1d2abd 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_table.rs @@ -2,8 +2,13 @@ // 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::profile_dashboard_state_type::ProfileDashboardState; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `profile_dashboard_state`. /// @@ -31,9 +36,7 @@ pub trait ProfileDashboardStateTableAccess { impl ProfileDashboardStateTableAccess for super::RemoteTables { fn profile_dashboard_state(&self) -> ProfileDashboardStateTableHandle<'_> { ProfileDashboardStateTableHandle { - imp: self - .imp - .get_table::("profile_dashboard_state"), + imp: self.imp.get_table::("profile_dashboard_state"), ctx: std::marker::PhantomData, } } @@ -46,12 +49,8 @@ impl<'ctx> __sdk::Table for ProfileDashboardStateTableHandle<'ctx> { type Row = ProfileDashboardState; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = ProfileDashboardStateInsertCallbackId; @@ -97,38 +96,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for ProfileDashboardStateTableHandle<'ctx> } } -/// Access to the `user_id` unique index on the table `profile_dashboard_state`, -/// which allows point queries on the field of the same name -/// via the [`ProfileDashboardStateUserIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.profile_dashboard_state().user_id().find(...)`. -pub struct ProfileDashboardStateUserIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> ProfileDashboardStateTableHandle<'ctx> { - /// Get a handle on the `user_id` unique index on the table `profile_dashboard_state`. - pub fn user_id(&self) -> ProfileDashboardStateUserIdUnique<'ctx> { - ProfileDashboardStateUserIdUnique { - imp: self.imp.get_unique_constraint::("user_id"), - phantom: std::marker::PhantomData, + /// Access to the `user_id` unique index on the table `profile_dashboard_state`, + /// which allows point queries on the field of the same name + /// via the [`ProfileDashboardStateUserIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.profile_dashboard_state().user_id().find(...)`. + pub struct ProfileDashboardStateUserIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> ProfileDashboardStateUserIdUnique<'ctx> { - /// Find the subscribed row whose `user_id` column value is equal to `col_val`, - /// if such a row is present in the client cache. - pub fn find(&self, col_val: &String) -> Option { - self.imp.find(col_val) - } -} + impl<'ctx> ProfileDashboardStateTableHandle<'ctx> { + /// Get a handle on the `user_id` unique index on the table `profile_dashboard_state`. + pub fn user_id(&self) -> ProfileDashboardStateUserIdUnique<'ctx> { + ProfileDashboardStateUserIdUnique { + imp: self.imp.get_unique_constraint::("user_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> ProfileDashboardStateUserIdUnique<'ctx> { + /// Find the subscribed row whose `user_id` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &String) -> Option { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("profile_dashboard_state"); _table.add_unique_constraint::("user_id", |row| &row.user_id); } @@ -138,24 +138,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `ProfileDashboardState`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait profile_dashboard_stateQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ProfileDashboardState`. - fn profile_dashboard_state(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `ProfileDashboardState`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait profile_dashboard_stateQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `ProfileDashboardState`. + fn profile_dashboard_state(&self) -> __sdk::__query_builder::Table; + } + + impl profile_dashboard_stateQueryTableAccess for __sdk::QueryTableAccessor { + fn profile_dashboard_state(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("profile_dashboard_state") + } + } -impl profile_dashboard_stateQueryTableAccess for __sdk::QueryTableAccessor { - fn profile_dashboard_state(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("profile_dashboard_state") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_type.rs index e5124048..3abd8b06 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_dashboard_state_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -14,10 +20,12 @@ pub struct ProfileDashboardState { pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for ProfileDashboardState { type Module = super::RemoteModule; } + /// Column accessor struct for the table `ProfileDashboardState`. /// /// Provides typed access to columns for query building. @@ -38,6 +46,7 @@ impl __sdk::__query_builder::HasCols for ProfileDashboardState { total_play_time_ms: __sdk::__query_builder::Col::new(table_name, "total_play_time_ms"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -54,8 +63,10 @@ impl __sdk::__query_builder::HasIxCols for ProfileDashboardState { fn ix_cols(table_name: &'static str) -> Self::IxCols { ProfileDashboardStateIxCols { user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for ProfileDashboardState {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_table.rs index 0f147bd5..944de27b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_table.rs @@ -2,8 +2,13 @@ // 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::profile_played_world_type::ProfilePlayedWorld; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `profile_played_world`. /// @@ -31,9 +36,7 @@ pub trait ProfilePlayedWorldTableAccess { impl ProfilePlayedWorldTableAccess for super::RemoteTables { fn profile_played_world(&self) -> ProfilePlayedWorldTableHandle<'_> { ProfilePlayedWorldTableHandle { - imp: self - .imp - .get_table::("profile_played_world"), + imp: self.imp.get_table::("profile_played_world"), ctx: std::marker::PhantomData, } } @@ -46,12 +49,8 @@ impl<'ctx> __sdk::Table for ProfilePlayedWorldTableHandle<'ctx> { type Row = ProfilePlayedWorld; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = ProfilePlayedWorldInsertCallbackId; @@ -97,38 +96,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for ProfilePlayedWorldTableHandle<'ctx> { } } -/// Access to the `played_world_id` unique index on the table `profile_played_world`, -/// which allows point queries on the field of the same name -/// via the [`ProfilePlayedWorldPlayedWorldIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.profile_played_world().played_world_id().find(...)`. -pub struct ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> ProfilePlayedWorldTableHandle<'ctx> { - /// Get a handle on the `played_world_id` unique index on the table `profile_played_world`. - pub fn played_world_id(&self) -> ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { - ProfilePlayedWorldPlayedWorldIdUnique { - imp: self.imp.get_unique_constraint::("played_world_id"), - phantom: std::marker::PhantomData, + /// Access to the `played_world_id` unique index on the table `profile_played_world`, + /// which allows point queries on the field of the same name + /// via the [`ProfilePlayedWorldPlayedWorldIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.profile_played_world().played_world_id().find(...)`. + pub struct ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { - /// Find the subscribed row whose `played_world_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 { - self.imp.find(col_val) - } -} + impl<'ctx> ProfilePlayedWorldTableHandle<'ctx> { + /// Get a handle on the `played_world_id` unique index on the table `profile_played_world`. + pub fn played_world_id(&self) -> ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { + ProfilePlayedWorldPlayedWorldIdUnique { + imp: self.imp.get_unique_constraint::("played_world_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> ProfilePlayedWorldPlayedWorldIdUnique<'ctx> { + /// Find the subscribed row whose `played_world_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("profile_played_world"); _table.add_unique_constraint::("played_world_id", |row| &row.played_world_id); } @@ -138,24 +138,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `ProfilePlayedWorld`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait profile_played_worldQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ProfilePlayedWorld`. - fn profile_played_world(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `ProfilePlayedWorld`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait profile_played_worldQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `ProfilePlayedWorld`. + fn profile_played_world(&self) -> __sdk::__query_builder::Table; + } + + impl profile_played_worldQueryTableAccess for __sdk::QueryTableAccessor { + fn profile_played_world(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("profile_played_world") + } + } -impl profile_played_worldQueryTableAccess for __sdk::QueryTableAccessor { - fn profile_played_world(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("profile_played_world") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_type.rs index 3b94036c..b58b66c1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_played_world_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,9 +16,9 @@ pub struct ProfilePlayedWorld { pub played_world_id: String, pub user_id: String, pub world_key: String, - pub owner_user_id: Option, - pub profile_id: Option, - pub world_type: Option, + pub owner_user_id: Option::, + pub profile_id: Option::, + pub world_type: Option::, pub world_title: String, pub world_subtitle: String, pub first_played_at: __sdk::Timestamp, @@ -20,10 +26,12 @@ pub struct ProfilePlayedWorld { pub last_observed_play_time_ms: u64, } + impl __sdk::InModule for ProfilePlayedWorld { type Module = super::RemoteModule; } + /// Column accessor struct for the table `ProfilePlayedWorld`. /// /// Provides typed access to columns for query building. @@ -31,9 +39,9 @@ pub struct ProfilePlayedWorldCols { pub played_world_id: __sdk::__query_builder::Col, pub user_id: __sdk::__query_builder::Col, pub world_key: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col>, - pub profile_id: __sdk::__query_builder::Col>, - pub world_type: __sdk::__query_builder::Col>, + pub owner_user_id: __sdk::__query_builder::Col>, + pub profile_id: __sdk::__query_builder::Col>, + pub world_type: __sdk::__query_builder::Col>, pub world_title: __sdk::__query_builder::Col, pub world_subtitle: __sdk::__query_builder::Col, pub first_played_at: __sdk::__query_builder::Col, @@ -55,10 +63,8 @@ impl __sdk::__query_builder::HasCols for ProfilePlayedWorld { world_subtitle: __sdk::__query_builder::Col::new(table_name, "world_subtitle"), first_played_at: __sdk::__query_builder::Col::new(table_name, "first_played_at"), last_played_at: __sdk::__query_builder::Col::new(table_name, "last_played_at"), - last_observed_play_time_ms: __sdk::__query_builder::Col::new( - table_name, - "last_observed_play_time_ms", - ), + last_observed_play_time_ms: __sdk::__query_builder::Col::new(table_name, "last_observed_play_time_ms"), + } } } @@ -77,8 +83,10 @@ impl __sdk::__query_builder::HasIxCols for ProfilePlayedWorld { ProfilePlayedWorldIxCols { played_world_id: __sdk::__query_builder::IxCol::new(table_name, "played_world_id"), user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for ProfilePlayedWorld {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_table.rs index fc9c83e1..4d503269 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_table.rs @@ -2,8 +2,13 @@ // 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::profile_save_archive_type::ProfileSaveArchive; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `profile_save_archive`. /// @@ -31,9 +36,7 @@ pub trait ProfileSaveArchiveTableAccess { impl ProfileSaveArchiveTableAccess for super::RemoteTables { fn profile_save_archive(&self) -> ProfileSaveArchiveTableHandle<'_> { ProfileSaveArchiveTableHandle { - imp: self - .imp - .get_table::("profile_save_archive"), + imp: self.imp.get_table::("profile_save_archive"), ctx: std::marker::PhantomData, } } @@ -46,12 +49,8 @@ impl<'ctx> __sdk::Table for ProfileSaveArchiveTableHandle<'ctx> { type Row = ProfileSaveArchive; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = ProfileSaveArchiveInsertCallbackId; @@ -97,38 +96,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for ProfileSaveArchiveTableHandle<'ctx> { } } -/// Access to the `archive_id` unique index on the table `profile_save_archive`, -/// which allows point queries on the field of the same name -/// via the [`ProfileSaveArchiveArchiveIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.profile_save_archive().archive_id().find(...)`. -pub struct ProfileSaveArchiveArchiveIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> ProfileSaveArchiveTableHandle<'ctx> { - /// Get a handle on the `archive_id` unique index on the table `profile_save_archive`. - pub fn archive_id(&self) -> ProfileSaveArchiveArchiveIdUnique<'ctx> { - ProfileSaveArchiveArchiveIdUnique { - imp: self.imp.get_unique_constraint::("archive_id"), - phantom: std::marker::PhantomData, + /// Access to the `archive_id` unique index on the table `profile_save_archive`, + /// which allows point queries on the field of the same name + /// via the [`ProfileSaveArchiveArchiveIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.profile_save_archive().archive_id().find(...)`. + pub struct ProfileSaveArchiveArchiveIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> ProfileSaveArchiveArchiveIdUnique<'ctx> { - /// Find the subscribed row whose `archive_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 { - self.imp.find(col_val) - } -} + impl<'ctx> ProfileSaveArchiveTableHandle<'ctx> { + /// Get a handle on the `archive_id` unique index on the table `profile_save_archive`. + pub fn archive_id(&self) -> ProfileSaveArchiveArchiveIdUnique<'ctx> { + ProfileSaveArchiveArchiveIdUnique { + imp: self.imp.get_unique_constraint::("archive_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> ProfileSaveArchiveArchiveIdUnique<'ctx> { + /// Find the subscribed row whose `archive_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("profile_save_archive"); _table.add_unique_constraint::("archive_id", |row| &row.archive_id); } @@ -138,24 +138,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `ProfileSaveArchive`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait profile_save_archiveQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ProfileSaveArchive`. - fn profile_save_archive(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `ProfileSaveArchive`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait profile_save_archiveQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `ProfileSaveArchive`. + fn profile_save_archive(&self) -> __sdk::__query_builder::Table; + } + + impl profile_save_archiveQueryTableAccess for __sdk::QueryTableAccessor { + fn profile_save_archive(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("profile_save_archive") + } + } -impl profile_save_archiveQueryTableAccess for __sdk::QueryTableAccessor { - fn profile_save_archive(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("profile_save_archive") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_type.rs index 5244fe4e..f11c6024 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_save_archive_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,25 +16,27 @@ pub struct ProfileSaveArchive { pub archive_id: String, pub user_id: String, pub world_key: String, - pub owner_user_id: Option, - pub profile_id: Option, - pub world_type: Option, + pub owner_user_id: Option::, + pub profile_id: Option::, + pub world_type: Option::, pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option, + pub cover_image_src: Option::, pub saved_at: __sdk::Timestamp, pub bottom_tab: String, pub game_state_json: String, - pub current_story_json: Option, + pub current_story_json: Option::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for ProfileSaveArchive { type Module = super::RemoteModule; } + /// Column accessor struct for the table `ProfileSaveArchive`. /// /// Provides typed access to columns for query building. @@ -36,17 +44,17 @@ pub struct ProfileSaveArchiveCols { pub archive_id: __sdk::__query_builder::Col, pub user_id: __sdk::__query_builder::Col, pub world_key: __sdk::__query_builder::Col, - pub owner_user_id: __sdk::__query_builder::Col>, - pub profile_id: __sdk::__query_builder::Col>, - pub world_type: __sdk::__query_builder::Col>, + pub owner_user_id: __sdk::__query_builder::Col>, + pub profile_id: __sdk::__query_builder::Col>, + pub world_type: __sdk::__query_builder::Col>, pub world_name: __sdk::__query_builder::Col, pub subtitle: __sdk::__query_builder::Col, pub summary_text: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col>, + pub cover_image_src: __sdk::__query_builder::Col>, pub saved_at: __sdk::__query_builder::Col, pub bottom_tab: __sdk::__query_builder::Col, pub game_state_json: __sdk::__query_builder::Col, - pub current_story_json: __sdk::__query_builder::Col>, + pub current_story_json: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -71,6 +79,7 @@ impl __sdk::__query_builder::HasCols for ProfileSaveArchive { current_story_json: __sdk::__query_builder::Col::new(table_name, "current_story_json"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -89,8 +98,10 @@ impl __sdk::__query_builder::HasIxCols for ProfileSaveArchive { ProfileSaveArchiveIxCols { archive_id: __sdk::__query_builder::IxCol::new(table_name, "archive_id"), user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for ProfileSaveArchive {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_table.rs index 48705ae9..1dab9684 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_table.rs @@ -2,9 +2,14 @@ // 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::profile_wallet_ledger_type::ProfileWalletLedger; use super::runtime_profile_wallet_ledger_source_type_type::RuntimeProfileWalletLedgerSourceType; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `profile_wallet_ledger`. /// @@ -32,9 +37,7 @@ pub trait ProfileWalletLedgerTableAccess { impl ProfileWalletLedgerTableAccess for super::RemoteTables { fn profile_wallet_ledger(&self) -> ProfileWalletLedgerTableHandle<'_> { ProfileWalletLedgerTableHandle { - imp: self - .imp - .get_table::("profile_wallet_ledger"), + imp: self.imp.get_table::("profile_wallet_ledger"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for ProfileWalletLedgerTableHandle<'ctx> { type Row = ProfileWalletLedger; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = ProfileWalletLedgerInsertCallbackId; @@ -98,38 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for ProfileWalletLedgerTableHandle<'ctx> { } } -/// Access to the `wallet_ledger_id` unique index on the table `profile_wallet_ledger`, -/// which allows point queries on the field of the same name -/// via the [`ProfileWalletLedgerWalletLedgerIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.profile_wallet_ledger().wallet_ledger_id().find(...)`. -pub struct ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> ProfileWalletLedgerTableHandle<'ctx> { - /// Get a handle on the `wallet_ledger_id` unique index on the table `profile_wallet_ledger`. - pub fn wallet_ledger_id(&self) -> ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { - ProfileWalletLedgerWalletLedgerIdUnique { - imp: self.imp.get_unique_constraint::("wallet_ledger_id"), - phantom: std::marker::PhantomData, + /// Access to the `wallet_ledger_id` unique index on the table `profile_wallet_ledger`, + /// which allows point queries on the field of the same name + /// via the [`ProfileWalletLedgerWalletLedgerIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.profile_wallet_ledger().wallet_ledger_id().find(...)`. + pub struct ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { - /// Find the subscribed row whose `wallet_ledger_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 { - self.imp.find(col_val) - } -} + impl<'ctx> ProfileWalletLedgerTableHandle<'ctx> { + /// Get a handle on the `wallet_ledger_id` unique index on the table `profile_wallet_ledger`. + pub fn wallet_ledger_id(&self) -> ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { + ProfileWalletLedgerWalletLedgerIdUnique { + imp: self.imp.get_unique_constraint::("wallet_ledger_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> ProfileWalletLedgerWalletLedgerIdUnique<'ctx> { + /// Find the subscribed row whose `wallet_ledger_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("profile_wallet_ledger"); _table.add_unique_constraint::("wallet_ledger_id", |row| &row.wallet_ledger_id); } @@ -139,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `ProfileWalletLedger`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait profile_wallet_ledgerQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `ProfileWalletLedger`. - fn profile_wallet_ledger(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `ProfileWalletLedger`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait profile_wallet_ledgerQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `ProfileWalletLedger`. + fn profile_wallet_ledger(&self) -> __sdk::__query_builder::Table; + } + + impl profile_wallet_ledgerQueryTableAccess for __sdk::QueryTableAccessor { + fn profile_wallet_ledger(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("profile_wallet_ledger") + } + } -impl profile_wallet_ledgerQueryTableAccess for __sdk::QueryTableAccessor { - fn profile_wallet_ledger(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("profile_wallet_ledger") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_type.rs index 78364d5a..b5535645 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/profile_wallet_ledger_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_wallet_ledger_source_type_type::RuntimeProfileWalletLedgerSourceType; @@ -17,10 +22,12 @@ pub struct ProfileWalletLedger { pub created_at: __sdk::Timestamp, } + impl __sdk::InModule for ProfileWalletLedger { type Module = super::RemoteModule; } + /// Column accessor struct for the table `ProfileWalletLedger`. /// /// Provides typed access to columns for query building. @@ -29,8 +36,7 @@ pub struct ProfileWalletLedgerCols { pub user_id: __sdk::__query_builder::Col, pub amount_delta: __sdk::__query_builder::Col, pub balance_after: __sdk::__query_builder::Col, - pub source_type: - __sdk::__query_builder::Col, + pub source_type: __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, } @@ -44,6 +50,7 @@ impl __sdk::__query_builder::HasCols for ProfileWalletLedger { balance_after: __sdk::__query_builder::Col::new(table_name, "balance_after"), source_type: __sdk::__query_builder::Col::new(table_name, "source_type"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), + } } } @@ -62,8 +69,10 @@ impl __sdk::__query_builder::HasIxCols for ProfileWalletLedger { ProfileWalletLedgerIxCols { user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), wallet_ledger_id: __sdk::__query_builder::IxCol::new(table_name, "wallet_ledger_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for ProfileWalletLedger {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/publish_big_fish_game_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/publish_big_fish_game_procedure.rs index d4507ad8..6a2bfdd8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/publish_big_fish_game_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/publish_big_fish_game_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::big_fish_publish_input_type::BigFishPublishInput; use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; +use super::big_fish_publish_input_type::BigFishPublishInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct PublishBigFishGameArgs { + struct PublishBigFishGameArgs { pub input: BigFishPublishInput, } + impl __sdk::InModule for PublishBigFishGameArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for PublishBigFishGameArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait publish_big_fish_game { - fn publish_big_fish_game(&self, input: BigFishPublishInput) { - self.publish_big_fish_game_then(input, |_, _| {}); + fn publish_big_fish_game(&self, input: BigFishPublishInput, +) { + self.publish_big_fish_game_then(input, |_, _| {}); } fn publish_big_fish_game_then( &self, input: BigFishPublishInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl publish_big_fish_game for super::RemoteProcedures { &self, input: BigFishPublishInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "publish_big_fish_game", - PublishBigFishGameArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "publish_big_fish_game", + PublishBigFishGameArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_and_return_procedure.rs index d5741922..2dcaf010 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; use super::custom_world_profile_publish_input_type::CustomWorldProfilePublishInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct PublishCustomWorldProfileAndReturnArgs { + struct PublishCustomWorldProfileAndReturnArgs { pub input: CustomWorldProfilePublishInput, } + impl __sdk::InModule for PublishCustomWorldProfileAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for PublishCustomWorldProfileAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait publish_custom_world_profile_and_return { - fn publish_custom_world_profile_and_return(&self, input: CustomWorldProfilePublishInput) { - self.publish_custom_world_profile_and_return_then(input, |_, _| {}); + fn publish_custom_world_profile_and_return(&self, input: CustomWorldProfilePublishInput, +) { + self.publish_custom_world_profile_and_return_then(input, |_, _| {}); } fn publish_custom_world_profile_and_return_then( &self, input: CustomWorldProfilePublishInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl publish_custom_world_profile_and_return for super::RemoteProcedures { &self, input: CustomWorldProfilePublishInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( - "publish_custom_world_profile_and_return", - PublishCustomWorldProfileAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( + "publish_custom_world_profile_and_return", + PublishCustomWorldProfileAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_reducer.rs index 2e2f71f6..f6d34d5c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_profile_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_profile_publish_input_type::CustomWorldProfilePublishInput; @@ -14,8 +19,10 @@ pub(super) struct PublishCustomWorldProfileArgs { impl From for super::Reducer { fn from(args: PublishCustomWorldProfileArgs) -> Self { - Self::PublishCustomWorldProfile { input: args.input } - } + Self::PublishCustomWorldProfile { + input: args.input, +} +} } impl __sdk::InModule for PublishCustomWorldProfileArgs { @@ -33,11 +40,9 @@ pub trait publish_custom_world_profile { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`publish_custom_world_profile:publish_custom_world_profile_then`] to run a callback after the reducer completes. - fn publish_custom_world_profile( - &self, - input: CustomWorldProfilePublishInput, - ) -> __sdk::Result<()> { - self.publish_custom_world_profile_then(input, |_, _| {}) + fn publish_custom_world_profile(&self, input: CustomWorldProfilePublishInput, +) -> __sdk::Result<()> { + self.publish_custom_world_profile_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `publish_custom_world_profile` to run as soon as possible, @@ -50,11 +55,9 @@ pub trait publish_custom_world_profile { &self, input: CustomWorldProfilePublishInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -63,13 +66,11 @@ impl publish_custom_world_profile for super::RemoteReducers { &self, input: CustomWorldProfilePublishInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(PublishCustomWorldProfileArgs { input }, callback) + self.imp.invoke_reducer_with_callback(PublishCustomWorldProfileArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_world_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_world_procedure.rs index 42c76aad..083034b9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_world_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/publish_custom_world_world_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_publish_world_input_type::CustomWorldPublishWorldInput; use super::custom_world_publish_world_result_type::CustomWorldPublishWorldResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct PublishCustomWorldWorldArgs { + struct PublishCustomWorldWorldArgs { pub input: CustomWorldPublishWorldInput, } + impl __sdk::InModule for PublishCustomWorldWorldArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for PublishCustomWorldWorldArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait publish_custom_world_world { - fn publish_custom_world_world(&self, input: CustomWorldPublishWorldInput) { - self.publish_custom_world_world_then(input, |_, _| {}); + fn publish_custom_world_world(&self, input: CustomWorldPublishWorldInput, +) { + self.publish_custom_world_world_then(input, |_, _| {}); } fn publish_custom_world_world_then( &self, input: CustomWorldPublishWorldInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl publish_custom_world_world for super::RemoteProcedures { &self, input: CustomWorldPublishWorldInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldPublishWorldResult>( - "publish_custom_world_world", - PublishCustomWorldWorldArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldPublishWorldResult>( + "publish_custom_world_world", + PublishCustomWorldWorldArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/publish_puzzle_work_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/publish_puzzle_work_procedure.rs index 932b66d6..4592d939 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/publish_puzzle_work_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/publish_puzzle_work_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::puzzle_publish_input_type::PuzzlePublishInput; use super::puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; +use super::puzzle_publish_input_type::PuzzlePublishInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct PublishPuzzleWorkArgs { + struct PublishPuzzleWorkArgs { pub input: PuzzlePublishInput, } + impl __sdk::InModule for PublishPuzzleWorkArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for PublishPuzzleWorkArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait publish_puzzle_work { - fn publish_puzzle_work(&self, input: PuzzlePublishInput) { - self.publish_puzzle_work_then(input, |_, _| {}); + fn publish_puzzle_work(&self, input: PuzzlePublishInput, +) { + self.publish_puzzle_work_then(input, |_, _| {}); } fn publish_puzzle_work_then( &self, input: PuzzlePublishInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl publish_puzzle_work for super::RemoteProcedures { &self, input: PuzzlePublishInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( - "publish_puzzle_work", - PublishPuzzleWorkArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( + "publish_puzzle_work", + PublishPuzzleWorkArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_kind_type.rs index ca46edeb..56f8df2d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,8 +20,12 @@ pub enum PuzzleAgentMessageKind { ActionResult, Warning, + } + + impl __sdk::InModule for PuzzleAgentMessageKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_role_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_role_type.rs index 5dd7eb51..b34f41c4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_role_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_role_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum PuzzleAgentMessageRole { Assistant, System, + } + + impl __sdk::InModule for PuzzleAgentMessageRole { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_row_type.rs index b0bb85f2..ceb74765 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_row_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_row_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::puzzle_agent_message_kind_type::PuzzleAgentMessageKind; use super::puzzle_agent_message_role_type::PuzzleAgentMessageRole; +use super::puzzle_agent_message_kind_type::PuzzleAgentMessageKind; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,10 +23,12 @@ pub struct PuzzleAgentMessageRow { pub created_at: __sdk::Timestamp, } + impl __sdk::InModule for PuzzleAgentMessageRow { type Module = super::RemoteModule; } + /// Column accessor struct for the table `PuzzleAgentMessageRow`. /// /// Provides typed access to columns for query building. @@ -44,6 +51,7 @@ impl __sdk::__query_builder::HasCols for PuzzleAgentMessageRow { kind: __sdk::__query_builder::Col::new(table_name, "kind"), text: __sdk::__query_builder::Col::new(table_name, "text"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), + } } } @@ -62,8 +70,10 @@ impl __sdk::__query_builder::HasIxCols for PuzzleAgentMessageRow { PuzzleAgentMessageRowIxCols { message_id: __sdk::__query_builder::IxCol::new(table_name, "message_id"), session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for PuzzleAgentMessageRow {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_submit_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_submit_input_type.rs index 93086643..3a9fa169 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_submit_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_submit_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -14,6 +20,8 @@ pub struct PuzzleAgentMessageSubmitInput { pub submitted_at_micros: i64, } + impl __sdk::InModule for PuzzleAgentMessageSubmitInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_table.rs index 0f54e13b..e282d9e9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_message_table.rs @@ -2,10 +2,15 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::puzzle_agent_message_kind_type::PuzzleAgentMessageKind; -use super::puzzle_agent_message_role_type::PuzzleAgentMessageRole; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_agent_message_row_type::PuzzleAgentMessageRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::puzzle_agent_message_role_type::PuzzleAgentMessageRole; +use super::puzzle_agent_message_kind_type::PuzzleAgentMessageKind; /// Table handle for the table `puzzle_agent_message`. /// @@ -33,9 +38,7 @@ pub trait PuzzleAgentMessageTableAccess { impl PuzzleAgentMessageTableAccess for super::RemoteTables { fn puzzle_agent_message(&self) -> PuzzleAgentMessageTableHandle<'_> { PuzzleAgentMessageTableHandle { - imp: self - .imp - .get_table::("puzzle_agent_message"), + imp: self.imp.get_table::("puzzle_agent_message"), ctx: std::marker::PhantomData, } } @@ -48,12 +51,8 @@ impl<'ctx> __sdk::Table for PuzzleAgentMessageTableHandle<'ctx> { type Row = PuzzleAgentMessageRow; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = PuzzleAgentMessageInsertCallbackId; @@ -99,38 +98,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleAgentMessageTableHandle<'ctx> { } } -/// Access to the `message_id` unique index on the table `puzzle_agent_message`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleAgentMessageMessageIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_agent_message().message_id().find(...)`. -pub struct PuzzleAgentMessageMessageIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleAgentMessageTableHandle<'ctx> { - /// Get a handle on the `message_id` unique index on the table `puzzle_agent_message`. - pub fn message_id(&self) -> PuzzleAgentMessageMessageIdUnique<'ctx> { - PuzzleAgentMessageMessageIdUnique { - imp: self.imp.get_unique_constraint::("message_id"), - phantom: std::marker::PhantomData, + /// Access to the `message_id` unique index on the table `puzzle_agent_message`, + /// which allows point queries on the field of the same name + /// via the [`PuzzleAgentMessageMessageIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.puzzle_agent_message().message_id().find(...)`. + pub struct PuzzleAgentMessageMessageIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> PuzzleAgentMessageMessageIdUnique<'ctx> { - /// Find the subscribed row whose `message_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 { - self.imp.find(col_val) - } -} + impl<'ctx> PuzzleAgentMessageTableHandle<'ctx> { + /// Get a handle on the `message_id` unique index on the table `puzzle_agent_message`. + pub fn message_id(&self) -> PuzzleAgentMessageMessageIdUnique<'ctx> { + PuzzleAgentMessageMessageIdUnique { + imp: self.imp.get_unique_constraint::("message_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> PuzzleAgentMessageMessageIdUnique<'ctx> { + /// Find the subscribed row whose `message_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("puzzle_agent_message"); _table.add_unique_constraint::("message_id", |row| &row.message_id); } @@ -140,24 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleAgentMessageRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_agent_messageQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleAgentMessageRow`. - fn puzzle_agent_message(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `PuzzleAgentMessageRow`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait puzzle_agent_messageQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `PuzzleAgentMessageRow`. + fn puzzle_agent_message(&self) -> __sdk::__query_builder::Table; + } + + impl puzzle_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { + fn puzzle_agent_message(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("puzzle_agent_message") + } + } -impl puzzle_agent_messageQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_agent_message(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_agent_message") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_create_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_create_input_type.rs index c3ccc7d2..f07fcd6b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_create_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_create_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,6 +21,8 @@ pub struct PuzzleAgentSessionCreateInput { pub created_at_micros: i64, } + impl __sdk::InModule for PuzzleAgentSessionCreateInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_get_input_type.rs index af4159c6..e411bead 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct PuzzleAgentSessionGetInput { pub owner_user_id: String, } + impl __sdk::InModule for PuzzleAgentSessionGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_procedure_result_type.rs index 39506659..f19f290d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_procedure_result_type.rs @@ -2,16 +2,24 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct PuzzleAgentSessionProcedureResult { pub ok: bool, - pub session_json: Option, - pub error_message: Option, + pub session_json: Option::, + pub error_message: Option::, } + impl __sdk::InModule for PuzzleAgentSessionProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_row_type.rs index e056ada1..96e98e56 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_row_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_row_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_agent_stage_type::PuzzleAgentStage; @@ -16,17 +21,19 @@ pub struct PuzzleAgentSessionRow { pub progress_percent: u32, pub stage: PuzzleAgentStage, pub anchor_pack_json: String, - pub draft_json: Option, - pub last_assistant_reply: Option, - pub published_profile_id: Option, + pub draft_json: Option::, + pub last_assistant_reply: Option::, + pub published_profile_id: Option::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for PuzzleAgentSessionRow { type Module = super::RemoteModule; } + /// Column accessor struct for the table `PuzzleAgentSessionRow`. /// /// Provides typed access to columns for query building. @@ -38,9 +45,9 @@ pub struct PuzzleAgentSessionRowCols { pub progress_percent: __sdk::__query_builder::Col, pub stage: __sdk::__query_builder::Col, pub anchor_pack_json: __sdk::__query_builder::Col, - pub draft_json: __sdk::__query_builder::Col>, - pub last_assistant_reply: __sdk::__query_builder::Col>, - pub published_profile_id: __sdk::__query_builder::Col>, + pub draft_json: __sdk::__query_builder::Col>, + pub last_assistant_reply: __sdk::__query_builder::Col>, + pub published_profile_id: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -57,16 +64,11 @@ impl __sdk::__query_builder::HasCols for PuzzleAgentSessionRow { stage: __sdk::__query_builder::Col::new(table_name, "stage"), anchor_pack_json: __sdk::__query_builder::Col::new(table_name, "anchor_pack_json"), draft_json: __sdk::__query_builder::Col::new(table_name, "draft_json"), - last_assistant_reply: __sdk::__query_builder::Col::new( - table_name, - "last_assistant_reply", - ), - published_profile_id: __sdk::__query_builder::Col::new( - table_name, - "published_profile_id", - ), + last_assistant_reply: __sdk::__query_builder::Col::new(table_name, "last_assistant_reply"), + 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"), + } } } @@ -85,8 +87,10 @@ impl __sdk::__query_builder::HasIxCols for PuzzleAgentSessionRow { PuzzleAgentSessionRowIxCols { 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 PuzzleAgentSessionRow {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_table.rs index 08c05360..0272d915 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_session_table.rs @@ -2,9 +2,14 @@ // 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_agent_session_row_type::PuzzleAgentSessionRow; use super::puzzle_agent_stage_type::PuzzleAgentStage; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `puzzle_agent_session`. /// @@ -32,9 +37,7 @@ pub trait PuzzleAgentSessionTableAccess { impl PuzzleAgentSessionTableAccess for super::RemoteTables { fn puzzle_agent_session(&self) -> PuzzleAgentSessionTableHandle<'_> { PuzzleAgentSessionTableHandle { - imp: self - .imp - .get_table::("puzzle_agent_session"), + imp: self.imp.get_table::("puzzle_agent_session"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for PuzzleAgentSessionTableHandle<'ctx> { type Row = PuzzleAgentSessionRow; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = PuzzleAgentSessionInsertCallbackId; @@ -98,38 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleAgentSessionTableHandle<'ctx> { } } -/// Access to the `session_id` unique index on the table `puzzle_agent_session`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleAgentSessionSessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_agent_session().session_id().find(...)`. -pub struct PuzzleAgentSessionSessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleAgentSessionTableHandle<'ctx> { - /// Get a handle on the `session_id` unique index on the table `puzzle_agent_session`. - pub fn session_id(&self) -> PuzzleAgentSessionSessionIdUnique<'ctx> { - PuzzleAgentSessionSessionIdUnique { - imp: self.imp.get_unique_constraint::("session_id"), - phantom: std::marker::PhantomData, + /// Access to the `session_id` unique index on the table `puzzle_agent_session`, + /// which allows point queries on the field of the same name + /// via the [`PuzzleAgentSessionSessionIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.puzzle_agent_session().session_id().find(...)`. + pub struct PuzzleAgentSessionSessionIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> PuzzleAgentSessionSessionIdUnique<'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 { - self.imp.find(col_val) - } -} + impl<'ctx> PuzzleAgentSessionTableHandle<'ctx> { + /// Get a handle on the `session_id` unique index on the table `puzzle_agent_session`. + pub fn session_id(&self) -> PuzzleAgentSessionSessionIdUnique<'ctx> { + PuzzleAgentSessionSessionIdUnique { + imp: self.imp.get_unique_constraint::("session_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> PuzzleAgentSessionSessionIdUnique<'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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("puzzle_agent_session"); _table.add_unique_constraint::("session_id", |row| &row.session_id); } @@ -139,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleAgentSessionRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_agent_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleAgentSessionRow`. - fn puzzle_agent_session(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `PuzzleAgentSessionRow`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait puzzle_agent_sessionQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `PuzzleAgentSessionRow`. + fn puzzle_agent_session(&self) -> __sdk::__query_builder::Table; + } + + impl puzzle_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { + fn puzzle_agent_session(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("puzzle_agent_session") + } + } -impl puzzle_agent_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_agent_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_agent_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_stage_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_stage_type.rs index 9d41ea54..00cbc81b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_stage_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_agent_stage_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum PuzzleAgentStage { ReadyToPublish, Published, + } + + impl __sdk::InModule for PuzzleAgentStage { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_draft_compile_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_draft_compile_input_type.rs index 3b5f565f..703538e4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_draft_compile_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_draft_compile_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,6 +18,8 @@ pub struct PuzzleDraftCompileInput { pub compiled_at_micros: i64, } + impl __sdk::InModule for PuzzleDraftCompileInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_generated_images_save_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_generated_images_save_input_type.rs index 8c409aed..0c2196b4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_generated_images_save_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_generated_images_save_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,6 +19,8 @@ pub struct PuzzleGeneratedImagesSaveInput { pub saved_at_micros: i64, } + impl __sdk::InModule for PuzzleGeneratedImagesSaveInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publication_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publication_status_type.rs index 38ece3cf..7ff8b5c6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publication_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publication_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum PuzzlePublicationStatus { Draft, Published, + } + + impl __sdk::InModule for PuzzlePublicationStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publish_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publish_input_type.rs index 83cbc37c..d3a5d26d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publish_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_publish_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,12 +18,14 @@ pub struct PuzzlePublishInput { pub work_id: String, pub profile_id: String, pub author_display_name: String, - pub level_name: Option, - pub summary: Option, - pub theme_tags: Option>, + pub level_name: Option::, + pub summary: Option::, + pub theme_tags: Option::>, pub published_at_micros: i64, } + impl __sdk::InModule for PuzzlePublishInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_drag_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_drag_input_type.rs index b5036117..753e2932 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_drag_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_drag_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,6 +21,8 @@ pub struct PuzzleRunDragInput { pub dragged_at_micros: i64, } + impl __sdk::InModule for PuzzleRunDragInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_get_input_type.rs index b3961e57..cf15f8b3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct PuzzleRunGetInput { pub owner_user_id: String, } + impl __sdk::InModule for PuzzleRunGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_next_level_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_next_level_input_type.rs index 18258482..d6a9a285 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_next_level_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_next_level_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,6 +18,8 @@ pub struct PuzzleRunNextLevelInput { pub advanced_at_micros: i64, } + impl __sdk::InModule for PuzzleRunNextLevelInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_procedure_result_type.rs index 54f6349b..215490dc 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_procedure_result_type.rs @@ -2,16 +2,24 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct PuzzleRunProcedureResult { pub ok: bool, - pub run_json: Option, - pub error_message: Option, + pub run_json: Option::, + pub error_message: Option::, } + impl __sdk::InModule for PuzzleRunProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_start_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_start_input_type.rs index 7b4bed29..55e0a93e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_start_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_start_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,6 +19,8 @@ pub struct PuzzleRunStartInput { pub started_at_micros: i64, } + impl __sdk::InModule for PuzzleRunStartInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_swap_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_swap_input_type.rs index e92ca711..3b5baa18 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_swap_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_run_swap_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -14,6 +20,8 @@ pub struct PuzzleRunSwapInput { pub swapped_at_micros: i64, } + impl __sdk::InModule for PuzzleRunSwapInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_row_type.rs index e610dfbf..daf67f5b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_row_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_row_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -21,10 +27,12 @@ pub struct PuzzleRuntimeRunRow { pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for PuzzleRuntimeRunRow { type Module = super::RemoteModule; } + /// Column accessor struct for the table `PuzzleRuntimeRunRow`. /// /// Provides typed access to columns for query building. @@ -51,26 +59,15 @@ impl __sdk::__query_builder::HasCols for PuzzleRuntimeRunRow { owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"), entry_profile_id: __sdk::__query_builder::Col::new(table_name, "entry_profile_id"), current_profile_id: __sdk::__query_builder::Col::new(table_name, "current_profile_id"), - cleared_level_count: __sdk::__query_builder::Col::new( - table_name, - "cleared_level_count", - ), - current_level_index: __sdk::__query_builder::Col::new( - table_name, - "current_level_index", - ), + cleared_level_count: __sdk::__query_builder::Col::new(table_name, "cleared_level_count"), + current_level_index: __sdk::__query_builder::Col::new(table_name, "current_level_index"), current_grid_size: __sdk::__query_builder::Col::new(table_name, "current_grid_size"), - played_profile_ids_json: __sdk::__query_builder::Col::new( - table_name, - "played_profile_ids_json", - ), - previous_level_tags_json: __sdk::__query_builder::Col::new( - table_name, - "previous_level_tags_json", - ), + played_profile_ids_json: __sdk::__query_builder::Col::new(table_name, "played_profile_ids_json"), + previous_level_tags_json: __sdk::__query_builder::Col::new(table_name, "previous_level_tags_json"), snapshot_json: __sdk::__query_builder::Col::new(table_name, "snapshot_json"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -89,8 +86,10 @@ impl __sdk::__query_builder::HasIxCols for PuzzleRuntimeRunRow { PuzzleRuntimeRunRowIxCols { owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"), run_id: __sdk::__query_builder::IxCol::new(table_name, "run_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for PuzzleRuntimeRunRow {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_table.rs index 1cd988cc..5447392d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_runtime_run_table.rs @@ -2,8 +2,13 @@ // 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_runtime_run_row_type::PuzzleRuntimeRunRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `puzzle_runtime_run`. /// @@ -31,9 +36,7 @@ pub trait PuzzleRuntimeRunTableAccess { impl PuzzleRuntimeRunTableAccess for super::RemoteTables { fn puzzle_runtime_run(&self) -> PuzzleRuntimeRunTableHandle<'_> { PuzzleRuntimeRunTableHandle { - imp: self - .imp - .get_table::("puzzle_runtime_run"), + imp: self.imp.get_table::("puzzle_runtime_run"), ctx: std::marker::PhantomData, } } @@ -46,12 +49,8 @@ impl<'ctx> __sdk::Table for PuzzleRuntimeRunTableHandle<'ctx> { type Row = PuzzleRuntimeRunRow; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = PuzzleRuntimeRunInsertCallbackId; @@ -97,38 +96,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleRuntimeRunTableHandle<'ctx> { } } -/// Access to the `run_id` unique index on the table `puzzle_runtime_run`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleRuntimeRunRunIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_runtime_run().run_id().find(...)`. -pub struct PuzzleRuntimeRunRunIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleRuntimeRunTableHandle<'ctx> { - /// Get a handle on the `run_id` unique index on the table `puzzle_runtime_run`. - pub fn run_id(&self) -> PuzzleRuntimeRunRunIdUnique<'ctx> { - PuzzleRuntimeRunRunIdUnique { - imp: self.imp.get_unique_constraint::("run_id"), - phantom: std::marker::PhantomData, + /// Access to the `run_id` unique index on the table `puzzle_runtime_run`, + /// which allows point queries on the field of the same name + /// via the [`PuzzleRuntimeRunRunIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.puzzle_runtime_run().run_id().find(...)`. + pub struct PuzzleRuntimeRunRunIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> PuzzleRuntimeRunRunIdUnique<'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 { - self.imp.find(col_val) - } -} + impl<'ctx> PuzzleRuntimeRunTableHandle<'ctx> { + /// Get a handle on the `run_id` unique index on the table `puzzle_runtime_run`. + pub fn run_id(&self) -> PuzzleRuntimeRunRunIdUnique<'ctx> { + PuzzleRuntimeRunRunIdUnique { + imp: self.imp.get_unique_constraint::("run_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> PuzzleRuntimeRunRunIdUnique<'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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("puzzle_runtime_run"); _table.add_unique_constraint::("run_id", |row| &row.run_id); } @@ -138,24 +138,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleRuntimeRunRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_runtime_runQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleRuntimeRunRow`. - fn puzzle_runtime_run(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `PuzzleRuntimeRunRow`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait puzzle_runtime_runQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `PuzzleRuntimeRunRow`. + fn puzzle_runtime_run(&self) -> __sdk::__query_builder::Table; + } + + impl puzzle_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { + fn puzzle_runtime_run(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("puzzle_runtime_run") + } + } -impl puzzle_runtime_runQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_runtime_run(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_runtime_run") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_select_cover_image_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_select_cover_image_input_type.rs index 516d16b9..847ac3a4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_select_cover_image_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_select_cover_image_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,6 +19,8 @@ pub struct PuzzleSelectCoverImageInput { pub selected_at_micros: i64, } + impl __sdk::InModule for PuzzleSelectCoverImageInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_get_input_type.rs index 5f37e13f..74cf57a1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct PuzzleWorkGetInput { pub profile_id: String, } + impl __sdk::InModule for PuzzleWorkGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_procedure_result_type.rs index d59a56cc..0da3b49c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_procedure_result_type.rs @@ -2,16 +2,24 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct PuzzleWorkProcedureResult { pub ok: bool, - pub item_json: Option, - pub error_message: Option, + pub item_json: Option::, + pub error_message: Option::, } + impl __sdk::InModule for PuzzleWorkProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_row_type.rs index be53fc17..e5482282 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_row_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_row_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_publication_status_type::PuzzlePublicationStatus; @@ -12,26 +17,28 @@ pub struct PuzzleWorkProfileRow { pub profile_id: String, pub work_id: String, pub owner_user_id: String, - pub source_session_id: Option, + pub source_session_id: Option::, pub author_display_name: String, pub level_name: String, pub summary: String, pub theme_tags_json: String, - pub cover_image_src: Option, - pub cover_asset_id: Option, + pub cover_image_src: Option::, + pub cover_asset_id: Option::, pub publication_status: PuzzlePublicationStatus, pub play_count: u32, pub anchor_pack_json: String, pub publish_ready: bool, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, - pub published_at: Option<__sdk::Timestamp>, + pub published_at: Option::<__sdk::Timestamp>, } + impl __sdk::InModule for PuzzleWorkProfileRow { type Module = super::RemoteModule; } + /// Column accessor struct for the table `PuzzleWorkProfileRow`. /// /// Provides typed access to columns for query building. @@ -39,21 +46,20 @@ pub struct PuzzleWorkProfileRowCols { pub profile_id: __sdk::__query_builder::Col, pub work_id: __sdk::__query_builder::Col, pub owner_user_id: __sdk::__query_builder::Col, - pub source_session_id: __sdk::__query_builder::Col>, + pub source_session_id: __sdk::__query_builder::Col>, pub author_display_name: __sdk::__query_builder::Col, pub level_name: __sdk::__query_builder::Col, pub summary: __sdk::__query_builder::Col, pub theme_tags_json: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col>, - pub cover_asset_id: __sdk::__query_builder::Col>, - pub publication_status: - __sdk::__query_builder::Col, + pub cover_image_src: __sdk::__query_builder::Col>, + pub cover_asset_id: __sdk::__query_builder::Col>, + pub publication_status: __sdk::__query_builder::Col, pub play_count: __sdk::__query_builder::Col, pub anchor_pack_json: __sdk::__query_builder::Col, pub publish_ready: __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, - pub published_at: __sdk::__query_builder::Col>, + pub published_at: __sdk::__query_builder::Col>, } impl __sdk::__query_builder::HasCols for PuzzleWorkProfileRow { @@ -64,10 +70,7 @@ impl __sdk::__query_builder::HasCols for PuzzleWorkProfileRow { 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", - ), + author_display_name: __sdk::__query_builder::Col::new(table_name, "author_display_name"), level_name: __sdk::__query_builder::Col::new(table_name, "level_name"), summary: __sdk::__query_builder::Col::new(table_name, "summary"), theme_tags_json: __sdk::__query_builder::Col::new(table_name, "theme_tags_json"), @@ -80,6 +83,7 @@ impl __sdk::__query_builder::HasCols for PuzzleWorkProfileRow { created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), published_at: __sdk::__query_builder::Col::new(table_name, "published_at"), + } } } @@ -90,8 +94,7 @@ impl __sdk::__query_builder::HasCols for PuzzleWorkProfileRow { pub struct PuzzleWorkProfileRowIxCols { pub owner_user_id: __sdk::__query_builder::IxCol, pub profile_id: __sdk::__query_builder::IxCol, - pub publication_status: - __sdk::__query_builder::IxCol, + pub publication_status: __sdk::__query_builder::IxCol, } impl __sdk::__query_builder::HasIxCols for PuzzleWorkProfileRow { @@ -100,12 +103,11 @@ impl __sdk::__query_builder::HasIxCols for PuzzleWorkProfileRow { PuzzleWorkProfileRowIxCols { 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", - ), + publication_status: __sdk::__query_builder::IxCol::new(table_name, "publication_status"), + } } } impl __sdk::__query_builder::CanBeLookupTable for PuzzleWorkProfileRow {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_table.rs index 673a9841..c5f14f0f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_profile_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::puzzle_publication_status_type::PuzzlePublicationStatus; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_work_profile_row_type::PuzzleWorkProfileRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::puzzle_publication_status_type::PuzzlePublicationStatus; /// Table handle for the table `puzzle_work_profile`. /// @@ -32,9 +37,7 @@ pub trait PuzzleWorkProfileTableAccess { impl PuzzleWorkProfileTableAccess for super::RemoteTables { fn puzzle_work_profile(&self) -> PuzzleWorkProfileTableHandle<'_> { PuzzleWorkProfileTableHandle { - imp: self - .imp - .get_table::("puzzle_work_profile"), + imp: self.imp.get_table::("puzzle_work_profile"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for PuzzleWorkProfileTableHandle<'ctx> { type Row = PuzzleWorkProfileRow; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = PuzzleWorkProfileInsertCallbackId; @@ -98,38 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for PuzzleWorkProfileTableHandle<'ctx> { } } -/// Access to the `profile_id` unique index on the table `puzzle_work_profile`, -/// which allows point queries on the field of the same name -/// via the [`PuzzleWorkProfileProfileIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.puzzle_work_profile().profile_id().find(...)`. -pub struct PuzzleWorkProfileProfileIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> PuzzleWorkProfileTableHandle<'ctx> { - /// Get a handle on the `profile_id` unique index on the table `puzzle_work_profile`. - pub fn profile_id(&self) -> PuzzleWorkProfileProfileIdUnique<'ctx> { - PuzzleWorkProfileProfileIdUnique { - imp: self.imp.get_unique_constraint::("profile_id"), - phantom: std::marker::PhantomData, + /// Access to the `profile_id` unique index on the table `puzzle_work_profile`, + /// which allows point queries on the field of the same name + /// via the [`PuzzleWorkProfileProfileIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.puzzle_work_profile().profile_id().find(...)`. + pub struct PuzzleWorkProfileProfileIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> PuzzleWorkProfileProfileIdUnique<'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 { - self.imp.find(col_val) - } -} + impl<'ctx> PuzzleWorkProfileTableHandle<'ctx> { + /// Get a handle on the `profile_id` unique index on the table `puzzle_work_profile`. + pub fn profile_id(&self) -> PuzzleWorkProfileProfileIdUnique<'ctx> { + PuzzleWorkProfileProfileIdUnique { + imp: self.imp.get_unique_constraint::("profile_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> PuzzleWorkProfileProfileIdUnique<'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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("puzzle_work_profile"); _table.add_unique_constraint::("profile_id", |row| &row.profile_id); } @@ -139,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `PuzzleWorkProfileRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait puzzle_work_profileQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `PuzzleWorkProfileRow`. - fn puzzle_work_profile(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `PuzzleWorkProfileRow`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait puzzle_work_profileQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `PuzzleWorkProfileRow`. + fn puzzle_work_profile(&self) -> __sdk::__query_builder::Table; + } + + impl puzzle_work_profileQueryTableAccess for __sdk::QueryTableAccessor { + fn puzzle_work_profile(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("puzzle_work_profile") + } + } -impl puzzle_work_profileQueryTableAccess for __sdk::QueryTableAccessor { - fn puzzle_work_profile(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("puzzle_work_profile") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_upsert_input_type.rs index 809ce64d..ae412d68 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_work_upsert_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,12 +17,14 @@ pub struct PuzzleWorkUpsertInput { pub owner_user_id: String, pub level_name: String, pub summary: String, - pub theme_tags: Vec, - pub cover_image_src: Option, - pub cover_asset_id: Option, + pub theme_tags: Vec::, + pub cover_image_src: Option::, + pub cover_asset_id: Option::, pub updated_at_micros: i64, } + impl __sdk::InModule for PuzzleWorkUpsertInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_list_input_type.rs index 4ad5ef5b..e1d55a5f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_list_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct PuzzleWorksListInput { pub owner_user_id: String, } + impl __sdk::InModule for PuzzleWorksListInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_procedure_result_type.rs index 6a34c60f..80a1c401 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/puzzle_works_procedure_result_type.rs @@ -2,16 +2,24 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct PuzzleWorksProcedureResult { pub ok: bool, - pub items_json: Option, - pub error_message: Option, + pub items_json: Option::, + pub error_message: Option::, } + impl __sdk::InModule for PuzzleWorksProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_completion_ack_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_completion_ack_input_type.rs index 678ec032..dbe06a17 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_completion_ack_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_completion_ack_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct QuestCompletionAckInput { pub updated_at_micros: i64, } + impl __sdk::InModule for QuestCompletionAckInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_hostile_npc_defeated_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_hostile_npc_defeated_signal_type.rs index d12363ff..08debc1e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_hostile_npc_defeated_signal_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_hostile_npc_defeated_signal_type.rs @@ -2,15 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct QuestHostileNpcDefeatedSignal { - pub scene_id: Option, + pub scene_id: Option::, pub hostile_npc_id: String, } + impl __sdk::InModule for QuestHostileNpcDefeatedSignal { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_item_delivered_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_item_delivered_signal_type.rs index 4e1d0a5d..9b69c1f7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_item_delivered_signal_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_item_delivered_signal_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,6 +18,8 @@ pub struct QuestItemDeliveredSignal { pub quantity: u32, } + impl __sdk::InModule for QuestItemDeliveredSignal { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_event_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_log_event_kind_type.rs index c3176590..2e742860 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_event_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_log_event_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum QuestLogEventKind { CompletionAcknowledged, TurnedIn, + } + + impl __sdk::InModule for QuestLogEventKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_log_table.rs index b1ac8c78..069f1084 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_log_table.rs @@ -2,12 +2,17 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::quest_log_event_kind_type::QuestLogEventKind; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_log_type::QuestLog; -use super::quest_progress_signal_type::QuestProgressSignal; -use super::quest_signal_kind_type::QuestSignalKind; use super::quest_status_type::QuestStatus; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::quest_progress_signal_type::QuestProgressSignal; +use super::quest_log_event_kind_type::QuestLogEventKind; +use super::quest_signal_kind_type::QuestSignalKind; /// Table handle for the table `quest_log`. /// @@ -48,12 +53,8 @@ impl<'ctx> __sdk::Table for QuestLogTableHandle<'ctx> { type Row = QuestLog; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = QuestLogInsertCallbackId; @@ -99,38 +100,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for QuestLogTableHandle<'ctx> { } } -/// Access to the `log_id` unique index on the table `quest_log`, -/// which allows point queries on the field of the same name -/// via the [`QuestLogLogIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.quest_log().log_id().find(...)`. -pub struct QuestLogLogIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> QuestLogTableHandle<'ctx> { - /// Get a handle on the `log_id` unique index on the table `quest_log`. - pub fn log_id(&self) -> QuestLogLogIdUnique<'ctx> { - QuestLogLogIdUnique { - imp: self.imp.get_unique_constraint::("log_id"), - phantom: std::marker::PhantomData, + /// Access to the `log_id` unique index on the table `quest_log`, + /// which allows point queries on the field of the same name + /// via the [`QuestLogLogIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.quest_log().log_id().find(...)`. + pub struct QuestLogLogIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> QuestLogLogIdUnique<'ctx> { - /// Find the subscribed row whose `log_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 { - self.imp.find(col_val) - } -} + impl<'ctx> QuestLogTableHandle<'ctx> { + /// Get a handle on the `log_id` unique index on the table `quest_log`. + pub fn log_id(&self) -> QuestLogLogIdUnique<'ctx> { + QuestLogLogIdUnique { + imp: self.imp.get_unique_constraint::("log_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> QuestLogLogIdUnique<'ctx> { + /// Find the subscribed row whose `log_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("quest_log"); _table.add_unique_constraint::("log_id", |row| &row.log_id); } @@ -140,24 +142,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `QuestLog`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait quest_logQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `QuestLog`. - fn quest_log(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `QuestLog`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait quest_logQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `QuestLog`. + fn quest_log(&self) -> __sdk::__query_builder::Table; + } + + impl quest_logQueryTableAccess for __sdk::QueryTableAccessor { + fn quest_log(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("quest_log") + } + } -impl quest_logQueryTableAccess for __sdk::QueryTableAccessor { - fn quest_log(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("quest_log") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_log_type.rs index d893857a..d4e28a66 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_log_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_log_type.rs @@ -2,12 +2,17 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::quest_log_event_kind_type::QuestLogEventKind; -use super::quest_progress_signal_type::QuestProgressSignal; -use super::quest_signal_kind_type::QuestSignalKind; use super::quest_status_type::QuestStatus; +use super::quest_progress_signal_type::QuestProgressSignal; +use super::quest_log_event_kind_type::QuestLogEventKind; +use super::quest_signal_kind_type::QuestSignalKind; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,17 +23,19 @@ pub struct QuestLog { pub actor_user_id: String, pub event_kind: QuestLogEventKind, pub status_after: QuestStatus, - pub signal_kind: Option, - pub signal: Option, - pub step_id: Option, - pub step_progress: Option, + pub signal_kind: Option::, + pub signal: Option::, + pub step_id: Option::, + pub step_progress: Option::, pub created_at: __sdk::Timestamp, } + impl __sdk::InModule for QuestLog { type Module = super::RemoteModule; } + /// Column accessor struct for the table `QuestLog`. /// /// Provides typed access to columns for query building. @@ -39,10 +46,10 @@ pub struct QuestLogCols { pub actor_user_id: __sdk::__query_builder::Col, pub event_kind: __sdk::__query_builder::Col, pub status_after: __sdk::__query_builder::Col, - pub signal_kind: __sdk::__query_builder::Col>, - pub signal: __sdk::__query_builder::Col>, - pub step_id: __sdk::__query_builder::Col>, - pub step_progress: __sdk::__query_builder::Col>, + pub signal_kind: __sdk::__query_builder::Col>, + pub signal: __sdk::__query_builder::Col>, + pub step_id: __sdk::__query_builder::Col>, + pub step_progress: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, } @@ -61,6 +68,7 @@ impl __sdk::__query_builder::HasCols for QuestLog { step_id: __sdk::__query_builder::Col::new(table_name, "step_id"), step_progress: __sdk::__query_builder::Col::new(table_name, "step_progress"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), + } } } @@ -82,12 +90,11 @@ impl __sdk::__query_builder::HasIxCols for QuestLog { actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), log_id: __sdk::__query_builder::IxCol::new(table_name, "log_id"), quest_id: __sdk::__query_builder::IxCol::new(table_name, "quest_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), + runtime_session_id: __sdk::__query_builder::IxCol::new(table_name, "runtime_session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for QuestLog {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_binding_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_binding_snapshot_type.rs index 730e7565..45c26c18 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_binding_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_binding_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_narrative_origin_type::QuestNarrativeOrigin; use super::quest_narrative_type_type::QuestNarrativeType; @@ -16,9 +21,11 @@ pub struct QuestNarrativeBindingSnapshot { pub issuer_goal: String, pub player_hook: String, pub world_reason: String, - pub followup_hooks: Vec, + pub followup_hooks: Vec::, } + impl __sdk::InModule for QuestNarrativeBindingSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_origin_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_origin_type.rs index 34ce63f3..53f324af 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_origin_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_origin_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum QuestNarrativeOrigin { AiCompiled, FallbackBuilder, + } + + impl __sdk::InModule for QuestNarrativeOrigin { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_type_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_type_type.rs index ac5319cd..e390707e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_type_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_narrative_type_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +24,12 @@ pub enum QuestNarrativeType { Relationship, Trial, + } + + impl __sdk::InModule for QuestNarrativeType { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_spar_completed_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_spar_completed_signal_type.rs index a0f1f8bb..356ae48e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_spar_completed_signal_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_spar_completed_signal_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct QuestNpcSparCompletedSignal { pub npc_id: String, } + impl __sdk::InModule for QuestNpcSparCompletedSignal { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_talk_completed_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_talk_completed_signal_type.rs index 39042f37..a62032a7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_talk_completed_signal_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_npc_talk_completed_signal_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct QuestNpcTalkCompletedSignal { pub npc_id: String, } + impl __sdk::InModule for QuestNpcTalkCompletedSignal { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_kind_type.rs index 665faa30..4139db37 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +24,12 @@ pub enum QuestObjectiveKind { ReachScene, DeliverItem, + } + + impl __sdk::InModule for QuestObjectiveKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_snapshot_type.rs index 38682e68..e617912b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_objective_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_objective_kind_type::QuestObjectiveKind; @@ -10,13 +15,15 @@ use super::quest_objective_kind_type::QuestObjectiveKind; #[sats(crate = __lib)] pub struct QuestObjectiveSnapshot { pub kind: QuestObjectiveKind, - pub target_hostile_npc_id: Option, - pub target_npc_id: Option, - pub target_scene_id: Option, - pub target_item_id: Option, + pub target_hostile_npc_id: Option::, + pub target_npc_id: Option::, + pub target_scene_id: Option::, + pub target_item_id: Option::, pub required_count: u32, } + impl __sdk::InModule for QuestObjectiveSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_progress_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_progress_signal_type.rs index 5764d273..b957a0a7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_progress_signal_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_progress_signal_type.rs @@ -2,14 +2,19 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_hostile_npc_defeated_signal_type::QuestHostileNpcDefeatedSignal; -use super::quest_item_delivered_signal_type::QuestItemDeliveredSignal; +use super::quest_treasure_inspected_signal_type::QuestTreasureInspectedSignal; use super::quest_npc_spar_completed_signal_type::QuestNpcSparCompletedSignal; use super::quest_npc_talk_completed_signal_type::QuestNpcTalkCompletedSignal; use super::quest_scene_reached_signal_type::QuestSceneReachedSignal; -use super::quest_treasure_inspected_signal_type::QuestTreasureInspectedSignal; +use super::quest_item_delivered_signal_type::QuestItemDeliveredSignal; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -25,8 +30,12 @@ pub enum QuestProgressSignal { SceneReached(QuestSceneReachedSignal), ItemDelivered(QuestItemDeliveredSignal), + } + + impl __sdk::InModule for QuestProgressSignal { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_record_input_type.rs index d07da423..6a82982d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_record_input_type.rs @@ -2,11 +2,16 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; -use super::quest_reward_snapshot_type::QuestRewardSnapshot; use super::quest_status_type::QuestStatus; +use super::quest_reward_snapshot_type::QuestRewardSnapshot; +use super::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; use super::quest_step_snapshot_type::QuestStepSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] @@ -14,15 +19,15 @@ use super::quest_step_snapshot_type::QuestStepSnapshot; pub struct QuestRecordInput { pub quest_id: String, pub runtime_session_id: String, - pub story_session_id: Option, + pub story_session_id: Option::, pub actor_user_id: String, pub issuer_npc_id: String, pub issuer_npc_name: String, - pub scene_id: Option, - pub chapter_id: Option, - pub act_id: Option, - pub thread_id: Option, - pub contract_id: Option, + pub scene_id: Option::, + pub chapter_id: Option::, + pub act_id: Option::, + pub thread_id: Option::, + pub contract_id: Option::, pub title: String, pub description: String, pub summary: String, @@ -31,16 +36,18 @@ pub struct QuestRecordInput { pub reward: QuestRewardSnapshot, pub reward_text: String, pub narrative_binding: QuestNarrativeBindingSnapshot, - pub steps: Vec, - pub active_step_id: Option, + pub steps: Vec::, + pub active_step_id: Option::, pub visible_stage: u32, - pub hidden_flags: Vec, - pub discovered_fact_ids: Vec, - pub related_carrier_ids: Vec, - pub consequence_ids: Vec, + pub hidden_flags: Vec::, + pub discovered_fact_ids: Vec::, + pub related_carrier_ids: Vec::, + pub consequence_ids: Vec::, pub created_at_micros: i64, } + impl __sdk::InModule for QuestRecordInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_record_table.rs index 07e6e918..3ccd7a81 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_record_table.rs @@ -2,13 +2,18 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; -use super::quest_objective_snapshot_type::QuestObjectiveSnapshot; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_record_type::QuestRecord; -use super::quest_reward_snapshot_type::QuestRewardSnapshot; use super::quest_status_type::QuestStatus; +use super::quest_reward_snapshot_type::QuestRewardSnapshot; +use super::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; use super::quest_step_snapshot_type::QuestStepSnapshot; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::quest_objective_snapshot_type::QuestObjectiveSnapshot; /// Table handle for the table `quest_record`. /// @@ -49,12 +54,8 @@ impl<'ctx> __sdk::Table for QuestRecordTableHandle<'ctx> { type Row = QuestRecord; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = QuestRecordInsertCallbackId; @@ -100,38 +101,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for QuestRecordTableHandle<'ctx> { } } -/// Access to the `quest_id` unique index on the table `quest_record`, -/// which allows point queries on the field of the same name -/// via the [`QuestRecordQuestIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.quest_record().quest_id().find(...)`. -pub struct QuestRecordQuestIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> QuestRecordTableHandle<'ctx> { - /// Get a handle on the `quest_id` unique index on the table `quest_record`. - pub fn quest_id(&self) -> QuestRecordQuestIdUnique<'ctx> { - QuestRecordQuestIdUnique { - imp: self.imp.get_unique_constraint::("quest_id"), - phantom: std::marker::PhantomData, + /// Access to the `quest_id` unique index on the table `quest_record`, + /// which allows point queries on the field of the same name + /// via the [`QuestRecordQuestIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.quest_record().quest_id().find(...)`. + pub struct QuestRecordQuestIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> QuestRecordQuestIdUnique<'ctx> { - /// Find the subscribed row whose `quest_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 { - self.imp.find(col_val) - } -} + impl<'ctx> QuestRecordTableHandle<'ctx> { + /// Get a handle on the `quest_id` unique index on the table `quest_record`. + pub fn quest_id(&self) -> QuestRecordQuestIdUnique<'ctx> { + QuestRecordQuestIdUnique { + imp: self.imp.get_unique_constraint::("quest_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> QuestRecordQuestIdUnique<'ctx> { + /// Find the subscribed row whose `quest_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("quest_record"); _table.add_unique_constraint::("quest_id", |row| &row.quest_id); } @@ -141,24 +143,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `QuestRecord`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait quest_recordQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `QuestRecord`. - fn quest_record(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `QuestRecord`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait quest_recordQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `QuestRecord`. + fn quest_record(&self) -> __sdk::__query_builder::Table; + } + + impl quest_recordQueryTableAccess for __sdk::QueryTableAccessor { + fn quest_record(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("quest_record") + } + } -impl quest_recordQueryTableAccess for __sdk::QueryTableAccessor { - fn quest_record(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("quest_record") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_record_type.rs index 4243e91c..10f98806 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_record_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_record_type.rs @@ -2,28 +2,33 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; -use super::quest_objective_snapshot_type::QuestObjectiveSnapshot; -use super::quest_reward_snapshot_type::QuestRewardSnapshot; use super::quest_status_type::QuestStatus; +use super::quest_reward_snapshot_type::QuestRewardSnapshot; +use super::quest_narrative_binding_snapshot_type::QuestNarrativeBindingSnapshot; use super::quest_step_snapshot_type::QuestStepSnapshot; +use super::quest_objective_snapshot_type::QuestObjectiveSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct QuestRecord { pub quest_id: String, pub runtime_session_id: String, - pub story_session_id: Option, + pub story_session_id: Option::, pub actor_user_id: String, pub issuer_npc_id: String, pub issuer_npc_name: String, - pub scene_id: Option, - pub chapter_id: Option, - pub act_id: Option, - pub thread_id: Option, - pub contract_id: Option, + pub scene_id: Option::, + pub chapter_id: Option::, + pub act_id: Option::, + pub thread_id: Option::, + pub contract_id: Option::, pub title: String, pub description: String, pub summary: String, @@ -34,38 +39,40 @@ pub struct QuestRecord { pub reward: QuestRewardSnapshot, pub reward_text: String, pub narrative_binding: QuestNarrativeBindingSnapshot, - pub steps: Vec, - pub active_step_id: Option, + pub steps: Vec::, + pub active_step_id: Option::, pub visible_stage: u32, - pub hidden_flags: Vec, - pub discovered_fact_ids: Vec, - pub related_carrier_ids: Vec, - pub consequence_ids: Vec, + pub hidden_flags: Vec::, + pub discovered_fact_ids: Vec::, + pub related_carrier_ids: Vec::, + pub consequence_ids: Vec::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, - pub completed_at: Option<__sdk::Timestamp>, - pub turned_in_at: Option<__sdk::Timestamp>, + pub completed_at: Option::<__sdk::Timestamp>, + pub turned_in_at: Option::<__sdk::Timestamp>, } + impl __sdk::InModule for QuestRecord { type Module = super::RemoteModule; } + /// Column accessor struct for the table `QuestRecord`. /// /// Provides typed access to columns for query building. pub struct QuestRecordCols { pub quest_id: __sdk::__query_builder::Col, pub runtime_session_id: __sdk::__query_builder::Col, - pub story_session_id: __sdk::__query_builder::Col>, + pub story_session_id: __sdk::__query_builder::Col>, pub actor_user_id: __sdk::__query_builder::Col, pub issuer_npc_id: __sdk::__query_builder::Col, pub issuer_npc_name: __sdk::__query_builder::Col, - pub scene_id: __sdk::__query_builder::Col>, - pub chapter_id: __sdk::__query_builder::Col>, - pub act_id: __sdk::__query_builder::Col>, - pub thread_id: __sdk::__query_builder::Col>, - pub contract_id: __sdk::__query_builder::Col>, + pub scene_id: __sdk::__query_builder::Col>, + pub chapter_id: __sdk::__query_builder::Col>, + pub act_id: __sdk::__query_builder::Col>, + pub thread_id: __sdk::__query_builder::Col>, + pub contract_id: __sdk::__query_builder::Col>, pub title: __sdk::__query_builder::Col, pub description: __sdk::__query_builder::Col, pub summary: __sdk::__query_builder::Col, @@ -76,17 +83,17 @@ pub struct QuestRecordCols { pub reward: __sdk::__query_builder::Col, pub reward_text: __sdk::__query_builder::Col, pub narrative_binding: __sdk::__query_builder::Col, - pub steps: __sdk::__query_builder::Col>, - pub active_step_id: __sdk::__query_builder::Col>, + pub steps: __sdk::__query_builder::Col>, + pub active_step_id: __sdk::__query_builder::Col>, pub visible_stage: __sdk::__query_builder::Col, - pub hidden_flags: __sdk::__query_builder::Col>, - pub discovered_fact_ids: __sdk::__query_builder::Col>, - pub related_carrier_ids: __sdk::__query_builder::Col>, - pub consequence_ids: __sdk::__query_builder::Col>, + pub hidden_flags: __sdk::__query_builder::Col>, + pub discovered_fact_ids: __sdk::__query_builder::Col>, + pub related_carrier_ids: __sdk::__query_builder::Col>, + pub consequence_ids: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, - pub completed_at: __sdk::__query_builder::Col>, - pub turned_in_at: __sdk::__query_builder::Col>, + pub completed_at: __sdk::__query_builder::Col>, + pub turned_in_at: __sdk::__query_builder::Col>, } impl __sdk::__query_builder::HasCols for QuestRecord { @@ -110,10 +117,7 @@ impl __sdk::__query_builder::HasCols for QuestRecord { objective: __sdk::__query_builder::Col::new(table_name, "objective"), progress: __sdk::__query_builder::Col::new(table_name, "progress"), status: __sdk::__query_builder::Col::new(table_name, "status"), - completion_notified: __sdk::__query_builder::Col::new( - table_name, - "completion_notified", - ), + completion_notified: __sdk::__query_builder::Col::new(table_name, "completion_notified"), reward: __sdk::__query_builder::Col::new(table_name, "reward"), reward_text: __sdk::__query_builder::Col::new(table_name, "reward_text"), narrative_binding: __sdk::__query_builder::Col::new(table_name, "narrative_binding"), @@ -121,19 +125,14 @@ impl __sdk::__query_builder::HasCols for QuestRecord { active_step_id: __sdk::__query_builder::Col::new(table_name, "active_step_id"), visible_stage: __sdk::__query_builder::Col::new(table_name, "visible_stage"), hidden_flags: __sdk::__query_builder::Col::new(table_name, "hidden_flags"), - discovered_fact_ids: __sdk::__query_builder::Col::new( - table_name, - "discovered_fact_ids", - ), - related_carrier_ids: __sdk::__query_builder::Col::new( - table_name, - "related_carrier_ids", - ), + discovered_fact_ids: __sdk::__query_builder::Col::new(table_name, "discovered_fact_ids"), + related_carrier_ids: __sdk::__query_builder::Col::new(table_name, "related_carrier_ids"), consequence_ids: __sdk::__query_builder::Col::new(table_name, "consequence_ids"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), completed_at: __sdk::__query_builder::Col::new(table_name, "completed_at"), turned_in_at: __sdk::__query_builder::Col::new(table_name, "turned_in_at"), + } } } @@ -155,12 +154,11 @@ impl __sdk::__query_builder::HasIxCols for QuestRecord { actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), issuer_npc_id: __sdk::__query_builder::IxCol::new(table_name, "issuer_npc_id"), quest_id: __sdk::__query_builder::IxCol::new(table_name, "quest_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), + runtime_session_id: __sdk::__query_builder::IxCol::new(table_name, "runtime_session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for QuestRecord {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_equipment_slot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_equipment_slot_type.rs index 43a942c4..333521e0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_equipment_slot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_equipment_slot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum QuestRewardEquipmentSlot { Armor, Relic, + } + + impl __sdk::InModule for QuestRewardEquipmentSlot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_intel_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_intel_type.rs index 9938686a..560847bd 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_intel_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_intel_type.rs @@ -2,15 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct QuestRewardIntel { pub rumor_text: String, - pub unlocked_scene_id: Option, + pub unlocked_scene_id: Option::, } + impl __sdk::InModule for QuestRewardIntel { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_rarity_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_rarity_type.rs index 7fc4f7ec..632c46aa 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_rarity_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_rarity_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum QuestRewardItemRarity { Epic, Legendary, + } + + impl __sdk::InModule for QuestRewardItemRarity { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_type.rs index a62f9d93..dc0af611 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_item_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::quest_reward_equipment_slot_type::QuestRewardEquipmentSlot; use super::quest_reward_item_rarity_type::QuestRewardItemRarity; +use super::quest_reward_equipment_slot_type::QuestRewardEquipmentSlot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,15 +18,17 @@ pub struct QuestRewardItem { pub item_id: String, pub category: String, pub name: String, - pub description: Option, + pub description: Option::, pub quantity: u32, pub rarity: QuestRewardItemRarity, - pub tags: Vec, + pub tags: Vec::, pub stackable: bool, pub stack_key: String, - pub equipment_slot_id: Option, + pub equipment_slot_id: Option::, } + impl __sdk::InModule for QuestRewardItem { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_snapshot_type.rs index 995e84ad..55790858 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_reward_snapshot_type.rs @@ -2,22 +2,29 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::quest_reward_intel_type::QuestRewardIntel; use super::quest_reward_item_type::QuestRewardItem; +use super::quest_reward_intel_type::QuestRewardIntel; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct QuestRewardSnapshot { pub affinity_bonus: i32, pub currency: i64, - pub experience: Option, - pub items: Vec, - pub intel: Option, - pub story_hint: Option, + pub experience: Option::, + pub items: Vec::, + pub intel: Option::, + pub story_hint: Option::, } + impl __sdk::InModule for QuestRewardSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_scene_reached_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_scene_reached_signal_type.rs index 723d9325..d188fab1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_scene_reached_signal_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_scene_reached_signal_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct QuestSceneReachedSignal { pub scene_id: String, } + impl __sdk::InModule for QuestSceneReachedSignal { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_apply_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_apply_input_type.rs index d93ff928..89cc2c6f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_apply_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_apply_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_progress_signal_type::QuestProgressSignal; @@ -14,6 +19,8 @@ pub struct QuestSignalApplyInput { pub updated_at_micros: i64, } + impl __sdk::InModule for QuestSignalApplyInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_kind_type.rs index 04ea6661..0d36f2fa 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_signal_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +24,12 @@ pub enum QuestSignalKind { SceneReached, ItemDelivered, + } + + impl __sdk::InModule for QuestSignalKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_status_type.rs index f5defbb7..3ea098d8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +24,12 @@ pub enum QuestStatus { Failed, Expired, + } + + impl __sdk::InModule for QuestStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_step_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_step_snapshot_type.rs index 0f27cb9e..c1e3bc1a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_step_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_step_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_objective_kind_type::QuestObjectiveKind; @@ -11,10 +16,10 @@ use super::quest_objective_kind_type::QuestObjectiveKind; pub struct QuestStepSnapshot { pub step_id: String, pub kind: QuestObjectiveKind, - pub target_hostile_npc_id: Option, - pub target_npc_id: Option, - pub target_scene_id: Option, - pub target_item_id: Option, + pub target_hostile_npc_id: Option::, + pub target_npc_id: Option::, + pub target_scene_id: Option::, + pub target_item_id: Option::, pub required_count: u32, pub progress: u32, pub title: String, @@ -22,6 +27,8 @@ pub struct QuestStepSnapshot { pub complete_text: String, } + impl __sdk::InModule for QuestStepSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_treasure_inspected_signal_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_treasure_inspected_signal_type.rs index 51caed77..8003e616 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_treasure_inspected_signal_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_treasure_inspected_signal_type.rs @@ -2,14 +2,22 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct QuestTreasureInspectedSignal { - pub scene_id: Option, + pub scene_id: Option::, } + impl __sdk::InModule for QuestTreasureInspectedSignal { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/quest_turn_in_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/quest_turn_in_input_type.rs index 4f48a44a..9d87ae49 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/quest_turn_in_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/quest_turn_in_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct QuestTurnInInput { pub turned_in_at_micros: i64, } + impl __sdk::InModule for QuestTurnInInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_and_return_procedure.rs index 7d6fbfd1..9b886a0d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::resolve_combat_action_input_type::ResolveCombatActionInput; use super::resolve_combat_action_procedure_result_type::ResolveCombatActionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ResolveCombatActionAndReturnArgs { + struct ResolveCombatActionAndReturnArgs { pub input: ResolveCombatActionInput, } + impl __sdk::InModule for ResolveCombatActionAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ResolveCombatActionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resolve_combat_action_and_return { - fn resolve_combat_action_and_return(&self, input: ResolveCombatActionInput) { - self.resolve_combat_action_and_return_then(input, |_, _| {}); + fn resolve_combat_action_and_return(&self, input: ResolveCombatActionInput, +) { + self.resolve_combat_action_and_return_then(input, |_, _| {}); } fn resolve_combat_action_and_return_then( &self, input: ResolveCombatActionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl resolve_combat_action_and_return for super::RemoteProcedures { &self, input: ResolveCombatActionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, ResolveCombatActionProcedureResult>( - "resolve_combat_action_and_return", - ResolveCombatActionAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, ResolveCombatActionProcedureResult>( + "resolve_combat_action_and_return", + ResolveCombatActionAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_input_type.rs index 7dea1c21..72c6524f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -18,6 +24,8 @@ pub struct ResolveCombatActionInput { pub updated_at_micros: i64, } + impl __sdk::InModule for ResolveCombatActionInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_procedure_result_type.rs index c7a13f85..f21fc0ee 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::resolve_combat_action_result_type::ResolveCombatActionResult; @@ -10,10 +15,12 @@ use super::resolve_combat_action_result_type::ResolveCombatActionResult; #[sats(crate = __lib)] pub struct ResolveCombatActionProcedureResult { pub ok: bool, - pub result: Option, - pub error_message: Option, + pub result: Option::, + pub error_message: Option::, } + impl __sdk::InModule for ResolveCombatActionProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_reducer.rs index 8398db8c..1c3f29c9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::resolve_combat_action_input_type::ResolveCombatActionInput; @@ -14,8 +19,10 @@ pub(super) struct ResolveCombatActionArgs { impl From for super::Reducer { fn from(args: ResolveCombatActionArgs) -> Self { - Self::ResolveCombatAction { input: args.input } - } + Self::ResolveCombatAction { + input: args.input, +} +} } impl __sdk::InModule for ResolveCombatActionArgs { @@ -33,8 +40,9 @@ pub trait resolve_combat_action { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`resolve_combat_action:resolve_combat_action_then`] to run a callback after the reducer completes. - fn resolve_combat_action(&self, input: ResolveCombatActionInput) -> __sdk::Result<()> { - self.resolve_combat_action_then(input, |_, _| {}) + fn resolve_combat_action(&self, input: ResolveCombatActionInput, +) -> __sdk::Result<()> { + self.resolve_combat_action_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `resolve_combat_action` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait resolve_combat_action { &self, input: ResolveCombatActionInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl resolve_combat_action for super::RemoteReducers { &self, input: ResolveCombatActionInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(ResolveCombatActionArgs { input }, callback) + self.imp.invoke_reducer_with_callback(ResolveCombatActionArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_result_type.rs index b47e088c..8057358f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_combat_action_result_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::battle_state_snapshot_type::BattleStateSnapshot; use super::combat_outcome_type::CombatOutcome; +use super::battle_state_snapshot_type::BattleStateSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -16,6 +21,8 @@ pub struct ResolveCombatActionResult { pub outcome: CombatOutcome, } + impl __sdk::InModule for ResolveCombatActionResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_and_return_procedure.rs index 268483bf..150fa443 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::npc_battle_interaction_procedure_result_type::NpcBattleInteractionProcedureResult; use super::resolve_npc_battle_interaction_input_type::ResolveNpcBattleInteractionInput; +use super::npc_battle_interaction_procedure_result_type::NpcBattleInteractionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ResolveNpcBattleInteractionAndReturnArgs { + struct ResolveNpcBattleInteractionAndReturnArgs { pub input: ResolveNpcBattleInteractionInput, } + impl __sdk::InModule for ResolveNpcBattleInteractionAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ResolveNpcBattleInteractionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resolve_npc_battle_interaction_and_return { - fn resolve_npc_battle_interaction_and_return(&self, input: ResolveNpcBattleInteractionInput) { - self.resolve_npc_battle_interaction_and_return_then(input, |_, _| {}); + fn resolve_npc_battle_interaction_and_return(&self, input: ResolveNpcBattleInteractionInput, +) { + self.resolve_npc_battle_interaction_and_return_then(input, |_, _| {}); } fn resolve_npc_battle_interaction_and_return_then( &self, input: ResolveNpcBattleInteractionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl resolve_npc_battle_interaction_and_return for super::RemoteProcedures { &self, input: ResolveNpcBattleInteractionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, NpcBattleInteractionProcedureResult>( - "resolve_npc_battle_interaction_and_return", - ResolveNpcBattleInteractionAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, NpcBattleInteractionProcedureResult>( + "resolve_npc_battle_interaction_and_return", + ResolveNpcBattleInteractionAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_input_type.rs index e8eba7a6..907cc7e2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_battle_interaction_input_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::resolve_npc_interaction_input_type::ResolveNpcInteractionInput; use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; +use super::resolve_npc_interaction_input_type::ResolveNpcInteractionInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,7 +18,7 @@ pub struct ResolveNpcBattleInteractionInput { pub npc_interaction: ResolveNpcInteractionInput, pub story_session_id: String, pub actor_user_id: String, - pub battle_state_id: Option, + pub battle_state_id: Option::, pub player_hp: i32, pub player_max_hp: i32, pub player_mana: i32, @@ -21,9 +26,11 @@ pub struct ResolveNpcBattleInteractionInput { pub target_hp: i32, pub target_max_hp: i32, pub experience_reward: u32, - pub reward_items: Vec, + pub reward_items: Vec::, } + impl __sdk::InModule for ResolveNpcBattleInteractionInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_and_return_procedure.rs index 4604fc30..4952a32a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::npc_interaction_procedure_result_type::NpcInteractionProcedureResult; use super::resolve_npc_interaction_input_type::ResolveNpcInteractionInput; +use super::npc_interaction_procedure_result_type::NpcInteractionProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ResolveNpcInteractionAndReturnArgs { + struct ResolveNpcInteractionAndReturnArgs { pub input: ResolveNpcInteractionInput, } + impl __sdk::InModule for ResolveNpcInteractionAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ResolveNpcInteractionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resolve_npc_interaction_and_return { - fn resolve_npc_interaction_and_return(&self, input: ResolveNpcInteractionInput) { - self.resolve_npc_interaction_and_return_then(input, |_, _| {}); + fn resolve_npc_interaction_and_return(&self, input: ResolveNpcInteractionInput, +) { + self.resolve_npc_interaction_and_return_then(input, |_, _| {}); } fn resolve_npc_interaction_and_return_then( &self, input: ResolveNpcInteractionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl resolve_npc_interaction_and_return for super::RemoteProcedures { &self, input: ResolveNpcInteractionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, NpcInteractionProcedureResult>( - "resolve_npc_interaction_and_return", - ResolveNpcInteractionAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, NpcInteractionProcedureResult>( + "resolve_npc_interaction_and_return", + ResolveNpcInteractionAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_input_type.rs index 9a4439ce..d553ea4e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,10 +17,12 @@ pub struct ResolveNpcInteractionInput { pub npc_id: String, pub npc_name: String, pub interaction_function_id: String, - pub release_npc_id: Option, + pub release_npc_id: Option::, pub updated_at_micros: i64, } + impl __sdk::InModule for ResolveNpcInteractionInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_reducer.rs index 352f5a93..37563788 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_interaction_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::resolve_npc_interaction_input_type::ResolveNpcInteractionInput; @@ -14,8 +19,10 @@ pub(super) struct ResolveNpcInteractionArgs { impl From for super::Reducer { fn from(args: ResolveNpcInteractionArgs) -> Self { - Self::ResolveNpcInteraction { input: args.input } - } + Self::ResolveNpcInteraction { + input: args.input, +} +} } impl __sdk::InModule for ResolveNpcInteractionArgs { @@ -33,8 +40,9 @@ pub trait resolve_npc_interaction { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`resolve_npc_interaction:resolve_npc_interaction_then`] to run a callback after the reducer completes. - fn resolve_npc_interaction(&self, input: ResolveNpcInteractionInput) -> __sdk::Result<()> { - self.resolve_npc_interaction_then(input, |_, _| {}) + fn resolve_npc_interaction(&self, input: ResolveNpcInteractionInput, +) -> __sdk::Result<()> { + self.resolve_npc_interaction_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `resolve_npc_interaction` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait resolve_npc_interaction { &self, input: ResolveNpcInteractionInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl resolve_npc_interaction for super::RemoteReducers { &self, input: ResolveNpcInteractionInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(ResolveNpcInteractionArgs { input }, callback) + self.imp.invoke_reducer_with_callback(ResolveNpcInteractionArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_and_return_procedure.rs index 65b1690e..2411e620 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::npc_state_procedure_result_type::NpcStateProcedureResult; use super::resolve_npc_social_action_input_type::ResolveNpcSocialActionInput; +use super::npc_state_procedure_result_type::NpcStateProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ResolveNpcSocialActionAndReturnArgs { + struct ResolveNpcSocialActionAndReturnArgs { pub input: ResolveNpcSocialActionInput, } + impl __sdk::InModule for ResolveNpcSocialActionAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ResolveNpcSocialActionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resolve_npc_social_action_and_return { - fn resolve_npc_social_action_and_return(&self, input: ResolveNpcSocialActionInput) { - self.resolve_npc_social_action_and_return_then(input, |_, _| {}); + fn resolve_npc_social_action_and_return(&self, input: ResolveNpcSocialActionInput, +) { + self.resolve_npc_social_action_and_return_then(input, |_, _| {}); } fn resolve_npc_social_action_and_return_then( &self, input: ResolveNpcSocialActionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl resolve_npc_social_action_and_return for super::RemoteProcedures { &self, input: ResolveNpcSocialActionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, NpcStateProcedureResult>( - "resolve_npc_social_action_and_return", - ResolveNpcSocialActionAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, NpcStateProcedureResult>( + "resolve_npc_social_action_and_return", + ResolveNpcSocialActionAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_input_type.rs index 29487297..10df08b1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::npc_social_action_kind_type::NpcSocialActionKind; @@ -13,11 +18,13 @@ pub struct ResolveNpcSocialActionInput { pub npc_id: String, pub npc_name: String, pub action_kind: NpcSocialActionKind, - pub affinity_gain_override: Option, - pub note: Option, + pub affinity_gain_override: Option::, + pub note: Option::, pub updated_at_micros: i64, } + impl __sdk::InModule for ResolveNpcSocialActionInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_reducer.rs index 9b326931..e8717b6f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_npc_social_action_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::resolve_npc_social_action_input_type::ResolveNpcSocialActionInput; @@ -14,8 +19,10 @@ pub(super) struct ResolveNpcSocialActionArgs { impl From for super::Reducer { fn from(args: ResolveNpcSocialActionArgs) -> Self { - Self::ResolveNpcSocialAction { input: args.input } - } + Self::ResolveNpcSocialAction { + input: args.input, +} +} } impl __sdk::InModule for ResolveNpcSocialActionArgs { @@ -33,8 +40,9 @@ pub trait resolve_npc_social_action { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`resolve_npc_social_action:resolve_npc_social_action_then`] to run a callback after the reducer completes. - fn resolve_npc_social_action(&self, input: ResolveNpcSocialActionInput) -> __sdk::Result<()> { - self.resolve_npc_social_action_then(input, |_, _| {}) + fn resolve_npc_social_action(&self, input: ResolveNpcSocialActionInput, +) -> __sdk::Result<()> { + self.resolve_npc_social_action_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `resolve_npc_social_action` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait resolve_npc_social_action { &self, input: ResolveNpcSocialActionInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl resolve_npc_social_action for super::RemoteReducers { &self, input: ResolveNpcSocialActionInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(ResolveNpcSocialActionArgs { input }, callback) + self.imp.invoke_reducer_with_callback(ResolveNpcSocialActionArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_and_return_procedure.rs index 0b8f6bad..cc50e10f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::treasure_record_procedure_result_type::TreasureRecordProcedureResult; use super::treasure_resolve_input_type::TreasureResolveInput; +use super::treasure_record_procedure_result_type::TreasureRecordProcedureResult; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ResolveTreasureInteractionAndReturnArgs { + struct ResolveTreasureInteractionAndReturnArgs { pub input: TreasureResolveInput, } + impl __sdk::InModule for ResolveTreasureInteractionAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ResolveTreasureInteractionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resolve_treasure_interaction_and_return { - fn resolve_treasure_interaction_and_return(&self, input: TreasureResolveInput) { - self.resolve_treasure_interaction_and_return_then(input, |_, _| {}); + fn resolve_treasure_interaction_and_return(&self, input: TreasureResolveInput, +) { + self.resolve_treasure_interaction_and_return_then(input, |_, _| {}); } fn resolve_treasure_interaction_and_return_then( &self, input: TreasureResolveInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl resolve_treasure_interaction_and_return for super::RemoteProcedures { &self, input: TreasureResolveInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, TreasureRecordProcedureResult>( - "resolve_treasure_interaction_and_return", - ResolveTreasureInteractionAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, TreasureRecordProcedureResult>( + "resolve_treasure_interaction_and_return", + ResolveTreasureInteractionAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_reducer.rs index 221ac39d..6a830425 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resolve_treasure_interaction_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::treasure_resolve_input_type::TreasureResolveInput; @@ -14,8 +19,10 @@ pub(super) struct ResolveTreasureInteractionArgs { impl From for super::Reducer { fn from(args: ResolveTreasureInteractionArgs) -> Self { - Self::ResolveTreasureInteraction { input: args.input } - } + Self::ResolveTreasureInteraction { + input: args.input, +} +} } impl __sdk::InModule for ResolveTreasureInteractionArgs { @@ -33,8 +40,9 @@ pub trait resolve_treasure_interaction { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`resolve_treasure_interaction:resolve_treasure_interaction_then`] to run a callback after the reducer completes. - fn resolve_treasure_interaction(&self, input: TreasureResolveInput) -> __sdk::Result<()> { - self.resolve_treasure_interaction_then(input, |_, _| {}) + fn resolve_treasure_interaction(&self, input: TreasureResolveInput, +) -> __sdk::Result<()> { + self.resolve_treasure_interaction_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `resolve_treasure_interaction` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait resolve_treasure_interaction { &self, input: TreasureResolveInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl resolve_treasure_interaction for super::RemoteReducers { &self, input: TreasureResolveInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(ResolveTreasureInteractionArgs { input }, callback) + self.imp.invoke_reducer_with_callback(ResolveTreasureInteractionArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/resume_profile_save_archive_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/resume_profile_save_archive_and_return_procedure.rs index 73e6d668..8505e52a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/resume_profile_save_archive_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/resume_profile_save_archive_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_save_archive_procedure_result_type::RuntimeProfileSaveArchiveProcedureResult; use super::runtime_profile_save_archive_resume_input_type::RuntimeProfileSaveArchiveResumeInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct ResumeProfileSaveArchiveAndReturnArgs { + struct ResumeProfileSaveArchiveAndReturnArgs { pub input: RuntimeProfileSaveArchiveResumeInput, } + impl __sdk::InModule for ResumeProfileSaveArchiveAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for ResumeProfileSaveArchiveAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait resume_profile_save_archive_and_return { - fn resume_profile_save_archive_and_return(&self, input: RuntimeProfileSaveArchiveResumeInput) { - self.resume_profile_save_archive_and_return_then(input, |_, _| {}); + fn resume_profile_save_archive_and_return(&self, input: RuntimeProfileSaveArchiveResumeInput, +) { + self.resume_profile_save_archive_and_return_then(input, |_, _| {}); } fn resume_profile_save_archive_and_return_then( &self, input: RuntimeProfileSaveArchiveResumeInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl resume_profile_save_archive_and_return for super::RemoteProcedures { &self, input: RuntimeProfileSaveArchiveResumeInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeProfileSaveArchiveProcedureResult>( - "resume_profile_save_archive_and_return", - ResumeProfileSaveArchiveAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeProfileSaveArchiveProcedureResult>( + "resume_profile_save_archive_and_return", + ResumeProfileSaveArchiveAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_kind_type.rs index e082dc36..3888a866 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -27,8 +32,12 @@ pub enum RpgAgentDraftCardKind { Carrier, SidequestSeed, + } + + impl __sdk::InModule for RpgAgentDraftCardKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_status_type.rs index 391625f5..f890218d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_draft_card_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,8 +20,12 @@ pub enum RpgAgentDraftCardStatus { Locked, Warning, + } + + impl __sdk::InModule for RpgAgentDraftCardStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_kind_type.rs index fc54a7b1..180466b0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +24,12 @@ pub enum RpgAgentMessageKind { Warning, ActionResult, + } + + impl __sdk::InModule for RpgAgentMessageKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_role_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_role_type.rs index 67e383f2..ad7e445b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_role_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_message_role_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum RpgAgentMessageRole { Assistant, System, + } + + impl __sdk::InModule for RpgAgentMessageRole { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_status_type.rs index 555c0439..42cd9fc2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -15,8 +20,12 @@ pub enum RpgAgentOperationStatus { Completed, Failed, + } + + impl __sdk::InModule for RpgAgentOperationStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_type_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_type_type.rs index c3e7b8ac..60ee2ecf 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_type_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_operation_type_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -33,8 +38,12 @@ pub enum RpgAgentOperationType { PublishWorld, RevertCheckpoint, + } + + impl __sdk::InModule for RpgAgentOperationType { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_stage_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_stage_type.rs index 1a94e20f..b9d0cf0e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_stage_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/rpg_agent_stage_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -25,8 +30,12 @@ pub enum RpgAgentStage { Published, Error, + } + + impl __sdk::InModule for RpgAgentStage { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_clear_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_clear_input_type.rs index e5bc78f0..41fc6954 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_clear_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_clear_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct RuntimeBrowseHistoryClearInput { pub user_id: String, } + impl __sdk::InModule for RuntimeBrowseHistoryClearInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_list_input_type.rs index cdc31641..5795bb3a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_list_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct RuntimeBrowseHistoryListInput { pub user_id: String, } + impl __sdk::InModule for RuntimeBrowseHistoryListInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_procedure_result_type.rs index 3721358f..9c02dd59 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_browse_history_snapshot_type::RuntimeBrowseHistorySnapshot; @@ -10,10 +15,12 @@ use super::runtime_browse_history_snapshot_type::RuntimeBrowseHistorySnapshot; #[sats(crate = __lib)] pub struct RuntimeBrowseHistoryProcedureResult { pub ok: bool, - pub entries: Vec, - pub error_message: Option, + pub entries: Vec::, + pub error_message: Option::, } + impl __sdk::InModule for RuntimeBrowseHistoryProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_snapshot_type.rs index 9222eaed..05c404c1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_browse_history_theme_mode_type::RuntimeBrowseHistoryThemeMode; @@ -16,7 +21,7 @@ pub struct RuntimeBrowseHistorySnapshot { pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option, + pub cover_image_src: Option::, pub theme_mode: RuntimeBrowseHistoryThemeMode, pub author_display_name: String, pub visited_at_micros: i64, @@ -24,6 +29,8 @@ pub struct RuntimeBrowseHistorySnapshot { pub updated_at_micros: i64, } + impl __sdk::InModule for RuntimeBrowseHistorySnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_sync_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_sync_input_type.rs index 0996e66e..09c9fb18 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_sync_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_sync_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_browse_history_write_input_type::RuntimeBrowseHistoryWriteInput; @@ -10,10 +15,12 @@ use super::runtime_browse_history_write_input_type::RuntimeBrowseHistoryWriteInp #[sats(crate = __lib)] pub struct RuntimeBrowseHistorySyncInput { pub user_id: String, - pub entries: Vec, + pub entries: Vec::, pub updated_at_micros: i64, } + impl __sdk::InModule for RuntimeBrowseHistorySyncInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_theme_mode_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_theme_mode_type.rs index fc8a1b11..de120fac 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_theme_mode_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_theme_mode_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -19,8 +24,12 @@ pub enum RuntimeBrowseHistoryThemeMode { Rift, Mythic, + } + + impl __sdk::InModule for RuntimeBrowseHistoryThemeMode { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_write_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_write_input_type.rs index 9a54bd81..fb087aac 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_write_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_browse_history_write_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,14 +16,16 @@ pub struct RuntimeBrowseHistoryWriteInput { pub owner_user_id: String, pub profile_id: String, pub world_name: String, - pub subtitle: Option, - pub summary_text: Option, - pub cover_image_src: Option, - pub theme_mode: Option, - pub author_display_name: Option, - pub visited_at: Option, + pub subtitle: Option::, + pub summary_text: Option::, + pub cover_image_src: Option::, + pub theme_mode: Option::, + pub author_display_name: Option::, + pub visited_at: Option::, } + impl __sdk::InModule for RuntimeBrowseHistoryWriteInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_procedure_result_type.rs index bf0e3103..09374d4c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_inventory_state_snapshot_type::RuntimeInventoryStateSnapshot; @@ -10,10 +15,12 @@ use super::runtime_inventory_state_snapshot_type::RuntimeInventoryStateSnapshot; #[sats(crate = __lib)] pub struct RuntimeInventoryStateProcedureResult { pub ok: bool, - pub snapshot: Option, - pub error_message: Option, + pub snapshot: Option::, + pub error_message: Option::, } + impl __sdk::InModule for RuntimeInventoryStateProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_query_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_query_input_type.rs index e6b02ed3..75c93962 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_query_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_query_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct RuntimeInventoryStateQueryInput { pub actor_user_id: String, } + impl __sdk::InModule for RuntimeInventoryStateQueryInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_snapshot_type.rs index 624e66c6..7ab3ebea 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_inventory_state_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::inventory_slot_snapshot_type::InventorySlotSnapshot; @@ -11,10 +16,12 @@ use super::inventory_slot_snapshot_type::InventorySlotSnapshot; pub struct RuntimeInventoryStateSnapshot { pub runtime_session_id: String, pub actor_user_id: String, - pub backpack_items: Vec, - pub equipment_items: Vec, + pub backpack_items: Vec::, + pub equipment_items: Vec::, } + impl __sdk::InModule for RuntimeInventoryStateSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_equipment_slot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_equipment_slot_type.rs index b539d4f3..01cd4888 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_equipment_slot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_equipment_slot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum RuntimeItemEquipmentSlot { Armor, Relic, + } + + impl __sdk::InModule for RuntimeItemEquipmentSlot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_rarity_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_rarity_type.rs index dc4250ab..a3316ea0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_rarity_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_rarity_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -17,8 +22,12 @@ pub enum RuntimeItemRewardItemRarity { Epic, Legendary, + } + + impl __sdk::InModule for RuntimeItemRewardItemRarity { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_snapshot_type.rs index 4df1f248..65bcb55c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_item_reward_item_snapshot_type.rs @@ -2,10 +2,15 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::runtime_item_equipment_slot_type::RuntimeItemEquipmentSlot; use super::runtime_item_reward_item_rarity_type::RuntimeItemRewardItemRarity; +use super::runtime_item_equipment_slot_type::RuntimeItemEquipmentSlot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,15 +18,17 @@ pub struct RuntimeItemRewardItemSnapshot { pub item_id: String, pub category: String, pub item_name: String, - pub description: Option, + pub description: Option::, pub quantity: u32, pub rarity: RuntimeItemRewardItemRarity, - pub tags: Vec, + pub tags: Vec::, pub stackable: bool, pub stack_key: String, - pub equipment_slot_id: Option, + pub equipment_slot_id: Option::, } + impl __sdk::InModule for RuntimeItemRewardItemSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_platform_theme_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_platform_theme_type.rs index cbb36c5d..7eef5e97 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_platform_theme_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_platform_theme_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum RuntimePlatformTheme { Light, Dark, + } + + impl __sdk::InModule for RuntimePlatformTheme { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_get_input_type.rs index 47af88ec..9be0a158 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct RuntimeProfileDashboardGetInput { pub user_id: String, } + impl __sdk::InModule for RuntimeProfileDashboardGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_procedure_result_type.rs index fa80a719..a04facbb 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_dashboard_snapshot_type::RuntimeProfileDashboardSnapshot; @@ -10,10 +15,12 @@ use super::runtime_profile_dashboard_snapshot_type::RuntimeProfileDashboardSnaps #[sats(crate = __lib)] pub struct RuntimeProfileDashboardProcedureResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for RuntimeProfileDashboardProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_snapshot_type.rs index a3e97b05..6a54e5ff 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_dashboard_snapshot_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,9 +17,11 @@ pub struct RuntimeProfileDashboardSnapshot { pub wallet_balance: u64, pub total_play_time_ms: u64, pub played_world_count: u32, - pub updated_at_micros: Option, + pub updated_at_micros: Option::, } + impl __sdk::InModule for RuntimeProfileDashboardSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_get_input_type.rs index 825a6707..99665ea0 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct RuntimeProfilePlayStatsGetInput { pub user_id: String, } + impl __sdk::InModule for RuntimeProfilePlayStatsGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_procedure_result_type.rs index 5572f438..24044b8b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_play_stats_snapshot_type::RuntimeProfilePlayStatsSnapshot; @@ -10,10 +15,12 @@ use super::runtime_profile_play_stats_snapshot_type::RuntimeProfilePlayStatsSnap #[sats(crate = __lib)] pub struct RuntimeProfilePlayStatsProcedureResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for RuntimeProfilePlayStatsProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_snapshot_type.rs index 472a99c0..e99d2e72 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_play_stats_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_played_world_snapshot_type::RuntimeProfilePlayedWorldSnapshot; @@ -11,10 +16,12 @@ use super::runtime_profile_played_world_snapshot_type::RuntimeProfilePlayedWorld pub struct RuntimeProfilePlayStatsSnapshot { pub user_id: String, pub total_play_time_ms: u64, - pub played_works: Vec, - pub updated_at_micros: Option, + pub played_works: Vec::, + pub updated_at_micros: Option::, } + impl __sdk::InModule for RuntimeProfilePlayStatsSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_played_world_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_played_world_snapshot_type.rs index fa6c1d2c..f642a84d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_played_world_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_played_world_snapshot_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,9 +16,9 @@ pub struct RuntimeProfilePlayedWorldSnapshot { pub played_world_id: String, pub user_id: String, pub world_key: String, - pub owner_user_id: Option, - pub profile_id: Option, - pub world_type: Option, + pub owner_user_id: Option::, + pub profile_id: Option::, + pub world_type: Option::, pub world_title: String, pub world_subtitle: String, pub first_played_at_micros: i64, @@ -20,6 +26,8 @@ pub struct RuntimeProfilePlayedWorldSnapshot { pub last_observed_play_time_ms: u64, } + impl __sdk::InModule for RuntimeProfilePlayedWorldSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_list_input_type.rs index 29eea52e..89524eb1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_list_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct RuntimeProfileSaveArchiveListInput { pub user_id: String, } + impl __sdk::InModule for RuntimeProfileSaveArchiveListInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_procedure_result_type.rs index 4f4d5c0c..7c8e7b07 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_procedure_result_type.rs @@ -2,21 +2,28 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::runtime_profile_save_archive_snapshot_type::RuntimeProfileSaveArchiveSnapshot; use super::runtime_snapshot_type::RuntimeSnapshot; +use super::runtime_profile_save_archive_snapshot_type::RuntimeProfileSaveArchiveSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct RuntimeProfileSaveArchiveProcedureResult { pub ok: bool, - pub entries: Vec, - pub record: Option, - pub current_snapshot: Option, - pub error_message: Option, + pub entries: Vec::, + pub record: Option::, + pub current_snapshot: Option::, + pub error_message: Option::, } + impl __sdk::InModule for RuntimeProfileSaveArchiveProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_resume_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_resume_input_type.rs index 186de3e0..a290bf1f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_resume_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_resume_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,6 +17,8 @@ pub struct RuntimeProfileSaveArchiveResumeInput { pub world_key: String, } + impl __sdk::InModule for RuntimeProfileSaveArchiveResumeInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_snapshot_type.rs index 9843ec8c..d88a1fab 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_save_archive_snapshot_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,21 +16,23 @@ pub struct RuntimeProfileSaveArchiveSnapshot { pub archive_id: String, pub user_id: String, pub world_key: String, - pub owner_user_id: Option, - pub profile_id: Option, - pub world_type: Option, + pub owner_user_id: Option::, + pub profile_id: Option::, + pub world_type: Option::, pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option, + pub cover_image_src: Option::, pub saved_at_micros: i64, pub bottom_tab: String, pub game_state_json: String, - pub current_story_json: Option, + pub current_story_json: Option::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for RuntimeProfileSaveArchiveSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_entry_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_entry_snapshot_type.rs index 8513884e..e4aa66b2 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_entry_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_entry_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_wallet_ledger_source_type_type::RuntimeProfileWalletLedgerSourceType; @@ -17,6 +22,8 @@ pub struct RuntimeProfileWalletLedgerEntrySnapshot { pub created_at_micros: i64, } + impl __sdk::InModule for RuntimeProfileWalletLedgerEntrySnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_list_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_list_input_type.rs index e8a1c111..10d9d0ff 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_list_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_list_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct RuntimeProfileWalletLedgerListInput { pub user_id: String, } + impl __sdk::InModule for RuntimeProfileWalletLedgerListInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_procedure_result_type.rs index 1c0a2b05..809092ae 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_profile_wallet_ledger_entry_snapshot_type::RuntimeProfileWalletLedgerEntrySnapshot; @@ -10,10 +15,12 @@ use super::runtime_profile_wallet_ledger_entry_snapshot_type::RuntimeProfileWall #[sats(crate = __lib)] pub struct RuntimeProfileWalletLedgerProcedureResult { pub ok: bool, - pub entries: Vec, - pub error_message: Option, + pub entries: Vec::, + pub error_message: Option::, } + impl __sdk::InModule for RuntimeProfileWalletLedgerProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_source_type_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_source_type_type.rs index 2b98f5ef..23e8f759 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_source_type_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_source_type_type.rs @@ -2,15 +2,24 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] #[derive(Copy, Eq, Hash)] pub enum RuntimeProfileWalletLedgerSourceType { SnapshotSync, + } + + impl __sdk::InModule for RuntimeProfileWalletLedgerSourceType { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_get_input_type.rs index 1b83318a..555c7863 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct RuntimeSettingGetInput { pub user_id: String, } + impl __sdk::InModule for RuntimeSettingGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_procedure_result_type.rs index 792e33d4..e823af97 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_setting_snapshot_type::RuntimeSettingSnapshot; @@ -10,10 +15,12 @@ use super::runtime_setting_snapshot_type::RuntimeSettingSnapshot; #[sats(crate = __lib)] pub struct RuntimeSettingProcedureResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for RuntimeSettingProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_snapshot_type.rs index 5d92990f..6d6ebae1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_platform_theme_type::RuntimePlatformTheme; @@ -16,6 +21,8 @@ pub struct RuntimeSettingSnapshot { pub updated_at_micros: i64, } + impl __sdk::InModule for RuntimeSettingSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_table.rs index dc1ed5bb..cc7fac56 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::runtime_platform_theme_type::RuntimePlatformTheme; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_setting_type::RuntimeSetting; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::runtime_platform_theme_type::RuntimePlatformTheme; /// Table handle for the table `runtime_setting`. /// @@ -45,12 +50,8 @@ impl<'ctx> __sdk::Table for RuntimeSettingTableHandle<'ctx> { type Row = RuntimeSetting; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = RuntimeSettingInsertCallbackId; @@ -96,38 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for RuntimeSettingTableHandle<'ctx> { } } -/// Access to the `user_id` unique index on the table `runtime_setting`, -/// which allows point queries on the field of the same name -/// via the [`RuntimeSettingUserIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.runtime_setting().user_id().find(...)`. -pub struct RuntimeSettingUserIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> RuntimeSettingTableHandle<'ctx> { - /// Get a handle on the `user_id` unique index on the table `runtime_setting`. - pub fn user_id(&self) -> RuntimeSettingUserIdUnique<'ctx> { - RuntimeSettingUserIdUnique { - imp: self.imp.get_unique_constraint::("user_id"), - phantom: std::marker::PhantomData, + /// Access to the `user_id` unique index on the table `runtime_setting`, + /// which allows point queries on the field of the same name + /// via the [`RuntimeSettingUserIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.runtime_setting().user_id().find(...)`. + pub struct RuntimeSettingUserIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> RuntimeSettingUserIdUnique<'ctx> { - /// Find the subscribed row whose `user_id` column value is equal to `col_val`, - /// if such a row is present in the client cache. - pub fn find(&self, col_val: &String) -> Option { - self.imp.find(col_val) - } -} + impl<'ctx> RuntimeSettingTableHandle<'ctx> { + /// Get a handle on the `user_id` unique index on the table `runtime_setting`. + pub fn user_id(&self) -> RuntimeSettingUserIdUnique<'ctx> { + RuntimeSettingUserIdUnique { + imp: self.imp.get_unique_constraint::("user_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> RuntimeSettingUserIdUnique<'ctx> { + /// Find the subscribed row whose `user_id` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &String) -> Option { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("runtime_setting"); _table.add_unique_constraint::("user_id", |row| &row.user_id); } @@ -137,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `RuntimeSetting`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait runtime_settingQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `RuntimeSetting`. - fn runtime_setting(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `RuntimeSetting`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait runtime_settingQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `RuntimeSetting`. + fn runtime_setting(&self) -> __sdk::__query_builder::Table; + } + + impl runtime_settingQueryTableAccess for __sdk::QueryTableAccessor { + fn runtime_setting(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("runtime_setting") + } + } -impl runtime_settingQueryTableAccess for __sdk::QueryTableAccessor { - fn runtime_setting(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("runtime_setting") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_type.rs index 5a7b61b0..f3c72f73 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_platform_theme_type::RuntimePlatformTheme; @@ -16,10 +21,12 @@ pub struct RuntimeSetting { pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for RuntimeSetting { type Module = super::RemoteModule; } + /// Column accessor struct for the table `RuntimeSetting`. /// /// Provides typed access to columns for query building. @@ -40,6 +47,7 @@ impl __sdk::__query_builder::HasCols for RuntimeSetting { platform_theme: __sdk::__query_builder::Col::new(table_name, "platform_theme"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -56,8 +64,10 @@ impl __sdk::__query_builder::HasIxCols for RuntimeSetting { fn ix_cols(table_name: &'static str) -> Self::IxCols { RuntimeSettingIxCols { user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for RuntimeSetting {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_upsert_input_type.rs index 7091bc8d..347e1675 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_setting_upsert_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_platform_theme_type::RuntimePlatformTheme; @@ -15,6 +20,8 @@ pub struct RuntimeSettingUpsertInput { pub updated_at_micros: i64, } + impl __sdk::InModule for RuntimeSettingUpsertInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_delete_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_delete_input_type.rs index 53bb194c..251417e4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_delete_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_delete_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct RuntimeSnapshotDeleteInput { pub user_id: String, } + impl __sdk::InModule for RuntimeSnapshotDeleteInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_get_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_get_input_type.rs index c19034c6..7340dbf6 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_get_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_get_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct RuntimeSnapshotGetInput { pub user_id: String, } + impl __sdk::InModule for RuntimeSnapshotGetInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_procedure_result_type.rs index 4066d915..466a3e41 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_snapshot_type::RuntimeSnapshot; @@ -10,10 +15,12 @@ use super::runtime_snapshot_type::RuntimeSnapshot; #[sats(crate = __lib)] pub struct RuntimeSnapshotProcedureResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for RuntimeSnapshotProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_row_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_row_type.rs index da66941e..8eec233a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_row_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_row_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,15 +18,17 @@ pub struct RuntimeSnapshotRow { pub saved_at: __sdk::Timestamp, pub bottom_tab: String, pub game_state_json: String, - pub current_story_json: Option, + pub current_story_json: Option::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for RuntimeSnapshotRow { type Module = super::RemoteModule; } + /// Column accessor struct for the table `RuntimeSnapshotRow`. /// /// Provides typed access to columns for query building. @@ -30,7 +38,7 @@ pub struct RuntimeSnapshotRowCols { pub saved_at: __sdk::__query_builder::Col, pub bottom_tab: __sdk::__query_builder::Col, pub game_state_json: __sdk::__query_builder::Col, - pub current_story_json: __sdk::__query_builder::Col>, + pub current_story_json: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -47,6 +55,7 @@ impl __sdk::__query_builder::HasCols for RuntimeSnapshotRow { current_story_json: __sdk::__query_builder::Col::new(table_name, "current_story_json"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -63,8 +72,10 @@ impl __sdk::__query_builder::HasIxCols for RuntimeSnapshotRow { fn ix_cols(table_name: &'static str) -> Self::IxCols { RuntimeSnapshotRowIxCols { user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for RuntimeSnapshotRow {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_table.rs index 9d105016..ea6106d1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_table.rs @@ -2,8 +2,13 @@ // 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::runtime_snapshot_row_type::RuntimeSnapshotRow; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `runtime_snapshot`. /// @@ -44,12 +49,8 @@ impl<'ctx> __sdk::Table for RuntimeSnapshotTableHandle<'ctx> { type Row = RuntimeSnapshotRow; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = RuntimeSnapshotInsertCallbackId; @@ -95,38 +96,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for RuntimeSnapshotTableHandle<'ctx> { } } -/// Access to the `user_id` unique index on the table `runtime_snapshot`, -/// which allows point queries on the field of the same name -/// via the [`RuntimeSnapshotUserIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.runtime_snapshot().user_id().find(...)`. -pub struct RuntimeSnapshotUserIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> RuntimeSnapshotTableHandle<'ctx> { - /// Get a handle on the `user_id` unique index on the table `runtime_snapshot`. - pub fn user_id(&self) -> RuntimeSnapshotUserIdUnique<'ctx> { - RuntimeSnapshotUserIdUnique { - imp: self.imp.get_unique_constraint::("user_id"), - phantom: std::marker::PhantomData, + /// Access to the `user_id` unique index on the table `runtime_snapshot`, + /// which allows point queries on the field of the same name + /// via the [`RuntimeSnapshotUserIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.runtime_snapshot().user_id().find(...)`. + pub struct RuntimeSnapshotUserIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> RuntimeSnapshotUserIdUnique<'ctx> { - /// Find the subscribed row whose `user_id` column value is equal to `col_val`, - /// if such a row is present in the client cache. - pub fn find(&self, col_val: &String) -> Option { - self.imp.find(col_val) - } -} + impl<'ctx> RuntimeSnapshotTableHandle<'ctx> { + /// Get a handle on the `user_id` unique index on the table `runtime_snapshot`. + pub fn user_id(&self) -> RuntimeSnapshotUserIdUnique<'ctx> { + RuntimeSnapshotUserIdUnique { + imp: self.imp.get_unique_constraint::("user_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> RuntimeSnapshotUserIdUnique<'ctx> { + /// Find the subscribed row whose `user_id` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &String) -> Option { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("runtime_snapshot"); _table.add_unique_constraint::("user_id", |row| &row.user_id); } @@ -136,24 +138,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `RuntimeSnapshotRow`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait runtime_snapshotQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `RuntimeSnapshotRow`. - fn runtime_snapshot(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `RuntimeSnapshotRow`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait runtime_snapshotQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `RuntimeSnapshotRow`. + fn runtime_snapshot(&self) -> __sdk::__query_builder::Table; + } + + impl runtime_snapshotQueryTableAccess for __sdk::QueryTableAccessor { + fn runtime_snapshot(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("runtime_snapshot") + } + } -impl runtime_snapshotQueryTableAccess for __sdk::QueryTableAccessor { - fn runtime_snapshot(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("runtime_snapshot") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_type.rs index 1e9e14ad..e8ede33b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,11 +18,13 @@ pub struct RuntimeSnapshot { pub saved_at_micros: i64, pub bottom_tab: String, pub game_state_json: String, - pub current_story_json: Option, + pub current_story_json: Option::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for RuntimeSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_upsert_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_upsert_input_type.rs index 9b3c75df..2379473f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_upsert_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/runtime_snapshot_upsert_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,10 +17,12 @@ pub struct RuntimeSnapshotUpsertInput { pub saved_at_micros: i64, pub bottom_tab: String, pub game_state_json: String, - pub current_story_json: Option, + pub current_story_json: Option::, pub updated_at_micros: i64, } + impl __sdk::InModule for RuntimeSnapshotUpsertInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/save_puzzle_generated_images_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/save_puzzle_generated_images_procedure.rs index 870d6d51..15ccc81f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/save_puzzle_generated_images_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/save_puzzle_generated_images_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; use super::puzzle_generated_images_save_input_type::PuzzleGeneratedImagesSaveInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct SavePuzzleGeneratedImagesArgs { + struct SavePuzzleGeneratedImagesArgs { pub input: PuzzleGeneratedImagesSaveInput, } + impl __sdk::InModule for SavePuzzleGeneratedImagesArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for SavePuzzleGeneratedImagesArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait save_puzzle_generated_images { - fn save_puzzle_generated_images(&self, input: PuzzleGeneratedImagesSaveInput) { - self.save_puzzle_generated_images_then(input, |_, _| {}); + fn save_puzzle_generated_images(&self, input: PuzzleGeneratedImagesSaveInput, +) { + self.save_puzzle_generated_images_then(input, |_, _| {}); } fn save_puzzle_generated_images_then( &self, input: PuzzleGeneratedImagesSaveInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl save_puzzle_generated_images for super::RemoteProcedures { &self, input: PuzzleGeneratedImagesSaveInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "save_puzzle_generated_images", - SavePuzzleGeneratedImagesArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "save_puzzle_generated_images", + SavePuzzleGeneratedImagesArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/select_puzzle_cover_image_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/select_puzzle_cover_image_procedure.rs index fd4dd93c..b12bb89a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/select_puzzle_cover_image_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/select_puzzle_cover_image_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; use super::puzzle_select_cover_image_input_type::PuzzleSelectCoverImageInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct SelectPuzzleCoverImageArgs { + struct SelectPuzzleCoverImageArgs { pub input: PuzzleSelectCoverImageInput, } + impl __sdk::InModule for SelectPuzzleCoverImageArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for SelectPuzzleCoverImageArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait select_puzzle_cover_image { - fn select_puzzle_cover_image(&self, input: PuzzleSelectCoverImageInput) { - self.select_puzzle_cover_image_then(input, |_, _| {}); + fn select_puzzle_cover_image(&self, input: PuzzleSelectCoverImageInput, +) { + self.select_puzzle_cover_image_then(input, |_, _| {}); } fn select_puzzle_cover_image_then( &self, input: PuzzleSelectCoverImageInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl select_puzzle_cover_image for super::RemoteProcedures { &self, input: PuzzleSelectCoverImageInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "select_puzzle_cover_image", - SelectPuzzleCoverImageArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "select_puzzle_cover_image", + SelectPuzzleCoverImageArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_reducer.rs index c5cc5256..44e89238 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_start_input_type::AiTaskStartInput; @@ -14,8 +19,10 @@ pub(super) struct StartAiTaskArgs { impl From for super::Reducer { fn from(args: StartAiTaskArgs) -> Self { - Self::StartAiTask { input: args.input } - } + Self::StartAiTask { + input: args.input, +} +} } impl __sdk::InModule for StartAiTaskArgs { @@ -33,8 +40,9 @@ pub trait start_ai_task { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`start_ai_task:start_ai_task_then`] to run a callback after the reducer completes. - fn start_ai_task(&self, input: AiTaskStartInput) -> __sdk::Result<()> { - self.start_ai_task_then(input, |_, _| {}) + fn start_ai_task(&self, input: AiTaskStartInput, +) -> __sdk::Result<()> { + self.start_ai_task_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `start_ai_task` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait start_ai_task { &self, input: AiTaskStartInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl start_ai_task for super::RemoteReducers { &self, input: AiTaskStartInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(StartAiTaskArgs { input }, callback) + self.imp.invoke_reducer_with_callback(StartAiTaskArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_stage_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_stage_reducer.rs index 24ed5b3f..74b85d62 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_stage_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/start_ai_task_stage_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::ai_task_stage_start_input_type::AiTaskStageStartInput; @@ -14,8 +19,10 @@ pub(super) struct StartAiTaskStageArgs { impl From for super::Reducer { fn from(args: StartAiTaskStageArgs) -> Self { - Self::StartAiTaskStage { input: args.input } - } + Self::StartAiTaskStage { + input: args.input, +} +} } impl __sdk::InModule for StartAiTaskStageArgs { @@ -33,8 +40,9 @@ pub trait start_ai_task_stage { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`start_ai_task_stage:start_ai_task_stage_then`] to run a callback after the reducer completes. - fn start_ai_task_stage(&self, input: AiTaskStageStartInput) -> __sdk::Result<()> { - self.start_ai_task_stage_then(input, |_, _| {}) + fn start_ai_task_stage(&self, input: AiTaskStageStartInput, +) -> __sdk::Result<()> { + self.start_ai_task_stage_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `start_ai_task_stage` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait start_ai_task_stage { &self, input: AiTaskStageStartInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl start_ai_task_stage for super::RemoteReducers { &self, input: AiTaskStageStartInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(StartAiTaskStageArgs { input }, callback) + self.imp.invoke_reducer_with_callback(StartAiTaskStageArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/start_big_fish_run_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/start_big_fish_run_procedure.rs index 6a149f03..b9b3b28c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/start_big_fish_run_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/start_big_fish_run_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::big_fish_run_procedure_result_type::BigFishRunProcedureResult; use super::big_fish_run_start_input_type::BigFishRunStartInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct StartBigFishRunArgs { + struct StartBigFishRunArgs { pub input: BigFishRunStartInput, } + impl __sdk::InModule for StartBigFishRunArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for StartBigFishRunArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait start_big_fish_run { - fn start_big_fish_run(&self, input: BigFishRunStartInput) { - self.start_big_fish_run_then(input, |_, _| {}); + fn start_big_fish_run(&self, input: BigFishRunStartInput, +) { + self.start_big_fish_run_then(input, |_, _| {}); } fn start_big_fish_run_then( &self, input: BigFishRunStartInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl start_big_fish_run for super::RemoteProcedures { &self, input: BigFishRunStartInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( - "start_big_fish_run", - StartBigFishRunArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( + "start_big_fish_run", + StartBigFishRunArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/start_puzzle_run_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/start_puzzle_run_procedure.rs index c3d6d457..849856c8 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/start_puzzle_run_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/start_puzzle_run_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; use super::puzzle_run_start_input_type::PuzzleRunStartInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct StartPuzzleRunArgs { + struct StartPuzzleRunArgs { pub input: PuzzleRunStartInput, } + impl __sdk::InModule for StartPuzzleRunArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for StartPuzzleRunArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait start_puzzle_run { - fn start_puzzle_run(&self, input: PuzzleRunStartInput) { - self.start_puzzle_run_then(input, |_, _| {}); + fn start_puzzle_run(&self, input: PuzzleRunStartInput, +) { + self.start_puzzle_run_then(input, |_, _| {}); } fn start_puzzle_run_then( &self, input: PuzzleRunStartInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl start_puzzle_run for super::RemoteProcedures { &self, input: PuzzleRunStartInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( - "start_puzzle_run", - StartPuzzleRunArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( + "start_puzzle_run", + StartPuzzleRunArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_continue_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_continue_input_type.rs index e0b3f730..d84dde42 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_continue_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_continue_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,10 +16,12 @@ pub struct StoryContinueInput { pub story_session_id: String, pub event_id: String, pub narrative_text: String, - pub choice_function_id: Option, + pub choice_function_id: Option::, pub updated_at_micros: i64, } + impl __sdk::InModule for StoryContinueInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_event_kind_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_event_kind_type.rs index 29836b4a..1072867e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_event_kind_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_event_kind_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -11,8 +16,12 @@ pub enum StoryEventKind { SessionStarted, StoryContinued, + } + + impl __sdk::InModule for StoryEventKind { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_event_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_event_snapshot_type.rs index 881799d5..4afacc4a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_event_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_event_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::story_event_kind_type::StoryEventKind; @@ -13,10 +18,12 @@ pub struct StoryEventSnapshot { pub story_session_id: String, pub event_kind: StoryEventKind, pub narrative_text: String, - pub choice_function_id: Option, + pub choice_function_id: Option::, pub created_at_micros: i64, } + impl __sdk::InModule for StoryEventSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_event_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_event_table.rs index 232a554e..b702797b 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_event_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_event_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::story_event_kind_type::StoryEventKind; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::story_event_type::StoryEvent; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::story_event_kind_type::StoryEventKind; /// Table handle for the table `story_event`. /// @@ -45,12 +50,8 @@ impl<'ctx> __sdk::Table for StoryEventTableHandle<'ctx> { type Row = StoryEvent; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = StoryEventInsertCallbackId; @@ -96,38 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for StoryEventTableHandle<'ctx> { } } -/// Access to the `event_id` unique index on the table `story_event`, -/// which allows point queries on the field of the same name -/// via the [`StoryEventEventIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.story_event().event_id().find(...)`. -pub struct StoryEventEventIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> StoryEventTableHandle<'ctx> { - /// Get a handle on the `event_id` unique index on the table `story_event`. - pub fn event_id(&self) -> StoryEventEventIdUnique<'ctx> { - StoryEventEventIdUnique { - imp: self.imp.get_unique_constraint::("event_id"), - phantom: std::marker::PhantomData, + /// Access to the `event_id` unique index on the table `story_event`, + /// which allows point queries on the field of the same name + /// via the [`StoryEventEventIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.story_event().event_id().find(...)`. + pub struct StoryEventEventIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> StoryEventEventIdUnique<'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 { - self.imp.find(col_val) - } -} + impl<'ctx> StoryEventTableHandle<'ctx> { + /// Get a handle on the `event_id` unique index on the table `story_event`. + pub fn event_id(&self) -> StoryEventEventIdUnique<'ctx> { + StoryEventEventIdUnique { + imp: self.imp.get_unique_constraint::("event_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> StoryEventEventIdUnique<'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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("story_event"); _table.add_unique_constraint::("event_id", |row| &row.event_id); } @@ -137,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `StoryEvent`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait story_eventQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `StoryEvent`. - fn story_event(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `StoryEvent`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait story_eventQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `StoryEvent`. + fn story_event(&self) -> __sdk::__query_builder::Table; + } + + impl story_eventQueryTableAccess for __sdk::QueryTableAccessor { + fn story_event(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("story_event") + } + } -impl story_eventQueryTableAccess for __sdk::QueryTableAccessor { - fn story_event(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("story_event") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_event_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_event_type.rs index 4d3bdd9f..3c9c102d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_event_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_event_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::story_event_kind_type::StoryEventKind; @@ -13,14 +18,16 @@ pub struct StoryEvent { pub story_session_id: String, pub event_kind: StoryEventKind, pub narrative_text: String, - pub choice_function_id: Option, + pub choice_function_id: Option::, pub created_at: __sdk::Timestamp, } + impl __sdk::InModule for StoryEvent { type Module = super::RemoteModule; } + /// Column accessor struct for the table `StoryEvent`. /// /// Provides typed access to columns for query building. @@ -29,7 +36,7 @@ pub struct StoryEventCols { pub story_session_id: __sdk::__query_builder::Col, pub event_kind: __sdk::__query_builder::Col, pub narrative_text: __sdk::__query_builder::Col, - pub choice_function_id: __sdk::__query_builder::Col>, + pub choice_function_id: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, } @@ -43,6 +50,7 @@ impl __sdk::__query_builder::HasCols for StoryEvent { narrative_text: __sdk::__query_builder::Col::new(table_name, "narrative_text"), choice_function_id: __sdk::__query_builder::Col::new(table_name, "choice_function_id"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), + } } } @@ -61,8 +69,10 @@ impl __sdk::__query_builder::HasIxCols for StoryEvent { StoryEventIxCols { event_id: __sdk::__query_builder::IxCol::new(table_name, "event_id"), story_session_id: __sdk::__query_builder::IxCol::new(table_name, "story_session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for StoryEvent {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_input_type.rs index bebf3267..260fc1e4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -12,10 +18,12 @@ pub struct StorySessionInput { pub actor_user_id: String, pub world_profile_id: String, pub initial_prompt: String, - pub opening_summary: Option, + pub opening_summary: Option::, pub created_at_micros: i64, } + impl __sdk::InModule for StorySessionInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_procedure_result_type.rs index 4548d9cc..3e1cfa4f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_procedure_result_type.rs @@ -2,20 +2,27 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::story_event_snapshot_type::StoryEventSnapshot; use super::story_session_snapshot_type::StorySessionSnapshot; +use super::story_event_snapshot_type::StoryEventSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct StorySessionProcedureResult { pub ok: bool, - pub session: Option, - pub event: Option, - pub error_message: Option, + pub session: Option::, + pub event: Option::, + pub error_message: Option::, } + impl __sdk::InModule for StorySessionProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_snapshot_type.rs index b8d2daf6..46f1072f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::story_session_status_type::StorySessionStatus; @@ -14,15 +19,17 @@ pub struct StorySessionSnapshot { pub actor_user_id: String, pub world_profile_id: String, pub initial_prompt: String, - pub opening_summary: Option, + pub opening_summary: Option::, pub latest_narrative_text: String, - pub latest_choice_function_id: Option, + pub latest_choice_function_id: Option::, pub status: StorySessionStatus, pub version: u32, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for StorySessionSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_input_type.rs index d860b7db..5e4e1476 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct StorySessionStateInput { pub story_session_id: String, } + impl __sdk::InModule for StorySessionStateInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_procedure_result_type.rs index cf2148d6..c33c4c77 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_state_procedure_result_type.rs @@ -2,20 +2,27 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::story_event_snapshot_type::StoryEventSnapshot; use super::story_session_snapshot_type::StorySessionSnapshot; +use super::story_event_snapshot_type::StoryEventSnapshot; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] pub struct StorySessionStateProcedureResult { pub ok: bool, - pub session: Option, - pub events: Vec, - pub error_message: Option, + pub session: Option::, + pub events: Vec::, + pub error_message: Option::, } + impl __sdk::InModule for StorySessionStateProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_status_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_status_type.rs index f04aae19..334433fa 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_status_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_status_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum StorySessionStatus { Completed, Archived, + } + + impl __sdk::InModule for StorySessionStatus { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_table.rs index 142f7fa1..d3b4dd67 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::story_session_status_type::StorySessionStatus; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::story_session_type::StorySession; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::story_session_status_type::StorySessionStatus; /// Table handle for the table `story_session`. /// @@ -45,12 +50,8 @@ impl<'ctx> __sdk::Table for StorySessionTableHandle<'ctx> { type Row = StorySession; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = StorySessionInsertCallbackId; @@ -96,38 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for StorySessionTableHandle<'ctx> { } } -/// Access to the `story_session_id` unique index on the table `story_session`, -/// which allows point queries on the field of the same name -/// via the [`StorySessionStorySessionIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.story_session().story_session_id().find(...)`. -pub struct StorySessionStorySessionIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> StorySessionTableHandle<'ctx> { - /// Get a handle on the `story_session_id` unique index on the table `story_session`. - pub fn story_session_id(&self) -> StorySessionStorySessionIdUnique<'ctx> { - StorySessionStorySessionIdUnique { - imp: self.imp.get_unique_constraint::("story_session_id"), - phantom: std::marker::PhantomData, + /// Access to the `story_session_id` unique index on the table `story_session`, + /// which allows point queries on the field of the same name + /// via the [`StorySessionStorySessionIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.story_session().story_session_id().find(...)`. + pub struct StorySessionStorySessionIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> StorySessionStorySessionIdUnique<'ctx> { - /// Find the subscribed row whose `story_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 { - self.imp.find(col_val) - } -} + impl<'ctx> StorySessionTableHandle<'ctx> { + /// Get a handle on the `story_session_id` unique index on the table `story_session`. + pub fn story_session_id(&self) -> StorySessionStorySessionIdUnique<'ctx> { + StorySessionStorySessionIdUnique { + imp: self.imp.get_unique_constraint::("story_session_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> StorySessionStorySessionIdUnique<'ctx> { + /// Find the subscribed row whose `story_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("story_session"); _table.add_unique_constraint::("story_session_id", |row| &row.story_session_id); } @@ -137,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `StorySession`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait story_sessionQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `StorySession`. - fn story_session(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `StorySession`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait story_sessionQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `StorySession`. + fn story_session(&self) -> __sdk::__query_builder::Table; + } + + impl story_sessionQueryTableAccess for __sdk::QueryTableAccessor { + fn story_session(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("story_session") + } + } -impl story_sessionQueryTableAccess for __sdk::QueryTableAccessor { - fn story_session(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("story_session") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/story_session_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/story_session_type.rs index f9534179..7fd0c7e9 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/story_session_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/story_session_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::story_session_status_type::StorySessionStatus; @@ -14,19 +19,21 @@ pub struct StorySession { pub actor_user_id: String, pub world_profile_id: String, pub initial_prompt: String, - pub opening_summary: Option, + pub opening_summary: Option::, pub latest_narrative_text: String, - pub latest_choice_function_id: Option, + pub latest_choice_function_id: Option::, pub status: StorySessionStatus, pub version: u32, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for StorySession { type Module = super::RemoteModule; } + /// Column accessor struct for the table `StorySession`. /// /// Provides typed access to columns for query building. @@ -36,9 +43,9 @@ pub struct StorySessionCols { pub actor_user_id: __sdk::__query_builder::Col, pub world_profile_id: __sdk::__query_builder::Col, pub initial_prompt: __sdk::__query_builder::Col, - pub opening_summary: __sdk::__query_builder::Col>, + pub opening_summary: __sdk::__query_builder::Col>, pub latest_narrative_text: __sdk::__query_builder::Col, - pub latest_choice_function_id: __sdk::__query_builder::Col>, + pub latest_choice_function_id: __sdk::__query_builder::Col>, pub status: __sdk::__query_builder::Col, pub version: __sdk::__query_builder::Col, pub created_at: __sdk::__query_builder::Col, @@ -55,18 +62,13 @@ impl __sdk::__query_builder::HasCols for StorySession { world_profile_id: __sdk::__query_builder::Col::new(table_name, "world_profile_id"), initial_prompt: __sdk::__query_builder::Col::new(table_name, "initial_prompt"), opening_summary: __sdk::__query_builder::Col::new(table_name, "opening_summary"), - latest_narrative_text: __sdk::__query_builder::Col::new( - table_name, - "latest_narrative_text", - ), - latest_choice_function_id: __sdk::__query_builder::Col::new( - table_name, - "latest_choice_function_id", - ), + latest_narrative_text: __sdk::__query_builder::Col::new(table_name, "latest_narrative_text"), + latest_choice_function_id: __sdk::__query_builder::Col::new(table_name, "latest_choice_function_id"), status: __sdk::__query_builder::Col::new(table_name, "status"), version: __sdk::__query_builder::Col::new(table_name, "version"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -85,13 +87,12 @@ impl __sdk::__query_builder::HasIxCols for StorySession { fn ix_cols(table_name: &'static str) -> Self::IxCols { StorySessionIxCols { actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), + runtime_session_id: __sdk::__query_builder::IxCol::new(table_name, "runtime_session_id"), story_session_id: __sdk::__query_builder::IxCol::new(table_name, "story_session_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for StorySession {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_input_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_input_procedure.rs index e09583f4..b6e481b4 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_input_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_input_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::big_fish_run_input_submit_input_type::BigFishRunInputSubmitInput; use super::big_fish_run_procedure_result_type::BigFishRunProcedureResult; +use super::big_fish_run_input_submit_input_type::BigFishRunInputSubmitInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct SubmitBigFishInputArgs { + struct SubmitBigFishInputArgs { pub input: BigFishRunInputSubmitInput, } + impl __sdk::InModule for SubmitBigFishInputArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for SubmitBigFishInputArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait submit_big_fish_input { - fn submit_big_fish_input(&self, input: BigFishRunInputSubmitInput) { - self.submit_big_fish_input_then(input, |_, _| {}); + fn submit_big_fish_input(&self, input: BigFishRunInputSubmitInput, +) { + self.submit_big_fish_input_then(input, |_, _| {}); } fn submit_big_fish_input_then( &self, input: BigFishRunInputSubmitInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl submit_big_fish_input for super::RemoteProcedures { &self, input: BigFishRunInputSubmitInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( - "submit_big_fish_input", - SubmitBigFishInputArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BigFishRunProcedureResult>( + "submit_big_fish_input", + SubmitBigFishInputArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_message_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_message_procedure.rs index 307d7755..0fd8dc0d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_message_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/submit_big_fish_message_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::big_fish_message_submit_input_type::BigFishMessageSubmitInput; use super::big_fish_session_procedure_result_type::BigFishSessionProcedureResult; +use super::big_fish_message_submit_input_type::BigFishMessageSubmitInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct SubmitBigFishMessageArgs { + struct SubmitBigFishMessageArgs { pub input: BigFishMessageSubmitInput, } + impl __sdk::InModule for SubmitBigFishMessageArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for SubmitBigFishMessageArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait submit_big_fish_message { - fn submit_big_fish_message(&self, input: BigFishMessageSubmitInput) { - self.submit_big_fish_message_then(input, |_, _| {}); + fn submit_big_fish_message(&self, input: BigFishMessageSubmitInput, +) { + self.submit_big_fish_message_then(input, |_, _| {}); } fn submit_big_fish_message_then( &self, input: BigFishMessageSubmitInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl submit_big_fish_message for super::RemoteProcedures { &self, input: BigFishMessageSubmitInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( - "submit_big_fish_message", - SubmitBigFishMessageArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, BigFishSessionProcedureResult>( + "submit_big_fish_message", + SubmitBigFishMessageArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/submit_custom_world_agent_message_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/submit_custom_world_agent_message_procedure.rs index 5debac19..efb1c0b3 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/submit_custom_world_agent_message_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/submit_custom_world_agent_message_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::custom_world_agent_message_submit_input_type::CustomWorldAgentMessageSubmitInput; use super::custom_world_agent_operation_procedure_result_type::CustomWorldAgentOperationProcedureResult; +use super::custom_world_agent_message_submit_input_type::CustomWorldAgentMessageSubmitInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct SubmitCustomWorldAgentMessageArgs { + struct SubmitCustomWorldAgentMessageArgs { pub input: CustomWorldAgentMessageSubmitInput, } + impl __sdk::InModule for SubmitCustomWorldAgentMessageArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for SubmitCustomWorldAgentMessageArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait submit_custom_world_agent_message { - fn submit_custom_world_agent_message(&self, input: CustomWorldAgentMessageSubmitInput) { - self.submit_custom_world_agent_message_then(input, |_, _| {}); + fn submit_custom_world_agent_message(&self, input: CustomWorldAgentMessageSubmitInput, +) { + self.submit_custom_world_agent_message_then(input, |_, _| {}); } fn submit_custom_world_agent_message_then( &self, input: CustomWorldAgentMessageSubmitInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl submit_custom_world_agent_message for super::RemoteProcedures { &self, input: CustomWorldAgentMessageSubmitInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>( - "submit_custom_world_agent_message", - SubmitCustomWorldAgentMessageArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldAgentOperationProcedureResult>( + "submit_custom_world_agent_message", + SubmitCustomWorldAgentMessageArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/submit_puzzle_agent_message_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/submit_puzzle_agent_message_procedure.rs index 0d9e94e5..4bca696e 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/submit_puzzle_agent_message_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/submit_puzzle_agent_message_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::puzzle_agent_message_submit_input_type::PuzzleAgentMessageSubmitInput; use super::puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureResult; +use super::puzzle_agent_message_submit_input_type::PuzzleAgentMessageSubmitInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct SubmitPuzzleAgentMessageArgs { + struct SubmitPuzzleAgentMessageArgs { pub input: PuzzleAgentMessageSubmitInput, } + impl __sdk::InModule for SubmitPuzzleAgentMessageArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for SubmitPuzzleAgentMessageArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait submit_puzzle_agent_message { - fn submit_puzzle_agent_message(&self, input: PuzzleAgentMessageSubmitInput) { - self.submit_puzzle_agent_message_then(input, |_, _| {}); + fn submit_puzzle_agent_message(&self, input: PuzzleAgentMessageSubmitInput, +) { + self.submit_puzzle_agent_message_then(input, |_, _| {}); } fn submit_puzzle_agent_message_then( &self, input: PuzzleAgentMessageSubmitInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl submit_puzzle_agent_message for super::RemoteProcedures { &self, input: PuzzleAgentMessageSubmitInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( - "submit_puzzle_agent_message", - SubmitPuzzleAgentMessageArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleAgentSessionProcedureResult>( + "submit_puzzle_agent_message", + SubmitPuzzleAgentMessageArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/swap_puzzle_pieces_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/swap_puzzle_pieces_procedure.rs index f5835607..dfcb2750 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/swap_puzzle_pieces_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/swap_puzzle_pieces_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_run_procedure_result_type::PuzzleRunProcedureResult; use super::puzzle_run_swap_input_type::PuzzleRunSwapInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct SwapPuzzlePiecesArgs { + struct SwapPuzzlePiecesArgs { pub input: PuzzleRunSwapInput, } + impl __sdk::InModule for SwapPuzzlePiecesArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for SwapPuzzlePiecesArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait swap_puzzle_pieces { - fn swap_puzzle_pieces(&self, input: PuzzleRunSwapInput) { - self.swap_puzzle_pieces_then(input, |_, _| {}); + fn swap_puzzle_pieces(&self, input: PuzzleRunSwapInput, +) { + self.swap_puzzle_pieces_then(input, |_, _| {}); } fn swap_puzzle_pieces_then( &self, input: PuzzleRunSwapInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl swap_puzzle_pieces for super::RemoteProcedures { &self, input: PuzzleRunSwapInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( - "swap_puzzle_pieces", - SwapPuzzlePiecesArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleRunProcedureResult>( + "swap_puzzle_pieces", + SwapPuzzlePiecesArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_interaction_action_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_interaction_action_type.rs index a9b61b0e..77e48673 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_interaction_action_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/treasure_interaction_action_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -13,8 +18,12 @@ pub enum TreasureInteractionAction { Leave, Secure, + } + + impl __sdk::InModule for TreasureInteractionAction { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_procedure_result_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_procedure_result_type.rs index d0ac0175..212c4042 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_procedure_result_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_procedure_result_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::treasure_record_snapshot_type::TreasureRecordSnapshot; @@ -10,10 +15,12 @@ use super::treasure_record_snapshot_type::TreasureRecordSnapshot; #[sats(crate = __lib)] pub struct TreasureRecordProcedureResult { pub ok: bool, - pub record: Option, - pub error_message: Option, + pub record: Option::, + pub error_message: Option::, } + impl __sdk::InModule for TreasureRecordProcedureResult { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_snapshot_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_snapshot_type.rs index 8d69d10e..29677339 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_snapshot_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_snapshot_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; use super::treasure_interaction_action_type::TreasureInteractionAction; @@ -16,18 +21,20 @@ pub struct TreasureRecordSnapshot { pub actor_user_id: String, pub encounter_id: String, pub encounter_name: String, - pub scene_id: Option, - pub scene_name: Option, + pub scene_id: Option::, + pub scene_name: Option::, pub action: TreasureInteractionAction, - pub reward_items: Vec, + pub reward_items: Vec::, pub reward_hp: u32, pub reward_mana: u32, pub reward_currency: u32, - pub story_hint: Option, + pub story_hint: Option::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for TreasureRecordSnapshot { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_table.rs index 927e3256..c4e7b6cd 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_table.rs @@ -2,10 +2,15 @@ // 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::treasure_record_type::TreasureRecord; use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; use super::treasure_interaction_action_type::TreasureInteractionAction; -use super::treasure_record_type::TreasureRecord; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; /// Table handle for the table `treasure_record`. /// @@ -46,12 +51,8 @@ impl<'ctx> __sdk::Table for TreasureRecordTableHandle<'ctx> { type Row = TreasureRecord; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = TreasureRecordInsertCallbackId; @@ -97,40 +98,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for TreasureRecordTableHandle<'ctx> { } } -/// Access to the `treasure_record_id` unique index on the table `treasure_record`, -/// which allows point queries on the field of the same name -/// via the [`TreasureRecordTreasureRecordIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.treasure_record().treasure_record_id().find(...)`. -pub struct TreasureRecordTreasureRecordIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> TreasureRecordTableHandle<'ctx> { - /// Get a handle on the `treasure_record_id` unique index on the table `treasure_record`. - pub fn treasure_record_id(&self) -> TreasureRecordTreasureRecordIdUnique<'ctx> { - TreasureRecordTreasureRecordIdUnique { - imp: self - .imp - .get_unique_constraint::("treasure_record_id"), - phantom: std::marker::PhantomData, + /// Access to the `treasure_record_id` unique index on the table `treasure_record`, + /// which allows point queries on the field of the same name + /// via the [`TreasureRecordTreasureRecordIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.treasure_record().treasure_record_id().find(...)`. + pub struct TreasureRecordTreasureRecordIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> TreasureRecordTreasureRecordIdUnique<'ctx> { - /// Find the subscribed row whose `treasure_record_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 { - self.imp.find(col_val) - } -} + impl<'ctx> TreasureRecordTableHandle<'ctx> { + /// Get a handle on the `treasure_record_id` unique index on the table `treasure_record`. + pub fn treasure_record_id(&self) -> TreasureRecordTreasureRecordIdUnique<'ctx> { + TreasureRecordTreasureRecordIdUnique { + imp: self.imp.get_unique_constraint::("treasure_record_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> TreasureRecordTreasureRecordIdUnique<'ctx> { + /// Find the subscribed row whose `treasure_record_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("treasure_record"); _table.add_unique_constraint::("treasure_record_id", |row| &row.treasure_record_id); } @@ -140,24 +140,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `TreasureRecord`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait treasure_recordQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `TreasureRecord`. - fn treasure_record(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `TreasureRecord`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait treasure_recordQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `TreasureRecord`. + fn treasure_record(&self) -> __sdk::__query_builder::Table; + } + + impl treasure_recordQueryTableAccess for __sdk::QueryTableAccessor { + fn treasure_record(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("treasure_record") + } + } -impl treasure_recordQueryTableAccess for __sdk::QueryTableAccessor { - fn treasure_record(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("treasure_record") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_type.rs index 9bcd8f6d..e757734f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/treasure_record_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; use super::treasure_interaction_action_type::TreasureInteractionAction; @@ -16,22 +21,24 @@ pub struct TreasureRecord { pub actor_user_id: String, pub encounter_id: String, pub encounter_name: String, - pub scene_id: Option, - pub scene_name: Option, + pub scene_id: Option::, + pub scene_name: Option::, pub action: TreasureInteractionAction, - pub reward_items: Vec, + pub reward_items: Vec::, pub reward_hp: u32, pub reward_mana: u32, pub reward_currency: u32, - pub story_hint: Option, + pub story_hint: Option::, pub created_at: __sdk::Timestamp, pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for TreasureRecord { type Module = super::RemoteModule; } + /// Column accessor struct for the table `TreasureRecord`. /// /// Provides typed access to columns for query building. @@ -42,15 +49,14 @@ pub struct TreasureRecordCols { pub actor_user_id: __sdk::__query_builder::Col, pub encounter_id: __sdk::__query_builder::Col, pub encounter_name: __sdk::__query_builder::Col, - pub scene_id: __sdk::__query_builder::Col>, - pub scene_name: __sdk::__query_builder::Col>, + pub scene_id: __sdk::__query_builder::Col>, + pub scene_name: __sdk::__query_builder::Col>, pub action: __sdk::__query_builder::Col, - pub reward_items: - __sdk::__query_builder::Col>, + pub reward_items: __sdk::__query_builder::Col>, pub reward_hp: __sdk::__query_builder::Col, pub reward_mana: __sdk::__query_builder::Col, pub reward_currency: __sdk::__query_builder::Col, - pub story_hint: __sdk::__query_builder::Col>, + pub story_hint: __sdk::__query_builder::Col>, pub created_at: __sdk::__query_builder::Col, pub updated_at: __sdk::__query_builder::Col, } @@ -75,6 +81,7 @@ impl __sdk::__query_builder::HasCols for TreasureRecord { story_hint: __sdk::__query_builder::Col::new(table_name, "story_hint"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -96,17 +103,13 @@ impl __sdk::__query_builder::HasIxCols for TreasureRecord { TreasureRecordIxCols { actor_user_id: __sdk::__query_builder::IxCol::new(table_name, "actor_user_id"), encounter_id: __sdk::__query_builder::IxCol::new(table_name, "encounter_id"), - runtime_session_id: __sdk::__query_builder::IxCol::new( - table_name, - "runtime_session_id", - ), + runtime_session_id: __sdk::__query_builder::IxCol::new(table_name, "runtime_session_id"), story_session_id: __sdk::__query_builder::IxCol::new(table_name, "story_session_id"), - treasure_record_id: __sdk::__query_builder::IxCol::new( - table_name, - "treasure_record_id", - ), + treasure_record_id: __sdk::__query_builder::IxCol::new(table_name, "treasure_record_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for TreasureRecord {} + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/treasure_resolve_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/treasure_resolve_input_type.rs index ef1083df..9893c678 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/treasure_resolve_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/treasure_resolve_input_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_item_reward_item_snapshot_type::RuntimeItemRewardItemSnapshot; use super::treasure_interaction_action_type::TreasureInteractionAction; @@ -16,18 +21,20 @@ pub struct TreasureResolveInput { pub actor_user_id: String, pub encounter_id: String, pub encounter_name: String, - pub scene_id: Option, - pub scene_name: Option, + pub scene_id: Option::, + pub scene_name: Option::, pub action: TreasureInteractionAction, - pub reward_items: Vec, + pub reward_items: Vec::, pub reward_hp: u32, pub reward_mana: u32, pub reward_currency: u32, - pub story_hint: Option, + pub story_hint: Option::, pub created_at_micros: i64, pub updated_at_micros: i64, } + impl __sdk::InModule for TreasureResolveInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/turn_in_quest_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/turn_in_quest_reducer.rs index 08727f04..2e9e88fd 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/turn_in_quest_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/turn_in_quest_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::quest_turn_in_input_type::QuestTurnInInput; @@ -14,8 +19,10 @@ pub(super) struct TurnInQuestArgs { impl From for super::Reducer { fn from(args: TurnInQuestArgs) -> Self { - Self::TurnInQuest { input: args.input } - } + Self::TurnInQuest { + input: args.input, +} +} } impl __sdk::InModule for TurnInQuestArgs { @@ -33,8 +40,9 @@ pub trait turn_in_quest { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`turn_in_quest:turn_in_quest_then`] to run a callback after the reducer completes. - fn turn_in_quest(&self, input: QuestTurnInInput) -> __sdk::Result<()> { - self.turn_in_quest_then(input, |_, _| {}) + fn turn_in_quest(&self, input: QuestTurnInInput, +) -> __sdk::Result<()> { + self.turn_in_quest_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `turn_in_quest` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait turn_in_quest { &self, input: QuestTurnInInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl turn_in_quest for super::RemoteReducers { &self, input: QuestTurnInInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(TurnInQuestArgs { input }, callback) + self.imp.invoke_reducer_with_callback(TurnInQuestArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/unequip_inventory_item_input_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/unequip_inventory_item_input_type.rs index 227f40ec..20ca72d7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/unequip_inventory_item_input_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/unequip_inventory_item_input_type.rs @@ -2,7 +2,13 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; + #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] @@ -10,6 +16,8 @@ pub struct UnequipInventoryItemInput { pub slot_id: String, } + impl __sdk::InModule for UnequipInventoryItemInput { type Module = super::RemoteModule; } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_and_return_procedure.rs index 31acccce..45e7a4a1 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; use super::custom_world_profile_unpublish_input_type::CustomWorldProfileUnpublishInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct UnpublishCustomWorldProfileAndReturnArgs { + struct UnpublishCustomWorldProfileAndReturnArgs { pub input: CustomWorldProfileUnpublishInput, } + impl __sdk::InModule for UnpublishCustomWorldProfileAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for UnpublishCustomWorldProfileAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait unpublish_custom_world_profile_and_return { - fn unpublish_custom_world_profile_and_return(&self, input: CustomWorldProfileUnpublishInput) { - self.unpublish_custom_world_profile_and_return_then(input, |_, _| {}); + fn unpublish_custom_world_profile_and_return(&self, input: CustomWorldProfileUnpublishInput, +) { + self.unpublish_custom_world_profile_and_return_then(input, |_, _| {}); } fn unpublish_custom_world_profile_and_return_then( &self, input: CustomWorldProfileUnpublishInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl unpublish_custom_world_profile_and_return for super::RemoteProcedures { &self, input: CustomWorldProfileUnpublishInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( - "unpublish_custom_world_profile_and_return", - UnpublishCustomWorldProfileAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( + "unpublish_custom_world_profile_and_return", + UnpublishCustomWorldProfileAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_reducer.rs index 51af927f..adedc423 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/unpublish_custom_world_profile_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_profile_unpublish_input_type::CustomWorldProfileUnpublishInput; @@ -14,8 +19,10 @@ pub(super) struct UnpublishCustomWorldProfileArgs { impl From for super::Reducer { fn from(args: UnpublishCustomWorldProfileArgs) -> Self { - Self::UnpublishCustomWorldProfile { input: args.input } - } + Self::UnpublishCustomWorldProfile { + input: args.input, +} +} } impl __sdk::InModule for UnpublishCustomWorldProfileArgs { @@ -33,11 +40,9 @@ pub trait unpublish_custom_world_profile { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`unpublish_custom_world_profile:unpublish_custom_world_profile_then`] to run a callback after the reducer completes. - fn unpublish_custom_world_profile( - &self, - input: CustomWorldProfileUnpublishInput, - ) -> __sdk::Result<()> { - self.unpublish_custom_world_profile_then(input, |_, _| {}) + fn unpublish_custom_world_profile(&self, input: CustomWorldProfileUnpublishInput, +) -> __sdk::Result<()> { + self.unpublish_custom_world_profile_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `unpublish_custom_world_profile` to run as soon as possible, @@ -50,11 +55,9 @@ pub trait unpublish_custom_world_profile { &self, input: CustomWorldProfileUnpublishInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -63,13 +66,11 @@ impl unpublish_custom_world_profile for super::RemoteReducers { &self, input: CustomWorldProfileUnpublishInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(UnpublishCustomWorldProfileArgs { input }, callback) + self.imp.invoke_reducer_with_callback(UnpublishCustomWorldProfileArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/update_puzzle_work_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/update_puzzle_work_procedure.rs index 80571241..14a134df 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/update_puzzle_work_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/update_puzzle_work_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::puzzle_work_procedure_result_type::PuzzleWorkProcedureResult; use super::puzzle_work_upsert_input_type::PuzzleWorkUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct UpdatePuzzleWorkArgs { + struct UpdatePuzzleWorkArgs { pub input: PuzzleWorkUpsertInput, } + impl __sdk::InModule for UpdatePuzzleWorkArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for UpdatePuzzleWorkArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait update_puzzle_work { - fn update_puzzle_work(&self, input: PuzzleWorkUpsertInput) { - self.update_puzzle_work_then(input, |_, _| {}); + fn update_puzzle_work(&self, input: PuzzleWorkUpsertInput, +) { + self.update_puzzle_work_then(input, |_, _| {}); } fn update_puzzle_work_then( &self, input: PuzzleWorkUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl update_puzzle_work for super::RemoteProcedures { &self, input: PuzzleWorkUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( - "update_puzzle_work", - UpdatePuzzleWorkArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, PuzzleWorkProcedureResult>( + "update_puzzle_work", + UpdatePuzzleWorkArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_and_return_procedure.rs index be3ff473..2182ec5a 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; -use super::chapter_progression_input_type::ChapterProgressionInput; use super::chapter_progression_procedure_result_type::ChapterProgressionProcedureResult; +use super::chapter_progression_input_type::ChapterProgressionInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct UpsertChapterProgressionAndReturnArgs { + struct UpsertChapterProgressionAndReturnArgs { pub input: ChapterProgressionInput, } + impl __sdk::InModule for UpsertChapterProgressionAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for UpsertChapterProgressionAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_chapter_progression_and_return { - fn upsert_chapter_progression_and_return(&self, input: ChapterProgressionInput) { - self.upsert_chapter_progression_and_return_then(input, |_, _| {}); + fn upsert_chapter_progression_and_return(&self, input: ChapterProgressionInput, +) { + self.upsert_chapter_progression_and_return_then(input, |_, _| {}); } fn upsert_chapter_progression_and_return_then( &self, input: ChapterProgressionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl upsert_chapter_progression_and_return for super::RemoteProcedures { &self, input: ChapterProgressionInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( - "upsert_chapter_progression_and_return", - UpsertChapterProgressionAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, ChapterProgressionProcedureResult>( + "upsert_chapter_progression_and_return", + UpsertChapterProgressionAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_reducer.rs index de37e994..a01fe892 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_chapter_progression_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::chapter_progression_input_type::ChapterProgressionInput; @@ -14,8 +19,10 @@ pub(super) struct UpsertChapterProgressionArgs { impl From for super::Reducer { fn from(args: UpsertChapterProgressionArgs) -> Self { - Self::UpsertChapterProgression { input: args.input } - } + Self::UpsertChapterProgression { + input: args.input, +} +} } impl __sdk::InModule for UpsertChapterProgressionArgs { @@ -33,8 +40,9 @@ pub trait upsert_chapter_progression { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`upsert_chapter_progression:upsert_chapter_progression_then`] to run a callback after the reducer completes. - fn upsert_chapter_progression(&self, input: ChapterProgressionInput) -> __sdk::Result<()> { - self.upsert_chapter_progression_then(input, |_, _| {}) + fn upsert_chapter_progression(&self, input: ChapterProgressionInput, +) -> __sdk::Result<()> { + self.upsert_chapter_progression_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `upsert_chapter_progression` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait upsert_chapter_progression { &self, input: ChapterProgressionInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl upsert_chapter_progression for super::RemoteReducers { &self, input: ChapterProgressionInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(UpsertChapterProgressionArgs { input }, callback) + self.imp.invoke_reducer_with_callback(UpsertChapterProgressionArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_and_return_procedure.rs index a761ab95..e7720c06 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_library_mutation_result_type::CustomWorldLibraryMutationResult; use super::custom_world_profile_upsert_input_type::CustomWorldProfileUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct UpsertCustomWorldProfileAndReturnArgs { + struct UpsertCustomWorldProfileAndReturnArgs { pub input: CustomWorldProfileUpsertInput, } + impl __sdk::InModule for UpsertCustomWorldProfileAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for UpsertCustomWorldProfileAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_custom_world_profile_and_return { - fn upsert_custom_world_profile_and_return(&self, input: CustomWorldProfileUpsertInput) { - self.upsert_custom_world_profile_and_return_then(input, |_, _| {}); + fn upsert_custom_world_profile_and_return(&self, input: CustomWorldProfileUpsertInput, +) { + self.upsert_custom_world_profile_and_return_then(input, |_, _| {}); } fn upsert_custom_world_profile_and_return_then( &self, input: CustomWorldProfileUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl upsert_custom_world_profile_and_return for super::RemoteProcedures { &self, input: CustomWorldProfileUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( - "upsert_custom_world_profile_and_return", - UpsertCustomWorldProfileAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, CustomWorldLibraryMutationResult>( + "upsert_custom_world_profile_and_return", + UpsertCustomWorldProfileAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_reducer.rs index 91ca2652..353bc46f 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_custom_world_profile_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::custom_world_profile_upsert_input_type::CustomWorldProfileUpsertInput; @@ -14,8 +19,10 @@ pub(super) struct UpsertCustomWorldProfileArgs { impl From for super::Reducer { fn from(args: UpsertCustomWorldProfileArgs) -> Self { - Self::UpsertCustomWorldProfile { input: args.input } - } + Self::UpsertCustomWorldProfile { + input: args.input, +} +} } impl __sdk::InModule for UpsertCustomWorldProfileArgs { @@ -33,11 +40,9 @@ pub trait upsert_custom_world_profile { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`upsert_custom_world_profile:upsert_custom_world_profile_then`] to run a callback after the reducer completes. - fn upsert_custom_world_profile( - &self, - input: CustomWorldProfileUpsertInput, - ) -> __sdk::Result<()> { - self.upsert_custom_world_profile_then(input, |_, _| {}) + fn upsert_custom_world_profile(&self, input: CustomWorldProfileUpsertInput, +) -> __sdk::Result<()> { + self.upsert_custom_world_profile_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `upsert_custom_world_profile` to run as soon as possible, @@ -50,11 +55,9 @@ pub trait upsert_custom_world_profile { &self, input: CustomWorldProfileUpsertInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -63,13 +66,11 @@ impl upsert_custom_world_profile for super::RemoteReducers { &self, input: CustomWorldProfileUpsertInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(UpsertCustomWorldProfileArgs { input }, callback) + self.imp.invoke_reducer_with_callback(UpsertCustomWorldProfileArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_and_return_procedure.rs index 91ba0d0e..46ad5903 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::npc_state_procedure_result_type::NpcStateProcedureResult; use super::npc_state_upsert_input_type::NpcStateUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct UpsertNpcStateAndReturnArgs { + struct UpsertNpcStateAndReturnArgs { pub input: NpcStateUpsertInput, } + impl __sdk::InModule for UpsertNpcStateAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for UpsertNpcStateAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_npc_state_and_return { - fn upsert_npc_state_and_return(&self, input: NpcStateUpsertInput) { - self.upsert_npc_state_and_return_then(input, |_, _| {}); + fn upsert_npc_state_and_return(&self, input: NpcStateUpsertInput, +) { + self.upsert_npc_state_and_return_then(input, |_, _| {}); } fn upsert_npc_state_and_return_then( &self, input: NpcStateUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl upsert_npc_state_and_return for super::RemoteProcedures { &self, input: NpcStateUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, NpcStateProcedureResult>( - "upsert_npc_state_and_return", - UpsertNpcStateAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, NpcStateProcedureResult>( + "upsert_npc_state_and_return", + UpsertNpcStateAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_reducer.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_reducer.rs index afbe61f8..1a6f10c7 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_reducer.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_npc_state_reducer.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::npc_state_upsert_input_type::NpcStateUpsertInput; @@ -14,8 +19,10 @@ pub(super) struct UpsertNpcStateArgs { impl From for super::Reducer { fn from(args: UpsertNpcStateArgs) -> Self { - Self::UpsertNpcState { input: args.input } - } + Self::UpsertNpcState { + input: args.input, +} +} } impl __sdk::InModule for UpsertNpcStateArgs { @@ -33,8 +40,9 @@ pub trait upsert_npc_state { /// The reducer will run asynchronously in the future, /// and this method provides no way to listen for its completion status. /// /// Use [`upsert_npc_state:upsert_npc_state_then`] to run a callback after the reducer completes. - fn upsert_npc_state(&self, input: NpcStateUpsertInput) -> __sdk::Result<()> { - self.upsert_npc_state_then(input, |_, _| {}) + fn upsert_npc_state(&self, input: NpcStateUpsertInput, +) -> __sdk::Result<()> { + self.upsert_npc_state_then(input, |_, _| {}) } /// Request that the remote module invoke the reducer `upsert_npc_state` to run as soon as possible, @@ -47,11 +55,9 @@ pub trait upsert_npc_state { &self, input: NpcStateUpsertInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()>; } @@ -60,13 +66,11 @@ impl upsert_npc_state for super::RemoteReducers { &self, input: NpcStateUpsertInput, - callback: impl FnOnce( - &super::ReducerEventContext, - Result, __sdk::InternalError>, - ) + Send - + 'static, + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, ) -> __sdk::Result<()> { - self.imp - .invoke_reducer_with_callback(UpsertNpcStateArgs { input }, callback) + self.imp.invoke_reducer_with_callback(UpsertNpcStateArgs { input, }, callback) } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_platform_browse_history_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_platform_browse_history_and_return_procedure.rs index 36e5f464..eb863a2d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_platform_browse_history_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_platform_browse_history_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_browse_history_procedure_result_type::RuntimeBrowseHistoryProcedureResult; use super::runtime_browse_history_sync_input_type::RuntimeBrowseHistorySyncInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct UpsertPlatformBrowseHistoryAndReturnArgs { + struct UpsertPlatformBrowseHistoryAndReturnArgs { pub input: RuntimeBrowseHistorySyncInput, } + impl __sdk::InModule for UpsertPlatformBrowseHistoryAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for UpsertPlatformBrowseHistoryAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_platform_browse_history_and_return { - fn upsert_platform_browse_history_and_return(&self, input: RuntimeBrowseHistorySyncInput) { - self.upsert_platform_browse_history_and_return_then(input, |_, _| {}); + fn upsert_platform_browse_history_and_return(&self, input: RuntimeBrowseHistorySyncInput, +) { + self.upsert_platform_browse_history_and_return_then(input, |_, _| {}); } fn upsert_platform_browse_history_and_return_then( &self, input: RuntimeBrowseHistorySyncInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl upsert_platform_browse_history_and_return for super::RemoteProcedures { &self, input: RuntimeBrowseHistorySyncInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( - "upsert_platform_browse_history_and_return", - UpsertPlatformBrowseHistoryAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeBrowseHistoryProcedureResult>( + "upsert_platform_browse_history_and_return", + UpsertPlatformBrowseHistoryAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_setting_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_setting_and_return_procedure.rs index f8fa0351..f820971c 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_setting_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_setting_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_setting_procedure_result_type::RuntimeSettingProcedureResult; use super::runtime_setting_upsert_input_type::RuntimeSettingUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct UpsertRuntimeSettingAndReturnArgs { + struct UpsertRuntimeSettingAndReturnArgs { pub input: RuntimeSettingUpsertInput, } + impl __sdk::InModule for UpsertRuntimeSettingAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for UpsertRuntimeSettingAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_runtime_setting_and_return { - fn upsert_runtime_setting_and_return(&self, input: RuntimeSettingUpsertInput) { - self.upsert_runtime_setting_and_return_then(input, |_, _| {}); + fn upsert_runtime_setting_and_return(&self, input: RuntimeSettingUpsertInput, +) { + self.upsert_runtime_setting_and_return_then(input, |_, _| {}); } fn upsert_runtime_setting_and_return_then( &self, input: RuntimeSettingUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl upsert_runtime_setting_and_return for super::RemoteProcedures { &self, input: RuntimeSettingUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeSettingProcedureResult>( - "upsert_runtime_setting_and_return", - UpsertRuntimeSettingAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeSettingProcedureResult>( + "upsert_runtime_setting_and_return", + UpsertRuntimeSettingAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_snapshot_and_return_procedure.rs b/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_snapshot_and_return_procedure.rs index fe0746ba..f86a0f7d 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_snapshot_and_return_procedure.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/upsert_runtime_snapshot_and_return_procedure.rs @@ -2,17 +2,23 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_snapshot_procedure_result_type::RuntimeSnapshotProcedureResult; use super::runtime_snapshot_upsert_input_type::RuntimeSnapshotUpsertInput; #[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] #[sats(crate = __lib)] -struct UpsertRuntimeSnapshotAndReturnArgs { + struct UpsertRuntimeSnapshotAndReturnArgs { pub input: RuntimeSnapshotUpsertInput, } + impl __sdk::InModule for UpsertRuntimeSnapshotAndReturnArgs { type Module = super::RemoteModule; } @@ -22,19 +28,16 @@ impl __sdk::InModule for UpsertRuntimeSnapshotAndReturnArgs { /// /// Implemented for [`super::RemoteProcedures`]. pub trait upsert_runtime_snapshot_and_return { - fn upsert_runtime_snapshot_and_return(&self, input: RuntimeSnapshotUpsertInput) { - self.upsert_runtime_snapshot_and_return_then(input, |_, _| {}); + fn upsert_runtime_snapshot_and_return(&self, input: RuntimeSnapshotUpsertInput, +) { + self.upsert_runtime_snapshot_and_return_then(input, |_, _| {}); } fn upsert_runtime_snapshot_and_return_then( &self, input: RuntimeSnapshotUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ); } @@ -43,17 +46,13 @@ impl upsert_runtime_snapshot_and_return for super::RemoteProcedures { &self, input: RuntimeSnapshotUpsertInput, - __callback: impl FnOnce( - &super::ProcedureEventContext, - Result, - ) + Send - + 'static, + __callback: impl FnOnce(&super::ProcedureEventContext, Result) + Send + 'static, ) { - self.imp - .invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( - "upsert_runtime_snapshot_and_return", - UpsertRuntimeSnapshotAndReturnArgs { input }, - __callback, - ); + self.imp.invoke_procedure_with_callback::<_, RuntimeSnapshotProcedureResult>( + "upsert_runtime_snapshot_and_return", + UpsertRuntimeSnapshotAndReturnArgs { input, }, + __callback, + ); } } + diff --git a/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_table.rs b/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_table.rs index 2341921d..933556ca 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_table.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_table.rs @@ -2,9 +2,14 @@ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. #![allow(unused, clippy::all)] -use super::runtime_browse_history_theme_mode_type::RuntimeBrowseHistoryThemeMode; +use spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::user_browse_history_type::UserBrowseHistory; -use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; +use super::runtime_browse_history_theme_mode_type::RuntimeBrowseHistoryThemeMode; /// Table handle for the table `user_browse_history`. /// @@ -32,9 +37,7 @@ pub trait UserBrowseHistoryTableAccess { impl UserBrowseHistoryTableAccess for super::RemoteTables { fn user_browse_history(&self) -> UserBrowseHistoryTableHandle<'_> { UserBrowseHistoryTableHandle { - imp: self - .imp - .get_table::("user_browse_history"), + imp: self.imp.get_table::("user_browse_history"), ctx: std::marker::PhantomData, } } @@ -47,12 +50,8 @@ impl<'ctx> __sdk::Table for UserBrowseHistoryTableHandle<'ctx> { type Row = UserBrowseHistory; type EventContext = super::EventContext; - fn count(&self) -> u64 { - self.imp.count() - } - fn iter(&self) -> impl Iterator + '_ { - self.imp.iter() - } + fn count(&self) -> u64 { self.imp.count() } + fn iter(&self) -> impl Iterator + '_ { self.imp.iter() } type InsertCallbackId = UserBrowseHistoryInsertCallbackId; @@ -98,40 +97,39 @@ impl<'ctx> __sdk::TableWithPrimaryKey for UserBrowseHistoryTableHandle<'ctx> { } } -/// Access to the `browse_history_id` unique index on the table `user_browse_history`, -/// which allows point queries on the field of the same name -/// via the [`UserBrowseHistoryBrowseHistoryIdUnique::find`] method. -/// -/// Users are encouraged not to explicitly reference this type, -/// but to directly chain method calls, -/// like `ctx.db.user_browse_history().browse_history_id().find(...)`. -pub struct UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { - imp: __sdk::UniqueConstraintHandle, - phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, -} - -impl<'ctx> UserBrowseHistoryTableHandle<'ctx> { - /// Get a handle on the `browse_history_id` unique index on the table `user_browse_history`. - pub fn browse_history_id(&self) -> UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { - UserBrowseHistoryBrowseHistoryIdUnique { - imp: self - .imp - .get_unique_constraint::("browse_history_id"), - phantom: std::marker::PhantomData, + /// Access to the `browse_history_id` unique index on the table `user_browse_history`, + /// which allows point queries on the field of the same name + /// via the [`UserBrowseHistoryBrowseHistoryIdUnique::find`] method. + /// + /// Users are encouraged not to explicitly reference this type, + /// but to directly chain method calls, + /// like `ctx.db.user_browse_history().browse_history_id().find(...)`. + pub struct UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, } - } -} -impl<'ctx> UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { - /// Find the subscribed row whose `browse_history_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 { - self.imp.find(col_val) - } -} + impl<'ctx> UserBrowseHistoryTableHandle<'ctx> { + /// Get a handle on the `browse_history_id` unique index on the table `user_browse_history`. + pub fn browse_history_id(&self) -> UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { + UserBrowseHistoryBrowseHistoryIdUnique { + imp: self.imp.get_unique_constraint::("browse_history_id"), + phantom: std::marker::PhantomData, + } + } + } + impl<'ctx> UserBrowseHistoryBrowseHistoryIdUnique<'ctx> { + /// Find the subscribed row whose `browse_history_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 { + self.imp.find(col_val) + } + } + #[doc(hidden)] pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache.get_or_make_table::("user_browse_history"); _table.add_unique_constraint::("browse_history_id", |row| &row.browse_history_id); } @@ -141,24 +139,26 @@ pub(super) fn parse_table_update( raw_updates: __ws::v2::TableUpdate, ) -> __sdk::Result<__sdk::TableUpdate> { __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { - __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") - .with_cause(e) - .into() + __sdk::InternalError::failed_parse( + "TableUpdate", + "TableUpdate", + ).with_cause(e).into() }) } -#[allow(non_camel_case_types)] -/// Extension trait for query builder access to the table `UserBrowseHistory`. -/// -/// Implemented for [`__sdk::QueryTableAccessor`]. -pub trait user_browse_historyQueryTableAccess { - #[allow(non_snake_case)] - /// Get a query builder for the table `UserBrowseHistory`. - fn user_browse_history(&self) -> __sdk::__query_builder::Table; -} + #[allow(non_camel_case_types)] + /// Extension trait for query builder access to the table `UserBrowseHistory`. + /// + /// Implemented for [`__sdk::QueryTableAccessor`]. + pub trait user_browse_historyQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `UserBrowseHistory`. + fn user_browse_history(&self) -> __sdk::__query_builder::Table; + } + + impl user_browse_historyQueryTableAccess for __sdk::QueryTableAccessor { + fn user_browse_history(&self) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("user_browse_history") + } + } -impl user_browse_historyQueryTableAccess for __sdk::QueryTableAccessor { - fn user_browse_history(&self) -> __sdk::__query_builder::Table { - __sdk::__query_builder::Table::new("user_browse_history") - } -} diff --git a/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_type.rs b/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_type.rs index 3a6cf1ae..85e114be 100644 --- a/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_type.rs +++ b/server-rs/crates/spacetime-client/src/module_bindings/user_browse_history_type.rs @@ -2,7 +2,12 @@ // 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 spacetimedb_sdk::__codegen::{ + self as __sdk, + __lib, + __sats, + __ws, +}; use super::runtime_browse_history_theme_mode_type::RuntimeBrowseHistoryThemeMode; @@ -16,7 +21,7 @@ pub struct UserBrowseHistory { pub world_name: String, pub subtitle: String, pub summary_text: String, - pub cover_image_src: Option, + pub cover_image_src: Option::, pub theme_mode: RuntimeBrowseHistoryThemeMode, pub author_display_name: String, pub visited_at: __sdk::Timestamp, @@ -24,10 +29,12 @@ pub struct UserBrowseHistory { pub updated_at: __sdk::Timestamp, } + impl __sdk::InModule for UserBrowseHistory { type Module = super::RemoteModule; } + /// Column accessor struct for the table `UserBrowseHistory`. /// /// Provides typed access to columns for query building. @@ -39,7 +46,7 @@ pub struct UserBrowseHistoryCols { pub world_name: __sdk::__query_builder::Col, pub subtitle: __sdk::__query_builder::Col, pub summary_text: __sdk::__query_builder::Col, - pub cover_image_src: __sdk::__query_builder::Col>, + pub cover_image_src: __sdk::__query_builder::Col>, pub theme_mode: __sdk::__query_builder::Col, pub author_display_name: __sdk::__query_builder::Col, pub visited_at: __sdk::__query_builder::Col, @@ -60,13 +67,11 @@ impl __sdk::__query_builder::HasCols for UserBrowseHistory { summary_text: __sdk::__query_builder::Col::new(table_name, "summary_text"), cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"), theme_mode: __sdk::__query_builder::Col::new(table_name, "theme_mode"), - author_display_name: __sdk::__query_builder::Col::new( - table_name, - "author_display_name", - ), + author_display_name: __sdk::__query_builder::Col::new(table_name, "author_display_name"), visited_at: __sdk::__query_builder::Col::new(table_name, "visited_at"), created_at: __sdk::__query_builder::Col::new(table_name, "created_at"), updated_at: __sdk::__query_builder::Col::new(table_name, "updated_at"), + } } } @@ -85,8 +90,10 @@ impl __sdk::__query_builder::HasIxCols for UserBrowseHistory { UserBrowseHistoryIxCols { browse_history_id: __sdk::__query_builder::IxCol::new(table_name, "browse_history_id"), user_id: __sdk::__query_builder::IxCol::new(table_name, "user_id"), + } } } impl __sdk::__query_builder::CanBeLookupTable for UserBrowseHistory {} + diff --git a/server-rs/crates/spacetime-module/src/lib.rs b/server-rs/crates/spacetime-module/src/lib.rs index d0574408..8e5e7ad6 100644 --- a/server-rs/crates/spacetime-module/src/lib.rs +++ b/server-rs/crates/spacetime-module/src/lib.rs @@ -41,6 +41,7 @@ use module_combat::{ use module_custom_world::{ CustomWorldAgentActionExecuteInput, CustomWorldAgentActionExecuteResult, CustomWorldAgentCardDetailGetInput, CustomWorldAgentMessageSnapshot, + CustomWorldAgentMessageFinalizeInput, CustomWorldAgentMessageSubmitInput, CustomWorldAgentOperationGetInput, CustomWorldAgentOperationProcedureResult, CustomWorldAgentOperationSnapshot, CustomWorldAgentSessionCreateInput, CustomWorldAgentSessionGetInput, @@ -61,7 +62,9 @@ use module_custom_world::{ build_custom_world_published_profile_compile_snapshot, validate_custom_world_agent_action_execute_input, validate_custom_world_agent_card_detail_get_input, + validate_custom_world_agent_message_finalize_input, validate_custom_world_agent_message_submit_input, + validate_custom_world_agent_operation_fields, validate_custom_world_agent_operation_get_input, validate_custom_world_agent_session_create_input, validate_custom_world_agent_session_get_input, validate_custom_world_gallery_detail_input, @@ -878,6 +881,7 @@ pub struct CustomWorldAgentMessage { created_at: Timestamp, } +#[derive(Clone)] #[spacetimedb::table( accessor = custom_world_agent_operation, index(accessor = by_custom_world_agent_operation_session_id, btree(columns = [session_id])) @@ -1809,6 +1813,25 @@ pub fn submit_custom_world_agent_message( } } +#[spacetimedb::procedure] +pub fn finalize_custom_world_agent_message_turn( + ctx: &mut ProcedureContext, + input: CustomWorldAgentMessageFinalizeInput, +) -> CustomWorldAgentOperationProcedureResult { + match ctx.try_with_tx(|tx| finalize_custom_world_agent_message_turn_tx(tx, input.clone())) { + Ok(operation) => CustomWorldAgentOperationProcedureResult { + ok: true, + operation: Some(operation), + error_message: None, + }, + Err(message) => CustomWorldAgentOperationProcedureResult { + ok: false, + operation: None, + error_message: Some(message), + }, + } +} + #[spacetimedb::procedure] pub fn get_custom_world_agent_operation( ctx: &mut ProcedureContext, @@ -2514,16 +2537,6 @@ fn submit_custom_world_agent_message_tx( let submitted_at = Timestamp::from_micros_since_unix_epoch(input.submitted_at_micros); let user_message_text = input.user_message_text.trim().to_string(); - let assistant_message_id = format!("assistant-{}", input.operation_id); - if ctx - .db - .custom_world_agent_message() - .message_id() - .find(&assistant_message_id) - .is_some() - { - return Err("custom_world_agent_message.assistant_message_id 已存在".to_string()); - } ctx.db .custom_world_agent_message() @@ -2537,96 +2550,21 @@ fn submit_custom_world_agent_message_tx( created_at: submitted_at, }); - let user_message_count = ctx - .db - .custom_world_agent_message() - .iter() - .filter(|row| { - row.session_id == input.session_id && matches!(row.role, RpgAgentMessageRole::User) - }) - .count() as u32; - let next_turn = session.current_turn.saturating_add(1); - let (next_stage, next_progress_percent, next_readiness_json, next_pending_clarifications_json) = - if user_message_count >= 2 { - ( - RpgAgentStage::FoundationReview, - 100, - r#"{"isReady":true,"completedKeys":["seed_input"],"missingKeys":[]}"#.to_string(), - "[]".to_string(), - ) - } else { - ( - RpgAgentStage::Clarifying, - session.progress_percent.max(20), - session.creator_intent_readiness_json.clone(), - format!( - r#"[{{"id":"clarify-{next_turn}","label":"补充核心设定","question":"请继续补充这个世界的玩家身份、主题氛围或核心冲突。","targetKey":"core_conflict","priority":1}}]"# - ), - ) - }; - let assistant_reply = "已记录这条设定。我会先把它当作新的世界线索收进当前草稿,你可以继续补充玩家身份、主题氛围、核心冲突、关键关系或标志性元素。".to_string(); - ctx.db .custom_world_agent_operation() .insert(CustomWorldAgentOperation { operation_id: input.operation_id.clone(), session_id: input.session_id.clone(), operation_type: RpgAgentOperationType::ProcessMessage, - status: RpgAgentOperationStatus::Completed, - phase_label: "消息已处理".to_string(), - phase_detail: if next_stage == RpgAgentStage::FoundationReview { - "当前上下文已达到最小 foundation_review 门槛。".to_string() - } else { - "当前上下文已记录,继续收集世界关键锚点。".to_string() - }, - progress: 100, + status: RpgAgentOperationStatus::Running, + phase_label: "消息处理中".to_string(), + phase_detail: "已记录用户消息,等待大模型生成本轮回复。".to_string(), + progress: 10, error_message: None, created_at: submitted_at, updated_at: submitted_at, }); - ctx.db - .custom_world_agent_message() - .insert(CustomWorldAgentMessage { - message_id: assistant_message_id, - session_id: input.session_id.clone(), - role: RpgAgentMessageRole::Assistant, - kind: RpgAgentMessageKind::Chat, - text: assistant_reply.clone(), - related_operation_id: Some(input.operation_id.clone()), - created_at: submitted_at, - }); - - ctx.db - .custom_world_agent_session() - .session_id() - .update(CustomWorldAgentSession { - session_id: session.session_id.clone(), - owner_user_id: session.owner_user_id.clone(), - seed_text: session.seed_text.clone(), - current_turn: next_turn, - progress_percent: next_progress_percent, - stage: next_stage, - focus_card_id: session.focus_card_id.clone(), - anchor_content_json: session.anchor_content_json.clone(), - creator_intent_json: session.creator_intent_json.clone(), - creator_intent_readiness_json: next_readiness_json, - anchor_pack_json: session.anchor_pack_json.clone(), - lock_state_json: session.lock_state_json.clone(), - draft_profile_json: session.draft_profile_json.clone(), - last_assistant_reply: Some(assistant_reply), - publish_gate_json: session.publish_gate_json.clone(), - result_preview_json: session.result_preview_json.clone(), - pending_clarifications_json: next_pending_clarifications_json, - quality_findings_json: session.quality_findings_json.clone(), - suggested_actions_json: session.suggested_actions_json.clone(), - recommended_replies_json: session.recommended_replies_json.clone(), - asset_coverage_json: session.asset_coverage_json.clone(), - checkpoints_json: session.checkpoints_json.clone(), - created_at: session.created_at, - updated_at: submitted_at, - }); - get_custom_world_agent_operation_tx( ctx, CustomWorldAgentOperationGetInput { @@ -2661,6 +2599,93 @@ fn get_custom_world_agent_operation_tx( Ok(build_custom_world_agent_operation_snapshot(&operation)) } +fn finalize_custom_world_agent_message_turn_tx( + ctx: &ReducerContext, + input: CustomWorldAgentMessageFinalizeInput, +) -> Result { + validate_custom_world_agent_message_finalize_input(&input) + .map_err(|error| error.to_string())?; + + let session = ctx + .db + .custom_world_agent_session() + .session_id() + .find(&input.session_id) + .filter(|row| row.owner_user_id == input.owner_user_id) + .ok_or_else(|| "custom_world_agent_session 不存在".to_string())?; + + let operation = ctx + .db + .custom_world_agent_operation() + .operation_id() + .find(&input.operation_id) + .filter(|row| row.session_id == input.session_id) + .ok_or_else(|| "custom_world_agent_operation 不存在".to_string())?; + + if ctx + .db + .custom_world_agent_message() + .message_id() + .find(&input.assistant_message_id) + .is_some() + { + return Err("custom_world_agent_message.assistant_message_id 已存在".to_string()); + } + + let updated_at = Timestamp::from_micros_since_unix_epoch(input.updated_at_micros); + + ctx.db + .custom_world_agent_message() + .insert(CustomWorldAgentMessage { + message_id: input.assistant_message_id.clone(), + session_id: input.session_id.clone(), + role: RpgAgentMessageRole::Assistant, + kind: RpgAgentMessageKind::Chat, + text: input.assistant_reply_text.clone(), + related_operation_id: Some(input.operation_id.clone()), + created_at: updated_at, + }); + + let next_session = rebuild_custom_world_agent_session_row( + &session, + CustomWorldAgentSessionPatch { + current_turn: Some(session.current_turn.saturating_add(1)), + progress_percent: Some(input.progress_percent), + stage: Some(input.stage), + focus_card_id: Some(input.focus_card_id.clone()), + anchor_content_json: Some(input.anchor_content_json.clone()), + creator_intent_json: Some(input.creator_intent_json.clone()), + creator_intent_readiness_json: Some(input.creator_intent_readiness_json.clone()), + anchor_pack_json: Some(input.anchor_pack_json.clone()), + draft_profile_json: Some(input.draft_profile_json.clone()), + last_assistant_reply: Some(Some(input.assistant_reply_text.clone())), + pending_clarifications_json: Some(input.pending_clarifications_json.clone()), + quality_findings_json: Some(input.quality_findings_json.clone()), + suggested_actions_json: Some(input.suggested_actions_json.clone()), + recommended_replies_json: Some(input.recommended_replies_json.clone()), + asset_coverage_json: Some(input.asset_coverage_json.clone()), + updated_at_micros: Some(input.updated_at_micros), + ..CustomWorldAgentSessionPatch::default() + }, + )?; + replace_custom_world_agent_session(ctx, &session, next_session); + + let next_operation = rebuild_custom_world_agent_operation_row( + &operation, + CustomWorldAgentOperationPatch { + status: Some(input.operation_status), + phase_label: Some(input.phase_label.clone()), + phase_detail: Some(input.phase_detail.clone()), + progress: Some(input.operation_progress), + error_message: Some(input.error_message.clone()), + updated_at_micros: Some(input.updated_at_micros), + }, + )?; + replace_custom_world_agent_operation(ctx, &operation, next_operation.clone()); + + Ok(build_custom_world_agent_operation_snapshot(&next_operation)) +} + // AI 任务当前先固定成 private 真相表,后续由 Axum / platform-llm 再往外包一层 HTTP 与 SSE 协议。 #[spacetimedb::reducer] pub fn create_ai_task(ctx: &ReducerContext, input: AiTaskCreateInput) -> Result<(), String> { @@ -5027,6 +5052,7 @@ fn execute_placeholder_custom_world_action( #[derive(Clone, Debug, Default)] struct CustomWorldAgentSessionPatch { + current_turn: Option, progress_percent: Option, stage: Option, focus_card_id: Option>, @@ -5048,6 +5074,16 @@ struct CustomWorldAgentSessionPatch { updated_at_micros: Option, } +#[derive(Clone, Debug, Default)] +struct CustomWorldAgentOperationPatch { + status: Option, + phase_label: Option, + phase_detail: Option, + progress: Option, + error_message: Option>, + updated_at_micros: Option, +} + fn build_custom_world_publish_gate_from_session( session: &CustomWorldAgentSession, ) -> CustomWorldPublishGateSnapshot { @@ -5467,7 +5503,7 @@ fn rebuild_custom_world_agent_session_row( session_id: current.session_id.clone(), owner_user_id: current.owner_user_id.clone(), seed_text: current.seed_text.clone(), - current_turn: current.current_turn, + current_turn: patch.current_turn.unwrap_or(current.current_turn), progress_percent: patch.progress_percent.unwrap_or(current.progress_percent), stage: patch.stage.unwrap_or(current.stage), focus_card_id: patch @@ -5527,6 +5563,44 @@ fn rebuild_custom_world_agent_session_row( }) } +fn rebuild_custom_world_agent_operation_row( + current: &CustomWorldAgentOperation, + patch: CustomWorldAgentOperationPatch, +) -> Result { + let phase_label = patch + .phase_label + .unwrap_or_else(|| current.phase_label.clone()); + let progress = patch.progress.unwrap_or(current.progress); + validate_custom_world_agent_operation_fields( + ¤t.operation_id, + ¤t.session_id, + &phase_label, + progress, + ) + .map_err(|error| error.to_string())?; + + Ok(CustomWorldAgentOperation { + operation_id: current.operation_id.clone(), + session_id: current.session_id.clone(), + operation_type: current.operation_type, + status: patch.status.unwrap_or(current.status), + phase_label, + phase_detail: patch + .phase_detail + .unwrap_or_else(|| current.phase_detail.clone()), + progress, + error_message: patch + .error_message + .unwrap_or_else(|| current.error_message.clone()), + created_at: current.created_at, + updated_at: Timestamp::from_micros_since_unix_epoch( + patch + .updated_at_micros + .unwrap_or_else(|| current.updated_at.to_micros_since_unix_epoch()), + ), + }) +} + fn replace_custom_world_agent_session( ctx: &ReducerContext, current: &CustomWorldAgentSession, @@ -5539,6 +5613,18 @@ fn replace_custom_world_agent_session( ctx.db.custom_world_agent_session().insert(next); } +fn replace_custom_world_agent_operation( + ctx: &ReducerContext, + current: &CustomWorldAgentOperation, + next: CustomWorldAgentOperation, +) { + ctx.db + .custom_world_agent_operation() + .operation_id() + .delete(¤t.operation_id); + ctx.db.custom_world_agent_operation().insert(next); +} + fn replace_custom_world_draft_card( ctx: &ReducerContext, current: &CustomWorldDraftCard, diff --git a/src/services/apiClient.test.ts b/src/services/apiClient.test.ts index 03cd1e46..a445ed65 100644 --- a/src/services/apiClient.test.ts +++ b/src/services/apiClient.test.ts @@ -142,12 +142,7 @@ describe('apiClient', () => { }), }), ); - expect(dispatchEventMock).toHaveBeenCalledTimes(1); - expect(dispatchEventMock).toHaveBeenCalledWith( - expect.objectContaining({ - type: AUTH_STATE_EVENT, - }), - ); + expect(dispatchEventMock).not.toHaveBeenCalled(); expect(getStoredAccessToken()).toBe('fresh-token'); }); @@ -277,7 +272,7 @@ describe('apiClient', () => { expect(response.status).toBe(401); expect(fetchMock).toHaveBeenCalledTimes(3); expect(getStoredAccessToken()).toBe('fresh-token'); - expect(dispatchEventMock).toHaveBeenCalledTimes(1); + expect(dispatchEventMock).not.toHaveBeenCalled(); }); it('rejects refresh responses that do not return a renewed bearer token', async () => { diff --git a/src/services/apiClient.ts b/src/services/apiClient.ts index 2c4b4641..47b4981b 100644 --- a/src/services/apiClient.ts +++ b/src/services/apiClient.ts @@ -614,9 +614,9 @@ export async function fetchWithApiAuth( try { await refreshAccessToken(); refreshAttempted = true; - if (shouldNotifyAuthStateChange) { - emitAuthStateChange(); - } + // refresh 成功只代表 access token 已补票成功, + // 不能把当前业务请求的首次 401 直接放大成全局鉴权变更, + // 否则像 Puzzle works 这类受保护列表会把单接口失败放大成整个平台重复 hydrate。 continue; } catch { if (hasAuthHeader) {