forked from nubank/sentry-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontext.ts
More file actions
72 lines (67 loc) · 1.78 KB
/
Copy pathcontext.ts
File metadata and controls
72 lines (67 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
export type Context = Record<string, unknown>;
export interface Contexts extends Record<string, Context | undefined> {
app?: AppContext;
device?: DeviceContext;
os?: OsContext;
culture?: CultureContext;
}
export interface AppContext extends Record<string, unknown> {
app_name?: string;
app_start_time?: string;
app_version?: string;
app_identifier?: string;
build_type?: string;
app_memory?: number;
}
export interface DeviceContext extends Record<string, unknown> {
name?: string;
family?: string;
model?: string;
model_id?: string;
arch?: string;
battery_level?: number;
orientation?: 'portrait' | 'landscape';
manufacturer?: string;
brand?: string;
screen_resolution?: string;
screen_height_pixels?: number;
screen_width_pixels?: number;
screen_density?: number;
screen_dpi?: number;
online?: boolean;
charging?: boolean;
low_memory?: boolean;
simulator?: boolean;
memory_size?: number;
free_memory?: number;
usable_memory?: number;
storage_size?: number;
free_storage?: number;
external_storage_size?: number;
external_free_storage?: number;
boot_time?: string;
processor_count?: number;
cpu_description?: string;
processor_frequency?: number;
device_type?: string;
battery_status?: string;
device_unique_identifier?: string;
supports_vibration?: boolean;
supports_accelerometer?: boolean;
supports_gyroscope?: boolean;
supports_audio?: boolean;
supports_location_service?: boolean;
}
export interface OsContext extends Record<string, unknown> {
name?: string;
version?: string;
build?: string;
kernel_version?: string;
}
export interface CultureContext extends Record<string, unknown> {
calendar?: string;
display_name?: string;
locale?: string;
is_24_hour_format?: boolean;
timezone?: string;
}