UNPKG

60.6 kBTypeScriptView Raw
1/// <reference types="node" />
2import basem = require('./ClientApiBases');
3import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces');
4import BuildInterfaces = require("./interfaces/BuildInterfaces");
5import VSSInterfaces = require("./interfaces/common/VSSInterfaces");
6export interface IBuildApi extends basem.ClientApiBase {
7 createArtifact(artifact: BuildInterfaces.BuildArtifact, project: string, buildId: number): Promise<BuildInterfaces.BuildArtifact>;
8 getArtifact(project: string, buildId: number, artifactName: string): Promise<BuildInterfaces.BuildArtifact>;
9 getArtifactContentZip(project: string, buildId: number, artifactName: string): Promise<NodeJS.ReadableStream>;
10 getArtifacts(project: string, buildId: number): Promise<BuildInterfaces.BuildArtifact[]>;
11 getFile(project: string, buildId: number, artifactName: string, fileId: string, fileName: string): Promise<NodeJS.ReadableStream>;
12 getAttachments(project: string, buildId: number, type: string): Promise<BuildInterfaces.Attachment[]>;
13 getAttachment(project: string, buildId: number, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
14 authorizeProjectResources(resources: BuildInterfaces.DefinitionResourceReference[], project: string): Promise<BuildInterfaces.DefinitionResourceReference[]>;
15 getProjectResources(project: string, type?: string, id?: string): Promise<BuildInterfaces.DefinitionResourceReference[]>;
16 getBadge(project: string, definitionId: number, branchName?: string): Promise<string>;
17 listBranches(project: string, providerName: string, serviceEndpointId?: string, repository?: string, branchName?: string): Promise<string[]>;
18 getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise<BuildInterfaces.BuildBadge>;
19 getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise<string>;
20 getRetentionLeasesForBuild(project: string, buildId: number): Promise<BuildInterfaces.RetentionLease[]>;
21 deleteBuild(project: string, buildId: number): Promise<void>;
22 getBuild(project: string, buildId: number, propertyFilters?: string): Promise<BuildInterfaces.Build>;
23 getBuilds(project: string, definitions?: number[], queues?: number[], buildNumber?: string, minTime?: Date, maxTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string, buildIds?: number[], repositoryId?: string, repositoryType?: string): Promise<VSSInterfaces.PagedList<BuildInterfaces.Build>>;
24 queueBuild(build: BuildInterfaces.Build, project: string, ignoreWarnings?: boolean, checkInTicket?: string, sourceBuildId?: number, definitionId?: number): Promise<BuildInterfaces.Build>;
25 updateBuild(build: BuildInterfaces.Build, project: string, buildId: number, retry?: boolean): Promise<BuildInterfaces.Build>;
26 updateBuilds(builds: BuildInterfaces.Build[], project: string): Promise<BuildInterfaces.Build[]>;
27 getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise<VSSInterfaces.PagedList<BuildInterfaces.Change>>;
28 getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise<BuildInterfaces.Change[]>;
29 getBuildController(controllerId: number): Promise<BuildInterfaces.BuildController>;
30 getBuildControllers(name?: string): Promise<BuildInterfaces.BuildController[]>;
31 createDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise<BuildInterfaces.BuildDefinition>;
32 deleteDefinition(project: string, definitionId: number): Promise<void>;
33 getDefinition(project: string, definitionId: number, revision?: number, minMetricsTime?: Date, propertyFilters?: string[], includeLatestBuilds?: boolean): Promise<BuildInterfaces.BuildDefinition>;
34 getDefinitions(project: string, name?: string, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string, minMetricsTime?: Date, definitionIds?: number[], path?: string, builtAfter?: Date, notBuiltAfter?: Date, includeAllProperties?: boolean, includeLatestBuilds?: boolean, taskIdFilter?: string, processType?: number, yamlFilename?: string): Promise<VSSInterfaces.PagedList<BuildInterfaces.BuildDefinitionReference>>;
35 restoreDefinition(project: string, definitionId: number, deleted: boolean): Promise<BuildInterfaces.BuildDefinition>;
36 updateDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionId: number, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise<BuildInterfaces.BuildDefinition>;
37 getFileContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise<NodeJS.ReadableStream>;
38 createFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise<BuildInterfaces.Folder>;
39 deleteFolder(project: string, path: string): Promise<void>;
40 getFolders(project: string, path?: string, queryOrder?: BuildInterfaces.FolderQueryOrder): Promise<BuildInterfaces.Folder[]>;
41 updateFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise<BuildInterfaces.Folder>;
42 getBuildGeneralSettings(project: string): Promise<BuildInterfaces.PipelineGeneralSettings>;
43 updateBuildGeneralSettings(newSettings: BuildInterfaces.PipelineGeneralSettings, project: string): Promise<BuildInterfaces.PipelineGeneralSettings>;
44 getRetentionHistory(daysToLookback?: number): Promise<BuildInterfaces.BuildRetentionHistory>;
45 getLatestBuild(project: string, definition: string, branchName?: string): Promise<BuildInterfaces.Build>;
46 addRetentionLeases(newLeases: BuildInterfaces.NewRetentionLease[], project: string): Promise<BuildInterfaces.RetentionLease[]>;
47 deleteRetentionLeasesById(project: string, ids: number[]): Promise<void>;
48 getRetentionLease(project: string, leaseId: number): Promise<BuildInterfaces.RetentionLease>;
49 getRetentionLeasesByMinimalRetentionLeases(project: string, leasesToFetch: BuildInterfaces.MinimalRetentionLease[]): Promise<BuildInterfaces.RetentionLease[]>;
50 getRetentionLeasesByOwnerId(project: string, ownerId?: string, definitionId?: number, runId?: number): Promise<BuildInterfaces.RetentionLease[]>;
51 getRetentionLeasesByUserId(project: string, userOwnerId: string, definitionId?: number, runId?: number): Promise<BuildInterfaces.RetentionLease[]>;
52 updateRetentionLease(leaseUpdate: BuildInterfaces.RetentionLeaseUpdate, project: string, leaseId: number): Promise<BuildInterfaces.RetentionLease>;
53 getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
54 getBuildLogLines(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<string[]>;
55 getBuildLogs(project: string, buildId: number): Promise<BuildInterfaces.BuildLog[]>;
56 getBuildLogsZip(project: string, buildId: number): Promise<NodeJS.ReadableStream>;
57 getBuildLogZip(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
58 getProjectMetrics(project: string, metricAggregationType?: string, minMetricsTime?: Date): Promise<BuildInterfaces.BuildMetric[]>;
59 getDefinitionMetrics(project: string, definitionId: number, minMetricsTime?: Date): Promise<BuildInterfaces.BuildMetric[]>;
60 getBuildOptionDefinitions(project?: string): Promise<BuildInterfaces.BuildOptionDefinition[]>;
61 getPathContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise<BuildInterfaces.SourceRepositoryItem[]>;
62 getBuildProperties(project: string, buildId: number, filter?: string[]): Promise<any>;
63 updateBuildProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, buildId: number): Promise<any>;
64 getDefinitionProperties(project: string, definitionId: number, filter?: string[]): Promise<any>;
65 updateDefinitionProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, definitionId: number): Promise<any>;
66 getPullRequest(project: string, providerName: string, pullRequestId: string, repositoryId?: string, serviceEndpointId?: string): Promise<BuildInterfaces.PullRequest>;
67 getBuildReport(project: string, buildId: number, type?: string): Promise<BuildInterfaces.BuildReportMetadata>;
68 getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise<NodeJS.ReadableStream>;
69 listRepositories(project: string, providerName: string, serviceEndpointId?: string, repository?: string, resultSet?: BuildInterfaces.ResultSet, pageResults?: boolean, continuationToken?: string): Promise<BuildInterfaces.SourceRepositories>;
70 authorizeDefinitionResources(resources: BuildInterfaces.DefinitionResourceReference[], project: string, definitionId: number): Promise<BuildInterfaces.DefinitionResourceReference[]>;
71 getDefinitionResources(project: string, definitionId: number): Promise<BuildInterfaces.DefinitionResourceReference[]>;
72 getResourceUsage(): Promise<BuildInterfaces.BuildResourceUsage>;
73 getRetentionSettings(project: string): Promise<BuildInterfaces.ProjectRetentionSetting>;
74 updateRetentionSettings(updateModel: BuildInterfaces.UpdateProjectRetentionSettingModel, project: string): Promise<BuildInterfaces.ProjectRetentionSetting>;
75 getDefinitionRevisions(project: string, definitionId: number): Promise<BuildInterfaces.BuildDefinitionRevision[]>;
76 getBuildSettings(project?: string): Promise<BuildInterfaces.BuildSettings>;
77 updateBuildSettings(settings: BuildInterfaces.BuildSettings, project?: string): Promise<BuildInterfaces.BuildSettings>;
78 listSourceProviders(project: string): Promise<BuildInterfaces.SourceProviderAttributes[]>;
79 updateStage(updateParameters: BuildInterfaces.UpdateStageParameters, buildId: number, stageRefName: string, project?: string): Promise<void>;
80 getStatusBadge(project: string, definition: string, branchName?: string, stageName?: string, jobName?: string, configuration?: string, label?: string): Promise<string>;
81 addBuildTag(project: string, buildId: number, tag: string): Promise<string[]>;
82 addBuildTags(tags: string[], project: string, buildId: number): Promise<string[]>;
83 deleteBuildTag(project: string, buildId: number, tag: string): Promise<string[]>;
84 getBuildTags(project: string, buildId: number): Promise<string[]>;
85 updateBuildTags(updateParameters: BuildInterfaces.UpdateTagParameters, project: string, buildId: number): Promise<string[]>;
86 addDefinitionTag(project: string, definitionId: number, tag: string): Promise<string[]>;
87 addDefinitionTags(tags: string[], project: string, definitionId: number): Promise<string[]>;
88 deleteDefinitionTag(project: string, definitionId: number, tag: string): Promise<string[]>;
89 getDefinitionTags(project: string, definitionId: number, revision?: number): Promise<string[]>;
90 updateDefinitionTags(updateParameters: BuildInterfaces.UpdateTagParameters, project: string, definitionId: number): Promise<string[]>;
91 deleteTag(project: string, tag: string): Promise<string[]>;
92 getTags(project: string): Promise<string[]>;
93 deleteTemplate(project: string, templateId: string): Promise<void>;
94 getTemplate(project: string, templateId: string): Promise<BuildInterfaces.BuildDefinitionTemplate>;
95 getTemplates(project: string): Promise<BuildInterfaces.BuildDefinitionTemplate[]>;
96 saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise<BuildInterfaces.BuildDefinitionTemplate>;
97 getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number, planId?: string): Promise<BuildInterfaces.Timeline>;
98 restoreWebhooks(triggerTypes: BuildInterfaces.DefinitionTriggerType[], project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise<void>;
99 listWebhooks(project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise<BuildInterfaces.RepositoryWebhook[]>;
100 getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
101 getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
102 getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
103 getDefinitionYaml(project: string, definitionId: number, revision?: number, minMetricsTime?: Date, propertyFilters?: string[], includeLatestBuilds?: boolean): Promise<BuildInterfaces.YamlBuild>;
104}
105export declare class BuildApi extends basem.ClientApiBase implements IBuildApi {
106 constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions);
107 static readonly RESOURCE_AREA_ID = "965220d5-5bb9-42cf-8d67-9b146df2a5a4";
108 /**
109 * Associates an artifact with a build.
110 *
111 * @param {BuildInterfaces.BuildArtifact} artifact - The artifact.
112 * @param {string} project - Project ID or project name
113 * @param {number} buildId - The ID of the build.
114 */
115 createArtifact(artifact: BuildInterfaces.BuildArtifact, project: string, buildId: number): Promise<BuildInterfaces.BuildArtifact>;
116 /**
117 * Gets a specific artifact for a build.
118 *
119 * @param {string} project - Project ID or project name
120 * @param {number} buildId - The ID of the build.
121 * @param {string} artifactName - The name of the artifact.
122 */
123 getArtifact(project: string, buildId: number, artifactName: string): Promise<BuildInterfaces.BuildArtifact>;
124 /**
125 * Gets a specific artifact for a build.
126 *
127 * @param {string} project - Project ID or project name
128 * @param {number} buildId - The ID of the build.
129 * @param {string} artifactName - The name of the artifact.
130 */
131 getArtifactContentZip(project: string, buildId: number, artifactName: string): Promise<NodeJS.ReadableStream>;
132 /**
133 * Gets all artifacts for a build.
134 *
135 * @param {string} project - Project ID or project name
136 * @param {number} buildId - The ID of the build.
137 */
138 getArtifacts(project: string, buildId: number): Promise<BuildInterfaces.BuildArtifact[]>;
139 /**
140 * Gets a file from the build.
141 *
142 * @param {string} project - Project ID or project name
143 * @param {number} buildId - The ID of the build.
144 * @param {string} artifactName - The name of the artifact.
145 * @param {string} fileId - The primary key for the file.
146 * @param {string} fileName - The name that the file will be set to.
147 */
148 getFile(project: string, buildId: number, artifactName: string, fileId: string, fileName: string): Promise<NodeJS.ReadableStream>;
149 /**
150 * Gets the list of attachments of a specific type that are associated with a build.
151 *
152 * @param {string} project - Project ID or project name
153 * @param {number} buildId - The ID of the build.
154 * @param {string} type - The type of attachment.
155 */
156 getAttachments(project: string, buildId: number, type: string): Promise<BuildInterfaces.Attachment[]>;
157 /**
158 * Gets a specific attachment.
159 *
160 * @param {string} project - Project ID or project name
161 * @param {number} buildId - The ID of the build.
162 * @param {string} timelineId - The ID of the timeline.
163 * @param {string} recordId - The ID of the timeline record.
164 * @param {string} type - The type of the attachment.
165 * @param {string} name - The name of the attachment.
166 */
167 getAttachment(project: string, buildId: number, timelineId: string, recordId: string, type: string, name: string): Promise<NodeJS.ReadableStream>;
168 /**
169 * @param {BuildInterfaces.DefinitionResourceReference[]} resources
170 * @param {string} project - Project ID or project name
171 */
172 authorizeProjectResources(resources: BuildInterfaces.DefinitionResourceReference[], project: string): Promise<BuildInterfaces.DefinitionResourceReference[]>;
173 /**
174 * @param {string} project - Project ID or project name
175 * @param {string} type
176 * @param {string} id
177 */
178 getProjectResources(project: string, type?: string, id?: string): Promise<BuildInterfaces.DefinitionResourceReference[]>;
179 /**
180 * Gets a badge that indicates the status of the most recent build for a definition. Note that this API is deprecated. Prefer StatusBadgeController.GetStatusBadge.
181 *
182 * @param {string} project - The project ID or name.
183 * @param {number} definitionId - The ID of the definition.
184 * @param {string} branchName - The name of the branch.
185 */
186 getBadge(project: string, definitionId: number, branchName?: string): Promise<string>;
187 /**
188 * Gets a list of branches for the given source code repository.
189 *
190 * @param {string} project - Project ID or project name
191 * @param {string} providerName - The name of the source provider.
192 * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
193 * @param {string} repository - The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
194 * @param {string} branchName - If supplied, the name of the branch to check for specifically.
195 */
196 listBranches(project: string, providerName: string, serviceEndpointId?: string, repository?: string, branchName?: string): Promise<string[]>;
197 /**
198 * Gets a badge that indicates the status of the most recent build for the specified branch.
199 *
200 * @param {string} project - Project ID or project name
201 * @param {string} repoType - The repository type.
202 * @param {string} repoId - The repository ID.
203 * @param {string} branchName - The branch name.
204 */
205 getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise<BuildInterfaces.BuildBadge>;
206 /**
207 * Gets a badge that indicates the status of the most recent build for the specified branch.
208 *
209 * @param {string} project - Project ID or project name
210 * @param {string} repoType - The repository type.
211 * @param {string} repoId - The repository ID.
212 * @param {string} branchName - The branch name.
213 */
214 getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise<string>;
215 /**
216 * Gets all retention leases that apply to a specific build.
217 *
218 * @param {string} project - Project ID or project name
219 * @param {number} buildId - The ID of the build.
220 */
221 getRetentionLeasesForBuild(project: string, buildId: number): Promise<BuildInterfaces.RetentionLease[]>;
222 /**
223 * Deletes a build.
224 *
225 * @param {string} project - Project ID or project name
226 * @param {number} buildId - The ID of the build.
227 */
228 deleteBuild(project: string, buildId: number): Promise<void>;
229 /**
230 * Gets a build
231 *
232 * @param {string} project - Project ID or project name
233 * @param {number} buildId
234 * @param {string} propertyFilters
235 */
236 getBuild(project: string, buildId: number, propertyFilters?: string): Promise<BuildInterfaces.Build>;
237 /**
238 * Gets a list of builds.
239 *
240 * @param {string} project - Project ID or project name
241 * @param {number[]} definitions - A comma-delimited list of definition IDs. If specified, filters to builds for these definitions.
242 * @param {number[]} queues - A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues.
243 * @param {string} buildNumber - If specified, filters to builds that match this build number. Append * to do a prefix search.
244 * @param {Date} minTime - If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified.
245 * @param {Date} maxTime - If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified.
246 * @param {string} requestedFor - If specified, filters to builds requested for the specified user.
247 * @param {BuildInterfaces.BuildReason} reasonFilter - If specified, filters to builds that match this reason.
248 * @param {BuildInterfaces.BuildStatus} statusFilter - If specified, filters to builds that match this status.
249 * @param {BuildInterfaces.BuildResult} resultFilter - If specified, filters to builds that match this result.
250 * @param {string[]} tagFilters - A comma-delimited list of tags. If specified, filters to builds that have the specified tags.
251 * @param {string[]} properties - A comma-delimited list of properties to retrieve.
252 * @param {number} top - The maximum number of builds to return.
253 * @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of builds.
254 * @param {number} maxBuildsPerDefinition - The maximum number of builds to return per definition.
255 * @param {BuildInterfaces.QueryDeletedOption} deletedFilter - Indicates whether to exclude, include, or only return deleted builds.
256 * @param {BuildInterfaces.BuildQueryOrder} queryOrder - The order in which builds should be returned.
257 * @param {string} branchName - If specified, filters to builds that built branches that built this branch.
258 * @param {number[]} buildIds - A comma-delimited list that specifies the IDs of builds to retrieve.
259 * @param {string} repositoryId - If specified, filters to builds that built from this repository.
260 * @param {string} repositoryType - If specified, filters to builds that built from repositories of this type.
261 */
262 getBuilds(project: string, definitions?: number[], queues?: number[], buildNumber?: string, minTime?: Date, maxTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string, buildIds?: number[], repositoryId?: string, repositoryType?: string): Promise<VSSInterfaces.PagedList<BuildInterfaces.Build>>;
263 /**
264 * Queues a build
265 *
266 * @param {BuildInterfaces.Build} build
267 * @param {string} project - Project ID or project name
268 * @param {boolean} ignoreWarnings
269 * @param {string} checkInTicket
270 * @param {number} sourceBuildId
271 * @param {number} definitionId - Optional definition id to queue a build without a body. Ignored if there's a valid body
272 */
273 queueBuild(build: BuildInterfaces.Build, project: string, ignoreWarnings?: boolean, checkInTicket?: string, sourceBuildId?: number, definitionId?: number): Promise<BuildInterfaces.Build>;
274 /**
275 * Updates a build.
276 *
277 * @param {BuildInterfaces.Build} build - The build.
278 * @param {string} project - Project ID or project name
279 * @param {number} buildId - The ID of the build.
280 * @param {boolean} retry
281 */
282 updateBuild(build: BuildInterfaces.Build, project: string, buildId: number, retry?: boolean): Promise<BuildInterfaces.Build>;
283 /**
284 * Updates multiple builds.
285 *
286 * @param {BuildInterfaces.Build[]} builds - The builds to update.
287 * @param {string} project - Project ID or project name
288 */
289 updateBuilds(builds: BuildInterfaces.Build[], project: string): Promise<BuildInterfaces.Build[]>;
290 /**
291 * Gets the changes associated with a build
292 *
293 * @param {string} project - Project ID or project name
294 * @param {number} buildId
295 * @param {string} continuationToken
296 * @param {number} top - The maximum number of changes to return
297 * @param {boolean} includeSourceChange
298 */
299 getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise<VSSInterfaces.PagedList<BuildInterfaces.Change>>;
300 /**
301 * Gets the changes made to the repository between two given builds.
302 *
303 * @param {string} project - Project ID or project name
304 * @param {number} fromBuildId - The ID of the first build.
305 * @param {number} toBuildId - The ID of the last build.
306 * @param {number} top - The maximum number of changes to return.
307 */
308 getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise<BuildInterfaces.Change[]>;
309 /**
310 * Gets a controller
311 *
312 * @param {number} controllerId
313 */
314 getBuildController(controllerId: number): Promise<BuildInterfaces.BuildController>;
315 /**
316 * Gets controller, optionally filtered by name
317 *
318 * @param {string} name
319 */
320 getBuildControllers(name?: string): Promise<BuildInterfaces.BuildController[]>;
321 /**
322 * Creates a new definition.
323 *
324 * @param {BuildInterfaces.BuildDefinition} definition - The definition.
325 * @param {string} project - Project ID or project name
326 * @param {number} definitionToCloneId
327 * @param {number} definitionToCloneRevision
328 */
329 createDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise<BuildInterfaces.BuildDefinition>;
330 /**
331 * Deletes a definition and all associated builds.
332 *
333 * @param {string} project - Project ID or project name
334 * @param {number} definitionId - The ID of the definition.
335 */
336 deleteDefinition(project: string, definitionId: number): Promise<void>;
337 /**
338 * Gets a definition, optionally at a specific revision.
339 *
340 * @param {string} project - Project ID or project name
341 * @param {number} definitionId - The ID of the definition.
342 * @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned.
343 * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included.
344 * @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results.
345 * @param {boolean} includeLatestBuilds
346 */
347 getDefinition(project: string, definitionId: number, revision?: number, minMetricsTime?: Date, propertyFilters?: string[], includeLatestBuilds?: boolean): Promise<BuildInterfaces.BuildDefinition>;
348 /**
349 * Gets a list of definitions.
350 *
351 * @param {string} project - Project ID or project name
352 * @param {string} name - If specified, filters to definitions whose names match this pattern.
353 * @param {string} repositoryId - A repository ID. If specified, filters to definitions that use this repository.
354 * @param {string} repositoryType - If specified, filters to definitions that have a repository of this type.
355 * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder - Indicates the order in which definitions should be returned.
356 * @param {number} top - The maximum number of definitions to return.
357 * @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions.
358 * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included.
359 * @param {number[]} definitionIds - A comma-delimited list that specifies the IDs of definitions to retrieve.
360 * @param {string} path - If specified, filters to definitions under this folder.
361 * @param {Date} builtAfter - If specified, filters to definitions that have builds after this date.
362 * @param {Date} notBuiltAfter - If specified, filters to definitions that do not have builds after this date.
363 * @param {boolean} includeAllProperties - Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned.
364 * @param {boolean} includeLatestBuilds - Indicates whether to return the latest and latest completed builds for this definition.
365 * @param {string} taskIdFilter - If specified, filters to definitions that use the specified task.
366 * @param {number} processType - If specified, filters to definitions with the given process type.
367 * @param {string} yamlFilename - If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true
368 */
369 getDefinitions(project: string, name?: string, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string, minMetricsTime?: Date, definitionIds?: number[], path?: string, builtAfter?: Date, notBuiltAfter?: Date, includeAllProperties?: boolean, includeLatestBuilds?: boolean, taskIdFilter?: string, processType?: number, yamlFilename?: string): Promise<VSSInterfaces.PagedList<BuildInterfaces.BuildDefinitionReference>>;
370 /**
371 * Restores a deleted definition
372 *
373 * @param {string} project - Project ID or project name
374 * @param {number} definitionId - The identifier of the definition to restore.
375 * @param {boolean} deleted - When false, restores a deleted definition.
376 */
377 restoreDefinition(project: string, definitionId: number, deleted: boolean): Promise<BuildInterfaces.BuildDefinition>;
378 /**
379 * Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT.
380 *
381 * @param {BuildInterfaces.BuildDefinition} definition - The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted.
382 * @param {string} project - Project ID or project name
383 * @param {number} definitionId - The ID of the definition.
384 * @param {number} secretsSourceDefinitionId
385 * @param {number} secretsSourceDefinitionRevision
386 */
387 updateDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionId: number, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise<BuildInterfaces.BuildDefinition>;
388 /**
389 * Gets the contents of a file in the given source code repository.
390 *
391 * @param {string} project - Project ID or project name
392 * @param {string} providerName - The name of the source provider.
393 * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
394 * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
395 * @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved.
396 * @param {string} path - The path to the file to retrieve, relative to the root of the repository.
397 */
398 getFileContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise<NodeJS.ReadableStream>;
399 /**
400 * Creates a new folder.
401 *
402 * @param {BuildInterfaces.Folder} folder - The folder.
403 * @param {string} project - Project ID or project name
404 * @param {string} path - The full path of the folder.
405 */
406 createFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise<BuildInterfaces.Folder>;
407 /**
408 * Deletes a definition folder. Definitions and their corresponding builds will also be deleted.
409 *
410 * @param {string} project - Project ID or project name
411 * @param {string} path - The full path to the folder.
412 */
413 deleteFolder(project: string, path: string): Promise<void>;
414 /**
415 * Gets a list of build definition folders.
416 *
417 * @param {string} project - Project ID or project name
418 * @param {string} path - The path to start with.
419 * @param {BuildInterfaces.FolderQueryOrder} queryOrder - The order in which folders should be returned.
420 */
421 getFolders(project: string, path?: string, queryOrder?: BuildInterfaces.FolderQueryOrder): Promise<BuildInterfaces.Folder[]>;
422 /**
423 * Updates an existing folder at given existing path
424 *
425 * @param {BuildInterfaces.Folder} folder - The new version of the folder.
426 * @param {string} project - Project ID or project name
427 * @param {string} path - The full path to the folder.
428 */
429 updateFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise<BuildInterfaces.Folder>;
430 /**
431 * Gets pipeline general settings.
432 *
433 * @param {string} project - Project ID or project name
434 */
435 getBuildGeneralSettings(project: string): Promise<BuildInterfaces.PipelineGeneralSettings>;
436 /**
437 * Updates pipeline general settings.
438 *
439 * @param {BuildInterfaces.PipelineGeneralSettings} newSettings
440 * @param {string} project - Project ID or project name
441 */
442 updateBuildGeneralSettings(newSettings: BuildInterfaces.PipelineGeneralSettings, project: string): Promise<BuildInterfaces.PipelineGeneralSettings>;
443 /**
444 * Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline.
445 *
446 * @param {number} daysToLookback
447 */
448 getRetentionHistory(daysToLookback?: number): Promise<BuildInterfaces.BuildRetentionHistory>;
449 /**
450 * Gets the latest build for a definition, optionally scoped to a specific branch.
451 *
452 * @param {string} project - Project ID or project name
453 * @param {string} definition - definition name with optional leading folder path, or the definition id
454 * @param {string} branchName - optional parameter that indicates the specific branch to use. If not specified, the default branch is used.
455 */
456 getLatestBuild(project: string, definition: string, branchName?: string): Promise<BuildInterfaces.Build>;
457 /**
458 * Adds new leases for pipeline runs.
459 *
460 * @param {BuildInterfaces.NewRetentionLease[]} newLeases
461 * @param {string} project - Project ID or project name
462 */
463 addRetentionLeases(newLeases: BuildInterfaces.NewRetentionLease[], project: string): Promise<BuildInterfaces.RetentionLease[]>;
464 /**
465 * Removes specific retention leases.
466 *
467 * @param {string} project - Project ID or project name
468 * @param {number[]} ids
469 */
470 deleteRetentionLeasesById(project: string, ids: number[]): Promise<void>;
471 /**
472 * Returns the details of the retention lease given a lease id.
473 *
474 * @param {string} project - Project ID or project name
475 * @param {number} leaseId
476 */
477 getRetentionLease(project: string, leaseId: number): Promise<BuildInterfaces.RetentionLease>;
478 /**
479 * Returns any leases matching the specified MinimalRetentionLeases
480 *
481 * @param {string} project - Project ID or project name
482 * @param {BuildInterfaces.MinimalRetentionLease[]} leasesToFetch - List of JSON-serialized MinimalRetentionLeases separated by '|'
483 */
484 getRetentionLeasesByMinimalRetentionLeases(project: string, leasesToFetch: BuildInterfaces.MinimalRetentionLease[]): Promise<BuildInterfaces.RetentionLease[]>;
485 /**
486 * Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run.
487 *
488 * @param {string} project - Project ID or project name
489 * @param {string} ownerId
490 * @param {number} definitionId - An optional parameter to limit the search to a specific pipeline definition.
491 * @param {number} runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId.
492 */
493 getRetentionLeasesByOwnerId(project: string, ownerId?: string, definitionId?: number, runId?: number): Promise<BuildInterfaces.RetentionLease[]>;
494 /**
495 * Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run.
496 *
497 * @param {string} project - Project ID or project name
498 * @param {string} userOwnerId - The user id to search for.
499 * @param {number} definitionId - An optional parameter to limit the search to a specific pipeline definition.
500 * @param {number} runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId.
501 */
502 getRetentionLeasesByUserId(project: string, userOwnerId: string, definitionId?: number, runId?: number): Promise<BuildInterfaces.RetentionLease[]>;
503 /**
504 * Updates the duration or pipeline protection status of a retention lease.
505 *
506 * @param {BuildInterfaces.RetentionLeaseUpdate} leaseUpdate - The new data for the retention lease.
507 * @param {string} project - Project ID or project name
508 * @param {number} leaseId - The ID of the lease to update.
509 */
510 updateRetentionLease(leaseUpdate: BuildInterfaces.RetentionLeaseUpdate, project: string, leaseId: number): Promise<BuildInterfaces.RetentionLease>;
511 /**
512 * Gets an individual log file for a build.
513 *
514 * @param {string} project - Project ID or project name
515 * @param {number} buildId - The ID of the build.
516 * @param {number} logId - The ID of the log file.
517 * @param {number} startLine - The start line.
518 * @param {number} endLine - The end line.
519 */
520 getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
521 /**
522 * Gets an individual log file for a build.
523 *
524 * @param {string} project - Project ID or project name
525 * @param {number} buildId - The ID of the build.
526 * @param {number} logId - The ID of the log file.
527 * @param {number} startLine - The start line.
528 * @param {number} endLine - The end line.
529 */
530 getBuildLogLines(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<string[]>;
531 /**
532 * Gets the logs for a build.
533 *
534 * @param {string} project - Project ID or project name
535 * @param {number} buildId - The ID of the build.
536 */
537 getBuildLogs(project: string, buildId: number): Promise<BuildInterfaces.BuildLog[]>;
538 /**
539 * Gets the logs for a build.
540 *
541 * @param {string} project - Project ID or project name
542 * @param {number} buildId - The ID of the build.
543 */
544 getBuildLogsZip(project: string, buildId: number): Promise<NodeJS.ReadableStream>;
545 /**
546 * Gets an individual log file for a build.
547 *
548 * @param {string} project - Project ID or project name
549 * @param {number} buildId - The ID of the build.
550 * @param {number} logId - The ID of the log file.
551 * @param {number} startLine - The start line.
552 * @param {number} endLine - The end line.
553 */
554 getBuildLogZip(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise<NodeJS.ReadableStream>;
555 /**
556 * Gets build metrics for a project.
557 *
558 * @param {string} project - Project ID or project name
559 * @param {string} metricAggregationType - The aggregation type to use (hourly, daily).
560 * @param {Date} minMetricsTime - The date from which to calculate metrics.
561 */
562 getProjectMetrics(project: string, metricAggregationType?: string, minMetricsTime?: Date): Promise<BuildInterfaces.BuildMetric[]>;
563 /**
564 * Gets build metrics for a definition.
565 *
566 * @param {string} project - Project ID or project name
567 * @param {number} definitionId - The ID of the definition.
568 * @param {Date} minMetricsTime - The date from which to calculate metrics.
569 */
570 getDefinitionMetrics(project: string, definitionId: number, minMetricsTime?: Date): Promise<BuildInterfaces.BuildMetric[]>;
571 /**
572 * Gets all build definition options supported by the system.
573 *
574 * @param {string} project - Project ID or project name
575 */
576 getBuildOptionDefinitions(project?: string): Promise<BuildInterfaces.BuildOptionDefinition[]>;
577 /**
578 * Gets the contents of a directory in the given source code repository.
579 *
580 * @param {string} project - Project ID or project name
581 * @param {string} providerName - The name of the source provider.
582 * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
583 * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
584 * @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved.
585 * @param {string} path - The path contents to list, relative to the root of the repository.
586 */
587 getPathContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise<BuildInterfaces.SourceRepositoryItem[]>;
588 /**
589 * Gets properties for a build.
590 *
591 * @param {string} project - Project ID or project name
592 * @param {number} buildId - The ID of the build.
593 * @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties.
594 */
595 getBuildProperties(project: string, buildId: number, filter?: string[]): Promise<any>;
596 /**
597 * Updates properties for a build.
598 *
599 * @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update.
600 * @param {string} project - Project ID or project name
601 * @param {number} buildId - The ID of the build.
602 */
603 updateBuildProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, buildId: number): Promise<any>;
604 /**
605 * Gets properties for a definition.
606 *
607 * @param {string} project - Project ID or project name
608 * @param {number} definitionId - The ID of the definition.
609 * @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties.
610 */
611 getDefinitionProperties(project: string, definitionId: number, filter?: string[]): Promise<any>;
612 /**
613 * Updates properties for a definition.
614 *
615 * @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update.
616 * @param {string} project - Project ID or project name
617 * @param {number} definitionId - The ID of the definition.
618 */
619 updateDefinitionProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, definitionId: number): Promise<any>;
620 /**
621 * Gets a pull request object from source provider.
622 *
623 * @param {string} project - Project ID or project name
624 * @param {string} providerName - The name of the source provider.
625 * @param {string} pullRequestId - Vendor-specific id of the pull request.
626 * @param {string} repositoryId - Vendor-specific identifier or the name of the repository that contains the pull request.
627 * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
628 */
629 getPullRequest(project: string, providerName: string, pullRequestId: string, repositoryId?: string, serviceEndpointId?: string): Promise<BuildInterfaces.PullRequest>;
630 /**
631 * Gets a build report.
632 *
633 * @param {string} project - Project ID or project name
634 * @param {number} buildId - The ID of the build.
635 * @param {string} type
636 */
637 getBuildReport(project: string, buildId: number, type?: string): Promise<BuildInterfaces.BuildReportMetadata>;
638 /**
639 * Gets a build report.
640 *
641 * @param {string} project - Project ID or project name
642 * @param {number} buildId - The ID of the build.
643 * @param {string} type
644 */
645 getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise<NodeJS.ReadableStream>;
646 /**
647 * Gets a list of source code repositories.
648 *
649 * @param {string} project - Project ID or project name
650 * @param {string} providerName - The name of the source provider.
651 * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
652 * @param {string} repository - If specified, the vendor-specific identifier or the name of a single repository to get.
653 * @param {BuildInterfaces.ResultSet} resultSet - 'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set.
654 * @param {boolean} pageResults - If set to true, this will limit the set of results and will return a continuation token to continue the query.
655 * @param {string} continuationToken - When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories.
656 */
657 listRepositories(project: string, providerName: string, serviceEndpointId?: string, repository?: string, resultSet?: BuildInterfaces.ResultSet, pageResults?: boolean, continuationToken?: string): Promise<BuildInterfaces.SourceRepositories>;
658 /**
659 * @param {BuildInterfaces.DefinitionResourceReference[]} resources
660 * @param {string} project - Project ID or project name
661 * @param {number} definitionId
662 */
663 authorizeDefinitionResources(resources: BuildInterfaces.DefinitionResourceReference[], project: string, definitionId: number): Promise<BuildInterfaces.DefinitionResourceReference[]>;
664 /**
665 * @param {string} project - Project ID or project name
666 * @param {number} definitionId
667 */
668 getDefinitionResources(project: string, definitionId: number): Promise<BuildInterfaces.DefinitionResourceReference[]>;
669 /**
670 * Gets information about build resources in the system.
671 *
672 */
673 getResourceUsage(): Promise<BuildInterfaces.BuildResourceUsage>;
674 /**
675 * Gets the project's retention settings.
676 *
677 * @param {string} project - Project ID or project name
678 */
679 getRetentionSettings(project: string): Promise<BuildInterfaces.ProjectRetentionSetting>;
680 /**
681 * Updates the project's retention settings.
682 *
683 * @param {BuildInterfaces.UpdateProjectRetentionSettingModel} updateModel
684 * @param {string} project - Project ID or project name
685 */
686 updateRetentionSettings(updateModel: BuildInterfaces.UpdateProjectRetentionSettingModel, project: string): Promise<BuildInterfaces.ProjectRetentionSetting>;
687 /**
688 * Gets all revisions of a definition.
689 *
690 * @param {string} project - Project ID or project name
691 * @param {number} definitionId - The ID of the definition.
692 */
693 getDefinitionRevisions(project: string, definitionId: number): Promise<BuildInterfaces.BuildDefinitionRevision[]>;
694 /**
695 * Gets the build settings.
696 *
697 * @param {string} project - Project ID or project name
698 */
699 getBuildSettings(project?: string): Promise<BuildInterfaces.BuildSettings>;
700 /**
701 * Updates the build settings.
702 *
703 * @param {BuildInterfaces.BuildSettings} settings - The new settings.
704 * @param {string} project - Project ID or project name
705 */
706 updateBuildSettings(settings: BuildInterfaces.BuildSettings, project?: string): Promise<BuildInterfaces.BuildSettings>;
707 /**
708 * Get a list of source providers and their capabilities.
709 *
710 * @param {string} project - Project ID or project name
711 */
712 listSourceProviders(project: string): Promise<BuildInterfaces.SourceProviderAttributes[]>;
713 /**
714 * Update a build stage
715 *
716 * @param {BuildInterfaces.UpdateStageParameters} updateParameters
717 * @param {number} buildId
718 * @param {string} stageRefName
719 * @param {string} project - Project ID or project name
720 */
721 updateStage(updateParameters: BuildInterfaces.UpdateStageParameters, buildId: number, stageRefName: string, project?: string): Promise<void>;
722 /**
723 * <p>Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.</p> <p>If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.</p>
724 *
725 * @param {string} project - Project ID or project name
726 * @param {string} definition - Either the definition name with optional leading folder path, or the definition id.
727 * @param {string} branchName - Only consider the most recent build for this branch. If not specified, the default branch is used.
728 * @param {string} stageName - Use this stage within the pipeline to render the status.
729 * @param {string} jobName - Use this job within a stage of the pipeline to render the status.
730 * @param {string} configuration - Use this job configuration to render the status
731 * @param {string} label - Replaces the default text on the left side of the badge.
732 */
733 getStatusBadge(project: string, definition: string, branchName?: string, stageName?: string, jobName?: string, configuration?: string, label?: string): Promise<string>;
734 /**
735 * Adds a tag to a build.
736 *
737 * @param {string} project - Project ID or project name
738 * @param {number} buildId - The ID of the build.
739 * @param {string} tag - The tag to add.
740 */
741 addBuildTag(project: string, buildId: number, tag: string): Promise<string[]>;
742 /**
743 * Adds tags to a build.
744 *
745 * @param {string[]} tags - The tags to add. Request body is composed directly from listed tags.
746 * @param {string} project - Project ID or project name
747 * @param {number} buildId - The ID of the build.
748 */
749 addBuildTags(tags: string[], project: string, buildId: number): Promise<string[]>;
750 /**
751 * Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)
752 *
753 * @param {string} project - Project ID or project name
754 * @param {number} buildId - The ID of the build.
755 * @param {string} tag - The tag to remove.
756 */
757 deleteBuildTag(project: string, buildId: number, tag: string): Promise<string[]>;
758 /**
759 * Gets the tags for a build.
760 *
761 * @param {string} project - Project ID or project name
762 * @param {number} buildId - The ID of the build.
763 */
764 getBuildTags(project: string, buildId: number): Promise<string[]>;
765 /**
766 * Adds/Removes tags from a build.
767 *
768 * @param {BuildInterfaces.UpdateTagParameters} updateParameters - The tags to add/remove.
769 * @param {string} project - Project ID or project name
770 * @param {number} buildId - The ID of the build.
771 */
772 updateBuildTags(updateParameters: BuildInterfaces.UpdateTagParameters, project: string, buildId: number): Promise<string[]>;
773 /**
774 * Adds a tag to a definition
775 *
776 * @param {string} project - Project ID or project name
777 * @param {number} definitionId - The ID of the definition.
778 * @param {string} tag - The tag to add.
779 */
780 addDefinitionTag(project: string, definitionId: number, tag: string): Promise<string[]>;
781 /**
782 * Adds multiple tags to a definition.
783 *
784 * @param {string[]} tags - The tags to add.
785 * @param {string} project - Project ID or project name
786 * @param {number} definitionId - The ID of the definition.
787 */
788 addDefinitionTags(tags: string[], project: string, definitionId: number): Promise<string[]>;
789 /**
790 * Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)
791 *
792 * @param {string} project - Project ID or project name
793 * @param {number} definitionId - The ID of the definition.
794 * @param {string} tag - The tag to remove.
795 */
796 deleteDefinitionTag(project: string, definitionId: number, tag: string): Promise<string[]>;
797 /**
798 * Gets the tags for a definition.
799 *
800 * @param {string} project - Project ID or project name
801 * @param {number} definitionId - The ID of the definition.
802 * @param {number} revision - The definition revision number. If not specified, uses the latest revision of the definition.
803 */
804 getDefinitionTags(project: string, definitionId: number, revision?: number): Promise<string[]>;
805 /**
806 * Adds/Removes tags from a definition.
807 *
808 * @param {BuildInterfaces.UpdateTagParameters} updateParameters - The tags to add/remove.
809 * @param {string} project - Project ID or project name
810 * @param {number} definitionId - The ID of the definition.
811 */
812 updateDefinitionTags(updateParameters: BuildInterfaces.UpdateTagParameters, project: string, definitionId: number): Promise<string[]>;
813 /**
814 * Removes a tag from builds, definitions, and from the tag store
815 *
816 * @param {string} project - Project ID or project name
817 * @param {string} tag - The tag to remove.
818 */
819 deleteTag(project: string, tag: string): Promise<string[]>;
820 /**
821 * Gets a list of all build tags in the project.
822 *
823 * @param {string} project - Project ID or project name
824 */
825 getTags(project: string): Promise<string[]>;
826 /**
827 * Deletes a build definition template.
828 *
829 * @param {string} project - Project ID or project name
830 * @param {string} templateId - The ID of the template.
831 */
832 deleteTemplate(project: string, templateId: string): Promise<void>;
833 /**
834 * Gets a specific build definition template.
835 *
836 * @param {string} project - Project ID or project name
837 * @param {string} templateId - The ID of the requested template.
838 */
839 getTemplate(project: string, templateId: string): Promise<BuildInterfaces.BuildDefinitionTemplate>;
840 /**
841 * Gets all definition templates.
842 *
843 * @param {string} project - Project ID or project name
844 */
845 getTemplates(project: string): Promise<BuildInterfaces.BuildDefinitionTemplate[]>;
846 /**
847 * Updates an existing build definition template.
848 *
849 * @param {BuildInterfaces.BuildDefinitionTemplate} template - The new version of the template.
850 * @param {string} project - Project ID or project name
851 * @param {string} templateId - The ID of the template.
852 */
853 saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise<BuildInterfaces.BuildDefinitionTemplate>;
854 /**
855 * Gets details for a build
856 *
857 * @param {string} project - Project ID or project name
858 * @param {number} buildId
859 * @param {string} timelineId
860 * @param {number} changeId
861 * @param {string} planId
862 */
863 getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number, planId?: string): Promise<BuildInterfaces.Timeline>;
864 /**
865 * Recreates the webhooks for the specified triggers in the given source code repository.
866 *
867 * @param {BuildInterfaces.DefinitionTriggerType[]} triggerTypes - The types of triggers to restore webhooks for.
868 * @param {string} project - Project ID or project name
869 * @param {string} providerName - The name of the source provider.
870 * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
871 * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.
872 */
873 restoreWebhooks(triggerTypes: BuildInterfaces.DefinitionTriggerType[], project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise<void>;
874 /**
875 * Gets a list of webhooks installed in the given source code repository.
876 *
877 * @param {string} project - Project ID or project name
878 * @param {string} providerName - The name of the source provider.
879 * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
880 * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.
881 */
882 listWebhooks(project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise<BuildInterfaces.RepositoryWebhook[]>;
883 /**
884 * Gets the work items associated with a build. Only work items in the same project are returned.
885 *
886 * @param {string} project - Project ID or project name
887 * @param {number} buildId - The ID of the build.
888 * @param {number} top - The maximum number of work items to return.
889 */
890 getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
891 /**
892 * Gets the work items associated with a build, filtered to specific commits.
893 *
894 * @param {string[]} commitIds - A comma-delimited list of commit IDs.
895 * @param {string} project - Project ID or project name
896 * @param {number} buildId - The ID of the build.
897 * @param {number} top - The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified.
898 */
899 getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
900 /**
901 * Gets all the work items between two builds.
902 *
903 * @param {string} project - Project ID or project name
904 * @param {number} fromBuildId - The ID of the first build.
905 * @param {number} toBuildId - The ID of the last build.
906 * @param {number} top - The maximum number of work items to return.
907 */
908 getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise<VSSInterfaces.ResourceRef[]>;
909 /**
910 * Converts a definition to YAML, optionally at a specific revision.
911 *
912 * @param {string} project - Project ID or project name
913 * @param {number} definitionId - The ID of the definition.
914 * @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned.
915 * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included.
916 * @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results.
917 * @param {boolean} includeLatestBuilds
918 */
919 getDefinitionYaml(project: string, definitionId: number, revision?: number, minMetricsTime?: Date, propertyFilters?: string[], includeLatestBuilds?: boolean): Promise<BuildInterfaces.YamlBuild>;
920}