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>;
}
