Files
agentic-dev/packages/core-analytics/src/analytics.interface.ts
Danijel Martinek 563eab06a6 feat(core-analytics): add IAnalytics interface, types, and NoopAnalytics
Replaces generator placeholder with IAnalytics interface (track, identify,
pageView, flush), AnalyticsAttributeValue + AnalyticsUser types, and
NoopAnalytics implementation. Adds sibling tests covering all four methods
with 100% coverage. All conformance + coverage gates pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 11:31:58 +00:00

22 lines
474 B
TypeScript

export type AnalyticsAttributeValue = string | number | boolean;
export type AnalyticsUser = {
id: string;
};
export interface IAnalytics {
track(
event: string,
attributes?: Record<string, AnalyticsAttributeValue>,
): void;
identify(
user: AnalyticsUser,
attributes?: Record<string, AnalyticsAttributeValue>,
): void;
pageView(
path: string,
attributes?: Record<string, AnalyticsAttributeValue>,
): void;
flush(): Promise<void>;
}