This commit is contained in:
2025-12-11 21:06:25 +01:00
parent c49ea2598d
commit ec3ddc3a5c
227 changed files with 3496 additions and 2083 deletions

View File

@@ -11,16 +11,18 @@ import type {
EngagementEntityType,
EngagementEventProps,
} from '../types/EngagementEvent';
export type { EngagementAction, EngagementEntityType } from '../types/EngagementEvent';
import { AnalyticsEntityId } from '../value-objects/AnalyticsEntityId';
export class EngagementEvent implements IEntity<string> {
readonly id: string;
readonly action: EngagementAction;
readonly entityType: EngagementEntityType;
readonly actorId?: string;
readonly actorId: string | undefined;
readonly actorType: 'anonymous' | 'driver' | 'sponsor';
readonly sessionId: string;
readonly metadata?: Record<string, string | number | boolean>;
readonly metadata: Record<string, string | number | boolean> | undefined;
readonly timestamp: Date;
private readonly entityIdVo: AnalyticsEntityId;

View File

@@ -7,19 +7,21 @@
import type { IEntity } from '@gridpilot/shared/domain';
import type { EntityType, VisitorType, PageViewProps } from '../types/PageView';
export type { EntityType, VisitorType } from '../types/PageView';
import { AnalyticsEntityId } from '../value-objects/AnalyticsEntityId';
import { AnalyticsSessionId } from '../value-objects/AnalyticsSessionId';
import { PageViewId } from '../value-objects/PageViewId';
export class PageView implements IEntity<string> {
readonly entityType: EntityType;
readonly visitorId?: string;
readonly visitorId: string | undefined;
readonly visitorType: VisitorType;
readonly referrer?: string;
readonly userAgent?: string;
readonly country?: string;
readonly referrer: string | undefined;
readonly userAgent: string | undefined;
readonly country: string | undefined;
readonly timestamp: Date;
readonly durationMs?: number;
readonly durationMs: number | undefined;
private readonly idVo: PageViewId;
private readonly entityIdVo: AnalyticsEntityId;