2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11:29:00 +00:00
books/fyo/telemetry/types.ts
2022-05-23 16:18:23 +05:30

34 lines
687 B
TypeScript

export type AppVersion = string;
export type UniqueId = string;
export type Timestamp = string;
export type Platform = 'Windows' | 'Mac' | 'Linux';
export enum Verb {
Created = 'created',
Deleted = 'deleted',
Submitted = 'submitted',
Cancelled = 'cancelled',
Imported = 'imported',
Exported = 'exported',
Stopped = 'stopped',
Started = 'started',
Resumed = 'resumed',
}
export type Noun = string;
export interface Telemetry {
deviceId: UniqueId;
instanceId: UniqueId;
platform?: Platform;
country: string;
language: string;
version: AppVersion;
timestamp: Timestamp;
openCount: number;
verb: Verb;
noun: Noun;
more?: Record<string, unknown>
}