2022-03-09 11:19:26 +00:00
|
|
|
export type AppVersion = string;
|
2022-03-09 10:13:17 +00:00
|
|
|
export type UniqueId = string;
|
|
|
|
export type Timestamp = number;
|
|
|
|
|
|
|
|
export interface InteractionEvent {
|
|
|
|
time: Timestamp;
|
|
|
|
verb: Verb;
|
|
|
|
noun: Noun;
|
|
|
|
more?: Record<string, unknown>;
|
|
|
|
}
|
|
|
|
|
2022-04-18 11:29:20 +00:00
|
|
|
export type Count = Record<string, number>;
|
2022-03-18 09:21:12 +00:00
|
|
|
export type Platform = 'Windows' | 'Mac' | 'Linux';
|
2022-03-09 10:13:17 +00:00
|
|
|
|
|
|
|
export interface Telemetry {
|
|
|
|
deviceId: UniqueId;
|
|
|
|
instanceId: UniqueId;
|
|
|
|
openTime: Timestamp;
|
2022-03-18 09:21:12 +00:00
|
|
|
platform?: Platform;
|
2022-03-09 10:13:17 +00:00
|
|
|
closeTime: Timestamp;
|
|
|
|
timeline?: InteractionEvent[];
|
|
|
|
counts?: Count;
|
2022-03-09 11:20:48 +00:00
|
|
|
errors: Record<string, number>;
|
2022-03-18 10:09:17 +00:00
|
|
|
country: string;
|
|
|
|
language: string;
|
2022-03-09 11:19:26 +00:00
|
|
|
version: AppVersion;
|
2022-03-09 10:13:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export enum Verb {
|
2022-03-09 11:19:26 +00:00
|
|
|
Created = 'created',
|
2022-03-09 10:13:17 +00:00
|
|
|
Deleted = 'deleted',
|
|
|
|
Navigated = 'navigated',
|
2022-03-09 11:19:26 +00:00
|
|
|
Imported = 'imported',
|
|
|
|
Exported = 'exported',
|
2022-03-15 10:58:43 +00:00
|
|
|
Stopped = 'stopped',
|
|
|
|
Started = 'stopped',
|
2022-03-09 10:13:17 +00:00
|
|
|
}
|
|
|
|
|
2022-03-09 11:19:26 +00:00
|
|
|
export enum NounEnum {
|
|
|
|
Route = 'route',
|
2022-03-15 10:58:43 +00:00
|
|
|
Telemetry = 'telemetry',
|
2022-03-09 11:19:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type Noun = string | NounEnum;
|
2022-04-18 11:29:20 +00:00
|
|
|
|
|
|
|
export enum TelemetrySetting {
|
|
|
|
allow = 'allow',
|
|
|
|
dontLogUsage = 'dontLogUsage',
|
|
|
|
dontLogAnything = 'dontLogAnything',
|
|
|
|
}
|