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:
@@ -189,6 +189,7 @@ export type RedeemProfileRewardCodeResponse = {
|
||||
|
||||
export type ProfileTaskCycle = 'daily';
|
||||
export type TrackingScopeKind = 'site' | 'work' | 'module' | 'user';
|
||||
export type AnalyticsGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
||||
export type ProfileTaskStatus =
|
||||
| 'incomplete'
|
||||
| 'claimable'
|
||||
@@ -247,6 +248,24 @@ export type ProfileTaskConfigAdminListResponse = {
|
||||
entries: ProfileTaskConfigAdminResponse[];
|
||||
};
|
||||
|
||||
export type AnalyticsMetricQueryRequest = {
|
||||
eventKey: string;
|
||||
scopeKind: TrackingScopeKind;
|
||||
scopeId: string;
|
||||
granularity: AnalyticsGranularity;
|
||||
};
|
||||
|
||||
export type AnalyticsBucketMetric = {
|
||||
bucketKey: string;
|
||||
bucketStartDateKey: number;
|
||||
bucketEndDateKey: number;
|
||||
value: number;
|
||||
};
|
||||
|
||||
export type AnalyticsMetricQueryResponse = {
|
||||
buckets: AnalyticsBucketMetric[];
|
||||
};
|
||||
|
||||
export type AdminUpsertProfileTaskConfigRequest = {
|
||||
taskId: string;
|
||||
title: string;
|
||||
|
||||
Reference in New Issue
Block a user