-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathtypes.ts
109 lines (98 loc) · 2.39 KB
/
types.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
export interface CIService {
// get service definition and default config
getDefinition: () => CIServiceDefinition;
// get list of all available pipelines
getPipelines: (settings: CIServiceSettings) => Promise<CIPipeline[]>;
// get latest build status for selected pipelines
getLatestBuilds: (settings: CIServiceSettings) => Promise<CIBuild[]>;
}
export interface ViewConfig {
columns?: number;
fullWidthGroups?: boolean;
showCommits?: boolean;
showCommitsWhenGreen?: boolean;
theme?: string;
notifications?: {
enabled: boolean;
buildBroken: boolean;
buildFixed: boolean;
buildStarted: boolean;
buildSuccessful: boolean;
buildStillFailing: boolean;
};
}
export interface CIPipelineList {
items: CIPipeline[];
selected: string[];
}
export interface CIServiceSettings {
baseUrl: string;
name: string;
token?: string;
branch?: string;
url?: string;
apiUrl?: string;
webUrl?: string;
username?: string;
password?: string;
pipelines: string[];
isDisabled?: boolean;
repository?: string;
}
export interface CIServiceDefinitionField {
type: string;
name?: string;
help?: string;
header?: string;
config?: string;
}
export interface CIServiceDefinition {
typeName: string;
baseUrl: string;
icon: string;
logo: string;
fields: CIServiceDefinitionField[];
defaultConfig: CIServiceSettings;
}
export interface CIPipeline {
id: string;
name: string;
group?: string;
isDisabled?: boolean;
error?: { name: string; message?: string; description?: string };
}
export interface CIBuildTag {
name: string;
type?: string;
description?: string;
}
export interface CIBuildChange {
name: string;
message?: string;
}
export interface CIBuild {
id: string;
name: string;
group?: string;
isBroken?: boolean;
isRunning?: boolean;
isWaiting?: boolean;
isDisabled?: boolean;
error?: { name: string; message?: string; description?: string };
webUrl?: string;
tags?: CIBuildTag[];
changes?: CIBuildChange[];
}
export interface ServiceStateItem {
failedCount?: number;
runningCount?: number;
offlineCount?: number;
name: string;
items?: CIBuild[];
}
export interface WorkerError {
name: string;
message: string;
status: number;
url?: string;
}