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