1 | import type { User } from './user';
|
2 | export interface RequestSession {
|
3 | status?: RequestSessionStatus;
|
4 | }
|
5 | export interface Session {
|
6 | sid: string;
|
7 | did?: string | number;
|
8 | init: boolean;
|
9 | timestamp: number;
|
10 | started: number;
|
11 | duration?: number;
|
12 | status: SessionStatus;
|
13 | release?: string;
|
14 | environment?: string;
|
15 | userAgent?: string;
|
16 | ipAddress?: string;
|
17 | errors: number;
|
18 | user?: User | null;
|
19 | ignoreDuration: boolean;
|
20 | abnormal_mechanism?: string;
|
21 | |
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | toJSON(): SerializedSession;
|
29 | }
|
30 | export type SessionContext = Partial<Session>;
|
31 | export type SessionStatus = 'ok' | 'exited' | 'crashed' | 'abnormal';
|
32 | export type RequestSessionStatus = 'ok' | 'errored' | 'crashed';
|
33 |
|
34 | export interface SessionAggregates {
|
35 | attrs?: {
|
36 | environment?: string;
|
37 | release?: string;
|
38 | };
|
39 | aggregates: Array<AggregationCounts>;
|
40 | }
|
41 | export interface SessionFlusherLike {
|
42 | |
43 |
|
44 |
|
45 |
|
46 | incrementSessionStatusCount(): void;
|
47 |
|
48 | flush(): void;
|
49 |
|
50 | close(): void;
|
51 | }
|
52 | export interface AggregationCounts {
|
53 | started: string;
|
54 | errored?: number;
|
55 | exited?: number;
|
56 | crashed?: number;
|
57 | }
|
58 | export interface SerializedSession {
|
59 | init: boolean;
|
60 | sid: string;
|
61 | did?: string;
|
62 | timestamp: string;
|
63 | started: string;
|
64 | duration?: number;
|
65 | status: SessionStatus;
|
66 | errors: number;
|
67 | abnormal_mechanism?: string;
|
68 | attrs?: {
|
69 | release?: string;
|
70 | environment?: string;
|
71 | user_agent?: string;
|
72 | ip_address?: string;
|
73 | };
|
74 | }
|
75 |
|
\ | No newline at end of file |