api client refactor

This commit is contained in:
2025-12-17 18:01:47 +01:00
parent bab55955e1
commit 4177644b18
190 changed files with 6403 additions and 1624 deletions

View File

@@ -0,0 +1,24 @@
import { BaseApiClient } from '../base/BaseApiClient';
import type {
RecordPageViewInputDto,
RecordPageViewOutputDto,
RecordEngagementInputDto,
RecordEngagementOutputDto,
} from '../../dtos';
/**
* Analytics API Client
*
* Handles all analytics-related API operations.
*/
export class AnalyticsApiClient extends BaseApiClient {
/** Record a page view */
recordPageView(input: RecordPageViewInputDto): Promise<RecordPageViewOutputDto> {
return this.post<RecordPageViewOutputDto>('/analytics/page-view', input);
}
/** Record an engagement event */
recordEngagement(input: RecordEngagementInputDto): Promise<RecordEngagementOutputDto> {
return this.post<RecordEngagementOutputDto>('/analytics/engagement', input);
}
}