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