fix: compile daily login tracking procedure
This commit is contained in:
@@ -155,11 +155,10 @@ use module_runtime::{
|
|||||||
RuntimeProfileTaskStatus as DomainRuntimeProfileTaskStatus,
|
RuntimeProfileTaskStatus as DomainRuntimeProfileTaskStatus,
|
||||||
RuntimeProfileWalletLedgerEntryRecord, RuntimeReferralInviteCenterRecord,
|
RuntimeProfileWalletLedgerEntryRecord, RuntimeReferralInviteCenterRecord,
|
||||||
RuntimeReferralRedeemRecord, RuntimeSettingsRecord, RuntimeSnapshotRecord,
|
RuntimeReferralRedeemRecord, RuntimeSettingsRecord, RuntimeSnapshotRecord,
|
||||||
RuntimeTrackingEventProcedureResult, RuntimeTrackingScopeKind as DomainRuntimeTrackingScopeKind,
|
RuntimeTrackingScopeKind as DomainRuntimeTrackingScopeKind, build_analytics_metric_query_input,
|
||||||
build_analytics_metric_query_input, build_runtime_browse_history_clear_input,
|
build_runtime_browse_history_clear_input, build_runtime_browse_history_list_input,
|
||||||
build_runtime_browse_history_list_input, build_runtime_browse_history_record,
|
build_runtime_browse_history_record, build_runtime_browse_history_sync_input,
|
||||||
build_runtime_browse_history_sync_input, build_runtime_profile_dashboard_get_input,
|
build_runtime_profile_dashboard_get_input, build_runtime_profile_dashboard_record,
|
||||||
build_runtime_profile_dashboard_record,
|
|
||||||
build_runtime_profile_invite_code_admin_list_input,
|
build_runtime_profile_invite_code_admin_list_input,
|
||||||
build_runtime_profile_invite_code_admin_upsert_input, build_runtime_profile_invite_code_record,
|
build_runtime_profile_invite_code_admin_upsert_input, build_runtime_profile_invite_code_record,
|
||||||
build_runtime_profile_play_stats_get_input, build_runtime_profile_play_stats_record,
|
build_runtime_profile_play_stats_get_input, build_runtime_profile_play_stats_record,
|
||||||
|
|||||||
@@ -514,6 +514,7 @@ pub mod record_big_fish_like_procedure;
|
|||||||
pub mod record_big_fish_play_procedure;
|
pub mod record_big_fish_play_procedure;
|
||||||
pub mod record_custom_world_profile_like_procedure;
|
pub mod record_custom_world_profile_like_procedure;
|
||||||
pub mod record_custom_world_profile_play_procedure;
|
pub mod record_custom_world_profile_play_procedure;
|
||||||
|
pub mod record_daily_login_tracking_event_and_return_procedure;
|
||||||
pub mod record_puzzle_work_like_procedure;
|
pub mod record_puzzle_work_like_procedure;
|
||||||
pub mod redeem_profile_referral_invite_code_procedure;
|
pub mod redeem_profile_referral_invite_code_procedure;
|
||||||
pub mod redeem_profile_reward_code_procedure;
|
pub mod redeem_profile_reward_code_procedure;
|
||||||
@@ -643,6 +644,7 @@ pub mod runtime_snapshot_table;
|
|||||||
pub mod runtime_snapshot_type;
|
pub mod runtime_snapshot_type;
|
||||||
pub mod runtime_snapshot_upsert_input_type;
|
pub mod runtime_snapshot_upsert_input_type;
|
||||||
pub mod runtime_tracking_scope_kind_type;
|
pub mod runtime_tracking_scope_kind_type;
|
||||||
|
pub mod runtime_tracking_event_procedure_result_type;
|
||||||
pub mod save_puzzle_form_draft_procedure;
|
pub mod save_puzzle_form_draft_procedure;
|
||||||
pub mod save_puzzle_generated_images_procedure;
|
pub mod save_puzzle_generated_images_procedure;
|
||||||
pub mod seed_analytics_date_dimensions_reducer;
|
pub mod seed_analytics_date_dimensions_reducer;
|
||||||
@@ -1248,6 +1250,7 @@ pub use record_big_fish_like_procedure::record_big_fish_like;
|
|||||||
pub use record_big_fish_play_procedure::record_big_fish_play;
|
pub use record_big_fish_play_procedure::record_big_fish_play;
|
||||||
pub use record_custom_world_profile_like_procedure::record_custom_world_profile_like;
|
pub use record_custom_world_profile_like_procedure::record_custom_world_profile_like;
|
||||||
pub use record_custom_world_profile_play_procedure::record_custom_world_profile_play;
|
pub use record_custom_world_profile_play_procedure::record_custom_world_profile_play;
|
||||||
|
pub use record_daily_login_tracking_event_and_return_procedure::record_daily_login_tracking_event_and_return;
|
||||||
pub use record_puzzle_work_like_procedure::record_puzzle_work_like;
|
pub use record_puzzle_work_like_procedure::record_puzzle_work_like;
|
||||||
pub use redeem_profile_referral_invite_code_procedure::redeem_profile_referral_invite_code;
|
pub use redeem_profile_referral_invite_code_procedure::redeem_profile_referral_invite_code;
|
||||||
pub use redeem_profile_reward_code_procedure::redeem_profile_reward_code;
|
pub use redeem_profile_reward_code_procedure::redeem_profile_reward_code;
|
||||||
@@ -1377,6 +1380,7 @@ pub use runtime_snapshot_table::*;
|
|||||||
pub use runtime_snapshot_type::RuntimeSnapshot;
|
pub use runtime_snapshot_type::RuntimeSnapshot;
|
||||||
pub use runtime_snapshot_upsert_input_type::RuntimeSnapshotUpsertInput;
|
pub use runtime_snapshot_upsert_input_type::RuntimeSnapshotUpsertInput;
|
||||||
pub use runtime_tracking_scope_kind_type::RuntimeTrackingScopeKind;
|
pub use runtime_tracking_scope_kind_type::RuntimeTrackingScopeKind;
|
||||||
|
pub use runtime_tracking_event_procedure_result_type::RuntimeTrackingEventProcedureResult;
|
||||||
pub use save_puzzle_form_draft_procedure::save_puzzle_form_draft;
|
pub use save_puzzle_form_draft_procedure::save_puzzle_form_draft;
|
||||||
pub use save_puzzle_generated_images_procedure::save_puzzle_generated_images;
|
pub use save_puzzle_generated_images_procedure::save_puzzle_generated_images;
|
||||||
pub use seed_analytics_date_dimensions_reducer::seed_analytics_date_dimensions;
|
pub use seed_analytics_date_dimensions_reducer::seed_analytics_date_dimensions;
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
// 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::runtime_profile_task_center_get_input_type::RuntimeProfileTaskCenterGetInput;
|
||||||
|
use super::runtime_tracking_event_procedure_result_type::RuntimeTrackingEventProcedureResult;
|
||||||
|
|
||||||
|
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||||
|
#[sats(crate = __lib)]
|
||||||
|
struct RecordDailyLoginTrackingEventAndReturnArgs {
|
||||||
|
pub input: RuntimeProfileTaskCenterGetInput,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl __sdk::InModule for RecordDailyLoginTrackingEventAndReturnArgs {
|
||||||
|
type Module = super::RemoteModule;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
/// Extension trait for access to the procedure `record_daily_login_tracking_event_and_return`.
|
||||||
|
///
|
||||||
|
/// Implemented for [`super::RemoteProcedures`].
|
||||||
|
pub trait record_daily_login_tracking_event_and_return {
|
||||||
|
fn record_daily_login_tracking_event_and_return(
|
||||||
|
&self,
|
||||||
|
input: RuntimeProfileTaskCenterGetInput,
|
||||||
|
) {
|
||||||
|
self.record_daily_login_tracking_event_and_return_then(input, |_, _| {});
|
||||||
|
}
|
||||||
|
|
||||||
|
fn record_daily_login_tracking_event_and_return_then(
|
||||||
|
&self,
|
||||||
|
input: RuntimeProfileTaskCenterGetInput,
|
||||||
|
|
||||||
|
__callback: impl FnOnce(
|
||||||
|
&super::ProcedureEventContext,
|
||||||
|
Result<RuntimeTrackingEventProcedureResult, __sdk::InternalError>,
|
||||||
|
) + Send
|
||||||
|
+ 'static,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
impl record_daily_login_tracking_event_and_return for super::RemoteProcedures {
|
||||||
|
fn record_daily_login_tracking_event_and_return_then(
|
||||||
|
&self,
|
||||||
|
input: RuntimeProfileTaskCenterGetInput,
|
||||||
|
|
||||||
|
__callback: impl FnOnce(
|
||||||
|
&super::ProcedureEventContext,
|
||||||
|
Result<RuntimeTrackingEventProcedureResult, __sdk::InternalError>,
|
||||||
|
) + Send
|
||||||
|
+ 'static,
|
||||||
|
) {
|
||||||
|
self.imp
|
||||||
|
.invoke_procedure_with_callback::<_, RuntimeTrackingEventProcedureResult>(
|
||||||
|
"record_daily_login_tracking_event_and_return",
|
||||||
|
RecordDailyLoginTrackingEventAndReturnArgs { input },
|
||||||
|
__callback,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||||
|
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||||
|
|
||||||
|
#![allow(unused, clippy::all)]
|
||||||
|
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||||
|
|
||||||
|
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||||
|
#[sats(crate = __lib)]
|
||||||
|
pub struct RuntimeTrackingEventProcedureResult {
|
||||||
|
pub ok: bool,
|
||||||
|
pub error_message: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl __sdk::InModule for RuntimeTrackingEventProcedureResult {
|
||||||
|
type Module = super::RemoteModule;
|
||||||
|
}
|
||||||
@@ -498,7 +498,7 @@ pub fn record_daily_login_tracking_event_and_return(
|
|||||||
input: RuntimeProfileTaskCenterGetInput,
|
input: RuntimeProfileTaskCenterGetInput,
|
||||||
) -> RuntimeTrackingEventProcedureResult {
|
) -> RuntimeTrackingEventProcedureResult {
|
||||||
match ctx.try_with_tx(|tx| {
|
match ctx.try_with_tx(|tx| {
|
||||||
let validated_input = build_runtime_profile_task_center_get_input(input.user_id)
|
let validated_input = build_runtime_profile_task_center_get_input(input.user_id.clone())
|
||||||
.map_err(|error| error.to_string())?;
|
.map_err(|error| error.to_string())?;
|
||||||
ensure_default_profile_task_config(tx);
|
ensure_default_profile_task_config(tx);
|
||||||
record_daily_login_tracking_event(tx, &validated_input.user_id)
|
record_daily_login_tracking_event(tx, &validated_input.user_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user