UNPKG

8.53 kBTypeScriptView Raw
1import VSSInterfaces = require("../interfaces/common/VSSInterfaces");
2/**
3 * Artifacts are collections of files produced by a pipeline. Use artifacts to share files between stages in a pipeline or between different pipelines.
4 */
5export interface Artifact {
6 /**
7 * The name of the artifact.
8 */
9 name?: string;
10 /**
11 * Signed url for downloading this artifact
12 */
13 signedContent?: VSSInterfaces.SignedUrl;
14 /**
15 * Self-referential url
16 */
17 url?: string;
18}
19export interface BuildResourceParameters {
20 version?: string;
21}
22export declare enum ConfigurationType {
23 /**
24 * Unknown type.
25 */
26 Unknown = 0,
27 /**
28 * YAML.
29 */
30 Yaml = 1,
31 /**
32 * Designer JSON.
33 */
34 DesignerJson = 2,
35 /**
36 * Just-in-time.
37 */
38 JustInTime = 3,
39 /**
40 * Designer-JSON.
41 */
42 DesignerHyphenJson = 2
43}
44export interface Container {
45 environment?: {
46 [key: string]: string;
47 };
48 image?: string;
49 mapDockerSocket?: boolean;
50 options?: string;
51 ports?: string[];
52 volumes?: string[];
53}
54export interface ContainerResource {
55 container?: Container;
56}
57export interface ContainerResourceParameters {
58 version?: string;
59}
60/**
61 * Configuration parameters of the pipeline.
62 */
63export interface CreatePipelineConfigurationParameters {
64 /**
65 * Type of configuration.
66 */
67 type?: ConfigurationType;
68}
69/**
70 * Parameters to create a pipeline.
71 */
72export interface CreatePipelineParameters {
73 /**
74 * Configuration parameters of the pipeline.
75 */
76 configuration?: CreatePipelineConfigurationParameters;
77 /**
78 * Folder of the pipeline.
79 */
80 folder?: string;
81 /**
82 * Name of the pipeline.
83 */
84 name?: string;
85}
86/**
87 * Expansion options for GetArtifact and ListArtifacts.
88 */
89export declare enum GetArtifactExpandOptions {
90 /**
91 * No expansion.
92 */
93 None = 0,
94 /**
95 * Include signed content.
96 */
97 SignedContent = 1
98}
99/**
100 * $expand options for GetLog and ListLogs.
101 */
102export declare enum GetLogExpandOptions {
103 None = 0,
104 SignedContent = 1
105}
106/**
107 * Log for a pipeline.
108 */
109export interface Log {
110 /**
111 * The date and time the log was created.
112 */
113 createdOn?: Date;
114 /**
115 * The ID of the log.
116 */
117 id?: number;
118 /**
119 * The date and time the log was last changed.
120 */
121 lastChangedOn?: Date;
122 /**
123 * The number of lines in the log.
124 */
125 lineCount?: number;
126 signedContent?: VSSInterfaces.SignedUrl;
127 url?: string;
128}
129/**
130 * A collection of logs.
131 */
132export interface LogCollection {
133 /**
134 * The list of logs.
135 */
136 logs?: Log[];
137 signedContent?: VSSInterfaces.SignedUrl;
138 /**
139 * URL of the log.
140 */
141 url?: string;
142}
143export interface PackageResourceParameters {
144 version?: string;
145}
146/**
147 * Definition of a pipeline.
148 */
149export interface Pipeline extends PipelineBase {
150 _links?: any;
151 configuration?: PipelineConfiguration;
152 /**
153 * URL of the pipeline
154 */
155 url?: string;
156}
157export interface PipelineBase {
158 /**
159 * Pipeline folder
160 */
161 folder?: string;
162 /**
163 * Pipeline ID
164 */
165 id?: number;
166 /**
167 * Pipeline name
168 */
169 name?: string;
170 /**
171 * Revision number
172 */
173 revision?: number;
174}
175export interface PipelineConfiguration {
176 type?: ConfigurationType;
177}
178/**
179 * A reference to a Pipeline.
180 */
181export interface PipelineReference extends PipelineBase {
182 url?: string;
183}
184export interface PipelineResource {
185 pipeline?: PipelineReference;
186 version?: string;
187}
188export interface PipelineResourceParameters {
189 version?: string;
190}
191export interface PreviewRun {
192 finalYaml?: string;
193}
194export interface Repository {
195 type?: RepositoryType;
196}
197export interface RepositoryResource {
198 refName?: string;
199 repository?: Repository;
200 version?: string;
201}
202export interface RepositoryResourceParameters {
203 refName?: string;
204 /**
205 * This is the security token to use when connecting to the repository.
206 */
207 token?: string;
208 /**
209 * Optional. This is the type of the token given. If not provided, a type of "Bearer" is assumed. Note: Use "Basic" for a PAT token.
210 */
211 tokenType?: string;
212 version?: string;
213}
214export declare enum RepositoryType {
215 Unknown = 0,
216 GitHub = 1,
217 AzureReposGit = 2,
218 GitHubEnterprise = 3,
219 AzureReposGitHyphenated = 2
220}
221export interface Run extends RunReference {
222 _links?: any;
223 createdDate?: Date;
224 finalYaml?: string;
225 finishedDate?: Date;
226 pipeline?: PipelineReference;
227 resources?: RunResources;
228 result?: RunResult;
229 state?: RunState;
230 templateParameters?: {
231 [key: string]: any;
232 };
233 url?: string;
234 variables?: {
235 [key: string]: Variable;
236 };
237}
238/**
239 * Settings which influence pipeline runs.
240 */
241export interface RunPipelineParameters {
242 /**
243 * If true, don't actually create a new run. Instead, return the final YAML document after parsing templates.
244 */
245 previewRun?: boolean;
246 /**
247 * The resources the run requires.
248 */
249 resources?: RunResourcesParameters;
250 stagesToSkip?: string[];
251 templateParameters?: {
252 [key: string]: string;
253 };
254 variables?: {
255 [key: string]: Variable;
256 };
257 /**
258 * If you use the preview run option, you may optionally supply different YAML. This allows you to preview the final YAML document without committing a changed file.
259 */
260 yamlOverride?: string;
261}
262export interface RunReference {
263 id?: number;
264 name?: string;
265}
266export interface RunResources {
267 containers?: {
268 [key: string]: ContainerResource;
269 };
270 pipelines?: {
271 [key: string]: PipelineResource;
272 };
273 repositories?: {
274 [key: string]: RepositoryResource;
275 };
276}
277export interface RunResourcesParameters {
278 builds?: {
279 [key: string]: BuildResourceParameters;
280 };
281 containers?: {
282 [key: string]: ContainerResourceParameters;
283 };
284 packages?: {
285 [key: string]: PackageResourceParameters;
286 };
287 pipelines?: {
288 [key: string]: PipelineResourceParameters;
289 };
290 repositories?: {
291 [key: string]: RepositoryResourceParameters;
292 };
293}
294/**
295 * This is not a Flags enum because we don't want to set multiple results on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum. This will make it easier to query multiple results.
296 */
297export declare enum RunResult {
298 Unknown = 0,
299 Succeeded = 1,
300 Failed = 2,
301 Canceled = 4
302}
303/**
304 * This is not a Flags enum because we don't want to set multiple states on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum. This will make it easier to query multiple states.
305 */
306export declare enum RunState {
307 Unknown = 0,
308 InProgress = 1,
309 Canceling = 2,
310 Completed = 4
311}
312export interface SignalRConnection {
313 signedContent?: VSSInterfaces.SignedUrl;
314}
315export interface Variable {
316 isSecret?: boolean;
317 value?: string;
318}
319export declare var TypeInfo: {
320 Artifact: any;
321 ConfigurationType: {
322 enumValues: {
323 unknown: number;
324 yaml: number;
325 designerJson: number;
326 justInTime: number;
327 designerHyphenJson: number;
328 };
329 };
330 CreatePipelineConfigurationParameters: any;
331 CreatePipelineParameters: any;
332 GetArtifactExpandOptions: {
333 enumValues: {
334 none: number;
335 signedContent: number;
336 };
337 };
338 GetLogExpandOptions: {
339 enumValues: {
340 none: number;
341 signedContent: number;
342 };
343 };
344 Log: any;
345 LogCollection: any;
346 Pipeline: any;
347 PipelineConfiguration: any;
348 Repository: any;
349 RepositoryResource: any;
350 RepositoryType: {
351 enumValues: {
352 unknown: number;
353 gitHub: number;
354 azureReposGit: number;
355 gitHubEnterprise: number;
356 azureReposGitHyphenated: number;
357 };
358 };
359 Run: any;
360 RunResources: any;
361 RunResult: {
362 enumValues: {
363 unknown: number;
364 succeeded: number;
365 failed: number;
366 canceled: number;
367 };
368 };
369 RunState: {
370 enumValues: {
371 unknown: number;
372 inProgress: number;
373 canceling: number;
374 completed: number;
375 };
376 };
377 SignalRConnection: any;
378};