services refactor
This commit is contained in:
@@ -4,6 +4,8 @@ import type {
|
||||
RecordPageViewOutputDto,
|
||||
RecordEngagementInputDto,
|
||||
RecordEngagementOutputDto,
|
||||
AnalyticsDashboardDto,
|
||||
AnalyticsMetricsDto,
|
||||
} from '../../dtos';
|
||||
|
||||
/**
|
||||
@@ -21,4 +23,14 @@ export class AnalyticsApiClient extends BaseApiClient {
|
||||
recordEngagement(input: RecordEngagementInputDto): Promise<RecordEngagementOutputDto> {
|
||||
return this.post<RecordEngagementOutputDto>('/analytics/engagement', input);
|
||||
}
|
||||
|
||||
/** Get analytics dashboard data */
|
||||
getDashboardData(): Promise<AnalyticsDashboardDto> {
|
||||
return this.get<AnalyticsDashboardDto>('/analytics/dashboard');
|
||||
}
|
||||
|
||||
/** Get analytics metrics */
|
||||
getAnalyticsMetrics(): Promise<AnalyticsMetricsDto> {
|
||||
return this.get<AnalyticsMetricsDto>('/analytics/metrics');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user