UNPKG

6.51 kBTypeScriptView Raw
1import basem = require('./ClientApiBases');
2import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
3import PipelinesInterfaces = require("./interfaces/PipelinesInterfaces");
4export interface IPipelinesApi extends basem.ClientApiBase {
5 getArtifact(project: string, pipelineId: number, runId: number, artifactName: string, expand?: PipelinesInterfaces.GetArtifactExpandOptions): Promise<PipelinesInterfaces.Artifact>;
6 getLog(project: string, pipelineId: number, runId: number, logId: number, expand?: PipelinesInterfaces.GetLogExpandOptions): Promise<PipelinesInterfaces.Log>;
7 listLogs(project: string, pipelineId: number, runId: number, expand?: PipelinesInterfaces.GetLogExpandOptions): Promise<PipelinesInterfaces.LogCollection>;
8 createPipeline(inputParameters: PipelinesInterfaces.CreatePipelineParameters, project: string): Promise<PipelinesInterfaces.Pipeline>;
9 getPipeline(project: string, pipelineId: number, pipelineVersion?: number): Promise<PipelinesInterfaces.Pipeline>;
10 listPipelines(project: string, orderBy?: string, top?: number, continuationToken?: string): Promise<PipelinesInterfaces.Pipeline[]>;
11 preview(runParameters: PipelinesInterfaces.RunPipelineParameters, project: string, pipelineId: number, pipelineVersion?: number): Promise<PipelinesInterfaces.PreviewRun>;
12 getRun(project: string, pipelineId: number, runId: number): Promise<PipelinesInterfaces.Run>;
13 listRuns(project: string, pipelineId: number): Promise<PipelinesInterfaces.Run[]>;
14 runPipeline(runParameters: PipelinesInterfaces.RunPipelineParameters, project: string, pipelineId: number, pipelineVersion?: number): Promise<PipelinesInterfaces.Run>;
15}
16export declare class PipelinesApi extends basem.ClientApiBase implements IPipelinesApi {
17 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
18 /**
19 * Get a specific artifact from a pipeline run
20 *
21 * @param {string} project - Project ID or project name
22 * @param {number} pipelineId - ID of the pipeline.
23 * @param {number} runId - ID of the run of that pipeline.
24 * @param {string} artifactName - Name of the artifact.
25 * @param {PipelinesInterfaces.GetArtifactExpandOptions} expand - Expand options. Default is None.
26 */
27 getArtifact(project: string, pipelineId: number, runId: number, artifactName: string, expand?: PipelinesInterfaces.GetArtifactExpandOptions): Promise<PipelinesInterfaces.Artifact>;
28 /**
29 * Get a specific log from a pipeline run
30 *
31 * @param {string} project - Project ID or project name
32 * @param {number} pipelineId - ID of the pipeline.
33 * @param {number} runId - ID of the run of that pipeline.
34 * @param {number} logId - ID of the log.
35 * @param {PipelinesInterfaces.GetLogExpandOptions} expand - Expand options. Default is None.
36 */
37 getLog(project: string, pipelineId: number, runId: number, logId: number, expand?: PipelinesInterfaces.GetLogExpandOptions): Promise<PipelinesInterfaces.Log>;
38 /**
39 * Get a list of logs from a pipeline run.
40 *
41 * @param {string} project - Project ID or project name
42 * @param {number} pipelineId - ID of the pipeline.
43 * @param {number} runId - ID of the run of that pipeline.
44 * @param {PipelinesInterfaces.GetLogExpandOptions} expand - Expand options. Default is None.
45 */
46 listLogs(project: string, pipelineId: number, runId: number, expand?: PipelinesInterfaces.GetLogExpandOptions): Promise<PipelinesInterfaces.LogCollection>;
47 /**
48 * Create a pipeline.
49 *
50 * @param {PipelinesInterfaces.CreatePipelineParameters} inputParameters - Input parameters.
51 * @param {string} project - Project ID or project name
52 */
53 createPipeline(inputParameters: PipelinesInterfaces.CreatePipelineParameters, project: string): Promise<PipelinesInterfaces.Pipeline>;
54 /**
55 * Gets a pipeline, optionally at the specified version
56 *
57 * @param {string} project - Project ID or project name
58 * @param {number} pipelineId - The pipeline ID
59 * @param {number} pipelineVersion - The pipeline version
60 */
61 getPipeline(project: string, pipelineId: number, pipelineVersion?: number): Promise<PipelinesInterfaces.Pipeline>;
62 /**
63 * Get a list of pipelines.
64 *
65 * @param {string} project - Project ID or project name
66 * @param {string} orderBy - A sort expression. Defaults to "name asc"
67 * @param {number} top - The maximum number of pipelines to return
68 * @param {string} continuationToken - A continuation token from a previous request, to retrieve the next page of results
69 */
70 listPipelines(project: string, orderBy?: string, top?: number, continuationToken?: string): Promise<PipelinesInterfaces.Pipeline[]>;
71 /**
72 * Queues a dry run of the pipeline and returns an object containing the final yaml.
73 *
74 * @param {PipelinesInterfaces.RunPipelineParameters} runParameters - Optional additional parameters for this run.
75 * @param {string} project - Project ID or project name
76 * @param {number} pipelineId - The pipeline ID.
77 * @param {number} pipelineVersion - The pipeline version.
78 */
79 preview(runParameters: PipelinesInterfaces.RunPipelineParameters, project: string, pipelineId: number, pipelineVersion?: number): Promise<PipelinesInterfaces.PreviewRun>;
80 /**
81 * Gets a run for a particular pipeline.
82 *
83 * @param {string} project - Project ID or project name
84 * @param {number} pipelineId - The pipeline id
85 * @param {number} runId - The run id
86 */
87 getRun(project: string, pipelineId: number, runId: number): Promise<PipelinesInterfaces.Run>;
88 /**
89 * Gets top 10000 runs for a particular pipeline.
90 *
91 * @param {string} project - Project ID or project name
92 * @param {number} pipelineId - The pipeline id
93 */
94 listRuns(project: string, pipelineId: number): Promise<PipelinesInterfaces.Run[]>;
95 /**
96 * Runs a pipeline.
97 *
98 * @param {PipelinesInterfaces.RunPipelineParameters} runParameters - Optional additional parameters for this run.
99 * @param {string} project - Project ID or project name
100 * @param {number} pipelineId - The pipeline ID.
101 * @param {number} pipelineVersion - The pipeline version.
102 */
103 runPipeline(runParameters: PipelinesInterfaces.RunPipelineParameters, project: string, pipelineId: number, pipelineVersion?: number): Promise<PipelinesInterfaces.Run>;
104}