azure-devops-extension-api 4.246.0 → 4.248.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 (559) hide show
  1. package/SECURITY.md +41 -0
  2. package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/Reporting.d.ts +48 -0
  3. package/bin/AdvancedSecurity.Reporting/Reporting.js +32 -0
  4. package/bin/AdvancedSecurity.Reporting/Reporting.min.js +1 -0
  5. package/{Alert → bin/Alert}/Alert.d.ts +8 -8
  6. package/{Contributions → bin/Contributions}/ContributionsClient.js +2 -2
  7. package/{Contributions → bin/Contributions}/ContributionsClient.min.js +1 -1
  8. package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.js +7 -7
  9. package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.min.js +1 -1
  10. package/{Git → bin/Git}/Git.d.ts +4 -0
  11. package/bin/LICENSE +21 -0
  12. package/{Management → bin/Management}/Management.d.ts +4 -0
  13. package/bin/README.md +2 -0
  14. package/{TaskAgent → bin/TaskAgent}/TaskAgent.d.ts +8 -0
  15. package/{Test → bin/Test}/Test.d.ts +31 -7
  16. package/{TestPlan → bin/TestPlan}/TestPlan.d.ts +6 -2
  17. package/{TestResults → bin/TestResults}/TestResultsClient.d.ts +24 -1
  18. package/{TestResults → bin/TestResults}/TestResultsClient.js +79 -1
  19. package/bin/TestResults/TestResultsClient.min.js +1 -0
  20. package/bin/package.json +37 -0
  21. package/buildpackage.js +80 -0
  22. package/package.json +1 -1
  23. package/src/Accounts/Accounts.ts +134 -0
  24. package/src/Accounts/AccountsClient.ts +83 -0
  25. package/src/Accounts/index.ts +2 -0
  26. package/src/AdvancedSecurity.Reporting/Reporting.ts +180 -0
  27. package/src/AdvancedSecurity.Reporting/ReportingClient.ts +47 -0
  28. package/src/Alert/Alert.ts +1037 -0
  29. package/src/Alert/AlertClient.ts +330 -0
  30. package/src/Boards/Boards.ts +684 -0
  31. package/src/Boards/BoardsClient.ts +593 -0
  32. package/src/Boards/index.ts +2 -0
  33. package/src/Build/Build.ts +3416 -0
  34. package/src/Build/BuildClient.ts +2740 -0
  35. package/src/Build/BuildServices.ts +39 -0
  36. package/src/Build/index.ts +3 -0
  37. package/src/Comments/Comments.ts +330 -0
  38. package/src/Comments/index.ts +1 -0
  39. package/src/Common/Client.ts +37 -0
  40. package/src/Common/CommonServices.ts +853 -0
  41. package/src/Common/Context.d.ts +46 -0
  42. package/src/Common/Fetch.ts +239 -0
  43. package/src/Common/RestClientBase.ts +186 -0
  44. package/src/Common/System.ts +36 -0
  45. package/src/Common/SystemData.ts +135 -0
  46. package/src/Common/Util/Serialization.ts +59 -0
  47. package/src/Common/Util/Url.ts +773 -0
  48. package/src/Common/index.ts +3 -0
  49. package/src/Contributions/Contributions.ts +708 -0
  50. package/src/Contributions/ContributionsClient.ts +109 -0
  51. package/src/Contributions/index.ts +2 -0
  52. package/src/Core/Core.ts +579 -0
  53. package/src/Core/CoreClient.ts +765 -0
  54. package/src/Core/index.ts +2 -0
  55. package/src/Dashboard/Dashboard.ts +419 -0
  56. package/src/Dashboard/DashboardClient.ts +370 -0
  57. package/src/Dashboard/WidgetConfigHelpers.ts +43 -0
  58. package/src/Dashboard/WidgetContracts.ts +226 -0
  59. package/src/Dashboard/WidgetHelpers.ts +145 -0
  60. package/src/Dashboard/index.ts +5 -0
  61. package/src/DistributedTaskCommon/DistributedTaskCommon.ts +108 -0
  62. package/src/DistributedTaskCommon/index.ts +1 -0
  63. package/src/ExtensionManagement/ExtensionManagement.ts +1205 -0
  64. package/src/ExtensionManagement/ExtensionManagementClient.ts +646 -0
  65. package/src/ExtensionManagement/index.ts +2 -0
  66. package/src/Favorite/Favorite.ts +136 -0
  67. package/src/Favorite/FavoriteClient.ts +301 -0
  68. package/src/FeatureAvailability/FeatureAvailability.ts +20 -0
  69. package/src/FeatureAvailability/FeatureAvailabilityClient.ts +153 -0
  70. package/src/FeatureAvailability/index.ts +2 -0
  71. package/src/FeatureManagement/FeatureManagement.ts +166 -0
  72. package/src/FeatureManagement/FeatureManagementClient.ts +246 -0
  73. package/src/FeatureManagement/index.ts +2 -0
  74. package/src/FileContainer/FileContainer.ts +205 -0
  75. package/src/FileContainer/FileContainerClient.ts +154 -0
  76. package/src/FileContainer/index.ts +2 -0
  77. package/src/FormInput/FormInput.ts +288 -0
  78. package/src/FormInput/index.ts +1 -0
  79. package/src/Gallery/Gallery.ts +1977 -0
  80. package/src/Gallery/GalleryClient.ts +2251 -0
  81. package/src/Gallery/index.ts +2 -0
  82. package/src/Git/CodeEditorTypes.ts +335 -0
  83. package/src/Git/Git.ts +4062 -0
  84. package/src/Git/GitClient.ts +4750 -0
  85. package/src/Git/GitServices.ts +18 -0
  86. package/src/Git/index.ts +4 -0
  87. package/src/Graph/Graph.ts +572 -0
  88. package/src/Graph/GraphClient.ts +846 -0
  89. package/src/Graph/index.ts +2 -0
  90. package/src/Identities/Identities.ts +261 -0
  91. package/src/Identities/IdentityProvider.ts +90 -0
  92. package/src/Identities/IdentityService.ts +89 -0
  93. package/src/Identities/index.ts +3 -0
  94. package/src/Locations/Locations.ts +165 -0
  95. package/src/Locations/LocationsClient.ts +220 -0
  96. package/src/Locations/index.ts +2 -0
  97. package/src/Management/Management.ts +176 -0
  98. package/src/Management/ManagementClient.ts +348 -0
  99. package/src/Notification/Notification.ts +1460 -0
  100. package/src/Notification/NotificationClient.ts +477 -0
  101. package/src/Notification/index.ts +2 -0
  102. package/src/Operations/Operations.ts +86 -0
  103. package/src/Operations/OperationsClient.ts +42 -0
  104. package/src/Operations/index.ts +2 -0
  105. package/src/Pipelines/Pipelines.ts +354 -0
  106. package/src/Pipelines/PipelinesClient.ts +306 -0
  107. package/src/Policy/Policy.ts +173 -0
  108. package/src/Policy/PolicyClient.ts +315 -0
  109. package/src/Policy/index.ts +2 -0
  110. package/src/Profile/Profile.ts +187 -0
  111. package/src/Profile/ProfileClient.ts +328 -0
  112. package/src/Profile/index.ts +2 -0
  113. package/src/ProjectAnalysis/ProjectAnalysis.ts +74 -0
  114. package/src/ProjectAnalysis/ProjectAnalysisClient.ts +124 -0
  115. package/src/ProjectAnalysis/index.ts +2 -0
  116. package/src/Release/Release.ts +4237 -0
  117. package/src/Release/ReleaseClient.ts +2450 -0
  118. package/src/Release/index.ts +2 -0
  119. package/src/ResourceUsage/ResourceUsage.ts +19 -0
  120. package/src/ResourceUsage/ResourceUsageClient.ts +48 -0
  121. package/src/ServiceEndpoint/ServiceEndpoint.ts +930 -0
  122. package/src/ServiceEndpoint/ServiceEndpointClient.ts +617 -0
  123. package/src/ServiceEndpoint/index.ts +2 -0
  124. package/src/ServiceHooks/ServiceHooks.ts +759 -0
  125. package/src/ServiceHooks/ServiceHooksClient.ts +499 -0
  126. package/src/ServiceHooks/index.ts +2 -0
  127. package/src/TaskAgent/TaskAgent.ts +3896 -0
  128. package/src/TaskAgent/TaskAgentClient.ts +3918 -0
  129. package/src/TaskAgent/index.ts +2 -0
  130. package/src/Test/Test.ts +5853 -0
  131. package/src/Test/TestClient.ts +2201 -0
  132. package/src/Test/index.ts +2 -0
  133. package/src/TestPlan/TestPlan.ts +1384 -0
  134. package/src/TestPlan/TestPlanClient.ts +1367 -0
  135. package/src/TestPlan/index.ts +2 -0
  136. package/{AdvancedSecurity.Reporting/Reporting.js → src/TestResults/TestResults.ts} +7 -5
  137. package/src/TestResults/TestResultsClient.ts +3506 -0
  138. package/src/TestResults/index.ts +2 -0
  139. package/src/Tfvc/Tfvc.ts +770 -0
  140. package/src/Tfvc/TfvcClient.ts +757 -0
  141. package/src/Tfvc/index.ts +2 -0
  142. package/src/WebApi/WebApi.ts +452 -0
  143. package/src/WebApi/index.ts +1 -0
  144. package/src/Wiki/Wiki.ts +352 -0
  145. package/src/Wiki/WikiClient.ts +712 -0
  146. package/src/Wiki/index.ts +2 -0
  147. package/src/Work/Work.ts +1367 -0
  148. package/src/Work/WorkClient.ts +1489 -0
  149. package/src/Work/index.ts +2 -0
  150. package/src/WorkItemTracking/WorkItemTracking.ts +2215 -0
  151. package/src/WorkItemTracking/WorkItemTrackingClient.ts +2032 -0
  152. package/src/WorkItemTracking/WorkItemTrackingServices.ts +329 -0
  153. package/src/WorkItemTracking/index.ts +3 -0
  154. package/src/WorkItemTrackingProcess/WorkItemTrackingProcess.ts +1295 -0
  155. package/src/WorkItemTrackingProcess/WorkItemTrackingProcessClient.ts +1455 -0
  156. package/src/WorkItemTrackingProcess/index.ts +2 -0
  157. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.ts +606 -0
  158. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.ts +1175 -0
  159. package/src/WorkItemTrackingProcessDefinitions/index.ts +2 -0
  160. package/src/index.ts +1 -0
  161. package/tsconfig.json +21 -0
  162. package/AdvancedSecurity.Reporting/Reporting.min.js +0 -1
  163. package/TestResults/TestResultsClient.min.js +0 -1
  164. /package/{Accounts → bin/Accounts}/Accounts.d.ts +0 -0
  165. /package/{Accounts → bin/Accounts}/Accounts.js +0 -0
  166. /package/{Accounts → bin/Accounts}/Accounts.min.js +0 -0
  167. /package/{Accounts → bin/Accounts}/AccountsClient.d.ts +0 -0
  168. /package/{Accounts → bin/Accounts}/AccountsClient.js +0 -0
  169. /package/{Accounts → bin/Accounts}/AccountsClient.min.js +0 -0
  170. /package/{Accounts → bin/Accounts}/index.d.ts +0 -0
  171. /package/{Accounts → bin/Accounts}/index.js +0 -0
  172. /package/{Accounts → bin/Accounts}/index.min.js +0 -0
  173. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.d.ts +0 -0
  174. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.js +0 -0
  175. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.min.js +0 -0
  176. /package/{Alert → bin/Alert}/Alert.js +0 -0
  177. /package/{Alert → bin/Alert}/Alert.min.js +0 -0
  178. /package/{Alert → bin/Alert}/AlertClient.d.ts +0 -0
  179. /package/{Alert → bin/Alert}/AlertClient.js +0 -0
  180. /package/{Alert → bin/Alert}/AlertClient.min.js +0 -0
  181. /package/{Boards → bin/Boards}/Boards.d.ts +0 -0
  182. /package/{Boards → bin/Boards}/Boards.js +0 -0
  183. /package/{Boards → bin/Boards}/Boards.min.js +0 -0
  184. /package/{Boards → bin/Boards}/BoardsClient.d.ts +0 -0
  185. /package/{Boards → bin/Boards}/BoardsClient.js +0 -0
  186. /package/{Boards → bin/Boards}/BoardsClient.min.js +0 -0
  187. /package/{Boards → bin/Boards}/index.d.ts +0 -0
  188. /package/{Boards → bin/Boards}/index.js +0 -0
  189. /package/{Boards → bin/Boards}/index.min.js +0 -0
  190. /package/{Build → bin/Build}/Build.d.ts +0 -0
  191. /package/{Build → bin/Build}/Build.js +0 -0
  192. /package/{Build → bin/Build}/Build.min.js +0 -0
  193. /package/{Build → bin/Build}/BuildClient.d.ts +0 -0
  194. /package/{Build → bin/Build}/BuildClient.js +0 -0
  195. /package/{Build → bin/Build}/BuildClient.min.js +0 -0
  196. /package/{Build → bin/Build}/BuildServices.d.ts +0 -0
  197. /package/{Build → bin/Build}/BuildServices.js +0 -0
  198. /package/{Build → bin/Build}/BuildServices.min.js +0 -0
  199. /package/{Build → bin/Build}/index.d.ts +0 -0
  200. /package/{Build → bin/Build}/index.js +0 -0
  201. /package/{Build → bin/Build}/index.min.js +0 -0
  202. /package/{Comments → bin/Comments}/Comments.d.ts +0 -0
  203. /package/{Comments → bin/Comments}/Comments.js +0 -0
  204. /package/{Comments → bin/Comments}/Comments.min.js +0 -0
  205. /package/{Comments → bin/Comments}/index.d.ts +0 -0
  206. /package/{Comments → bin/Comments}/index.js +0 -0
  207. /package/{Comments → bin/Comments}/index.min.js +0 -0
  208. /package/{Common → bin/Common}/Client.d.ts +0 -0
  209. /package/{Common → bin/Common}/Client.js +0 -0
  210. /package/{Common → bin/Common}/Client.min.js +0 -0
  211. /package/{Common → bin/Common}/CommonServices.d.ts +0 -0
  212. /package/{Common → bin/Common}/CommonServices.js +0 -0
  213. /package/{Common → bin/Common}/CommonServices.min.js +0 -0
  214. /package/{Common → bin/Common}/Context.d.ts +0 -0
  215. /package/{Common → bin/Common}/Fetch.d.ts +0 -0
  216. /package/{Common → bin/Common}/Fetch.js +0 -0
  217. /package/{Common → bin/Common}/Fetch.min.js +0 -0
  218. /package/{Common → bin/Common}/RestClientBase.d.ts +0 -0
  219. /package/{Common → bin/Common}/RestClientBase.js +0 -0
  220. /package/{Common → bin/Common}/RestClientBase.min.js +0 -0
  221. /package/{Common → bin/Common}/System.d.ts +0 -0
  222. /package/{Common → bin/Common}/System.js +0 -0
  223. /package/{Common → bin/Common}/System.min.js +0 -0
  224. /package/{Common → bin/Common}/SystemData.d.ts +0 -0
  225. /package/{Common → bin/Common}/SystemData.js +0 -0
  226. /package/{Common → bin/Common}/SystemData.min.js +0 -0
  227. /package/{Common → bin/Common}/Util/Serialization.d.ts +0 -0
  228. /package/{Common → bin/Common}/Util/Serialization.js +0 -0
  229. /package/{Common → bin/Common}/Util/Serialization.min.js +0 -0
  230. /package/{Common → bin/Common}/Util/Url.d.ts +0 -0
  231. /package/{Common → bin/Common}/Util/Url.js +0 -0
  232. /package/{Common → bin/Common}/Util/Url.min.js +0 -0
  233. /package/{Common → bin/Common}/index.d.ts +0 -0
  234. /package/{Common → bin/Common}/index.js +0 -0
  235. /package/{Common → bin/Common}/index.min.js +0 -0
  236. /package/{Contributions → bin/Contributions}/Contributions.d.ts +0 -0
  237. /package/{Contributions → bin/Contributions}/Contributions.js +0 -0
  238. /package/{Contributions → bin/Contributions}/Contributions.min.js +0 -0
  239. /package/{Contributions → bin/Contributions}/ContributionsClient.d.ts +0 -0
  240. /package/{Contributions → bin/Contributions}/index.d.ts +0 -0
  241. /package/{Contributions → bin/Contributions}/index.js +0 -0
  242. /package/{Contributions → bin/Contributions}/index.min.js +0 -0
  243. /package/{Core → bin/Core}/Core.d.ts +0 -0
  244. /package/{Core → bin/Core}/Core.js +0 -0
  245. /package/{Core → bin/Core}/Core.min.js +0 -0
  246. /package/{Core → bin/Core}/CoreClient.d.ts +0 -0
  247. /package/{Core → bin/Core}/CoreClient.js +0 -0
  248. /package/{Core → bin/Core}/CoreClient.min.js +0 -0
  249. /package/{Core → bin/Core}/index.d.ts +0 -0
  250. /package/{Core → bin/Core}/index.js +0 -0
  251. /package/{Core → bin/Core}/index.min.js +0 -0
  252. /package/{Dashboard → bin/Dashboard}/Dashboard.d.ts +0 -0
  253. /package/{Dashboard → bin/Dashboard}/Dashboard.js +0 -0
  254. /package/{Dashboard → bin/Dashboard}/Dashboard.min.js +0 -0
  255. /package/{Dashboard → bin/Dashboard}/DashboardClient.d.ts +0 -0
  256. /package/{Dashboard → bin/Dashboard}/DashboardClient.js +0 -0
  257. /package/{Dashboard → bin/Dashboard}/DashboardClient.min.js +0 -0
  258. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.d.ts +0 -0
  259. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.js +0 -0
  260. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.min.js +0 -0
  261. /package/{Dashboard → bin/Dashboard}/WidgetContracts.d.ts +0 -0
  262. /package/{Dashboard → bin/Dashboard}/WidgetContracts.js +0 -0
  263. /package/{Dashboard → bin/Dashboard}/WidgetContracts.min.js +0 -0
  264. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.d.ts +0 -0
  265. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.js +0 -0
  266. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.min.js +0 -0
  267. /package/{Dashboard → bin/Dashboard}/index.d.ts +0 -0
  268. /package/{Dashboard → bin/Dashboard}/index.js +0 -0
  269. /package/{Dashboard → bin/Dashboard}/index.min.js +0 -0
  270. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.d.ts +0 -0
  271. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.js +0 -0
  272. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.min.js +0 -0
  273. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.d.ts +0 -0
  274. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.js +0 -0
  275. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.min.js +0 -0
  276. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.d.ts +0 -0
  277. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.js +0 -0
  278. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.min.js +0 -0
  279. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.d.ts +0 -0
  280. /package/{ExtensionManagement → bin/ExtensionManagement}/index.d.ts +0 -0
  281. /package/{ExtensionManagement → bin/ExtensionManagement}/index.js +0 -0
  282. /package/{ExtensionManagement → bin/ExtensionManagement}/index.min.js +0 -0
  283. /package/{Favorite → bin/Favorite}/Favorite.d.ts +0 -0
  284. /package/{Favorite → bin/Favorite}/Favorite.js +0 -0
  285. /package/{Favorite → bin/Favorite}/Favorite.min.js +0 -0
  286. /package/{Favorite → bin/Favorite}/FavoriteClient.d.ts +0 -0
  287. /package/{Favorite → bin/Favorite}/FavoriteClient.js +0 -0
  288. /package/{Favorite → bin/Favorite}/FavoriteClient.min.js +0 -0
  289. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.d.ts +0 -0
  290. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.js +0 -0
  291. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.min.js +0 -0
  292. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.d.ts +0 -0
  293. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.js +0 -0
  294. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.min.js +0 -0
  295. /package/{FeatureAvailability → bin/FeatureAvailability}/index.d.ts +0 -0
  296. /package/{FeatureAvailability → bin/FeatureAvailability}/index.js +0 -0
  297. /package/{FeatureAvailability → bin/FeatureAvailability}/index.min.js +0 -0
  298. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.d.ts +0 -0
  299. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.js +0 -0
  300. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.min.js +0 -0
  301. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.d.ts +0 -0
  302. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.js +0 -0
  303. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.min.js +0 -0
  304. /package/{FeatureManagement → bin/FeatureManagement}/index.d.ts +0 -0
  305. /package/{FeatureManagement → bin/FeatureManagement}/index.js +0 -0
  306. /package/{FeatureManagement → bin/FeatureManagement}/index.min.js +0 -0
  307. /package/{FileContainer → bin/FileContainer}/FileContainer.d.ts +0 -0
  308. /package/{FileContainer → bin/FileContainer}/FileContainer.js +0 -0
  309. /package/{FileContainer → bin/FileContainer}/FileContainer.min.js +0 -0
  310. /package/{FileContainer → bin/FileContainer}/FileContainerClient.d.ts +0 -0
  311. /package/{FileContainer → bin/FileContainer}/FileContainerClient.js +0 -0
  312. /package/{FileContainer → bin/FileContainer}/FileContainerClient.min.js +0 -0
  313. /package/{FileContainer → bin/FileContainer}/index.d.ts +0 -0
  314. /package/{FileContainer → bin/FileContainer}/index.js +0 -0
  315. /package/{FileContainer → bin/FileContainer}/index.min.js +0 -0
  316. /package/{FormInput → bin/FormInput}/FormInput.d.ts +0 -0
  317. /package/{FormInput → bin/FormInput}/FormInput.js +0 -0
  318. /package/{FormInput → bin/FormInput}/FormInput.min.js +0 -0
  319. /package/{FormInput → bin/FormInput}/index.d.ts +0 -0
  320. /package/{FormInput → bin/FormInput}/index.js +0 -0
  321. /package/{FormInput → bin/FormInput}/index.min.js +0 -0
  322. /package/{Gallery → bin/Gallery}/Gallery.d.ts +0 -0
  323. /package/{Gallery → bin/Gallery}/Gallery.js +0 -0
  324. /package/{Gallery → bin/Gallery}/Gallery.min.js +0 -0
  325. /package/{Gallery → bin/Gallery}/GalleryClient.d.ts +0 -0
  326. /package/{Gallery → bin/Gallery}/GalleryClient.js +0 -0
  327. /package/{Gallery → bin/Gallery}/GalleryClient.min.js +0 -0
  328. /package/{Gallery → bin/Gallery}/index.d.ts +0 -0
  329. /package/{Gallery → bin/Gallery}/index.js +0 -0
  330. /package/{Gallery → bin/Gallery}/index.min.js +0 -0
  331. /package/{Git → bin/Git}/CodeEditorTypes.d.ts +0 -0
  332. /package/{Git → bin/Git}/CodeEditorTypes.js +0 -0
  333. /package/{Git → bin/Git}/CodeEditorTypes.min.js +0 -0
  334. /package/{Git → bin/Git}/Git.js +0 -0
  335. /package/{Git → bin/Git}/Git.min.js +0 -0
  336. /package/{Git → bin/Git}/GitClient.d.ts +0 -0
  337. /package/{Git → bin/Git}/GitClient.js +0 -0
  338. /package/{Git → bin/Git}/GitClient.min.js +0 -0
  339. /package/{Git → bin/Git}/GitServices.d.ts +0 -0
  340. /package/{Git → bin/Git}/GitServices.js +0 -0
  341. /package/{Git → bin/Git}/GitServices.min.js +0 -0
  342. /package/{Git → bin/Git}/index.d.ts +0 -0
  343. /package/{Git → bin/Git}/index.js +0 -0
  344. /package/{Git → bin/Git}/index.min.js +0 -0
  345. /package/{Graph → bin/Graph}/Graph.d.ts +0 -0
  346. /package/{Graph → bin/Graph}/Graph.js +0 -0
  347. /package/{Graph → bin/Graph}/Graph.min.js +0 -0
  348. /package/{Graph → bin/Graph}/GraphClient.d.ts +0 -0
  349. /package/{Graph → bin/Graph}/GraphClient.js +0 -0
  350. /package/{Graph → bin/Graph}/GraphClient.min.js +0 -0
  351. /package/{Graph → bin/Graph}/index.d.ts +0 -0
  352. /package/{Graph → bin/Graph}/index.js +0 -0
  353. /package/{Graph → bin/Graph}/index.min.js +0 -0
  354. /package/{Identities → bin/Identities}/Identities.d.ts +0 -0
  355. /package/{Identities → bin/Identities}/Identities.js +0 -0
  356. /package/{Identities → bin/Identities}/Identities.min.js +0 -0
  357. /package/{Identities → bin/Identities}/IdentityProvider.d.ts +0 -0
  358. /package/{Identities → bin/Identities}/IdentityProvider.js +0 -0
  359. /package/{Identities → bin/Identities}/IdentityProvider.min.js +0 -0
  360. /package/{Identities → bin/Identities}/IdentityService.d.ts +0 -0
  361. /package/{Identities → bin/Identities}/IdentityService.js +0 -0
  362. /package/{Identities → bin/Identities}/IdentityService.min.js +0 -0
  363. /package/{Identities → bin/Identities}/index.d.ts +0 -0
  364. /package/{Identities → bin/Identities}/index.js +0 -0
  365. /package/{Identities → bin/Identities}/index.min.js +0 -0
  366. /package/{Locations → bin/Locations}/Locations.d.ts +0 -0
  367. /package/{Locations → bin/Locations}/Locations.js +0 -0
  368. /package/{Locations → bin/Locations}/Locations.min.js +0 -0
  369. /package/{Locations → bin/Locations}/LocationsClient.d.ts +0 -0
  370. /package/{Locations → bin/Locations}/LocationsClient.js +0 -0
  371. /package/{Locations → bin/Locations}/LocationsClient.min.js +0 -0
  372. /package/{Locations → bin/Locations}/index.d.ts +0 -0
  373. /package/{Locations → bin/Locations}/index.js +0 -0
  374. /package/{Locations → bin/Locations}/index.min.js +0 -0
  375. /package/{Management → bin/Management}/Management.js +0 -0
  376. /package/{Management → bin/Management}/Management.min.js +0 -0
  377. /package/{Management → bin/Management}/ManagementClient.d.ts +0 -0
  378. /package/{Management → bin/Management}/ManagementClient.js +0 -0
  379. /package/{Management → bin/Management}/ManagementClient.min.js +0 -0
  380. /package/{Notification → bin/Notification}/Notification.d.ts +0 -0
  381. /package/{Notification → bin/Notification}/Notification.js +0 -0
  382. /package/{Notification → bin/Notification}/Notification.min.js +0 -0
  383. /package/{Notification → bin/Notification}/NotificationClient.d.ts +0 -0
  384. /package/{Notification → bin/Notification}/NotificationClient.js +0 -0
  385. /package/{Notification → bin/Notification}/NotificationClient.min.js +0 -0
  386. /package/{Notification → bin/Notification}/index.d.ts +0 -0
  387. /package/{Notification → bin/Notification}/index.js +0 -0
  388. /package/{Notification → bin/Notification}/index.min.js +0 -0
  389. /package/{Operations → bin/Operations}/Operations.d.ts +0 -0
  390. /package/{Operations → bin/Operations}/Operations.js +0 -0
  391. /package/{Operations → bin/Operations}/Operations.min.js +0 -0
  392. /package/{Operations → bin/Operations}/OperationsClient.d.ts +0 -0
  393. /package/{Operations → bin/Operations}/OperationsClient.js +0 -0
  394. /package/{Operations → bin/Operations}/OperationsClient.min.js +0 -0
  395. /package/{Operations → bin/Operations}/index.d.ts +0 -0
  396. /package/{Operations → bin/Operations}/index.js +0 -0
  397. /package/{Operations → bin/Operations}/index.min.js +0 -0
  398. /package/{Pipelines → bin/Pipelines}/Pipelines.d.ts +0 -0
  399. /package/{Pipelines → bin/Pipelines}/Pipelines.js +0 -0
  400. /package/{Pipelines → bin/Pipelines}/Pipelines.min.js +0 -0
  401. /package/{Pipelines → bin/Pipelines}/PipelinesClient.d.ts +0 -0
  402. /package/{Pipelines → bin/Pipelines}/PipelinesClient.js +0 -0
  403. /package/{Pipelines → bin/Pipelines}/PipelinesClient.min.js +0 -0
  404. /package/{Policy → bin/Policy}/Policy.d.ts +0 -0
  405. /package/{Policy → bin/Policy}/Policy.js +0 -0
  406. /package/{Policy → bin/Policy}/Policy.min.js +0 -0
  407. /package/{Policy → bin/Policy}/PolicyClient.d.ts +0 -0
  408. /package/{Policy → bin/Policy}/PolicyClient.js +0 -0
  409. /package/{Policy → bin/Policy}/PolicyClient.min.js +0 -0
  410. /package/{Policy → bin/Policy}/index.d.ts +0 -0
  411. /package/{Policy → bin/Policy}/index.js +0 -0
  412. /package/{Policy → bin/Policy}/index.min.js +0 -0
  413. /package/{Profile → bin/Profile}/Profile.d.ts +0 -0
  414. /package/{Profile → bin/Profile}/Profile.js +0 -0
  415. /package/{Profile → bin/Profile}/Profile.min.js +0 -0
  416. /package/{Profile → bin/Profile}/ProfileClient.d.ts +0 -0
  417. /package/{Profile → bin/Profile}/ProfileClient.js +0 -0
  418. /package/{Profile → bin/Profile}/ProfileClient.min.js +0 -0
  419. /package/{Profile → bin/Profile}/index.d.ts +0 -0
  420. /package/{Profile → bin/Profile}/index.js +0 -0
  421. /package/{Profile → bin/Profile}/index.min.js +0 -0
  422. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.d.ts +0 -0
  423. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.js +0 -0
  424. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.min.js +0 -0
  425. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.d.ts +0 -0
  426. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.js +0 -0
  427. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.min.js +0 -0
  428. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.d.ts +0 -0
  429. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.js +0 -0
  430. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.min.js +0 -0
  431. /package/{Release → bin/Release}/Release.d.ts +0 -0
  432. /package/{Release → bin/Release}/Release.js +0 -0
  433. /package/{Release → bin/Release}/Release.min.js +0 -0
  434. /package/{Release → bin/Release}/ReleaseClient.d.ts +0 -0
  435. /package/{Release → bin/Release}/ReleaseClient.js +0 -0
  436. /package/{Release → bin/Release}/ReleaseClient.min.js +0 -0
  437. /package/{Release → bin/Release}/index.d.ts +0 -0
  438. /package/{Release → bin/Release}/index.js +0 -0
  439. /package/{Release → bin/Release}/index.min.js +0 -0
  440. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.d.ts +0 -0
  441. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.js +0 -0
  442. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.min.js +0 -0
  443. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.d.ts +0 -0
  444. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.js +0 -0
  445. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.min.js +0 -0
  446. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.d.ts +0 -0
  447. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.js +0 -0
  448. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.min.js +0 -0
  449. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.d.ts +0 -0
  450. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.js +0 -0
  451. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.min.js +0 -0
  452. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.d.ts +0 -0
  453. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.js +0 -0
  454. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.min.js +0 -0
  455. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.d.ts +0 -0
  456. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.js +0 -0
  457. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.min.js +0 -0
  458. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.d.ts +0 -0
  459. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.js +0 -0
  460. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.min.js +0 -0
  461. /package/{ServiceHooks → bin/ServiceHooks}/index.d.ts +0 -0
  462. /package/{ServiceHooks → bin/ServiceHooks}/index.js +0 -0
  463. /package/{ServiceHooks → bin/ServiceHooks}/index.min.js +0 -0
  464. /package/{TaskAgent → bin/TaskAgent}/TaskAgent.js +0 -0
  465. /package/{TaskAgent → bin/TaskAgent}/TaskAgent.min.js +0 -0
  466. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.d.ts +0 -0
  467. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.js +0 -0
  468. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.min.js +0 -0
  469. /package/{TaskAgent → bin/TaskAgent}/index.d.ts +0 -0
  470. /package/{TaskAgent → bin/TaskAgent}/index.js +0 -0
  471. /package/{TaskAgent → bin/TaskAgent}/index.min.js +0 -0
  472. /package/{Test → bin/Test}/Test.js +0 -0
  473. /package/{Test → bin/Test}/Test.min.js +0 -0
  474. /package/{Test → bin/Test}/TestClient.d.ts +0 -0
  475. /package/{Test → bin/Test}/TestClient.js +0 -0
  476. /package/{Test → bin/Test}/TestClient.min.js +0 -0
  477. /package/{Test → bin/Test}/index.d.ts +0 -0
  478. /package/{Test → bin/Test}/index.js +0 -0
  479. /package/{Test → bin/Test}/index.min.js +0 -0
  480. /package/{TestPlan → bin/TestPlan}/TestPlan.js +0 -0
  481. /package/{TestPlan → bin/TestPlan}/TestPlan.min.js +0 -0
  482. /package/{TestPlan → bin/TestPlan}/TestPlanClient.d.ts +0 -0
  483. /package/{TestPlan → bin/TestPlan}/TestPlanClient.js +0 -0
  484. /package/{TestPlan → bin/TestPlan}/TestPlanClient.min.js +0 -0
  485. /package/{TestPlan → bin/TestPlan}/index.d.ts +0 -0
  486. /package/{TestPlan → bin/TestPlan}/index.js +0 -0
  487. /package/{TestPlan → bin/TestPlan}/index.min.js +0 -0
  488. /package/{TestResults → bin/TestResults}/TestResults.d.ts +0 -0
  489. /package/{TestResults → bin/TestResults}/TestResults.js +0 -0
  490. /package/{TestResults → bin/TestResults}/TestResults.min.js +0 -0
  491. /package/{TestResults → bin/TestResults}/index.d.ts +0 -0
  492. /package/{TestResults → bin/TestResults}/index.js +0 -0
  493. /package/{TestResults → bin/TestResults}/index.min.js +0 -0
  494. /package/{Tfvc → bin/Tfvc}/Tfvc.d.ts +0 -0
  495. /package/{Tfvc → bin/Tfvc}/Tfvc.js +0 -0
  496. /package/{Tfvc → bin/Tfvc}/Tfvc.min.js +0 -0
  497. /package/{Tfvc → bin/Tfvc}/TfvcClient.d.ts +0 -0
  498. /package/{Tfvc → bin/Tfvc}/TfvcClient.js +0 -0
  499. /package/{Tfvc → bin/Tfvc}/TfvcClient.min.js +0 -0
  500. /package/{Tfvc → bin/Tfvc}/index.d.ts +0 -0
  501. /package/{Tfvc → bin/Tfvc}/index.js +0 -0
  502. /package/{Tfvc → bin/Tfvc}/index.min.js +0 -0
  503. /package/{WebApi → bin/WebApi}/WebApi.d.ts +0 -0
  504. /package/{WebApi → bin/WebApi}/WebApi.js +0 -0
  505. /package/{WebApi → bin/WebApi}/WebApi.min.js +0 -0
  506. /package/{WebApi → bin/WebApi}/index.d.ts +0 -0
  507. /package/{WebApi → bin/WebApi}/index.js +0 -0
  508. /package/{WebApi → bin/WebApi}/index.min.js +0 -0
  509. /package/{Wiki → bin/Wiki}/Wiki.d.ts +0 -0
  510. /package/{Wiki → bin/Wiki}/Wiki.js +0 -0
  511. /package/{Wiki → bin/Wiki}/Wiki.min.js +0 -0
  512. /package/{Wiki → bin/Wiki}/WikiClient.d.ts +0 -0
  513. /package/{Wiki → bin/Wiki}/WikiClient.js +0 -0
  514. /package/{Wiki → bin/Wiki}/WikiClient.min.js +0 -0
  515. /package/{Wiki → bin/Wiki}/index.d.ts +0 -0
  516. /package/{Wiki → bin/Wiki}/index.js +0 -0
  517. /package/{Wiki → bin/Wiki}/index.min.js +0 -0
  518. /package/{Work → bin/Work}/Work.d.ts +0 -0
  519. /package/{Work → bin/Work}/Work.js +0 -0
  520. /package/{Work → bin/Work}/Work.min.js +0 -0
  521. /package/{Work → bin/Work}/WorkClient.d.ts +0 -0
  522. /package/{Work → bin/Work}/WorkClient.js +0 -0
  523. /package/{Work → bin/Work}/WorkClient.min.js +0 -0
  524. /package/{Work → bin/Work}/index.d.ts +0 -0
  525. /package/{Work → bin/Work}/index.js +0 -0
  526. /package/{Work → bin/Work}/index.min.js +0 -0
  527. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.d.ts +0 -0
  528. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.js +0 -0
  529. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.min.js +0 -0
  530. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.d.ts +0 -0
  531. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.js +0 -0
  532. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.min.js +0 -0
  533. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.d.ts +0 -0
  534. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.js +0 -0
  535. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.min.js +0 -0
  536. /package/{WorkItemTracking → bin/WorkItemTracking}/index.d.ts +0 -0
  537. /package/{WorkItemTracking → bin/WorkItemTracking}/index.js +0 -0
  538. /package/{WorkItemTracking → bin/WorkItemTracking}/index.min.js +0 -0
  539. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.d.ts +0 -0
  540. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.js +0 -0
  541. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.min.js +0 -0
  542. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.d.ts +0 -0
  543. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.js +0 -0
  544. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.min.js +0 -0
  545. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.d.ts +0 -0
  546. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.js +0 -0
  547. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.min.js +0 -0
  548. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.d.ts +0 -0
  549. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.js +0 -0
  550. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.min.js +0 -0
  551. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.d.ts +0 -0
  552. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.js +0 -0
  553. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.min.js +0 -0
  554. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.d.ts +0 -0
  555. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.js +0 -0
  556. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.min.js +0 -0
  557. /package/{index.d.ts → bin/index.d.ts} +0 -0
  558. /package/{index.js → bin/index.js} +0 -0
  559. /package/{index.min.js → bin/index.min.js} +0 -0
@@ -0,0 +1,3918 @@
1
+ /*
2
+ * ---------------------------------------------------------
3
+ * Copyright(C) Microsoft Corporation. All rights reserved.
4
+ * ---------------------------------------------------------
5
+ */
6
+
7
+ import { IVssRestClientOptions } from "../Common/Context";
8
+ import { RestClientBase } from "../Common/RestClientBase";
9
+ import { deserializeVssJsonObject } from "../Common/Util/Serialization";
10
+
11
+ import * as TaskAgent from "../TaskAgent/TaskAgent";
12
+ import * as WebApi from "../WebApi/WebApi";
13
+
14
+ export class TaskAgentRestClient extends RestClientBase {
15
+ constructor(options: IVssRestClientOptions) {
16
+ super(options);
17
+ }
18
+
19
+ public static readonly RESOURCE_AREA_ID = "a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd";
20
+
21
+ /**
22
+ * @param agentCloud -
23
+ */
24
+ public async addAgentCloud(
25
+ agentCloud: TaskAgent.TaskAgentCloud
26
+ ): Promise<TaskAgent.TaskAgentCloud> {
27
+
28
+ return this.beginRequest<TaskAgent.TaskAgentCloud>({
29
+ apiVersion: "7.2-preview.1",
30
+ method: "POST",
31
+ routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}",
32
+ body: agentCloud
33
+ });
34
+ }
35
+
36
+ /**
37
+ * @param agentCloudId -
38
+ */
39
+ public async deleteAgentCloud(
40
+ agentCloudId: number
41
+ ): Promise<TaskAgent.TaskAgentCloud> {
42
+
43
+ return this.beginRequest<TaskAgent.TaskAgentCloud>({
44
+ apiVersion: "7.2-preview.1",
45
+ method: "DELETE",
46
+ routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}",
47
+ routeValues: {
48
+ agentCloudId: agentCloudId
49
+ }
50
+ });
51
+ }
52
+
53
+ /**
54
+ * @param agentCloudId -
55
+ */
56
+ public async getAgentCloud(
57
+ agentCloudId: number
58
+ ): Promise<TaskAgent.TaskAgentCloud> {
59
+
60
+ return this.beginRequest<TaskAgent.TaskAgentCloud>({
61
+ apiVersion: "7.2-preview.1",
62
+ routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}",
63
+ routeValues: {
64
+ agentCloudId: agentCloudId
65
+ }
66
+ });
67
+ }
68
+
69
+ /**
70
+ */
71
+ public async getAgentClouds(
72
+ ): Promise<TaskAgent.TaskAgentCloud[]> {
73
+
74
+ return this.beginRequest<TaskAgent.TaskAgentCloud[]>({
75
+ apiVersion: "7.2-preview.1",
76
+ routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}"
77
+ });
78
+ }
79
+
80
+ /**
81
+ * @param updatedCloud -
82
+ * @param agentCloudId -
83
+ */
84
+ public async updateAgentCloud(
85
+ updatedCloud: TaskAgent.TaskAgentCloud,
86
+ agentCloudId: number
87
+ ): Promise<TaskAgent.TaskAgentCloud> {
88
+
89
+ return this.beginRequest<TaskAgent.TaskAgentCloud>({
90
+ apiVersion: "7.2-preview.1",
91
+ method: "PATCH",
92
+ routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}",
93
+ routeValues: {
94
+ agentCloudId: agentCloudId
95
+ },
96
+ body: updatedCloud
97
+ });
98
+ }
99
+
100
+ /**
101
+ * Get agent cloud types.
102
+ *
103
+ */
104
+ public async getAgentCloudTypes(
105
+ ): Promise<TaskAgent.TaskAgentCloudType[]> {
106
+
107
+ return this.beginRequest<TaskAgent.TaskAgentCloudType[]>({
108
+ apiVersion: "7.2-preview.1",
109
+ routeTemplate: "_apis/distributedtask/agentcloudtypes"
110
+ });
111
+ }
112
+
113
+ /**
114
+ * @param project - Project ID or project name
115
+ * @param queueId -
116
+ * @param top -
117
+ * @param continuationToken -
118
+ */
119
+ public async getAgentRequestsForQueue(
120
+ project: string,
121
+ queueId: number,
122
+ top: number,
123
+ continuationToken?: string
124
+ ): Promise<WebApi.PagedList<TaskAgent.TaskAgentJobRequest>> {
125
+
126
+ const queryValues: any = {
127
+ '$top': top,
128
+ continuationToken: continuationToken
129
+ };
130
+
131
+ return this.beginRequest<Response>({
132
+ apiVersion: "7.2-preview.1",
133
+ routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}/agentrequests/{requestId}",
134
+ routeValues: {
135
+ project: project,
136
+ queueId: queueId
137
+ },
138
+ queryParams: queryValues,
139
+ returnRawResponse: true
140
+ }).then(async response => {
141
+ const body = <WebApi.PagedList<TaskAgent.TaskAgentJobRequest>>await response.text().then(deserializeVssJsonObject);
142
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
143
+ return body;
144
+ });
145
+ }
146
+
147
+ /**
148
+ * @param request -
149
+ * @param project - Project ID or project name
150
+ * @param queueId -
151
+ */
152
+ public async queueAgentRequest(
153
+ request: TaskAgent.TaskAgentJobRequest,
154
+ project: string,
155
+ queueId: number
156
+ ): Promise<TaskAgent.TaskAgentJobRequest> {
157
+
158
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest>({
159
+ apiVersion: "7.2-preview.1",
160
+ method: "POST",
161
+ routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}/agentrequests/{requestId}",
162
+ routeValues: {
163
+ project: project,
164
+ queueId: queueId
165
+ },
166
+ body: request
167
+ });
168
+ }
169
+
170
+ /**
171
+ * Adds an agent to a pool. You probably don't want to call this endpoint directly. Instead, [configure an agent](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) using the agent download package.
172
+ *
173
+ * @param agent - Details about the agent being added
174
+ * @param poolId - The agent pool in which to add the agent
175
+ */
176
+ public async addAgent(
177
+ agent: TaskAgent.TaskAgent,
178
+ poolId: number
179
+ ): Promise<TaskAgent.TaskAgent> {
180
+
181
+ return this.beginRequest<TaskAgent.TaskAgent>({
182
+ apiVersion: "7.2-preview.1",
183
+ method: "POST",
184
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
185
+ routeValues: {
186
+ poolId: poolId
187
+ },
188
+ body: agent
189
+ });
190
+ }
191
+
192
+ /**
193
+ * Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization.
194
+ *
195
+ * @param poolId - The pool ID to remove the agent from
196
+ * @param agentId - The agent ID to remove
197
+ */
198
+ public async deleteAgent(
199
+ poolId: number,
200
+ agentId: number
201
+ ): Promise<void> {
202
+
203
+ return this.beginRequest<void>({
204
+ apiVersion: "7.2-preview.1",
205
+ method: "DELETE",
206
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
207
+ routeValues: {
208
+ poolId: poolId,
209
+ agentId: agentId
210
+ }
211
+ });
212
+ }
213
+
214
+ /**
215
+ * Get information about an agent.
216
+ *
217
+ * @param poolId - The agent pool containing the agent
218
+ * @param agentId - The agent ID to get information about
219
+ * @param includeCapabilities - Whether to include the agent's capabilities in the response
220
+ * @param includeAssignedRequest - Whether to include details about the agent's current work
221
+ * @param includeLastCompletedRequest - Whether to include details about the agents' most recent completed work
222
+ * @param propertyFilters - Filter which custom properties will be returned
223
+ */
224
+ public async getAgent(
225
+ poolId: number,
226
+ agentId: number,
227
+ includeCapabilities?: boolean,
228
+ includeAssignedRequest?: boolean,
229
+ includeLastCompletedRequest?: boolean,
230
+ propertyFilters?: string[]
231
+ ): Promise<TaskAgent.TaskAgent> {
232
+
233
+ const queryValues: any = {
234
+ includeCapabilities: includeCapabilities,
235
+ includeAssignedRequest: includeAssignedRequest,
236
+ includeLastCompletedRequest: includeLastCompletedRequest,
237
+ propertyFilters: propertyFilters && propertyFilters.join(",")
238
+ };
239
+
240
+ return this.beginRequest<TaskAgent.TaskAgent>({
241
+ apiVersion: "7.2-preview.1",
242
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
243
+ routeValues: {
244
+ poolId: poolId,
245
+ agentId: agentId
246
+ },
247
+ queryParams: queryValues
248
+ });
249
+ }
250
+
251
+ /**
252
+ * Get a list of agents.
253
+ *
254
+ * @param poolId - The agent pool containing the agents
255
+ * @param agentName - Filter on agent name
256
+ * @param includeCapabilities - Whether to include the agents' capabilities in the response
257
+ * @param includeAssignedRequest - Whether to include details about the agents' current work
258
+ * @param includeLastCompletedRequest - Whether to include details about the agents' most recent completed work
259
+ * @param propertyFilters - Filter which custom properties will be returned
260
+ * @param demands - Filter by demands the agents can satisfy
261
+ */
262
+ public async getAgents(
263
+ poolId: number,
264
+ agentName?: string,
265
+ includeCapabilities?: boolean,
266
+ includeAssignedRequest?: boolean,
267
+ includeLastCompletedRequest?: boolean,
268
+ propertyFilters?: string[],
269
+ demands?: string[]
270
+ ): Promise<TaskAgent.TaskAgent[]> {
271
+
272
+ const queryValues: any = {
273
+ agentName: agentName,
274
+ includeCapabilities: includeCapabilities,
275
+ includeAssignedRequest: includeAssignedRequest,
276
+ includeLastCompletedRequest: includeLastCompletedRequest,
277
+ propertyFilters: propertyFilters && propertyFilters.join(","),
278
+ demands: demands && demands.join(",")
279
+ };
280
+
281
+ return this.beginRequest<TaskAgent.TaskAgent[]>({
282
+ apiVersion: "7.2-preview.1",
283
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
284
+ routeValues: {
285
+ poolId: poolId
286
+ },
287
+ queryParams: queryValues
288
+ });
289
+ }
290
+
291
+ /**
292
+ * Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization.
293
+ *
294
+ * @param agent - Updated details about the replacing agent
295
+ * @param poolId - The agent pool to use
296
+ * @param agentId - The agent to replace
297
+ */
298
+ public async replaceAgent(
299
+ agent: TaskAgent.TaskAgent,
300
+ poolId: number,
301
+ agentId: number
302
+ ): Promise<TaskAgent.TaskAgent> {
303
+
304
+ return this.beginRequest<TaskAgent.TaskAgent>({
305
+ apiVersion: "7.2-preview.1",
306
+ method: "PUT",
307
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
308
+ routeValues: {
309
+ poolId: poolId,
310
+ agentId: agentId
311
+ },
312
+ body: agent
313
+ });
314
+ }
315
+
316
+ /**
317
+ * Update agent details.
318
+ *
319
+ * @param agent - Updated details about the agent
320
+ * @param poolId - The agent pool to use
321
+ * @param agentId - The agent to update
322
+ */
323
+ public async updateAgent(
324
+ agent: TaskAgent.TaskAgent,
325
+ poolId: number,
326
+ agentId: number
327
+ ): Promise<TaskAgent.TaskAgent> {
328
+
329
+ return this.beginRequest<TaskAgent.TaskAgent>({
330
+ apiVersion: "7.2-preview.1",
331
+ method: "PATCH",
332
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}",
333
+ routeValues: {
334
+ poolId: poolId,
335
+ agentId: agentId
336
+ },
337
+ body: agent
338
+ });
339
+ }
340
+
341
+ /**
342
+ * Returns list of azure subscriptions
343
+ *
344
+ */
345
+ public async getAzureManagementGroups(
346
+ ): Promise<TaskAgent.AzureManagementGroupQueryResult> {
347
+
348
+ return this.beginRequest<TaskAgent.AzureManagementGroupQueryResult>({
349
+ apiVersion: "7.2-preview.1",
350
+ routeTemplate: "_apis/distributedtask/serviceendpointproxy/azurermmanagementgroups"
351
+ });
352
+ }
353
+
354
+ /**
355
+ * Returns list of azure subscriptions
356
+ *
357
+ */
358
+ public async getAzureSubscriptions(
359
+ ): Promise<TaskAgent.AzureSubscriptionQueryResult> {
360
+
361
+ return this.beginRequest<TaskAgent.AzureSubscriptionQueryResult>({
362
+ apiVersion: "7.2-preview.1",
363
+ routeTemplate: "_apis/distributedtask/serviceendpointproxy/azurermsubscriptions"
364
+ });
365
+ }
366
+
367
+ /**
368
+ * GET a PAT token for managing (configuring, removing, tagging) deployment targets in a deployment group.
369
+ *
370
+ * @param project - Project ID or project name
371
+ * @param deploymentGroupId - ID of the deployment group in which deployment targets are managed.
372
+ */
373
+ public async generateDeploymentGroupAccessToken(
374
+ project: string,
375
+ deploymentGroupId: number
376
+ ): Promise<string> {
377
+
378
+ return this.beginRequest<string>({
379
+ apiVersion: "7.2-preview.1",
380
+ method: "POST",
381
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroupaccesstoken/{deploymentGroupId}",
382
+ routeValues: {
383
+ project: project,
384
+ deploymentGroupId: deploymentGroupId
385
+ }
386
+ });
387
+ }
388
+
389
+ /**
390
+ * Create a deployment group.
391
+ *
392
+ * @param deploymentGroup - Deployment group to create.
393
+ * @param project - Project ID or project name
394
+ */
395
+ public async addDeploymentGroup(
396
+ deploymentGroup: TaskAgent.DeploymentGroupCreateParameter,
397
+ project: string
398
+ ): Promise<TaskAgent.DeploymentGroup> {
399
+
400
+ return this.beginRequest<TaskAgent.DeploymentGroup>({
401
+ apiVersion: "7.2-preview.1",
402
+ method: "POST",
403
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",
404
+ routeValues: {
405
+ project: project
406
+ },
407
+ body: deploymentGroup
408
+ });
409
+ }
410
+
411
+ /**
412
+ * Delete a deployment group.
413
+ *
414
+ * @param project - Project ID or project name
415
+ * @param deploymentGroupId - ID of the deployment group to be deleted.
416
+ */
417
+ public async deleteDeploymentGroup(
418
+ project: string,
419
+ deploymentGroupId: number
420
+ ): Promise<void> {
421
+
422
+ return this.beginRequest<void>({
423
+ apiVersion: "7.2-preview.1",
424
+ method: "DELETE",
425
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",
426
+ routeValues: {
427
+ project: project,
428
+ deploymentGroupId: deploymentGroupId
429
+ }
430
+ });
431
+ }
432
+
433
+ /**
434
+ * Get a deployment group by its ID.
435
+ *
436
+ * @param project - Project ID or project name
437
+ * @param deploymentGroupId - ID of the deployment group.
438
+ * @param actionFilter - Get the deployment group only if this action can be performed on it.
439
+ * @param expand - Include these additional details in the returned object.
440
+ */
441
+ public async getDeploymentGroup(
442
+ project: string,
443
+ deploymentGroupId: number,
444
+ actionFilter?: TaskAgent.DeploymentGroupActionFilter,
445
+ expand?: TaskAgent.DeploymentGroupExpands
446
+ ): Promise<TaskAgent.DeploymentGroup> {
447
+
448
+ const queryValues: any = {
449
+ actionFilter: actionFilter,
450
+ '$expand': expand
451
+ };
452
+
453
+ return this.beginRequest<TaskAgent.DeploymentGroup>({
454
+ apiVersion: "7.2-preview.1",
455
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",
456
+ routeValues: {
457
+ project: project,
458
+ deploymentGroupId: deploymentGroupId
459
+ },
460
+ queryParams: queryValues
461
+ });
462
+ }
463
+
464
+ /**
465
+ * Get a list of deployment groups by name or IDs.
466
+ *
467
+ * @param project - Project ID or project name
468
+ * @param name - Name of the deployment group.
469
+ * @param actionFilter - Get only deployment groups on which this action can be performed.
470
+ * @param expand - Include these additional details in the returned objects.
471
+ * @param continuationToken - Get deployment groups with names greater than this continuationToken lexicographically.
472
+ * @param top - Maximum number of deployment groups to return. Default is **1000**.
473
+ * @param ids - Comma separated list of IDs of the deployment groups.
474
+ */
475
+ public async getDeploymentGroups(
476
+ project: string,
477
+ name?: string,
478
+ actionFilter?: TaskAgent.DeploymentGroupActionFilter,
479
+ expand?: TaskAgent.DeploymentGroupExpands,
480
+ continuationToken?: string,
481
+ top?: number,
482
+ ids?: number[]
483
+ ): Promise<WebApi.PagedList<TaskAgent.DeploymentGroup>> {
484
+
485
+ const queryValues: any = {
486
+ name: name,
487
+ actionFilter: actionFilter,
488
+ '$expand': expand,
489
+ continuationToken: continuationToken,
490
+ '$top': top,
491
+ ids: ids && ids.join(",")
492
+ };
493
+
494
+ return this.beginRequest<Response>({
495
+ apiVersion: "7.2-preview.1",
496
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",
497
+ routeValues: {
498
+ project: project
499
+ },
500
+ queryParams: queryValues,
501
+ returnRawResponse: true
502
+ }).then(async response => {
503
+ const body = <WebApi.PagedList<TaskAgent.DeploymentGroup>>await response.text().then(deserializeVssJsonObject);
504
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
505
+ return body;
506
+ });
507
+ }
508
+
509
+ /**
510
+ * Update a deployment group.
511
+ *
512
+ * @param deploymentGroup - Deployment group to update.
513
+ * @param project - Project ID or project name
514
+ * @param deploymentGroupId - ID of the deployment group.
515
+ */
516
+ public async updateDeploymentGroup(
517
+ deploymentGroup: TaskAgent.DeploymentGroupUpdateParameter,
518
+ project: string,
519
+ deploymentGroupId: number
520
+ ): Promise<TaskAgent.DeploymentGroup> {
521
+
522
+ return this.beginRequest<TaskAgent.DeploymentGroup>({
523
+ apiVersion: "7.2-preview.1",
524
+ method: "PATCH",
525
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}",
526
+ routeValues: {
527
+ project: project,
528
+ deploymentGroupId: deploymentGroupId
529
+ },
530
+ body: deploymentGroup
531
+ });
532
+ }
533
+
534
+ /**
535
+ * Get a list of deployment group metrics.
536
+ *
537
+ * @param project - Project ID or project name
538
+ * @param deploymentGroupName - Name of the deployment group.
539
+ * @param continuationToken - Get metrics for deployment groups with names greater than this continuationToken lexicographically.
540
+ * @param top - Maximum number of deployment group metrics to return. Default is **50**.
541
+ */
542
+ public async getDeploymentGroupsMetrics(
543
+ project: string,
544
+ deploymentGroupName?: string,
545
+ continuationToken?: string,
546
+ top?: number
547
+ ): Promise<WebApi.PagedList<TaskAgent.DeploymentGroupMetrics>> {
548
+
549
+ const queryValues: any = {
550
+ deploymentGroupName: deploymentGroupName,
551
+ continuationToken: continuationToken,
552
+ '$top': top
553
+ };
554
+
555
+ return this.beginRequest<Response>({
556
+ apiVersion: "7.2-preview.1",
557
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/deploymentgroupsmetrics",
558
+ routeValues: {
559
+ project: project
560
+ },
561
+ queryParams: queryValues,
562
+ returnRawResponse: true
563
+ }).then(async response => {
564
+ const body = <WebApi.PagedList<TaskAgent.DeploymentGroupMetrics>>await response.text().then(deserializeVssJsonObject);
565
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
566
+ return body;
567
+ });
568
+ }
569
+
570
+ /**
571
+ * @param project - Project ID or project name
572
+ * @param deploymentGroupId -
573
+ * @param machineId -
574
+ * @param completedRequestCount -
575
+ */
576
+ public async getAgentRequestsForDeploymentMachine(
577
+ project: string,
578
+ deploymentGroupId: number,
579
+ machineId: number,
580
+ completedRequestCount?: number
581
+ ): Promise<TaskAgent.TaskAgentJobRequest[]> {
582
+
583
+ const queryValues: any = {
584
+ machineId: machineId,
585
+ completedRequestCount: completedRequestCount
586
+ };
587
+
588
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest[]>({
589
+ apiVersion: "7.2-preview.1",
590
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinejobrequests/{requestId}",
591
+ routeValues: {
592
+ project: project,
593
+ deploymentGroupId: deploymentGroupId
594
+ },
595
+ queryParams: queryValues
596
+ });
597
+ }
598
+
599
+ /**
600
+ * @param project - Project ID or project name
601
+ * @param deploymentGroupId -
602
+ * @param machineIds -
603
+ * @param completedRequestCount -
604
+ */
605
+ public async getAgentRequestsForDeploymentMachines(
606
+ project: string,
607
+ deploymentGroupId: number,
608
+ machineIds?: number[],
609
+ completedRequestCount?: number
610
+ ): Promise<TaskAgent.TaskAgentJobRequest[]> {
611
+
612
+ const queryValues: any = {
613
+ machineIds: machineIds && machineIds.join(","),
614
+ completedRequestCount: completedRequestCount
615
+ };
616
+
617
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest[]>({
618
+ apiVersion: "7.2-preview.1",
619
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinejobrequests/{requestId}",
620
+ routeValues: {
621
+ project: project,
622
+ deploymentGroupId: deploymentGroupId
623
+ },
624
+ queryParams: queryValues
625
+ });
626
+ }
627
+
628
+ /**
629
+ * @param project - Project ID or project name
630
+ * @param deploymentGroupId -
631
+ */
632
+ public async refreshDeploymentMachines(
633
+ project: string,
634
+ deploymentGroupId: number
635
+ ): Promise<void> {
636
+
637
+ return this.beginRequest<void>({
638
+ apiVersion: "7.2-preview.1",
639
+ method: "POST",
640
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentmachinemessages",
641
+ routeValues: {
642
+ project: project,
643
+ deploymentGroupId: deploymentGroupId
644
+ }
645
+ });
646
+ }
647
+
648
+ /**
649
+ * GET a PAT token for managing (configuring, removing, tagging) deployment agents in a deployment pool.
650
+ *
651
+ * @param poolId - ID of the deployment pool in which deployment agents are managed.
652
+ */
653
+ public async generateDeploymentPoolAccessToken(
654
+ poolId: number
655
+ ): Promise<string> {
656
+
657
+ return this.beginRequest<string>({
658
+ apiVersion: "7.2-preview.1",
659
+ method: "POST",
660
+ routeTemplate: "_apis/distributedtask/deploymentpoolaccesstoken/{poolId}",
661
+ routeValues: {
662
+ poolId: poolId
663
+ }
664
+ });
665
+ }
666
+
667
+ /**
668
+ * Get a list of deployment pool summaries.
669
+ *
670
+ * @param poolName - Name of the deployment pool.
671
+ * @param expands - Include these additional details in the returned objects.
672
+ * @param poolIds - List of deployment pool ids.
673
+ */
674
+ public async getDeploymentPoolsSummary(
675
+ poolName?: string,
676
+ expands?: TaskAgent.DeploymentPoolSummaryExpands,
677
+ poolIds?: number[]
678
+ ): Promise<TaskAgent.DeploymentPoolSummary[]> {
679
+
680
+ const queryValues: any = {
681
+ poolName: poolName,
682
+ expands: expands,
683
+ poolIds: poolIds && poolIds.join(",")
684
+ };
685
+
686
+ return this.beginRequest<TaskAgent.DeploymentPoolSummary[]>({
687
+ apiVersion: "7.2-preview.1",
688
+ routeTemplate: "_apis/distributedtask/deploymentPools/deploymentPoolsSummary",
689
+ queryParams: queryValues
690
+ });
691
+ }
692
+
693
+ /**
694
+ * Get agent requests for a deployment target.
695
+ *
696
+ * @param project - Project ID or project name
697
+ * @param deploymentGroupId - ID of the deployment group to which the target belongs.
698
+ * @param targetId - ID of the deployment target.
699
+ * @param completedRequestCount - Maximum number of completed requests to return. Default is **50**
700
+ */
701
+ public async getAgentRequestsForDeploymentTarget(
702
+ project: string,
703
+ deploymentGroupId: number,
704
+ targetId: number,
705
+ completedRequestCount?: number
706
+ ): Promise<TaskAgent.TaskAgentJobRequest[]> {
707
+
708
+ const queryValues: any = {
709
+ targetId: targetId,
710
+ completedRequestCount: completedRequestCount
711
+ };
712
+
713
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest[]>({
714
+ apiVersion: "7.2-preview.1",
715
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetJobRequests",
716
+ routeValues: {
717
+ project: project,
718
+ deploymentGroupId: deploymentGroupId
719
+ },
720
+ queryParams: queryValues
721
+ });
722
+ }
723
+
724
+ /**
725
+ * Get agent requests for a list deployment targets.
726
+ *
727
+ * @param project - Project ID or project name
728
+ * @param deploymentGroupId - ID of the deployment group to which the targets belong.
729
+ * @param targetIds - Comma separated list of IDs of the deployment targets.
730
+ * @param ownerId - Id of owner of agent job request.
731
+ * @param completedOn - Datetime to return request after this time.
732
+ * @param completedRequestCount - Maximum number of completed requests to return for each target. Default is **50**
733
+ */
734
+ public async getAgentRequestsForDeploymentTargets(
735
+ project: string,
736
+ deploymentGroupId: number,
737
+ targetIds?: number[],
738
+ ownerId?: number,
739
+ completedOn?: Date,
740
+ completedRequestCount?: number
741
+ ): Promise<TaskAgent.TaskAgentJobRequest[]> {
742
+
743
+ const queryValues: any = {
744
+ targetIds: targetIds && targetIds.join(","),
745
+ ownerId: ownerId,
746
+ completedOn: completedOn,
747
+ completedRequestCount: completedRequestCount
748
+ };
749
+
750
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest[]>({
751
+ apiVersion: "7.2-preview.1",
752
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetJobRequests",
753
+ routeValues: {
754
+ project: project,
755
+ deploymentGroupId: deploymentGroupId
756
+ },
757
+ queryParams: queryValues
758
+ });
759
+ }
760
+
761
+ /**
762
+ * Upgrade the deployment targets in a deployment group.
763
+ *
764
+ * @param project - Project ID or project name
765
+ * @param deploymentGroupId - ID of the deployment group.
766
+ */
767
+ public async refreshDeploymentTargets(
768
+ project: string,
769
+ deploymentGroupId: number
770
+ ): Promise<void> {
771
+
772
+ return this.beginRequest<void>({
773
+ apiVersion: "7.2-preview.1",
774
+ method: "POST",
775
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/deploymentTargetMessages",
776
+ routeValues: {
777
+ project: project,
778
+ deploymentGroupId: deploymentGroupId
779
+ }
780
+ });
781
+ }
782
+
783
+ /**
784
+ * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector.
785
+ *
786
+ * @param endpoint - Describes the URL to fetch.
787
+ */
788
+ public async queryEndpoint(
789
+ endpoint: TaskAgent.TaskDefinitionEndpoint
790
+ ): Promise<string[]> {
791
+
792
+ return this.beginRequest<string[]>({
793
+ apiVersion: "7.2-preview.1",
794
+ method: "POST",
795
+ routeTemplate: "_apis/distributedtask/endpoint",
796
+ body: endpoint
797
+ });
798
+ }
799
+
800
+ /**
801
+ * Get environment deployment execution history
802
+ *
803
+ * @param project - Project ID or project name
804
+ * @param environmentId -
805
+ * @param continuationToken -
806
+ * @param top -
807
+ */
808
+ public async getEnvironmentDeploymentExecutionRecords(
809
+ project: string,
810
+ environmentId: number,
811
+ continuationToken?: string,
812
+ top?: number
813
+ ): Promise<WebApi.PagedList<TaskAgent.EnvironmentDeploymentExecutionRecord>> {
814
+
815
+ const queryValues: any = {
816
+ continuationToken: continuationToken,
817
+ top: top
818
+ };
819
+
820
+ return this.beginRequest<Response>({
821
+ apiVersion: "7.2-preview.1",
822
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/environmentdeploymentRecords",
823
+ routeValues: {
824
+ project: project,
825
+ environmentId: environmentId
826
+ },
827
+ queryParams: queryValues,
828
+ returnRawResponse: true
829
+ }).then(async response => {
830
+ const body = <WebApi.PagedList<TaskAgent.EnvironmentDeploymentExecutionRecord>>await response.text().then(deserializeVssJsonObject);
831
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
832
+ return body;
833
+ });
834
+ }
835
+
836
+ /**
837
+ * Create an environment.
838
+ *
839
+ * @param environmentCreateParameter - Environment to create.
840
+ * @param project - Project ID or project name
841
+ */
842
+ public async addEnvironment(
843
+ environmentCreateParameter: TaskAgent.EnvironmentCreateParameter,
844
+ project: string
845
+ ): Promise<TaskAgent.EnvironmentInstance> {
846
+
847
+ return this.beginRequest<TaskAgent.EnvironmentInstance>({
848
+ apiVersion: "7.2-preview.1",
849
+ method: "POST",
850
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}",
851
+ routeValues: {
852
+ project: project
853
+ },
854
+ body: environmentCreateParameter
855
+ });
856
+ }
857
+
858
+ /**
859
+ * Delete the specified environment.
860
+ *
861
+ * @param project - Project ID or project name
862
+ * @param environmentId - ID of the environment.
863
+ */
864
+ public async deleteEnvironment(
865
+ project: string,
866
+ environmentId: number
867
+ ): Promise<void> {
868
+
869
+ return this.beginRequest<void>({
870
+ apiVersion: "7.2-preview.1",
871
+ method: "DELETE",
872
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}",
873
+ routeValues: {
874
+ project: project,
875
+ environmentId: environmentId
876
+ }
877
+ });
878
+ }
879
+
880
+ /**
881
+ * Get an environment by its ID.
882
+ *
883
+ * @param project - Project ID or project name
884
+ * @param environmentId - ID of the environment.
885
+ * @param expands - Include these additional details in the returned objects.
886
+ */
887
+ public async getEnvironmentById(
888
+ project: string,
889
+ environmentId: number,
890
+ expands?: TaskAgent.EnvironmentExpands
891
+ ): Promise<TaskAgent.EnvironmentInstance> {
892
+
893
+ const queryValues: any = {
894
+ expands: expands
895
+ };
896
+
897
+ return this.beginRequest<TaskAgent.EnvironmentInstance>({
898
+ apiVersion: "7.2-preview.1",
899
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}",
900
+ routeValues: {
901
+ project: project,
902
+ environmentId: environmentId
903
+ },
904
+ queryParams: queryValues
905
+ });
906
+ }
907
+
908
+ /**
909
+ * Get all environments.
910
+ *
911
+ * @param project - Project ID or project name
912
+ * @param name -
913
+ * @param continuationToken -
914
+ * @param top -
915
+ */
916
+ public async getEnvironments(
917
+ project: string,
918
+ name?: string,
919
+ continuationToken?: string,
920
+ top?: number
921
+ ): Promise<WebApi.PagedList<TaskAgent.EnvironmentInstance>> {
922
+
923
+ const queryValues: any = {
924
+ name: name,
925
+ continuationToken: continuationToken,
926
+ '$top': top
927
+ };
928
+
929
+ return this.beginRequest<Response>({
930
+ apiVersion: "7.2-preview.1",
931
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}",
932
+ routeValues: {
933
+ project: project
934
+ },
935
+ queryParams: queryValues,
936
+ returnRawResponse: true
937
+ }).then(async response => {
938
+ const body = <WebApi.PagedList<TaskAgent.EnvironmentInstance>>await response.text().then(deserializeVssJsonObject);
939
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
940
+ return body;
941
+ });
942
+ }
943
+
944
+ /**
945
+ * Update the specified environment.
946
+ *
947
+ * @param environmentUpdateParameter - Environment data to update.
948
+ * @param project - Project ID or project name
949
+ * @param environmentId - ID of the environment.
950
+ */
951
+ public async updateEnvironment(
952
+ environmentUpdateParameter: TaskAgent.EnvironmentUpdateParameter,
953
+ project: string,
954
+ environmentId: number
955
+ ): Promise<TaskAgent.EnvironmentInstance> {
956
+
957
+ return this.beginRequest<TaskAgent.EnvironmentInstance>({
958
+ apiVersion: "7.2-preview.1",
959
+ method: "PATCH",
960
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}",
961
+ routeValues: {
962
+ project: project,
963
+ environmentId: environmentId
964
+ },
965
+ body: environmentUpdateParameter
966
+ });
967
+ }
968
+
969
+ /**
970
+ * @param hubName -
971
+ * @param includeEnterpriseUsersCount -
972
+ * @param includeHostedAgentMinutesCount -
973
+ */
974
+ public async getTaskHubLicenseDetails(
975
+ hubName: string,
976
+ includeEnterpriseUsersCount?: boolean,
977
+ includeHostedAgentMinutesCount?: boolean
978
+ ): Promise<TaskAgent.TaskHubLicenseDetails> {
979
+
980
+ const queryValues: any = {
981
+ includeEnterpriseUsersCount: includeEnterpriseUsersCount,
982
+ includeHostedAgentMinutesCount: includeHostedAgentMinutesCount
983
+ };
984
+
985
+ return this.beginRequest<TaskAgent.TaskHubLicenseDetails>({
986
+ apiVersion: "7.2-preview.3",
987
+ routeTemplate: "_apis/distributedtask/hublicense/{hubName}",
988
+ routeValues: {
989
+ hubName: hubName
990
+ },
991
+ queryParams: queryValues
992
+ });
993
+ }
994
+
995
+ /**
996
+ * @param taskHubLicenseDetails -
997
+ * @param hubName -
998
+ */
999
+ public async updateTaskHubLicenseDetails(
1000
+ taskHubLicenseDetails: TaskAgent.TaskHubLicenseDetails,
1001
+ hubName: string
1002
+ ): Promise<TaskAgent.TaskHubLicenseDetails> {
1003
+
1004
+ return this.beginRequest<TaskAgent.TaskHubLicenseDetails>({
1005
+ apiVersion: "7.2-preview.3",
1006
+ method: "PUT",
1007
+ routeTemplate: "_apis/distributedtask/hublicense/{hubName}",
1008
+ routeValues: {
1009
+ hubName: hubName
1010
+ },
1011
+ body: taskHubLicenseDetails
1012
+ });
1013
+ }
1014
+
1015
+ /**
1016
+ * @param inputValidationRequest -
1017
+ */
1018
+ public async validateInputs(
1019
+ inputValidationRequest: TaskAgent.InputValidationRequest
1020
+ ): Promise<TaskAgent.InputValidationRequest> {
1021
+
1022
+ return this.beginRequest<TaskAgent.InputValidationRequest>({
1023
+ apiVersion: "7.2-preview.1",
1024
+ method: "POST",
1025
+ routeTemplate: "_apis/distributedtask/inputvalidation",
1026
+ body: inputValidationRequest
1027
+ });
1028
+ }
1029
+
1030
+ /**
1031
+ * @param poolId -
1032
+ * @param requestId -
1033
+ * @param lockToken -
1034
+ * @param result -
1035
+ * @param agentShuttingDown -
1036
+ */
1037
+ public async deleteAgentRequest(
1038
+ poolId: number,
1039
+ requestId: number,
1040
+ lockToken: string,
1041
+ result?: TaskAgent.TaskResult,
1042
+ agentShuttingDown?: boolean
1043
+ ): Promise<void> {
1044
+
1045
+ const queryValues: any = {
1046
+ lockToken: lockToken,
1047
+ result: result,
1048
+ agentShuttingDown: agentShuttingDown
1049
+ };
1050
+
1051
+ return this.beginRequest<void>({
1052
+ apiVersion: "7.2-preview.1",
1053
+ method: "DELETE",
1054
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
1055
+ routeValues: {
1056
+ poolId: poolId,
1057
+ requestId: requestId
1058
+ },
1059
+ queryParams: queryValues
1060
+ });
1061
+ }
1062
+
1063
+ /**
1064
+ * @param poolId -
1065
+ * @param requestId -
1066
+ * @param includeStatus -
1067
+ */
1068
+ public async getAgentRequest(
1069
+ poolId: number,
1070
+ requestId: number,
1071
+ includeStatus?: boolean
1072
+ ): Promise<TaskAgent.TaskAgentJobRequest> {
1073
+
1074
+ const queryValues: any = {
1075
+ includeStatus: includeStatus
1076
+ };
1077
+
1078
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest>({
1079
+ apiVersion: "7.2-preview.1",
1080
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
1081
+ routeValues: {
1082
+ poolId: poolId,
1083
+ requestId: requestId
1084
+ },
1085
+ queryParams: queryValues
1086
+ });
1087
+ }
1088
+
1089
+ /**
1090
+ * @param poolId -
1091
+ * @param top -
1092
+ * @param continuationToken -
1093
+ */
1094
+ public async getAgentRequests(
1095
+ poolId: number,
1096
+ top: number,
1097
+ continuationToken?: string
1098
+ ): Promise<WebApi.PagedList<TaskAgent.TaskAgentJobRequest>> {
1099
+
1100
+ const queryValues: any = {
1101
+ '$top': top,
1102
+ continuationToken: continuationToken
1103
+ };
1104
+
1105
+ return this.beginRequest<Response>({
1106
+ apiVersion: "7.2-preview.1",
1107
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
1108
+ routeValues: {
1109
+ poolId: poolId
1110
+ },
1111
+ queryParams: queryValues,
1112
+ returnRawResponse: true
1113
+ }).then(async response => {
1114
+ const body = <WebApi.PagedList<TaskAgent.TaskAgentJobRequest>>await response.text().then(deserializeVssJsonObject);
1115
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
1116
+ return body;
1117
+ });
1118
+ }
1119
+
1120
+ /**
1121
+ * @param poolId -
1122
+ * @param agentId -
1123
+ * @param completedRequestCount -
1124
+ */
1125
+ public async getAgentRequestsForAgent(
1126
+ poolId: number,
1127
+ agentId: number,
1128
+ completedRequestCount?: number
1129
+ ): Promise<TaskAgent.TaskAgentJobRequest[]> {
1130
+
1131
+ const queryValues: any = {
1132
+ agentId: agentId,
1133
+ completedRequestCount: completedRequestCount
1134
+ };
1135
+
1136
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest[]>({
1137
+ apiVersion: "7.2-preview.1",
1138
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
1139
+ routeValues: {
1140
+ poolId: poolId
1141
+ },
1142
+ queryParams: queryValues
1143
+ });
1144
+ }
1145
+
1146
+ /**
1147
+ * @param poolId -
1148
+ * @param agentIds -
1149
+ * @param completedRequestCount -
1150
+ */
1151
+ public async getAgentRequestsForAgents(
1152
+ poolId: number,
1153
+ agentIds?: number[],
1154
+ completedRequestCount?: number
1155
+ ): Promise<TaskAgent.TaskAgentJobRequest[]> {
1156
+
1157
+ const queryValues: any = {
1158
+ agentIds: agentIds && agentIds.join(","),
1159
+ completedRequestCount: completedRequestCount
1160
+ };
1161
+
1162
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest[]>({
1163
+ apiVersion: "7.2-preview.1",
1164
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
1165
+ routeValues: {
1166
+ poolId: poolId
1167
+ },
1168
+ queryParams: queryValues
1169
+ });
1170
+ }
1171
+
1172
+ /**
1173
+ * @param poolId -
1174
+ * @param planId -
1175
+ * @param jobId -
1176
+ */
1177
+ public async getAgentRequestsForPlan(
1178
+ poolId: number,
1179
+ planId: string,
1180
+ jobId?: string
1181
+ ): Promise<TaskAgent.TaskAgentJobRequest[]> {
1182
+
1183
+ const queryValues: any = {
1184
+ planId: planId,
1185
+ jobId: jobId
1186
+ };
1187
+
1188
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest[]>({
1189
+ apiVersion: "7.2-preview.1",
1190
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
1191
+ routeValues: {
1192
+ poolId: poolId
1193
+ },
1194
+ queryParams: queryValues
1195
+ });
1196
+ }
1197
+
1198
+ /**
1199
+ * @param request -
1200
+ * @param poolId -
1201
+ */
1202
+ public async queueAgentRequestByPool(
1203
+ request: TaskAgent.TaskAgentJobRequest,
1204
+ poolId: number
1205
+ ): Promise<TaskAgent.TaskAgentJobRequest> {
1206
+
1207
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest>({
1208
+ apiVersion: "7.2-preview.1",
1209
+ method: "POST",
1210
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
1211
+ routeValues: {
1212
+ poolId: poolId
1213
+ },
1214
+ body: request
1215
+ });
1216
+ }
1217
+
1218
+ /**
1219
+ * @param request -
1220
+ * @param poolId -
1221
+ * @param requestId -
1222
+ * @param lockToken -
1223
+ * @param updateOptions -
1224
+ */
1225
+ public async updateAgentRequest(
1226
+ request: TaskAgent.TaskAgentJobRequest,
1227
+ poolId: number,
1228
+ requestId: number,
1229
+ lockToken: string,
1230
+ updateOptions?: TaskAgent.TaskAgentRequestUpdateOptions
1231
+ ): Promise<TaskAgent.TaskAgentJobRequest> {
1232
+
1233
+ const queryValues: any = {
1234
+ lockToken: lockToken,
1235
+ updateOptions: updateOptions
1236
+ };
1237
+
1238
+ return this.beginRequest<TaskAgent.TaskAgentJobRequest>({
1239
+ apiVersion: "7.2-preview.1",
1240
+ method: "PATCH",
1241
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/jobrequests/{requestId}",
1242
+ routeValues: {
1243
+ poolId: poolId,
1244
+ requestId: requestId
1245
+ },
1246
+ queryParams: queryValues,
1247
+ body: request
1248
+ });
1249
+ }
1250
+
1251
+ /**
1252
+ * @param createParameters -
1253
+ * @param project - Project ID or project name
1254
+ * @param environmentId -
1255
+ */
1256
+ public async addKubernetesResource(
1257
+ createParameters: TaskAgent.KubernetesResourceCreateParameters,
1258
+ project: string,
1259
+ environmentId: number
1260
+ ): Promise<TaskAgent.KubernetesResource> {
1261
+
1262
+ return this.beginRequest<TaskAgent.KubernetesResource>({
1263
+ apiVersion: "7.2-preview.1",
1264
+ method: "POST",
1265
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/kubernetes/{resourceId}",
1266
+ routeValues: {
1267
+ project: project,
1268
+ environmentId: environmentId
1269
+ },
1270
+ body: createParameters
1271
+ });
1272
+ }
1273
+
1274
+ /**
1275
+ * @param project - Project ID or project name
1276
+ * @param environmentId -
1277
+ * @param resourceId -
1278
+ */
1279
+ public async deleteKubernetesResource(
1280
+ project: string,
1281
+ environmentId: number,
1282
+ resourceId: number
1283
+ ): Promise<void> {
1284
+
1285
+ return this.beginRequest<void>({
1286
+ apiVersion: "7.2-preview.1",
1287
+ method: "DELETE",
1288
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/kubernetes/{resourceId}",
1289
+ routeValues: {
1290
+ project: project,
1291
+ environmentId: environmentId,
1292
+ resourceId: resourceId
1293
+ }
1294
+ });
1295
+ }
1296
+
1297
+ /**
1298
+ * @param project - Project ID or project name
1299
+ * @param environmentId -
1300
+ * @param resourceId -
1301
+ */
1302
+ public async getKubernetesResource(
1303
+ project: string,
1304
+ environmentId: number,
1305
+ resourceId: number
1306
+ ): Promise<TaskAgent.KubernetesResource> {
1307
+
1308
+ return this.beginRequest<TaskAgent.KubernetesResource>({
1309
+ apiVersion: "7.2-preview.1",
1310
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/kubernetes/{resourceId}",
1311
+ routeValues: {
1312
+ project: project,
1313
+ environmentId: environmentId,
1314
+ resourceId: resourceId
1315
+ }
1316
+ });
1317
+ }
1318
+
1319
+ /**
1320
+ * @param project - Project ID or project name
1321
+ * @param machineGroupId -
1322
+ */
1323
+ public async generateDeploymentMachineGroupAccessToken(
1324
+ project: string,
1325
+ machineGroupId: number
1326
+ ): Promise<string> {
1327
+
1328
+ return this.beginRequest<string>({
1329
+ apiVersion: "7.2-preview.1",
1330
+ method: "POST",
1331
+ routeTemplate: "{project}/_apis/distributedtask/machinegroupaccesstoken/{machineGroupId}",
1332
+ routeValues: {
1333
+ project: project,
1334
+ machineGroupId: machineGroupId
1335
+ }
1336
+ });
1337
+ }
1338
+
1339
+ /**
1340
+ * @param machineGroup -
1341
+ * @param project - Project ID or project name
1342
+ */
1343
+ public async addDeploymentMachineGroup(
1344
+ machineGroup: TaskAgent.DeploymentMachineGroup,
1345
+ project: string
1346
+ ): Promise<TaskAgent.DeploymentMachineGroup> {
1347
+
1348
+ return this.beginRequest<TaskAgent.DeploymentMachineGroup>({
1349
+ apiVersion: "7.2-preview.1",
1350
+ method: "POST",
1351
+ routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}",
1352
+ routeValues: {
1353
+ project: project
1354
+ },
1355
+ body: machineGroup
1356
+ });
1357
+ }
1358
+
1359
+ /**
1360
+ * @param project - Project ID or project name
1361
+ * @param machineGroupId -
1362
+ */
1363
+ public async deleteDeploymentMachineGroup(
1364
+ project: string,
1365
+ machineGroupId: number
1366
+ ): Promise<void> {
1367
+
1368
+ return this.beginRequest<void>({
1369
+ apiVersion: "7.2-preview.1",
1370
+ method: "DELETE",
1371
+ routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}",
1372
+ routeValues: {
1373
+ project: project,
1374
+ machineGroupId: machineGroupId
1375
+ }
1376
+ });
1377
+ }
1378
+
1379
+ /**
1380
+ * @param project - Project ID or project name
1381
+ * @param machineGroupId -
1382
+ * @param actionFilter -
1383
+ */
1384
+ public async getDeploymentMachineGroup(
1385
+ project: string,
1386
+ machineGroupId: number,
1387
+ actionFilter?: TaskAgent.MachineGroupActionFilter
1388
+ ): Promise<TaskAgent.DeploymentMachineGroup> {
1389
+
1390
+ const queryValues: any = {
1391
+ actionFilter: actionFilter
1392
+ };
1393
+
1394
+ return this.beginRequest<TaskAgent.DeploymentMachineGroup>({
1395
+ apiVersion: "7.2-preview.1",
1396
+ routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}",
1397
+ routeValues: {
1398
+ project: project,
1399
+ machineGroupId: machineGroupId
1400
+ },
1401
+ queryParams: queryValues
1402
+ });
1403
+ }
1404
+
1405
+ /**
1406
+ * @param project - Project ID or project name
1407
+ * @param machineGroupName -
1408
+ * @param actionFilter -
1409
+ */
1410
+ public async getDeploymentMachineGroups(
1411
+ project: string,
1412
+ machineGroupName?: string,
1413
+ actionFilter?: TaskAgent.MachineGroupActionFilter
1414
+ ): Promise<TaskAgent.DeploymentMachineGroup[]> {
1415
+
1416
+ const queryValues: any = {
1417
+ machineGroupName: machineGroupName,
1418
+ actionFilter: actionFilter
1419
+ };
1420
+
1421
+ return this.beginRequest<TaskAgent.DeploymentMachineGroup[]>({
1422
+ apiVersion: "7.2-preview.1",
1423
+ routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}",
1424
+ routeValues: {
1425
+ project: project
1426
+ },
1427
+ queryParams: queryValues
1428
+ });
1429
+ }
1430
+
1431
+ /**
1432
+ * @param machineGroup -
1433
+ * @param project - Project ID or project name
1434
+ * @param machineGroupId -
1435
+ */
1436
+ public async updateDeploymentMachineGroup(
1437
+ machineGroup: TaskAgent.DeploymentMachineGroup,
1438
+ project: string,
1439
+ machineGroupId: number
1440
+ ): Promise<TaskAgent.DeploymentMachineGroup> {
1441
+
1442
+ return this.beginRequest<TaskAgent.DeploymentMachineGroup>({
1443
+ apiVersion: "7.2-preview.1",
1444
+ method: "PATCH",
1445
+ routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}",
1446
+ routeValues: {
1447
+ project: project,
1448
+ machineGroupId: machineGroupId
1449
+ },
1450
+ body: machineGroup
1451
+ });
1452
+ }
1453
+
1454
+ /**
1455
+ * @param project - Project ID or project name
1456
+ * @param machineGroupId -
1457
+ * @param tagFilters -
1458
+ */
1459
+ public async getDeploymentMachineGroupMachines(
1460
+ project: string,
1461
+ machineGroupId: number,
1462
+ tagFilters?: string[]
1463
+ ): Promise<TaskAgent.DeploymentMachine[]> {
1464
+
1465
+ const queryValues: any = {
1466
+ tagFilters: tagFilters && tagFilters.join(",")
1467
+ };
1468
+
1469
+ return this.beginRequest<TaskAgent.DeploymentMachine[]>({
1470
+ apiVersion: "7.2-preview.1",
1471
+ routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}/machines",
1472
+ routeValues: {
1473
+ project: project,
1474
+ machineGroupId: machineGroupId
1475
+ },
1476
+ queryParams: queryValues
1477
+ });
1478
+ }
1479
+
1480
+ /**
1481
+ * @param deploymentMachines -
1482
+ * @param project - Project ID or project name
1483
+ * @param machineGroupId -
1484
+ */
1485
+ public async updateDeploymentMachineGroupMachines(
1486
+ deploymentMachines: TaskAgent.DeploymentMachine[],
1487
+ project: string,
1488
+ machineGroupId: number
1489
+ ): Promise<TaskAgent.DeploymentMachine[]> {
1490
+
1491
+ return this.beginRequest<TaskAgent.DeploymentMachine[]>({
1492
+ apiVersion: "7.2-preview.1",
1493
+ method: "PATCH",
1494
+ routeTemplate: "{project}/_apis/distributedtask/machinegroups/{machineGroupId}/machines",
1495
+ routeValues: {
1496
+ project: project,
1497
+ machineGroupId: machineGroupId
1498
+ },
1499
+ body: deploymentMachines
1500
+ });
1501
+ }
1502
+
1503
+ /**
1504
+ * @param machine -
1505
+ * @param project - Project ID or project name
1506
+ * @param deploymentGroupId -
1507
+ */
1508
+ public async addDeploymentMachine(
1509
+ machine: TaskAgent.DeploymentMachine,
1510
+ project: string,
1511
+ deploymentGroupId: number
1512
+ ): Promise<TaskAgent.DeploymentMachine> {
1513
+
1514
+ return this.beginRequest<TaskAgent.DeploymentMachine>({
1515
+ apiVersion: "7.2-preview.1",
1516
+ method: "POST",
1517
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
1518
+ routeValues: {
1519
+ project: project,
1520
+ deploymentGroupId: deploymentGroupId
1521
+ },
1522
+ body: machine
1523
+ });
1524
+ }
1525
+
1526
+ /**
1527
+ * @param project - Project ID or project name
1528
+ * @param deploymentGroupId -
1529
+ * @param machineId -
1530
+ */
1531
+ public async deleteDeploymentMachine(
1532
+ project: string,
1533
+ deploymentGroupId: number,
1534
+ machineId: number
1535
+ ): Promise<void> {
1536
+
1537
+ return this.beginRequest<void>({
1538
+ apiVersion: "7.2-preview.1",
1539
+ method: "DELETE",
1540
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
1541
+ routeValues: {
1542
+ project: project,
1543
+ deploymentGroupId: deploymentGroupId,
1544
+ machineId: machineId
1545
+ }
1546
+ });
1547
+ }
1548
+
1549
+ /**
1550
+ * @param project - Project ID or project name
1551
+ * @param deploymentGroupId -
1552
+ * @param machineId -
1553
+ * @param expand -
1554
+ */
1555
+ public async getDeploymentMachine(
1556
+ project: string,
1557
+ deploymentGroupId: number,
1558
+ machineId: number,
1559
+ expand?: TaskAgent.DeploymentMachineExpands
1560
+ ): Promise<TaskAgent.DeploymentMachine> {
1561
+
1562
+ const queryValues: any = {
1563
+ '$expand': expand
1564
+ };
1565
+
1566
+ return this.beginRequest<TaskAgent.DeploymentMachine>({
1567
+ apiVersion: "7.2-preview.1",
1568
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
1569
+ routeValues: {
1570
+ project: project,
1571
+ deploymentGroupId: deploymentGroupId,
1572
+ machineId: machineId
1573
+ },
1574
+ queryParams: queryValues
1575
+ });
1576
+ }
1577
+
1578
+ /**
1579
+ * @param project - Project ID or project name
1580
+ * @param deploymentGroupId -
1581
+ * @param tags -
1582
+ * @param name -
1583
+ * @param expand -
1584
+ */
1585
+ public async getDeploymentMachines(
1586
+ project: string,
1587
+ deploymentGroupId: number,
1588
+ tags?: string[],
1589
+ name?: string,
1590
+ expand?: TaskAgent.DeploymentMachineExpands
1591
+ ): Promise<TaskAgent.DeploymentMachine[]> {
1592
+
1593
+ const queryValues: any = {
1594
+ tags: tags && tags.join(","),
1595
+ name: name,
1596
+ '$expand': expand
1597
+ };
1598
+
1599
+ return this.beginRequest<TaskAgent.DeploymentMachine[]>({
1600
+ apiVersion: "7.2-preview.1",
1601
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
1602
+ routeValues: {
1603
+ project: project,
1604
+ deploymentGroupId: deploymentGroupId
1605
+ },
1606
+ queryParams: queryValues
1607
+ });
1608
+ }
1609
+
1610
+ /**
1611
+ * @param machine -
1612
+ * @param project - Project ID or project name
1613
+ * @param deploymentGroupId -
1614
+ * @param machineId -
1615
+ */
1616
+ public async replaceDeploymentMachine(
1617
+ machine: TaskAgent.DeploymentMachine,
1618
+ project: string,
1619
+ deploymentGroupId: number,
1620
+ machineId: number
1621
+ ): Promise<TaskAgent.DeploymentMachine> {
1622
+
1623
+ return this.beginRequest<TaskAgent.DeploymentMachine>({
1624
+ apiVersion: "7.2-preview.1",
1625
+ method: "PUT",
1626
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
1627
+ routeValues: {
1628
+ project: project,
1629
+ deploymentGroupId: deploymentGroupId,
1630
+ machineId: machineId
1631
+ },
1632
+ body: machine
1633
+ });
1634
+ }
1635
+
1636
+ /**
1637
+ * @param machine -
1638
+ * @param project - Project ID or project name
1639
+ * @param deploymentGroupId -
1640
+ * @param machineId -
1641
+ */
1642
+ public async updateDeploymentMachine(
1643
+ machine: TaskAgent.DeploymentMachine,
1644
+ project: string,
1645
+ deploymentGroupId: number,
1646
+ machineId: number
1647
+ ): Promise<TaskAgent.DeploymentMachine> {
1648
+
1649
+ return this.beginRequest<TaskAgent.DeploymentMachine>({
1650
+ apiVersion: "7.2-preview.1",
1651
+ method: "PATCH",
1652
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
1653
+ routeValues: {
1654
+ project: project,
1655
+ deploymentGroupId: deploymentGroupId,
1656
+ machineId: machineId
1657
+ },
1658
+ body: machine
1659
+ });
1660
+ }
1661
+
1662
+ /**
1663
+ * @param machines -
1664
+ * @param project - Project ID or project name
1665
+ * @param deploymentGroupId -
1666
+ */
1667
+ public async updateDeploymentMachines(
1668
+ machines: TaskAgent.DeploymentMachine[],
1669
+ project: string,
1670
+ deploymentGroupId: number
1671
+ ): Promise<TaskAgent.DeploymentMachine[]> {
1672
+
1673
+ return this.beginRequest<TaskAgent.DeploymentMachine[]>({
1674
+ apiVersion: "7.2-preview.1",
1675
+ method: "PATCH",
1676
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/machines/{machineId}",
1677
+ routeValues: {
1678
+ project: project,
1679
+ deploymentGroupId: deploymentGroupId
1680
+ },
1681
+ body: machines
1682
+ });
1683
+ }
1684
+
1685
+ /**
1686
+ * @param definition -
1687
+ * @param poolId -
1688
+ */
1689
+ public async createAgentPoolMaintenanceDefinition(
1690
+ definition: TaskAgent.TaskAgentPoolMaintenanceDefinition,
1691
+ poolId: number
1692
+ ): Promise<TaskAgent.TaskAgentPoolMaintenanceDefinition> {
1693
+
1694
+ return this.beginRequest<TaskAgent.TaskAgentPoolMaintenanceDefinition>({
1695
+ apiVersion: "7.2-preview.1",
1696
+ method: "POST",
1697
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",
1698
+ routeValues: {
1699
+ poolId: poolId
1700
+ },
1701
+ body: definition
1702
+ });
1703
+ }
1704
+
1705
+ /**
1706
+ * @param poolId -
1707
+ * @param definitionId -
1708
+ */
1709
+ public async deleteAgentPoolMaintenanceDefinition(
1710
+ poolId: number,
1711
+ definitionId: number
1712
+ ): Promise<void> {
1713
+
1714
+ return this.beginRequest<void>({
1715
+ apiVersion: "7.2-preview.1",
1716
+ method: "DELETE",
1717
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",
1718
+ routeValues: {
1719
+ poolId: poolId,
1720
+ definitionId: definitionId
1721
+ }
1722
+ });
1723
+ }
1724
+
1725
+ /**
1726
+ * @param poolId -
1727
+ * @param definitionId -
1728
+ */
1729
+ public async getAgentPoolMaintenanceDefinition(
1730
+ poolId: number,
1731
+ definitionId: number
1732
+ ): Promise<TaskAgent.TaskAgentPoolMaintenanceDefinition> {
1733
+
1734
+ return this.beginRequest<TaskAgent.TaskAgentPoolMaintenanceDefinition>({
1735
+ apiVersion: "7.2-preview.1",
1736
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",
1737
+ routeValues: {
1738
+ poolId: poolId,
1739
+ definitionId: definitionId
1740
+ }
1741
+ });
1742
+ }
1743
+
1744
+ /**
1745
+ * @param poolId -
1746
+ */
1747
+ public async getAgentPoolMaintenanceDefinitions(
1748
+ poolId: number
1749
+ ): Promise<TaskAgent.TaskAgentPoolMaintenanceDefinition[]> {
1750
+
1751
+ return this.beginRequest<TaskAgent.TaskAgentPoolMaintenanceDefinition[]>({
1752
+ apiVersion: "7.2-preview.1",
1753
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",
1754
+ routeValues: {
1755
+ poolId: poolId
1756
+ }
1757
+ });
1758
+ }
1759
+
1760
+ /**
1761
+ * @param definition -
1762
+ * @param poolId -
1763
+ * @param definitionId -
1764
+ */
1765
+ public async updateAgentPoolMaintenanceDefinition(
1766
+ definition: TaskAgent.TaskAgentPoolMaintenanceDefinition,
1767
+ poolId: number,
1768
+ definitionId: number
1769
+ ): Promise<TaskAgent.TaskAgentPoolMaintenanceDefinition> {
1770
+
1771
+ return this.beginRequest<TaskAgent.TaskAgentPoolMaintenanceDefinition>({
1772
+ apiVersion: "7.2-preview.1",
1773
+ method: "PUT",
1774
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancedefinitions/{definitionId}",
1775
+ routeValues: {
1776
+ poolId: poolId,
1777
+ definitionId: definitionId
1778
+ },
1779
+ body: definition
1780
+ });
1781
+ }
1782
+
1783
+ /**
1784
+ * @param poolId -
1785
+ * @param jobId -
1786
+ */
1787
+ public async deleteAgentPoolMaintenanceJob(
1788
+ poolId: number,
1789
+ jobId: number
1790
+ ): Promise<void> {
1791
+
1792
+ return this.beginRequest<void>({
1793
+ apiVersion: "7.2-preview.1",
1794
+ method: "DELETE",
1795
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
1796
+ routeValues: {
1797
+ poolId: poolId,
1798
+ jobId: jobId
1799
+ }
1800
+ });
1801
+ }
1802
+
1803
+ /**
1804
+ * @param poolId -
1805
+ * @param jobId -
1806
+ */
1807
+ public async getAgentPoolMaintenanceJob(
1808
+ poolId: number,
1809
+ jobId: number
1810
+ ): Promise<TaskAgent.TaskAgentPoolMaintenanceJob> {
1811
+
1812
+ return this.beginRequest<TaskAgent.TaskAgentPoolMaintenanceJob>({
1813
+ apiVersion: "7.2-preview.1",
1814
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
1815
+ routeValues: {
1816
+ poolId: poolId,
1817
+ jobId: jobId
1818
+ }
1819
+ });
1820
+ }
1821
+
1822
+ /**
1823
+ * @param poolId -
1824
+ * @param jobId -
1825
+ */
1826
+ public async getAgentPoolMaintenanceJobLogs(
1827
+ poolId: number,
1828
+ jobId: number
1829
+ ): Promise<ArrayBuffer> {
1830
+
1831
+ return this.beginRequest<ArrayBuffer>({
1832
+ apiVersion: "7.2-preview.1",
1833
+ httpResponseType: "application/zip",
1834
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
1835
+ routeValues: {
1836
+ poolId: poolId,
1837
+ jobId: jobId
1838
+ }
1839
+ });
1840
+ }
1841
+
1842
+ /**
1843
+ * @param poolId -
1844
+ * @param definitionId -
1845
+ */
1846
+ public async getAgentPoolMaintenanceJobs(
1847
+ poolId: number,
1848
+ definitionId?: number
1849
+ ): Promise<TaskAgent.TaskAgentPoolMaintenanceJob[]> {
1850
+
1851
+ const queryValues: any = {
1852
+ definitionId: definitionId
1853
+ };
1854
+
1855
+ return this.beginRequest<TaskAgent.TaskAgentPoolMaintenanceJob[]>({
1856
+ apiVersion: "7.2-preview.1",
1857
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
1858
+ routeValues: {
1859
+ poolId: poolId
1860
+ },
1861
+ queryParams: queryValues
1862
+ });
1863
+ }
1864
+
1865
+ /**
1866
+ * @param job -
1867
+ * @param poolId -
1868
+ */
1869
+ public async queueAgentPoolMaintenanceJob(
1870
+ job: TaskAgent.TaskAgentPoolMaintenanceJob,
1871
+ poolId: number
1872
+ ): Promise<TaskAgent.TaskAgentPoolMaintenanceJob> {
1873
+
1874
+ return this.beginRequest<TaskAgent.TaskAgentPoolMaintenanceJob>({
1875
+ apiVersion: "7.2-preview.1",
1876
+ method: "POST",
1877
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
1878
+ routeValues: {
1879
+ poolId: poolId
1880
+ },
1881
+ body: job
1882
+ });
1883
+ }
1884
+
1885
+ /**
1886
+ * @param job -
1887
+ * @param poolId -
1888
+ * @param jobId -
1889
+ */
1890
+ public async updateAgentPoolMaintenanceJob(
1891
+ job: TaskAgent.TaskAgentPoolMaintenanceJob,
1892
+ poolId: number,
1893
+ jobId: number
1894
+ ): Promise<TaskAgent.TaskAgentPoolMaintenanceJob> {
1895
+
1896
+ return this.beginRequest<TaskAgent.TaskAgentPoolMaintenanceJob>({
1897
+ apiVersion: "7.2-preview.1",
1898
+ method: "PATCH",
1899
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/maintenancejobs/{jobId}",
1900
+ routeValues: {
1901
+ poolId: poolId,
1902
+ jobId: jobId
1903
+ },
1904
+ body: job
1905
+ });
1906
+ }
1907
+
1908
+ /**
1909
+ * @param poolId -
1910
+ * @param messageId -
1911
+ * @param sessionId -
1912
+ */
1913
+ public async deleteMessage(
1914
+ poolId: number,
1915
+ messageId: number,
1916
+ sessionId: string
1917
+ ): Promise<void> {
1918
+
1919
+ const queryValues: any = {
1920
+ sessionId: sessionId
1921
+ };
1922
+
1923
+ return this.beginRequest<void>({
1924
+ apiVersion: "7.2-preview.1",
1925
+ method: "DELETE",
1926
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/messages/{messageId}",
1927
+ routeValues: {
1928
+ poolId: poolId,
1929
+ messageId: messageId
1930
+ },
1931
+ queryParams: queryValues
1932
+ });
1933
+ }
1934
+
1935
+ /**
1936
+ * @param poolId -
1937
+ * @param sessionId -
1938
+ * @param lastMessageId -
1939
+ */
1940
+ public async getMessage(
1941
+ poolId: number,
1942
+ sessionId: string,
1943
+ lastMessageId?: number
1944
+ ): Promise<TaskAgent.TaskAgentMessage> {
1945
+
1946
+ const queryValues: any = {
1947
+ sessionId: sessionId,
1948
+ lastMessageId: lastMessageId
1949
+ };
1950
+
1951
+ return this.beginRequest<TaskAgent.TaskAgentMessage>({
1952
+ apiVersion: "7.2-preview.1",
1953
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/messages/{messageId}",
1954
+ routeValues: {
1955
+ poolId: poolId
1956
+ },
1957
+ queryParams: queryValues
1958
+ });
1959
+ }
1960
+
1961
+ /**
1962
+ * @param poolId -
1963
+ * @param agentId -
1964
+ */
1965
+ public async refreshAgent(
1966
+ poolId: number,
1967
+ agentId: number
1968
+ ): Promise<void> {
1969
+
1970
+ const queryValues: any = {
1971
+ agentId: agentId
1972
+ };
1973
+
1974
+ return this.beginRequest<void>({
1975
+ apiVersion: "7.2-preview.1",
1976
+ method: "POST",
1977
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/messages/{messageId}",
1978
+ routeValues: {
1979
+ poolId: poolId
1980
+ },
1981
+ queryParams: queryValues
1982
+ });
1983
+ }
1984
+
1985
+ /**
1986
+ * @param poolId -
1987
+ */
1988
+ public async refreshAgents(
1989
+ poolId: number
1990
+ ): Promise<void> {
1991
+
1992
+ return this.beginRequest<void>({
1993
+ apiVersion: "7.2-preview.1",
1994
+ method: "POST",
1995
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/messages/{messageId}",
1996
+ routeValues: {
1997
+ poolId: poolId
1998
+ }
1999
+ });
2000
+ }
2001
+
2002
+ /**
2003
+ * @param message -
2004
+ * @param poolId -
2005
+ * @param requestId -
2006
+ */
2007
+ public async sendMessage(
2008
+ message: TaskAgent.TaskAgentMessage,
2009
+ poolId: number,
2010
+ requestId: number
2011
+ ): Promise<void> {
2012
+
2013
+ const queryValues: any = {
2014
+ requestId: requestId
2015
+ };
2016
+
2017
+ return this.beginRequest<void>({
2018
+ apiVersion: "7.2-preview.1",
2019
+ method: "POST",
2020
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/messages/{messageId}",
2021
+ routeValues: {
2022
+ poolId: poolId
2023
+ },
2024
+ queryParams: queryValues,
2025
+ body: message
2026
+ });
2027
+ }
2028
+
2029
+ /**
2030
+ * @param packageType -
2031
+ * @param platform -
2032
+ * @param version -
2033
+ */
2034
+ public async getPackage(
2035
+ packageType: string,
2036
+ platform: string,
2037
+ version: string
2038
+ ): Promise<TaskAgent.PackageMetadata> {
2039
+
2040
+ return this.beginRequest<TaskAgent.PackageMetadata>({
2041
+ apiVersion: "7.2-preview.2",
2042
+ routeTemplate: "_apis/distributedtask/packages/{packageType}/{platform}/{version}",
2043
+ routeValues: {
2044
+ packageType: packageType,
2045
+ platform: platform,
2046
+ version: version
2047
+ }
2048
+ });
2049
+ }
2050
+
2051
+ /**
2052
+ * @param packageType -
2053
+ * @param platform -
2054
+ * @param top -
2055
+ */
2056
+ public async getPackages(
2057
+ packageType: string,
2058
+ platform?: string,
2059
+ top?: number
2060
+ ): Promise<TaskAgent.PackageMetadata[]> {
2061
+
2062
+ const queryValues: any = {
2063
+ '$top': top
2064
+ };
2065
+
2066
+ return this.beginRequest<TaskAgent.PackageMetadata[]>({
2067
+ apiVersion: "7.2-preview.2",
2068
+ routeTemplate: "_apis/distributedtask/packages/{packageType}/{platform}/{version}",
2069
+ routeValues: {
2070
+ packageType: packageType,
2071
+ platform: platform
2072
+ },
2073
+ queryParams: queryValues
2074
+ });
2075
+ }
2076
+
2077
+ /**
2078
+ * @param poolId -
2079
+ */
2080
+ public async getAgentPoolMetadata(
2081
+ poolId: number
2082
+ ): Promise<string> {
2083
+
2084
+ return this.beginRequest<string>({
2085
+ apiVersion: "7.2-preview.1",
2086
+ httpResponseType: "text/plain",
2087
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/poolmetadata",
2088
+ routeValues: {
2089
+ poolId: poolId
2090
+ }
2091
+ });
2092
+ }
2093
+
2094
+ /**
2095
+ * @param agentPoolMetadata -
2096
+ * @param poolId -
2097
+ */
2098
+ public async setAgentPoolMetadata(
2099
+ agentPoolMetadata: any,
2100
+ poolId: number
2101
+ ): Promise<void> {
2102
+
2103
+ return this.beginRequest<void>({
2104
+ apiVersion: "7.2-preview.1",
2105
+ method: "PUT",
2106
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/poolmetadata",
2107
+ routeValues: {
2108
+ poolId: poolId
2109
+ },
2110
+ customHeaders: {
2111
+ "Content-Type": "application/octet-stream",
2112
+ },
2113
+ body: agentPoolMetadata,
2114
+ isRawData: true
2115
+ });
2116
+ }
2117
+
2118
+ /**
2119
+ * Checks if current identity has passed permissions on a pool.
2120
+ *
2121
+ * @param poolId - Id of the pool to check
2122
+ * @param permissions - Permissions to check. Multiple permissions might be merged into single value using bitwise OR operator (e.g. AgentPoolPermissions.Manage | AgentPoolPermissions.View)
2123
+ */
2124
+ public async hasPoolPermissions(
2125
+ poolId: number,
2126
+ permissions: number
2127
+ ): Promise<boolean> {
2128
+
2129
+ return this.beginRequest<boolean>({
2130
+ apiVersion: "7.2-preview.1",
2131
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/permissions/{permissions}",
2132
+ routeValues: {
2133
+ poolId: poolId,
2134
+ permissions: permissions
2135
+ }
2136
+ });
2137
+ }
2138
+
2139
+ /**
2140
+ * Create an agent pool.
2141
+ *
2142
+ * @param pool - Details about the new agent pool
2143
+ */
2144
+ public async addAgentPool(
2145
+ pool: TaskAgent.TaskAgentPool
2146
+ ): Promise<TaskAgent.TaskAgentPool> {
2147
+
2148
+ return this.beginRequest<TaskAgent.TaskAgentPool>({
2149
+ apiVersion: "7.2-preview.1",
2150
+ method: "POST",
2151
+ routeTemplate: "_apis/distributedtask/pools/{poolId}",
2152
+ body: pool
2153
+ });
2154
+ }
2155
+
2156
+ /**
2157
+ * Delete an agent pool.
2158
+ *
2159
+ * @param poolId - ID of the agent pool to delete
2160
+ */
2161
+ public async deleteAgentPool(
2162
+ poolId: number
2163
+ ): Promise<void> {
2164
+
2165
+ return this.beginRequest<void>({
2166
+ apiVersion: "7.2-preview.1",
2167
+ method: "DELETE",
2168
+ routeTemplate: "_apis/distributedtask/pools/{poolId}",
2169
+ routeValues: {
2170
+ poolId: poolId
2171
+ }
2172
+ });
2173
+ }
2174
+
2175
+ /**
2176
+ * Get information about an agent pool.
2177
+ *
2178
+ * @param poolId - An agent pool ID
2179
+ * @param properties - Agent pool properties (comma-separated)
2180
+ * @param actionFilter - Filter by whether the calling user has use or manage permissions
2181
+ */
2182
+ public async getAgentPool(
2183
+ poolId: number,
2184
+ properties?: string[],
2185
+ actionFilter?: TaskAgent.TaskAgentPoolActionFilter
2186
+ ): Promise<TaskAgent.TaskAgentPool> {
2187
+
2188
+ const queryValues: any = {
2189
+ properties: properties && properties.join(","),
2190
+ actionFilter: actionFilter
2191
+ };
2192
+
2193
+ return this.beginRequest<TaskAgent.TaskAgentPool>({
2194
+ apiVersion: "7.2-preview.1",
2195
+ routeTemplate: "_apis/distributedtask/pools/{poolId}",
2196
+ routeValues: {
2197
+ poolId: poolId
2198
+ },
2199
+ queryParams: queryValues
2200
+ });
2201
+ }
2202
+
2203
+ /**
2204
+ * Get a list of agent pools.
2205
+ *
2206
+ * @param poolName - Filter by name
2207
+ * @param properties - Filter by agent pool properties (comma-separated)
2208
+ * @param poolType - Filter by pool type
2209
+ * @param actionFilter - Filter by whether the calling user has use or manage permissions
2210
+ */
2211
+ public async getAgentPools(
2212
+ poolName?: string,
2213
+ properties?: string[],
2214
+ poolType?: TaskAgent.TaskAgentPoolType,
2215
+ actionFilter?: TaskAgent.TaskAgentPoolActionFilter
2216
+ ): Promise<TaskAgent.TaskAgentPool[]> {
2217
+
2218
+ const queryValues: any = {
2219
+ poolName: poolName,
2220
+ properties: properties && properties.join(","),
2221
+ poolType: poolType,
2222
+ actionFilter: actionFilter
2223
+ };
2224
+
2225
+ return this.beginRequest<TaskAgent.TaskAgentPool[]>({
2226
+ apiVersion: "7.2-preview.1",
2227
+ routeTemplate: "_apis/distributedtask/pools/{poolId}",
2228
+ queryParams: queryValues
2229
+ });
2230
+ }
2231
+
2232
+ /**
2233
+ * Get a list of agent pools.
2234
+ *
2235
+ * @param poolIds - pool Ids to fetch
2236
+ * @param actionFilter - Filter by whether the calling user has use or manage permissions
2237
+ */
2238
+ public async getAgentPoolsByIds(
2239
+ poolIds: number[],
2240
+ actionFilter?: TaskAgent.TaskAgentPoolActionFilter
2241
+ ): Promise<TaskAgent.TaskAgentPool[]> {
2242
+
2243
+ const queryValues: any = {
2244
+ poolIds: poolIds && poolIds.join(","),
2245
+ actionFilter: actionFilter
2246
+ };
2247
+
2248
+ return this.beginRequest<TaskAgent.TaskAgentPool[]>({
2249
+ apiVersion: "7.2-preview.1",
2250
+ routeTemplate: "_apis/distributedtask/pools/{poolId}",
2251
+ queryParams: queryValues
2252
+ });
2253
+ }
2254
+
2255
+ /**
2256
+ * Update properties on an agent pool
2257
+ *
2258
+ * @param pool - Updated agent pool details
2259
+ * @param poolId - The agent pool to update
2260
+ */
2261
+ public async updateAgentPool(
2262
+ pool: TaskAgent.TaskAgentPool,
2263
+ poolId: number
2264
+ ): Promise<TaskAgent.TaskAgentPool> {
2265
+
2266
+ return this.beginRequest<TaskAgent.TaskAgentPool>({
2267
+ apiVersion: "7.2-preview.1",
2268
+ method: "PATCH",
2269
+ routeTemplate: "_apis/distributedtask/pools/{poolId}",
2270
+ routeValues: {
2271
+ poolId: poolId
2272
+ },
2273
+ body: pool
2274
+ });
2275
+ }
2276
+
2277
+ /**
2278
+ * Create a new agent queue to connect a project to an agent pool.
2279
+ *
2280
+ * @param queue - Details about the queue to create
2281
+ * @param project - Project ID or project name
2282
+ * @param authorizePipelines - Automatically authorize this queue when using YAML
2283
+ */
2284
+ public async addAgentQueue(
2285
+ queue: TaskAgent.TaskAgentQueue,
2286
+ project?: string,
2287
+ authorizePipelines?: boolean
2288
+ ): Promise<TaskAgent.TaskAgentQueue> {
2289
+
2290
+ const queryValues: any = {
2291
+ authorizePipelines: authorizePipelines
2292
+ };
2293
+
2294
+ return this.beginRequest<TaskAgent.TaskAgentQueue>({
2295
+ apiVersion: "7.2-preview.1",
2296
+ method: "POST",
2297
+ routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
2298
+ routeValues: {
2299
+ project: project
2300
+ },
2301
+ queryParams: queryValues,
2302
+ body: queue
2303
+ });
2304
+ }
2305
+
2306
+ /**
2307
+ * Create a new team project.
2308
+ *
2309
+ * @param project - Project ID or project name
2310
+ */
2311
+ public async createTeamProject(
2312
+ project?: string
2313
+ ): Promise<void> {
2314
+
2315
+ return this.beginRequest<void>({
2316
+ apiVersion: "7.2-preview.1",
2317
+ method: "PUT",
2318
+ routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
2319
+ routeValues: {
2320
+ project: project
2321
+ }
2322
+ });
2323
+ }
2324
+
2325
+ /**
2326
+ * Removes an agent queue from a project.
2327
+ *
2328
+ * @param queueId - The agent queue to remove
2329
+ * @param project - Project ID or project name
2330
+ */
2331
+ public async deleteAgentQueue(
2332
+ queueId: number,
2333
+ project?: string
2334
+ ): Promise<void> {
2335
+
2336
+ return this.beginRequest<void>({
2337
+ apiVersion: "7.2-preview.1",
2338
+ method: "DELETE",
2339
+ routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
2340
+ routeValues: {
2341
+ project: project,
2342
+ queueId: queueId
2343
+ }
2344
+ });
2345
+ }
2346
+
2347
+ /**
2348
+ * Get information about an agent queue.
2349
+ *
2350
+ * @param queueId - The agent queue to get information about
2351
+ * @param project - Project ID or project name
2352
+ * @param actionFilter - Filter by whether the calling user has use or manage permissions
2353
+ */
2354
+ public async getAgentQueue(
2355
+ queueId: number,
2356
+ project?: string,
2357
+ actionFilter?: TaskAgent.TaskAgentQueueActionFilter
2358
+ ): Promise<TaskAgent.TaskAgentQueue> {
2359
+
2360
+ const queryValues: any = {
2361
+ actionFilter: actionFilter
2362
+ };
2363
+
2364
+ return this.beginRequest<TaskAgent.TaskAgentQueue>({
2365
+ apiVersion: "7.2-preview.1",
2366
+ routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
2367
+ routeValues: {
2368
+ project: project,
2369
+ queueId: queueId
2370
+ },
2371
+ queryParams: queryValues
2372
+ });
2373
+ }
2374
+
2375
+ /**
2376
+ * Get a list of agent queues.
2377
+ *
2378
+ * @param project - Project ID or project name
2379
+ * @param queueName - Filter on the agent queue name
2380
+ * @param actionFilter - Filter by whether the calling user has use or manage permissions
2381
+ */
2382
+ public async getAgentQueues(
2383
+ project?: string,
2384
+ queueName?: string,
2385
+ actionFilter?: TaskAgent.TaskAgentQueueActionFilter
2386
+ ): Promise<TaskAgent.TaskAgentQueue[]> {
2387
+
2388
+ const queryValues: any = {
2389
+ queueName: queueName,
2390
+ actionFilter: actionFilter
2391
+ };
2392
+
2393
+ return this.beginRequest<TaskAgent.TaskAgentQueue[]>({
2394
+ apiVersion: "7.2-preview.1",
2395
+ routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
2396
+ routeValues: {
2397
+ project: project
2398
+ },
2399
+ queryParams: queryValues
2400
+ });
2401
+ }
2402
+
2403
+ /**
2404
+ * Get a list of agent queues by their IDs
2405
+ *
2406
+ * @param queueIds - A comma-separated list of agent queue IDs to retrieve
2407
+ * @param project - Project ID or project name
2408
+ * @param actionFilter - Filter by whether the calling user has use or manage permissions
2409
+ */
2410
+ public async getAgentQueuesByIds(
2411
+ queueIds: number[],
2412
+ project?: string,
2413
+ actionFilter?: TaskAgent.TaskAgentQueueActionFilter
2414
+ ): Promise<TaskAgent.TaskAgentQueue[]> {
2415
+
2416
+ const queryValues: any = {
2417
+ queueIds: queueIds && queueIds.join(","),
2418
+ actionFilter: actionFilter
2419
+ };
2420
+
2421
+ return this.beginRequest<TaskAgent.TaskAgentQueue[]>({
2422
+ apiVersion: "7.2-preview.1",
2423
+ routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
2424
+ routeValues: {
2425
+ project: project
2426
+ },
2427
+ queryParams: queryValues
2428
+ });
2429
+ }
2430
+
2431
+ /**
2432
+ * Get a list of agent queues by their names
2433
+ *
2434
+ * @param queueNames - A comma-separated list of agent names to retrieve
2435
+ * @param project - Project ID or project name
2436
+ * @param actionFilter - Filter by whether the calling user has use or manage permissions
2437
+ */
2438
+ public async getAgentQueuesByNames(
2439
+ queueNames: string[],
2440
+ project?: string,
2441
+ actionFilter?: TaskAgent.TaskAgentQueueActionFilter
2442
+ ): Promise<TaskAgent.TaskAgentQueue[]> {
2443
+
2444
+ const queryValues: any = {
2445
+ queueNames: queueNames && queueNames.join(","),
2446
+ actionFilter: actionFilter
2447
+ };
2448
+
2449
+ return this.beginRequest<TaskAgent.TaskAgentQueue[]>({
2450
+ apiVersion: "7.2-preview.1",
2451
+ routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
2452
+ routeValues: {
2453
+ project: project
2454
+ },
2455
+ queryParams: queryValues
2456
+ });
2457
+ }
2458
+
2459
+ /**
2460
+ * Get a list of agent queues by pool ids
2461
+ *
2462
+ * @param poolIds - A comma-separated list of pool ids to get the corresponding queues for
2463
+ * @param project - Project ID or project name
2464
+ * @param actionFilter - Filter by whether the calling user has use or manage permissions
2465
+ */
2466
+ public async getAgentQueuesForPools(
2467
+ poolIds: number[],
2468
+ project?: string,
2469
+ actionFilter?: TaskAgent.TaskAgentQueueActionFilter
2470
+ ): Promise<TaskAgent.TaskAgentQueue[]> {
2471
+
2472
+ const queryValues: any = {
2473
+ poolIds: poolIds && poolIds.join(","),
2474
+ actionFilter: actionFilter
2475
+ };
2476
+
2477
+ return this.beginRequest<TaskAgent.TaskAgentQueue[]>({
2478
+ apiVersion: "7.2-preview.1",
2479
+ routeTemplate: "{project}/_apis/distributedtask/queues/{queueId}",
2480
+ routeValues: {
2481
+ project: project
2482
+ },
2483
+ queryParams: queryValues
2484
+ });
2485
+ }
2486
+
2487
+ /**
2488
+ * @param agentCloudId -
2489
+ */
2490
+ public async getAgentCloudRequests(
2491
+ agentCloudId: number
2492
+ ): Promise<TaskAgent.TaskAgentCloudRequest[]> {
2493
+
2494
+ return this.beginRequest<TaskAgent.TaskAgentCloudRequest[]>({
2495
+ apiVersion: "7.2-preview.1",
2496
+ routeTemplate: "_apis/distributedtask/agentclouds/{agentCloudId}/requests/{agentCloudRequestId}",
2497
+ routeValues: {
2498
+ agentCloudId: agentCloudId
2499
+ }
2500
+ });
2501
+ }
2502
+
2503
+ /**
2504
+ */
2505
+ public async getResourceLimits(
2506
+ ): Promise<TaskAgent.ResourceLimit[]> {
2507
+
2508
+ return this.beginRequest<TaskAgent.ResourceLimit[]>({
2509
+ apiVersion: "7.2-preview.1",
2510
+ routeTemplate: "_apis/distributedtask/resourcelimits"
2511
+ });
2512
+ }
2513
+
2514
+ /**
2515
+ * @param parallelismTag -
2516
+ * @param poolIsHosted -
2517
+ * @param includeRunningRequests -
2518
+ */
2519
+ public async getResourceUsage(
2520
+ parallelismTag?: string,
2521
+ poolIsHosted?: boolean,
2522
+ includeRunningRequests?: boolean
2523
+ ): Promise<TaskAgent.ResourceUsage> {
2524
+
2525
+ const queryValues: any = {
2526
+ parallelismTag: parallelismTag,
2527
+ poolIsHosted: poolIsHosted,
2528
+ includeRunningRequests: includeRunningRequests
2529
+ };
2530
+
2531
+ return this.beginRequest<TaskAgent.ResourceUsage>({
2532
+ apiVersion: "7.2-preview.2",
2533
+ routeTemplate: "_apis/distributedtask/resourceusage",
2534
+ queryParams: queryValues
2535
+ });
2536
+ }
2537
+
2538
+ /**
2539
+ * @param project - Project ID or project name
2540
+ * @param taskGroupId -
2541
+ */
2542
+ public async getTaskGroupHistory(
2543
+ project: string,
2544
+ taskGroupId: string
2545
+ ): Promise<TaskAgent.TaskGroupRevision[]> {
2546
+
2547
+ return this.beginRequest<TaskAgent.TaskGroupRevision[]>({
2548
+ apiVersion: "7.2-preview.1",
2549
+ routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}/revisions",
2550
+ routeValues: {
2551
+ project: project,
2552
+ taskGroupId: taskGroupId
2553
+ }
2554
+ });
2555
+ }
2556
+
2557
+ /**
2558
+ * Delete a secure file
2559
+ *
2560
+ * @param project - Project ID or project name
2561
+ * @param secureFileId - The unique secure file Id
2562
+ */
2563
+ public async deleteSecureFile(
2564
+ project: string,
2565
+ secureFileId: string
2566
+ ): Promise<void> {
2567
+
2568
+ return this.beginRequest<void>({
2569
+ apiVersion: "7.2-preview.1",
2570
+ method: "DELETE",
2571
+ routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
2572
+ routeValues: {
2573
+ project: project,
2574
+ secureFileId: secureFileId
2575
+ }
2576
+ });
2577
+ }
2578
+
2579
+ /**
2580
+ * Download a secure file by Id
2581
+ *
2582
+ * @param project - Project ID or project name
2583
+ * @param secureFileId - The unique secure file Id
2584
+ * @param ticket - A valid download ticket
2585
+ * @param download - If download is true, the file is sent as attachement in the response body. If download is false, the response body contains the file stream.
2586
+ */
2587
+ public async downloadSecureFile(
2588
+ project: string,
2589
+ secureFileId: string,
2590
+ ticket: string,
2591
+ download?: boolean
2592
+ ): Promise<ArrayBuffer> {
2593
+
2594
+ const queryValues: any = {
2595
+ ticket: ticket,
2596
+ download: download
2597
+ };
2598
+
2599
+ return this.beginRequest<ArrayBuffer>({
2600
+ apiVersion: "7.2-preview.1",
2601
+ httpResponseType: "application/octet-stream",
2602
+ routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
2603
+ routeValues: {
2604
+ project: project,
2605
+ secureFileId: secureFileId
2606
+ },
2607
+ queryParams: queryValues
2608
+ });
2609
+ }
2610
+
2611
+ /**
2612
+ * Get a secure file
2613
+ *
2614
+ * @param project - Project ID or project name
2615
+ * @param secureFileId - The unique secure file Id
2616
+ * @param includeDownloadTicket - If includeDownloadTicket is true and the caller has permissions, a download ticket is included in the response.
2617
+ * @param actionFilter -
2618
+ */
2619
+ public async getSecureFile(
2620
+ project: string,
2621
+ secureFileId: string,
2622
+ includeDownloadTicket?: boolean,
2623
+ actionFilter?: TaskAgent.SecureFileActionFilter
2624
+ ): Promise<TaskAgent.SecureFile> {
2625
+
2626
+ const queryValues: any = {
2627
+ includeDownloadTicket: includeDownloadTicket,
2628
+ actionFilter: actionFilter
2629
+ };
2630
+
2631
+ return this.beginRequest<TaskAgent.SecureFile>({
2632
+ apiVersion: "7.2-preview.1",
2633
+ routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
2634
+ routeValues: {
2635
+ project: project,
2636
+ secureFileId: secureFileId
2637
+ },
2638
+ queryParams: queryValues
2639
+ });
2640
+ }
2641
+
2642
+ /**
2643
+ * Get secure files
2644
+ *
2645
+ * @param project - Project ID or project name
2646
+ * @param namePattern - Name of the secure file to match. Can include wildcards to match multiple files.
2647
+ * @param includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response.
2648
+ * @param actionFilter - Filter by secure file permissions for View, Manage or Use action. Defaults to View.
2649
+ */
2650
+ public async getSecureFiles(
2651
+ project: string,
2652
+ namePattern?: string,
2653
+ includeDownloadTickets?: boolean,
2654
+ actionFilter?: TaskAgent.SecureFileActionFilter
2655
+ ): Promise<TaskAgent.SecureFile[]> {
2656
+
2657
+ const queryValues: any = {
2658
+ namePattern: namePattern,
2659
+ includeDownloadTickets: includeDownloadTickets,
2660
+ actionFilter: actionFilter
2661
+ };
2662
+
2663
+ return this.beginRequest<TaskAgent.SecureFile[]>({
2664
+ apiVersion: "7.2-preview.1",
2665
+ routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
2666
+ routeValues: {
2667
+ project: project
2668
+ },
2669
+ queryParams: queryValues
2670
+ });
2671
+ }
2672
+
2673
+ /**
2674
+ * Get secure files
2675
+ *
2676
+ * @param project - Project ID or project name
2677
+ * @param secureFileIds - A list of secure file Ids
2678
+ * @param includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response.
2679
+ * @param actionFilter -
2680
+ */
2681
+ public async getSecureFilesByIds(
2682
+ project: string,
2683
+ secureFileIds: string[],
2684
+ includeDownloadTickets?: boolean,
2685
+ actionFilter?: TaskAgent.SecureFileActionFilter
2686
+ ): Promise<TaskAgent.SecureFile[]> {
2687
+
2688
+ const queryValues: any = {
2689
+ secureFileIds: secureFileIds && secureFileIds.join(","),
2690
+ includeDownloadTickets: includeDownloadTickets,
2691
+ actionFilter: actionFilter
2692
+ };
2693
+
2694
+ return this.beginRequest<TaskAgent.SecureFile[]>({
2695
+ apiVersion: "7.2-preview.1",
2696
+ routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
2697
+ routeValues: {
2698
+ project: project
2699
+ },
2700
+ queryParams: queryValues
2701
+ });
2702
+ }
2703
+
2704
+ /**
2705
+ * Get secure files
2706
+ *
2707
+ * @param project - Project ID or project name
2708
+ * @param secureFileNames - A list of secure file Ids
2709
+ * @param includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response.
2710
+ * @param actionFilter -
2711
+ */
2712
+ public async getSecureFilesByNames(
2713
+ project: string,
2714
+ secureFileNames: string[],
2715
+ includeDownloadTickets?: boolean,
2716
+ actionFilter?: TaskAgent.SecureFileActionFilter
2717
+ ): Promise<TaskAgent.SecureFile[]> {
2718
+
2719
+ const queryValues: any = {
2720
+ secureFileNames: secureFileNames && secureFileNames.join(","),
2721
+ includeDownloadTickets: includeDownloadTickets,
2722
+ actionFilter: actionFilter
2723
+ };
2724
+
2725
+ return this.beginRequest<TaskAgent.SecureFile[]>({
2726
+ apiVersion: "7.2-preview.1",
2727
+ routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
2728
+ routeValues: {
2729
+ project: project
2730
+ },
2731
+ queryParams: queryValues
2732
+ });
2733
+ }
2734
+
2735
+ /**
2736
+ * Query secure files using a name pattern and a condition on file properties.
2737
+ *
2738
+ * @param condition - The main condition syntax is described [here](https://go.microsoft.com/fwlink/?linkid=842996). Use the *property('property-name')* function to access the value of the specified property of a secure file. It returns null if the property is not set. E.g. \`\`\` and( eq( property('devices'), '2' ), in( property('provisioning profile type'), 'ad hoc', 'development' ) ) \`\`\`
2739
+ * @param project - Project ID or project name
2740
+ * @param namePattern - Name of the secure file to match. Can include wildcards to match multiple files.
2741
+ */
2742
+ public async querySecureFilesByProperties(
2743
+ condition: string,
2744
+ project: string,
2745
+ namePattern?: string
2746
+ ): Promise<TaskAgent.SecureFile[]> {
2747
+
2748
+ const queryValues: any = {
2749
+ namePattern: namePattern
2750
+ };
2751
+
2752
+ return this.beginRequest<TaskAgent.SecureFile[]>({
2753
+ apiVersion: "7.2-preview.1",
2754
+ method: "POST",
2755
+ routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
2756
+ routeValues: {
2757
+ project: project
2758
+ },
2759
+ queryParams: queryValues,
2760
+ body: condition
2761
+ });
2762
+ }
2763
+
2764
+ /**
2765
+ * Update the name or properties of an existing secure file
2766
+ *
2767
+ * @param secureFile - The secure file with updated name and/or properties
2768
+ * @param project - Project ID or project name
2769
+ * @param secureFileId - The unique secure file Id
2770
+ */
2771
+ public async updateSecureFile(
2772
+ secureFile: TaskAgent.SecureFile,
2773
+ project: string,
2774
+ secureFileId: string
2775
+ ): Promise<TaskAgent.SecureFile> {
2776
+
2777
+ return this.beginRequest<TaskAgent.SecureFile>({
2778
+ apiVersion: "7.2-preview.1",
2779
+ method: "PATCH",
2780
+ routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
2781
+ routeValues: {
2782
+ project: project,
2783
+ secureFileId: secureFileId
2784
+ },
2785
+ body: secureFile
2786
+ });
2787
+ }
2788
+
2789
+ /**
2790
+ * Update properties and/or names of a set of secure files. Files are identified by their IDs. Properties provided override the existing one entirely, i.e. do not merge.
2791
+ *
2792
+ * @param secureFiles - A list of secure file objects. Only three field must be populated Id, Name, and Properties. The rest of fields in the object are ignored.
2793
+ * @param project - Project ID or project name
2794
+ */
2795
+ public async updateSecureFiles(
2796
+ secureFiles: TaskAgent.SecureFile[],
2797
+ project: string
2798
+ ): Promise<TaskAgent.SecureFile[]> {
2799
+
2800
+ return this.beginRequest<TaskAgent.SecureFile[]>({
2801
+ apiVersion: "7.2-preview.1",
2802
+ method: "PATCH",
2803
+ routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
2804
+ routeValues: {
2805
+ project: project
2806
+ },
2807
+ body: secureFiles
2808
+ });
2809
+ }
2810
+
2811
+ /**
2812
+ * Upload a secure file, include the file stream in the request body
2813
+ *
2814
+ * @param content - Content to upload
2815
+ * @param project - Project ID or project name
2816
+ * @param name - Name of the file to upload
2817
+ * @param authorizePipelines - If authorizePipelines is true, then the secure file is authorized for use by all pipelines in the project.
2818
+ */
2819
+ public async uploadSecureFile(
2820
+ content: any,
2821
+ project: string,
2822
+ name: string,
2823
+ authorizePipelines?: boolean
2824
+ ): Promise<TaskAgent.SecureFile> {
2825
+
2826
+ const queryValues: any = {
2827
+ name: name,
2828
+ authorizePipelines: authorizePipelines
2829
+ };
2830
+
2831
+ return this.beginRequest<TaskAgent.SecureFile>({
2832
+ apiVersion: "7.2-preview.1",
2833
+ method: "POST",
2834
+ routeTemplate: "{project}/_apis/distributedtask/securefiles/{secureFileId}",
2835
+ routeValues: {
2836
+ project: project
2837
+ },
2838
+ customHeaders: {
2839
+ "Content-Type": "application/octet-stream",
2840
+ },
2841
+ queryParams: queryValues,
2842
+ body: content,
2843
+ isRawData: true
2844
+ });
2845
+ }
2846
+
2847
+ /**
2848
+ * @param session -
2849
+ * @param poolId -
2850
+ */
2851
+ public async createAgentSession(
2852
+ session: TaskAgent.TaskAgentSession,
2853
+ poolId: number
2854
+ ): Promise<TaskAgent.TaskAgentSession> {
2855
+
2856
+ return this.beginRequest<TaskAgent.TaskAgentSession>({
2857
+ apiVersion: "7.2-preview.1",
2858
+ method: "POST",
2859
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/sessions/{sessionId}",
2860
+ routeValues: {
2861
+ poolId: poolId
2862
+ },
2863
+ body: session
2864
+ });
2865
+ }
2866
+
2867
+ /**
2868
+ * @param poolId -
2869
+ * @param sessionId -
2870
+ */
2871
+ public async deleteAgentSession(
2872
+ poolId: number,
2873
+ sessionId: string
2874
+ ): Promise<void> {
2875
+
2876
+ return this.beginRequest<void>({
2877
+ apiVersion: "7.2-preview.1",
2878
+ method: "DELETE",
2879
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/sessions/{sessionId}",
2880
+ routeValues: {
2881
+ poolId: poolId,
2882
+ sessionId: sessionId
2883
+ }
2884
+ });
2885
+ }
2886
+
2887
+ /**
2888
+ * Register a deployment target to a deployment group. Generally this is called by agent configuration tool.
2889
+ *
2890
+ * @param machine - Deployment target to register.
2891
+ * @param project - Project ID or project name
2892
+ * @param deploymentGroupId - ID of the deployment group to which the deployment target is registered.
2893
+ */
2894
+ public async addDeploymentTarget(
2895
+ machine: TaskAgent.DeploymentMachine,
2896
+ project: string,
2897
+ deploymentGroupId: number
2898
+ ): Promise<TaskAgent.DeploymentMachine> {
2899
+
2900
+ return this.beginRequest<TaskAgent.DeploymentMachine>({
2901
+ apiVersion: "7.2-preview.1",
2902
+ method: "POST",
2903
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
2904
+ routeValues: {
2905
+ project: project,
2906
+ deploymentGroupId: deploymentGroupId
2907
+ },
2908
+ body: machine
2909
+ });
2910
+ }
2911
+
2912
+ /**
2913
+ * Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too.
2914
+ *
2915
+ * @param project - Project ID or project name
2916
+ * @param deploymentGroupId - ID of the deployment group in which deployment target is deleted.
2917
+ * @param targetId - ID of the deployment target to delete.
2918
+ */
2919
+ public async deleteDeploymentTarget(
2920
+ project: string,
2921
+ deploymentGroupId: number,
2922
+ targetId: number
2923
+ ): Promise<void> {
2924
+
2925
+ return this.beginRequest<void>({
2926
+ apiVersion: "7.2-preview.1",
2927
+ method: "DELETE",
2928
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
2929
+ routeValues: {
2930
+ project: project,
2931
+ deploymentGroupId: deploymentGroupId,
2932
+ targetId: targetId
2933
+ }
2934
+ });
2935
+ }
2936
+
2937
+ /**
2938
+ * Get a deployment target by its ID in a deployment group
2939
+ *
2940
+ * @param project - Project ID or project name
2941
+ * @param deploymentGroupId - ID of the deployment group to which deployment target belongs.
2942
+ * @param targetId - ID of the deployment target to return.
2943
+ * @param expand - Include these additional details in the returned objects.
2944
+ */
2945
+ public async getDeploymentTarget(
2946
+ project: string,
2947
+ deploymentGroupId: number,
2948
+ targetId: number,
2949
+ expand?: TaskAgent.DeploymentTargetExpands
2950
+ ): Promise<TaskAgent.DeploymentMachine> {
2951
+
2952
+ const queryValues: any = {
2953
+ '$expand': expand
2954
+ };
2955
+
2956
+ return this.beginRequest<TaskAgent.DeploymentMachine>({
2957
+ apiVersion: "7.2-preview.1",
2958
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
2959
+ routeValues: {
2960
+ project: project,
2961
+ deploymentGroupId: deploymentGroupId,
2962
+ targetId: targetId
2963
+ },
2964
+ queryParams: queryValues
2965
+ });
2966
+ }
2967
+
2968
+ /**
2969
+ * Get a list of deployment targets in a deployment group.
2970
+ *
2971
+ * @param project - Project ID or project name
2972
+ * @param deploymentGroupId - ID of the deployment group.
2973
+ * @param tags - Get only the deployment targets that contain all these comma separted list of tags.
2974
+ * @param name - Name pattern of the deployment targets to return.
2975
+ * @param partialNameMatch - When set to true, treats **name** as pattern. Else treats it as absolute match. Default is **false**.
2976
+ * @param expand - Include these additional details in the returned objects.
2977
+ * @param agentStatus - Get only deployment targets that have this status.
2978
+ * @param agentJobResult - Get only deployment targets that have this last job result.
2979
+ * @param continuationToken - Get deployment targets with names greater than this continuationToken lexicographically.
2980
+ * @param top - Maximum number of deployment targets to return. Default is **1000**.
2981
+ * @param enabled - Get only deployment targets that are enabled or disabled. Default is 'null' which returns all the targets.
2982
+ * @param propertyFilters -
2983
+ */
2984
+ public async getDeploymentTargets(
2985
+ project: string,
2986
+ deploymentGroupId: number,
2987
+ tags?: string[],
2988
+ name?: string,
2989
+ partialNameMatch?: boolean,
2990
+ expand?: TaskAgent.DeploymentTargetExpands,
2991
+ agentStatus?: TaskAgent.TaskAgentStatusFilter,
2992
+ agentJobResult?: TaskAgent.TaskAgentJobResultFilter,
2993
+ continuationToken?: string,
2994
+ top?: number,
2995
+ enabled?: boolean,
2996
+ propertyFilters?: string[]
2997
+ ): Promise<WebApi.PagedList<TaskAgent.DeploymentMachine>> {
2998
+
2999
+ const queryValues: any = {
3000
+ tags: tags && tags.join(","),
3001
+ name: name,
3002
+ partialNameMatch: partialNameMatch,
3003
+ '$expand': expand,
3004
+ agentStatus: agentStatus,
3005
+ agentJobResult: agentJobResult,
3006
+ continuationToken: continuationToken,
3007
+ '$top': top,
3008
+ enabled: enabled,
3009
+ propertyFilters: propertyFilters && propertyFilters.join(",")
3010
+ };
3011
+
3012
+ return this.beginRequest<Response>({
3013
+ apiVersion: "7.2-preview.1",
3014
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
3015
+ routeValues: {
3016
+ project: project,
3017
+ deploymentGroupId: deploymentGroupId
3018
+ },
3019
+ queryParams: queryValues,
3020
+ returnRawResponse: true
3021
+ }).then(async response => {
3022
+ const body = <WebApi.PagedList<TaskAgent.DeploymentMachine>>await response.text().then(deserializeVssJsonObject);
3023
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
3024
+ return body;
3025
+ });
3026
+ }
3027
+
3028
+ /**
3029
+ * Replace a deployment target in a deployment group. Generally this is called by agent configuration tool.
3030
+ *
3031
+ * @param machine - New deployment target.
3032
+ * @param project - Project ID or project name
3033
+ * @param deploymentGroupId - ID of the deployment group in which deployment target is replaced.
3034
+ * @param targetId - ID of the deployment target to replace.
3035
+ */
3036
+ public async replaceDeploymentTarget(
3037
+ machine: TaskAgent.DeploymentMachine,
3038
+ project: string,
3039
+ deploymentGroupId: number,
3040
+ targetId: number
3041
+ ): Promise<TaskAgent.DeploymentMachine> {
3042
+
3043
+ return this.beginRequest<TaskAgent.DeploymentMachine>({
3044
+ apiVersion: "7.2-preview.1",
3045
+ method: "PUT",
3046
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
3047
+ routeValues: {
3048
+ project: project,
3049
+ deploymentGroupId: deploymentGroupId,
3050
+ targetId: targetId
3051
+ },
3052
+ body: machine
3053
+ });
3054
+ }
3055
+
3056
+ /**
3057
+ * Update a deployment target and its agent properties in a deployment group. Generally this is called by agent configuration tool.
3058
+ *
3059
+ * @param machine - Deployment target to update.
3060
+ * @param project - Project ID or project name
3061
+ * @param deploymentGroupId - ID of the deployment group in which deployment target is updated.
3062
+ * @param targetId - ID of the deployment target to update.
3063
+ */
3064
+ public async updateDeploymentTarget(
3065
+ machine: TaskAgent.DeploymentMachine,
3066
+ project: string,
3067
+ deploymentGroupId: number,
3068
+ targetId: number
3069
+ ): Promise<TaskAgent.DeploymentMachine> {
3070
+
3071
+ return this.beginRequest<TaskAgent.DeploymentMachine>({
3072
+ apiVersion: "7.2-preview.1",
3073
+ method: "PATCH",
3074
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
3075
+ routeValues: {
3076
+ project: project,
3077
+ deploymentGroupId: deploymentGroupId,
3078
+ targetId: targetId
3079
+ },
3080
+ body: machine
3081
+ });
3082
+ }
3083
+
3084
+ /**
3085
+ * Update tags of a list of deployment targets in a deployment group.
3086
+ *
3087
+ * @param machines - Deployment targets with tags to udpdate.
3088
+ * @param project - Project ID or project name
3089
+ * @param deploymentGroupId - ID of the deployment group in which deployment targets are updated.
3090
+ */
3091
+ public async updateDeploymentTargets(
3092
+ machines: TaskAgent.DeploymentTargetUpdateParameter[],
3093
+ project: string,
3094
+ deploymentGroupId: number
3095
+ ): Promise<TaskAgent.DeploymentMachine[]> {
3096
+
3097
+ return this.beginRequest<TaskAgent.DeploymentMachine[]>({
3098
+ apiVersion: "7.2-preview.1",
3099
+ method: "PATCH",
3100
+ routeTemplate: "{project}/_apis/distributedtask/deploymentgroups/{deploymentGroupId}/targets/{targetId}",
3101
+ routeValues: {
3102
+ project: project,
3103
+ deploymentGroupId: deploymentGroupId
3104
+ },
3105
+ body: machines
3106
+ });
3107
+ }
3108
+
3109
+ /**
3110
+ * Create a task group.
3111
+ *
3112
+ * @param taskGroup - Task group object to create.
3113
+ * @param project - Project ID or project name
3114
+ */
3115
+ public async addTaskGroup(
3116
+ taskGroup: TaskAgent.TaskGroupCreateParameter,
3117
+ project: string
3118
+ ): Promise<TaskAgent.TaskGroup> {
3119
+
3120
+ return this.beginRequest<TaskAgent.TaskGroup>({
3121
+ apiVersion: "7.2-preview.1",
3122
+ method: "POST",
3123
+ routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
3124
+ routeValues: {
3125
+ project: project
3126
+ },
3127
+ body: taskGroup
3128
+ });
3129
+ }
3130
+
3131
+ /**
3132
+ * Delete a task group.
3133
+ *
3134
+ * @param project - Project ID or project name
3135
+ * @param taskGroupId - Id of the task group to be deleted.
3136
+ * @param comment - Comments to delete.
3137
+ */
3138
+ public async deleteTaskGroup(
3139
+ project: string,
3140
+ taskGroupId: string,
3141
+ comment?: string
3142
+ ): Promise<void> {
3143
+
3144
+ const queryValues: any = {
3145
+ comment: comment
3146
+ };
3147
+
3148
+ return this.beginRequest<void>({
3149
+ apiVersion: "7.2-preview.1",
3150
+ method: "DELETE",
3151
+ routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
3152
+ routeValues: {
3153
+ project: project,
3154
+ taskGroupId: taskGroupId
3155
+ },
3156
+ queryParams: queryValues
3157
+ });
3158
+ }
3159
+
3160
+ /**
3161
+ * Get task group.
3162
+ *
3163
+ * @param project - Project ID or project name
3164
+ * @param taskGroupId - Id of the task group.
3165
+ * @param versionSpec - version specification of the task group. examples: 1, 1.0.
3166
+ * @param expand - The properties that should be expanded. example $expand=Tasks will expand nested task groups.
3167
+ */
3168
+ public async getTaskGroup(
3169
+ project: string,
3170
+ taskGroupId: string,
3171
+ versionSpec: string,
3172
+ expand?: TaskAgent.TaskGroupExpands
3173
+ ): Promise<TaskAgent.TaskGroup> {
3174
+
3175
+ const queryValues: any = {
3176
+ versionSpec: versionSpec,
3177
+ '$expand': expand
3178
+ };
3179
+
3180
+ return this.beginRequest<TaskAgent.TaskGroup>({
3181
+ apiVersion: "7.2-preview.1",
3182
+ routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
3183
+ routeValues: {
3184
+ project: project,
3185
+ taskGroupId: taskGroupId
3186
+ },
3187
+ queryParams: queryValues
3188
+ });
3189
+ }
3190
+
3191
+ /**
3192
+ * @param project - Project ID or project name
3193
+ * @param taskGroupId -
3194
+ * @param revision -
3195
+ */
3196
+ public async getTaskGroupRevision(
3197
+ project: string,
3198
+ taskGroupId: string,
3199
+ revision: number
3200
+ ): Promise<string> {
3201
+
3202
+ const queryValues: any = {
3203
+ revision: revision
3204
+ };
3205
+
3206
+ return this.beginRequest<string>({
3207
+ apiVersion: "7.2-preview.1",
3208
+ httpResponseType: "text/plain",
3209
+ routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
3210
+ routeValues: {
3211
+ project: project,
3212
+ taskGroupId: taskGroupId
3213
+ },
3214
+ queryParams: queryValues
3215
+ });
3216
+ }
3217
+
3218
+ /**
3219
+ * List task groups.
3220
+ *
3221
+ * @param project - Project ID or project name
3222
+ * @param taskGroupId - Id of the task group.
3223
+ * @param expanded - 'true' to recursively expand task groups. Default is 'false'.
3224
+ * @param taskIdFilter - Guid of the taskId to filter.
3225
+ * @param deleted - 'true'to include deleted task groups. Default is 'false'.
3226
+ * @param top - Number of task groups to get.
3227
+ * @param continuationToken - Gets the task groups after the continuation token provided.
3228
+ * @param queryOrder - Gets the results in the defined order. Default is 'CreatedOnDescending'.
3229
+ */
3230
+ public async getTaskGroups(
3231
+ project: string,
3232
+ taskGroupId?: string,
3233
+ expanded?: boolean,
3234
+ taskIdFilter?: string,
3235
+ deleted?: boolean,
3236
+ top?: number,
3237
+ continuationToken?: Date,
3238
+ queryOrder?: TaskAgent.TaskGroupQueryOrder
3239
+ ): Promise<TaskAgent.TaskGroup[]> {
3240
+
3241
+ const queryValues: any = {
3242
+ expanded: expanded,
3243
+ taskIdFilter: taskIdFilter,
3244
+ deleted: deleted,
3245
+ '$top': top,
3246
+ continuationToken: continuationToken,
3247
+ queryOrder: queryOrder
3248
+ };
3249
+
3250
+ return this.beginRequest<TaskAgent.TaskGroup[]>({
3251
+ apiVersion: "7.2-preview.1",
3252
+ routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
3253
+ routeValues: {
3254
+ project: project,
3255
+ taskGroupId: taskGroupId
3256
+ },
3257
+ queryParams: queryValues
3258
+ });
3259
+ }
3260
+
3261
+ /**
3262
+ * @param taskGroupMetadata -
3263
+ * @param project - Project ID or project name
3264
+ * @param parentTaskGroupId -
3265
+ */
3266
+ public async publishTaskGroup(
3267
+ taskGroupMetadata: TaskAgent.PublishTaskGroupMetadata,
3268
+ project: string,
3269
+ parentTaskGroupId: string
3270
+ ): Promise<TaskAgent.TaskGroup[]> {
3271
+
3272
+ const queryValues: any = {
3273
+ parentTaskGroupId: parentTaskGroupId
3274
+ };
3275
+
3276
+ return this.beginRequest<TaskAgent.TaskGroup[]>({
3277
+ apiVersion: "7.2-preview.1",
3278
+ method: "PUT",
3279
+ routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
3280
+ routeValues: {
3281
+ project: project
3282
+ },
3283
+ queryParams: queryValues,
3284
+ body: taskGroupMetadata
3285
+ });
3286
+ }
3287
+
3288
+ /**
3289
+ * @param taskGroup -
3290
+ * @param project - Project ID or project name
3291
+ */
3292
+ public async undeleteTaskGroup(
3293
+ taskGroup: TaskAgent.TaskGroup,
3294
+ project: string
3295
+ ): Promise<TaskAgent.TaskGroup[]> {
3296
+
3297
+ return this.beginRequest<TaskAgent.TaskGroup[]>({
3298
+ apiVersion: "7.2-preview.1",
3299
+ method: "PATCH",
3300
+ routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
3301
+ routeValues: {
3302
+ project: project
3303
+ },
3304
+ body: taskGroup
3305
+ });
3306
+ }
3307
+
3308
+ /**
3309
+ * Update a task group.
3310
+ *
3311
+ * @param taskGroup - Task group to update.
3312
+ * @param project - Project ID or project name
3313
+ * @param taskGroupId - Id of the task group to update.
3314
+ */
3315
+ public async updateTaskGroup(
3316
+ taskGroup: TaskAgent.TaskGroupUpdateParameter,
3317
+ project: string,
3318
+ taskGroupId?: string
3319
+ ): Promise<TaskAgent.TaskGroup> {
3320
+
3321
+ return this.beginRequest<TaskAgent.TaskGroup>({
3322
+ apiVersion: "7.2-preview.1",
3323
+ method: "PUT",
3324
+ routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
3325
+ routeValues: {
3326
+ project: project,
3327
+ taskGroupId: taskGroupId
3328
+ },
3329
+ body: taskGroup
3330
+ });
3331
+ }
3332
+
3333
+ /**
3334
+ * @param taskGroupUpdateProperties -
3335
+ * @param project - Project ID or project name
3336
+ * @param taskGroupId -
3337
+ * @param disablePriorVersions -
3338
+ */
3339
+ public async updateTaskGroupProperties(
3340
+ taskGroupUpdateProperties: TaskAgent.TaskGroupUpdatePropertiesBase,
3341
+ project: string,
3342
+ taskGroupId: string,
3343
+ disablePriorVersions?: boolean
3344
+ ): Promise<TaskAgent.TaskGroup[]> {
3345
+
3346
+ const queryValues: any = {
3347
+ disablePriorVersions: disablePriorVersions
3348
+ };
3349
+
3350
+ return this.beginRequest<TaskAgent.TaskGroup[]>({
3351
+ apiVersion: "7.2-preview.1",
3352
+ method: "PATCH",
3353
+ routeTemplate: "{project}/_apis/distributedtask/taskgroups/{taskGroupId}",
3354
+ routeValues: {
3355
+ project: project,
3356
+ taskGroupId: taskGroupId
3357
+ },
3358
+ queryParams: queryValues,
3359
+ body: taskGroupUpdateProperties
3360
+ });
3361
+ }
3362
+
3363
+ /**
3364
+ * @param taskId -
3365
+ */
3366
+ public async deleteTaskDefinition(
3367
+ taskId: string
3368
+ ): Promise<void> {
3369
+
3370
+ return this.beginRequest<void>({
3371
+ apiVersion: "7.2-preview.1",
3372
+ method: "DELETE",
3373
+ routeTemplate: "_apis/distributedtask/tasks/{taskId}/{versionString}",
3374
+ routeValues: {
3375
+ taskId: taskId
3376
+ }
3377
+ });
3378
+ }
3379
+
3380
+ /**
3381
+ * @param taskId -
3382
+ * @param versionString -
3383
+ * @param visibility -
3384
+ * @param scopeLocal -
3385
+ */
3386
+ public async getTaskContentZip(
3387
+ taskId: string,
3388
+ versionString: string,
3389
+ visibility?: string[],
3390
+ scopeLocal?: boolean
3391
+ ): Promise<ArrayBuffer> {
3392
+
3393
+ const queryValues: any = {
3394
+ visibility: visibility,
3395
+ scopeLocal: scopeLocal
3396
+ };
3397
+
3398
+ return this.beginRequest<ArrayBuffer>({
3399
+ apiVersion: "7.2-preview.1",
3400
+ httpResponseType: "application/zip",
3401
+ routeTemplate: "_apis/distributedtask/tasks/{taskId}/{versionString}",
3402
+ routeValues: {
3403
+ taskId: taskId,
3404
+ versionString: versionString
3405
+ },
3406
+ queryParams: queryValues
3407
+ });
3408
+ }
3409
+
3410
+ /**
3411
+ * @param taskId -
3412
+ * @param versionString -
3413
+ * @param visibility -
3414
+ * @param scopeLocal -
3415
+ */
3416
+ public async getTaskDefinition(
3417
+ taskId: string,
3418
+ versionString: string,
3419
+ visibility?: string[],
3420
+ scopeLocal?: boolean
3421
+ ): Promise<TaskAgent.TaskDefinition> {
3422
+
3423
+ const queryValues: any = {
3424
+ visibility: visibility,
3425
+ scopeLocal: scopeLocal
3426
+ };
3427
+
3428
+ return this.beginRequest<TaskAgent.TaskDefinition>({
3429
+ apiVersion: "7.2-preview.1",
3430
+ routeTemplate: "_apis/distributedtask/tasks/{taskId}/{versionString}",
3431
+ routeValues: {
3432
+ taskId: taskId,
3433
+ versionString: versionString
3434
+ },
3435
+ queryParams: queryValues
3436
+ });
3437
+ }
3438
+
3439
+ /**
3440
+ * @param taskId -
3441
+ * @param visibility -
3442
+ * @param scopeLocal -
3443
+ * @param allVersions -
3444
+ */
3445
+ public async getTaskDefinitions(
3446
+ taskId?: string,
3447
+ visibility?: string[],
3448
+ scopeLocal?: boolean,
3449
+ allVersions?: boolean
3450
+ ): Promise<TaskAgent.TaskDefinition[]> {
3451
+
3452
+ const queryValues: any = {
3453
+ visibility: visibility,
3454
+ scopeLocal: scopeLocal,
3455
+ allVersions: allVersions
3456
+ };
3457
+
3458
+ return this.beginRequest<TaskAgent.TaskDefinition[]>({
3459
+ apiVersion: "7.2-preview.1",
3460
+ routeTemplate: "_apis/distributedtask/tasks/{taskId}/{versionString}",
3461
+ routeValues: {
3462
+ taskId: taskId
3463
+ },
3464
+ queryParams: queryValues
3465
+ });
3466
+ }
3467
+
3468
+ /**
3469
+ * @param poolId -
3470
+ * @param agentId -
3471
+ * @param currentState -
3472
+ */
3473
+ public async updateAgentUpdateState(
3474
+ poolId: number,
3475
+ agentId: number,
3476
+ currentState: string
3477
+ ): Promise<TaskAgent.TaskAgent> {
3478
+
3479
+ const queryValues: any = {
3480
+ currentState: currentState
3481
+ };
3482
+
3483
+ return this.beginRequest<TaskAgent.TaskAgent>({
3484
+ apiVersion: "7.2-preview.1",
3485
+ method: "PUT",
3486
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}/updates",
3487
+ routeValues: {
3488
+ poolId: poolId,
3489
+ agentId: agentId
3490
+ },
3491
+ queryParams: queryValues
3492
+ });
3493
+ }
3494
+
3495
+ /**
3496
+ * @param userCapabilities -
3497
+ * @param poolId -
3498
+ * @param agentId -
3499
+ */
3500
+ public async updateAgentUserCapabilities(
3501
+ userCapabilities: { [key: string] : string; },
3502
+ poolId: number,
3503
+ agentId: number
3504
+ ): Promise<TaskAgent.TaskAgent> {
3505
+
3506
+ return this.beginRequest<TaskAgent.TaskAgent>({
3507
+ apiVersion: "7.2-preview.1",
3508
+ method: "PUT",
3509
+ routeTemplate: "_apis/distributedtask/pools/{poolId}/agents/{agentId}/usercapabilities",
3510
+ routeValues: {
3511
+ poolId: poolId,
3512
+ agentId: agentId
3513
+ },
3514
+ body: userCapabilities
3515
+ });
3516
+ }
3517
+
3518
+ /**
3519
+ * Add a variable group.
3520
+ *
3521
+ * @param variableGroupParameters -
3522
+ */
3523
+ public async addVariableGroup(
3524
+ variableGroupParameters: TaskAgent.VariableGroupParameters
3525
+ ): Promise<TaskAgent.VariableGroup> {
3526
+
3527
+ return this.beginRequest<TaskAgent.VariableGroup>({
3528
+ apiVersion: "7.2-preview.2",
3529
+ method: "POST",
3530
+ routeTemplate: "_apis/distributedtask/variablegroups/{groupId}",
3531
+ body: variableGroupParameters
3532
+ });
3533
+ }
3534
+
3535
+ /**
3536
+ * Delete a variable group
3537
+ *
3538
+ * @param groupId - Id of the variable group.
3539
+ * @param projectIds -
3540
+ */
3541
+ public async deleteVariableGroup(
3542
+ groupId: number,
3543
+ projectIds: string[]
3544
+ ): Promise<void> {
3545
+
3546
+ const queryValues: any = {
3547
+ projectIds: projectIds && projectIds.join(",")
3548
+ };
3549
+
3550
+ return this.beginRequest<void>({
3551
+ apiVersion: "7.2-preview.2",
3552
+ method: "DELETE",
3553
+ routeTemplate: "_apis/distributedtask/variablegroups/{groupId}",
3554
+ routeValues: {
3555
+ groupId: groupId
3556
+ },
3557
+ queryParams: queryValues
3558
+ });
3559
+ }
3560
+
3561
+ /**
3562
+ * Add a variable group.
3563
+ *
3564
+ * @param variableGroupProjectReferences -
3565
+ * @param variableGroupId -
3566
+ */
3567
+ public async shareVariableGroup(
3568
+ variableGroupProjectReferences: TaskAgent.VariableGroupProjectReference[],
3569
+ variableGroupId: number
3570
+ ): Promise<void> {
3571
+
3572
+ const queryValues: any = {
3573
+ variableGroupId: variableGroupId
3574
+ };
3575
+
3576
+ return this.beginRequest<void>({
3577
+ apiVersion: "7.2-preview.2",
3578
+ method: "PATCH",
3579
+ routeTemplate: "_apis/distributedtask/variablegroups/{groupId}",
3580
+ queryParams: queryValues,
3581
+ body: variableGroupProjectReferences
3582
+ });
3583
+ }
3584
+
3585
+ /**
3586
+ * Update a variable group.
3587
+ *
3588
+ * @param variableGroupParameters -
3589
+ * @param groupId - Id of the variable group to update.
3590
+ */
3591
+ public async updateVariableGroup(
3592
+ variableGroupParameters: TaskAgent.VariableGroupParameters,
3593
+ groupId: number
3594
+ ): Promise<TaskAgent.VariableGroup> {
3595
+
3596
+ return this.beginRequest<TaskAgent.VariableGroup>({
3597
+ apiVersion: "7.2-preview.2",
3598
+ method: "PUT",
3599
+ routeTemplate: "_apis/distributedtask/variablegroups/{groupId}",
3600
+ routeValues: {
3601
+ groupId: groupId
3602
+ },
3603
+ body: variableGroupParameters
3604
+ });
3605
+ }
3606
+
3607
+ /**
3608
+ * Get a variable group.
3609
+ *
3610
+ * @param project - Project ID or project name
3611
+ * @param groupId - Id of the variable group.
3612
+ */
3613
+ public async getVariableGroup(
3614
+ project: string,
3615
+ groupId: number
3616
+ ): Promise<TaskAgent.VariableGroup> {
3617
+
3618
+ return this.beginRequest<TaskAgent.VariableGroup>({
3619
+ apiVersion: "7.2-preview.2",
3620
+ routeTemplate: "{project}/_apis/distributedtask/variablegroups/{groupId}",
3621
+ routeValues: {
3622
+ project: project,
3623
+ groupId: groupId
3624
+ }
3625
+ });
3626
+ }
3627
+
3628
+ /**
3629
+ * Get variable groups.
3630
+ *
3631
+ * @param project - Project ID or project name
3632
+ * @param groupName - Name of variable group.
3633
+ * @param actionFilter - Action filter for the variable group. It specifies the action which can be performed on the variable groups.
3634
+ * @param top - Number of variable groups to get.
3635
+ * @param continuationToken - Gets the variable groups after the continuation token provided.
3636
+ * @param queryOrder - Gets the results in the defined order. Default is 'IdDescending'.
3637
+ */
3638
+ public async getVariableGroups(
3639
+ project: string,
3640
+ groupName?: string,
3641
+ actionFilter?: TaskAgent.VariableGroupActionFilter,
3642
+ top?: number,
3643
+ continuationToken?: number,
3644
+ queryOrder?: TaskAgent.VariableGroupQueryOrder
3645
+ ): Promise<TaskAgent.VariableGroup[]> {
3646
+
3647
+ const queryValues: any = {
3648
+ groupName: groupName,
3649
+ actionFilter: actionFilter,
3650
+ '$top': top,
3651
+ continuationToken: continuationToken,
3652
+ queryOrder: queryOrder
3653
+ };
3654
+
3655
+ return this.beginRequest<TaskAgent.VariableGroup[]>({
3656
+ apiVersion: "7.2-preview.2",
3657
+ routeTemplate: "{project}/_apis/distributedtask/variablegroups/{groupId}",
3658
+ routeValues: {
3659
+ project: project
3660
+ },
3661
+ queryParams: queryValues
3662
+ });
3663
+ }
3664
+
3665
+ /**
3666
+ * Get variable groups by ids.
3667
+ *
3668
+ * @param project - Project ID or project name
3669
+ * @param groupIds - Comma separated list of Ids of variable groups.
3670
+ * @param loadSecrets - Flag indicating if the secrets within variable groups should be loaded.
3671
+ */
3672
+ public async getVariableGroupsById(
3673
+ project: string,
3674
+ groupIds: number[],
3675
+ loadSecrets?: boolean
3676
+ ): Promise<TaskAgent.VariableGroup[]> {
3677
+
3678
+ const queryValues: any = {
3679
+ groupIds: groupIds && groupIds.join(","),
3680
+ loadSecrets: loadSecrets
3681
+ };
3682
+
3683
+ return this.beginRequest<TaskAgent.VariableGroup[]>({
3684
+ apiVersion: "7.2-preview.2",
3685
+ routeTemplate: "{project}/_apis/distributedtask/variablegroups/{groupId}",
3686
+ routeValues: {
3687
+ project: project
3688
+ },
3689
+ queryParams: queryValues
3690
+ });
3691
+ }
3692
+
3693
+ /**
3694
+ * @param createParameters -
3695
+ * @param project - Project ID or project name
3696
+ * @param environmentId -
3697
+ */
3698
+ public async addVirtualMachineGroup(
3699
+ createParameters: TaskAgent.VirtualMachineGroupCreateParameters,
3700
+ project: string,
3701
+ environmentId: number
3702
+ ): Promise<TaskAgent.VirtualMachineGroup> {
3703
+
3704
+ return this.beginRequest<TaskAgent.VirtualMachineGroup>({
3705
+ apiVersion: "7.2-preview.1",
3706
+ method: "POST",
3707
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}",
3708
+ routeValues: {
3709
+ project: project,
3710
+ environmentId: environmentId
3711
+ },
3712
+ body: createParameters
3713
+ });
3714
+ }
3715
+
3716
+ /**
3717
+ * @param project - Project ID or project name
3718
+ * @param environmentId -
3719
+ * @param resourceId -
3720
+ */
3721
+ public async deleteVirtualMachineGroup(
3722
+ project: string,
3723
+ environmentId: number,
3724
+ resourceId: number
3725
+ ): Promise<void> {
3726
+
3727
+ return this.beginRequest<void>({
3728
+ apiVersion: "7.2-preview.1",
3729
+ method: "DELETE",
3730
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}",
3731
+ routeValues: {
3732
+ project: project,
3733
+ environmentId: environmentId,
3734
+ resourceId: resourceId
3735
+ }
3736
+ });
3737
+ }
3738
+
3739
+ /**
3740
+ * @param project - Project ID or project name
3741
+ * @param environmentId -
3742
+ * @param resourceId -
3743
+ */
3744
+ public async getVirtualMachineGroup(
3745
+ project: string,
3746
+ environmentId: number,
3747
+ resourceId: number
3748
+ ): Promise<TaskAgent.VirtualMachineGroup> {
3749
+
3750
+ return this.beginRequest<TaskAgent.VirtualMachineGroup>({
3751
+ apiVersion: "7.2-preview.1",
3752
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}",
3753
+ routeValues: {
3754
+ project: project,
3755
+ environmentId: environmentId,
3756
+ resourceId: resourceId
3757
+ }
3758
+ });
3759
+ }
3760
+
3761
+ /**
3762
+ * @param resource -
3763
+ * @param project - Project ID or project name
3764
+ * @param environmentId -
3765
+ */
3766
+ public async updateVirtualMachineGroup(
3767
+ resource: TaskAgent.VirtualMachineGroup,
3768
+ project: string,
3769
+ environmentId: number
3770
+ ): Promise<TaskAgent.VirtualMachineGroup> {
3771
+
3772
+ return this.beginRequest<TaskAgent.VirtualMachineGroup>({
3773
+ apiVersion: "7.2-preview.1",
3774
+ method: "PATCH",
3775
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}",
3776
+ routeValues: {
3777
+ project: project,
3778
+ environmentId: environmentId
3779
+ },
3780
+ body: resource
3781
+ });
3782
+ }
3783
+
3784
+ /**
3785
+ * @param project - Project ID or project name
3786
+ * @param environmentId -
3787
+ * @param resourceId -
3788
+ * @param continuationToken -
3789
+ * @param name -
3790
+ * @param partialNameMatch -
3791
+ * @param tags -
3792
+ * @param top -
3793
+ */
3794
+ public async getVirtualMachines(
3795
+ project: string,
3796
+ environmentId: number,
3797
+ resourceId: number,
3798
+ continuationToken?: string,
3799
+ name?: string,
3800
+ partialNameMatch?: boolean,
3801
+ tags?: string[],
3802
+ top?: number
3803
+ ): Promise<WebApi.PagedList<TaskAgent.VirtualMachine>> {
3804
+
3805
+ const queryValues: any = {
3806
+ continuationToken: continuationToken,
3807
+ name: name,
3808
+ partialNameMatch: partialNameMatch,
3809
+ tags: tags && tags.join(","),
3810
+ '$top': top
3811
+ };
3812
+
3813
+ return this.beginRequest<Response>({
3814
+ apiVersion: "7.2-preview.1",
3815
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}/virtualmachines",
3816
+ routeValues: {
3817
+ project: project,
3818
+ environmentId: environmentId,
3819
+ resourceId: resourceId
3820
+ },
3821
+ queryParams: queryValues,
3822
+ returnRawResponse: true
3823
+ }).then(async response => {
3824
+ const body = <WebApi.PagedList<TaskAgent.VirtualMachine>>await response.text().then(deserializeVssJsonObject);
3825
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
3826
+ return body;
3827
+ });
3828
+ }
3829
+
3830
+ /**
3831
+ * @param machines -
3832
+ * @param project - Project ID or project name
3833
+ * @param environmentId -
3834
+ * @param resourceId -
3835
+ */
3836
+ public async updateVirtualMachines(
3837
+ machines: TaskAgent.VirtualMachine[],
3838
+ project: string,
3839
+ environmentId: number,
3840
+ resourceId: number
3841
+ ): Promise<TaskAgent.VirtualMachine[]> {
3842
+
3843
+ return this.beginRequest<TaskAgent.VirtualMachine[]>({
3844
+ apiVersion: "7.2-preview.1",
3845
+ method: "PATCH",
3846
+ routeTemplate: "{project}/_apis/distributedtask/environments/{environmentId}/providers/virtualmachinegroups/{resourceId}/virtualmachines",
3847
+ routeValues: {
3848
+ project: project,
3849
+ environmentId: environmentId,
3850
+ resourceId: resourceId
3851
+ },
3852
+ body: machines
3853
+ });
3854
+ }
3855
+
3856
+ /**
3857
+ * @param tenantId -
3858
+ * @param redirectUri -
3859
+ * @param promptOption -
3860
+ * @param completeCallbackPayload -
3861
+ * @param completeCallbackByAuthCode -
3862
+ */
3863
+ public async createAadOAuthRequest(
3864
+ tenantId: string,
3865
+ redirectUri: string,
3866
+ promptOption?: TaskAgent.AadLoginPromptOption,
3867
+ completeCallbackPayload?: string,
3868
+ completeCallbackByAuthCode?: boolean
3869
+ ): Promise<string> {
3870
+
3871
+ const queryValues: any = {
3872
+ tenantId: tenantId,
3873
+ redirectUri: redirectUri,
3874
+ promptOption: promptOption,
3875
+ completeCallbackPayload: completeCallbackPayload,
3876
+ completeCallbackByAuthCode: completeCallbackByAuthCode
3877
+ };
3878
+
3879
+ return this.beginRequest<string>({
3880
+ apiVersion: "7.2-preview.1",
3881
+ method: "POST",
3882
+ routeTemplate: "_apis/distributedtask/serviceendpointproxy/vstsaadoauth",
3883
+ queryParams: queryValues
3884
+ });
3885
+ }
3886
+
3887
+ /**
3888
+ */
3889
+ public async getVstsAadTenantId(
3890
+ ): Promise<string> {
3891
+
3892
+ return this.beginRequest<string>({
3893
+ apiVersion: "7.2-preview.1",
3894
+ routeTemplate: "_apis/distributedtask/serviceendpointproxy/vstsaadoauth"
3895
+ });
3896
+ }
3897
+
3898
+ /**
3899
+ * GET the Yaml schema used for Yaml file validation.
3900
+ *
3901
+ * @param validateTaskNames - Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation).
3902
+ */
3903
+ public async getYamlSchema(
3904
+ validateTaskNames?: boolean
3905
+ ): Promise<any> {
3906
+
3907
+ const queryValues: any = {
3908
+ validateTaskNames: validateTaskNames
3909
+ };
3910
+
3911
+ return this.beginRequest<any>({
3912
+ apiVersion: "7.2-preview.1",
3913
+ routeTemplate: "_apis/distributedtask/yamlschema",
3914
+ queryParams: queryValues
3915
+ });
3916
+ }
3917
+
3918
+ }