-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.ts
86 lines (75 loc) · 1.51 KB
/
index.ts
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
export type ItemType = 'SUITE'
| 'STORY'
| 'TEST'
| 'SCENARIO'
| 'STEP'
| 'BEFORE_CLASS'
| 'BEFORE_GROUPS'
| 'BEFORE_METHOD'
| 'BEFORE_SUITE'
| 'BEFORE_TEST'
| 'AFTER_CLASS'
| 'AFTER_GROUPS'
| 'AFTER_METHOD'
| 'AFTER_SUITE'
| 'AFTER_TEST';
export interface IPostItemRequest {
description: string;
launch_id: string;
name: string;
parameters: string[];
retry: boolean;
start_time: string | number;
tags: string[];
type: ItemType;
uniqueId?: string;
}
export interface IReportPortalPostResponse {
id: string;
}
export type ReportPortalTestStatus = 'PASSED'
| 'FAILED'
| 'STOPPED'
| 'SKIPPED'
| 'RESETED'
| 'CANCELLED';
export interface IFinishTestRequest {
end_time: number | string;
status?: ReportPortalTestStatus;
tags: string[];
}
export type LogLevel = 'error'
| 'warn'
| 'info'
| 'debug'
| 'trace'
| 'fatal'
| 'unknown';
export type ICreateLogRequest = ICreateLogRequestBody[];
export interface ICreateLogRequestBody {
file?: {
name: string
};
item_id: string;
level: LogLevel;
message: string;
time: string | number;
}
export interface INamedFileBuffer {
buffer: Buffer;
filename: string;
}
export type LaunchMode = 'DEFAULT' | 'DEBUG';
export interface IStartLaunchRequest {
description?: string;
mode?: LaunchMode;
name: string;
start_time: string | number;
tags?: string[];
}
export interface IFinishLaunchRequest {
description?: string;
end_time: string | number;
status?: ReportPortalTestStatus;
tags?: string[];
}