azure-devops-extension-api 1.158.0 → 2.220.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/Accounts/AccountsClient.d.ts +1 -1
  2. package/Accounts/AccountsClient.js +4 -4
  3. package/Accounts/AccountsClient.min.js +1 -1
  4. package/Build/Build.d.ts +205 -3
  5. package/Build/Build.js +6 -2
  6. package/Build/Build.min.js +1 -1
  7. package/Build/BuildClient.d.ts +121 -13
  8. package/Build/BuildClient.js +468 -101
  9. package/Build/BuildClient.min.js +1 -1
  10. package/Contributions/Contributions.d.ts +1 -1
  11. package/Contributions/ContributionsClient.js +4 -4
  12. package/Contributions/ContributionsClient.min.js +1 -1
  13. package/Core/CoreClient.d.ts +2 -2
  14. package/Core/CoreClient.js +49 -36
  15. package/Core/CoreClient.min.js +1 -1
  16. package/Dashboard/Dashboard.d.ts +79 -2
  17. package/Dashboard/Dashboard.js +10 -0
  18. package/Dashboard/Dashboard.min.js +1 -1
  19. package/Dashboard/DashboardClient.d.ts +2 -2
  20. package/Dashboard/DashboardClient.js +15 -15
  21. package/Dashboard/DashboardClient.min.js +1 -1
  22. package/ExtensionManagement/ExtensionManagement.d.ts +2 -2
  23. package/ExtensionManagement/ExtensionManagementClient.d.ts +2 -2
  24. package/ExtensionManagement/ExtensionManagementClient.js +27 -27
  25. package/ExtensionManagement/ExtensionManagementClient.min.js +1 -1
  26. package/Favorite/Favorite.d.ts +124 -0
  27. package/Favorite/Favorite.js +9 -0
  28. package/Favorite/Favorite.min.js +1 -0
  29. package/Favorite/FavoriteClient.d.ts +78 -0
  30. package/Favorite/FavoriteClient.js +314 -0
  31. package/Favorite/FavoriteClient.min.js +1 -0
  32. package/FeatureAvailability/FeatureAvailabilityClient.js +5 -5
  33. package/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -1
  34. package/FeatureManagement/FeatureManagementClient.js +9 -9
  35. package/FeatureManagement/FeatureManagementClient.min.js +1 -1
  36. package/FileContainer/FileContainer.d.ts +22 -0
  37. package/FileContainer/FileContainer.js +8 -0
  38. package/FileContainer/FileContainer.min.js +1 -1
  39. package/FileContainer/FileContainerClient.d.ts +5 -2
  40. package/FileContainer/FileContainerClient.js +13 -7
  41. package/FileContainer/FileContainerClient.min.js +1 -1
  42. package/FormInput/FormInput.d.ts +1 -1
  43. package/Gallery/Gallery.d.ts +92 -7
  44. package/Gallery/Gallery.js +25 -3
  45. package/Gallery/Gallery.min.js +1 -1
  46. package/Gallery/GalleryClient.d.ts +41 -9
  47. package/Gallery/GalleryClient.js +211 -90
  48. package/Gallery/GalleryClient.min.js +1 -1
  49. package/Git/Git.d.ts +121 -7
  50. package/Git/Git.js +2 -1
  51. package/Git/Git.min.js +1 -1
  52. package/Git/GitClient.d.ts +182 -28
  53. package/Git/GitClient.js +657 -162
  54. package/Git/GitClient.min.js +1 -1
  55. package/Graph/Graph.d.ts +107 -17
  56. package/Graph/GraphClient.d.ts +42 -3
  57. package/Graph/GraphClient.js +159 -38
  58. package/Graph/GraphClient.min.js +1 -1
  59. package/Identities/Identities.d.ts +15 -0
  60. package/Locations/LocationsClient.js +9 -9
  61. package/Locations/LocationsClient.min.js +1 -1
  62. package/Notification/Notification.d.ts +3 -3
  63. package/Notification/NotificationClient.d.ts +6 -0
  64. package/Notification/NotificationClient.js +40 -23
  65. package/Notification/NotificationClient.min.js +1 -1
  66. package/Operations/OperationsClient.d.ts +1 -1
  67. package/Operations/OperationsClient.js +2 -2
  68. package/Operations/OperationsClient.min.js +1 -1
  69. package/Pipelines/Pipelines.d.ts +318 -0
  70. package/Pipelines/Pipelines.js +82 -0
  71. package/Pipelines/Pipelines.min.js +1 -0
  72. package/Pipelines/PipelinesClient.d.ts +92 -0
  73. package/Pipelines/PipelinesClient.js +325 -0
  74. package/Pipelines/PipelinesClient.min.js +1 -0
  75. package/Policy/Policy.d.ts +4 -0
  76. package/Policy/PolicyClient.d.ts +3 -3
  77. package/Policy/PolicyClient.js +30 -19
  78. package/Policy/PolicyClient.min.js +1 -1
  79. package/Profile/ProfileClient.js +12 -12
  80. package/Profile/ProfileClient.min.js +1 -1
  81. package/ProjectAnalysis/ProjectAnalysisClient.js +4 -4
  82. package/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -1
  83. package/Release/Release.d.ts +81 -7
  84. package/Release/Release.js +11 -0
  85. package/Release/Release.min.js +1 -1
  86. package/Release/ReleaseClient.d.ts +31 -5
  87. package/Release/ReleaseClient.js +223 -95
  88. package/Release/ReleaseClient.min.js +1 -1
  89. package/ServiceEndpoint/ServiceEndpoint.d.ts +11 -2
  90. package/ServiceEndpoint/ServiceEndpoint.js +1 -0
  91. package/ServiceEndpoint/ServiceEndpoint.min.js +1 -1
  92. package/ServiceEndpoint/ServiceEndpointClient.d.ts +33 -31
  93. package/ServiceEndpoint/ServiceEndpointClient.js +122 -107
  94. package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
  95. package/ServiceHooks/ServiceHooks.d.ts +2 -1
  96. package/ServiceHooks/ServiceHooksClient.js +23 -23
  97. package/ServiceHooks/ServiceHooksClient.min.js +1 -1
  98. package/TaskAgent/TaskAgent.d.ts +740 -17
  99. package/TaskAgent/TaskAgent.js +133 -0
  100. package/TaskAgent/TaskAgent.min.js +1 -1
  101. package/TaskAgent/TaskAgentClient.d.ts +28 -16
  102. package/TaskAgent/TaskAgentClient.js +336 -195
  103. package/TaskAgent/TaskAgentClient.min.js +1 -1
  104. package/Test/Test.d.ts +96 -25
  105. package/Test/Test.js +8 -0
  106. package/Test/Test.min.js +1 -1
  107. package/Test/TestClient.d.ts +17 -34
  108. package/Test/TestClient.js +163 -152
  109. package/Test/TestClient.min.js +1 -1
  110. package/TestPlan/TestPlan.d.ts +215 -18
  111. package/TestPlan/TestPlan.js +47 -1
  112. package/TestPlan/TestPlan.min.js +1 -1
  113. package/TestPlan/TestPlanClient.d.ts +48 -14
  114. package/TestPlan/TestPlanClient.js +255 -74
  115. package/TestPlan/TestPlanClient.min.js +1 -1
  116. package/TestResults/TestResultsClient.d.ts +112 -27
  117. package/TestResults/TestResultsClient.js +518 -134
  118. package/TestResults/TestResultsClient.min.js +1 -1
  119. package/Tfvc/Tfvc.d.ts +9 -1
  120. package/Tfvc/TfvcClient.d.ts +3 -2
  121. package/Tfvc/TfvcClient.js +41 -28
  122. package/Tfvc/TfvcClient.min.js +1 -1
  123. package/WebApi/WebApi.d.ts +22 -3
  124. package/Wiki/Wiki.d.ts +51 -0
  125. package/Wiki/WikiClient.d.ts +18 -0
  126. package/Wiki/WikiClient.js +71 -1
  127. package/Wiki/WikiClient.min.js +1 -1
  128. package/Work/Work.d.ts +68 -1
  129. package/Work/WorkClient.d.ts +10 -3
  130. package/Work/WorkClient.js +78 -58
  131. package/Work/WorkClient.min.js +1 -1
  132. package/WorkItemTracking/WorkItemTracking.d.ts +221 -1
  133. package/WorkItemTracking/WorkItemTrackingClient.d.ts +18 -2
  134. package/WorkItemTracking/WorkItemTrackingClient.js +107 -60
  135. package/WorkItemTracking/WorkItemTrackingClient.min.js +1 -1
  136. package/WorkItemTrackingProcess/WorkItemTrackingProcess.d.ts +15 -2
  137. package/WorkItemTrackingProcess/WorkItemTrackingProcess.js +4 -0
  138. package/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -1
  139. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.d.ts +1 -1
  140. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +58 -58
  141. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -1
  142. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.d.ts +3 -1
  143. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.d.ts +9 -1
  144. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +69 -46
  145. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -1
  146. package/package.json +3 -3
@@ -48,7 +48,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
48
48
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
49
49
  }
50
50
  };
51
- define(["require", "exports", "../Common/RestClientBase"], function (require, exports, RestClientBase_1) {
51
+ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serialization"], function (require, exports, RestClientBase_1, Serialization_1) {
52
52
  "use strict";
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
54
  var BuildRestClient = /** @class */ (function (_super) {
@@ -67,7 +67,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
67
67
  return __awaiter(this, void 0, void 0, function () {
68
68
  return __generator(this, function (_a) {
69
69
  return [2 /*return*/, this.beginRequest({
70
- apiVersion: "5.2-preview.5",
70
+ apiVersion: "7.1-preview.5",
71
71
  method: "POST",
72
72
  routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
73
73
  routeValues: {
@@ -94,7 +94,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
94
94
  artifactName: artifactName
95
95
  };
96
96
  return [2 /*return*/, this.beginRequest({
97
- apiVersion: "5.2-preview.5",
97
+ apiVersion: "7.1-preview.5",
98
98
  routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
99
99
  routeValues: {
100
100
  project: project,
@@ -120,7 +120,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
120
120
  artifactName: artifactName
121
121
  };
122
122
  return [2 /*return*/, this.beginRequest({
123
- apiVersion: "5.2-preview.5",
123
+ apiVersion: "7.1-preview.5",
124
124
  httpResponseType: "application/zip",
125
125
  routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
126
126
  routeValues: {
@@ -142,7 +142,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
142
142
  return __awaiter(this, void 0, void 0, function () {
143
143
  return __generator(this, function (_a) {
144
144
  return [2 /*return*/, this.beginRequest({
145
- apiVersion: "5.2-preview.5",
145
+ apiVersion: "7.1-preview.5",
146
146
  routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
147
147
  routeValues: {
148
148
  project: project,
@@ -171,7 +171,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
171
171
  fileName: fileName
172
172
  };
173
173
  return [2 /*return*/, this.beginRequest({
174
- apiVersion: "5.2-preview.5",
174
+ apiVersion: "7.1-preview.5",
175
175
  httpResponseType: "application/octet-stream",
176
176
  routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
177
177
  routeValues: {
@@ -194,7 +194,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
194
194
  return __awaiter(this, void 0, void 0, function () {
195
195
  return __generator(this, function (_a) {
196
196
  return [2 /*return*/, this.beginRequest({
197
- apiVersion: "5.2-preview.2",
197
+ apiVersion: "7.1-preview.2",
198
198
  routeTemplate: "{project}/_apis/build/builds/{buildId}/attachments/{type}",
199
199
  routeValues: {
200
200
  project: project,
@@ -219,7 +219,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
219
219
  return __awaiter(this, void 0, void 0, function () {
220
220
  return __generator(this, function (_a) {
221
221
  return [2 /*return*/, this.beginRequest({
222
- apiVersion: "5.2-preview.2",
222
+ apiVersion: "7.1-preview.2",
223
223
  httpResponseType: "application/octet-stream",
224
224
  routeTemplate: "{project}/_apis/build/builds/{buildId}/{timelineId}/{recordId}/attachments/{type}/{name}",
225
225
  routeValues: {
@@ -242,7 +242,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
242
242
  return __awaiter(this, void 0, void 0, function () {
243
243
  return __generator(this, function (_a) {
244
244
  return [2 /*return*/, this.beginRequest({
245
- apiVersion: "5.2-preview.1",
245
+ apiVersion: "7.1-preview.1",
246
246
  method: "PATCH",
247
247
  routeTemplate: "{project}/_apis/build/authorizedresources",
248
248
  routeValues: {
@@ -267,7 +267,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
267
267
  id: id
268
268
  };
269
269
  return [2 /*return*/, this.beginRequest({
270
- apiVersion: "5.2-preview.1",
270
+ apiVersion: "7.1-preview.1",
271
271
  routeTemplate: "{project}/_apis/build/authorizedresources",
272
272
  routeValues: {
273
273
  project: project
@@ -292,7 +292,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
292
292
  branchName: branchName
293
293
  };
294
294
  return [2 /*return*/, this.beginRequest({
295
- apiVersion: "5.2-preview.2",
295
+ apiVersion: "7.1-preview.2",
296
296
  routeTemplate: "_apis/public/build/definitions/{project}/{definitionId}/badge",
297
297
  routeValues: {
298
298
  project: project,
@@ -322,7 +322,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
322
322
  branchName: branchName
323
323
  };
324
324
  return [2 /*return*/, this.beginRequest({
325
- apiVersion: "5.2-preview.1",
325
+ apiVersion: "7.1-preview.1",
326
326
  routeTemplate: "{project}/_apis/sourceProviders/{providerName}/branches",
327
327
  routeValues: {
328
328
  project: project,
@@ -350,7 +350,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
350
350
  branchName: branchName
351
351
  };
352
352
  return [2 /*return*/, this.beginRequest({
353
- apiVersion: "5.2-preview.2",
353
+ apiVersion: "7.1-preview.2",
354
354
  routeTemplate: "{project}/_apis/build/repos/{repoType}/badge",
355
355
  routeValues: {
356
356
  project: project,
@@ -378,7 +378,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
378
378
  branchName: branchName
379
379
  };
380
380
  return [2 /*return*/, this.beginRequest({
381
- apiVersion: "5.2-preview.2",
381
+ apiVersion: "7.1-preview.2",
382
382
  routeTemplate: "{project}/_apis/build/repos/{repoType}/badge",
383
383
  routeValues: {
384
384
  project: project,
@@ -389,6 +389,26 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
389
389
  });
390
390
  });
391
391
  };
392
+ /**
393
+ * Gets all retention leases that apply to a specific build.
394
+ *
395
+ * @param project - Project ID or project name
396
+ * @param buildId - The ID of the build.
397
+ */
398
+ BuildRestClient.prototype.getRetentionLeasesForBuild = function (project, buildId) {
399
+ return __awaiter(this, void 0, void 0, function () {
400
+ return __generator(this, function (_a) {
401
+ return [2 /*return*/, this.beginRequest({
402
+ apiVersion: "7.1-preview.1",
403
+ routeTemplate: "{project}/_apis/build/builds/{buildId}/leases",
404
+ routeValues: {
405
+ project: project,
406
+ buildId: buildId
407
+ }
408
+ })];
409
+ });
410
+ });
411
+ };
392
412
  /**
393
413
  * Deletes a build.
394
414
  *
@@ -399,7 +419,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
399
419
  return __awaiter(this, void 0, void 0, function () {
400
420
  return __generator(this, function (_a) {
401
421
  return [2 /*return*/, this.beginRequest({
402
- apiVersion: "5.2-preview.5",
422
+ apiVersion: "7.1-preview.7",
403
423
  method: "DELETE",
404
424
  routeTemplate: "{project}/_apis/build/builds/{buildId}",
405
425
  routeValues: {
@@ -425,7 +445,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
425
445
  propertyFilters: propertyFilters
426
446
  };
427
447
  return [2 /*return*/, this.beginRequest({
428
- apiVersion: "5.2-preview.5",
448
+ apiVersion: "7.1-preview.7",
429
449
  routeTemplate: "{project}/_apis/build/builds/{buildId}",
430
450
  routeValues: {
431
451
  project: project,
@@ -464,6 +484,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
464
484
  BuildRestClient.prototype.getBuilds = function (project, definitions, queues, buildNumber, minTime, maxTime, requestedFor, reasonFilter, statusFilter, resultFilter, tagFilters, properties, top, continuationToken, maxBuildsPerDefinition, deletedFilter, queryOrder, branchName, buildIds, repositoryId, repositoryType) {
465
485
  return __awaiter(this, void 0, void 0, function () {
466
486
  var queryValues;
487
+ var _this = this;
467
488
  return __generator(this, function (_a) {
468
489
  queryValues = {
469
490
  definitions: definitions && definitions.join(","),
@@ -488,13 +509,25 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
488
509
  repositoryType: repositoryType
489
510
  };
490
511
  return [2 /*return*/, this.beginRequest({
491
- apiVersion: "5.2-preview.5",
512
+ apiVersion: "7.1-preview.7",
492
513
  routeTemplate: "{project}/_apis/build/builds/{buildId}",
493
514
  routeValues: {
494
515
  project: project
495
516
  },
496
- queryParams: queryValues
497
- })];
517
+ queryParams: queryValues,
518
+ returnRawResponse: true
519
+ }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
520
+ var body;
521
+ return __generator(this, function (_a) {
522
+ switch (_a.label) {
523
+ case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
524
+ case 1:
525
+ body = _a.sent();
526
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
527
+ return [2 /*return*/, body];
528
+ }
529
+ });
530
+ }); })];
498
531
  });
499
532
  });
500
533
  };
@@ -506,18 +539,20 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
506
539
  * @param ignoreWarnings -
507
540
  * @param checkInTicket -
508
541
  * @param sourceBuildId -
542
+ * @param definitionId - Optional definition id to queue a build without a body. Ignored if there's a valid body
509
543
  */
510
- BuildRestClient.prototype.queueBuild = function (build, project, ignoreWarnings, checkInTicket, sourceBuildId) {
544
+ BuildRestClient.prototype.queueBuild = function (build, project, ignoreWarnings, checkInTicket, sourceBuildId, definitionId) {
511
545
  return __awaiter(this, void 0, void 0, function () {
512
546
  var queryValues;
513
547
  return __generator(this, function (_a) {
514
548
  queryValues = {
515
549
  ignoreWarnings: ignoreWarnings,
516
550
  checkInTicket: checkInTicket,
517
- sourceBuildId: sourceBuildId
551
+ sourceBuildId: sourceBuildId,
552
+ definitionId: definitionId
518
553
  };
519
554
  return [2 /*return*/, this.beginRequest({
520
- apiVersion: "5.2-preview.5",
555
+ apiVersion: "7.1-preview.7",
521
556
  method: "POST",
522
557
  routeTemplate: "{project}/_apis/build/builds/{buildId}",
523
558
  routeValues: {
@@ -545,7 +580,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
545
580
  retry: retry
546
581
  };
547
582
  return [2 /*return*/, this.beginRequest({
548
- apiVersion: "5.2-preview.5",
583
+ apiVersion: "7.1-preview.7",
549
584
  method: "PATCH",
550
585
  routeTemplate: "{project}/_apis/build/builds/{buildId}",
551
586
  routeValues: {
@@ -568,7 +603,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
568
603
  return __awaiter(this, void 0, void 0, function () {
569
604
  return __generator(this, function (_a) {
570
605
  return [2 /*return*/, this.beginRequest({
571
- apiVersion: "5.2-preview.5",
606
+ apiVersion: "7.1-preview.7",
572
607
  method: "PATCH",
573
608
  routeTemplate: "{project}/_apis/build/builds/{buildId}",
574
609
  routeValues: {
@@ -591,6 +626,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
591
626
  BuildRestClient.prototype.getBuildChanges = function (project, buildId, continuationToken, top, includeSourceChange) {
592
627
  return __awaiter(this, void 0, void 0, function () {
593
628
  var queryValues;
629
+ var _this = this;
594
630
  return __generator(this, function (_a) {
595
631
  queryValues = {
596
632
  continuationToken: continuationToken,
@@ -598,14 +634,26 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
598
634
  includeSourceChange: includeSourceChange
599
635
  };
600
636
  return [2 /*return*/, this.beginRequest({
601
- apiVersion: "5.2-preview.2",
637
+ apiVersion: "7.1-preview.2",
602
638
  routeTemplate: "{project}/_apis/build/builds/{buildId}/changes",
603
639
  routeValues: {
604
640
  project: project,
605
641
  buildId: buildId
606
642
  },
607
- queryParams: queryValues
608
- })];
643
+ queryParams: queryValues,
644
+ returnRawResponse: true
645
+ }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
646
+ var body;
647
+ return __generator(this, function (_a) {
648
+ switch (_a.label) {
649
+ case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
650
+ case 1:
651
+ body = _a.sent();
652
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
653
+ return [2 /*return*/, body];
654
+ }
655
+ });
656
+ }); })];
609
657
  });
610
658
  });
611
659
  };
@@ -627,7 +675,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
627
675
  '$top': top
628
676
  };
629
677
  return [2 /*return*/, this.beginRequest({
630
- apiVersion: "5.2-preview.2",
678
+ apiVersion: "7.1-preview.2",
631
679
  routeTemplate: "{project}/_apis/build/changes",
632
680
  routeValues: {
633
681
  project: project
@@ -646,7 +694,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
646
694
  return __awaiter(this, void 0, void 0, function () {
647
695
  return __generator(this, function (_a) {
648
696
  return [2 /*return*/, this.beginRequest({
649
- apiVersion: "5.2-preview.2",
697
+ apiVersion: "7.1-preview.2",
650
698
  routeTemplate: "_apis/build/Controllers/{controllerId}",
651
699
  routeValues: {
652
700
  controllerId: controllerId
@@ -668,7 +716,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
668
716
  name: name
669
717
  };
670
718
  return [2 /*return*/, this.beginRequest({
671
- apiVersion: "5.2-preview.2",
719
+ apiVersion: "7.1-preview.2",
672
720
  routeTemplate: "_apis/build/Controllers/{controllerId}",
673
721
  queryParams: queryValues
674
722
  })];
@@ -692,7 +740,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
692
740
  definitionToCloneRevision: definitionToCloneRevision
693
741
  };
694
742
  return [2 /*return*/, this.beginRequest({
695
- apiVersion: "5.2-preview.7",
743
+ apiVersion: "7.1-preview.7",
696
744
  method: "POST",
697
745
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
698
746
  routeValues: {
@@ -714,7 +762,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
714
762
  return __awaiter(this, void 0, void 0, function () {
715
763
  return __generator(this, function (_a) {
716
764
  return [2 /*return*/, this.beginRequest({
717
- apiVersion: "5.2-preview.7",
765
+ apiVersion: "7.1-preview.7",
718
766
  method: "DELETE",
719
767
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
720
768
  routeValues: {
@@ -746,7 +794,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
746
794
  includeLatestBuilds: includeLatestBuilds
747
795
  };
748
796
  return [2 /*return*/, this.beginRequest({
749
- apiVersion: "5.2-preview.7",
797
+ apiVersion: "7.1-preview.7",
750
798
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
751
799
  routeValues: {
752
800
  project: project,
@@ -776,11 +824,12 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
776
824
  * @param includeLatestBuilds - Indicates whether to return the latest and latest completed builds for this definition.
777
825
  * @param taskIdFilter - If specified, filters to definitions that use the specified task.
778
826
  * @param processType - If specified, filters to definitions with the given process type.
779
- * @param yamlFilename - If specified, filters to YAML definitions that match the given filename.
827
+ * @param yamlFilename - If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true
780
828
  */
781
829
  BuildRestClient.prototype.getDefinitions = function (project, name, repositoryId, repositoryType, queryOrder, top, continuationToken, minMetricsTime, definitionIds, path, builtAfter, notBuiltAfter, includeAllProperties, includeLatestBuilds, taskIdFilter, processType, yamlFilename) {
782
830
  return __awaiter(this, void 0, void 0, function () {
783
831
  var queryValues;
832
+ var _this = this;
784
833
  return __generator(this, function (_a) {
785
834
  queryValues = {
786
835
  name: name,
@@ -801,13 +850,25 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
801
850
  yamlFilename: yamlFilename
802
851
  };
803
852
  return [2 /*return*/, this.beginRequest({
804
- apiVersion: "5.2-preview.7",
853
+ apiVersion: "7.1-preview.7",
805
854
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
806
855
  routeValues: {
807
856
  project: project
808
857
  },
809
- queryParams: queryValues
810
- })];
858
+ queryParams: queryValues,
859
+ returnRawResponse: true
860
+ }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
861
+ var body;
862
+ return __generator(this, function (_a) {
863
+ switch (_a.label) {
864
+ case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
865
+ case 1:
866
+ body = _a.sent();
867
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
868
+ return [2 /*return*/, body];
869
+ }
870
+ });
871
+ }); })];
811
872
  });
812
873
  });
813
874
  };
@@ -826,7 +887,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
826
887
  deleted: deleted
827
888
  };
828
889
  return [2 /*return*/, this.beginRequest({
829
- apiVersion: "5.2-preview.7",
890
+ apiVersion: "7.1-preview.7",
830
891
  method: "PATCH",
831
892
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
832
893
  routeValues: {
@@ -839,9 +900,9 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
839
900
  });
840
901
  };
841
902
  /**
842
- * Updates an existing definition.
903
+ * 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.
843
904
  *
844
- * @param definition - The new version of the defintion.
905
+ * @param definition - The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted.
845
906
  * @param project - Project ID or project name
846
907
  * @param definitionId - The ID of the definition.
847
908
  * @param secretsSourceDefinitionId -
@@ -856,7 +917,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
856
917
  secretsSourceDefinitionRevision: secretsSourceDefinitionRevision
857
918
  };
858
919
  return [2 /*return*/, this.beginRequest({
859
- apiVersion: "5.2-preview.7",
920
+ apiVersion: "7.1-preview.7",
860
921
  method: "PUT",
861
922
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
862
923
  routeValues: {
@@ -890,7 +951,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
890
951
  path: path
891
952
  };
892
953
  return [2 /*return*/, this.beginRequest({
893
- apiVersion: "5.2-preview.1",
954
+ apiVersion: "7.1-preview.1",
894
955
  httpResponseType: "text/plain",
895
956
  routeTemplate: "{project}/_apis/sourceProviders/{providerName}/fileContents",
896
957
  routeValues: {
@@ -917,7 +978,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
917
978
  path: path
918
979
  };
919
980
  return [2 /*return*/, this.beginRequest({
920
- apiVersion: "5.2-preview.2",
981
+ apiVersion: "7.1-preview.2",
921
982
  method: "PUT",
922
983
  routeTemplate: "{project}/_apis/build/folders/{*path}",
923
984
  routeValues: {
@@ -943,7 +1004,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
943
1004
  path: path
944
1005
  };
945
1006
  return [2 /*return*/, this.beginRequest({
946
- apiVersion: "5.2-preview.2",
1007
+ apiVersion: "7.1-preview.2",
947
1008
  method: "DELETE",
948
1009
  routeTemplate: "{project}/_apis/build/folders/{*path}",
949
1010
  routeValues: {
@@ -969,7 +1030,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
969
1030
  queryOrder: queryOrder
970
1031
  };
971
1032
  return [2 /*return*/, this.beginRequest({
972
- apiVersion: "5.2-preview.2",
1033
+ apiVersion: "7.1-preview.2",
973
1034
  routeTemplate: "{project}/_apis/build/folders/{*path}",
974
1035
  routeValues: {
975
1036
  project: project,
@@ -995,7 +1056,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
995
1056
  path: path
996
1057
  };
997
1058
  return [2 /*return*/, this.beginRequest({
998
- apiVersion: "5.2-preview.2",
1059
+ apiVersion: "7.1-preview.2",
999
1060
  method: "POST",
1000
1061
  routeTemplate: "{project}/_apis/build/folders/{*path}",
1001
1062
  routeValues: {
@@ -1007,12 +1068,71 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1007
1068
  });
1008
1069
  });
1009
1070
  };
1071
+ /**
1072
+ * Gets pipeline general settings.
1073
+ *
1074
+ * @param project - Project ID or project name
1075
+ */
1076
+ BuildRestClient.prototype.getBuildGeneralSettings = function (project) {
1077
+ return __awaiter(this, void 0, void 0, function () {
1078
+ return __generator(this, function (_a) {
1079
+ return [2 /*return*/, this.beginRequest({
1080
+ apiVersion: "7.1-preview.1",
1081
+ routeTemplate: "{project}/_apis/build/generalSettings",
1082
+ routeValues: {
1083
+ project: project
1084
+ }
1085
+ })];
1086
+ });
1087
+ });
1088
+ };
1089
+ /**
1090
+ * Updates pipeline general settings.
1091
+ *
1092
+ * @param newSettings -
1093
+ * @param project - Project ID or project name
1094
+ */
1095
+ BuildRestClient.prototype.updateBuildGeneralSettings = function (newSettings, project) {
1096
+ return __awaiter(this, void 0, void 0, function () {
1097
+ return __generator(this, function (_a) {
1098
+ return [2 /*return*/, this.beginRequest({
1099
+ apiVersion: "7.1-preview.1",
1100
+ method: "PATCH",
1101
+ routeTemplate: "{project}/_apis/build/generalSettings",
1102
+ routeValues: {
1103
+ project: project
1104
+ },
1105
+ body: newSettings
1106
+ })];
1107
+ });
1108
+ });
1109
+ };
1110
+ /**
1111
+ * 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.
1112
+ *
1113
+ * @param daysToLookback -
1114
+ */
1115
+ BuildRestClient.prototype.getRetentionHistory = function (daysToLookback) {
1116
+ return __awaiter(this, void 0, void 0, function () {
1117
+ var queryValues;
1118
+ return __generator(this, function (_a) {
1119
+ queryValues = {
1120
+ daysToLookback: daysToLookback
1121
+ };
1122
+ return [2 /*return*/, this.beginRequest({
1123
+ apiVersion: "7.1-preview.1",
1124
+ routeTemplate: "_apis/build/retention/history",
1125
+ queryParams: queryValues
1126
+ })];
1127
+ });
1128
+ });
1129
+ };
1010
1130
  /**
1011
1131
  * Gets the latest build for a definition, optionally scoped to a specific branch.
1012
1132
  *
1013
1133
  * @param project - Project ID or project name
1014
1134
  * @param definition - definition name with optional leading folder path, or the definition id
1015
- * @param branchName - optional parameter that indicates the specific branch to use
1135
+ * @param branchName - optional parameter that indicates the specific branch to use. If not specified, the default branch is used.
1016
1136
  */
1017
1137
  BuildRestClient.prototype.getLatestBuild = function (project, definition, branchName) {
1018
1138
  return __awaiter(this, void 0, void 0, function () {
@@ -1022,7 +1142,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1022
1142
  branchName: branchName
1023
1143
  };
1024
1144
  return [2 /*return*/, this.beginRequest({
1025
- apiVersion: "5.2-preview.1",
1145
+ apiVersion: "7.1-preview.1",
1026
1146
  routeTemplate: "{project}/_apis/build/latest/{*definition}",
1027
1147
  routeValues: {
1028
1148
  project: project,
@@ -1033,6 +1153,175 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1033
1153
  });
1034
1154
  });
1035
1155
  };
1156
+ /**
1157
+ * Adds new leases for pipeline runs.
1158
+ *
1159
+ * @param newLeases -
1160
+ * @param project - Project ID or project name
1161
+ */
1162
+ BuildRestClient.prototype.addRetentionLeases = function (newLeases, project) {
1163
+ return __awaiter(this, void 0, void 0, function () {
1164
+ return __generator(this, function (_a) {
1165
+ return [2 /*return*/, this.beginRequest({
1166
+ apiVersion: "7.1-preview.2",
1167
+ method: "POST",
1168
+ routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1169
+ routeValues: {
1170
+ project: project
1171
+ },
1172
+ body: newLeases
1173
+ })];
1174
+ });
1175
+ });
1176
+ };
1177
+ /**
1178
+ * Removes specific retention leases.
1179
+ *
1180
+ * @param project - Project ID or project name
1181
+ * @param ids -
1182
+ */
1183
+ BuildRestClient.prototype.deleteRetentionLeasesById = function (project, ids) {
1184
+ return __awaiter(this, void 0, void 0, function () {
1185
+ var queryValues;
1186
+ return __generator(this, function (_a) {
1187
+ queryValues = {
1188
+ ids: ids && ids.join(",")
1189
+ };
1190
+ return [2 /*return*/, this.beginRequest({
1191
+ apiVersion: "7.1-preview.2",
1192
+ method: "DELETE",
1193
+ routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1194
+ routeValues: {
1195
+ project: project
1196
+ },
1197
+ queryParams: queryValues
1198
+ })];
1199
+ });
1200
+ });
1201
+ };
1202
+ /**
1203
+ * Returns the details of the retention lease given a lease id.
1204
+ *
1205
+ * @param project - Project ID or project name
1206
+ * @param leaseId -
1207
+ */
1208
+ BuildRestClient.prototype.getRetentionLease = function (project, leaseId) {
1209
+ return __awaiter(this, void 0, void 0, function () {
1210
+ return __generator(this, function (_a) {
1211
+ return [2 /*return*/, this.beginRequest({
1212
+ apiVersion: "7.1-preview.2",
1213
+ routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1214
+ routeValues: {
1215
+ project: project,
1216
+ leaseId: leaseId
1217
+ }
1218
+ })];
1219
+ });
1220
+ });
1221
+ };
1222
+ /**
1223
+ * Returns any leases matching the specified MinimalRetentionLeases
1224
+ *
1225
+ * @param project - Project ID or project name
1226
+ * @param leasesToFetch - List of JSON-serialized MinimalRetentionLeases separated by '|'
1227
+ */
1228
+ BuildRestClient.prototype.getRetentionLeasesByMinimalRetentionLeases = function (project, leasesToFetch) {
1229
+ return __awaiter(this, void 0, void 0, function () {
1230
+ var queryValues;
1231
+ return __generator(this, function (_a) {
1232
+ queryValues = {
1233
+ leasesToFetch: leasesToFetch && leasesToFetch.join("|")
1234
+ };
1235
+ return [2 /*return*/, this.beginRequest({
1236
+ apiVersion: "7.1-preview.2",
1237
+ routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1238
+ routeValues: {
1239
+ project: project
1240
+ },
1241
+ queryParams: queryValues
1242
+ })];
1243
+ });
1244
+ });
1245
+ };
1246
+ /**
1247
+ * Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run.
1248
+ *
1249
+ * @param project - Project ID or project name
1250
+ * @param ownerId -
1251
+ * @param definitionId - An optional parameter to limit the search to a specific pipeline definition.
1252
+ * @param runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId.
1253
+ */
1254
+ BuildRestClient.prototype.getRetentionLeasesByOwnerId = function (project, ownerId, definitionId, runId) {
1255
+ return __awaiter(this, void 0, void 0, function () {
1256
+ var queryValues;
1257
+ return __generator(this, function (_a) {
1258
+ queryValues = {
1259
+ ownerId: ownerId,
1260
+ definitionId: definitionId,
1261
+ runId: runId
1262
+ };
1263
+ return [2 /*return*/, this.beginRequest({
1264
+ apiVersion: "7.1-preview.2",
1265
+ routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1266
+ routeValues: {
1267
+ project: project
1268
+ },
1269
+ queryParams: queryValues
1270
+ })];
1271
+ });
1272
+ });
1273
+ };
1274
+ /**
1275
+ * Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run.
1276
+ *
1277
+ * @param project - Project ID or project name
1278
+ * @param userOwnerId - The user id to search for.
1279
+ * @param definitionId - An optional parameter to limit the search to a specific pipeline definition.
1280
+ * @param runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId.
1281
+ */
1282
+ BuildRestClient.prototype.getRetentionLeasesByUserId = function (project, userOwnerId, definitionId, runId) {
1283
+ return __awaiter(this, void 0, void 0, function () {
1284
+ var queryValues;
1285
+ return __generator(this, function (_a) {
1286
+ queryValues = {
1287
+ userOwnerId: userOwnerId,
1288
+ definitionId: definitionId,
1289
+ runId: runId
1290
+ };
1291
+ return [2 /*return*/, this.beginRequest({
1292
+ apiVersion: "7.1-preview.2",
1293
+ routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1294
+ routeValues: {
1295
+ project: project
1296
+ },
1297
+ queryParams: queryValues
1298
+ })];
1299
+ });
1300
+ });
1301
+ };
1302
+ /**
1303
+ * Updates the duration or pipeline protection status of a retention lease.
1304
+ *
1305
+ * @param leaseUpdate - The new data for the retention lease.
1306
+ * @param project - Project ID or project name
1307
+ * @param leaseId - The ID of the lease to update.
1308
+ */
1309
+ BuildRestClient.prototype.updateRetentionLease = function (leaseUpdate, project, leaseId) {
1310
+ return __awaiter(this, void 0, void 0, function () {
1311
+ return __generator(this, function (_a) {
1312
+ return [2 /*return*/, this.beginRequest({
1313
+ apiVersion: "7.1-preview.2",
1314
+ method: "PATCH",
1315
+ routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1316
+ routeValues: {
1317
+ project: project,
1318
+ leaseId: leaseId
1319
+ },
1320
+ body: leaseUpdate
1321
+ })];
1322
+ });
1323
+ });
1324
+ };
1036
1325
  /**
1037
1326
  * Gets an individual log file for a build.
1038
1327
  *
@@ -1051,7 +1340,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1051
1340
  endLine: endLine
1052
1341
  };
1053
1342
  return [2 /*return*/, this.beginRequest({
1054
- apiVersion: "5.2-preview.2",
1343
+ apiVersion: "7.1-preview.2",
1055
1344
  httpResponseType: "text/plain",
1056
1345
  routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
1057
1346
  routeValues: {
@@ -1082,7 +1371,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1082
1371
  endLine: endLine
1083
1372
  };
1084
1373
  return [2 /*return*/, this.beginRequest({
1085
- apiVersion: "5.2-preview.2",
1374
+ apiVersion: "7.1-preview.2",
1086
1375
  routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
1087
1376
  routeValues: {
1088
1377
  project: project,
@@ -1104,7 +1393,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1104
1393
  return __awaiter(this, void 0, void 0, function () {
1105
1394
  return __generator(this, function (_a) {
1106
1395
  return [2 /*return*/, this.beginRequest({
1107
- apiVersion: "5.2-preview.2",
1396
+ apiVersion: "7.1-preview.2",
1108
1397
  routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
1109
1398
  routeValues: {
1110
1399
  project: project,
@@ -1124,7 +1413,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1124
1413
  return __awaiter(this, void 0, void 0, function () {
1125
1414
  return __generator(this, function (_a) {
1126
1415
  return [2 /*return*/, this.beginRequest({
1127
- apiVersion: "5.2-preview.2",
1416
+ apiVersion: "7.1-preview.2",
1128
1417
  httpResponseType: "application/zip",
1129
1418
  routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
1130
1419
  routeValues: {
@@ -1153,7 +1442,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1153
1442
  endLine: endLine
1154
1443
  };
1155
1444
  return [2 /*return*/, this.beginRequest({
1156
- apiVersion: "5.2-preview.2",
1445
+ apiVersion: "7.1-preview.2",
1157
1446
  httpResponseType: "application/zip",
1158
1447
  routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
1159
1448
  routeValues: {
@@ -1181,7 +1470,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1181
1470
  minMetricsTime: minMetricsTime
1182
1471
  };
1183
1472
  return [2 /*return*/, this.beginRequest({
1184
- apiVersion: "5.2-preview.1",
1473
+ apiVersion: "7.1-preview.1",
1185
1474
  routeTemplate: "{project}/_apis/build/Metrics/{metricAggregationType}",
1186
1475
  routeValues: {
1187
1476
  project: project,
@@ -1207,7 +1496,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1207
1496
  minMetricsTime: minMetricsTime
1208
1497
  };
1209
1498
  return [2 /*return*/, this.beginRequest({
1210
- apiVersion: "5.2-preview.1",
1499
+ apiVersion: "7.1-preview.1",
1211
1500
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}/Metrics",
1212
1501
  routeValues: {
1213
1502
  project: project,
@@ -1227,7 +1516,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1227
1516
  return __awaiter(this, void 0, void 0, function () {
1228
1517
  return __generator(this, function (_a) {
1229
1518
  return [2 /*return*/, this.beginRequest({
1230
- apiVersion: "5.2-preview.2",
1519
+ apiVersion: "7.1-preview.2",
1231
1520
  routeTemplate: "{project}/_apis/build/options",
1232
1521
  routeValues: {
1233
1522
  project: project
@@ -1257,7 +1546,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1257
1546
  path: path
1258
1547
  };
1259
1548
  return [2 /*return*/, this.beginRequest({
1260
- apiVersion: "5.2-preview.1",
1549
+ apiVersion: "7.1-preview.1",
1261
1550
  routeTemplate: "{project}/_apis/sourceProviders/{providerName}/pathContents",
1262
1551
  routeValues: {
1263
1552
  project: project,
@@ -1283,7 +1572,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1283
1572
  filter: filter && filter.join(",")
1284
1573
  };
1285
1574
  return [2 /*return*/, this.beginRequest({
1286
- apiVersion: "5.2-preview.1",
1575
+ apiVersion: "7.1-preview.1",
1287
1576
  routeTemplate: "{project}/_apis/build/builds/{buildId}/properties",
1288
1577
  routeValues: {
1289
1578
  project: project,
@@ -1305,7 +1594,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1305
1594
  return __awaiter(this, void 0, void 0, function () {
1306
1595
  return __generator(this, function (_a) {
1307
1596
  return [2 /*return*/, this.beginRequest({
1308
- apiVersion: "5.2-preview.1",
1597
+ apiVersion: "7.1-preview.1",
1309
1598
  method: "PATCH",
1310
1599
  routeTemplate: "{project}/_apis/build/builds/{buildId}/properties",
1311
1600
  routeValues: {
@@ -1335,7 +1624,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1335
1624
  filter: filter && filter.join(",")
1336
1625
  };
1337
1626
  return [2 /*return*/, this.beginRequest({
1338
- apiVersion: "5.2-preview.1",
1627
+ apiVersion: "7.1-preview.1",
1339
1628
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}/properties",
1340
1629
  routeValues: {
1341
1630
  project: project,
@@ -1357,7 +1646,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1357
1646
  return __awaiter(this, void 0, void 0, function () {
1358
1647
  return __generator(this, function (_a) {
1359
1648
  return [2 /*return*/, this.beginRequest({
1360
- apiVersion: "5.2-preview.1",
1649
+ apiVersion: "7.1-preview.1",
1361
1650
  method: "PATCH",
1362
1651
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}/properties",
1363
1652
  routeValues: {
@@ -1390,7 +1679,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1390
1679
  serviceEndpointId: serviceEndpointId
1391
1680
  };
1392
1681
  return [2 /*return*/, this.beginRequest({
1393
- apiVersion: "5.2-preview.1",
1682
+ apiVersion: "7.1-preview.1",
1394
1683
  routeTemplate: "{project}/_apis/sourceProviders/{providerName}/pullRequests/{pullRequestId}",
1395
1684
  routeValues: {
1396
1685
  project: project,
@@ -1417,7 +1706,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1417
1706
  type: type
1418
1707
  };
1419
1708
  return [2 /*return*/, this.beginRequest({
1420
- apiVersion: "5.2-preview.2",
1709
+ apiVersion: "7.1-preview.2",
1421
1710
  routeTemplate: "{project}/_apis/build/builds/{buildId}/report",
1422
1711
  routeValues: {
1423
1712
  project: project,
@@ -1443,7 +1732,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1443
1732
  type: type
1444
1733
  };
1445
1734
  return [2 /*return*/, this.beginRequest({
1446
- apiVersion: "5.2-preview.2",
1735
+ apiVersion: "7.1-preview.2",
1447
1736
  httpResponseType: "text/html",
1448
1737
  routeTemplate: "{project}/_apis/build/builds/{buildId}/report",
1449
1738
  routeValues: {
@@ -1478,7 +1767,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1478
1767
  continuationToken: continuationToken
1479
1768
  };
1480
1769
  return [2 /*return*/, this.beginRequest({
1481
- apiVersion: "5.2-preview.1",
1770
+ apiVersion: "7.1-preview.1",
1482
1771
  routeTemplate: "{project}/_apis/sourceProviders/{providerName}/repositories",
1483
1772
  routeValues: {
1484
1773
  project: project,
@@ -1498,7 +1787,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1498
1787
  return __awaiter(this, void 0, void 0, function () {
1499
1788
  return __generator(this, function (_a) {
1500
1789
  return [2 /*return*/, this.beginRequest({
1501
- apiVersion: "5.2-preview.1",
1790
+ apiVersion: "7.1-preview.1",
1502
1791
  method: "PATCH",
1503
1792
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}/resources",
1504
1793
  routeValues: {
@@ -1518,7 +1807,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1518
1807
  return __awaiter(this, void 0, void 0, function () {
1519
1808
  return __generator(this, function (_a) {
1520
1809
  return [2 /*return*/, this.beginRequest({
1521
- apiVersion: "5.2-preview.1",
1810
+ apiVersion: "7.1-preview.1",
1522
1811
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}/resources",
1523
1812
  routeValues: {
1524
1813
  project: project,
@@ -1536,7 +1825,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1536
1825
  return __awaiter(this, void 0, void 0, function () {
1537
1826
  return __generator(this, function (_a) {
1538
1827
  return [2 /*return*/, this.beginRequest({
1539
- apiVersion: "5.2-preview.2",
1828
+ apiVersion: "7.1-preview.2",
1540
1829
  routeTemplate: "_apis/build/ResourceUsage"
1541
1830
  })];
1542
1831
  });
@@ -1551,7 +1840,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1551
1840
  return __awaiter(this, void 0, void 0, function () {
1552
1841
  return __generator(this, function (_a) {
1553
1842
  return [2 /*return*/, this.beginRequest({
1554
- apiVersion: "5.2-preview.1",
1843
+ apiVersion: "7.1-preview.1",
1555
1844
  routeTemplate: "{project}/_apis/build/retention",
1556
1845
  routeValues: {
1557
1846
  project: project
@@ -1570,7 +1859,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1570
1859
  return __awaiter(this, void 0, void 0, function () {
1571
1860
  return __generator(this, function (_a) {
1572
1861
  return [2 /*return*/, this.beginRequest({
1573
- apiVersion: "5.2-preview.1",
1862
+ apiVersion: "7.1-preview.1",
1574
1863
  method: "PATCH",
1575
1864
  routeTemplate: "{project}/_apis/build/retention",
1576
1865
  routeValues: {
@@ -1591,7 +1880,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1591
1880
  return __awaiter(this, void 0, void 0, function () {
1592
1881
  return __generator(this, function (_a) {
1593
1882
  return [2 /*return*/, this.beginRequest({
1594
- apiVersion: "5.2-preview.3",
1883
+ apiVersion: "7.1-preview.3",
1595
1884
  routeTemplate: "{project}/_apis/build/definitions/{definitionId}/revisions",
1596
1885
  routeValues: {
1597
1886
  project: project,
@@ -1610,7 +1899,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1610
1899
  return __awaiter(this, void 0, void 0, function () {
1611
1900
  return __generator(this, function (_a) {
1612
1901
  return [2 /*return*/, this.beginRequest({
1613
- apiVersion: "5.2-preview.1",
1902
+ apiVersion: "7.1-preview.1",
1614
1903
  routeTemplate: "{project}/_apis/build/settings",
1615
1904
  routeValues: {
1616
1905
  project: project
@@ -1629,7 +1918,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1629
1918
  return __awaiter(this, void 0, void 0, function () {
1630
1919
  return __generator(this, function (_a) {
1631
1920
  return [2 /*return*/, this.beginRequest({
1632
- apiVersion: "5.2-preview.1",
1921
+ apiVersion: "7.1-preview.1",
1633
1922
  method: "PATCH",
1634
1923
  routeTemplate: "{project}/_apis/build/settings",
1635
1924
  routeValues: {
@@ -1649,7 +1938,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1649
1938
  return __awaiter(this, void 0, void 0, function () {
1650
1939
  return __generator(this, function (_a) {
1651
1940
  return [2 /*return*/, this.beginRequest({
1652
- apiVersion: "5.2-preview.1",
1941
+ apiVersion: "7.1-preview.1",
1653
1942
  routeTemplate: "{project}/_apis/sourceProviders",
1654
1943
  routeValues: {
1655
1944
  project: project
@@ -1670,7 +1959,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1670
1959
  return __awaiter(this, void 0, void 0, function () {
1671
1960
  return __generator(this, function (_a) {
1672
1961
  return [2 /*return*/, this.beginRequest({
1673
- apiVersion: "5.2-preview.1",
1962
+ apiVersion: "7.1-preview.1",
1674
1963
  method: "PATCH",
1675
1964
  routeTemplate: "{project}/_apis/build/builds/{buildId}/stages/{stageRefName}",
1676
1965
  routeValues: {
@@ -1688,7 +1977,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1688
1977
  *
1689
1978
  * @param project - Project ID or project name
1690
1979
  * @param definition - Either the definition name with optional leading folder path, or the definition id.
1691
- * @param branchName - Only consider the most recent build for this branch.
1980
+ * @param branchName - Only consider the most recent build for this branch. If not specified, the default branch is used.
1692
1981
  * @param stageName - Use this stage within the pipeline to render the status.
1693
1982
  * @param jobName - Use this job within a stage of the pipeline to render the status.
1694
1983
  * @param configuration - Use this job configuration to render the status
@@ -1706,7 +1995,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1706
1995
  label: label
1707
1996
  };
1708
1997
  return [2 /*return*/, this.beginRequest({
1709
- apiVersion: "5.2-preview.1",
1998
+ apiVersion: "7.1-preview.1",
1710
1999
  routeTemplate: "{project}/_apis/build/status/{*definition}",
1711
2000
  routeValues: {
1712
2001
  project: project,
@@ -1728,7 +2017,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1728
2017
  return __awaiter(this, void 0, void 0, function () {
1729
2018
  return __generator(this, function (_a) {
1730
2019
  return [2 /*return*/, this.beginRequest({
1731
- apiVersion: "5.2-preview.2",
2020
+ apiVersion: "7.1-preview.3",
1732
2021
  method: "PUT",
1733
2022
  routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
1734
2023
  routeValues: {
@@ -1743,7 +2032,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1743
2032
  /**
1744
2033
  * Adds tags to a build.
1745
2034
  *
1746
- * @param tags - The tags to add.
2035
+ * @param tags - The tags to add. Request body is composed directly from listed tags.
1747
2036
  * @param project - Project ID or project name
1748
2037
  * @param buildId - The ID of the build.
1749
2038
  */
@@ -1751,7 +2040,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1751
2040
  return __awaiter(this, void 0, void 0, function () {
1752
2041
  return __generator(this, function (_a) {
1753
2042
  return [2 /*return*/, this.beginRequest({
1754
- apiVersion: "5.2-preview.2",
2043
+ apiVersion: "7.1-preview.3",
1755
2044
  method: "POST",
1756
2045
  routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
1757
2046
  routeValues: {
@@ -1764,7 +2053,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1764
2053
  });
1765
2054
  };
1766
2055
  /**
1767
- * Removes a tag from a build.
2056
+ * 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+)
1768
2057
  *
1769
2058
  * @param project - Project ID or project name
1770
2059
  * @param buildId - The ID of the build.
@@ -1774,7 +2063,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1774
2063
  return __awaiter(this, void 0, void 0, function () {
1775
2064
  return __generator(this, function (_a) {
1776
2065
  return [2 /*return*/, this.beginRequest({
1777
- apiVersion: "5.2-preview.2",
2066
+ apiVersion: "7.1-preview.3",
1778
2067
  method: "DELETE",
1779
2068
  routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
1780
2069
  routeValues: {
@@ -1796,7 +2085,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1796
2085
  return __awaiter(this, void 0, void 0, function () {
1797
2086
  return __generator(this, function (_a) {
1798
2087
  return [2 /*return*/, this.beginRequest({
1799
- apiVersion: "5.2-preview.2",
2088
+ apiVersion: "7.1-preview.3",
1800
2089
  routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
1801
2090
  routeValues: {
1802
2091
  project: project,
@@ -1806,6 +2095,29 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1806
2095
  });
1807
2096
  });
1808
2097
  };
2098
+ /**
2099
+ * Adds/Removes tags from a build.
2100
+ *
2101
+ * @param updateParameters - The tags to add/remove.
2102
+ * @param project - Project ID or project name
2103
+ * @param buildId - The ID of the build.
2104
+ */
2105
+ BuildRestClient.prototype.updateBuildTags = function (updateParameters, project, buildId) {
2106
+ return __awaiter(this, void 0, void 0, function () {
2107
+ return __generator(this, function (_a) {
2108
+ return [2 /*return*/, this.beginRequest({
2109
+ apiVersion: "7.1-preview.3",
2110
+ method: "PATCH",
2111
+ routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
2112
+ routeValues: {
2113
+ project: project,
2114
+ buildId: buildId
2115
+ },
2116
+ body: updateParameters
2117
+ })];
2118
+ });
2119
+ });
2120
+ };
1809
2121
  /**
1810
2122
  * Adds a tag to a definition
1811
2123
  *
@@ -1817,7 +2129,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1817
2129
  return __awaiter(this, void 0, void 0, function () {
1818
2130
  return __generator(this, function (_a) {
1819
2131
  return [2 /*return*/, this.beginRequest({
1820
- apiVersion: "5.2-preview.2",
2132
+ apiVersion: "7.1-preview.3",
1821
2133
  method: "PUT",
1822
2134
  routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
1823
2135
  routeValues: {
@@ -1840,7 +2152,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1840
2152
  return __awaiter(this, void 0, void 0, function () {
1841
2153
  return __generator(this, function (_a) {
1842
2154
  return [2 /*return*/, this.beginRequest({
1843
- apiVersion: "5.2-preview.2",
2155
+ apiVersion: "7.1-preview.3",
1844
2156
  method: "POST",
1845
2157
  routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
1846
2158
  routeValues: {
@@ -1853,7 +2165,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1853
2165
  });
1854
2166
  };
1855
2167
  /**
1856
- * Removes a tag from a definition.
2168
+ * 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+)
1857
2169
  *
1858
2170
  * @param project - Project ID or project name
1859
2171
  * @param definitionId - The ID of the definition.
@@ -1863,7 +2175,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1863
2175
  return __awaiter(this, void 0, void 0, function () {
1864
2176
  return __generator(this, function (_a) {
1865
2177
  return [2 /*return*/, this.beginRequest({
1866
- apiVersion: "5.2-preview.2",
2178
+ apiVersion: "7.1-preview.3",
1867
2179
  method: "DELETE",
1868
2180
  routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
1869
2181
  routeValues: {
@@ -1890,7 +2202,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1890
2202
  revision: revision
1891
2203
  };
1892
2204
  return [2 /*return*/, this.beginRequest({
1893
- apiVersion: "5.2-preview.2",
2205
+ apiVersion: "7.1-preview.3",
1894
2206
  routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
1895
2207
  routeValues: {
1896
2208
  project: project,
@@ -1901,6 +2213,29 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1901
2213
  });
1902
2214
  });
1903
2215
  };
2216
+ /**
2217
+ * Adds/Removes tags from a definition.
2218
+ *
2219
+ * @param updateParameters - The tags to add/remove.
2220
+ * @param project - Project ID or project name
2221
+ * @param definitionId - The ID of the definition.
2222
+ */
2223
+ BuildRestClient.prototype.updateDefinitionTags = function (updateParameters, project, definitionId) {
2224
+ return __awaiter(this, void 0, void 0, function () {
2225
+ return __generator(this, function (_a) {
2226
+ return [2 /*return*/, this.beginRequest({
2227
+ apiVersion: "7.1-preview.3",
2228
+ method: "PATCH",
2229
+ routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
2230
+ routeValues: {
2231
+ project: project,
2232
+ definitionId: definitionId
2233
+ },
2234
+ body: updateParameters
2235
+ })];
2236
+ });
2237
+ });
2238
+ };
1904
2239
  /**
1905
2240
  * Removes a tag from builds, definitions, and from the tag store
1906
2241
  *
@@ -1911,7 +2246,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1911
2246
  return __awaiter(this, void 0, void 0, function () {
1912
2247
  return __generator(this, function (_a) {
1913
2248
  return [2 /*return*/, this.beginRequest({
1914
- apiVersion: "5.2-preview.2",
2249
+ apiVersion: "7.1-preview.3",
1915
2250
  method: "DELETE",
1916
2251
  routeTemplate: "{project}/_apis/build/tags/{*tag}",
1917
2252
  routeValues: {
@@ -1931,7 +2266,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1931
2266
  return __awaiter(this, void 0, void 0, function () {
1932
2267
  return __generator(this, function (_a) {
1933
2268
  return [2 /*return*/, this.beginRequest({
1934
- apiVersion: "5.2-preview.2",
2269
+ apiVersion: "7.1-preview.3",
1935
2270
  routeTemplate: "{project}/_apis/build/tags/{*tag}",
1936
2271
  routeValues: {
1937
2272
  project: project
@@ -1950,7 +2285,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1950
2285
  return __awaiter(this, void 0, void 0, function () {
1951
2286
  return __generator(this, function (_a) {
1952
2287
  return [2 /*return*/, this.beginRequest({
1953
- apiVersion: "5.2-preview.3",
2288
+ apiVersion: "7.1-preview.3",
1954
2289
  method: "DELETE",
1955
2290
  routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
1956
2291
  routeValues: {
@@ -1971,7 +2306,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1971
2306
  return __awaiter(this, void 0, void 0, function () {
1972
2307
  return __generator(this, function (_a) {
1973
2308
  return [2 /*return*/, this.beginRequest({
1974
- apiVersion: "5.2-preview.3",
2309
+ apiVersion: "7.1-preview.3",
1975
2310
  routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
1976
2311
  routeValues: {
1977
2312
  project: project,
@@ -1990,7 +2325,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1990
2325
  return __awaiter(this, void 0, void 0, function () {
1991
2326
  return __generator(this, function (_a) {
1992
2327
  return [2 /*return*/, this.beginRequest({
1993
- apiVersion: "5.2-preview.3",
2328
+ apiVersion: "7.1-preview.3",
1994
2329
  routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
1995
2330
  routeValues: {
1996
2331
  project: project
@@ -2010,7 +2345,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2010
2345
  return __awaiter(this, void 0, void 0, function () {
2011
2346
  return __generator(this, function (_a) {
2012
2347
  return [2 /*return*/, this.beginRequest({
2013
- apiVersion: "5.2-preview.3",
2348
+ apiVersion: "7.1-preview.3",
2014
2349
  method: "PUT",
2015
2350
  routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
2016
2351
  routeValues: {
@@ -2040,7 +2375,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2040
2375
  planId: planId
2041
2376
  };
2042
2377
  return [2 /*return*/, this.beginRequest({
2043
- apiVersion: "5.2-preview.2",
2378
+ apiVersion: "7.1-preview.2",
2044
2379
  routeTemplate: "{project}/_apis/build/builds/{buildId}/Timeline/{timelineId}",
2045
2380
  routeValues: {
2046
2381
  project: project,
@@ -2070,7 +2405,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2070
2405
  repository: repository
2071
2406
  };
2072
2407
  return [2 /*return*/, this.beginRequest({
2073
- apiVersion: "5.2-preview.1",
2408
+ apiVersion: "7.1-preview.1",
2074
2409
  method: "POST",
2075
2410
  routeTemplate: "{project}/_apis/sourceProviders/{providerName}/webhooks",
2076
2411
  routeValues: {
@@ -2100,7 +2435,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2100
2435
  repository: repository
2101
2436
  };
2102
2437
  return [2 /*return*/, this.beginRequest({
2103
- apiVersion: "5.2-preview.1",
2438
+ apiVersion: "7.1-preview.1",
2104
2439
  routeTemplate: "{project}/_apis/sourceProviders/{providerName}/webhooks",
2105
2440
  routeValues: {
2106
2441
  project: project,
@@ -2112,7 +2447,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2112
2447
  });
2113
2448
  };
2114
2449
  /**
2115
- * Gets the work items associated with a build.
2450
+ * Gets the work items associated with a build. Only work items in the same project are returned.
2116
2451
  *
2117
2452
  * @param project - Project ID or project name
2118
2453
  * @param buildId - The ID of the build.
@@ -2126,7 +2461,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2126
2461
  '$top': top
2127
2462
  };
2128
2463
  return [2 /*return*/, this.beginRequest({
2129
- apiVersion: "5.2-preview.2",
2464
+ apiVersion: "7.1-preview.2",
2130
2465
  routeTemplate: "{project}/_apis/build/builds/{buildId}/workitems",
2131
2466
  routeValues: {
2132
2467
  project: project,
@@ -2153,7 +2488,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2153
2488
  '$top': top
2154
2489
  };
2155
2490
  return [2 /*return*/, this.beginRequest({
2156
- apiVersion: "5.2-preview.2",
2491
+ apiVersion: "7.1-preview.2",
2157
2492
  method: "POST",
2158
2493
  routeTemplate: "{project}/_apis/build/builds/{buildId}/workitems",
2159
2494
  routeValues: {
@@ -2184,7 +2519,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2184
2519
  '$top': top
2185
2520
  };
2186
2521
  return [2 /*return*/, this.beginRequest({
2187
- apiVersion: "5.2-preview.2",
2522
+ apiVersion: "7.1-preview.2",
2188
2523
  routeTemplate: "{project}/_apis/build/workitems",
2189
2524
  routeValues: {
2190
2525
  project: project
@@ -2194,6 +2529,38 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2194
2529
  });
2195
2530
  });
2196
2531
  };
2532
+ /**
2533
+ * Converts a definition to YAML, optionally at a specific revision.
2534
+ *
2535
+ * @param project - Project ID or project name
2536
+ * @param definitionId - The ID of the definition.
2537
+ * @param revision - The revision number to retrieve. If this is not specified, the latest version will be returned.
2538
+ * @param minMetricsTime - If specified, indicates the date from which metrics should be included.
2539
+ * @param propertyFilters - A comma-delimited list of properties to include in the results.
2540
+ * @param includeLatestBuilds -
2541
+ */
2542
+ BuildRestClient.prototype.getDefinitionYaml = function (project, definitionId, revision, minMetricsTime, propertyFilters, includeLatestBuilds) {
2543
+ return __awaiter(this, void 0, void 0, function () {
2544
+ var queryValues;
2545
+ return __generator(this, function (_a) {
2546
+ queryValues = {
2547
+ revision: revision,
2548
+ minMetricsTime: minMetricsTime,
2549
+ propertyFilters: propertyFilters && propertyFilters.join(","),
2550
+ includeLatestBuilds: includeLatestBuilds
2551
+ };
2552
+ return [2 /*return*/, this.beginRequest({
2553
+ apiVersion: "7.1-preview.1",
2554
+ routeTemplate: "{project}/_apis/build/definitions/{definitionId}/yaml",
2555
+ routeValues: {
2556
+ project: project,
2557
+ definitionId: definitionId
2558
+ },
2559
+ queryParams: queryValues
2560
+ })];
2561
+ });
2562
+ });
2563
+ };
2197
2564
  BuildRestClient.RESOURCE_AREA_ID = "965220d5-5bb9-42cf-8d67-9b146df2a5a4";
2198
2565
  return BuildRestClient;
2199
2566
  }(RestClientBase_1.RestClientBase));