import type { AnalyticsProtocol } from "@repo/core-shared/di/bind-protocols"; export type AnalyticsAttributeValue = string | number | boolean; export type AnalyticsUser = { id: string; }; /** * Product-analytics sink. Extends `AnalyticsProtocol` from * `@repo/core-shared/di/bind-protocols` — the surface feature binders see via * `ctx.analytics` — so narrowing the protocol fails typecheck here instead of * silently drifting apart. */ export interface IAnalytics extends AnalyticsProtocol { track( event: string, attributes?: Record, ): void; identify( user: AnalyticsUser, attributes?: Record, ): void; pageView( path: string, attributes?: Record, ): void; flush(): Promise; }