feat: add analytics metric granularity query
Some checks failed
CI / verify (push) Has been cancelled
Some checks failed
CI / verify (push) Has been cancelled
This commit is contained in:
@@ -116,6 +116,24 @@ pub fn build_runtime_profile_task_center_get_input(
|
||||
Ok(RuntimeProfileTaskCenterGetInput { user_id })
|
||||
}
|
||||
|
||||
pub fn build_analytics_metric_query_input(
|
||||
event_key: String,
|
||||
scope_kind: RuntimeTrackingScopeKind,
|
||||
scope_id: String,
|
||||
granularity: AnalyticsGranularity,
|
||||
) -> Result<AnalyticsMetricQueryInput, RuntimeProfileFieldError> {
|
||||
let event_key = normalize_required_string(event_key)
|
||||
.ok_or(RuntimeProfileFieldError::MissingTaskEventKey)?;
|
||||
let scope_id = normalize_required_string(scope_id)
|
||||
.ok_or(RuntimeProfileFieldError::MissingTrackingScopeId)?;
|
||||
Ok(AnalyticsMetricQueryInput {
|
||||
event_key,
|
||||
scope_kind,
|
||||
scope_id,
|
||||
granularity,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn build_runtime_profile_task_claim_input(
|
||||
user_id: String,
|
||||
task_id: String,
|
||||
|
||||
Reference in New Issue
Block a user