azure-devops-extension-api 4.245.1 → 4.247.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 (558) 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/{Alert → bin/Alert}/AlertClient.d.ts +1 -1
  7. package/{Alert → bin/Alert}/AlertClient.js +1 -1
  8. package/{Contributions → bin/Contributions}/ContributionsClient.js +2 -2
  9. package/{Contributions → bin/Contributions}/ContributionsClient.min.js +1 -1
  10. package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.js +7 -7
  11. package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.min.js +1 -1
  12. package/{FormInput → bin/FormInput}/FormInput.d.ts +8 -0
  13. package/bin/LICENSE +21 -0
  14. package/bin/README.md +2 -0
  15. package/{TaskAgent → bin/TaskAgent}/TaskAgent.d.ts +12 -0
  16. package/{Test → bin/Test}/Test.d.ts +31 -7
  17. package/{TestPlan → bin/TestPlan}/TestPlan.d.ts +6 -2
  18. package/{TestPlan → bin/TestPlan}/TestPlanClient.d.ts +19 -0
  19. package/{TestPlan → bin/TestPlan}/TestPlanClient.js +84 -0
  20. package/{TestPlan → bin/TestPlan}/TestPlanClient.min.js +1 -1
  21. package/{TestResults → bin/TestResults}/TestResultsClient.d.ts +8 -0
  22. package/{TestResults → bin/TestResults}/TestResultsClient.js +23 -0
  23. package/{TestResults → bin/TestResults}/TestResultsClient.min.js +1 -1
  24. package/bin/package.json +37 -0
  25. package/buildpackage.js +80 -0
  26. package/package.json +1 -1
  27. package/src/Accounts/Accounts.ts +134 -0
  28. package/src/Accounts/AccountsClient.ts +83 -0
  29. package/src/Accounts/index.ts +2 -0
  30. package/src/AdvancedSecurity.Reporting/Reporting.ts +180 -0
  31. package/src/AdvancedSecurity.Reporting/ReportingClient.ts +47 -0
  32. package/src/Alert/Alert.ts +1037 -0
  33. package/src/Alert/AlertClient.ts +330 -0
  34. package/src/Boards/Boards.ts +684 -0
  35. package/src/Boards/BoardsClient.ts +593 -0
  36. package/src/Boards/index.ts +2 -0
  37. package/src/Build/Build.ts +3416 -0
  38. package/src/Build/BuildClient.ts +2740 -0
  39. package/src/Build/BuildServices.ts +39 -0
  40. package/src/Build/index.ts +3 -0
  41. package/src/Comments/Comments.ts +330 -0
  42. package/src/Comments/index.ts +1 -0
  43. package/src/Common/Client.ts +37 -0
  44. package/src/Common/CommonServices.ts +853 -0
  45. package/src/Common/Context.d.ts +46 -0
  46. package/src/Common/Fetch.ts +239 -0
  47. package/src/Common/RestClientBase.ts +186 -0
  48. package/src/Common/System.ts +36 -0
  49. package/src/Common/SystemData.ts +135 -0
  50. package/src/Common/Util/Serialization.ts +59 -0
  51. package/src/Common/Util/Url.ts +773 -0
  52. package/src/Common/index.ts +3 -0
  53. package/src/Contributions/Contributions.ts +708 -0
  54. package/src/Contributions/ContributionsClient.ts +109 -0
  55. package/src/Contributions/index.ts +2 -0
  56. package/src/Core/Core.ts +579 -0
  57. package/src/Core/CoreClient.ts +765 -0
  58. package/src/Core/index.ts +2 -0
  59. package/src/Dashboard/Dashboard.ts +419 -0
  60. package/src/Dashboard/DashboardClient.ts +370 -0
  61. package/src/Dashboard/WidgetConfigHelpers.ts +43 -0
  62. package/src/Dashboard/WidgetContracts.ts +226 -0
  63. package/src/Dashboard/WidgetHelpers.ts +145 -0
  64. package/src/Dashboard/index.ts +5 -0
  65. package/src/DistributedTaskCommon/DistributedTaskCommon.ts +108 -0
  66. package/src/DistributedTaskCommon/index.ts +1 -0
  67. package/src/ExtensionManagement/ExtensionManagement.ts +1205 -0
  68. package/src/ExtensionManagement/ExtensionManagementClient.ts +646 -0
  69. package/src/ExtensionManagement/index.ts +2 -0
  70. package/src/Favorite/Favorite.ts +136 -0
  71. package/src/Favorite/FavoriteClient.ts +301 -0
  72. package/src/FeatureAvailability/FeatureAvailability.ts +20 -0
  73. package/src/FeatureAvailability/FeatureAvailabilityClient.ts +153 -0
  74. package/src/FeatureAvailability/index.ts +2 -0
  75. package/src/FeatureManagement/FeatureManagement.ts +166 -0
  76. package/src/FeatureManagement/FeatureManagementClient.ts +246 -0
  77. package/src/FeatureManagement/index.ts +2 -0
  78. package/src/FileContainer/FileContainer.ts +205 -0
  79. package/src/FileContainer/FileContainerClient.ts +154 -0
  80. package/src/FileContainer/index.ts +2 -0
  81. package/src/FormInput/FormInput.ts +288 -0
  82. package/src/FormInput/index.ts +1 -0
  83. package/src/Gallery/Gallery.ts +1977 -0
  84. package/src/Gallery/GalleryClient.ts +2251 -0
  85. package/src/Gallery/index.ts +2 -0
  86. package/src/Git/CodeEditorTypes.ts +335 -0
  87. package/src/Git/Git.ts +4058 -0
  88. package/src/Git/GitClient.ts +4750 -0
  89. package/src/Git/GitServices.ts +18 -0
  90. package/src/Git/index.ts +4 -0
  91. package/src/Graph/Graph.ts +572 -0
  92. package/src/Graph/GraphClient.ts +846 -0
  93. package/src/Graph/index.ts +2 -0
  94. package/src/Identities/Identities.ts +261 -0
  95. package/src/Identities/IdentityProvider.ts +90 -0
  96. package/src/Identities/IdentityService.ts +89 -0
  97. package/src/Identities/index.ts +3 -0
  98. package/src/Locations/Locations.ts +165 -0
  99. package/src/Locations/LocationsClient.ts +220 -0
  100. package/src/Locations/index.ts +2 -0
  101. package/src/Management/Management.ts +172 -0
  102. package/src/Management/ManagementClient.ts +348 -0
  103. package/src/Notification/Notification.ts +1460 -0
  104. package/src/Notification/NotificationClient.ts +477 -0
  105. package/src/Notification/index.ts +2 -0
  106. package/src/Operations/Operations.ts +86 -0
  107. package/src/Operations/OperationsClient.ts +42 -0
  108. package/src/Operations/index.ts +2 -0
  109. package/src/Pipelines/Pipelines.ts +354 -0
  110. package/src/Pipelines/PipelinesClient.ts +306 -0
  111. package/src/Policy/Policy.ts +173 -0
  112. package/src/Policy/PolicyClient.ts +315 -0
  113. package/src/Policy/index.ts +2 -0
  114. package/src/Profile/Profile.ts +187 -0
  115. package/src/Profile/ProfileClient.ts +328 -0
  116. package/src/Profile/index.ts +2 -0
  117. package/src/ProjectAnalysis/ProjectAnalysis.ts +74 -0
  118. package/src/ProjectAnalysis/ProjectAnalysisClient.ts +124 -0
  119. package/src/ProjectAnalysis/index.ts +2 -0
  120. package/src/Release/Release.ts +4237 -0
  121. package/src/Release/ReleaseClient.ts +2450 -0
  122. package/src/Release/index.ts +2 -0
  123. package/src/ResourceUsage/ResourceUsage.ts +19 -0
  124. package/src/ResourceUsage/ResourceUsageClient.ts +48 -0
  125. package/src/ServiceEndpoint/ServiceEndpoint.ts +930 -0
  126. package/src/ServiceEndpoint/ServiceEndpointClient.ts +617 -0
  127. package/src/ServiceEndpoint/index.ts +2 -0
  128. package/src/ServiceHooks/ServiceHooks.ts +759 -0
  129. package/src/ServiceHooks/ServiceHooksClient.ts +499 -0
  130. package/src/ServiceHooks/index.ts +2 -0
  131. package/src/TaskAgent/TaskAgent.ts +3896 -0
  132. package/src/TaskAgent/TaskAgentClient.ts +3918 -0
  133. package/src/TaskAgent/index.ts +2 -0
  134. package/src/Test/Test.ts +5853 -0
  135. package/src/Test/TestClient.ts +2201 -0
  136. package/src/Test/index.ts +2 -0
  137. package/src/TestPlan/TestPlan.ts +1384 -0
  138. package/src/TestPlan/TestPlanClient.ts +1367 -0
  139. package/src/TestPlan/index.ts +2 -0
  140. package/{AdvancedSecurity.Reporting/Reporting.js → src/TestResults/TestResults.ts} +7 -5
  141. package/src/TestResults/TestResultsClient.ts +3450 -0
  142. package/src/TestResults/index.ts +2 -0
  143. package/src/Tfvc/Tfvc.ts +770 -0
  144. package/src/Tfvc/TfvcClient.ts +757 -0
  145. package/src/Tfvc/index.ts +2 -0
  146. package/src/WebApi/WebApi.ts +452 -0
  147. package/src/WebApi/index.ts +1 -0
  148. package/src/Wiki/Wiki.ts +352 -0
  149. package/src/Wiki/WikiClient.ts +712 -0
  150. package/src/Wiki/index.ts +2 -0
  151. package/src/Work/Work.ts +1367 -0
  152. package/src/Work/WorkClient.ts +1489 -0
  153. package/src/Work/index.ts +2 -0
  154. package/src/WorkItemTracking/WorkItemTracking.ts +2215 -0
  155. package/src/WorkItemTracking/WorkItemTrackingClient.ts +2032 -0
  156. package/src/WorkItemTracking/WorkItemTrackingServices.ts +329 -0
  157. package/src/WorkItemTracking/index.ts +3 -0
  158. package/src/WorkItemTrackingProcess/WorkItemTrackingProcess.ts +1295 -0
  159. package/src/WorkItemTrackingProcess/WorkItemTrackingProcessClient.ts +1455 -0
  160. package/src/WorkItemTrackingProcess/index.ts +2 -0
  161. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.ts +606 -0
  162. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.ts +1175 -0
  163. package/src/WorkItemTrackingProcessDefinitions/index.ts +2 -0
  164. package/src/index.ts +1 -0
  165. package/tsconfig.json +21 -0
  166. package/AdvancedSecurity.Reporting/Reporting.min.js +0 -1
  167. /package/{Accounts → bin/Accounts}/Accounts.d.ts +0 -0
  168. /package/{Accounts → bin/Accounts}/Accounts.js +0 -0
  169. /package/{Accounts → bin/Accounts}/Accounts.min.js +0 -0
  170. /package/{Accounts → bin/Accounts}/AccountsClient.d.ts +0 -0
  171. /package/{Accounts → bin/Accounts}/AccountsClient.js +0 -0
  172. /package/{Accounts → bin/Accounts}/AccountsClient.min.js +0 -0
  173. /package/{Accounts → bin/Accounts}/index.d.ts +0 -0
  174. /package/{Accounts → bin/Accounts}/index.js +0 -0
  175. /package/{Accounts → bin/Accounts}/index.min.js +0 -0
  176. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.d.ts +0 -0
  177. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.js +0 -0
  178. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.min.js +0 -0
  179. /package/{Alert → bin/Alert}/Alert.js +0 -0
  180. /package/{Alert → bin/Alert}/Alert.min.js +0 -0
  181. /package/{Alert → bin/Alert}/AlertClient.min.js +0 -0
  182. /package/{Boards → bin/Boards}/Boards.d.ts +0 -0
  183. /package/{Boards → bin/Boards}/Boards.js +0 -0
  184. /package/{Boards → bin/Boards}/Boards.min.js +0 -0
  185. /package/{Boards → bin/Boards}/BoardsClient.d.ts +0 -0
  186. /package/{Boards → bin/Boards}/BoardsClient.js +0 -0
  187. /package/{Boards → bin/Boards}/BoardsClient.min.js +0 -0
  188. /package/{Boards → bin/Boards}/index.d.ts +0 -0
  189. /package/{Boards → bin/Boards}/index.js +0 -0
  190. /package/{Boards → bin/Boards}/index.min.js +0 -0
  191. /package/{Build → bin/Build}/Build.d.ts +0 -0
  192. /package/{Build → bin/Build}/Build.js +0 -0
  193. /package/{Build → bin/Build}/Build.min.js +0 -0
  194. /package/{Build → bin/Build}/BuildClient.d.ts +0 -0
  195. /package/{Build → bin/Build}/BuildClient.js +0 -0
  196. /package/{Build → bin/Build}/BuildClient.min.js +0 -0
  197. /package/{Build → bin/Build}/BuildServices.d.ts +0 -0
  198. /package/{Build → bin/Build}/BuildServices.js +0 -0
  199. /package/{Build → bin/Build}/BuildServices.min.js +0 -0
  200. /package/{Build → bin/Build}/index.d.ts +0 -0
  201. /package/{Build → bin/Build}/index.js +0 -0
  202. /package/{Build → bin/Build}/index.min.js +0 -0
  203. /package/{Comments → bin/Comments}/Comments.d.ts +0 -0
  204. /package/{Comments → bin/Comments}/Comments.js +0 -0
  205. /package/{Comments → bin/Comments}/Comments.min.js +0 -0
  206. /package/{Comments → bin/Comments}/index.d.ts +0 -0
  207. /package/{Comments → bin/Comments}/index.js +0 -0
  208. /package/{Comments → bin/Comments}/index.min.js +0 -0
  209. /package/{Common → bin/Common}/Client.d.ts +0 -0
  210. /package/{Common → bin/Common}/Client.js +0 -0
  211. /package/{Common → bin/Common}/Client.min.js +0 -0
  212. /package/{Common → bin/Common}/CommonServices.d.ts +0 -0
  213. /package/{Common → bin/Common}/CommonServices.js +0 -0
  214. /package/{Common → bin/Common}/CommonServices.min.js +0 -0
  215. /package/{Common → bin/Common}/Context.d.ts +0 -0
  216. /package/{Common → bin/Common}/Fetch.d.ts +0 -0
  217. /package/{Common → bin/Common}/Fetch.js +0 -0
  218. /package/{Common → bin/Common}/Fetch.min.js +0 -0
  219. /package/{Common → bin/Common}/RestClientBase.d.ts +0 -0
  220. /package/{Common → bin/Common}/RestClientBase.js +0 -0
  221. /package/{Common → bin/Common}/RestClientBase.min.js +0 -0
  222. /package/{Common → bin/Common}/System.d.ts +0 -0
  223. /package/{Common → bin/Common}/System.js +0 -0
  224. /package/{Common → bin/Common}/System.min.js +0 -0
  225. /package/{Common → bin/Common}/SystemData.d.ts +0 -0
  226. /package/{Common → bin/Common}/SystemData.js +0 -0
  227. /package/{Common → bin/Common}/SystemData.min.js +0 -0
  228. /package/{Common → bin/Common}/Util/Serialization.d.ts +0 -0
  229. /package/{Common → bin/Common}/Util/Serialization.js +0 -0
  230. /package/{Common → bin/Common}/Util/Serialization.min.js +0 -0
  231. /package/{Common → bin/Common}/Util/Url.d.ts +0 -0
  232. /package/{Common → bin/Common}/Util/Url.js +0 -0
  233. /package/{Common → bin/Common}/Util/Url.min.js +0 -0
  234. /package/{Common → bin/Common}/index.d.ts +0 -0
  235. /package/{Common → bin/Common}/index.js +0 -0
  236. /package/{Common → bin/Common}/index.min.js +0 -0
  237. /package/{Contributions → bin/Contributions}/Contributions.d.ts +0 -0
  238. /package/{Contributions → bin/Contributions}/Contributions.js +0 -0
  239. /package/{Contributions → bin/Contributions}/Contributions.min.js +0 -0
  240. /package/{Contributions → bin/Contributions}/ContributionsClient.d.ts +0 -0
  241. /package/{Contributions → bin/Contributions}/index.d.ts +0 -0
  242. /package/{Contributions → bin/Contributions}/index.js +0 -0
  243. /package/{Contributions → bin/Contributions}/index.min.js +0 -0
  244. /package/{Core → bin/Core}/Core.d.ts +0 -0
  245. /package/{Core → bin/Core}/Core.js +0 -0
  246. /package/{Core → bin/Core}/Core.min.js +0 -0
  247. /package/{Core → bin/Core}/CoreClient.d.ts +0 -0
  248. /package/{Core → bin/Core}/CoreClient.js +0 -0
  249. /package/{Core → bin/Core}/CoreClient.min.js +0 -0
  250. /package/{Core → bin/Core}/index.d.ts +0 -0
  251. /package/{Core → bin/Core}/index.js +0 -0
  252. /package/{Core → bin/Core}/index.min.js +0 -0
  253. /package/{Dashboard → bin/Dashboard}/Dashboard.d.ts +0 -0
  254. /package/{Dashboard → bin/Dashboard}/Dashboard.js +0 -0
  255. /package/{Dashboard → bin/Dashboard}/Dashboard.min.js +0 -0
  256. /package/{Dashboard → bin/Dashboard}/DashboardClient.d.ts +0 -0
  257. /package/{Dashboard → bin/Dashboard}/DashboardClient.js +0 -0
  258. /package/{Dashboard → bin/Dashboard}/DashboardClient.min.js +0 -0
  259. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.d.ts +0 -0
  260. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.js +0 -0
  261. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.min.js +0 -0
  262. /package/{Dashboard → bin/Dashboard}/WidgetContracts.d.ts +0 -0
  263. /package/{Dashboard → bin/Dashboard}/WidgetContracts.js +0 -0
  264. /package/{Dashboard → bin/Dashboard}/WidgetContracts.min.js +0 -0
  265. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.d.ts +0 -0
  266. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.js +0 -0
  267. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.min.js +0 -0
  268. /package/{Dashboard → bin/Dashboard}/index.d.ts +0 -0
  269. /package/{Dashboard → bin/Dashboard}/index.js +0 -0
  270. /package/{Dashboard → bin/Dashboard}/index.min.js +0 -0
  271. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.d.ts +0 -0
  272. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.js +0 -0
  273. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.min.js +0 -0
  274. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.d.ts +0 -0
  275. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.js +0 -0
  276. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.min.js +0 -0
  277. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.d.ts +0 -0
  278. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.js +0 -0
  279. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.min.js +0 -0
  280. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.d.ts +0 -0
  281. /package/{ExtensionManagement → bin/ExtensionManagement}/index.d.ts +0 -0
  282. /package/{ExtensionManagement → bin/ExtensionManagement}/index.js +0 -0
  283. /package/{ExtensionManagement → bin/ExtensionManagement}/index.min.js +0 -0
  284. /package/{Favorite → bin/Favorite}/Favorite.d.ts +0 -0
  285. /package/{Favorite → bin/Favorite}/Favorite.js +0 -0
  286. /package/{Favorite → bin/Favorite}/Favorite.min.js +0 -0
  287. /package/{Favorite → bin/Favorite}/FavoriteClient.d.ts +0 -0
  288. /package/{Favorite → bin/Favorite}/FavoriteClient.js +0 -0
  289. /package/{Favorite → bin/Favorite}/FavoriteClient.min.js +0 -0
  290. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.d.ts +0 -0
  291. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.js +0 -0
  292. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.min.js +0 -0
  293. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.d.ts +0 -0
  294. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.js +0 -0
  295. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.min.js +0 -0
  296. /package/{FeatureAvailability → bin/FeatureAvailability}/index.d.ts +0 -0
  297. /package/{FeatureAvailability → bin/FeatureAvailability}/index.js +0 -0
  298. /package/{FeatureAvailability → bin/FeatureAvailability}/index.min.js +0 -0
  299. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.d.ts +0 -0
  300. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.js +0 -0
  301. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.min.js +0 -0
  302. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.d.ts +0 -0
  303. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.js +0 -0
  304. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.min.js +0 -0
  305. /package/{FeatureManagement → bin/FeatureManagement}/index.d.ts +0 -0
  306. /package/{FeatureManagement → bin/FeatureManagement}/index.js +0 -0
  307. /package/{FeatureManagement → bin/FeatureManagement}/index.min.js +0 -0
  308. /package/{FileContainer → bin/FileContainer}/FileContainer.d.ts +0 -0
  309. /package/{FileContainer → bin/FileContainer}/FileContainer.js +0 -0
  310. /package/{FileContainer → bin/FileContainer}/FileContainer.min.js +0 -0
  311. /package/{FileContainer → bin/FileContainer}/FileContainerClient.d.ts +0 -0
  312. /package/{FileContainer → bin/FileContainer}/FileContainerClient.js +0 -0
  313. /package/{FileContainer → bin/FileContainer}/FileContainerClient.min.js +0 -0
  314. /package/{FileContainer → bin/FileContainer}/index.d.ts +0 -0
  315. /package/{FileContainer → bin/FileContainer}/index.js +0 -0
  316. /package/{FileContainer → bin/FileContainer}/index.min.js +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.d.ts +0 -0
  335. /package/{Git → bin/Git}/Git.js +0 -0
  336. /package/{Git → bin/Git}/Git.min.js +0 -0
  337. /package/{Git → bin/Git}/GitClient.d.ts +0 -0
  338. /package/{Git → bin/Git}/GitClient.js +0 -0
  339. /package/{Git → bin/Git}/GitClient.min.js +0 -0
  340. /package/{Git → bin/Git}/GitServices.d.ts +0 -0
  341. /package/{Git → bin/Git}/GitServices.js +0 -0
  342. /package/{Git → bin/Git}/GitServices.min.js +0 -0
  343. /package/{Git → bin/Git}/index.d.ts +0 -0
  344. /package/{Git → bin/Git}/index.js +0 -0
  345. /package/{Git → bin/Git}/index.min.js +0 -0
  346. /package/{Graph → bin/Graph}/Graph.d.ts +0 -0
  347. /package/{Graph → bin/Graph}/Graph.js +0 -0
  348. /package/{Graph → bin/Graph}/Graph.min.js +0 -0
  349. /package/{Graph → bin/Graph}/GraphClient.d.ts +0 -0
  350. /package/{Graph → bin/Graph}/GraphClient.js +0 -0
  351. /package/{Graph → bin/Graph}/GraphClient.min.js +0 -0
  352. /package/{Graph → bin/Graph}/index.d.ts +0 -0
  353. /package/{Graph → bin/Graph}/index.js +0 -0
  354. /package/{Graph → bin/Graph}/index.min.js +0 -0
  355. /package/{Identities → bin/Identities}/Identities.d.ts +0 -0
  356. /package/{Identities → bin/Identities}/Identities.js +0 -0
  357. /package/{Identities → bin/Identities}/Identities.min.js +0 -0
  358. /package/{Identities → bin/Identities}/IdentityProvider.d.ts +0 -0
  359. /package/{Identities → bin/Identities}/IdentityProvider.js +0 -0
  360. /package/{Identities → bin/Identities}/IdentityProvider.min.js +0 -0
  361. /package/{Identities → bin/Identities}/IdentityService.d.ts +0 -0
  362. /package/{Identities → bin/Identities}/IdentityService.js +0 -0
  363. /package/{Identities → bin/Identities}/IdentityService.min.js +0 -0
  364. /package/{Identities → bin/Identities}/index.d.ts +0 -0
  365. /package/{Identities → bin/Identities}/index.js +0 -0
  366. /package/{Identities → bin/Identities}/index.min.js +0 -0
  367. /package/{Locations → bin/Locations}/Locations.d.ts +0 -0
  368. /package/{Locations → bin/Locations}/Locations.js +0 -0
  369. /package/{Locations → bin/Locations}/Locations.min.js +0 -0
  370. /package/{Locations → bin/Locations}/LocationsClient.d.ts +0 -0
  371. /package/{Locations → bin/Locations}/LocationsClient.js +0 -0
  372. /package/{Locations → bin/Locations}/LocationsClient.min.js +0 -0
  373. /package/{Locations → bin/Locations}/index.d.ts +0 -0
  374. /package/{Locations → bin/Locations}/index.js +0 -0
  375. /package/{Locations → bin/Locations}/index.min.js +0 -0
  376. /package/{Management → bin/Management}/Management.d.ts +0 -0
  377. /package/{Management → bin/Management}/Management.js +0 -0
  378. /package/{Management → bin/Management}/Management.min.js +0 -0
  379. /package/{Management → bin/Management}/ManagementClient.d.ts +0 -0
  380. /package/{Management → bin/Management}/ManagementClient.js +0 -0
  381. /package/{Management → bin/Management}/ManagementClient.min.js +0 -0
  382. /package/{Notification → bin/Notification}/Notification.d.ts +0 -0
  383. /package/{Notification → bin/Notification}/Notification.js +0 -0
  384. /package/{Notification → bin/Notification}/Notification.min.js +0 -0
  385. /package/{Notification → bin/Notification}/NotificationClient.d.ts +0 -0
  386. /package/{Notification → bin/Notification}/NotificationClient.js +0 -0
  387. /package/{Notification → bin/Notification}/NotificationClient.min.js +0 -0
  388. /package/{Notification → bin/Notification}/index.d.ts +0 -0
  389. /package/{Notification → bin/Notification}/index.js +0 -0
  390. /package/{Notification → bin/Notification}/index.min.js +0 -0
  391. /package/{Operations → bin/Operations}/Operations.d.ts +0 -0
  392. /package/{Operations → bin/Operations}/Operations.js +0 -0
  393. /package/{Operations → bin/Operations}/Operations.min.js +0 -0
  394. /package/{Operations → bin/Operations}/OperationsClient.d.ts +0 -0
  395. /package/{Operations → bin/Operations}/OperationsClient.js +0 -0
  396. /package/{Operations → bin/Operations}/OperationsClient.min.js +0 -0
  397. /package/{Operations → bin/Operations}/index.d.ts +0 -0
  398. /package/{Operations → bin/Operations}/index.js +0 -0
  399. /package/{Operations → bin/Operations}/index.min.js +0 -0
  400. /package/{Pipelines → bin/Pipelines}/Pipelines.d.ts +0 -0
  401. /package/{Pipelines → bin/Pipelines}/Pipelines.js +0 -0
  402. /package/{Pipelines → bin/Pipelines}/Pipelines.min.js +0 -0
  403. /package/{Pipelines → bin/Pipelines}/PipelinesClient.d.ts +0 -0
  404. /package/{Pipelines → bin/Pipelines}/PipelinesClient.js +0 -0
  405. /package/{Pipelines → bin/Pipelines}/PipelinesClient.min.js +0 -0
  406. /package/{Policy → bin/Policy}/Policy.d.ts +0 -0
  407. /package/{Policy → bin/Policy}/Policy.js +0 -0
  408. /package/{Policy → bin/Policy}/Policy.min.js +0 -0
  409. /package/{Policy → bin/Policy}/PolicyClient.d.ts +0 -0
  410. /package/{Policy → bin/Policy}/PolicyClient.js +0 -0
  411. /package/{Policy → bin/Policy}/PolicyClient.min.js +0 -0
  412. /package/{Policy → bin/Policy}/index.d.ts +0 -0
  413. /package/{Policy → bin/Policy}/index.js +0 -0
  414. /package/{Policy → bin/Policy}/index.min.js +0 -0
  415. /package/{Profile → bin/Profile}/Profile.d.ts +0 -0
  416. /package/{Profile → bin/Profile}/Profile.js +0 -0
  417. /package/{Profile → bin/Profile}/Profile.min.js +0 -0
  418. /package/{Profile → bin/Profile}/ProfileClient.d.ts +0 -0
  419. /package/{Profile → bin/Profile}/ProfileClient.js +0 -0
  420. /package/{Profile → bin/Profile}/ProfileClient.min.js +0 -0
  421. /package/{Profile → bin/Profile}/index.d.ts +0 -0
  422. /package/{Profile → bin/Profile}/index.js +0 -0
  423. /package/{Profile → bin/Profile}/index.min.js +0 -0
  424. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.d.ts +0 -0
  425. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.js +0 -0
  426. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.min.js +0 -0
  427. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.d.ts +0 -0
  428. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.js +0 -0
  429. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.min.js +0 -0
  430. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.d.ts +0 -0
  431. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.js +0 -0
  432. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.min.js +0 -0
  433. /package/{Release → bin/Release}/Release.d.ts +0 -0
  434. /package/{Release → bin/Release}/Release.js +0 -0
  435. /package/{Release → bin/Release}/Release.min.js +0 -0
  436. /package/{Release → bin/Release}/ReleaseClient.d.ts +0 -0
  437. /package/{Release → bin/Release}/ReleaseClient.js +0 -0
  438. /package/{Release → bin/Release}/ReleaseClient.min.js +0 -0
  439. /package/{Release → bin/Release}/index.d.ts +0 -0
  440. /package/{Release → bin/Release}/index.js +0 -0
  441. /package/{Release → bin/Release}/index.min.js +0 -0
  442. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.d.ts +0 -0
  443. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.js +0 -0
  444. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.min.js +0 -0
  445. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.d.ts +0 -0
  446. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.js +0 -0
  447. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.min.js +0 -0
  448. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.d.ts +0 -0
  449. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.js +0 -0
  450. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.min.js +0 -0
  451. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.d.ts +0 -0
  452. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.js +0 -0
  453. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.min.js +0 -0
  454. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.d.ts +0 -0
  455. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.js +0 -0
  456. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.min.js +0 -0
  457. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.d.ts +0 -0
  458. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.js +0 -0
  459. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.min.js +0 -0
  460. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.d.ts +0 -0
  461. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.js +0 -0
  462. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.min.js +0 -0
  463. /package/{ServiceHooks → bin/ServiceHooks}/index.d.ts +0 -0
  464. /package/{ServiceHooks → bin/ServiceHooks}/index.js +0 -0
  465. /package/{ServiceHooks → bin/ServiceHooks}/index.min.js +0 -0
  466. /package/{TaskAgent → bin/TaskAgent}/TaskAgent.js +0 -0
  467. /package/{TaskAgent → bin/TaskAgent}/TaskAgent.min.js +0 -0
  468. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.d.ts +0 -0
  469. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.js +0 -0
  470. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.min.js +0 -0
  471. /package/{TaskAgent → bin/TaskAgent}/index.d.ts +0 -0
  472. /package/{TaskAgent → bin/TaskAgent}/index.js +0 -0
  473. /package/{TaskAgent → bin/TaskAgent}/index.min.js +0 -0
  474. /package/{Test → bin/Test}/Test.js +0 -0
  475. /package/{Test → bin/Test}/Test.min.js +0 -0
  476. /package/{Test → bin/Test}/TestClient.d.ts +0 -0
  477. /package/{Test → bin/Test}/TestClient.js +0 -0
  478. /package/{Test → bin/Test}/TestClient.min.js +0 -0
  479. /package/{Test → bin/Test}/index.d.ts +0 -0
  480. /package/{Test → bin/Test}/index.js +0 -0
  481. /package/{Test → bin/Test}/index.min.js +0 -0
  482. /package/{TestPlan → bin/TestPlan}/TestPlan.js +0 -0
  483. /package/{TestPlan → bin/TestPlan}/TestPlan.min.js +0 -0
  484. /package/{TestPlan → bin/TestPlan}/index.d.ts +0 -0
  485. /package/{TestPlan → bin/TestPlan}/index.js +0 -0
  486. /package/{TestPlan → bin/TestPlan}/index.min.js +0 -0
  487. /package/{TestResults → bin/TestResults}/TestResults.d.ts +0 -0
  488. /package/{TestResults → bin/TestResults}/TestResults.js +0 -0
  489. /package/{TestResults → bin/TestResults}/TestResults.min.js +0 -0
  490. /package/{TestResults → bin/TestResults}/index.d.ts +0 -0
  491. /package/{TestResults → bin/TestResults}/index.js +0 -0
  492. /package/{TestResults → bin/TestResults}/index.min.js +0 -0
  493. /package/{Tfvc → bin/Tfvc}/Tfvc.d.ts +0 -0
  494. /package/{Tfvc → bin/Tfvc}/Tfvc.js +0 -0
  495. /package/{Tfvc → bin/Tfvc}/Tfvc.min.js +0 -0
  496. /package/{Tfvc → bin/Tfvc}/TfvcClient.d.ts +0 -0
  497. /package/{Tfvc → bin/Tfvc}/TfvcClient.js +0 -0
  498. /package/{Tfvc → bin/Tfvc}/TfvcClient.min.js +0 -0
  499. /package/{Tfvc → bin/Tfvc}/index.d.ts +0 -0
  500. /package/{Tfvc → bin/Tfvc}/index.js +0 -0
  501. /package/{Tfvc → bin/Tfvc}/index.min.js +0 -0
  502. /package/{WebApi → bin/WebApi}/WebApi.d.ts +0 -0
  503. /package/{WebApi → bin/WebApi}/WebApi.js +0 -0
  504. /package/{WebApi → bin/WebApi}/WebApi.min.js +0 -0
  505. /package/{WebApi → bin/WebApi}/index.d.ts +0 -0
  506. /package/{WebApi → bin/WebApi}/index.js +0 -0
  507. /package/{WebApi → bin/WebApi}/index.min.js +0 -0
  508. /package/{Wiki → bin/Wiki}/Wiki.d.ts +0 -0
  509. /package/{Wiki → bin/Wiki}/Wiki.js +0 -0
  510. /package/{Wiki → bin/Wiki}/Wiki.min.js +0 -0
  511. /package/{Wiki → bin/Wiki}/WikiClient.d.ts +0 -0
  512. /package/{Wiki → bin/Wiki}/WikiClient.js +0 -0
  513. /package/{Wiki → bin/Wiki}/WikiClient.min.js +0 -0
  514. /package/{Wiki → bin/Wiki}/index.d.ts +0 -0
  515. /package/{Wiki → bin/Wiki}/index.js +0 -0
  516. /package/{Wiki → bin/Wiki}/index.min.js +0 -0
  517. /package/{Work → bin/Work}/Work.d.ts +0 -0
  518. /package/{Work → bin/Work}/Work.js +0 -0
  519. /package/{Work → bin/Work}/Work.min.js +0 -0
  520. /package/{Work → bin/Work}/WorkClient.d.ts +0 -0
  521. /package/{Work → bin/Work}/WorkClient.js +0 -0
  522. /package/{Work → bin/Work}/WorkClient.min.js +0 -0
  523. /package/{Work → bin/Work}/index.d.ts +0 -0
  524. /package/{Work → bin/Work}/index.js +0 -0
  525. /package/{Work → bin/Work}/index.min.js +0 -0
  526. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.d.ts +0 -0
  527. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.js +0 -0
  528. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.min.js +0 -0
  529. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.d.ts +0 -0
  530. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.js +0 -0
  531. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.min.js +0 -0
  532. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.d.ts +0 -0
  533. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.js +0 -0
  534. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.min.js +0 -0
  535. /package/{WorkItemTracking → bin/WorkItemTracking}/index.d.ts +0 -0
  536. /package/{WorkItemTracking → bin/WorkItemTracking}/index.js +0 -0
  537. /package/{WorkItemTracking → bin/WorkItemTracking}/index.min.js +0 -0
  538. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.d.ts +0 -0
  539. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.js +0 -0
  540. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.min.js +0 -0
  541. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.d.ts +0 -0
  542. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.js +0 -0
  543. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.min.js +0 -0
  544. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.d.ts +0 -0
  545. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.js +0 -0
  546. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.min.js +0 -0
  547. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.d.ts +0 -0
  548. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.js +0 -0
  549. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.min.js +0 -0
  550. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.d.ts +0 -0
  551. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.js +0 -0
  552. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.min.js +0 -0
  553. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.d.ts +0 -0
  554. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.js +0 -0
  555. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.min.js +0 -0
  556. /package/{index.d.ts → bin/index.d.ts} +0 -0
  557. /package/{index.js → bin/index.js} +0 -0
  558. /package/{index.min.js → bin/index.min.js} +0 -0
@@ -0,0 +1,2450 @@
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 FormInput from "../FormInput/FormInput";
12
+ import * as Release from "../Release/Release";
13
+ import * as WebApi from "../WebApi/WebApi";
14
+
15
+ export class ReleaseRestClient extends RestClientBase {
16
+ constructor(options: IVssRestClientOptions) {
17
+ super(options);
18
+ }
19
+
20
+ public static readonly RESOURCE_AREA_ID = "efc2f575-36ef-48e9-b672-0c6fb4a48ac5";
21
+
22
+ /**
23
+ * Returns the artifact details that automation agent requires
24
+ *
25
+ * @param project - Project ID or project name
26
+ * @param releaseId -
27
+ */
28
+ public async getAgentArtifactDefinitions(
29
+ project: string,
30
+ releaseId: number
31
+ ): Promise<Release.AgentArtifactDefinition[]> {
32
+
33
+ return this.beginRequest<Release.AgentArtifactDefinition[]>({
34
+ apiVersion: "7.2-preview.1",
35
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/agentartifacts",
36
+ routeValues: {
37
+ project: project,
38
+ releaseId: releaseId
39
+ }
40
+ });
41
+ }
42
+
43
+ /**
44
+ * Get a list of approvals
45
+ *
46
+ * @param project - Project ID or project name
47
+ * @param assignedToFilter - Approvals assigned to this user.
48
+ * @param statusFilter - Approvals with this status. Default is 'pending'.
49
+ * @param releaseIdsFilter - Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4.
50
+ * @param typeFilter - Approval with this type.
51
+ * @param top - Number of approvals to get. Default is 50.
52
+ * @param continuationToken - Gets the approvals after the continuation token provided.
53
+ * @param queryOrder - Gets the results in the defined order of created approvals. Default is 'descending'.
54
+ * @param includeMyGroupApprovals - 'true' to include my group approvals. Default is 'false'.
55
+ */
56
+ public async getApprovals(
57
+ project: string,
58
+ assignedToFilter?: string,
59
+ statusFilter?: Release.ApprovalStatus,
60
+ releaseIdsFilter?: number[],
61
+ typeFilter?: Release.ApprovalType,
62
+ top?: number,
63
+ continuationToken?: number,
64
+ queryOrder?: Release.ReleaseQueryOrder,
65
+ includeMyGroupApprovals?: boolean
66
+ ): Promise<WebApi.PagedList<Release.ReleaseApproval>> {
67
+
68
+ const queryValues: any = {
69
+ assignedToFilter: assignedToFilter,
70
+ statusFilter: statusFilter,
71
+ releaseIdsFilter: releaseIdsFilter && releaseIdsFilter.join(","),
72
+ typeFilter: typeFilter,
73
+ top: top,
74
+ continuationToken: continuationToken,
75
+ queryOrder: queryOrder,
76
+ includeMyGroupApprovals: includeMyGroupApprovals
77
+ };
78
+
79
+ return this.beginRequest<Response>({
80
+ apiVersion: "7.2-preview.3",
81
+ routeTemplate: "{project}/_apis/Release/approvals",
82
+ routeValues: {
83
+ project: project
84
+ },
85
+ queryParams: queryValues,
86
+ returnRawResponse: true
87
+ }).then(async response => {
88
+ const body = <WebApi.PagedList<Release.ReleaseApproval>>await response.text().then(deserializeVssJsonObject);
89
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
90
+ return body;
91
+ });
92
+ }
93
+
94
+ /**
95
+ * Get approval history.
96
+ *
97
+ * @param project - Project ID or project name
98
+ * @param approvalStepId - Id of the approval.
99
+ */
100
+ public async getApprovalHistory(
101
+ project: string,
102
+ approvalStepId: number
103
+ ): Promise<Release.ReleaseApproval> {
104
+
105
+ return this.beginRequest<Release.ReleaseApproval>({
106
+ apiVersion: "7.2-preview.3",
107
+ routeTemplate: "{project}/_apis/Release/approvals/{approvalStepId}/history",
108
+ routeValues: {
109
+ project: project,
110
+ approvalStepId: approvalStepId
111
+ }
112
+ });
113
+ }
114
+
115
+ /**
116
+ * Get an approval.
117
+ *
118
+ * @param project - Project ID or project name
119
+ * @param approvalId - Id of the approval.
120
+ * @param includeHistory - 'true' to include history of the approval. Default is 'false'.
121
+ */
122
+ public async getApproval(
123
+ project: string,
124
+ approvalId: number,
125
+ includeHistory?: boolean
126
+ ): Promise<Release.ReleaseApproval> {
127
+
128
+ const queryValues: any = {
129
+ includeHistory: includeHistory
130
+ };
131
+
132
+ return this.beginRequest<Release.ReleaseApproval>({
133
+ apiVersion: "7.2-preview.3",
134
+ routeTemplate: "{project}/_apis/Release/approvals/{approvalId}",
135
+ routeValues: {
136
+ project: project,
137
+ approvalId: approvalId
138
+ },
139
+ queryParams: queryValues
140
+ });
141
+ }
142
+
143
+ /**
144
+ * Update status of an approval
145
+ *
146
+ * @param approval - ReleaseApproval object having status, approver and comments.
147
+ * @param project - Project ID or project name
148
+ * @param approvalId - Id of the approval.
149
+ */
150
+ public async updateReleaseApproval(
151
+ approval: Release.ReleaseApproval,
152
+ project: string,
153
+ approvalId: number
154
+ ): Promise<Release.ReleaseApproval> {
155
+
156
+ return this.beginRequest<Release.ReleaseApproval>({
157
+ apiVersion: "7.2-preview.3",
158
+ method: "PATCH",
159
+ routeTemplate: "{project}/_apis/Release/approvals/{approvalId}",
160
+ routeValues: {
161
+ project: project,
162
+ approvalId: approvalId
163
+ },
164
+ body: approval
165
+ });
166
+ }
167
+
168
+ /**
169
+ * @param approvals -
170
+ * @param project - Project ID or project name
171
+ */
172
+ public async updateReleaseApprovals(
173
+ approvals: Release.ReleaseApproval[],
174
+ project: string
175
+ ): Promise<Release.ReleaseApproval[]> {
176
+
177
+ return this.beginRequest<Release.ReleaseApproval[]>({
178
+ apiVersion: "7.2-preview.3",
179
+ method: "PATCH",
180
+ routeTemplate: "{project}/_apis/Release/approvals",
181
+ routeValues: {
182
+ project: project
183
+ },
184
+ body: approvals
185
+ });
186
+ }
187
+
188
+ /**
189
+ * Get a task attachment.
190
+ *
191
+ * @param project - Project ID or project name
192
+ * @param releaseId - Id of the release.
193
+ * @param environmentId - Id of the release environment.
194
+ * @param attemptId - Attempt number of deployment.
195
+ * @param timelineId - Timeline Id of the task.
196
+ * @param recordId - Record Id of attachment.
197
+ * @param type - Type of the attachment.
198
+ * @param name - Name of the attachment.
199
+ */
200
+ public async getTaskAttachmentContent(
201
+ project: string,
202
+ releaseId: number,
203
+ environmentId: number,
204
+ attemptId: number,
205
+ timelineId: string,
206
+ recordId: string,
207
+ type: string,
208
+ name: string
209
+ ): Promise<ArrayBuffer> {
210
+
211
+ return this.beginRequest<ArrayBuffer>({
212
+ apiVersion: "7.2-preview.1",
213
+ httpResponseType: "application/octet-stream",
214
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",
215
+ routeValues: {
216
+ project: project,
217
+ releaseId: releaseId,
218
+ environmentId: environmentId,
219
+ attemptId: attemptId,
220
+ timelineId: timelineId,
221
+ recordId: recordId,
222
+ type: type,
223
+ name: name
224
+ }
225
+ });
226
+ }
227
+
228
+ /**
229
+ * Get a release task attachment.
230
+ *
231
+ * @param project - Project ID or project name
232
+ * @param releaseId - Id of the release.
233
+ * @param environmentId - Id of the release environment.
234
+ * @param attemptId - Attempt number of deployment.
235
+ * @param planId - Plan Id of the deploy phase.
236
+ * @param timelineId - Timeline Id of the task.
237
+ * @param recordId - Record Id of attachment.
238
+ * @param type - Type of the attachment.
239
+ * @param name - Name of the attachment.
240
+ */
241
+ public async getReleaseTaskAttachmentContent(
242
+ project: string,
243
+ releaseId: number,
244
+ environmentId: number,
245
+ attemptId: number,
246
+ planId: string,
247
+ timelineId: string,
248
+ recordId: string,
249
+ type: string,
250
+ name: string
251
+ ): Promise<ArrayBuffer> {
252
+
253
+ return this.beginRequest<ArrayBuffer>({
254
+ apiVersion: "7.2-preview.1",
255
+ httpResponseType: "application/octet-stream",
256
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/timelines/{timelineId}/records/{recordId}/attachments/{type}/{name}",
257
+ routeValues: {
258
+ project: project,
259
+ releaseId: releaseId,
260
+ environmentId: environmentId,
261
+ attemptId: attemptId,
262
+ planId: planId,
263
+ timelineId: timelineId,
264
+ recordId: recordId,
265
+ type: type,
266
+ name: name
267
+ }
268
+ });
269
+ }
270
+
271
+ /**
272
+ * Get the task attachments.
273
+ *
274
+ * @param project - Project ID or project name
275
+ * @param releaseId - Id of the release.
276
+ * @param environmentId - Id of the release environment.
277
+ * @param attemptId - Attempt number of deployment.
278
+ * @param timelineId - Timeline Id of the task.
279
+ * @param type - Type of the attachment.
280
+ */
281
+ public async getTaskAttachments(
282
+ project: string,
283
+ releaseId: number,
284
+ environmentId: number,
285
+ attemptId: number,
286
+ timelineId: string,
287
+ type: string
288
+ ): Promise<Release.ReleaseTaskAttachment[]> {
289
+
290
+ return this.beginRequest<Release.ReleaseTaskAttachment[]>({
291
+ apiVersion: "7.2-preview.1",
292
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/attachments/{type}",
293
+ routeValues: {
294
+ project: project,
295
+ releaseId: releaseId,
296
+ environmentId: environmentId,
297
+ attemptId: attemptId,
298
+ timelineId: timelineId,
299
+ type: type
300
+ }
301
+ });
302
+ }
303
+
304
+ /**
305
+ * Get the release task attachments.
306
+ *
307
+ * @param project - Project ID or project name
308
+ * @param releaseId - Id of the release.
309
+ * @param environmentId - Id of the release environment.
310
+ * @param attemptId - Attempt number of deployment.
311
+ * @param planId - Plan Id of the deploy phase.
312
+ * @param type - Type of the attachment.
313
+ */
314
+ public async getReleaseTaskAttachments(
315
+ project: string,
316
+ releaseId: number,
317
+ environmentId: number,
318
+ attemptId: number,
319
+ planId: string,
320
+ type: string
321
+ ): Promise<Release.ReleaseTaskAttachment[]> {
322
+
323
+ return this.beginRequest<Release.ReleaseTaskAttachment[]>({
324
+ apiVersion: "7.2-preview.1",
325
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/plan/{planId}/attachments/{type}",
326
+ routeValues: {
327
+ project: project,
328
+ releaseId: releaseId,
329
+ environmentId: environmentId,
330
+ attemptId: attemptId,
331
+ planId: planId,
332
+ type: type
333
+ }
334
+ });
335
+ }
336
+
337
+ /**
338
+ * @param artifactType -
339
+ * @param sourceId -
340
+ * @param artifactVersionId -
341
+ * @param project - Project ID or project name
342
+ */
343
+ public async getAutoTriggerIssues(
344
+ artifactType: string,
345
+ sourceId: string,
346
+ artifactVersionId: string,
347
+ project?: string
348
+ ): Promise<Release.AutoTriggerIssue[]> {
349
+
350
+ const queryValues: any = {
351
+ artifactType: artifactType,
352
+ sourceId: sourceId,
353
+ artifactVersionId: artifactVersionId
354
+ };
355
+
356
+ return this.beginRequest<Release.AutoTriggerIssue[]>({
357
+ apiVersion: "7.2-preview.1",
358
+ routeTemplate: "{project}/_apis/Release/autotriggerissues",
359
+ routeValues: {
360
+ project: project
361
+ },
362
+ queryParams: queryValues
363
+ });
364
+ }
365
+
366
+ /**
367
+ * Gets a badge that indicates the status of the most recent deployment for an environment.
368
+ *
369
+ * @param projectId - The ID of the Project.
370
+ * @param releaseDefinitionId - The ID of the Release Definition.
371
+ * @param environmentId - The ID of the Environment.
372
+ * @param branchName - The name of the branch.
373
+ */
374
+ public async getDeploymentBadge(
375
+ projectId: string,
376
+ releaseDefinitionId: number,
377
+ environmentId: number,
378
+ branchName?: string
379
+ ): Promise<string> {
380
+
381
+ return this.beginRequest<string>({
382
+ apiVersion: "7.2-preview.1",
383
+ routeTemplate: "_apis/public/Release/badge/{projectId}/{releaseDefinitionId}/{environmentId}/{branchName}",
384
+ routeValues: {
385
+ projectId: projectId,
386
+ releaseDefinitionId: releaseDefinitionId,
387
+ environmentId: environmentId,
388
+ branchName: branchName
389
+ }
390
+ });
391
+ }
392
+
393
+ /**
394
+ * @param project - Project ID or project name
395
+ * @param releaseId -
396
+ * @param baseReleaseId -
397
+ * @param top -
398
+ * @param artifactAlias -
399
+ */
400
+ public async getReleaseChanges(
401
+ project: string,
402
+ releaseId: number,
403
+ baseReleaseId?: number,
404
+ top?: number,
405
+ artifactAlias?: string
406
+ ): Promise<Release.Change[]> {
407
+
408
+ const queryValues: any = {
409
+ baseReleaseId: baseReleaseId,
410
+ '$top': top,
411
+ artifactAlias: artifactAlias
412
+ };
413
+
414
+ return this.beginRequest<Release.Change[]>({
415
+ apiVersion: "7.2-preview.1",
416
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/changes",
417
+ routeValues: {
418
+ project: project,
419
+ releaseId: releaseId
420
+ },
421
+ queryParams: queryValues
422
+ });
423
+ }
424
+
425
+ /**
426
+ * @param project - Project ID or project name
427
+ * @param taskGroupId -
428
+ * @param propertyFilters -
429
+ */
430
+ public async getDefinitionEnvironments(
431
+ project: string,
432
+ taskGroupId?: string,
433
+ propertyFilters?: string[]
434
+ ): Promise<Release.DefinitionEnvironmentReference[]> {
435
+
436
+ const queryValues: any = {
437
+ taskGroupId: taskGroupId,
438
+ propertyFilters: propertyFilters && propertyFilters.join(",")
439
+ };
440
+
441
+ return this.beginRequest<Release.DefinitionEnvironmentReference[]>({
442
+ apiVersion: "7.2-preview.1",
443
+ routeTemplate: "{project}/_apis/Release/definitionEnvironments",
444
+ routeValues: {
445
+ project: project
446
+ },
447
+ queryParams: queryValues
448
+ });
449
+ }
450
+
451
+ /**
452
+ * Create a release definition
453
+ *
454
+ * @param releaseDefinition - release definition object to create.
455
+ * @param project - Project ID or project name
456
+ */
457
+ public async createReleaseDefinition(
458
+ releaseDefinition: Release.ReleaseDefinition,
459
+ project: string
460
+ ): Promise<Release.ReleaseDefinition> {
461
+
462
+ return this.beginRequest<Release.ReleaseDefinition>({
463
+ apiVersion: "7.2-preview.4",
464
+ method: "POST",
465
+ routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
466
+ routeValues: {
467
+ project: project
468
+ },
469
+ body: releaseDefinition
470
+ });
471
+ }
472
+
473
+ /**
474
+ * Delete a release definition.
475
+ *
476
+ * @param project - Project ID or project name
477
+ * @param definitionId - Id of the release definition.
478
+ * @param comment - Comment for deleting a release definition.
479
+ * @param forceDelete - 'true' to automatically cancel any in-progress release deployments and proceed with release definition deletion . Default is 'false'.
480
+ */
481
+ public async deleteReleaseDefinition(
482
+ project: string,
483
+ definitionId: number,
484
+ comment?: string,
485
+ forceDelete?: boolean
486
+ ): Promise<void> {
487
+
488
+ const queryValues: any = {
489
+ comment: comment,
490
+ forceDelete: forceDelete
491
+ };
492
+
493
+ return this.beginRequest<void>({
494
+ apiVersion: "7.2-preview.4",
495
+ method: "DELETE",
496
+ routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
497
+ routeValues: {
498
+ project: project,
499
+ definitionId: definitionId
500
+ },
501
+ queryParams: queryValues
502
+ });
503
+ }
504
+
505
+ /**
506
+ * Get a release definition.
507
+ *
508
+ * @param project - Project ID or project name
509
+ * @param definitionId - Id of the release definition.
510
+ * @param propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definition will contain values for the specified property Ids (if they exist). If not set, properties will not be included.
511
+ */
512
+ public async getReleaseDefinition(
513
+ project: string,
514
+ definitionId: number,
515
+ propertyFilters?: string[]
516
+ ): Promise<Release.ReleaseDefinition> {
517
+
518
+ const queryValues: any = {
519
+ propertyFilters: propertyFilters && propertyFilters.join(",")
520
+ };
521
+
522
+ return this.beginRequest<Release.ReleaseDefinition>({
523
+ apiVersion: "7.2-preview.4",
524
+ routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
525
+ routeValues: {
526
+ project: project,
527
+ definitionId: definitionId
528
+ },
529
+ queryParams: queryValues
530
+ });
531
+ }
532
+
533
+ /**
534
+ * Get release definition of a given revision.
535
+ *
536
+ * @param project - Project ID or project name
537
+ * @param definitionId - Id of the release definition.
538
+ * @param revision - Revision number of the release definition.
539
+ */
540
+ public async getReleaseDefinitionRevision(
541
+ project: string,
542
+ definitionId: number,
543
+ revision: number
544
+ ): Promise<string> {
545
+
546
+ const queryValues: any = {
547
+ revision: revision
548
+ };
549
+
550
+ return this.beginRequest<string>({
551
+ apiVersion: "7.2-preview.4",
552
+ httpResponseType: "text/plain",
553
+ routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
554
+ routeValues: {
555
+ project: project,
556
+ definitionId: definitionId
557
+ },
558
+ queryParams: queryValues
559
+ });
560
+ }
561
+
562
+ /**
563
+ * Get a list of release definitions.
564
+ *
565
+ * @param project - Project ID or project name
566
+ * @param searchText - Get release definitions with names containing searchText.
567
+ * @param expand - The properties that should be expanded in the list of Release definitions.
568
+ * @param artifactType - Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild.
569
+ * @param artifactSourceId - Release definitions with given artifactSourceId will be returned. e.g. For build it would be \{projectGuid\}:\{BuildDefinitionId\}, for Jenkins it would be \{JenkinsConnectionId\}:\{JenkinsDefinitionId\}, for TfsOnPrem it would be \{TfsOnPremConnectionId\}:\{ProjectName\}:\{TfsOnPremDefinitionId\}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions.
570
+ * @param top - Number of release definitions to get.
571
+ * @param continuationToken - Gets the release definitions after the continuation token provided.
572
+ * @param queryOrder - Gets the results in the defined order. Default is 'IdAscending'.
573
+ * @param path - Gets the release definitions under the specified path.
574
+ * @param isExactNameMatch - 'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'.
575
+ * @param tagFilter - A comma-delimited list of tags. Only release definitions with these tags will be returned.
576
+ * @param propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definitions will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release Definition from results irrespective of whether it has property set or not.
577
+ * @param definitionIdFilter - A comma-delimited list of release definitions to retrieve.
578
+ * @param isDeleted - 'true' to get release definitions that has been deleted. Default is 'false'
579
+ * @param searchTextContainsFolderName - 'true' to get the release definitions under the folder with name as specified in searchText. Default is 'false'.
580
+ */
581
+ public async getReleaseDefinitions(
582
+ project: string,
583
+ searchText?: string,
584
+ expand?: Release.ReleaseDefinitionExpands,
585
+ artifactType?: string,
586
+ artifactSourceId?: string,
587
+ top?: number,
588
+ continuationToken?: string,
589
+ queryOrder?: Release.ReleaseDefinitionQueryOrder,
590
+ path?: string,
591
+ isExactNameMatch?: boolean,
592
+ tagFilter?: string[],
593
+ propertyFilters?: string[],
594
+ definitionIdFilter?: string[],
595
+ isDeleted?: boolean,
596
+ searchTextContainsFolderName?: boolean
597
+ ): Promise<WebApi.PagedList<Release.ReleaseDefinition>> {
598
+
599
+ const queryValues: any = {
600
+ searchText: searchText,
601
+ '$expand': expand,
602
+ artifactType: artifactType,
603
+ artifactSourceId: artifactSourceId,
604
+ '$top': top,
605
+ continuationToken: continuationToken,
606
+ queryOrder: queryOrder,
607
+ path: path,
608
+ isExactNameMatch: isExactNameMatch,
609
+ tagFilter: tagFilter && tagFilter.join(","),
610
+ propertyFilters: propertyFilters && propertyFilters.join(","),
611
+ definitionIdFilter: definitionIdFilter && definitionIdFilter.join(","),
612
+ isDeleted: isDeleted,
613
+ searchTextContainsFolderName: searchTextContainsFolderName
614
+ };
615
+
616
+ return this.beginRequest<Response>({
617
+ apiVersion: "7.2-preview.4",
618
+ routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
619
+ routeValues: {
620
+ project: project
621
+ },
622
+ queryParams: queryValues,
623
+ returnRawResponse: true
624
+ }).then(async response => {
625
+ const body = <WebApi.PagedList<Release.ReleaseDefinition>>await response.text().then(deserializeVssJsonObject);
626
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
627
+ return body;
628
+ });
629
+ }
630
+
631
+ /**
632
+ * Undelete a release definition.
633
+ *
634
+ * @param releaseDefinitionUndeleteParameter - Object for undelete release definition.
635
+ * @param project - Project ID or project name
636
+ * @param definitionId - Id of the release definition to be undeleted
637
+ */
638
+ public async undeleteReleaseDefinition(
639
+ releaseDefinitionUndeleteParameter: Release.ReleaseDefinitionUndeleteParameter,
640
+ project: string,
641
+ definitionId: number
642
+ ): Promise<Release.ReleaseDefinition> {
643
+
644
+ return this.beginRequest<Release.ReleaseDefinition>({
645
+ apiVersion: "7.2-preview.4",
646
+ method: "PATCH",
647
+ routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
648
+ routeValues: {
649
+ project: project,
650
+ definitionId: definitionId
651
+ },
652
+ body: releaseDefinitionUndeleteParameter
653
+ });
654
+ }
655
+
656
+ /**
657
+ * Update a release definition.
658
+ *
659
+ * @param releaseDefinition - Release definition object to update.
660
+ * @param project - Project ID or project name
661
+ */
662
+ public async updateReleaseDefinition(
663
+ releaseDefinition: Release.ReleaseDefinition,
664
+ project: string
665
+ ): Promise<Release.ReleaseDefinition> {
666
+
667
+ return this.beginRequest<Release.ReleaseDefinition>({
668
+ apiVersion: "7.2-preview.4",
669
+ method: "PUT",
670
+ routeTemplate: "{project}/_apis/Release/definitions/{definitionId}",
671
+ routeValues: {
672
+ project: project
673
+ },
674
+ body: releaseDefinition
675
+ });
676
+ }
677
+
678
+ /**
679
+ * Get a list of deployments
680
+ *
681
+ * @param project - Project ID or project name
682
+ * @param definitionId - List the deployments for a given definition id.
683
+ * @param definitionEnvironmentId - List the deployments for a given definition environment id.
684
+ * @param createdBy - List the deployments for which deployments are created as identity specified.
685
+ * @param minModifiedTime - List the deployments with LastModified time \>= minModifiedTime.
686
+ * @param maxModifiedTime - List the deployments with LastModified time \<= maxModifiedTime.
687
+ * @param deploymentStatus - List the deployments with given deployment status. Default is 'All'.
688
+ * @param operationStatus - List the deployments with given operation status. Default is 'All'.
689
+ * @param latestAttemptsOnly - 'true' to include deployments with latest attempt only. Default is 'false'.
690
+ * @param queryOrder - List the deployments with given query order. Default is 'Descending'.
691
+ * @param top - List the deployments with given top. Default top is '50' and Max top is '100'.
692
+ * @param continuationToken - List the deployments with deployment id \>= continuationToken.
693
+ * @param createdFor - List the deployments for which deployments are requested as identity specified.
694
+ * @param minStartedTime - List the deployments with StartedOn time \>= minStartedTime.
695
+ * @param maxStartedTime - List the deployments with StartedOn time \<= maxStartedTime.
696
+ * @param sourceBranch - List the deployments that are deployed from given branch name.
697
+ */
698
+ public async getDeployments(
699
+ project: string,
700
+ definitionId?: number,
701
+ definitionEnvironmentId?: number,
702
+ createdBy?: string,
703
+ minModifiedTime?: Date,
704
+ maxModifiedTime?: Date,
705
+ deploymentStatus?: Release.DeploymentStatus,
706
+ operationStatus?: Release.DeploymentOperationStatus,
707
+ latestAttemptsOnly?: boolean,
708
+ queryOrder?: Release.ReleaseQueryOrder,
709
+ top?: number,
710
+ continuationToken?: number,
711
+ createdFor?: string,
712
+ minStartedTime?: Date,
713
+ maxStartedTime?: Date,
714
+ sourceBranch?: string
715
+ ): Promise<WebApi.PagedList<Release.Deployment>> {
716
+
717
+ const queryValues: any = {
718
+ definitionId: definitionId,
719
+ definitionEnvironmentId: definitionEnvironmentId,
720
+ createdBy: createdBy,
721
+ minModifiedTime: minModifiedTime,
722
+ maxModifiedTime: maxModifiedTime,
723
+ deploymentStatus: deploymentStatus,
724
+ operationStatus: operationStatus,
725
+ latestAttemptsOnly: latestAttemptsOnly,
726
+ queryOrder: queryOrder,
727
+ '$top': top,
728
+ continuationToken: continuationToken,
729
+ createdFor: createdFor,
730
+ minStartedTime: minStartedTime,
731
+ maxStartedTime: maxStartedTime,
732
+ sourceBranch: sourceBranch
733
+ };
734
+
735
+ return this.beginRequest<Response>({
736
+ apiVersion: "7.2-preview.2",
737
+ routeTemplate: "{project}/_apis/Release/deployments",
738
+ routeValues: {
739
+ project: project
740
+ },
741
+ queryParams: queryValues,
742
+ returnRawResponse: true
743
+ }).then(async response => {
744
+ const body = <WebApi.PagedList<Release.Deployment>>await response.text().then(deserializeVssJsonObject);
745
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
746
+ return body;
747
+ });
748
+ }
749
+
750
+ /**
751
+ * @param queryParameters -
752
+ * @param project - Project ID or project name
753
+ */
754
+ public async getDeploymentsForMultipleEnvironments(
755
+ queryParameters: Release.DeploymentQueryParameters,
756
+ project: string
757
+ ): Promise<Release.Deployment[]> {
758
+
759
+ return this.beginRequest<Release.Deployment[]>({
760
+ apiVersion: "7.2-preview.2",
761
+ method: "POST",
762
+ routeTemplate: "{project}/_apis/Release/deployments",
763
+ routeValues: {
764
+ project: project
765
+ },
766
+ body: queryParameters
767
+ });
768
+ }
769
+
770
+ /**
771
+ * Get a release environment.
772
+ *
773
+ * @param project - Project ID or project name
774
+ * @param releaseId - Id of the release.
775
+ * @param environmentId - Id of the release environment.
776
+ * @param expand - A property that should be expanded in the environment.
777
+ */
778
+ public async getReleaseEnvironment(
779
+ project: string,
780
+ releaseId: number,
781
+ environmentId: number,
782
+ expand?: Release.ReleaseEnvironmentExpands
783
+ ): Promise<Release.ReleaseEnvironment> {
784
+
785
+ const queryValues: any = {
786
+ '$expand': expand
787
+ };
788
+
789
+ return this.beginRequest<Release.ReleaseEnvironment>({
790
+ apiVersion: "7.2-preview.8",
791
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",
792
+ routeValues: {
793
+ project: project,
794
+ releaseId: releaseId,
795
+ environmentId: environmentId
796
+ },
797
+ queryParams: queryValues
798
+ });
799
+ }
800
+
801
+ /**
802
+ * Update the status of a release environment
803
+ *
804
+ * @param environmentUpdateData - Environment update meta data.
805
+ * @param project - Project ID or project name
806
+ * @param releaseId - Id of the release.
807
+ * @param environmentId - Id of release environment.
808
+ */
809
+ public async updateReleaseEnvironment(
810
+ environmentUpdateData: Release.ReleaseEnvironmentUpdateMetadata,
811
+ project: string,
812
+ releaseId: number,
813
+ environmentId: number
814
+ ): Promise<Release.ReleaseEnvironment> {
815
+
816
+ return this.beginRequest<Release.ReleaseEnvironment>({
817
+ apiVersion: "7.2-preview.8",
818
+ method: "PATCH",
819
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}",
820
+ routeValues: {
821
+ project: project,
822
+ releaseId: releaseId,
823
+ environmentId: environmentId
824
+ },
825
+ body: environmentUpdateData
826
+ });
827
+ }
828
+
829
+ /**
830
+ * Creates a definition environment template
831
+ *
832
+ * @param template - Definition environment template to create
833
+ * @param project - Project ID or project name
834
+ */
835
+ public async createDefinitionEnvironmentTemplate(
836
+ template: Release.ReleaseDefinitionEnvironmentTemplate,
837
+ project: string
838
+ ): Promise<Release.ReleaseDefinitionEnvironmentTemplate> {
839
+
840
+ return this.beginRequest<Release.ReleaseDefinitionEnvironmentTemplate>({
841
+ apiVersion: "7.2-preview.4",
842
+ method: "POST",
843
+ routeTemplate: "{project}/_apis/Release/definitions/environmenttemplates",
844
+ routeValues: {
845
+ project: project
846
+ },
847
+ body: template
848
+ });
849
+ }
850
+
851
+ /**
852
+ * Delete a definition environment template
853
+ *
854
+ * @param project - Project ID or project name
855
+ * @param templateId - Id of the definition environment template
856
+ */
857
+ public async deleteDefinitionEnvironmentTemplate(
858
+ project: string,
859
+ templateId: string
860
+ ): Promise<void> {
861
+
862
+ const queryValues: any = {
863
+ templateId: templateId
864
+ };
865
+
866
+ return this.beginRequest<void>({
867
+ apiVersion: "7.2-preview.4",
868
+ method: "DELETE",
869
+ routeTemplate: "{project}/_apis/Release/definitions/environmenttemplates",
870
+ routeValues: {
871
+ project: project
872
+ },
873
+ queryParams: queryValues
874
+ });
875
+ }
876
+
877
+ /**
878
+ * Gets a definition environment template
879
+ *
880
+ * @param project - Project ID or project name
881
+ * @param templateId - Id of the definition environment template
882
+ */
883
+ public async getDefinitionEnvironmentTemplate(
884
+ project: string,
885
+ templateId: string
886
+ ): Promise<Release.ReleaseDefinitionEnvironmentTemplate> {
887
+
888
+ const queryValues: any = {
889
+ templateId: templateId
890
+ };
891
+
892
+ return this.beginRequest<Release.ReleaseDefinitionEnvironmentTemplate>({
893
+ apiVersion: "7.2-preview.4",
894
+ routeTemplate: "{project}/_apis/Release/definitions/environmenttemplates",
895
+ routeValues: {
896
+ project: project
897
+ },
898
+ queryParams: queryValues
899
+ });
900
+ }
901
+
902
+ /**
903
+ * Gets a list of definition environment templates
904
+ *
905
+ * @param project - Project ID or project name
906
+ * @param isDeleted - 'true' to get definition environment templates that have been deleted. Default is 'false'
907
+ */
908
+ public async listDefinitionEnvironmentTemplates(
909
+ project: string,
910
+ isDeleted?: boolean
911
+ ): Promise<Release.ReleaseDefinitionEnvironmentTemplate[]> {
912
+
913
+ const queryValues: any = {
914
+ isDeleted: isDeleted
915
+ };
916
+
917
+ return this.beginRequest<Release.ReleaseDefinitionEnvironmentTemplate[]>({
918
+ apiVersion: "7.2-preview.4",
919
+ routeTemplate: "{project}/_apis/Release/definitions/environmenttemplates",
920
+ routeValues: {
921
+ project: project
922
+ },
923
+ queryParams: queryValues
924
+ });
925
+ }
926
+
927
+ /**
928
+ * Undelete a release definition environment template.
929
+ *
930
+ * @param project - Project ID or project name
931
+ * @param templateId - Id of the definition environment template to be undeleted
932
+ */
933
+ public async undeleteReleaseDefinitionEnvironmentTemplate(
934
+ project: string,
935
+ templateId: string
936
+ ): Promise<Release.ReleaseDefinitionEnvironmentTemplate> {
937
+
938
+ const queryValues: any = {
939
+ templateId: templateId
940
+ };
941
+
942
+ return this.beginRequest<Release.ReleaseDefinitionEnvironmentTemplate>({
943
+ apiVersion: "7.2-preview.4",
944
+ method: "PATCH",
945
+ routeTemplate: "{project}/_apis/Release/definitions/environmenttemplates",
946
+ routeValues: {
947
+ project: project
948
+ },
949
+ queryParams: queryValues
950
+ });
951
+ }
952
+
953
+ /**
954
+ * @param favoriteItems -
955
+ * @param project - Project ID or project name
956
+ * @param scope -
957
+ * @param identityId -
958
+ */
959
+ public async createFavorites(
960
+ favoriteItems: Release.FavoriteItem[],
961
+ project: string,
962
+ scope: string,
963
+ identityId?: string
964
+ ): Promise<Release.FavoriteItem[]> {
965
+
966
+ const queryValues: any = {
967
+ identityId: identityId
968
+ };
969
+
970
+ return this.beginRequest<Release.FavoriteItem[]>({
971
+ apiVersion: "7.2-preview.1",
972
+ method: "POST",
973
+ routeTemplate: "{project}/_apis/Release/favorites/{scope}",
974
+ routeValues: {
975
+ project: project,
976
+ scope: scope
977
+ },
978
+ queryParams: queryValues,
979
+ body: favoriteItems
980
+ });
981
+ }
982
+
983
+ /**
984
+ * @param project - Project ID or project name
985
+ * @param scope -
986
+ * @param identityId -
987
+ * @param favoriteItemIds -
988
+ */
989
+ public async deleteFavorites(
990
+ project: string,
991
+ scope: string,
992
+ identityId?: string,
993
+ favoriteItemIds?: string
994
+ ): Promise<void> {
995
+
996
+ const queryValues: any = {
997
+ identityId: identityId,
998
+ favoriteItemIds: favoriteItemIds
999
+ };
1000
+
1001
+ return this.beginRequest<void>({
1002
+ apiVersion: "7.2-preview.1",
1003
+ method: "DELETE",
1004
+ routeTemplate: "{project}/_apis/Release/favorites/{scope}",
1005
+ routeValues: {
1006
+ project: project,
1007
+ scope: scope
1008
+ },
1009
+ queryParams: queryValues
1010
+ });
1011
+ }
1012
+
1013
+ /**
1014
+ * @param project - Project ID or project name
1015
+ * @param scope -
1016
+ * @param identityId -
1017
+ */
1018
+ public async getFavorites(
1019
+ project: string,
1020
+ scope: string,
1021
+ identityId?: string
1022
+ ): Promise<Release.FavoriteItem[]> {
1023
+
1024
+ const queryValues: any = {
1025
+ identityId: identityId
1026
+ };
1027
+
1028
+ return this.beginRequest<Release.FavoriteItem[]>({
1029
+ apiVersion: "7.2-preview.1",
1030
+ routeTemplate: "{project}/_apis/Release/favorites/{scope}",
1031
+ routeValues: {
1032
+ project: project,
1033
+ scope: scope
1034
+ },
1035
+ queryParams: queryValues
1036
+ });
1037
+ }
1038
+
1039
+ /**
1040
+ * @param flightName -
1041
+ */
1042
+ public async getFlightAssignments(
1043
+ flightName?: string
1044
+ ): Promise<string[]> {
1045
+
1046
+ const queryValues: any = {
1047
+ flightName: flightName
1048
+ };
1049
+
1050
+ return this.beginRequest<string[]>({
1051
+ apiVersion: "7.2-preview.1",
1052
+ routeTemplate: "_apis/Release/flightAssignments",
1053
+ queryParams: queryValues
1054
+ });
1055
+ }
1056
+
1057
+ /**
1058
+ * Creates a new folder.
1059
+ *
1060
+ * @param folder - folder.
1061
+ * @param project - Project ID or project name
1062
+ * @param path - Path of the folder.
1063
+ */
1064
+ public async createFolder(
1065
+ folder: Release.Folder,
1066
+ project: string,
1067
+ path?: string
1068
+ ): Promise<Release.Folder> {
1069
+
1070
+ return this.beginRequest<Release.Folder>({
1071
+ apiVersion: "7.2-preview.2",
1072
+ method: "POST",
1073
+ routeTemplate: "{project}/_apis/Release/folders/{*path}",
1074
+ routeValues: {
1075
+ project: project,
1076
+ path: path
1077
+ },
1078
+ body: folder
1079
+ });
1080
+ }
1081
+
1082
+ /**
1083
+ * Deletes a definition folder for given folder name and path and all it's existing definitions.
1084
+ *
1085
+ * @param project - Project ID or project name
1086
+ * @param path - Path of the folder to delete.
1087
+ */
1088
+ public async deleteFolder(
1089
+ project: string,
1090
+ path: string
1091
+ ): Promise<void> {
1092
+
1093
+ return this.beginRequest<void>({
1094
+ apiVersion: "7.2-preview.2",
1095
+ method: "DELETE",
1096
+ routeTemplate: "{project}/_apis/Release/folders/{*path}",
1097
+ routeValues: {
1098
+ project: project,
1099
+ path: path
1100
+ }
1101
+ });
1102
+ }
1103
+
1104
+ /**
1105
+ * Gets folders.
1106
+ *
1107
+ * @param project - Project ID or project name
1108
+ * @param path - Path of the folder.
1109
+ * @param queryOrder - Gets the results in the defined order. Default is 'None'.
1110
+ */
1111
+ public async getFolders(
1112
+ project: string,
1113
+ path?: string,
1114
+ queryOrder?: Release.FolderPathQueryOrder
1115
+ ): Promise<Release.Folder[]> {
1116
+
1117
+ const queryValues: any = {
1118
+ queryOrder: queryOrder
1119
+ };
1120
+
1121
+ return this.beginRequest<Release.Folder[]>({
1122
+ apiVersion: "7.2-preview.2",
1123
+ routeTemplate: "{project}/_apis/Release/folders/{*path}",
1124
+ routeValues: {
1125
+ project: project,
1126
+ path: path
1127
+ },
1128
+ queryParams: queryValues
1129
+ });
1130
+ }
1131
+
1132
+ /**
1133
+ * Updates an existing folder at given existing path.
1134
+ *
1135
+ * @param folder - folder.
1136
+ * @param project - Project ID or project name
1137
+ * @param path - Path of the folder to update.
1138
+ */
1139
+ public async updateFolder(
1140
+ folder: Release.Folder,
1141
+ project: string,
1142
+ path: string
1143
+ ): Promise<Release.Folder> {
1144
+
1145
+ return this.beginRequest<Release.Folder>({
1146
+ apiVersion: "7.2-preview.2",
1147
+ method: "PATCH",
1148
+ routeTemplate: "{project}/_apis/Release/folders/{*path}",
1149
+ routeValues: {
1150
+ project: project,
1151
+ path: path
1152
+ },
1153
+ body: folder
1154
+ });
1155
+ }
1156
+
1157
+ /**
1158
+ * Updates the gate for a deployment.
1159
+ *
1160
+ * @param gateUpdateMetadata - Metadata to patch the Release Gates.
1161
+ * @param project - Project ID or project name
1162
+ * @param gateStepId - Gate step Id.
1163
+ */
1164
+ public async updateGates(
1165
+ gateUpdateMetadata: Release.GateUpdateMetadata,
1166
+ project: string,
1167
+ gateStepId: number
1168
+ ): Promise<Release.ReleaseGates> {
1169
+
1170
+ return this.beginRequest<Release.ReleaseGates>({
1171
+ apiVersion: "7.2-preview.1",
1172
+ method: "PATCH",
1173
+ routeTemplate: "{project}/_apis/Release/gates/{gateStepId}",
1174
+ routeValues: {
1175
+ project: project,
1176
+ gateStepId: gateStepId
1177
+ },
1178
+ body: gateUpdateMetadata
1179
+ });
1180
+ }
1181
+
1182
+ /**
1183
+ * @param project - Project ID or project name
1184
+ * @param releaseId -
1185
+ */
1186
+ public async getReleaseHistory(
1187
+ project: string,
1188
+ releaseId: number
1189
+ ): Promise<Release.ReleaseRevision[]> {
1190
+
1191
+ return this.beginRequest<Release.ReleaseRevision[]>({
1192
+ apiVersion: "7.2-preview.1",
1193
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/history",
1194
+ routeValues: {
1195
+ project: project,
1196
+ releaseId: releaseId
1197
+ }
1198
+ });
1199
+ }
1200
+
1201
+ /**
1202
+ * @param query -
1203
+ * @param project - Project ID or project name
1204
+ */
1205
+ public async getInputValues(
1206
+ query: FormInput.InputValuesQuery,
1207
+ project: string
1208
+ ): Promise<FormInput.InputValuesQuery> {
1209
+
1210
+ return this.beginRequest<FormInput.InputValuesQuery>({
1211
+ apiVersion: "7.2-preview.1",
1212
+ method: "POST",
1213
+ routeTemplate: "{project}/_apis/Release/artifacts/inputvaluesquery",
1214
+ routeValues: {
1215
+ project: project
1216
+ },
1217
+ body: query
1218
+ });
1219
+ }
1220
+
1221
+ /**
1222
+ * @param project - Project ID or project name
1223
+ * @param buildId -
1224
+ * @param sourceId -
1225
+ */
1226
+ public async getIssues(
1227
+ project: string,
1228
+ buildId: number,
1229
+ sourceId?: string
1230
+ ): Promise<Release.AutoTriggerIssue[]> {
1231
+
1232
+ const queryValues: any = {
1233
+ sourceId: sourceId
1234
+ };
1235
+
1236
+ return this.beginRequest<Release.AutoTriggerIssue[]>({
1237
+ apiVersion: "7.2-preview.1",
1238
+ routeTemplate: "{project}/_apis/Release/issues/{buildId}",
1239
+ routeValues: {
1240
+ project: project,
1241
+ buildId: buildId
1242
+ },
1243
+ queryParams: queryValues
1244
+ });
1245
+ }
1246
+
1247
+ /**
1248
+ * Gets gate logs
1249
+ *
1250
+ * @param project - Project ID or project name
1251
+ * @param releaseId - Id of the release.
1252
+ * @param environmentId - Id of release environment.
1253
+ * @param gateId - Id of the gate.
1254
+ * @param taskId - ReleaseTask Id for the log.
1255
+ */
1256
+ public async getGateLog(
1257
+ project: string,
1258
+ releaseId: number,
1259
+ environmentId: number,
1260
+ gateId: number,
1261
+ taskId: number
1262
+ ): Promise<string> {
1263
+
1264
+ return this.beginRequest<string>({
1265
+ apiVersion: "7.2-preview.2",
1266
+ httpResponseType: "text/plain",
1267
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/gates/{gateId}/tasks/{taskId}/logs",
1268
+ routeValues: {
1269
+ project: project,
1270
+ releaseId: releaseId,
1271
+ environmentId: environmentId,
1272
+ gateId: gateId,
1273
+ taskId: taskId
1274
+ }
1275
+ });
1276
+ }
1277
+
1278
+ /**
1279
+ * Get logs for a release Id.
1280
+ *
1281
+ * @param project - Project ID or project name
1282
+ * @param releaseId - Id of the release.
1283
+ */
1284
+ public async getLogs(
1285
+ project: string,
1286
+ releaseId: number
1287
+ ): Promise<ArrayBuffer> {
1288
+
1289
+ return this.beginRequest<ArrayBuffer>({
1290
+ apiVersion: "7.2-preview.2",
1291
+ httpResponseType: "application/zip",
1292
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/logs",
1293
+ routeValues: {
1294
+ project: project,
1295
+ releaseId: releaseId
1296
+ }
1297
+ });
1298
+ }
1299
+
1300
+ /**
1301
+ * Gets logs
1302
+ *
1303
+ * @param project - Project ID or project name
1304
+ * @param releaseId - Id of the release.
1305
+ * @param environmentId - Id of release environment.
1306
+ * @param taskId - ReleaseTask Id for the log.
1307
+ * @param attemptId - Id of the attempt.
1308
+ */
1309
+ public async getLog(
1310
+ project: string,
1311
+ releaseId: number,
1312
+ environmentId: number,
1313
+ taskId: number,
1314
+ attemptId?: number
1315
+ ): Promise<string> {
1316
+
1317
+ const queryValues: any = {
1318
+ attemptId: attemptId
1319
+ };
1320
+
1321
+ return this.beginRequest<string>({
1322
+ apiVersion: "7.2-preview.2",
1323
+ httpResponseType: "text/plain",
1324
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks/{taskId}/logs",
1325
+ routeValues: {
1326
+ project: project,
1327
+ releaseId: releaseId,
1328
+ environmentId: environmentId,
1329
+ taskId: taskId
1330
+ },
1331
+ queryParams: queryValues
1332
+ });
1333
+ }
1334
+
1335
+ /**
1336
+ * Gets the task log of a release as a plain text file.
1337
+ *
1338
+ * @param project - Project ID or project name
1339
+ * @param releaseId - Id of the release.
1340
+ * @param environmentId - Id of release environment.
1341
+ * @param attemptId -
1342
+ * @param timelineId -
1343
+ * @param taskId - ReleaseTask Id for the log.
1344
+ * @param startLine - Starting line number for logs
1345
+ * @param endLine - Ending line number for logs
1346
+ */
1347
+ public async getTaskLog2(
1348
+ project: string,
1349
+ releaseId: number,
1350
+ environmentId: number,
1351
+ attemptId: number,
1352
+ timelineId: string,
1353
+ taskId: number,
1354
+ startLine?: number,
1355
+ endLine?: number
1356
+ ): Promise<string> {
1357
+
1358
+ const queryValues: any = {
1359
+ startLine: startLine,
1360
+ endLine: endLine
1361
+ };
1362
+
1363
+ return this.beginRequest<string>({
1364
+ apiVersion: "7.2-preview.2",
1365
+ httpResponseType: "text/plain",
1366
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks/{taskId}/logs",
1367
+ routeValues: {
1368
+ project: project,
1369
+ releaseId: releaseId,
1370
+ environmentId: environmentId,
1371
+ attemptId: attemptId,
1372
+ timelineId: timelineId,
1373
+ taskId: taskId
1374
+ },
1375
+ queryParams: queryValues
1376
+ });
1377
+ }
1378
+
1379
+ /**
1380
+ * Gets the task log of a release as a plain text file.
1381
+ *
1382
+ * @param project - Project ID or project name
1383
+ * @param releaseId - Id of the release.
1384
+ * @param environmentId - Id of release environment.
1385
+ * @param releaseDeployPhaseId - Release deploy phase Id.
1386
+ * @param taskId - ReleaseTask Id for the log.
1387
+ * @param startLine - Starting line number for logs
1388
+ * @param endLine - Ending line number for logs
1389
+ */
1390
+ public async getTaskLog(
1391
+ project: string,
1392
+ releaseId: number,
1393
+ environmentId: number,
1394
+ releaseDeployPhaseId: number,
1395
+ taskId: number,
1396
+ startLine?: number,
1397
+ endLine?: number
1398
+ ): Promise<string> {
1399
+
1400
+ const queryValues: any = {
1401
+ startLine: startLine,
1402
+ endLine: endLine
1403
+ };
1404
+
1405
+ return this.beginRequest<string>({
1406
+ apiVersion: "7.2-preview.2",
1407
+ httpResponseType: "text/plain",
1408
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks/{taskId}/logs",
1409
+ routeValues: {
1410
+ project: project,
1411
+ releaseId: releaseId,
1412
+ environmentId: environmentId,
1413
+ releaseDeployPhaseId: releaseDeployPhaseId,
1414
+ taskId: taskId
1415
+ },
1416
+ queryParams: queryValues
1417
+ });
1418
+ }
1419
+
1420
+ /**
1421
+ * Get manual intervention for a given release and manual intervention id.
1422
+ *
1423
+ * @param project - Project ID or project name
1424
+ * @param releaseId - Id of the release.
1425
+ * @param manualInterventionId - Id of the manual intervention.
1426
+ */
1427
+ public async getManualIntervention(
1428
+ project: string,
1429
+ releaseId: number,
1430
+ manualInterventionId: number
1431
+ ): Promise<Release.ManualIntervention> {
1432
+
1433
+ return this.beginRequest<Release.ManualIntervention>({
1434
+ apiVersion: "7.2-preview.2",
1435
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",
1436
+ routeValues: {
1437
+ project: project,
1438
+ releaseId: releaseId,
1439
+ manualInterventionId: manualInterventionId
1440
+ }
1441
+ });
1442
+ }
1443
+
1444
+ /**
1445
+ * List all manual interventions for a given release.
1446
+ *
1447
+ * @param project - Project ID or project name
1448
+ * @param releaseId - Id of the release.
1449
+ */
1450
+ public async getManualInterventions(
1451
+ project: string,
1452
+ releaseId: number
1453
+ ): Promise<Release.ManualIntervention[]> {
1454
+
1455
+ return this.beginRequest<Release.ManualIntervention[]>({
1456
+ apiVersion: "7.2-preview.2",
1457
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",
1458
+ routeValues: {
1459
+ project: project,
1460
+ releaseId: releaseId
1461
+ }
1462
+ });
1463
+ }
1464
+
1465
+ /**
1466
+ * Update manual intervention.
1467
+ *
1468
+ * @param manualInterventionUpdateMetadata - Meta data to update manual intervention.
1469
+ * @param project - Project ID or project name
1470
+ * @param releaseId - Id of the release.
1471
+ * @param manualInterventionId - Id of the manual intervention.
1472
+ */
1473
+ public async updateManualIntervention(
1474
+ manualInterventionUpdateMetadata: Release.ManualInterventionUpdateMetadata,
1475
+ project: string,
1476
+ releaseId: number,
1477
+ manualInterventionId: number
1478
+ ): Promise<Release.ManualIntervention> {
1479
+
1480
+ return this.beginRequest<Release.ManualIntervention>({
1481
+ apiVersion: "7.2-preview.2",
1482
+ method: "PATCH",
1483
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/manualInterventions/{manualInterventionId}",
1484
+ routeValues: {
1485
+ project: project,
1486
+ releaseId: releaseId,
1487
+ manualInterventionId: manualInterventionId
1488
+ },
1489
+ body: manualInterventionUpdateMetadata
1490
+ });
1491
+ }
1492
+
1493
+ /**
1494
+ * @param project - Project ID or project name
1495
+ * @param minMetricsTime -
1496
+ */
1497
+ public async getMetrics(
1498
+ project: string,
1499
+ minMetricsTime?: Date
1500
+ ): Promise<Release.Metric[]> {
1501
+
1502
+ const queryValues: any = {
1503
+ minMetricsTime: minMetricsTime
1504
+ };
1505
+
1506
+ return this.beginRequest<Release.Metric[]>({
1507
+ apiVersion: "7.2-preview.1",
1508
+ routeTemplate: "{project}/_apis/Release/metrics",
1509
+ routeValues: {
1510
+ project: project
1511
+ },
1512
+ queryParams: queryValues
1513
+ });
1514
+ }
1515
+
1516
+ /**
1517
+ * Gets Org pipeline release settings
1518
+ *
1519
+ */
1520
+ public async getOrgPipelineReleaseSettings(
1521
+ ): Promise<Release.OrgPipelineReleaseSettings> {
1522
+
1523
+ return this.beginRequest<Release.OrgPipelineReleaseSettings>({
1524
+ apiVersion: "7.2-preview.1",
1525
+ routeTemplate: "_apis/Release/orgPipelineReleaseSettings"
1526
+ });
1527
+ }
1528
+
1529
+ /**
1530
+ * Updates Org pipeline release settings
1531
+ *
1532
+ * @param newSettings -
1533
+ */
1534
+ public async updateOrgPipelineReleaseSettings(
1535
+ newSettings: Release.OrgPipelineReleaseSettingsUpdateParameters
1536
+ ): Promise<Release.OrgPipelineReleaseSettings> {
1537
+
1538
+ return this.beginRequest<Release.OrgPipelineReleaseSettings>({
1539
+ apiVersion: "7.2-preview.1",
1540
+ method: "PATCH",
1541
+ routeTemplate: "_apis/Release/orgPipelineReleaseSettings",
1542
+ body: newSettings
1543
+ });
1544
+ }
1545
+
1546
+ /**
1547
+ * Gets pipeline release settings
1548
+ *
1549
+ * @param project - Project ID or project name
1550
+ */
1551
+ public async getPipelineReleaseSettings(
1552
+ project: string
1553
+ ): Promise<Release.ProjectPipelineReleaseSettings> {
1554
+
1555
+ return this.beginRequest<Release.ProjectPipelineReleaseSettings>({
1556
+ apiVersion: "7.2-preview.1",
1557
+ routeTemplate: "{project}/_apis/Release/pipelineReleaseSettings",
1558
+ routeValues: {
1559
+ project: project
1560
+ }
1561
+ });
1562
+ }
1563
+
1564
+ /**
1565
+ * Updates pipeline release settings
1566
+ *
1567
+ * @param newSettings -
1568
+ * @param project - Project ID or project name
1569
+ */
1570
+ public async updatePipelineReleaseSettings(
1571
+ newSettings: Release.ProjectPipelineReleaseSettingsUpdateParameters,
1572
+ project: string
1573
+ ): Promise<Release.ProjectPipelineReleaseSettings> {
1574
+
1575
+ return this.beginRequest<Release.ProjectPipelineReleaseSettings>({
1576
+ apiVersion: "7.2-preview.1",
1577
+ method: "PATCH",
1578
+ routeTemplate: "{project}/_apis/Release/pipelineReleaseSettings",
1579
+ routeValues: {
1580
+ project: project
1581
+ },
1582
+ body: newSettings
1583
+ });
1584
+ }
1585
+
1586
+ /**
1587
+ * @param artifactType -
1588
+ * @param artifactSourceId -
1589
+ */
1590
+ public async getReleaseProjects(
1591
+ artifactType: string,
1592
+ artifactSourceId: string
1593
+ ): Promise<Release.ProjectReference[]> {
1594
+
1595
+ const queryValues: any = {
1596
+ artifactType: artifactType,
1597
+ artifactSourceId: artifactSourceId
1598
+ };
1599
+
1600
+ return this.beginRequest<Release.ProjectReference[]>({
1601
+ apiVersion: "7.2-preview.1",
1602
+ routeTemplate: "_apis/Release/projects",
1603
+ queryParams: queryValues
1604
+ });
1605
+ }
1606
+
1607
+ /**
1608
+ * Get a list of releases
1609
+ *
1610
+ * @param project - Project ID or project name
1611
+ * @param definitionId - Releases from this release definition Id.
1612
+ * @param definitionEnvironmentId -
1613
+ * @param searchText - Releases with names containing searchText.
1614
+ * @param createdBy - Releases created by this user.
1615
+ * @param statusFilter - Releases that have this status.
1616
+ * @param environmentStatusFilter -
1617
+ * @param minCreatedTime - Releases that were created after this time.
1618
+ * @param maxCreatedTime - Releases that were created before this time.
1619
+ * @param queryOrder - Gets the results in the defined order of created date for releases. Default is descending.
1620
+ * @param top - Number of releases to get. Default is 50.
1621
+ * @param continuationToken - Gets the releases after the continuation token provided.
1622
+ * @param expand - The property that should be expanded in the list of releases.
1623
+ * @param artifactTypeId - Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild.
1624
+ * @param sourceId - Unique identifier of the artifact used. e.g. For build it would be \{projectGuid\}:\{BuildDefinitionId\}, for Jenkins it would be \{JenkinsConnectionId\}:\{JenkinsDefinitionId\}, for TfsOnPrem it would be \{TfsOnPremConnectionId\}:\{ProjectName\}:\{TfsOnPremDefinitionId\}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions.
1625
+ * @param artifactVersionId - Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId.
1626
+ * @param sourceBranchFilter - Releases with given sourceBranchFilter will be returned (Not to be used with environmentStatusFilter).
1627
+ * @param isDeleted - Gets the soft deleted releases, if true.
1628
+ * @param tagFilter - A comma-delimited list of tags. Only releases with these tags will be returned.
1629
+ * @param propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not.
1630
+ * @param releaseIdFilter - A comma-delimited list of releases Ids. Only releases with these Ids will be returned.
1631
+ * @param path - Releases under this folder path will be returned
1632
+ */
1633
+ public async getReleases(
1634
+ project?: string,
1635
+ definitionId?: number,
1636
+ definitionEnvironmentId?: number,
1637
+ searchText?: string,
1638
+ createdBy?: string,
1639
+ statusFilter?: Release.ReleaseStatus,
1640
+ environmentStatusFilter?: number,
1641
+ minCreatedTime?: Date,
1642
+ maxCreatedTime?: Date,
1643
+ queryOrder?: Release.ReleaseQueryOrder,
1644
+ top?: number,
1645
+ continuationToken?: number,
1646
+ expand?: Release.ReleaseExpands,
1647
+ artifactTypeId?: string,
1648
+ sourceId?: string,
1649
+ artifactVersionId?: string,
1650
+ sourceBranchFilter?: string,
1651
+ isDeleted?: boolean,
1652
+ tagFilter?: string[],
1653
+ propertyFilters?: string[],
1654
+ releaseIdFilter?: number[],
1655
+ path?: string
1656
+ ): Promise<Release.Release[]> {
1657
+
1658
+ const queryValues: any = {
1659
+ definitionId: definitionId,
1660
+ definitionEnvironmentId: definitionEnvironmentId,
1661
+ searchText: searchText,
1662
+ createdBy: createdBy,
1663
+ statusFilter: statusFilter,
1664
+ environmentStatusFilter: environmentStatusFilter,
1665
+ minCreatedTime: minCreatedTime,
1666
+ maxCreatedTime: maxCreatedTime,
1667
+ queryOrder: queryOrder,
1668
+ '$top': top,
1669
+ continuationToken: continuationToken,
1670
+ '$expand': expand,
1671
+ artifactTypeId: artifactTypeId,
1672
+ sourceId: sourceId,
1673
+ artifactVersionId: artifactVersionId,
1674
+ sourceBranchFilter: sourceBranchFilter,
1675
+ isDeleted: isDeleted,
1676
+ tagFilter: tagFilter && tagFilter.join(","),
1677
+ propertyFilters: propertyFilters && propertyFilters.join(","),
1678
+ releaseIdFilter: releaseIdFilter && releaseIdFilter.join(","),
1679
+ path: path
1680
+ };
1681
+
1682
+ return this.beginRequest<Release.Release[]>({
1683
+ apiVersion: "7.2-preview.9",
1684
+ routeTemplate: "{project}/_apis/Release/releases",
1685
+ routeValues: {
1686
+ project: project
1687
+ },
1688
+ queryParams: queryValues
1689
+ });
1690
+ }
1691
+
1692
+ /**
1693
+ * Create a release.
1694
+ *
1695
+ * @param releaseStartMetadata - Metadata to create a release.
1696
+ * @param project - Project ID or project name
1697
+ */
1698
+ public async createRelease(
1699
+ releaseStartMetadata: Release.ReleaseStartMetadata,
1700
+ project: string
1701
+ ): Promise<Release.Release> {
1702
+
1703
+ return this.beginRequest<Release.Release>({
1704
+ apiVersion: "7.2-preview.9",
1705
+ method: "POST",
1706
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
1707
+ routeValues: {
1708
+ project: project
1709
+ },
1710
+ body: releaseStartMetadata
1711
+ });
1712
+ }
1713
+
1714
+ /**
1715
+ * Soft delete a release
1716
+ *
1717
+ * @param project - Project ID or project name
1718
+ * @param releaseId - Id of the release.
1719
+ * @param comment - Comment for deleting a release.
1720
+ */
1721
+ public async deleteRelease(
1722
+ project: string,
1723
+ releaseId: number,
1724
+ comment?: string
1725
+ ): Promise<void> {
1726
+
1727
+ const queryValues: any = {
1728
+ comment: comment
1729
+ };
1730
+
1731
+ return this.beginRequest<void>({
1732
+ apiVersion: "7.2-preview.9",
1733
+ method: "DELETE",
1734
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
1735
+ routeValues: {
1736
+ project: project,
1737
+ releaseId: releaseId
1738
+ },
1739
+ queryParams: queryValues
1740
+ });
1741
+ }
1742
+
1743
+ /**
1744
+ * Get a Release
1745
+ *
1746
+ * @param project - Project ID or project name
1747
+ * @param releaseId - Id of the release.
1748
+ * @param approvalFilters - A filter which would allow fetching approval steps selectively based on whether it is automated, or manual. This would also decide whether we should fetch pre and post approval snapshots. Assumes All by default
1749
+ * @param propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release will contain values for the specified property Ids (if they exist). If not set, properties will not be included.
1750
+ * @param expand - A property that should be expanded in the release.
1751
+ * @param topGateRecords - Number of release gate records to get. Default is 5.
1752
+ */
1753
+ public async getRelease(
1754
+ project: string,
1755
+ releaseId: number,
1756
+ approvalFilters?: Release.ApprovalFilters,
1757
+ propertyFilters?: string[],
1758
+ expand?: Release.SingleReleaseExpands,
1759
+ topGateRecords?: number
1760
+ ): Promise<Release.Release> {
1761
+
1762
+ const queryValues: any = {
1763
+ approvalFilters: approvalFilters,
1764
+ propertyFilters: propertyFilters && propertyFilters.join(","),
1765
+ '$expand': expand,
1766
+ '$topGateRecords': topGateRecords
1767
+ };
1768
+
1769
+ return this.beginRequest<Release.Release>({
1770
+ apiVersion: "7.2-preview.9",
1771
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
1772
+ routeValues: {
1773
+ project: project,
1774
+ releaseId: releaseId
1775
+ },
1776
+ queryParams: queryValues
1777
+ });
1778
+ }
1779
+
1780
+ /**
1781
+ * Get release summary of a given definition Id.
1782
+ *
1783
+ * @param project - Project ID or project name
1784
+ * @param definitionId - Id of the definition to get release summary.
1785
+ * @param releaseCount - Count of releases to be included in summary.
1786
+ * @param includeArtifact - Include artifact details.Default is 'false'.
1787
+ * @param definitionEnvironmentIdsFilter -
1788
+ */
1789
+ public async getReleaseDefinitionSummary(
1790
+ project: string,
1791
+ definitionId: number,
1792
+ releaseCount: number,
1793
+ includeArtifact?: boolean,
1794
+ definitionEnvironmentIdsFilter?: number[]
1795
+ ): Promise<Release.ReleaseDefinitionSummary> {
1796
+
1797
+ const queryValues: any = {
1798
+ definitionId: definitionId,
1799
+ releaseCount: releaseCount,
1800
+ includeArtifact: includeArtifact,
1801
+ definitionEnvironmentIdsFilter: definitionEnvironmentIdsFilter && definitionEnvironmentIdsFilter.join(",")
1802
+ };
1803
+
1804
+ return this.beginRequest<Release.ReleaseDefinitionSummary>({
1805
+ apiVersion: "7.2-preview.9",
1806
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
1807
+ routeValues: {
1808
+ project: project
1809
+ },
1810
+ queryParams: queryValues
1811
+ });
1812
+ }
1813
+
1814
+ /**
1815
+ * Get release for a given revision number.
1816
+ *
1817
+ * @param project - Project ID or project name
1818
+ * @param releaseId - Id of the release.
1819
+ * @param definitionSnapshotRevision - Definition snapshot revision number.
1820
+ */
1821
+ public async getReleaseRevision(
1822
+ project: string,
1823
+ releaseId: number,
1824
+ definitionSnapshotRevision: number
1825
+ ): Promise<string> {
1826
+
1827
+ const queryValues: any = {
1828
+ definitionSnapshotRevision: definitionSnapshotRevision
1829
+ };
1830
+
1831
+ return this.beginRequest<string>({
1832
+ apiVersion: "7.2-preview.9",
1833
+ httpResponseType: "text/plain",
1834
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
1835
+ routeValues: {
1836
+ project: project,
1837
+ releaseId: releaseId
1838
+ },
1839
+ queryParams: queryValues
1840
+ });
1841
+ }
1842
+
1843
+ /**
1844
+ * Undelete a soft deleted release.
1845
+ *
1846
+ * @param project - Project ID or project name
1847
+ * @param releaseId - Id of release to be undeleted.
1848
+ * @param comment - Any comment for undeleting.
1849
+ */
1850
+ public async undeleteRelease(
1851
+ project: string,
1852
+ releaseId: number,
1853
+ comment: string
1854
+ ): Promise<void> {
1855
+
1856
+ const queryValues: any = {
1857
+ comment: comment
1858
+ };
1859
+
1860
+ return this.beginRequest<void>({
1861
+ apiVersion: "7.2-preview.9",
1862
+ method: "PUT",
1863
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
1864
+ routeValues: {
1865
+ project: project,
1866
+ releaseId: releaseId
1867
+ },
1868
+ queryParams: queryValues
1869
+ });
1870
+ }
1871
+
1872
+ /**
1873
+ * Update a complete release object.
1874
+ *
1875
+ * @param release - Release object for update.
1876
+ * @param project - Project ID or project name
1877
+ * @param releaseId - Id of the release to update.
1878
+ */
1879
+ public async updateRelease(
1880
+ release: Release.Release,
1881
+ project: string,
1882
+ releaseId: number
1883
+ ): Promise<Release.Release> {
1884
+
1885
+ return this.beginRequest<Release.Release>({
1886
+ apiVersion: "7.2-preview.9",
1887
+ method: "PUT",
1888
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
1889
+ routeValues: {
1890
+ project: project,
1891
+ releaseId: releaseId
1892
+ },
1893
+ body: release
1894
+ });
1895
+ }
1896
+
1897
+ /**
1898
+ * Update few properties of a release.
1899
+ *
1900
+ * @param releaseUpdateMetadata - Properties of release to update.
1901
+ * @param project - Project ID or project name
1902
+ * @param releaseId - Id of the release to update.
1903
+ */
1904
+ public async updateReleaseResource(
1905
+ releaseUpdateMetadata: Release.ReleaseUpdateMetadata,
1906
+ project: string,
1907
+ releaseId: number
1908
+ ): Promise<Release.Release> {
1909
+
1910
+ return this.beginRequest<Release.Release>({
1911
+ apiVersion: "7.2-preview.9",
1912
+ method: "PATCH",
1913
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}",
1914
+ routeValues: {
1915
+ project: project,
1916
+ releaseId: releaseId
1917
+ },
1918
+ body: releaseUpdateMetadata
1919
+ });
1920
+ }
1921
+
1922
+ /**
1923
+ * Gets the release settings
1924
+ *
1925
+ * @param project - Project ID or project name
1926
+ */
1927
+ public async getReleaseSettings(
1928
+ project: string
1929
+ ): Promise<Release.ReleaseSettings> {
1930
+
1931
+ return this.beginRequest<Release.ReleaseSettings>({
1932
+ apiVersion: "7.2-preview.1",
1933
+ routeTemplate: "{project}/_apis/Release/releasesettings",
1934
+ routeValues: {
1935
+ project: project
1936
+ }
1937
+ });
1938
+ }
1939
+
1940
+ /**
1941
+ * Updates the release settings
1942
+ *
1943
+ * @param releaseSettings -
1944
+ * @param project - Project ID or project name
1945
+ */
1946
+ public async updateReleaseSettings(
1947
+ releaseSettings: Release.ReleaseSettings,
1948
+ project: string
1949
+ ): Promise<Release.ReleaseSettings> {
1950
+
1951
+ return this.beginRequest<Release.ReleaseSettings>({
1952
+ apiVersion: "7.2-preview.1",
1953
+ method: "PUT",
1954
+ routeTemplate: "{project}/_apis/Release/releasesettings",
1955
+ routeValues: {
1956
+ project: project
1957
+ },
1958
+ body: releaseSettings
1959
+ });
1960
+ }
1961
+
1962
+ /**
1963
+ * Get release definition for a given definitionId and revision
1964
+ *
1965
+ * @param project - Project ID or project name
1966
+ * @param definitionId - Id of the definition.
1967
+ * @param revision - Id of the revision.
1968
+ */
1969
+ public async getDefinitionRevision(
1970
+ project: string,
1971
+ definitionId: number,
1972
+ revision: number
1973
+ ): Promise<string> {
1974
+
1975
+ return this.beginRequest<string>({
1976
+ apiVersion: "7.2-preview.4",
1977
+ httpResponseType: "text/plain",
1978
+ routeTemplate: "{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",
1979
+ routeValues: {
1980
+ project: project,
1981
+ definitionId: definitionId,
1982
+ revision: revision
1983
+ }
1984
+ });
1985
+ }
1986
+
1987
+ /**
1988
+ * Get revision history for a release definition
1989
+ *
1990
+ * @param project - Project ID or project name
1991
+ * @param definitionId - Id of the definition.
1992
+ */
1993
+ public async getReleaseDefinitionHistory(
1994
+ project: string,
1995
+ definitionId: number
1996
+ ): Promise<Release.ReleaseDefinitionRevision[]> {
1997
+
1998
+ return this.beginRequest<Release.ReleaseDefinitionRevision[]>({
1999
+ apiVersion: "7.2-preview.4",
2000
+ routeTemplate: "{project}/_apis/Release/definitions/{definitionId}/revisions/{revision}",
2001
+ routeValues: {
2002
+ project: project,
2003
+ definitionId: definitionId
2004
+ }
2005
+ });
2006
+ }
2007
+
2008
+ /**
2009
+ * @param project - Project ID or project name
2010
+ * @param releaseId -
2011
+ */
2012
+ public async getSummaryMailSections(
2013
+ project: string,
2014
+ releaseId: number
2015
+ ): Promise<Release.SummaryMailSection[]> {
2016
+
2017
+ return this.beginRequest<Release.SummaryMailSection[]>({
2018
+ apiVersion: "7.2-preview.1",
2019
+ routeTemplate: "{project}/_apis/Release/sendmail/{releaseId}",
2020
+ routeValues: {
2021
+ project: project,
2022
+ releaseId: releaseId
2023
+ }
2024
+ });
2025
+ }
2026
+
2027
+ /**
2028
+ * @param mailMessage -
2029
+ * @param project - Project ID or project name
2030
+ * @param releaseId -
2031
+ */
2032
+ public async sendSummaryMail(
2033
+ mailMessage: Release.MailMessage,
2034
+ project: string,
2035
+ releaseId: number
2036
+ ): Promise<void> {
2037
+
2038
+ return this.beginRequest<void>({
2039
+ apiVersion: "7.2-preview.1",
2040
+ method: "POST",
2041
+ routeTemplate: "{project}/_apis/Release/sendmail/{releaseId}",
2042
+ routeValues: {
2043
+ project: project,
2044
+ releaseId: releaseId
2045
+ },
2046
+ body: mailMessage
2047
+ });
2048
+ }
2049
+
2050
+ /**
2051
+ * @param project - Project ID or project name
2052
+ * @param definitionId -
2053
+ */
2054
+ public async getSourceBranches(
2055
+ project: string,
2056
+ definitionId: number
2057
+ ): Promise<string[]> {
2058
+
2059
+ return this.beginRequest<string[]>({
2060
+ apiVersion: "7.2-preview.1",
2061
+ routeTemplate: "{project}/_apis/Release/definitions/{definitionId}/sourcebranches",
2062
+ routeValues: {
2063
+ project: project,
2064
+ definitionId: definitionId
2065
+ }
2066
+ });
2067
+ }
2068
+
2069
+ /**
2070
+ * Adds a tag to a definition
2071
+ *
2072
+ * @param project - Project ID or project name
2073
+ * @param releaseDefinitionId -
2074
+ * @param tag -
2075
+ */
2076
+ public async addDefinitionTag(
2077
+ project: string,
2078
+ releaseDefinitionId: number,
2079
+ tag: string
2080
+ ): Promise<string[]> {
2081
+
2082
+ return this.beginRequest<string[]>({
2083
+ apiVersion: "7.2-preview.1",
2084
+ method: "PATCH",
2085
+ routeTemplate: "{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",
2086
+ routeValues: {
2087
+ project: project,
2088
+ releaseDefinitionId: releaseDefinitionId,
2089
+ tag: tag
2090
+ }
2091
+ });
2092
+ }
2093
+
2094
+ /**
2095
+ * Adds multiple tags to a definition
2096
+ *
2097
+ * @param tags -
2098
+ * @param project - Project ID or project name
2099
+ * @param releaseDefinitionId -
2100
+ */
2101
+ public async addDefinitionTags(
2102
+ tags: string[],
2103
+ project: string,
2104
+ releaseDefinitionId: number
2105
+ ): Promise<string[]> {
2106
+
2107
+ return this.beginRequest<string[]>({
2108
+ apiVersion: "7.2-preview.1",
2109
+ method: "POST",
2110
+ routeTemplate: "{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",
2111
+ routeValues: {
2112
+ project: project,
2113
+ releaseDefinitionId: releaseDefinitionId
2114
+ },
2115
+ body: tags
2116
+ });
2117
+ }
2118
+
2119
+ /**
2120
+ * Deletes a tag from a definition
2121
+ *
2122
+ * @param project - Project ID or project name
2123
+ * @param releaseDefinitionId -
2124
+ * @param tag -
2125
+ */
2126
+ public async deleteDefinitionTag(
2127
+ project: string,
2128
+ releaseDefinitionId: number,
2129
+ tag: string
2130
+ ): Promise<string[]> {
2131
+
2132
+ return this.beginRequest<string[]>({
2133
+ apiVersion: "7.2-preview.1",
2134
+ method: "DELETE",
2135
+ routeTemplate: "{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",
2136
+ routeValues: {
2137
+ project: project,
2138
+ releaseDefinitionId: releaseDefinitionId,
2139
+ tag: tag
2140
+ }
2141
+ });
2142
+ }
2143
+
2144
+ /**
2145
+ * Gets the tags for a definition
2146
+ *
2147
+ * @param project - Project ID or project name
2148
+ * @param releaseDefinitionId -
2149
+ */
2150
+ public async getDefinitionTags(
2151
+ project: string,
2152
+ releaseDefinitionId: number
2153
+ ): Promise<string[]> {
2154
+
2155
+ return this.beginRequest<string[]>({
2156
+ apiVersion: "7.2-preview.1",
2157
+ routeTemplate: "{project}/_apis/Release/definitions/{releaseDefinitionId}/tags/{*tag}",
2158
+ routeValues: {
2159
+ project: project,
2160
+ releaseDefinitionId: releaseDefinitionId
2161
+ }
2162
+ });
2163
+ }
2164
+
2165
+ /**
2166
+ * Adds a tag to a releaseId
2167
+ *
2168
+ * @param project - Project ID or project name
2169
+ * @param releaseId -
2170
+ * @param tag -
2171
+ */
2172
+ public async addReleaseTag(
2173
+ project: string,
2174
+ releaseId: number,
2175
+ tag: string
2176
+ ): Promise<string[]> {
2177
+
2178
+ return this.beginRequest<string[]>({
2179
+ apiVersion: "7.2-preview.1",
2180
+ method: "PATCH",
2181
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",
2182
+ routeValues: {
2183
+ project: project,
2184
+ releaseId: releaseId,
2185
+ tag: tag
2186
+ }
2187
+ });
2188
+ }
2189
+
2190
+ /**
2191
+ * Adds tag to a release
2192
+ *
2193
+ * @param tags -
2194
+ * @param project - Project ID or project name
2195
+ * @param releaseId -
2196
+ */
2197
+ public async addReleaseTags(
2198
+ tags: string[],
2199
+ project: string,
2200
+ releaseId: number
2201
+ ): Promise<string[]> {
2202
+
2203
+ return this.beginRequest<string[]>({
2204
+ apiVersion: "7.2-preview.1",
2205
+ method: "POST",
2206
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",
2207
+ routeValues: {
2208
+ project: project,
2209
+ releaseId: releaseId
2210
+ },
2211
+ body: tags
2212
+ });
2213
+ }
2214
+
2215
+ /**
2216
+ * Deletes a tag from a release
2217
+ *
2218
+ * @param project - Project ID or project name
2219
+ * @param releaseId -
2220
+ * @param tag -
2221
+ */
2222
+ public async deleteReleaseTag(
2223
+ project: string,
2224
+ releaseId: number,
2225
+ tag: string
2226
+ ): Promise<string[]> {
2227
+
2228
+ return this.beginRequest<string[]>({
2229
+ apiVersion: "7.2-preview.1",
2230
+ method: "DELETE",
2231
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",
2232
+ routeValues: {
2233
+ project: project,
2234
+ releaseId: releaseId,
2235
+ tag: tag
2236
+ }
2237
+ });
2238
+ }
2239
+
2240
+ /**
2241
+ * Gets the tags for a release
2242
+ *
2243
+ * @param project - Project ID or project name
2244
+ * @param releaseId -
2245
+ */
2246
+ public async getReleaseTags(
2247
+ project: string,
2248
+ releaseId: number
2249
+ ): Promise<string[]> {
2250
+
2251
+ return this.beginRequest<string[]>({
2252
+ apiVersion: "7.2-preview.1",
2253
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/tags/{*tag}",
2254
+ routeValues: {
2255
+ project: project,
2256
+ releaseId: releaseId
2257
+ }
2258
+ });
2259
+ }
2260
+
2261
+ /**
2262
+ * @param project - Project ID or project name
2263
+ */
2264
+ public async getTags(
2265
+ project: string
2266
+ ): Promise<string[]> {
2267
+
2268
+ return this.beginRequest<string[]>({
2269
+ apiVersion: "7.2-preview.1",
2270
+ routeTemplate: "{project}/_apis/Release/tags",
2271
+ routeValues: {
2272
+ project: project
2273
+ }
2274
+ });
2275
+ }
2276
+
2277
+ /**
2278
+ * @param project - Project ID or project name
2279
+ * @param releaseId -
2280
+ * @param environmentId -
2281
+ * @param releaseDeployPhaseId -
2282
+ */
2283
+ public async getTasksForTaskGroup(
2284
+ project: string,
2285
+ releaseId: number,
2286
+ environmentId: number,
2287
+ releaseDeployPhaseId: number
2288
+ ): Promise<Release.ReleaseTask[]> {
2289
+
2290
+ return this.beginRequest<Release.ReleaseTask[]>({
2291
+ apiVersion: "7.2-preview.2",
2292
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/deployPhases/{releaseDeployPhaseId}/tasks",
2293
+ routeValues: {
2294
+ project: project,
2295
+ releaseId: releaseId,
2296
+ environmentId: environmentId,
2297
+ releaseDeployPhaseId: releaseDeployPhaseId
2298
+ }
2299
+ });
2300
+ }
2301
+
2302
+ /**
2303
+ * @param project - Project ID or project name
2304
+ * @param releaseId -
2305
+ * @param environmentId -
2306
+ * @param attemptId -
2307
+ * @param timelineId -
2308
+ */
2309
+ public async getTasks2(
2310
+ project: string,
2311
+ releaseId: number,
2312
+ environmentId: number,
2313
+ attemptId: number,
2314
+ timelineId: string
2315
+ ): Promise<Release.ReleaseTask[]> {
2316
+
2317
+ return this.beginRequest<Release.ReleaseTask[]>({
2318
+ apiVersion: "7.2-preview.2",
2319
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/attempts/{attemptId}/timelines/{timelineId}/tasks",
2320
+ routeValues: {
2321
+ project: project,
2322
+ releaseId: releaseId,
2323
+ environmentId: environmentId,
2324
+ attemptId: attemptId,
2325
+ timelineId: timelineId
2326
+ }
2327
+ });
2328
+ }
2329
+
2330
+ /**
2331
+ * @param project - Project ID or project name
2332
+ * @param releaseId -
2333
+ * @param environmentId -
2334
+ * @param attemptId -
2335
+ */
2336
+ public async getTasks(
2337
+ project: string,
2338
+ releaseId: number,
2339
+ environmentId: number,
2340
+ attemptId?: number
2341
+ ): Promise<Release.ReleaseTask[]> {
2342
+
2343
+ const queryValues: any = {
2344
+ attemptId: attemptId
2345
+ };
2346
+
2347
+ return this.beginRequest<Release.ReleaseTask[]>({
2348
+ apiVersion: "7.2-preview.2",
2349
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/environments/{environmentId}/tasks",
2350
+ routeValues: {
2351
+ project: project,
2352
+ releaseId: releaseId,
2353
+ environmentId: environmentId
2354
+ },
2355
+ queryParams: queryValues
2356
+ });
2357
+ }
2358
+
2359
+ /**
2360
+ * @param project - Project ID or project name
2361
+ */
2362
+ public async getArtifactTypeDefinitions(
2363
+ project: string
2364
+ ): Promise<Release.ArtifactTypeDefinition[]> {
2365
+
2366
+ return this.beginRequest<Release.ArtifactTypeDefinition[]>({
2367
+ apiVersion: "7.2-preview.1",
2368
+ routeTemplate: "{project}/_apis/Release/artifacts/types",
2369
+ routeValues: {
2370
+ project: project
2371
+ }
2372
+ });
2373
+ }
2374
+
2375
+ /**
2376
+ * @param project - Project ID or project name
2377
+ * @param releaseDefinitionId -
2378
+ */
2379
+ public async getArtifactVersions(
2380
+ project: string,
2381
+ releaseDefinitionId: number
2382
+ ): Promise<Release.ArtifactVersionQueryResult> {
2383
+
2384
+ const queryValues: any = {
2385
+ releaseDefinitionId: releaseDefinitionId
2386
+ };
2387
+
2388
+ return this.beginRequest<Release.ArtifactVersionQueryResult>({
2389
+ apiVersion: "7.2-preview.1",
2390
+ routeTemplate: "{project}/_apis/Release/artifacts/versions",
2391
+ routeValues: {
2392
+ project: project
2393
+ },
2394
+ queryParams: queryValues
2395
+ });
2396
+ }
2397
+
2398
+ /**
2399
+ * @param artifacts -
2400
+ * @param project - Project ID or project name
2401
+ */
2402
+ public async getArtifactVersionsForSources(
2403
+ artifacts: Release.Artifact[],
2404
+ project: string
2405
+ ): Promise<Release.ArtifactVersionQueryResult> {
2406
+
2407
+ return this.beginRequest<Release.ArtifactVersionQueryResult>({
2408
+ apiVersion: "7.2-preview.1",
2409
+ method: "POST",
2410
+ routeTemplate: "{project}/_apis/Release/artifacts/versions",
2411
+ routeValues: {
2412
+ project: project
2413
+ },
2414
+ body: artifacts
2415
+ });
2416
+ }
2417
+
2418
+ /**
2419
+ * @param project - Project ID or project name
2420
+ * @param releaseId -
2421
+ * @param baseReleaseId -
2422
+ * @param top -
2423
+ * @param artifactAlias -
2424
+ */
2425
+ public async getReleaseWorkItemsRefs(
2426
+ project: string,
2427
+ releaseId: number,
2428
+ baseReleaseId?: number,
2429
+ top?: number,
2430
+ artifactAlias?: string
2431
+ ): Promise<Release.ReleaseWorkItemRef[]> {
2432
+
2433
+ const queryValues: any = {
2434
+ baseReleaseId: baseReleaseId,
2435
+ '$top': top,
2436
+ artifactAlias: artifactAlias
2437
+ };
2438
+
2439
+ return this.beginRequest<Release.ReleaseWorkItemRef[]>({
2440
+ apiVersion: "7.2-preview.1",
2441
+ routeTemplate: "{project}/_apis/Release/releases/{releaseId}/workitems",
2442
+ routeValues: {
2443
+ project: project,
2444
+ releaseId: releaseId
2445
+ },
2446
+ queryParams: queryValues
2447
+ });
2448
+ }
2449
+
2450
+ }