mirror of
https://github.com/frappe/books.git
synced 2024-12-23 03:19:01 +00:00
de7e5ba807
- cause now most of it is different from what it was
51 lines
1.0 KiB
TypeScript
51 lines
1.0 KiB
TypeScript
export type AppVersion = string;
|
|
export type UniqueId = string;
|
|
export type Timestamp = number;
|
|
|
|
export interface InteractionEvent {
|
|
time: Timestamp;
|
|
verb: Verb;
|
|
noun: Noun;
|
|
more?: Record<string, unknown>;
|
|
}
|
|
|
|
export type Count = Record<string, number>;
|
|
export type Platform = 'Windows' | 'Mac' | 'Linux';
|
|
|
|
export interface Telemetry {
|
|
deviceId: UniqueId;
|
|
instanceId: UniqueId;
|
|
openTime: Timestamp;
|
|
platform?: Platform;
|
|
closeTime: Timestamp;
|
|
timeline?: InteractionEvent[];
|
|
counts?: Count;
|
|
errors: Record<string, number>;
|
|
country: string;
|
|
language: string;
|
|
version: AppVersion;
|
|
}
|
|
|
|
export enum Verb {
|
|
Created = 'created',
|
|
Deleted = 'deleted',
|
|
Navigated = 'navigated',
|
|
Imported = 'imported',
|
|
Exported = 'exported',
|
|
Stopped = 'stopped',
|
|
Started = 'stopped',
|
|
}
|
|
|
|
export enum NounEnum {
|
|
Route = 'route',
|
|
Telemetry = 'telemetry',
|
|
}
|
|
|
|
export type Noun = string | NounEnum;
|
|
|
|
export enum TelemetrySetting {
|
|
allow = 'allow',
|
|
dontLogUsage = 'dontLogUsage',
|
|
dontLogAnything = 'dontLogAnything',
|
|
}
|