azure-devops-extension-api 1.158.0 → 2.218.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 (140) 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 +201 -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/FeatureAvailability/FeatureAvailabilityClient.js +5 -5
  27. package/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -1
  28. package/FeatureManagement/FeatureManagementClient.js +9 -9
  29. package/FeatureManagement/FeatureManagementClient.min.js +1 -1
  30. package/FileContainer/FileContainer.d.ts +22 -0
  31. package/FileContainer/FileContainer.js +8 -0
  32. package/FileContainer/FileContainer.min.js +1 -1
  33. package/FileContainer/FileContainerClient.d.ts +5 -2
  34. package/FileContainer/FileContainerClient.js +13 -7
  35. package/FileContainer/FileContainerClient.min.js +1 -1
  36. package/FormInput/FormInput.d.ts +1 -1
  37. package/Gallery/Gallery.d.ts +92 -7
  38. package/Gallery/Gallery.js +25 -3
  39. package/Gallery/Gallery.min.js +1 -1
  40. package/Gallery/GalleryClient.d.ts +41 -9
  41. package/Gallery/GalleryClient.js +211 -90
  42. package/Gallery/GalleryClient.min.js +1 -1
  43. package/Git/Git.d.ts +121 -7
  44. package/Git/Git.js +2 -1
  45. package/Git/Git.min.js +1 -1
  46. package/Git/GitClient.d.ts +173 -28
  47. package/Git/GitClient.js +630 -162
  48. package/Git/GitClient.min.js +1 -1
  49. package/Graph/Graph.d.ts +107 -17
  50. package/Graph/GraphClient.d.ts +41 -2
  51. package/Graph/GraphClient.js +158 -37
  52. package/Graph/GraphClient.min.js +1 -1
  53. package/Identities/Identities.d.ts +15 -0
  54. package/Locations/LocationsClient.js +9 -9
  55. package/Locations/LocationsClient.min.js +1 -1
  56. package/Notification/Notification.d.ts +3 -3
  57. package/Notification/NotificationClient.d.ts +6 -0
  58. package/Notification/NotificationClient.js +40 -23
  59. package/Notification/NotificationClient.min.js +1 -1
  60. package/Operations/OperationsClient.d.ts +1 -1
  61. package/Operations/OperationsClient.js +2 -2
  62. package/Operations/OperationsClient.min.js +1 -1
  63. package/Pipelines/Pipelines.d.ts +318 -0
  64. package/Pipelines/Pipelines.js +82 -0
  65. package/Pipelines/Pipelines.min.js +1 -0
  66. package/Pipelines/PipelinesClient.d.ts +92 -0
  67. package/Pipelines/PipelinesClient.js +325 -0
  68. package/Pipelines/PipelinesClient.min.js +1 -0
  69. package/Policy/Policy.d.ts +4 -0
  70. package/Policy/PolicyClient.d.ts +3 -3
  71. package/Policy/PolicyClient.js +30 -19
  72. package/Policy/PolicyClient.min.js +1 -1
  73. package/Profile/ProfileClient.js +12 -12
  74. package/Profile/ProfileClient.min.js +1 -1
  75. package/ProjectAnalysis/ProjectAnalysisClient.js +4 -4
  76. package/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -1
  77. package/Release/Release.d.ts +81 -7
  78. package/Release/Release.js +11 -0
  79. package/Release/Release.min.js +1 -1
  80. package/Release/ReleaseClient.d.ts +31 -5
  81. package/Release/ReleaseClient.js +223 -95
  82. package/Release/ReleaseClient.min.js +1 -1
  83. package/ServiceEndpoint/ServiceEndpoint.d.ts +11 -2
  84. package/ServiceEndpoint/ServiceEndpoint.js +1 -0
  85. package/ServiceEndpoint/ServiceEndpoint.min.js +1 -1
  86. package/ServiceEndpoint/ServiceEndpointClient.d.ts +33 -31
  87. package/ServiceEndpoint/ServiceEndpointClient.js +122 -107
  88. package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
  89. package/ServiceHooks/ServiceHooks.d.ts +2 -1
  90. package/ServiceHooks/ServiceHooksClient.js +23 -23
  91. package/ServiceHooks/ServiceHooksClient.min.js +1 -1
  92. package/TaskAgent/TaskAgent.d.ts +737 -17
  93. package/TaskAgent/TaskAgent.js +133 -0
  94. package/TaskAgent/TaskAgent.min.js +1 -1
  95. package/TaskAgent/TaskAgentClient.d.ts +28 -16
  96. package/TaskAgent/TaskAgentClient.js +336 -195
  97. package/TaskAgent/TaskAgentClient.min.js +1 -1
  98. package/Test/Test.d.ts +96 -25
  99. package/Test/Test.js +8 -0
  100. package/Test/Test.min.js +1 -1
  101. package/Test/TestClient.d.ts +17 -34
  102. package/Test/TestClient.js +163 -152
  103. package/Test/TestClient.min.js +1 -1
  104. package/TestPlan/TestPlan.d.ts +215 -18
  105. package/TestPlan/TestPlan.js +47 -1
  106. package/TestPlan/TestPlan.min.js +1 -1
  107. package/TestPlan/TestPlanClient.d.ts +48 -14
  108. package/TestPlan/TestPlanClient.js +255 -74
  109. package/TestPlan/TestPlanClient.min.js +1 -1
  110. package/TestResults/TestResultsClient.d.ts +112 -27
  111. package/TestResults/TestResultsClient.js +518 -134
  112. package/TestResults/TestResultsClient.min.js +1 -1
  113. package/Tfvc/Tfvc.d.ts +9 -1
  114. package/Tfvc/TfvcClient.d.ts +3 -2
  115. package/Tfvc/TfvcClient.js +41 -28
  116. package/Tfvc/TfvcClient.min.js +1 -1
  117. package/WebApi/WebApi.d.ts +22 -3
  118. package/Wiki/Wiki.d.ts +51 -0
  119. package/Wiki/WikiClient.d.ts +18 -0
  120. package/Wiki/WikiClient.js +71 -1
  121. package/Wiki/WikiClient.min.js +1 -1
  122. package/Work/Work.d.ts +68 -1
  123. package/Work/WorkClient.d.ts +10 -3
  124. package/Work/WorkClient.js +78 -58
  125. package/Work/WorkClient.min.js +1 -1
  126. package/WorkItemTracking/WorkItemTracking.d.ts +170 -1
  127. package/WorkItemTracking/WorkItemTrackingClient.d.ts +18 -2
  128. package/WorkItemTracking/WorkItemTrackingClient.js +107 -60
  129. package/WorkItemTracking/WorkItemTrackingClient.min.js +1 -1
  130. package/WorkItemTrackingProcess/WorkItemTrackingProcess.d.ts +15 -2
  131. package/WorkItemTrackingProcess/WorkItemTrackingProcess.js +4 -0
  132. package/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -1
  133. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.d.ts +1 -1
  134. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +58 -58
  135. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -1
  136. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.d.ts +3 -1
  137. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.d.ts +9 -1
  138. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +69 -46
  139. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -1
  140. package/package.json +3 -3
package/Git/GitClient.js CHANGED
@@ -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 GitRestClient = /** @class */ (function (_super) {
@@ -56,6 +56,71 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
56
56
  function GitRestClient(options) {
57
57
  return _super.call(this, options) || this;
58
58
  }
59
+ /**
60
+ * GET Enablement status for project's repositories.
61
+ *
62
+ * @param projectIds - Null defaults to all projects in the host, list of project's repos status to return
63
+ * @param billingDate - Null defaults to Now(), can be provided for a point in time status
64
+ * @param skip - Skip X rows of resultset to simulate paging.
65
+ * @param take - Return Y rows of resultset to simulate paging.
66
+ */
67
+ GitRestClient.prototype.getEnablementStatus = function (projectIds, billingDate, skip, take) {
68
+ return __awaiter(this, void 0, void 0, function () {
69
+ var queryValues;
70
+ return __generator(this, function (_a) {
71
+ queryValues = {
72
+ projectIds: projectIds,
73
+ '$billingDate': billingDate,
74
+ '$skip': skip,
75
+ '$take': take
76
+ };
77
+ return [2 /*return*/, this.beginRequest({
78
+ apiVersion: "7.1-preview.1",
79
+ routeTemplate: "_apis/git/advsecEnablement",
80
+ queryParams: queryValues
81
+ })];
82
+ });
83
+ });
84
+ };
85
+ /**
86
+ * POST Enablement status for repositories.
87
+ *
88
+ * @param enablementUpdates -
89
+ */
90
+ GitRestClient.prototype.updateEnablementStatus = function (enablementUpdates) {
91
+ return __awaiter(this, void 0, void 0, function () {
92
+ return __generator(this, function (_a) {
93
+ return [2 /*return*/, this.beginRequest({
94
+ apiVersion: "7.1-preview.1",
95
+ method: "POST",
96
+ routeTemplate: "_apis/git/advsecEnablement",
97
+ body: enablementUpdates
98
+ })];
99
+ });
100
+ });
101
+ };
102
+ /**
103
+ * GET Advanced Security Permission status.
104
+ *
105
+ * @param repositoryId - Repository user is trying to access
106
+ * @param permission - Permission being requestd, must be "viewAlert" "dismissAlert" or "manage"
107
+ */
108
+ GitRestClient.prototype.getPermission = function (repositoryId, permission) {
109
+ return __awaiter(this, void 0, void 0, function () {
110
+ var queryValues;
111
+ return __generator(this, function (_a) {
112
+ queryValues = {
113
+ '$repositoryId': repositoryId,
114
+ '$permission': permission
115
+ };
116
+ return [2 /*return*/, this.beginRequest({
117
+ apiVersion: "7.1-preview.1",
118
+ routeTemplate: "_apis/git/advsecPermissions",
119
+ queryParams: queryValues
120
+ })];
121
+ });
122
+ });
123
+ };
59
124
  /**
60
125
  * Create an annotated tag.
61
126
  *
@@ -67,7 +132,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
67
132
  return __awaiter(this, void 0, void 0, function () {
68
133
  return __generator(this, function (_a) {
69
134
  return [2 /*return*/, this.beginRequest({
70
- apiVersion: "5.2-preview.1",
135
+ apiVersion: "7.1-preview.1",
71
136
  method: "POST",
72
137
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/annotatedTags/{objectId}",
73
138
  routeValues: {
@@ -90,7 +155,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
90
155
  return __awaiter(this, void 0, void 0, function () {
91
156
  return __generator(this, function (_a) {
92
157
  return [2 /*return*/, this.beginRequest({
93
- apiVersion: "5.2-preview.1",
158
+ apiVersion: "7.1-preview.1",
94
159
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/annotatedTags/{objectId}",
95
160
  routeValues: {
96
161
  project: project,
@@ -101,6 +166,90 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
101
166
  });
102
167
  });
103
168
  };
169
+ /**
170
+ * Retrieve actual billable committers for Advanced Security service for a given date.
171
+ *
172
+ * @param project - Project ID or project name
173
+ * @param billingDate - If not specified defaults to the previous billing day.
174
+ * @param skip - Skip X rows of resultset to simulate paging.
175
+ * @param take - Return Y rows of resultset to simulate paging.
176
+ */
177
+ GitRestClient.prototype.getBillableCommitters = function (project, billingDate, skip, take) {
178
+ return __awaiter(this, void 0, void 0, function () {
179
+ var queryValues;
180
+ return __generator(this, function (_a) {
181
+ queryValues = {
182
+ '$billingDate': billingDate,
183
+ '$skip': skip,
184
+ '$take': take
185
+ };
186
+ return [2 /*return*/, this.beginRequest({
187
+ apiVersion: "7.1-preview.1",
188
+ routeTemplate: "{project}/_apis/git/billableCommitters",
189
+ routeValues: {
190
+ project: project
191
+ },
192
+ queryParams: queryValues
193
+ })];
194
+ });
195
+ });
196
+ };
197
+ /**
198
+ * Retrieve detailed actual billable committers for Advanced Security service for a given date.
199
+ *
200
+ * @param project - Project ID or project name
201
+ * @param includeDetails - Return all the details on the billable committers.
202
+ * @param billingDate - If not specified defaults to the previous billing day.
203
+ * @param skip - Skip X rows of resultset to simulate paging.
204
+ * @param take - Return Y rows of resultset to simulate paging.
205
+ */
206
+ GitRestClient.prototype.getBillableCommittersDetail = function (project, includeDetails, billingDate, skip, take) {
207
+ return __awaiter(this, void 0, void 0, function () {
208
+ var queryValues;
209
+ return __generator(this, function (_a) {
210
+ queryValues = {
211
+ '$includeDetails': includeDetails,
212
+ '$billingDate': billingDate,
213
+ '$skip': skip,
214
+ '$take': take
215
+ };
216
+ return [2 /*return*/, this.beginRequest({
217
+ apiVersion: "7.1-preview.1",
218
+ routeTemplate: "{project}/_apis/git/billableCommitters",
219
+ routeValues: {
220
+ project: project
221
+ },
222
+ queryParams: queryValues
223
+ })];
224
+ });
225
+ });
226
+ };
227
+ /**
228
+ * Retrieve actual billable committers for Advanced Security service for a given date.
229
+ *
230
+ * @param project - Project ID or project name
231
+ * @param estimateOnly -
232
+ * @param repositoryId -
233
+ */
234
+ GitRestClient.prototype.getEstimatedBillableCommitters = function (project, estimateOnly, repositoryId) {
235
+ return __awaiter(this, void 0, void 0, function () {
236
+ var queryValues;
237
+ return __generator(this, function (_a) {
238
+ queryValues = {
239
+ '$estimateOnly': estimateOnly,
240
+ '$repositoryId': repositoryId
241
+ };
242
+ return [2 /*return*/, this.beginRequest({
243
+ apiVersion: "7.1-preview.1",
244
+ routeTemplate: "{project}/_apis/git/billableCommitters",
245
+ routeValues: {
246
+ project: project
247
+ },
248
+ queryParams: queryValues
249
+ })];
250
+ });
251
+ });
252
+ };
104
253
  /**
105
254
  * Get a single blob.
106
255
  *
@@ -121,7 +270,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
121
270
  resolveLfs: resolveLfs
122
271
  };
123
272
  return [2 /*return*/, this.beginRequest({
124
- apiVersion: "5.2-preview.1",
273
+ apiVersion: "7.1-preview.1",
125
274
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",
126
275
  routeValues: {
127
276
  project: project,
@@ -153,7 +302,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
153
302
  resolveLfs: resolveLfs
154
303
  };
155
304
  return [2 /*return*/, this.beginRequest({
156
- apiVersion: "5.2-preview.1",
305
+ apiVersion: "7.1-preview.1",
157
306
  httpResponseType: "application/octet-stream",
158
307
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",
159
308
  routeValues: {
@@ -182,7 +331,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
182
331
  filename: filename
183
332
  };
184
333
  return [2 /*return*/, this.beginRequest({
185
- apiVersion: "5.2-preview.1",
334
+ apiVersion: "7.1-preview.1",
186
335
  method: "POST",
187
336
  httpResponseType: "application/zip",
188
337
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",
@@ -216,7 +365,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
216
365
  resolveLfs: resolveLfs
217
366
  };
218
367
  return [2 /*return*/, this.beginRequest({
219
- apiVersion: "5.2-preview.1",
368
+ apiVersion: "7.1-preview.1",
220
369
  httpResponseType: "application/zip",
221
370
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Blobs/{sha1}",
222
371
  routeValues: {
@@ -246,7 +395,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
246
395
  baseVersionDescriptor: baseVersionDescriptor
247
396
  };
248
397
  return [2 /*return*/, this.beginRequest({
249
- apiVersion: "5.2-preview.1",
398
+ apiVersion: "7.1-preview.1",
250
399
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/stats/branches",
251
400
  routeValues: {
252
401
  project: project,
@@ -272,7 +421,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
272
421
  baseVersionDescriptor: baseVersionDescriptor
273
422
  };
274
423
  return [2 /*return*/, this.beginRequest({
275
- apiVersion: "5.2-preview.1",
424
+ apiVersion: "7.1-preview.1",
276
425
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/stats/branches",
277
426
  routeValues: {
278
427
  project: project,
@@ -292,7 +441,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
292
441
  return __awaiter(this, void 0, void 0, function () {
293
442
  return __generator(this, function (_a) {
294
443
  return [2 /*return*/, this.beginRequest({
295
- apiVersion: "5.2-preview.1",
444
+ apiVersion: "7.1-preview.1",
296
445
  method: "POST",
297
446
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/stats/branches",
298
447
  routeValues: {
@@ -322,7 +471,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
322
471
  skip: skip
323
472
  };
324
473
  return [2 /*return*/, this.beginRequest({
325
- apiVersion: "5.2-preview.1",
474
+ apiVersion: "7.1-preview.1",
326
475
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Changes",
327
476
  routeValues: {
328
477
  project: project,
@@ -334,6 +483,131 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
334
483
  });
335
484
  });
336
485
  };
486
+ /**
487
+ * Retrieve one conflict for a cherry pick by ID
488
+ *
489
+ * @param repositoryId -
490
+ * @param cherryPickId -
491
+ * @param conflictId -
492
+ * @param project - Project ID or project name
493
+ */
494
+ GitRestClient.prototype.getCherryPickConflict = function (repositoryId, cherryPickId, conflictId, project) {
495
+ return __awaiter(this, void 0, void 0, function () {
496
+ return __generator(this, function (_a) {
497
+ return [2 /*return*/, this.beginRequest({
498
+ apiVersion: "7.1-preview.1",
499
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}/conflicts/{conflictId}",
500
+ routeValues: {
501
+ project: project,
502
+ repositoryId: repositoryId,
503
+ cherryPickId: cherryPickId,
504
+ conflictId: conflictId
505
+ }
506
+ })];
507
+ });
508
+ });
509
+ };
510
+ /**
511
+ * Retrieve all conflicts for a cherry pick
512
+ *
513
+ * @param repositoryId -
514
+ * @param cherryPickId -
515
+ * @param project - Project ID or project name
516
+ * @param continuationToken -
517
+ * @param top -
518
+ * @param excludeResolved -
519
+ * @param onlyResolved -
520
+ * @param includeObsolete -
521
+ */
522
+ GitRestClient.prototype.getCherryPickConflicts = function (repositoryId, cherryPickId, project, continuationToken, top, excludeResolved, onlyResolved, includeObsolete) {
523
+ return __awaiter(this, void 0, void 0, function () {
524
+ var queryValues;
525
+ var _this = this;
526
+ return __generator(this, function (_a) {
527
+ queryValues = {
528
+ continuationToken: continuationToken,
529
+ '$top': top,
530
+ excludeResolved: excludeResolved,
531
+ onlyResolved: onlyResolved,
532
+ includeObsolete: includeObsolete
533
+ };
534
+ return [2 /*return*/, this.beginRequest({
535
+ apiVersion: "7.1-preview.1",
536
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}/conflicts/{conflictId}",
537
+ routeValues: {
538
+ project: project,
539
+ repositoryId: repositoryId,
540
+ cherryPickId: cherryPickId
541
+ },
542
+ queryParams: queryValues,
543
+ returnRawResponse: true
544
+ }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
545
+ var body;
546
+ return __generator(this, function (_a) {
547
+ switch (_a.label) {
548
+ case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
549
+ case 1:
550
+ body = _a.sent();
551
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
552
+ return [2 /*return*/, body];
553
+ }
554
+ });
555
+ }); })];
556
+ });
557
+ });
558
+ };
559
+ /**
560
+ * Update merge conflict resolution
561
+ *
562
+ * @param conflict -
563
+ * @param repositoryId -
564
+ * @param cherryPickId -
565
+ * @param conflictId -
566
+ * @param project - Project ID or project name
567
+ */
568
+ GitRestClient.prototype.updateCherryPickConflict = function (conflict, repositoryId, cherryPickId, conflictId, project) {
569
+ return __awaiter(this, void 0, void 0, function () {
570
+ return __generator(this, function (_a) {
571
+ return [2 /*return*/, this.beginRequest({
572
+ apiVersion: "7.1-preview.1",
573
+ method: "PATCH",
574
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}/conflicts/{conflictId}",
575
+ routeValues: {
576
+ project: project,
577
+ repositoryId: repositoryId,
578
+ cherryPickId: cherryPickId,
579
+ conflictId: conflictId
580
+ },
581
+ body: conflict
582
+ })];
583
+ });
584
+ });
585
+ };
586
+ /**
587
+ * Update multiple merge conflict resolutions
588
+ *
589
+ * @param conflictUpdates -
590
+ * @param repositoryId -
591
+ * @param cherryPickId -
592
+ * @param project - Project ID or project name
593
+ */
594
+ GitRestClient.prototype.updateCherryPickConflicts = function (conflictUpdates, repositoryId, cherryPickId, project) {
595
+ return __awaiter(this, void 0, void 0, function () {
596
+ return __generator(this, function (_a) {
597
+ return [2 /*return*/, this.beginRequest({
598
+ apiVersion: "7.1-preview.1",
599
+ method: "PATCH",
600
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}/conflicts/{conflictId}",
601
+ routeValues: {
602
+ project: project,
603
+ repositoryId: repositoryId,
604
+ cherryPickId: cherryPickId
605
+ },
606
+ body: conflictUpdates
607
+ })];
608
+ });
609
+ });
610
+ };
337
611
  /**
338
612
  * Given a commitId, returns a list of commits that are in the same cherry-pick family.
339
613
  *
@@ -350,7 +624,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
350
624
  includeLinks: includeLinks
351
625
  };
352
626
  return [2 /*return*/, this.beginRequest({
353
- apiVersion: "5.2-preview.1",
627
+ apiVersion: "7.1-preview.1",
354
628
  routeTemplate: "{project}/_apis/git/repositories/{repositoryNameOrId}/cherryPickRelationships/{commitId}",
355
629
  routeValues: {
356
630
  project: project,
@@ -373,7 +647,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
373
647
  return __awaiter(this, void 0, void 0, function () {
374
648
  return __generator(this, function (_a) {
375
649
  return [2 /*return*/, this.beginRequest({
376
- apiVersion: "5.2-preview.1",
650
+ apiVersion: "7.1-preview.1",
377
651
  method: "POST",
378
652
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}",
379
653
  routeValues: {
@@ -386,7 +660,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
386
660
  });
387
661
  };
388
662
  /**
389
- * Retrieve information about a cherry pick by cherry pick Id.
663
+ * Retrieve information about a cherry pick operation by cherry pick Id.
390
664
  *
391
665
  * @param project - Project ID or project name
392
666
  * @param cherryPickId - ID of the cherry pick.
@@ -396,7 +670,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
396
670
  return __awaiter(this, void 0, void 0, function () {
397
671
  return __generator(this, function (_a) {
398
672
  return [2 /*return*/, this.beginRequest({
399
- apiVersion: "5.2-preview.1",
673
+ apiVersion: "7.1-preview.1",
400
674
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}",
401
675
  routeValues: {
402
676
  project: project,
@@ -408,7 +682,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
408
682
  });
409
683
  };
410
684
  /**
411
- * Retrieve information about a cherry pick for a specific branch.
685
+ * Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations.
412
686
  *
413
687
  * @param project - Project ID or project name
414
688
  * @param repositoryId - ID of the repository.
@@ -422,7 +696,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
422
696
  refName: refName
423
697
  };
424
698
  return [2 /*return*/, this.beginRequest({
425
- apiVersion: "5.2-preview.1",
699
+ apiVersion: "7.1-preview.1",
426
700
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/cherryPicks/{cherryPickId}",
427
701
  routeValues: {
428
702
  project: project,
@@ -452,11 +726,19 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
452
726
  diffCommonCommit: diffCommonCommit,
453
727
  '$top': top,
454
728
  '$skip': skip,
455
- baseVersionDescriptor: baseVersionDescriptor,
456
- targetVersionDescriptor: targetVersionDescriptor
457
729
  };
458
- return [2 /*return*/, this.beginRequest({
459
- apiVersion: "5.2-preview.1",
730
+ if (baseVersionDescriptor) {
731
+ queryValues.baseVersionType = baseVersionDescriptor.versionType;
732
+ queryValues.baseVersion = baseVersionDescriptor.version;
733
+ queryValues.baseVersionOptions = baseVersionDescriptor.versionOptions;
734
+ }
735
+ if (targetVersionDescriptor) {
736
+ queryValues.targetVersionType = targetVersionDescriptor.versionType;
737
+ queryValues.targetVersion = targetVersionDescriptor.version;
738
+ queryValues.targetVersionOptions = targetVersionDescriptor.versionOptions;
739
+ }
740
+ return [2 /*return*/, this.beginRequest({
741
+ apiVersion: "7.1-preview.1",
460
742
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/diffs/commits",
461
743
  routeValues: {
462
744
  project: project,
@@ -483,7 +765,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
483
765
  changeCount: changeCount
484
766
  };
485
767
  return [2 /*return*/, this.beginRequest({
486
- apiVersion: "5.2-preview.1",
768
+ apiVersion: "7.1-preview.1",
487
769
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}",
488
770
  routeValues: {
489
771
  project: project,
@@ -510,7 +792,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
510
792
  searchCriteria: searchCriteria
511
793
  };
512
794
  return [2 /*return*/, this.beginRequest({
513
- apiVersion: "5.2-preview.1",
795
+ apiVersion: "7.1-preview.1",
514
796
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}",
515
797
  routeValues: {
516
798
  project: project,
@@ -542,7 +824,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
542
824
  includeLinks: includeLinks
543
825
  };
544
826
  return [2 /*return*/, this.beginRequest({
545
- apiVersion: "5.2-preview.1",
827
+ apiVersion: "7.1-preview.1",
546
828
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Commits/{commitId}",
547
829
  routeValues: {
548
830
  project: project,
@@ -573,7 +855,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
573
855
  includeStatuses: includeStatuses
574
856
  };
575
857
  return [2 /*return*/, this.beginRequest({
576
- apiVersion: "5.2-preview.1",
858
+ apiVersion: "7.1-preview.1",
577
859
  method: "POST",
578
860
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/CommitsBatch",
579
861
  routeValues: {
@@ -595,7 +877,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
595
877
  return __awaiter(this, void 0, void 0, function () {
596
878
  return __generator(this, function (_a) {
597
879
  return [2 /*return*/, this.beginRequest({
598
- apiVersion: "5.2-preview.1",
880
+ apiVersion: "7.1-preview.1",
599
881
  routeTemplate: "{project}/_apis/git/DeletedRepositories",
600
882
  routeValues: {
601
883
  project: project
@@ -615,7 +897,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
615
897
  return __awaiter(this, void 0, void 0, function () {
616
898
  return __generator(this, function (_a) {
617
899
  return [2 /*return*/, this.beginRequest({
618
- apiVersion: "5.2-preview.1",
900
+ apiVersion: "7.1-preview.1",
619
901
  method: "POST",
620
902
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/FileDiffs",
621
903
  routeValues: {
@@ -643,7 +925,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
643
925
  includeLinks: includeLinks
644
926
  };
645
927
  return [2 /*return*/, this.beginRequest({
646
- apiVersion: "5.2-preview.1",
928
+ apiVersion: "7.1-preview.1",
647
929
  routeTemplate: "{project}/_apis/git/repositories/{repositoryNameOrId}/forks/{collectionId}",
648
930
  routeValues: {
649
931
  project: project,
@@ -671,7 +953,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
671
953
  includeLinks: includeLinks
672
954
  };
673
955
  return [2 /*return*/, this.beginRequest({
674
- apiVersion: "5.2-preview.1",
956
+ apiVersion: "7.1-preview.1",
675
957
  method: "POST",
676
958
  routeTemplate: "{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}",
677
959
  routeValues: {
@@ -700,7 +982,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
700
982
  includeLinks: includeLinks
701
983
  };
702
984
  return [2 /*return*/, this.beginRequest({
703
- apiVersion: "5.2-preview.1",
985
+ apiVersion: "7.1-preview.1",
704
986
  routeTemplate: "{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}",
705
987
  routeValues: {
706
988
  project: project,
@@ -729,7 +1011,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
729
1011
  includeLinks: includeLinks
730
1012
  };
731
1013
  return [2 /*return*/, this.beginRequest({
732
- apiVersion: "5.2-preview.1",
1014
+ apiVersion: "7.1-preview.1",
733
1015
  routeTemplate: "{project}/_apis/git/repositories/{repositoryNameOrId}/forkSyncRequests/{forkSyncOperationId}",
734
1016
  routeValues: {
735
1017
  project: project,
@@ -751,7 +1033,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
751
1033
  return __awaiter(this, void 0, void 0, function () {
752
1034
  return __generator(this, function (_a) {
753
1035
  return [2 /*return*/, this.beginRequest({
754
- apiVersion: "5.2-preview.1",
1036
+ apiVersion: "7.1-preview.1",
755
1037
  method: "POST",
756
1038
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",
757
1039
  routeValues: {
@@ -774,7 +1056,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
774
1056
  return __awaiter(this, void 0, void 0, function () {
775
1057
  return __generator(this, function (_a) {
776
1058
  return [2 /*return*/, this.beginRequest({
777
- apiVersion: "5.2-preview.1",
1059
+ apiVersion: "7.1-preview.1",
778
1060
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",
779
1061
  routeValues: {
780
1062
  project: project,
@@ -800,7 +1082,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
800
1082
  includeAbandoned: includeAbandoned
801
1083
  };
802
1084
  return [2 /*return*/, this.beginRequest({
803
- apiVersion: "5.2-preview.1",
1085
+ apiVersion: "7.1-preview.1",
804
1086
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",
805
1087
  routeValues: {
806
1088
  project: project,
@@ -823,7 +1105,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
823
1105
  return __awaiter(this, void 0, void 0, function () {
824
1106
  return __generator(this, function (_a) {
825
1107
  return [2 /*return*/, this.beginRequest({
826
- apiVersion: "5.2-preview.1",
1108
+ apiVersion: "7.1-preview.1",
827
1109
  method: "PATCH",
828
1110
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/importRequests/{importRequestId}",
829
1111
  routeValues: {
@@ -850,8 +1132,9 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
850
1132
  * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
851
1133
  * @param includeContent - Set to true to include item content when requesting json. Default is false.
852
1134
  * @param resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
1135
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
853
1136
  */
854
- GitRestClient.prototype.getItem = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs) {
1137
+ GitRestClient.prototype.getItem = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) {
855
1138
  return __awaiter(this, void 0, void 0, function () {
856
1139
  var queryValues;
857
1140
  return __generator(this, function (_a) {
@@ -864,10 +1147,11 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
864
1147
  download: download,
865
1148
  versionDescriptor: versionDescriptor,
866
1149
  includeContent: includeContent,
867
- resolveLfs: resolveLfs
1150
+ resolveLfs: resolveLfs,
1151
+ sanitize: sanitize
868
1152
  };
869
1153
  return [2 /*return*/, this.beginRequest({
870
- apiVersion: "5.2-preview.1",
1154
+ apiVersion: "7.1-preview.1",
871
1155
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",
872
1156
  routeValues: {
873
1157
  project: project,
@@ -892,8 +1176,9 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
892
1176
  * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
893
1177
  * @param includeContent - Set to true to include item content when requesting json. Default is false.
894
1178
  * @param resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
1179
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
895
1180
  */
896
- GitRestClient.prototype.getItemContent = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs) {
1181
+ GitRestClient.prototype.getItemContent = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) {
897
1182
  return __awaiter(this, void 0, void 0, function () {
898
1183
  var queryValues;
899
1184
  return __generator(this, function (_a) {
@@ -906,10 +1191,11 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
906
1191
  download: download,
907
1192
  versionDescriptor: versionDescriptor,
908
1193
  includeContent: includeContent,
909
- resolveLfs: resolveLfs
1194
+ resolveLfs: resolveLfs,
1195
+ sanitize: sanitize
910
1196
  };
911
1197
  return [2 /*return*/, this.beginRequest({
912
- apiVersion: "5.2-preview.1",
1198
+ apiVersion: "7.1-preview.1",
913
1199
  httpResponseType: "application/octet-stream",
914
1200
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",
915
1201
  routeValues: {
@@ -933,8 +1219,9 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
933
1219
  * @param download - Set to true to download the response as a file. Default is false.
934
1220
  * @param includeLinks - Set to true to include links to items. Default is false.
935
1221
  * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
1222
+ * @param zipForUnix - Set to true to keep the file permissions for unix (and POSIX) systems like executables and symlinks
936
1223
  */
937
- GitRestClient.prototype.getItems = function (repositoryId, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, versionDescriptor) {
1224
+ GitRestClient.prototype.getItems = function (repositoryId, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, versionDescriptor, zipForUnix) {
938
1225
  return __awaiter(this, void 0, void 0, function () {
939
1226
  var queryValues;
940
1227
  return __generator(this, function (_a) {
@@ -945,10 +1232,11 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
945
1232
  latestProcessedChange: latestProcessedChange,
946
1233
  download: download,
947
1234
  includeLinks: includeLinks,
948
- versionDescriptor: versionDescriptor
1235
+ versionDescriptor: versionDescriptor,
1236
+ zipForUnix: zipForUnix
949
1237
  };
950
1238
  return [2 /*return*/, this.beginRequest({
951
- apiVersion: "5.2-preview.1",
1239
+ apiVersion: "7.1-preview.1",
952
1240
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",
953
1241
  routeValues: {
954
1242
  project: project,
@@ -973,8 +1261,9 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
973
1261
  * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
974
1262
  * @param includeContent - Set to true to include item content when requesting json. Default is false.
975
1263
  * @param resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
1264
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
976
1265
  */
977
- GitRestClient.prototype.getItemText = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs) {
1266
+ GitRestClient.prototype.getItemText = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) {
978
1267
  return __awaiter(this, void 0, void 0, function () {
979
1268
  var queryValues;
980
1269
  return __generator(this, function (_a) {
@@ -987,10 +1276,11 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
987
1276
  download: download,
988
1277
  versionDescriptor: versionDescriptor,
989
1278
  includeContent: includeContent,
990
- resolveLfs: resolveLfs
1279
+ resolveLfs: resolveLfs,
1280
+ sanitize: sanitize
991
1281
  };
992
1282
  return [2 /*return*/, this.beginRequest({
993
- apiVersion: "5.2-preview.1",
1283
+ apiVersion: "7.1-preview.1",
994
1284
  httpResponseType: "text/plain",
995
1285
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",
996
1286
  routeValues: {
@@ -1016,8 +1306,9 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1016
1306
  * @param versionDescriptor - Version descriptor. Default is the default branch for the repository.
1017
1307
  * @param includeContent - Set to true to include item content when requesting json. Default is false.
1018
1308
  * @param resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false.
1309
+ * @param sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false.
1019
1310
  */
1020
- GitRestClient.prototype.getItemZip = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs) {
1311
+ GitRestClient.prototype.getItemZip = function (repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) {
1021
1312
  return __awaiter(this, void 0, void 0, function () {
1022
1313
  var queryValues;
1023
1314
  return __generator(this, function (_a) {
@@ -1030,10 +1321,11 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1030
1321
  download: download,
1031
1322
  versionDescriptor: versionDescriptor,
1032
1323
  includeContent: includeContent,
1033
- resolveLfs: resolveLfs
1324
+ resolveLfs: resolveLfs,
1325
+ sanitize: sanitize
1034
1326
  };
1035
1327
  return [2 /*return*/, this.beginRequest({
1036
- apiVersion: "5.2-preview.1",
1328
+ apiVersion: "7.1-preview.1",
1037
1329
  httpResponseType: "application/zip",
1038
1330
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Items/{*path}",
1039
1331
  routeValues: {
@@ -1056,7 +1348,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1056
1348
  return __awaiter(this, void 0, void 0, function () {
1057
1349
  return __generator(this, function (_a) {
1058
1350
  return [2 /*return*/, this.beginRequest({
1059
- apiVersion: "5.2-preview.1",
1351
+ apiVersion: "7.1-preview.1",
1060
1352
  method: "POST",
1061
1353
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/ItemsBatch",
1062
1354
  routeValues: {
@@ -1088,7 +1380,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1088
1380
  otherRepositoryId: otherRepositoryId
1089
1381
  };
1090
1382
  return [2 /*return*/, this.beginRequest({
1091
- apiVersion: "5.2-preview.1",
1383
+ apiVersion: "7.1-preview.1",
1092
1384
  routeTemplate: "{project}/_apis/git/repositories/{repositoryNameOrId}/commits/{commitId}/mergeBases",
1093
1385
  routeValues: {
1094
1386
  project: project,
@@ -1116,7 +1408,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1116
1408
  includeLinks: includeLinks
1117
1409
  };
1118
1410
  return [2 /*return*/, this.beginRequest({
1119
- apiVersion: "5.2-preview.1",
1411
+ apiVersion: "7.1-preview.1",
1120
1412
  method: "POST",
1121
1413
  routeTemplate: "{project}/_apis/git/repositories/{repositoryNameOrId}/merges/{mergeOperationId}",
1122
1414
  routeValues: {
@@ -1145,7 +1437,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1145
1437
  includeLinks: includeLinks
1146
1438
  };
1147
1439
  return [2 /*return*/, this.beginRequest({
1148
- apiVersion: "5.2-preview.1",
1440
+ apiVersion: "7.1-preview.1",
1149
1441
  routeTemplate: "{project}/_apis/git/repositories/{repositoryNameOrId}/merges/{mergeOperationId}",
1150
1442
  routeValues: {
1151
1443
  project: project,
@@ -1170,7 +1462,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1170
1462
  return __awaiter(this, void 0, void 0, function () {
1171
1463
  return __generator(this, function (_a) {
1172
1464
  return [2 /*return*/, this.beginRequest({
1173
- apiVersion: "5.2-preview.1",
1465
+ apiVersion: "7.1-preview.1",
1174
1466
  method: "POST",
1175
1467
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",
1176
1468
  routeValues: {
@@ -1200,7 +1492,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1200
1492
  return __awaiter(this, void 0, void 0, function () {
1201
1493
  return __generator(this, function (_a) {
1202
1494
  return [2 /*return*/, this.beginRequest({
1203
- apiVersion: "5.2-preview.1",
1495
+ apiVersion: "7.1-preview.1",
1204
1496
  method: "DELETE",
1205
1497
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",
1206
1498
  routeValues: {
@@ -1225,7 +1517,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1225
1517
  return __awaiter(this, void 0, void 0, function () {
1226
1518
  return __generator(this, function (_a) {
1227
1519
  return [2 /*return*/, this.beginRequest({
1228
- apiVersion: "5.2-preview.1",
1520
+ apiVersion: "7.1-preview.1",
1229
1521
  httpResponseType: "application/octet-stream",
1230
1522
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",
1231
1523
  routeValues: {
@@ -1249,7 +1541,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1249
1541
  return __awaiter(this, void 0, void 0, function () {
1250
1542
  return __generator(this, function (_a) {
1251
1543
  return [2 /*return*/, this.beginRequest({
1252
- apiVersion: "5.2-preview.1",
1544
+ apiVersion: "7.1-preview.1",
1253
1545
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",
1254
1546
  routeValues: {
1255
1547
  project: project,
@@ -1272,7 +1564,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1272
1564
  return __awaiter(this, void 0, void 0, function () {
1273
1565
  return __generator(this, function (_a) {
1274
1566
  return [2 /*return*/, this.beginRequest({
1275
- apiVersion: "5.2-preview.1",
1567
+ apiVersion: "7.1-preview.1",
1276
1568
  httpResponseType: "application/zip",
1277
1569
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/attachments/{fileName}",
1278
1570
  routeValues: {
@@ -1298,7 +1590,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1298
1590
  return __awaiter(this, void 0, void 0, function () {
1299
1591
  return __generator(this, function (_a) {
1300
1592
  return [2 /*return*/, this.beginRequest({
1301
- apiVersion: "5.2-preview.1",
1593
+ apiVersion: "7.1-preview.1",
1302
1594
  method: "POST",
1303
1595
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes",
1304
1596
  routeValues: {
@@ -1325,7 +1617,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1325
1617
  return __awaiter(this, void 0, void 0, function () {
1326
1618
  return __generator(this, function (_a) {
1327
1619
  return [2 /*return*/, this.beginRequest({
1328
- apiVersion: "5.2-preview.1",
1620
+ apiVersion: "7.1-preview.1",
1329
1621
  method: "DELETE",
1330
1622
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes",
1331
1623
  routeValues: {
@@ -1352,7 +1644,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1352
1644
  return __awaiter(this, void 0, void 0, function () {
1353
1645
  return __generator(this, function (_a) {
1354
1646
  return [2 /*return*/, this.beginRequest({
1355
- apiVersion: "5.2-preview.1",
1647
+ apiVersion: "7.1-preview.1",
1356
1648
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}/likes",
1357
1649
  routeValues: {
1358
1650
  project: project,
@@ -1384,7 +1676,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1384
1676
  skip: skip
1385
1677
  };
1386
1678
  return [2 /*return*/, this.beginRequest({
1387
- apiVersion: "5.2-preview.1",
1679
+ apiVersion: "7.1-preview.1",
1388
1680
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/commits",
1389
1681
  routeValues: {
1390
1682
  project: project,
@@ -1406,16 +1698,29 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1406
1698
  */
1407
1699
  GitRestClient.prototype.getPullRequestCommits = function (repositoryId, pullRequestId, project) {
1408
1700
  return __awaiter(this, void 0, void 0, function () {
1701
+ var _this = this;
1409
1702
  return __generator(this, function (_a) {
1410
1703
  return [2 /*return*/, this.beginRequest({
1411
- apiVersion: "5.2-preview.1",
1704
+ apiVersion: "7.1-preview.1",
1412
1705
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/commits",
1413
1706
  routeValues: {
1414
1707
  project: project,
1415
1708
  repositoryId: repositoryId,
1416
1709
  pullRequestId: pullRequestId
1417
- }
1418
- })];
1710
+ },
1711
+ returnRawResponse: true
1712
+ }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
1713
+ var body;
1714
+ return __generator(this, function (_a) {
1715
+ switch (_a.label) {
1716
+ case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
1717
+ case 1:
1718
+ body = _a.sent();
1719
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
1720
+ return [2 /*return*/, body];
1721
+ }
1722
+ });
1723
+ }); })];
1419
1724
  });
1420
1725
  });
1421
1726
  };
@@ -1431,7 +1736,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1431
1736
  return __awaiter(this, void 0, void 0, function () {
1432
1737
  return __generator(this, function (_a) {
1433
1738
  return [2 /*return*/, this.beginRequest({
1434
- apiVersion: "5.2-preview.1",
1739
+ apiVersion: "7.1-preview.1",
1435
1740
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",
1436
1741
  routeValues: {
1437
1742
  project: project,
@@ -1446,14 +1751,14 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1446
1751
  /**
1447
1752
  * Retrieve all conflicts for a pull request
1448
1753
  *
1449
- * @param repositoryId -
1450
- * @param pullRequestId -
1754
+ * @param repositoryId - The repository of the Pull Request.
1755
+ * @param pullRequestId - The pull request ID.
1451
1756
  * @param project - Project ID or project name
1452
- * @param skip -
1453
- * @param top -
1454
- * @param includeObsolete -
1455
- * @param excludeResolved -
1456
- * @param onlyResolved -
1757
+ * @param skip - Conflicts to skip.
1758
+ * @param top - Conflicts to return after skip.
1759
+ * @param includeObsolete - Includes obsolete conflicts.
1760
+ * @param excludeResolved - Excludes conflicts already resolved.
1761
+ * @param onlyResolved - Returns only the conflicts that are resolved.
1457
1762
  */
1458
1763
  GitRestClient.prototype.getPullRequestConflicts = function (repositoryId, pullRequestId, project, skip, top, includeObsolete, excludeResolved, onlyResolved) {
1459
1764
  return __awaiter(this, void 0, void 0, function () {
@@ -1467,7 +1772,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1467
1772
  onlyResolved: onlyResolved
1468
1773
  };
1469
1774
  return [2 /*return*/, this.beginRequest({
1470
- apiVersion: "5.2-preview.1",
1775
+ apiVersion: "7.1-preview.1",
1471
1776
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",
1472
1777
  routeValues: {
1473
1778
  project: project,
@@ -1492,7 +1797,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1492
1797
  return __awaiter(this, void 0, void 0, function () {
1493
1798
  return __generator(this, function (_a) {
1494
1799
  return [2 /*return*/, this.beginRequest({
1495
- apiVersion: "5.2-preview.1",
1800
+ apiVersion: "7.1-preview.1",
1496
1801
  method: "PATCH",
1497
1802
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",
1498
1803
  routeValues: {
@@ -1518,7 +1823,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1518
1823
  return __awaiter(this, void 0, void 0, function () {
1519
1824
  return __generator(this, function (_a) {
1520
1825
  return [2 /*return*/, this.beginRequest({
1521
- apiVersion: "5.2-preview.1",
1826
+ apiVersion: "7.1-preview.1",
1522
1827
  method: "PATCH",
1523
1828
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/conflicts/{conflictId}",
1524
1829
  routeValues: {
@@ -1536,7 +1841,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1536
1841
  *
1537
1842
  * @param repositoryId - The repository ID of the pull request's target branch.
1538
1843
  * @param pullRequestId - ID of the pull request.
1539
- * @param iterationId - ID of the pull request iteration. \<br /\> Iteration IDs are zero-based with zero indicating the common commit between the source and target branches. Iteration one is the head of the source branch at the time the pull request is created and subsequent iterations are created when there are pushes to the source branch.
1844
+ * @param iterationId - ID of the pull request iteration. \<br /\> Iteration one is the head of the source branch at the time the pull request is created and subsequent iterations are created when there are pushes to the source branch. Allowed values are between 1 and the maximum iteration on this pull request.
1540
1845
  * @param project - Project ID or project name
1541
1846
  * @param top - Optional. The number of changes to retrieve. The default value is 100 and the maximum value is 2000.
1542
1847
  * @param skip - Optional. The number of changes to ignore. For example, to retrieve changes 101-150, set top 50 and skip to 100.
@@ -1552,7 +1857,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1552
1857
  '$compareTo': compareTo
1553
1858
  };
1554
1859
  return [2 /*return*/, this.beginRequest({
1555
- apiVersion: "5.2-preview.1",
1860
+ apiVersion: "7.1-preview.1",
1556
1861
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/changes",
1557
1862
  routeValues: {
1558
1863
  project: project,
@@ -1577,7 +1882,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1577
1882
  return __awaiter(this, void 0, void 0, function () {
1578
1883
  return __generator(this, function (_a) {
1579
1884
  return [2 /*return*/, this.beginRequest({
1580
- apiVersion: "5.2-preview.1",
1885
+ apiVersion: "7.1-preview.2",
1581
1886
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}",
1582
1887
  routeValues: {
1583
1888
  project: project,
@@ -1605,7 +1910,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1605
1910
  includeCommits: includeCommits
1606
1911
  };
1607
1912
  return [2 /*return*/, this.beginRequest({
1608
- apiVersion: "5.2-preview.1",
1913
+ apiVersion: "7.1-preview.2",
1609
1914
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}",
1610
1915
  routeValues: {
1611
1916
  project: project,
@@ -1630,7 +1935,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1630
1935
  return __awaiter(this, void 0, void 0, function () {
1631
1936
  return __generator(this, function (_a) {
1632
1937
  return [2 /*return*/, this.beginRequest({
1633
- apiVersion: "5.2-preview.1",
1938
+ apiVersion: "7.1-preview.1",
1634
1939
  method: "POST",
1635
1940
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",
1636
1941
  routeValues: {
@@ -1657,7 +1962,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1657
1962
  return __awaiter(this, void 0, void 0, function () {
1658
1963
  return __generator(this, function (_a) {
1659
1964
  return [2 /*return*/, this.beginRequest({
1660
- apiVersion: "5.2-preview.1",
1965
+ apiVersion: "7.1-preview.1",
1661
1966
  method: "DELETE",
1662
1967
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",
1663
1968
  routeValues: {
@@ -1684,7 +1989,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1684
1989
  return __awaiter(this, void 0, void 0, function () {
1685
1990
  return __generator(this, function (_a) {
1686
1991
  return [2 /*return*/, this.beginRequest({
1687
- apiVersion: "5.2-preview.1",
1992
+ apiVersion: "7.1-preview.1",
1688
1993
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",
1689
1994
  routeValues: {
1690
1995
  project: project,
@@ -1709,7 +2014,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1709
2014
  return __awaiter(this, void 0, void 0, function () {
1710
2015
  return __generator(this, function (_a) {
1711
2016
  return [2 /*return*/, this.beginRequest({
1712
- apiVersion: "5.2-preview.1",
2017
+ apiVersion: "7.1-preview.1",
1713
2018
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",
1714
2019
  routeValues: {
1715
2020
  project: project,
@@ -1734,7 +2039,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1734
2039
  return __awaiter(this, void 0, void 0, function () {
1735
2040
  return __generator(this, function (_a) {
1736
2041
  return [2 /*return*/, this.beginRequest({
1737
- apiVersion: "5.2-preview.1",
2042
+ apiVersion: "7.1-preview.1",
1738
2043
  method: "PATCH",
1739
2044
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/iterations/{iterationId}/statuses/{statusId}",
1740
2045
  routeValues: {
@@ -1768,7 +2073,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1768
2073
  projectId: projectId
1769
2074
  };
1770
2075
  return [2 /*return*/, this.beginRequest({
1771
- apiVersion: "5.2-preview.1",
2076
+ apiVersion: "7.1-preview.1",
1772
2077
  method: "POST",
1773
2078
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",
1774
2079
  routeValues: {
@@ -1799,7 +2104,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1799
2104
  projectId: projectId
1800
2105
  };
1801
2106
  return [2 /*return*/, this.beginRequest({
1802
- apiVersion: "5.2-preview.1",
2107
+ apiVersion: "7.1-preview.1",
1803
2108
  method: "DELETE",
1804
2109
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",
1805
2110
  routeValues: {
@@ -1830,7 +2135,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1830
2135
  projectId: projectId
1831
2136
  };
1832
2137
  return [2 /*return*/, this.beginRequest({
1833
- apiVersion: "5.2-preview.1",
2138
+ apiVersion: "7.1-preview.1",
1834
2139
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",
1835
2140
  routeValues: {
1836
2141
  project: project,
@@ -1859,7 +2164,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1859
2164
  projectId: projectId
1860
2165
  };
1861
2166
  return [2 /*return*/, this.beginRequest({
1862
- apiVersion: "5.2-preview.1",
2167
+ apiVersion: "7.1-preview.1",
1863
2168
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/labels/{labelIdOrName}",
1864
2169
  routeValues: {
1865
2170
  project: project,
@@ -1882,7 +2187,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1882
2187
  return __awaiter(this, void 0, void 0, function () {
1883
2188
  return __generator(this, function (_a) {
1884
2189
  return [2 /*return*/, this.beginRequest({
1885
- apiVersion: "5.2-preview.1",
2190
+ apiVersion: "7.1-preview.1",
1886
2191
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties",
1887
2192
  routeValues: {
1888
2193
  project: project,
@@ -1905,7 +2210,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1905
2210
  return __awaiter(this, void 0, void 0, function () {
1906
2211
  return __generator(this, function (_a) {
1907
2212
  return [2 /*return*/, this.beginRequest({
1908
- apiVersion: "5.2-preview.1",
2213
+ apiVersion: "7.1-preview.1",
1909
2214
  method: "PATCH",
1910
2215
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/properties",
1911
2216
  routeValues: {
@@ -1932,7 +2237,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1932
2237
  return __awaiter(this, void 0, void 0, function () {
1933
2238
  return __generator(this, function (_a) {
1934
2239
  return [2 /*return*/, this.beginRequest({
1935
- apiVersion: "5.2-preview.1",
2240
+ apiVersion: "7.1-preview.1",
1936
2241
  method: "POST",
1937
2242
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/PullRequestQuery",
1938
2243
  routeValues: {
@@ -1948,7 +2253,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1948
2253
  * Add a reviewer to a pull request or cast a vote.
1949
2254
  *
1950
2255
  * @param reviewer - Reviewer's vote.\<br /\>If the reviewer's ID is included here, it must match the reviewerID parameter.\<br /\>Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero.
1951
- * @param repositoryId - The repository ID of the pull request’s target branch.
2256
+ * @param repositoryId - The repository ID of the pull request's target branch.
1952
2257
  * @param pullRequestId - ID of the pull request.
1953
2258
  * @param reviewerId - ID of the reviewer.
1954
2259
  * @param project - Project ID or project name
@@ -1957,7 +2262,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1957
2262
  return __awaiter(this, void 0, void 0, function () {
1958
2263
  return __generator(this, function (_a) {
1959
2264
  return [2 /*return*/, this.beginRequest({
1960
- apiVersion: "5.2-preview.1",
2265
+ apiVersion: "7.1-preview.1",
1961
2266
  method: "PUT",
1962
2267
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",
1963
2268
  routeValues: {
@@ -1975,7 +2280,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1975
2280
  * Add reviewers to a pull request.
1976
2281
  *
1977
2282
  * @param reviewers - Reviewers to add to the pull request.
1978
- * @param repositoryId - The repository ID of the pull request’s target branch.
2283
+ * @param repositoryId - The repository ID of the pull request's target branch.
1979
2284
  * @param pullRequestId - ID of the pull request.
1980
2285
  * @param project - Project ID or project name
1981
2286
  */
@@ -1983,7 +2288,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1983
2288
  return __awaiter(this, void 0, void 0, function () {
1984
2289
  return __generator(this, function (_a) {
1985
2290
  return [2 /*return*/, this.beginRequest({
1986
- apiVersion: "5.2-preview.1",
2291
+ apiVersion: "7.1-preview.1",
1987
2292
  method: "POST",
1988
2293
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",
1989
2294
  routeValues: {
@@ -1996,10 +2301,35 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
1996
2301
  });
1997
2302
  });
1998
2303
  };
2304
+ /**
2305
+ * Add an unmaterialized identity to the reviewers of a pull request.
2306
+ *
2307
+ * @param reviewer - Reviewer to add to the pull request.
2308
+ * @param repositoryId - The repository ID of the pull request's target branch.
2309
+ * @param pullRequestId - ID of the pull request.
2310
+ * @param project - Project ID or project name
2311
+ */
2312
+ GitRestClient.prototype.createUnmaterializedPullRequestReviewer = function (reviewer, repositoryId, pullRequestId, project) {
2313
+ return __awaiter(this, void 0, void 0, function () {
2314
+ return __generator(this, function (_a) {
2315
+ return [2 /*return*/, this.beginRequest({
2316
+ apiVersion: "7.1-preview.1",
2317
+ method: "PUT",
2318
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",
2319
+ routeValues: {
2320
+ project: project,
2321
+ repositoryId: repositoryId,
2322
+ pullRequestId: pullRequestId
2323
+ },
2324
+ body: reviewer
2325
+ })];
2326
+ });
2327
+ });
2328
+ };
1999
2329
  /**
2000
2330
  * Remove a reviewer from a pull request.
2001
2331
  *
2002
- * @param repositoryId - The repository ID of the pull request’s target branch.
2332
+ * @param repositoryId - The repository ID of the pull request's target branch.
2003
2333
  * @param pullRequestId - ID of the pull request.
2004
2334
  * @param reviewerId - ID of the reviewer to remove.
2005
2335
  * @param project - Project ID or project name
@@ -2008,7 +2338,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2008
2338
  return __awaiter(this, void 0, void 0, function () {
2009
2339
  return __generator(this, function (_a) {
2010
2340
  return [2 /*return*/, this.beginRequest({
2011
- apiVersion: "5.2-preview.1",
2341
+ apiVersion: "7.1-preview.1",
2012
2342
  method: "DELETE",
2013
2343
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",
2014
2344
  routeValues: {
@@ -2024,7 +2354,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2024
2354
  /**
2025
2355
  * Retrieve information about a particular reviewer on a pull request
2026
2356
  *
2027
- * @param repositoryId - The repository ID of the pull request’s target branch.
2357
+ * @param repositoryId - The repository ID of the pull request's target branch.
2028
2358
  * @param pullRequestId - ID of the pull request.
2029
2359
  * @param reviewerId - ID of the reviewer.
2030
2360
  * @param project - Project ID or project name
@@ -2033,7 +2363,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2033
2363
  return __awaiter(this, void 0, void 0, function () {
2034
2364
  return __generator(this, function (_a) {
2035
2365
  return [2 /*return*/, this.beginRequest({
2036
- apiVersion: "5.2-preview.1",
2366
+ apiVersion: "7.1-preview.1",
2037
2367
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",
2038
2368
  routeValues: {
2039
2369
  project: project,
@@ -2048,7 +2378,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2048
2378
  /**
2049
2379
  * Retrieve the reviewers for a pull request
2050
2380
  *
2051
- * @param repositoryId - The repository ID of the pull request’s target branch.
2381
+ * @param repositoryId - The repository ID of the pull request's target branch.
2052
2382
  * @param pullRequestId - ID of the pull request.
2053
2383
  * @param project - Project ID or project name
2054
2384
  */
@@ -2056,7 +2386,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2056
2386
  return __awaiter(this, void 0, void 0, function () {
2057
2387
  return __generator(this, function (_a) {
2058
2388
  return [2 /*return*/, this.beginRequest({
2059
- apiVersion: "5.2-preview.1",
2389
+ apiVersion: "7.1-preview.1",
2060
2390
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",
2061
2391
  routeValues: {
2062
2392
  project: project,
@@ -2068,10 +2398,10 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2068
2398
  });
2069
2399
  };
2070
2400
  /**
2071
- * Edit a reviewer entry. These fields are patchable: isFlagged
2401
+ * Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined
2072
2402
  *
2073
2403
  * @param reviewer - Reviewer data.\<br /\>If the reviewer's ID is included here, it must match the reviewerID parameter.
2074
- * @param repositoryId - The repository ID of the pull request’s target branch.
2404
+ * @param repositoryId - The repository ID of the pull request's target branch.
2075
2405
  * @param pullRequestId - ID of the pull request.
2076
2406
  * @param reviewerId - ID of the reviewer.
2077
2407
  * @param project - Project ID or project name
@@ -2080,7 +2410,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2080
2410
  return __awaiter(this, void 0, void 0, function () {
2081
2411
  return __generator(this, function (_a) {
2082
2412
  return [2 /*return*/, this.beginRequest({
2083
- apiVersion: "5.2-preview.1",
2413
+ apiVersion: "7.1-preview.1",
2084
2414
  method: "PATCH",
2085
2415
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",
2086
2416
  routeValues: {
@@ -2098,7 +2428,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2098
2428
  * Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names.
2099
2429
  *
2100
2430
  * @param patchVotes - IDs of the reviewers whose votes will be reset to zero
2101
- * @param repositoryId - The repository ID of the pull request’s target branch.
2431
+ * @param repositoryId - The repository ID of the pull request's target branch.
2102
2432
  * @param pullRequestId - ID of the pull request
2103
2433
  * @param project - Project ID or project name
2104
2434
  */
@@ -2106,7 +2436,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2106
2436
  return __awaiter(this, void 0, void 0, function () {
2107
2437
  return __generator(this, function (_a) {
2108
2438
  return [2 /*return*/, this.beginRequest({
2109
- apiVersion: "5.2-preview.1",
2439
+ apiVersion: "7.1-preview.1",
2110
2440
  method: "PATCH",
2111
2441
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/reviewers/{reviewerId}",
2112
2442
  routeValues: {
@@ -2129,7 +2459,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2129
2459
  return __awaiter(this, void 0, void 0, function () {
2130
2460
  return __generator(this, function (_a) {
2131
2461
  return [2 /*return*/, this.beginRequest({
2132
- apiVersion: "5.2-preview.1",
2462
+ apiVersion: "7.1-preview.1",
2133
2463
  routeTemplate: "{project}/_apis/git/pullRequests/{pullRequestId}",
2134
2464
  routeValues: {
2135
2465
  project: project,
@@ -2159,7 +2489,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2159
2489
  '$top': top
2160
2490
  };
2161
2491
  return [2 /*return*/, this.beginRequest({
2162
- apiVersion: "5.2-preview.1",
2492
+ apiVersion: "7.1-preview.1",
2163
2493
  routeTemplate: "{project}/_apis/git/pullRequests",
2164
2494
  routeValues: {
2165
2495
  project: project
@@ -2185,7 +2515,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2185
2515
  supportsIterations: supportsIterations
2186
2516
  };
2187
2517
  return [2 /*return*/, this.beginRequest({
2188
- apiVersion: "5.2-preview.1",
2518
+ apiVersion: "7.1-preview.1",
2189
2519
  method: "POST",
2190
2520
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}",
2191
2521
  routeValues: {
@@ -2222,7 +2552,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2222
2552
  includeWorkItemRefs: includeWorkItemRefs
2223
2553
  };
2224
2554
  return [2 /*return*/, this.beginRequest({
2225
- apiVersion: "5.2-preview.1",
2555
+ apiVersion: "7.1-preview.1",
2226
2556
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}",
2227
2557
  routeValues: {
2228
2558
  project: project,
@@ -2255,7 +2585,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2255
2585
  '$top': top
2256
2586
  };
2257
2587
  return [2 /*return*/, this.beginRequest({
2258
- apiVersion: "5.2-preview.1",
2588
+ apiVersion: "7.1-preview.1",
2259
2589
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}",
2260
2590
  routeValues: {
2261
2591
  project: project,
@@ -2278,7 +2608,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2278
2608
  return __awaiter(this, void 0, void 0, function () {
2279
2609
  return __generator(this, function (_a) {
2280
2610
  return [2 /*return*/, this.beginRequest({
2281
- apiVersion: "5.2-preview.1",
2611
+ apiVersion: "7.1-preview.1",
2282
2612
  method: "PATCH",
2283
2613
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}",
2284
2614
  routeValues: {
@@ -2303,7 +2633,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2303
2633
  return __awaiter(this, void 0, void 0, function () {
2304
2634
  return __generator(this, function (_a) {
2305
2635
  return [2 /*return*/, this.beginRequest({
2306
- apiVersion: "5.2-preview.1",
2636
+ apiVersion: "7.1-preview.1",
2307
2637
  method: "POST",
2308
2638
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/share",
2309
2639
  routeValues: {
@@ -2328,7 +2658,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2328
2658
  return __awaiter(this, void 0, void 0, function () {
2329
2659
  return __generator(this, function (_a) {
2330
2660
  return [2 /*return*/, this.beginRequest({
2331
- apiVersion: "5.2-preview.1",
2661
+ apiVersion: "7.1-preview.1",
2332
2662
  method: "POST",
2333
2663
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",
2334
2664
  routeValues: {
@@ -2353,7 +2683,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2353
2683
  return __awaiter(this, void 0, void 0, function () {
2354
2684
  return __generator(this, function (_a) {
2355
2685
  return [2 /*return*/, this.beginRequest({
2356
- apiVersion: "5.2-preview.1",
2686
+ apiVersion: "7.1-preview.1",
2357
2687
  method: "DELETE",
2358
2688
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",
2359
2689
  routeValues: {
@@ -2378,7 +2708,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2378
2708
  return __awaiter(this, void 0, void 0, function () {
2379
2709
  return __generator(this, function (_a) {
2380
2710
  return [2 /*return*/, this.beginRequest({
2381
- apiVersion: "5.2-preview.1",
2711
+ apiVersion: "7.1-preview.1",
2382
2712
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",
2383
2713
  routeValues: {
2384
2714
  project: project,
@@ -2401,7 +2731,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2401
2731
  return __awaiter(this, void 0, void 0, function () {
2402
2732
  return __generator(this, function (_a) {
2403
2733
  return [2 /*return*/, this.beginRequest({
2404
- apiVersion: "5.2-preview.1",
2734
+ apiVersion: "7.1-preview.1",
2405
2735
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",
2406
2736
  routeValues: {
2407
2737
  project: project,
@@ -2424,7 +2754,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2424
2754
  return __awaiter(this, void 0, void 0, function () {
2425
2755
  return __generator(this, function (_a) {
2426
2756
  return [2 /*return*/, this.beginRequest({
2427
- apiVersion: "5.2-preview.1",
2757
+ apiVersion: "7.1-preview.1",
2428
2758
  method: "PATCH",
2429
2759
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/statuses/{statusId}",
2430
2760
  routeValues: {
@@ -2453,7 +2783,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2453
2783
  return __awaiter(this, void 0, void 0, function () {
2454
2784
  return __generator(this, function (_a) {
2455
2785
  return [2 /*return*/, this.beginRequest({
2456
- apiVersion: "5.2-preview.1",
2786
+ apiVersion: "7.1-preview.1",
2457
2787
  method: "POST",
2458
2788
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",
2459
2789
  routeValues: {
@@ -2480,7 +2810,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2480
2810
  return __awaiter(this, void 0, void 0, function () {
2481
2811
  return __generator(this, function (_a) {
2482
2812
  return [2 /*return*/, this.beginRequest({
2483
- apiVersion: "5.2-preview.1",
2813
+ apiVersion: "7.1-preview.1",
2484
2814
  method: "DELETE",
2485
2815
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",
2486
2816
  routeValues: {
@@ -2507,7 +2837,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2507
2837
  return __awaiter(this, void 0, void 0, function () {
2508
2838
  return __generator(this, function (_a) {
2509
2839
  return [2 /*return*/, this.beginRequest({
2510
- apiVersion: "5.2-preview.1",
2840
+ apiVersion: "7.1-preview.1",
2511
2841
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",
2512
2842
  routeValues: {
2513
2843
  project: project,
@@ -2532,7 +2862,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2532
2862
  return __awaiter(this, void 0, void 0, function () {
2533
2863
  return __generator(this, function (_a) {
2534
2864
  return [2 /*return*/, this.beginRequest({
2535
- apiVersion: "5.2-preview.1",
2865
+ apiVersion: "7.1-preview.1",
2536
2866
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",
2537
2867
  routeValues: {
2538
2868
  project: project,
@@ -2558,7 +2888,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2558
2888
  return __awaiter(this, void 0, void 0, function () {
2559
2889
  return __generator(this, function (_a) {
2560
2890
  return [2 /*return*/, this.beginRequest({
2561
- apiVersion: "5.2-preview.1",
2891
+ apiVersion: "7.1-preview.1",
2562
2892
  method: "PATCH",
2563
2893
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}/comments/{commentId}",
2564
2894
  routeValues: {
@@ -2585,7 +2915,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2585
2915
  return __awaiter(this, void 0, void 0, function () {
2586
2916
  return __generator(this, function (_a) {
2587
2917
  return [2 /*return*/, this.beginRequest({
2588
- apiVersion: "5.2-preview.1",
2918
+ apiVersion: "7.1-preview.1",
2589
2919
  method: "POST",
2590
2920
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",
2591
2921
  routeValues: {
@@ -2617,7 +2947,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2617
2947
  '$baseIteration': baseIteration
2618
2948
  };
2619
2949
  return [2 /*return*/, this.beginRequest({
2620
- apiVersion: "5.2-preview.1",
2950
+ apiVersion: "7.1-preview.1",
2621
2951
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",
2622
2952
  routeValues: {
2623
2953
  project: project,
@@ -2648,7 +2978,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2648
2978
  '$baseIteration': baseIteration
2649
2979
  };
2650
2980
  return [2 /*return*/, this.beginRequest({
2651
- apiVersion: "5.2-preview.1",
2981
+ apiVersion: "7.1-preview.1",
2652
2982
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",
2653
2983
  routeValues: {
2654
2984
  project: project,
@@ -2673,7 +3003,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2673
3003
  return __awaiter(this, void 0, void 0, function () {
2674
3004
  return __generator(this, function (_a) {
2675
3005
  return [2 /*return*/, this.beginRequest({
2676
- apiVersion: "5.2-preview.1",
3006
+ apiVersion: "7.1-preview.1",
2677
3007
  method: "PATCH",
2678
3008
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/threads/{threadId}",
2679
3009
  routeValues: {
@@ -2698,7 +3028,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2698
3028
  return __awaiter(this, void 0, void 0, function () {
2699
3029
  return __generator(this, function (_a) {
2700
3030
  return [2 /*return*/, this.beginRequest({
2701
- apiVersion: "5.2-preview.1",
3031
+ apiVersion: "7.1-preview.1",
2702
3032
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/workitems",
2703
3033
  routeValues: {
2704
3034
  project: project,
@@ -2720,7 +3050,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2720
3050
  return __awaiter(this, void 0, void 0, function () {
2721
3051
  return __generator(this, function (_a) {
2722
3052
  return [2 /*return*/, this.beginRequest({
2723
- apiVersion: "5.2-preview.2",
3053
+ apiVersion: "7.1-preview.2",
2724
3054
  method: "POST",
2725
3055
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}",
2726
3056
  routeValues: {
@@ -2750,7 +3080,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2750
3080
  includeRefUpdates: includeRefUpdates
2751
3081
  };
2752
3082
  return [2 /*return*/, this.beginRequest({
2753
- apiVersion: "5.2-preview.2",
3083
+ apiVersion: "7.1-preview.2",
2754
3084
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}",
2755
3085
  routeValues: {
2756
3086
  project: project,
@@ -2781,7 +3111,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2781
3111
  searchCriteria: searchCriteria
2782
3112
  };
2783
3113
  return [2 /*return*/, this.beginRequest({
2784
- apiVersion: "5.2-preview.2",
3114
+ apiVersion: "7.1-preview.2",
2785
3115
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}",
2786
3116
  routeValues: {
2787
3117
  project: project,
@@ -2802,7 +3132,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2802
3132
  return __awaiter(this, void 0, void 0, function () {
2803
3133
  return __generator(this, function (_a) {
2804
3134
  return [2 /*return*/, this.beginRequest({
2805
- apiVersion: "5.2-preview.1",
3135
+ apiVersion: "7.1-preview.1",
2806
3136
  method: "DELETE",
2807
3137
  routeTemplate: "{project}/_apis/git/recycleBin/repositories/{repositoryId}",
2808
3138
  routeValues: {
@@ -2822,7 +3152,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2822
3152
  return __awaiter(this, void 0, void 0, function () {
2823
3153
  return __generator(this, function (_a) {
2824
3154
  return [2 /*return*/, this.beginRequest({
2825
- apiVersion: "5.2-preview.1",
3155
+ apiVersion: "7.1-preview.1",
2826
3156
  routeTemplate: "{project}/_apis/git/recycleBin/repositories/{repositoryId}",
2827
3157
  routeValues: {
2828
3158
  project: project
@@ -2842,7 +3172,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2842
3172
  return __awaiter(this, void 0, void 0, function () {
2843
3173
  return __generator(this, function (_a) {
2844
3174
  return [2 /*return*/, this.beginRequest({
2845
- apiVersion: "5.2-preview.1",
3175
+ apiVersion: "7.1-preview.1",
2846
3176
  method: "PATCH",
2847
3177
  routeTemplate: "{project}/_apis/git/recycleBin/repositories/{repositoryId}",
2848
3178
  routeValues: {
@@ -2870,6 +3200,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2870
3200
  GitRestClient.prototype.getRefs = function (repositoryId, project, filter, includeLinks, includeStatuses, includeMyBranches, latestStatusesOnly, peelTags, filterContains) {
2871
3201
  return __awaiter(this, void 0, void 0, function () {
2872
3202
  var queryValues;
3203
+ var _this = this;
2873
3204
  return __generator(this, function (_a) {
2874
3205
  queryValues = {
2875
3206
  filter: filter,
@@ -2881,14 +3212,26 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2881
3212
  filterContains: filterContains
2882
3213
  };
2883
3214
  return [2 /*return*/, this.beginRequest({
2884
- apiVersion: "5.2-preview.1",
3215
+ apiVersion: "7.1-preview.1",
2885
3216
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}",
2886
3217
  routeValues: {
2887
3218
  project: project,
2888
3219
  repositoryId: repositoryId
2889
3220
  },
2890
- queryParams: queryValues
2891
- })];
3221
+ queryParams: queryValues,
3222
+ returnRawResponse: true
3223
+ }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
3224
+ var body;
3225
+ return __generator(this, function (_a) {
3226
+ switch (_a.label) {
3227
+ case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
3228
+ case 1:
3229
+ body = _a.sent();
3230
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
3231
+ return [2 /*return*/, body];
3232
+ }
3233
+ });
3234
+ }); })];
2892
3235
  });
2893
3236
  });
2894
3237
  };
@@ -2910,7 +3253,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2910
3253
  projectId: projectId
2911
3254
  };
2912
3255
  return [2 /*return*/, this.beginRequest({
2913
- apiVersion: "5.2-preview.1",
3256
+ apiVersion: "7.1-preview.1",
2914
3257
  method: "PATCH",
2915
3258
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}",
2916
3259
  routeValues: {
@@ -2939,7 +3282,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2939
3282
  projectId: projectId
2940
3283
  };
2941
3284
  return [2 /*return*/, this.beginRequest({
2942
- apiVersion: "5.2-preview.1",
3285
+ apiVersion: "7.1-preview.1",
2943
3286
  method: "POST",
2944
3287
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/refs/{*filter}",
2945
3288
  routeValues: {
@@ -2962,7 +3305,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2962
3305
  return __awaiter(this, void 0, void 0, function () {
2963
3306
  return __generator(this, function (_a) {
2964
3307
  return [2 /*return*/, this.beginRequest({
2965
- apiVersion: "5.2-preview.1",
3308
+ apiVersion: "7.1-preview.1",
2966
3309
  method: "POST",
2967
3310
  routeTemplate: "{project}/_apis/git/favorites/refs/{favoriteId}",
2968
3311
  routeValues: {
@@ -2983,7 +3326,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
2983
3326
  return __awaiter(this, void 0, void 0, function () {
2984
3327
  return __generator(this, function (_a) {
2985
3328
  return [2 /*return*/, this.beginRequest({
2986
- apiVersion: "5.2-preview.1",
3329
+ apiVersion: "7.1-preview.1",
2987
3330
  method: "DELETE",
2988
3331
  routeTemplate: "{project}/_apis/git/favorites/refs/{favoriteId}",
2989
3332
  routeValues: {
@@ -3004,7 +3347,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3004
3347
  return __awaiter(this, void 0, void 0, function () {
3005
3348
  return __generator(this, function (_a) {
3006
3349
  return [2 /*return*/, this.beginRequest({
3007
- apiVersion: "5.2-preview.1",
3350
+ apiVersion: "7.1-preview.1",
3008
3351
  routeTemplate: "{project}/_apis/git/favorites/refs/{favoriteId}",
3009
3352
  routeValues: {
3010
3353
  project: project,
@@ -3030,7 +3373,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3030
3373
  identityId: identityId
3031
3374
  };
3032
3375
  return [2 /*return*/, this.beginRequest({
3033
- apiVersion: "5.2-preview.1",
3376
+ apiVersion: "7.1-preview.1",
3034
3377
  routeTemplate: "{project}/_apis/git/favorites/refs/{favoriteId}",
3035
3378
  routeValues: {
3036
3379
  project: project
@@ -3043,7 +3386,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3043
3386
  /**
3044
3387
  * Create a git repository in a team project.
3045
3388
  *
3046
- * @param gitRepositoryToCreate - Specify the repo name, team project and/or parent repository. Team project information can be ommitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id).
3389
+ * @param gitRepositoryToCreate - Specify the repo name, team project and/or parent repository. Team project information can be omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id).
3047
3390
  * @param project - Project ID or project name
3048
3391
  * @param sourceRef - [optional] Specify the source refs to use while creating a fork repo
3049
3392
  */
@@ -3055,7 +3398,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3055
3398
  sourceRef: sourceRef
3056
3399
  };
3057
3400
  return [2 /*return*/, this.beginRequest({
3058
- apiVersion: "5.2-preview.1",
3401
+ apiVersion: "7.1-preview.1",
3059
3402
  method: "POST",
3060
3403
  routeTemplate: "{project}/_apis/git/Repositories/{repositoryId}",
3061
3404
  routeValues: {
@@ -3070,14 +3413,14 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3070
3413
  /**
3071
3414
  * Delete a git repository
3072
3415
  *
3073
- * @param repositoryId - The name or ID of the repository.
3416
+ * @param repositoryId - The ID of the repository.
3074
3417
  * @param project - Project ID or project name
3075
3418
  */
3076
3419
  GitRestClient.prototype.deleteRepository = function (repositoryId, project) {
3077
3420
  return __awaiter(this, void 0, void 0, function () {
3078
3421
  return __generator(this, function (_a) {
3079
3422
  return [2 /*return*/, this.beginRequest({
3080
- apiVersion: "5.2-preview.1",
3423
+ apiVersion: "7.1-preview.1",
3081
3424
  method: "DELETE",
3082
3425
  routeTemplate: "{project}/_apis/git/Repositories/{repositoryId}",
3083
3426
  routeValues: {
@@ -3106,7 +3449,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3106
3449
  includeHidden: includeHidden
3107
3450
  };
3108
3451
  return [2 /*return*/, this.beginRequest({
3109
- apiVersion: "5.2-preview.1",
3452
+ apiVersion: "7.1-preview.1",
3110
3453
  routeTemplate: "{project}/_apis/git/Repositories/{repositoryId}",
3111
3454
  routeValues: {
3112
3455
  project: project
@@ -3126,7 +3469,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3126
3469
  return __awaiter(this, void 0, void 0, function () {
3127
3470
  return __generator(this, function (_a) {
3128
3471
  return [2 /*return*/, this.beginRequest({
3129
- apiVersion: "5.2-preview.1",
3472
+ apiVersion: "7.1-preview.1",
3130
3473
  routeTemplate: "{project}/_apis/git/Repositories/{repositoryId}",
3131
3474
  routeValues: {
3132
3475
  project: project,
@@ -3151,7 +3494,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3151
3494
  includeParent: includeParent
3152
3495
  };
3153
3496
  return [2 /*return*/, this.beginRequest({
3154
- apiVersion: "5.2-preview.1",
3497
+ apiVersion: "7.1-preview.1",
3155
3498
  routeTemplate: "{project}/_apis/git/Repositories/{repositoryId}",
3156
3499
  routeValues: {
3157
3500
  project: project,
@@ -3166,14 +3509,14 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3166
3509
  * Updates the Git repository with either a new repo name or a new default branch.
3167
3510
  *
3168
3511
  * @param newRepositoryInfo - Specify a new repo name or a new default branch of the repository
3169
- * @param repositoryId - The name or ID of the repository.
3512
+ * @param repositoryId - The ID of the repository.
3170
3513
  * @param project - Project ID or project name
3171
3514
  */
3172
3515
  GitRestClient.prototype.updateRepository = function (newRepositoryInfo, repositoryId, project) {
3173
3516
  return __awaiter(this, void 0, void 0, function () {
3174
3517
  return __generator(this, function (_a) {
3175
3518
  return [2 /*return*/, this.beginRequest({
3176
- apiVersion: "5.2-preview.1",
3519
+ apiVersion: "7.1-preview.1",
3177
3520
  method: "PATCH",
3178
3521
  routeTemplate: "{project}/_apis/git/Repositories/{repositoryId}",
3179
3522
  routeValues: {
@@ -3185,6 +3528,131 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3185
3528
  });
3186
3529
  });
3187
3530
  };
3531
+ /**
3532
+ * Retrieve one conflict for a revert by ID
3533
+ *
3534
+ * @param repositoryId -
3535
+ * @param revertId -
3536
+ * @param conflictId -
3537
+ * @param project - Project ID or project name
3538
+ */
3539
+ GitRestClient.prototype.getRevertConflict = function (repositoryId, revertId, conflictId, project) {
3540
+ return __awaiter(this, void 0, void 0, function () {
3541
+ return __generator(this, function (_a) {
3542
+ return [2 /*return*/, this.beginRequest({
3543
+ apiVersion: "7.1-preview.1",
3544
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}/conflicts/{conflictId}",
3545
+ routeValues: {
3546
+ project: project,
3547
+ repositoryId: repositoryId,
3548
+ revertId: revertId,
3549
+ conflictId: conflictId
3550
+ }
3551
+ })];
3552
+ });
3553
+ });
3554
+ };
3555
+ /**
3556
+ * Retrieve all conflicts for a revert
3557
+ *
3558
+ * @param repositoryId -
3559
+ * @param revertId -
3560
+ * @param project - Project ID or project name
3561
+ * @param continuationToken -
3562
+ * @param top -
3563
+ * @param excludeResolved -
3564
+ * @param onlyResolved -
3565
+ * @param includeObsolete -
3566
+ */
3567
+ GitRestClient.prototype.getRevertConflicts = function (repositoryId, revertId, project, continuationToken, top, excludeResolved, onlyResolved, includeObsolete) {
3568
+ return __awaiter(this, void 0, void 0, function () {
3569
+ var queryValues;
3570
+ var _this = this;
3571
+ return __generator(this, function (_a) {
3572
+ queryValues = {
3573
+ continuationToken: continuationToken,
3574
+ '$top': top,
3575
+ excludeResolved: excludeResolved,
3576
+ onlyResolved: onlyResolved,
3577
+ includeObsolete: includeObsolete
3578
+ };
3579
+ return [2 /*return*/, this.beginRequest({
3580
+ apiVersion: "7.1-preview.1",
3581
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}/conflicts/{conflictId}",
3582
+ routeValues: {
3583
+ project: project,
3584
+ repositoryId: repositoryId,
3585
+ revertId: revertId
3586
+ },
3587
+ queryParams: queryValues,
3588
+ returnRawResponse: true
3589
+ }).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
3590
+ var body;
3591
+ return __generator(this, function (_a) {
3592
+ switch (_a.label) {
3593
+ case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
3594
+ case 1:
3595
+ body = _a.sent();
3596
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
3597
+ return [2 /*return*/, body];
3598
+ }
3599
+ });
3600
+ }); })];
3601
+ });
3602
+ });
3603
+ };
3604
+ /**
3605
+ * Update merge conflict resolution
3606
+ *
3607
+ * @param conflict -
3608
+ * @param repositoryId -
3609
+ * @param revertId -
3610
+ * @param conflictId -
3611
+ * @param project - Project ID or project name
3612
+ */
3613
+ GitRestClient.prototype.updateRevertConflict = function (conflict, repositoryId, revertId, conflictId, project) {
3614
+ return __awaiter(this, void 0, void 0, function () {
3615
+ return __generator(this, function (_a) {
3616
+ return [2 /*return*/, this.beginRequest({
3617
+ apiVersion: "7.1-preview.1",
3618
+ method: "PATCH",
3619
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}/conflicts/{conflictId}",
3620
+ routeValues: {
3621
+ project: project,
3622
+ repositoryId: repositoryId,
3623
+ revertId: revertId,
3624
+ conflictId: conflictId
3625
+ },
3626
+ body: conflict
3627
+ })];
3628
+ });
3629
+ });
3630
+ };
3631
+ /**
3632
+ * Update multiple merge conflict resolutions
3633
+ *
3634
+ * @param conflictUpdates -
3635
+ * @param repositoryId -
3636
+ * @param revertId -
3637
+ * @param project - Project ID or project name
3638
+ */
3639
+ GitRestClient.prototype.updateRevertConflicts = function (conflictUpdates, repositoryId, revertId, project) {
3640
+ return __awaiter(this, void 0, void 0, function () {
3641
+ return __generator(this, function (_a) {
3642
+ return [2 /*return*/, this.beginRequest({
3643
+ apiVersion: "7.1-preview.1",
3644
+ method: "PATCH",
3645
+ routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}/conflicts/{conflictId}",
3646
+ routeValues: {
3647
+ project: project,
3648
+ repositoryId: repositoryId,
3649
+ revertId: revertId
3650
+ },
3651
+ body: conflictUpdates
3652
+ })];
3653
+ });
3654
+ });
3655
+ };
3188
3656
  /**
3189
3657
  * Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request.
3190
3658
  *
@@ -3196,7 +3664,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3196
3664
  return __awaiter(this, void 0, void 0, function () {
3197
3665
  return __generator(this, function (_a) {
3198
3666
  return [2 /*return*/, this.beginRequest({
3199
- apiVersion: "5.2-preview.1",
3667
+ apiVersion: "7.1-preview.1",
3200
3668
  method: "POST",
3201
3669
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}",
3202
3670
  routeValues: {
@@ -3219,7 +3687,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3219
3687
  return __awaiter(this, void 0, void 0, function () {
3220
3688
  return __generator(this, function (_a) {
3221
3689
  return [2 /*return*/, this.beginRequest({
3222
- apiVersion: "5.2-preview.1",
3690
+ apiVersion: "7.1-preview.1",
3223
3691
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}",
3224
3692
  routeValues: {
3225
3693
  project: project,
@@ -3245,7 +3713,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3245
3713
  refName: refName
3246
3714
  };
3247
3715
  return [2 /*return*/, this.beginRequest({
3248
- apiVersion: "5.2-preview.1",
3716
+ apiVersion: "7.1-preview.1",
3249
3717
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/reverts/{revertId}",
3250
3718
  routeValues: {
3251
3719
  project: project,
@@ -3268,7 +3736,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3268
3736
  return __awaiter(this, void 0, void 0, function () {
3269
3737
  return __generator(this, function (_a) {
3270
3738
  return [2 /*return*/, this.beginRequest({
3271
- apiVersion: "5.2-preview.1",
3739
+ apiVersion: "7.1-preview.1",
3272
3740
  method: "POST",
3273
3741
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Statuses",
3274
3742
  routeValues: {
@@ -3301,7 +3769,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3301
3769
  latestOnly: latestOnly
3302
3770
  };
3303
3771
  return [2 /*return*/, this.beginRequest({
3304
- apiVersion: "5.2-preview.1",
3772
+ apiVersion: "7.1-preview.1",
3305
3773
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/Statuses",
3306
3774
  routeValues: {
3307
3775
  project: project,
@@ -3323,7 +3791,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3323
3791
  return __awaiter(this, void 0, void 0, function () {
3324
3792
  return __generator(this, function (_a) {
3325
3793
  return [2 /*return*/, this.beginRequest({
3326
- apiVersion: "5.2-preview.1",
3794
+ apiVersion: "7.1-preview.1",
3327
3795
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/suggestions",
3328
3796
  routeValues: {
3329
3797
  project: project,
@@ -3353,7 +3821,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3353
3821
  fileName: fileName
3354
3822
  };
3355
3823
  return [2 /*return*/, this.beginRequest({
3356
- apiVersion: "5.2-preview.1",
3824
+ apiVersion: "7.1-preview.1",
3357
3825
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Trees/{sha1}",
3358
3826
  routeValues: {
3359
3827
  project: project,
@@ -3385,7 +3853,7 @@ define(["require", "exports", "../Common/RestClientBase"], function (require, ex
3385
3853
  fileName: fileName
3386
3854
  };
3387
3855
  return [2 /*return*/, this.beginRequest({
3388
- apiVersion: "5.2-preview.1",
3856
+ apiVersion: "7.1-preview.1",
3389
3857
  httpResponseType: "application/zip",
3390
3858
  routeTemplate: "{project}/_apis/git/repositories/{repositoryId}/Trees/{sha1}",
3391
3859
  routeValues: {