Add backend feedback submission and image preview
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-05-08 21:47:45 +08:00
parent b2ac92e0fc
commit 199b44c18c
38 changed files with 1521 additions and 140 deletions

View File

@@ -1,7 +1,7 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
// This was generated using spacetimedb cli version 2.1.0 (commit 10a4779b1338eff3708493d87496b51842a7c412).
// This was generated using spacetimedb cli version 2.2.0 (commit eb11e2f5c41dce6979715ad407996270d61329f6).
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
@@ -399,6 +399,8 @@ 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_feedback_submission_table;
pub mod profile_feedback_submission_type;
pub mod profile_invite_code_table;
pub mod profile_invite_code_type;
pub mod profile_membership_table;
@@ -567,6 +569,11 @@ pub mod runtime_platform_theme_type;
pub mod runtime_profile_dashboard_get_input_type;
pub mod runtime_profile_dashboard_procedure_result_type;
pub mod runtime_profile_dashboard_snapshot_type;
pub mod runtime_profile_feedback_evidence_snapshot_type;
pub mod runtime_profile_feedback_status_type;
pub mod runtime_profile_feedback_submission_input_type;
pub mod runtime_profile_feedback_submission_procedure_result_type;
pub mod runtime_profile_feedback_submission_snapshot_type;
pub mod runtime_profile_invite_code_admin_list_input_type;
pub mod runtime_profile_invite_code_admin_list_procedure_result_type;
pub mod runtime_profile_invite_code_admin_procedure_result_type;
@@ -643,8 +650,8 @@ 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 runtime_tracking_scope_kind_type;
pub mod runtime_tracking_event_procedure_result_type;
pub mod runtime_tracking_scope_kind_type;
pub mod save_puzzle_form_draft_procedure;
pub mod save_puzzle_generated_images_procedure;
pub mod seed_analytics_date_dimensions_reducer;
@@ -703,6 +710,7 @@ 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_match_3_d_agent_message_procedure;
pub mod submit_profile_feedback_and_return_procedure;
pub mod submit_puzzle_agent_message_procedure;
pub mod submit_puzzle_leaderboard_entry_procedure;
pub mod submit_square_hole_agent_message_procedure;
@@ -1135,6 +1143,8 @@ 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_feedback_submission_table::*;
pub use profile_feedback_submission_type::ProfileFeedbackSubmission;
pub use profile_invite_code_table::*;
pub use profile_invite_code_type::ProfileInviteCode;
pub use profile_membership_table::*;
@@ -1303,6 +1313,11 @@ pub use runtime_platform_theme_type::RuntimePlatformTheme;
pub use runtime_profile_dashboard_get_input_type::RuntimeProfileDashboardGetInput;
pub use runtime_profile_dashboard_procedure_result_type::RuntimeProfileDashboardProcedureResult;
pub use runtime_profile_dashboard_snapshot_type::RuntimeProfileDashboardSnapshot;
pub use runtime_profile_feedback_evidence_snapshot_type::RuntimeProfileFeedbackEvidenceSnapshot;
pub use runtime_profile_feedback_status_type::RuntimeProfileFeedbackStatus;
pub use runtime_profile_feedback_submission_input_type::RuntimeProfileFeedbackSubmissionInput;
pub use runtime_profile_feedback_submission_procedure_result_type::RuntimeProfileFeedbackSubmissionProcedureResult;
pub use runtime_profile_feedback_submission_snapshot_type::RuntimeProfileFeedbackSubmissionSnapshot;
pub use runtime_profile_invite_code_admin_list_input_type::RuntimeProfileInviteCodeAdminListInput;
pub use runtime_profile_invite_code_admin_list_procedure_result_type::RuntimeProfileInviteCodeAdminListProcedureResult;
pub use runtime_profile_invite_code_admin_procedure_result_type::RuntimeProfileInviteCodeAdminProcedureResult;
@@ -1379,8 +1394,8 @@ 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 runtime_tracking_scope_kind_type::RuntimeTrackingScopeKind;
pub use runtime_tracking_event_procedure_result_type::RuntimeTrackingEventProcedureResult;
pub use runtime_tracking_scope_kind_type::RuntimeTrackingScopeKind;
pub use save_puzzle_form_draft_procedure::save_puzzle_form_draft;
pub use save_puzzle_generated_images_procedure::save_puzzle_generated_images;
pub use seed_analytics_date_dimensions_reducer::seed_analytics_date_dimensions;
@@ -1439,6 +1454,7 @@ 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_match_3_d_agent_message_procedure::submit_match_3_d_agent_message;
pub use submit_profile_feedback_and_return_procedure::submit_profile_feedback_and_return;
pub use submit_puzzle_agent_message_procedure::submit_puzzle_agent_message;
pub use submit_puzzle_leaderboard_entry_procedure::submit_puzzle_leaderboard_entry;
pub use submit_square_hole_agent_message_procedure::submit_square_hole_agent_message;
@@ -1785,6 +1801,7 @@ pub struct DbUpdate {
npc_state: __sdk::TableUpdate<NpcState>,
player_progression: __sdk::TableUpdate<PlayerProgression>,
profile_dashboard_state: __sdk::TableUpdate<ProfileDashboardState>,
profile_feedback_submission: __sdk::TableUpdate<ProfileFeedbackSubmission>,
profile_invite_code: __sdk::TableUpdate<ProfileInviteCode>,
profile_membership: __sdk::TableUpdate<ProfileMembership>,
profile_played_world: __sdk::TableUpdate<ProfilePlayedWorld>,
@@ -1936,6 +1953,9 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
"profile_dashboard_state" => db_update.profile_dashboard_state.append(
profile_dashboard_state_table::parse_table_update(table_update)?,
),
"profile_feedback_submission" => db_update.profile_feedback_submission.append(
profile_feedback_submission_table::parse_table_update(table_update)?,
),
"profile_invite_code" => db_update
.profile_invite_code
.append(profile_invite_code_table::parse_table_update(table_update)?),
@@ -2241,6 +2261,12 @@ impl __sdk::DbUpdate for DbUpdate {
&self.profile_dashboard_state,
)
.with_updates_by_pk(|row| &row.user_id);
diff.profile_feedback_submission = cache
.apply_diff_to_table::<ProfileFeedbackSubmission>(
"profile_feedback_submission",
&self.profile_feedback_submission,
)
.with_updates_by_pk(|row| &row.feedback_id);
diff.profile_invite_code = cache
.apply_diff_to_table::<ProfileInviteCode>(
"profile_invite_code",
@@ -2531,6 +2557,9 @@ impl __sdk::DbUpdate for DbUpdate {
"profile_dashboard_state" => db_update
.profile_dashboard_state
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"profile_feedback_submission" => db_update
.profile_feedback_submission
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
"profile_invite_code" => db_update
.profile_invite_code
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
@@ -2757,6 +2786,9 @@ impl __sdk::DbUpdate for DbUpdate {
"profile_dashboard_state" => db_update
.profile_dashboard_state
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"profile_feedback_submission" => db_update
.profile_feedback_submission
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
"profile_invite_code" => db_update
.profile_invite_code
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
@@ -2915,6 +2947,7 @@ pub struct AppliedDiff<'r> {
npc_state: __sdk::TableAppliedDiff<'r, NpcState>,
player_progression: __sdk::TableAppliedDiff<'r, PlayerProgression>,
profile_dashboard_state: __sdk::TableAppliedDiff<'r, ProfileDashboardState>,
profile_feedback_submission: __sdk::TableAppliedDiff<'r, ProfileFeedbackSubmission>,
profile_invite_code: __sdk::TableAppliedDiff<'r, ProfileInviteCode>,
profile_membership: __sdk::TableAppliedDiff<'r, ProfileMembership>,
profile_played_world: __sdk::TableAppliedDiff<'r, ProfilePlayedWorld>,
@@ -3127,6 +3160,11 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
&self.profile_dashboard_state,
event,
);
callbacks.invoke_table_row_callbacks::<ProfileFeedbackSubmission>(
"profile_feedback_submission",
&self.profile_feedback_submission,
event,
);
callbacks.invoke_table_row_callbacks::<ProfileInviteCode>(
"profile_invite_code",
&self.profile_invite_code,
@@ -3994,6 +4032,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
npc_state_table::register_table(client_cache);
player_progression_table::register_table(client_cache);
profile_dashboard_state_table::register_table(client_cache);
profile_feedback_submission_table::register_table(client_cache);
profile_invite_code_table::register_table(client_cache);
profile_membership_table::register_table(client_cache);
profile_played_world_table::register_table(client_cache);
@@ -4067,6 +4106,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
"npc_state",
"player_progression",
"profile_dashboard_state",
"profile_feedback_submission",
"profile_invite_code",
"profile_membership",
"profile_played_world",