azure-devops-extension-api 4.248.0 → 4.250.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 (562) hide show
  1. package/{bin/Alert → Alert}/Alert.d.ts +12 -2
  2. package/{bin/Alert → Alert}/Alert.js +11 -0
  3. package/Alert/Alert.min.js +1 -0
  4. package/{bin/Alert → Alert}/AlertClient.d.ts +2 -1
  5. package/{bin/Alert → Alert}/AlertClient.js +3 -1
  6. package/Alert/AlertClient.min.js +1 -0
  7. package/{bin/Gallery → Gallery}/GalleryClient.d.ts +7 -5
  8. package/{bin/Gallery → Gallery}/GalleryClient.js +20 -19
  9. package/Gallery/GalleryClient.min.js +1 -0
  10. package/{bin/Management → Management}/Management.d.ts +4 -0
  11. package/{bin/Release → Release}/ReleaseClient.d.ts +4 -2
  12. package/{bin/Release → Release}/ReleaseClient.js +8 -4
  13. package/Release/ReleaseClient.min.js +1 -0
  14. package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpoint.d.ts +4 -0
  15. package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpointClient.d.ts +3 -2
  16. package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpointClient.js +5 -3
  17. package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -0
  18. package/{bin/TestResults → TestResults}/TestResultsClient.d.ts +8 -0
  19. package/{bin/TestResults → TestResults}/TestResultsClient.js +28 -9
  20. package/{bin/TestResults → TestResults}/TestResultsClient.min.js +1 -1
  21. package/package.json +1 -1
  22. package/SECURITY.md +0 -41
  23. package/bin/Alert/Alert.min.js +0 -1
  24. package/bin/Alert/AlertClient.min.js +0 -1
  25. package/bin/Gallery/GalleryClient.min.js +0 -1
  26. package/bin/LICENSE +0 -21
  27. package/bin/README.md +0 -2
  28. package/bin/Release/ReleaseClient.min.js +0 -1
  29. package/bin/ServiceEndpoint/ServiceEndpointClient.min.js +0 -1
  30. package/bin/package.json +0 -37
  31. package/buildpackage.js +0 -80
  32. package/src/Accounts/Accounts.ts +0 -134
  33. package/src/Accounts/AccountsClient.ts +0 -83
  34. package/src/Accounts/index.ts +0 -2
  35. package/src/AdvancedSecurity.Reporting/Reporting.ts +0 -180
  36. package/src/AdvancedSecurity.Reporting/ReportingClient.ts +0 -47
  37. package/src/Alert/Alert.ts +0 -1037
  38. package/src/Alert/AlertClient.ts +0 -330
  39. package/src/Boards/Boards.ts +0 -684
  40. package/src/Boards/BoardsClient.ts +0 -593
  41. package/src/Boards/index.ts +0 -2
  42. package/src/Build/Build.ts +0 -3416
  43. package/src/Build/BuildClient.ts +0 -2740
  44. package/src/Build/BuildServices.ts +0 -39
  45. package/src/Build/index.ts +0 -3
  46. package/src/Comments/Comments.ts +0 -330
  47. package/src/Comments/index.ts +0 -1
  48. package/src/Common/Client.ts +0 -37
  49. package/src/Common/CommonServices.ts +0 -853
  50. package/src/Common/Context.d.ts +0 -46
  51. package/src/Common/Fetch.ts +0 -239
  52. package/src/Common/RestClientBase.ts +0 -186
  53. package/src/Common/System.ts +0 -36
  54. package/src/Common/SystemData.ts +0 -135
  55. package/src/Common/Util/Serialization.ts +0 -59
  56. package/src/Common/Util/Url.ts +0 -773
  57. package/src/Common/index.ts +0 -3
  58. package/src/Contributions/Contributions.ts +0 -708
  59. package/src/Contributions/ContributionsClient.ts +0 -109
  60. package/src/Contributions/index.ts +0 -2
  61. package/src/Core/Core.ts +0 -579
  62. package/src/Core/CoreClient.ts +0 -765
  63. package/src/Core/index.ts +0 -2
  64. package/src/Dashboard/Dashboard.ts +0 -419
  65. package/src/Dashboard/DashboardClient.ts +0 -370
  66. package/src/Dashboard/WidgetConfigHelpers.ts +0 -43
  67. package/src/Dashboard/WidgetContracts.ts +0 -226
  68. package/src/Dashboard/WidgetHelpers.ts +0 -145
  69. package/src/Dashboard/index.ts +0 -5
  70. package/src/DistributedTaskCommon/DistributedTaskCommon.ts +0 -108
  71. package/src/DistributedTaskCommon/index.ts +0 -1
  72. package/src/ExtensionManagement/ExtensionManagement.ts +0 -1205
  73. package/src/ExtensionManagement/ExtensionManagementClient.ts +0 -646
  74. package/src/ExtensionManagement/index.ts +0 -2
  75. package/src/Favorite/Favorite.ts +0 -136
  76. package/src/Favorite/FavoriteClient.ts +0 -301
  77. package/src/FeatureAvailability/FeatureAvailability.ts +0 -20
  78. package/src/FeatureAvailability/FeatureAvailabilityClient.ts +0 -153
  79. package/src/FeatureAvailability/index.ts +0 -2
  80. package/src/FeatureManagement/FeatureManagement.ts +0 -166
  81. package/src/FeatureManagement/FeatureManagementClient.ts +0 -246
  82. package/src/FeatureManagement/index.ts +0 -2
  83. package/src/FileContainer/FileContainer.ts +0 -205
  84. package/src/FileContainer/FileContainerClient.ts +0 -154
  85. package/src/FileContainer/index.ts +0 -2
  86. package/src/FormInput/FormInput.ts +0 -288
  87. package/src/FormInput/index.ts +0 -1
  88. package/src/Gallery/Gallery.ts +0 -1977
  89. package/src/Gallery/GalleryClient.ts +0 -2251
  90. package/src/Gallery/index.ts +0 -2
  91. package/src/Git/CodeEditorTypes.ts +0 -335
  92. package/src/Git/Git.ts +0 -4062
  93. package/src/Git/GitClient.ts +0 -4750
  94. package/src/Git/GitServices.ts +0 -18
  95. package/src/Git/index.ts +0 -4
  96. package/src/Graph/Graph.ts +0 -572
  97. package/src/Graph/GraphClient.ts +0 -846
  98. package/src/Graph/index.ts +0 -2
  99. package/src/Identities/Identities.ts +0 -261
  100. package/src/Identities/IdentityProvider.ts +0 -90
  101. package/src/Identities/IdentityService.ts +0 -89
  102. package/src/Identities/index.ts +0 -3
  103. package/src/Locations/Locations.ts +0 -165
  104. package/src/Locations/LocationsClient.ts +0 -220
  105. package/src/Locations/index.ts +0 -2
  106. package/src/Management/Management.ts +0 -176
  107. package/src/Management/ManagementClient.ts +0 -348
  108. package/src/Notification/Notification.ts +0 -1460
  109. package/src/Notification/NotificationClient.ts +0 -477
  110. package/src/Notification/index.ts +0 -2
  111. package/src/Operations/Operations.ts +0 -86
  112. package/src/Operations/OperationsClient.ts +0 -42
  113. package/src/Operations/index.ts +0 -2
  114. package/src/Pipelines/Pipelines.ts +0 -354
  115. package/src/Pipelines/PipelinesClient.ts +0 -306
  116. package/src/Policy/Policy.ts +0 -173
  117. package/src/Policy/PolicyClient.ts +0 -315
  118. package/src/Policy/index.ts +0 -2
  119. package/src/Profile/Profile.ts +0 -187
  120. package/src/Profile/ProfileClient.ts +0 -328
  121. package/src/Profile/index.ts +0 -2
  122. package/src/ProjectAnalysis/ProjectAnalysis.ts +0 -74
  123. package/src/ProjectAnalysis/ProjectAnalysisClient.ts +0 -124
  124. package/src/ProjectAnalysis/index.ts +0 -2
  125. package/src/Release/Release.ts +0 -4237
  126. package/src/Release/ReleaseClient.ts +0 -2450
  127. package/src/Release/index.ts +0 -2
  128. package/src/ResourceUsage/ResourceUsage.ts +0 -19
  129. package/src/ResourceUsage/ResourceUsageClient.ts +0 -48
  130. package/src/ServiceEndpoint/ServiceEndpoint.ts +0 -930
  131. package/src/ServiceEndpoint/ServiceEndpointClient.ts +0 -617
  132. package/src/ServiceEndpoint/index.ts +0 -2
  133. package/src/ServiceHooks/ServiceHooks.ts +0 -759
  134. package/src/ServiceHooks/ServiceHooksClient.ts +0 -499
  135. package/src/ServiceHooks/index.ts +0 -2
  136. package/src/TaskAgent/TaskAgent.ts +0 -3896
  137. package/src/TaskAgent/TaskAgentClient.ts +0 -3918
  138. package/src/TaskAgent/index.ts +0 -2
  139. package/src/Test/Test.ts +0 -5853
  140. package/src/Test/TestClient.ts +0 -2201
  141. package/src/Test/index.ts +0 -2
  142. package/src/TestPlan/TestPlan.ts +0 -1384
  143. package/src/TestPlan/TestPlanClient.ts +0 -1367
  144. package/src/TestPlan/index.ts +0 -2
  145. package/src/TestResults/TestResults.ts +0 -11
  146. package/src/TestResults/TestResultsClient.ts +0 -3506
  147. package/src/TestResults/index.ts +0 -2
  148. package/src/Tfvc/Tfvc.ts +0 -770
  149. package/src/Tfvc/TfvcClient.ts +0 -757
  150. package/src/Tfvc/index.ts +0 -2
  151. package/src/WebApi/WebApi.ts +0 -452
  152. package/src/WebApi/index.ts +0 -1
  153. package/src/Wiki/Wiki.ts +0 -352
  154. package/src/Wiki/WikiClient.ts +0 -712
  155. package/src/Wiki/index.ts +0 -2
  156. package/src/Work/Work.ts +0 -1367
  157. package/src/Work/WorkClient.ts +0 -1489
  158. package/src/Work/index.ts +0 -2
  159. package/src/WorkItemTracking/WorkItemTracking.ts +0 -2215
  160. package/src/WorkItemTracking/WorkItemTrackingClient.ts +0 -2032
  161. package/src/WorkItemTracking/WorkItemTrackingServices.ts +0 -329
  162. package/src/WorkItemTracking/index.ts +0 -3
  163. package/src/WorkItemTrackingProcess/WorkItemTrackingProcess.ts +0 -1295
  164. package/src/WorkItemTrackingProcess/WorkItemTrackingProcessClient.ts +0 -1455
  165. package/src/WorkItemTrackingProcess/index.ts +0 -2
  166. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.ts +0 -606
  167. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.ts +0 -1175
  168. package/src/WorkItemTrackingProcessDefinitions/index.ts +0 -2
  169. package/src/index.ts +0 -1
  170. package/tsconfig.json +0 -21
  171. /package/{bin/Accounts → Accounts}/Accounts.d.ts +0 -0
  172. /package/{bin/Accounts → Accounts}/Accounts.js +0 -0
  173. /package/{bin/Accounts → Accounts}/Accounts.min.js +0 -0
  174. /package/{bin/Accounts → Accounts}/AccountsClient.d.ts +0 -0
  175. /package/{bin/Accounts → Accounts}/AccountsClient.js +0 -0
  176. /package/{bin/Accounts → Accounts}/AccountsClient.min.js +0 -0
  177. /package/{bin/Accounts → Accounts}/index.d.ts +0 -0
  178. /package/{bin/Accounts → Accounts}/index.js +0 -0
  179. /package/{bin/Accounts → Accounts}/index.min.js +0 -0
  180. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/Reporting.d.ts +0 -0
  181. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/Reporting.js +0 -0
  182. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/Reporting.min.js +0 -0
  183. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/ReportingClient.d.ts +0 -0
  184. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/ReportingClient.js +0 -0
  185. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/ReportingClient.min.js +0 -0
  186. /package/{bin/Boards → Boards}/Boards.d.ts +0 -0
  187. /package/{bin/Boards → Boards}/Boards.js +0 -0
  188. /package/{bin/Boards → Boards}/Boards.min.js +0 -0
  189. /package/{bin/Boards → Boards}/BoardsClient.d.ts +0 -0
  190. /package/{bin/Boards → Boards}/BoardsClient.js +0 -0
  191. /package/{bin/Boards → Boards}/BoardsClient.min.js +0 -0
  192. /package/{bin/Boards → Boards}/index.d.ts +0 -0
  193. /package/{bin/Boards → Boards}/index.js +0 -0
  194. /package/{bin/Boards → Boards}/index.min.js +0 -0
  195. /package/{bin/Build → Build}/Build.d.ts +0 -0
  196. /package/{bin/Build → Build}/Build.js +0 -0
  197. /package/{bin/Build → Build}/Build.min.js +0 -0
  198. /package/{bin/Build → Build}/BuildClient.d.ts +0 -0
  199. /package/{bin/Build → Build}/BuildClient.js +0 -0
  200. /package/{bin/Build → Build}/BuildClient.min.js +0 -0
  201. /package/{bin/Build → Build}/BuildServices.d.ts +0 -0
  202. /package/{bin/Build → Build}/BuildServices.js +0 -0
  203. /package/{bin/Build → Build}/BuildServices.min.js +0 -0
  204. /package/{bin/Build → Build}/index.d.ts +0 -0
  205. /package/{bin/Build → Build}/index.js +0 -0
  206. /package/{bin/Build → Build}/index.min.js +0 -0
  207. /package/{bin/Comments → Comments}/Comments.d.ts +0 -0
  208. /package/{bin/Comments → Comments}/Comments.js +0 -0
  209. /package/{bin/Comments → Comments}/Comments.min.js +0 -0
  210. /package/{bin/Comments → Comments}/index.d.ts +0 -0
  211. /package/{bin/Comments → Comments}/index.js +0 -0
  212. /package/{bin/Comments → Comments}/index.min.js +0 -0
  213. /package/{bin/Common → Common}/Client.d.ts +0 -0
  214. /package/{bin/Common → Common}/Client.js +0 -0
  215. /package/{bin/Common → Common}/Client.min.js +0 -0
  216. /package/{bin/Common → Common}/CommonServices.d.ts +0 -0
  217. /package/{bin/Common → Common}/CommonServices.js +0 -0
  218. /package/{bin/Common → Common}/CommonServices.min.js +0 -0
  219. /package/{bin/Common → Common}/Context.d.ts +0 -0
  220. /package/{bin/Common → Common}/Fetch.d.ts +0 -0
  221. /package/{bin/Common → Common}/Fetch.js +0 -0
  222. /package/{bin/Common → Common}/Fetch.min.js +0 -0
  223. /package/{bin/Common → Common}/RestClientBase.d.ts +0 -0
  224. /package/{bin/Common → Common}/RestClientBase.js +0 -0
  225. /package/{bin/Common → Common}/RestClientBase.min.js +0 -0
  226. /package/{bin/Common → Common}/System.d.ts +0 -0
  227. /package/{bin/Common → Common}/System.js +0 -0
  228. /package/{bin/Common → Common}/System.min.js +0 -0
  229. /package/{bin/Common → Common}/SystemData.d.ts +0 -0
  230. /package/{bin/Common → Common}/SystemData.js +0 -0
  231. /package/{bin/Common → Common}/SystemData.min.js +0 -0
  232. /package/{bin/Common → Common}/Util/Serialization.d.ts +0 -0
  233. /package/{bin/Common → Common}/Util/Serialization.js +0 -0
  234. /package/{bin/Common → Common}/Util/Serialization.min.js +0 -0
  235. /package/{bin/Common → Common}/Util/Url.d.ts +0 -0
  236. /package/{bin/Common → Common}/Util/Url.js +0 -0
  237. /package/{bin/Common → Common}/Util/Url.min.js +0 -0
  238. /package/{bin/Common → Common}/index.d.ts +0 -0
  239. /package/{bin/Common → Common}/index.js +0 -0
  240. /package/{bin/Common → Common}/index.min.js +0 -0
  241. /package/{bin/Contributions → Contributions}/Contributions.d.ts +0 -0
  242. /package/{bin/Contributions → Contributions}/Contributions.js +0 -0
  243. /package/{bin/Contributions → Contributions}/Contributions.min.js +0 -0
  244. /package/{bin/Contributions → Contributions}/ContributionsClient.d.ts +0 -0
  245. /package/{bin/Contributions → Contributions}/ContributionsClient.js +0 -0
  246. /package/{bin/Contributions → Contributions}/ContributionsClient.min.js +0 -0
  247. /package/{bin/Contributions → Contributions}/index.d.ts +0 -0
  248. /package/{bin/Contributions → Contributions}/index.js +0 -0
  249. /package/{bin/Contributions → Contributions}/index.min.js +0 -0
  250. /package/{bin/Core → Core}/Core.d.ts +0 -0
  251. /package/{bin/Core → Core}/Core.js +0 -0
  252. /package/{bin/Core → Core}/Core.min.js +0 -0
  253. /package/{bin/Core → Core}/CoreClient.d.ts +0 -0
  254. /package/{bin/Core → Core}/CoreClient.js +0 -0
  255. /package/{bin/Core → Core}/CoreClient.min.js +0 -0
  256. /package/{bin/Core → Core}/index.d.ts +0 -0
  257. /package/{bin/Core → Core}/index.js +0 -0
  258. /package/{bin/Core → Core}/index.min.js +0 -0
  259. /package/{bin/Dashboard → Dashboard}/Dashboard.d.ts +0 -0
  260. /package/{bin/Dashboard → Dashboard}/Dashboard.js +0 -0
  261. /package/{bin/Dashboard → Dashboard}/Dashboard.min.js +0 -0
  262. /package/{bin/Dashboard → Dashboard}/DashboardClient.d.ts +0 -0
  263. /package/{bin/Dashboard → Dashboard}/DashboardClient.js +0 -0
  264. /package/{bin/Dashboard → Dashboard}/DashboardClient.min.js +0 -0
  265. /package/{bin/Dashboard → Dashboard}/WidgetConfigHelpers.d.ts +0 -0
  266. /package/{bin/Dashboard → Dashboard}/WidgetConfigHelpers.js +0 -0
  267. /package/{bin/Dashboard → Dashboard}/WidgetConfigHelpers.min.js +0 -0
  268. /package/{bin/Dashboard → Dashboard}/WidgetContracts.d.ts +0 -0
  269. /package/{bin/Dashboard → Dashboard}/WidgetContracts.js +0 -0
  270. /package/{bin/Dashboard → Dashboard}/WidgetContracts.min.js +0 -0
  271. /package/{bin/Dashboard → Dashboard}/WidgetHelpers.d.ts +0 -0
  272. /package/{bin/Dashboard → Dashboard}/WidgetHelpers.js +0 -0
  273. /package/{bin/Dashboard → Dashboard}/WidgetHelpers.min.js +0 -0
  274. /package/{bin/Dashboard → Dashboard}/index.d.ts +0 -0
  275. /package/{bin/Dashboard → Dashboard}/index.js +0 -0
  276. /package/{bin/Dashboard → Dashboard}/index.min.js +0 -0
  277. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/DistributedTaskCommon.d.ts +0 -0
  278. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/DistributedTaskCommon.js +0 -0
  279. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/DistributedTaskCommon.min.js +0 -0
  280. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/index.d.ts +0 -0
  281. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/index.js +0 -0
  282. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/index.min.js +0 -0
  283. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagement.d.ts +0 -0
  284. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagement.js +0 -0
  285. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagement.min.js +0 -0
  286. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagementClient.d.ts +0 -0
  287. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagementClient.js +0 -0
  288. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagementClient.min.js +0 -0
  289. /package/{bin/ExtensionManagement → ExtensionManagement}/index.d.ts +0 -0
  290. /package/{bin/ExtensionManagement → ExtensionManagement}/index.js +0 -0
  291. /package/{bin/ExtensionManagement → ExtensionManagement}/index.min.js +0 -0
  292. /package/{bin/Favorite → Favorite}/Favorite.d.ts +0 -0
  293. /package/{bin/Favorite → Favorite}/Favorite.js +0 -0
  294. /package/{bin/Favorite → Favorite}/Favorite.min.js +0 -0
  295. /package/{bin/Favorite → Favorite}/FavoriteClient.d.ts +0 -0
  296. /package/{bin/Favorite → Favorite}/FavoriteClient.js +0 -0
  297. /package/{bin/Favorite → Favorite}/FavoriteClient.min.js +0 -0
  298. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailability.d.ts +0 -0
  299. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailability.js +0 -0
  300. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailability.min.js +0 -0
  301. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailabilityClient.d.ts +0 -0
  302. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailabilityClient.js +0 -0
  303. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailabilityClient.min.js +0 -0
  304. /package/{bin/FeatureAvailability → FeatureAvailability}/index.d.ts +0 -0
  305. /package/{bin/FeatureAvailability → FeatureAvailability}/index.js +0 -0
  306. /package/{bin/FeatureAvailability → FeatureAvailability}/index.min.js +0 -0
  307. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagement.d.ts +0 -0
  308. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagement.js +0 -0
  309. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagement.min.js +0 -0
  310. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagementClient.d.ts +0 -0
  311. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagementClient.js +0 -0
  312. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagementClient.min.js +0 -0
  313. /package/{bin/FeatureManagement → FeatureManagement}/index.d.ts +0 -0
  314. /package/{bin/FeatureManagement → FeatureManagement}/index.js +0 -0
  315. /package/{bin/FeatureManagement → FeatureManagement}/index.min.js +0 -0
  316. /package/{bin/FileContainer → FileContainer}/FileContainer.d.ts +0 -0
  317. /package/{bin/FileContainer → FileContainer}/FileContainer.js +0 -0
  318. /package/{bin/FileContainer → FileContainer}/FileContainer.min.js +0 -0
  319. /package/{bin/FileContainer → FileContainer}/FileContainerClient.d.ts +0 -0
  320. /package/{bin/FileContainer → FileContainer}/FileContainerClient.js +0 -0
  321. /package/{bin/FileContainer → FileContainer}/FileContainerClient.min.js +0 -0
  322. /package/{bin/FileContainer → FileContainer}/index.d.ts +0 -0
  323. /package/{bin/FileContainer → FileContainer}/index.js +0 -0
  324. /package/{bin/FileContainer → FileContainer}/index.min.js +0 -0
  325. /package/{bin/FormInput → FormInput}/FormInput.d.ts +0 -0
  326. /package/{bin/FormInput → FormInput}/FormInput.js +0 -0
  327. /package/{bin/FormInput → FormInput}/FormInput.min.js +0 -0
  328. /package/{bin/FormInput → FormInput}/index.d.ts +0 -0
  329. /package/{bin/FormInput → FormInput}/index.js +0 -0
  330. /package/{bin/FormInput → FormInput}/index.min.js +0 -0
  331. /package/{bin/Gallery → Gallery}/Gallery.d.ts +0 -0
  332. /package/{bin/Gallery → Gallery}/Gallery.js +0 -0
  333. /package/{bin/Gallery → Gallery}/Gallery.min.js +0 -0
  334. /package/{bin/Gallery → Gallery}/index.d.ts +0 -0
  335. /package/{bin/Gallery → Gallery}/index.js +0 -0
  336. /package/{bin/Gallery → Gallery}/index.min.js +0 -0
  337. /package/{bin/Git → Git}/CodeEditorTypes.d.ts +0 -0
  338. /package/{bin/Git → Git}/CodeEditorTypes.js +0 -0
  339. /package/{bin/Git → Git}/CodeEditorTypes.min.js +0 -0
  340. /package/{bin/Git → Git}/Git.d.ts +0 -0
  341. /package/{bin/Git → Git}/Git.js +0 -0
  342. /package/{bin/Git → Git}/Git.min.js +0 -0
  343. /package/{bin/Git → Git}/GitClient.d.ts +0 -0
  344. /package/{bin/Git → Git}/GitClient.js +0 -0
  345. /package/{bin/Git → Git}/GitClient.min.js +0 -0
  346. /package/{bin/Git → Git}/GitServices.d.ts +0 -0
  347. /package/{bin/Git → Git}/GitServices.js +0 -0
  348. /package/{bin/Git → Git}/GitServices.min.js +0 -0
  349. /package/{bin/Git → Git}/index.d.ts +0 -0
  350. /package/{bin/Git → Git}/index.js +0 -0
  351. /package/{bin/Git → Git}/index.min.js +0 -0
  352. /package/{bin/Graph → Graph}/Graph.d.ts +0 -0
  353. /package/{bin/Graph → Graph}/Graph.js +0 -0
  354. /package/{bin/Graph → Graph}/Graph.min.js +0 -0
  355. /package/{bin/Graph → Graph}/GraphClient.d.ts +0 -0
  356. /package/{bin/Graph → Graph}/GraphClient.js +0 -0
  357. /package/{bin/Graph → Graph}/GraphClient.min.js +0 -0
  358. /package/{bin/Graph → Graph}/index.d.ts +0 -0
  359. /package/{bin/Graph → Graph}/index.js +0 -0
  360. /package/{bin/Graph → Graph}/index.min.js +0 -0
  361. /package/{bin/Identities → Identities}/Identities.d.ts +0 -0
  362. /package/{bin/Identities → Identities}/Identities.js +0 -0
  363. /package/{bin/Identities → Identities}/Identities.min.js +0 -0
  364. /package/{bin/Identities → Identities}/IdentityProvider.d.ts +0 -0
  365. /package/{bin/Identities → Identities}/IdentityProvider.js +0 -0
  366. /package/{bin/Identities → Identities}/IdentityProvider.min.js +0 -0
  367. /package/{bin/Identities → Identities}/IdentityService.d.ts +0 -0
  368. /package/{bin/Identities → Identities}/IdentityService.js +0 -0
  369. /package/{bin/Identities → Identities}/IdentityService.min.js +0 -0
  370. /package/{bin/Identities → Identities}/index.d.ts +0 -0
  371. /package/{bin/Identities → Identities}/index.js +0 -0
  372. /package/{bin/Identities → Identities}/index.min.js +0 -0
  373. /package/{bin/Locations → Locations}/Locations.d.ts +0 -0
  374. /package/{bin/Locations → Locations}/Locations.js +0 -0
  375. /package/{bin/Locations → Locations}/Locations.min.js +0 -0
  376. /package/{bin/Locations → Locations}/LocationsClient.d.ts +0 -0
  377. /package/{bin/Locations → Locations}/LocationsClient.js +0 -0
  378. /package/{bin/Locations → Locations}/LocationsClient.min.js +0 -0
  379. /package/{bin/Locations → Locations}/index.d.ts +0 -0
  380. /package/{bin/Locations → Locations}/index.js +0 -0
  381. /package/{bin/Locations → Locations}/index.min.js +0 -0
  382. /package/{bin/Management → Management}/Management.js +0 -0
  383. /package/{bin/Management → Management}/Management.min.js +0 -0
  384. /package/{bin/Management → Management}/ManagementClient.d.ts +0 -0
  385. /package/{bin/Management → Management}/ManagementClient.js +0 -0
  386. /package/{bin/Management → Management}/ManagementClient.min.js +0 -0
  387. /package/{bin/Notification → Notification}/Notification.d.ts +0 -0
  388. /package/{bin/Notification → Notification}/Notification.js +0 -0
  389. /package/{bin/Notification → Notification}/Notification.min.js +0 -0
  390. /package/{bin/Notification → Notification}/NotificationClient.d.ts +0 -0
  391. /package/{bin/Notification → Notification}/NotificationClient.js +0 -0
  392. /package/{bin/Notification → Notification}/NotificationClient.min.js +0 -0
  393. /package/{bin/Notification → Notification}/index.d.ts +0 -0
  394. /package/{bin/Notification → Notification}/index.js +0 -0
  395. /package/{bin/Notification → Notification}/index.min.js +0 -0
  396. /package/{bin/Operations → Operations}/Operations.d.ts +0 -0
  397. /package/{bin/Operations → Operations}/Operations.js +0 -0
  398. /package/{bin/Operations → Operations}/Operations.min.js +0 -0
  399. /package/{bin/Operations → Operations}/OperationsClient.d.ts +0 -0
  400. /package/{bin/Operations → Operations}/OperationsClient.js +0 -0
  401. /package/{bin/Operations → Operations}/OperationsClient.min.js +0 -0
  402. /package/{bin/Operations → Operations}/index.d.ts +0 -0
  403. /package/{bin/Operations → Operations}/index.js +0 -0
  404. /package/{bin/Operations → Operations}/index.min.js +0 -0
  405. /package/{bin/Pipelines → Pipelines}/Pipelines.d.ts +0 -0
  406. /package/{bin/Pipelines → Pipelines}/Pipelines.js +0 -0
  407. /package/{bin/Pipelines → Pipelines}/Pipelines.min.js +0 -0
  408. /package/{bin/Pipelines → Pipelines}/PipelinesClient.d.ts +0 -0
  409. /package/{bin/Pipelines → Pipelines}/PipelinesClient.js +0 -0
  410. /package/{bin/Pipelines → Pipelines}/PipelinesClient.min.js +0 -0
  411. /package/{bin/Policy → Policy}/Policy.d.ts +0 -0
  412. /package/{bin/Policy → Policy}/Policy.js +0 -0
  413. /package/{bin/Policy → Policy}/Policy.min.js +0 -0
  414. /package/{bin/Policy → Policy}/PolicyClient.d.ts +0 -0
  415. /package/{bin/Policy → Policy}/PolicyClient.js +0 -0
  416. /package/{bin/Policy → Policy}/PolicyClient.min.js +0 -0
  417. /package/{bin/Policy → Policy}/index.d.ts +0 -0
  418. /package/{bin/Policy → Policy}/index.js +0 -0
  419. /package/{bin/Policy → Policy}/index.min.js +0 -0
  420. /package/{bin/Profile → Profile}/Profile.d.ts +0 -0
  421. /package/{bin/Profile → Profile}/Profile.js +0 -0
  422. /package/{bin/Profile → Profile}/Profile.min.js +0 -0
  423. /package/{bin/Profile → Profile}/ProfileClient.d.ts +0 -0
  424. /package/{bin/Profile → Profile}/ProfileClient.js +0 -0
  425. /package/{bin/Profile → Profile}/ProfileClient.min.js +0 -0
  426. /package/{bin/Profile → Profile}/index.d.ts +0 -0
  427. /package/{bin/Profile → Profile}/index.js +0 -0
  428. /package/{bin/Profile → Profile}/index.min.js +0 -0
  429. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysis.d.ts +0 -0
  430. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysis.js +0 -0
  431. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysis.min.js +0 -0
  432. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysisClient.d.ts +0 -0
  433. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysisClient.js +0 -0
  434. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysisClient.min.js +0 -0
  435. /package/{bin/ProjectAnalysis → ProjectAnalysis}/index.d.ts +0 -0
  436. /package/{bin/ProjectAnalysis → ProjectAnalysis}/index.js +0 -0
  437. /package/{bin/ProjectAnalysis → ProjectAnalysis}/index.min.js +0 -0
  438. /package/{bin/Release → Release}/Release.d.ts +0 -0
  439. /package/{bin/Release → Release}/Release.js +0 -0
  440. /package/{bin/Release → Release}/Release.min.js +0 -0
  441. /package/{bin/Release → Release}/index.d.ts +0 -0
  442. /package/{bin/Release → Release}/index.js +0 -0
  443. /package/{bin/Release → Release}/index.min.js +0 -0
  444. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsage.d.ts +0 -0
  445. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsage.js +0 -0
  446. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsage.min.js +0 -0
  447. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsageClient.d.ts +0 -0
  448. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsageClient.js +0 -0
  449. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsageClient.min.js +0 -0
  450. /package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpoint.js +0 -0
  451. /package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpoint.min.js +0 -0
  452. /package/{bin/ServiceEndpoint → ServiceEndpoint}/index.d.ts +0 -0
  453. /package/{bin/ServiceEndpoint → ServiceEndpoint}/index.js +0 -0
  454. /package/{bin/ServiceEndpoint → ServiceEndpoint}/index.min.js +0 -0
  455. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooks.d.ts +0 -0
  456. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooks.js +0 -0
  457. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooks.min.js +0 -0
  458. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooksClient.d.ts +0 -0
  459. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooksClient.js +0 -0
  460. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooksClient.min.js +0 -0
  461. /package/{bin/ServiceHooks → ServiceHooks}/index.d.ts +0 -0
  462. /package/{bin/ServiceHooks → ServiceHooks}/index.js +0 -0
  463. /package/{bin/ServiceHooks → ServiceHooks}/index.min.js +0 -0
  464. /package/{bin/TaskAgent → TaskAgent}/TaskAgent.d.ts +0 -0
  465. /package/{bin/TaskAgent → TaskAgent}/TaskAgent.js +0 -0
  466. /package/{bin/TaskAgent → TaskAgent}/TaskAgent.min.js +0 -0
  467. /package/{bin/TaskAgent → TaskAgent}/TaskAgentClient.d.ts +0 -0
  468. /package/{bin/TaskAgent → TaskAgent}/TaskAgentClient.js +0 -0
  469. /package/{bin/TaskAgent → TaskAgent}/TaskAgentClient.min.js +0 -0
  470. /package/{bin/TaskAgent → TaskAgent}/index.d.ts +0 -0
  471. /package/{bin/TaskAgent → TaskAgent}/index.js +0 -0
  472. /package/{bin/TaskAgent → TaskAgent}/index.min.js +0 -0
  473. /package/{bin/Test → Test}/Test.d.ts +0 -0
  474. /package/{bin/Test → Test}/Test.js +0 -0
  475. /package/{bin/Test → Test}/Test.min.js +0 -0
  476. /package/{bin/Test → Test}/TestClient.d.ts +0 -0
  477. /package/{bin/Test → Test}/TestClient.js +0 -0
  478. /package/{bin/Test → Test}/TestClient.min.js +0 -0
  479. /package/{bin/Test → Test}/index.d.ts +0 -0
  480. /package/{bin/Test → Test}/index.js +0 -0
  481. /package/{bin/Test → Test}/index.min.js +0 -0
  482. /package/{bin/TestPlan → TestPlan}/TestPlan.d.ts +0 -0
  483. /package/{bin/TestPlan → TestPlan}/TestPlan.js +0 -0
  484. /package/{bin/TestPlan → TestPlan}/TestPlan.min.js +0 -0
  485. /package/{bin/TestPlan → TestPlan}/TestPlanClient.d.ts +0 -0
  486. /package/{bin/TestPlan → TestPlan}/TestPlanClient.js +0 -0
  487. /package/{bin/TestPlan → TestPlan}/TestPlanClient.min.js +0 -0
  488. /package/{bin/TestPlan → TestPlan}/index.d.ts +0 -0
  489. /package/{bin/TestPlan → TestPlan}/index.js +0 -0
  490. /package/{bin/TestPlan → TestPlan}/index.min.js +0 -0
  491. /package/{bin/TestResults → TestResults}/TestResults.d.ts +0 -0
  492. /package/{bin/TestResults → TestResults}/TestResults.js +0 -0
  493. /package/{bin/TestResults → TestResults}/TestResults.min.js +0 -0
  494. /package/{bin/TestResults → TestResults}/index.d.ts +0 -0
  495. /package/{bin/TestResults → TestResults}/index.js +0 -0
  496. /package/{bin/TestResults → TestResults}/index.min.js +0 -0
  497. /package/{bin/Tfvc → Tfvc}/Tfvc.d.ts +0 -0
  498. /package/{bin/Tfvc → Tfvc}/Tfvc.js +0 -0
  499. /package/{bin/Tfvc → Tfvc}/Tfvc.min.js +0 -0
  500. /package/{bin/Tfvc → Tfvc}/TfvcClient.d.ts +0 -0
  501. /package/{bin/Tfvc → Tfvc}/TfvcClient.js +0 -0
  502. /package/{bin/Tfvc → Tfvc}/TfvcClient.min.js +0 -0
  503. /package/{bin/Tfvc → Tfvc}/index.d.ts +0 -0
  504. /package/{bin/Tfvc → Tfvc}/index.js +0 -0
  505. /package/{bin/Tfvc → Tfvc}/index.min.js +0 -0
  506. /package/{bin/WebApi → WebApi}/WebApi.d.ts +0 -0
  507. /package/{bin/WebApi → WebApi}/WebApi.js +0 -0
  508. /package/{bin/WebApi → WebApi}/WebApi.min.js +0 -0
  509. /package/{bin/WebApi → WebApi}/index.d.ts +0 -0
  510. /package/{bin/WebApi → WebApi}/index.js +0 -0
  511. /package/{bin/WebApi → WebApi}/index.min.js +0 -0
  512. /package/{bin/Wiki → Wiki}/Wiki.d.ts +0 -0
  513. /package/{bin/Wiki → Wiki}/Wiki.js +0 -0
  514. /package/{bin/Wiki → Wiki}/Wiki.min.js +0 -0
  515. /package/{bin/Wiki → Wiki}/WikiClient.d.ts +0 -0
  516. /package/{bin/Wiki → Wiki}/WikiClient.js +0 -0
  517. /package/{bin/Wiki → Wiki}/WikiClient.min.js +0 -0
  518. /package/{bin/Wiki → Wiki}/index.d.ts +0 -0
  519. /package/{bin/Wiki → Wiki}/index.js +0 -0
  520. /package/{bin/Wiki → Wiki}/index.min.js +0 -0
  521. /package/{bin/Work → Work}/Work.d.ts +0 -0
  522. /package/{bin/Work → Work}/Work.js +0 -0
  523. /package/{bin/Work → Work}/Work.min.js +0 -0
  524. /package/{bin/Work → Work}/WorkClient.d.ts +0 -0
  525. /package/{bin/Work → Work}/WorkClient.js +0 -0
  526. /package/{bin/Work → Work}/WorkClient.min.js +0 -0
  527. /package/{bin/Work → Work}/index.d.ts +0 -0
  528. /package/{bin/Work → Work}/index.js +0 -0
  529. /package/{bin/Work → Work}/index.min.js +0 -0
  530. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTracking.d.ts +0 -0
  531. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTracking.js +0 -0
  532. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTracking.min.js +0 -0
  533. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingClient.d.ts +0 -0
  534. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingClient.js +0 -0
  535. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingClient.min.js +0 -0
  536. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingServices.d.ts +0 -0
  537. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingServices.js +0 -0
  538. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingServices.min.js +0 -0
  539. /package/{bin/WorkItemTracking → WorkItemTracking}/index.d.ts +0 -0
  540. /package/{bin/WorkItemTracking → WorkItemTracking}/index.js +0 -0
  541. /package/{bin/WorkItemTracking → WorkItemTracking}/index.min.js +0 -0
  542. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcess.d.ts +0 -0
  543. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcess.js +0 -0
  544. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcess.min.js +0 -0
  545. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcessClient.d.ts +0 -0
  546. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcessClient.js +0 -0
  547. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcessClient.min.js +0 -0
  548. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/index.d.ts +0 -0
  549. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/index.js +0 -0
  550. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/index.min.js +0 -0
  551. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.d.ts +0 -0
  552. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.js +0 -0
  553. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.min.js +0 -0
  554. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.d.ts +0 -0
  555. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.js +0 -0
  556. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.min.js +0 -0
  557. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/index.d.ts +0 -0
  558. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/index.js +0 -0
  559. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/index.min.js +0 -0
  560. /package/{bin/index.d.ts → index.d.ts} +0 -0
  561. /package/{bin/index.js → index.js} +0 -0
  562. /package/{bin/index.min.js → index.min.js} +0 -0
@@ -1,2740 +0,0 @@
1
- /*
2
- * ---------------------------------------------------------
3
- * Copyright(C) Microsoft Corporation. All rights reserved.
4
- * ---------------------------------------------------------
5
- */
6
-
7
- import { IVssRestClientOptions } from "../Common/Context";
8
- import { RestClientBase } from "../Common/RestClientBase";
9
- import { deserializeVssJsonObject } from "../Common/Util/Serialization";
10
-
11
- import * as Build from "../Build/Build";
12
- import * as WebApi from "../WebApi/WebApi";
13
-
14
- export class BuildRestClient extends RestClientBase {
15
- constructor(options: IVssRestClientOptions) {
16
- super(options);
17
- }
18
-
19
- public static readonly RESOURCE_AREA_ID = "965220d5-5bb9-42cf-8d67-9b146df2a5a4";
20
-
21
- /**
22
- * Associates an artifact with a build.
23
- *
24
- * @param artifact - The artifact.
25
- * @param project - Project ID or project name
26
- * @param buildId - The ID of the build.
27
- */
28
- public async createArtifact(
29
- artifact: Build.BuildArtifact,
30
- project: string,
31
- buildId: number
32
- ): Promise<Build.BuildArtifact> {
33
-
34
- return this.beginRequest<Build.BuildArtifact>({
35
- apiVersion: "7.2-preview.5",
36
- method: "POST",
37
- routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
38
- routeValues: {
39
- project: project,
40
- buildId: buildId
41
- },
42
- body: artifact
43
- });
44
- }
45
-
46
- /**
47
- * Gets a specific artifact for a build.
48
- *
49
- * @param project - Project ID or project name
50
- * @param buildId - The ID of the build.
51
- * @param artifactName - The name of the artifact.
52
- */
53
- public async getArtifact(
54
- project: string,
55
- buildId: number,
56
- artifactName: string
57
- ): Promise<Build.BuildArtifact> {
58
-
59
- const queryValues: any = {
60
- artifactName: artifactName
61
- };
62
-
63
- return this.beginRequest<Build.BuildArtifact>({
64
- apiVersion: "7.2-preview.5",
65
- routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
66
- routeValues: {
67
- project: project,
68
- buildId: buildId
69
- },
70
- queryParams: queryValues
71
- });
72
- }
73
-
74
- /**
75
- * Gets a specific artifact for a build.
76
- *
77
- * @param project - Project ID or project name
78
- * @param buildId - The ID of the build.
79
- * @param artifactName - The name of the artifact.
80
- */
81
- public async getArtifactContentZip(
82
- project: string,
83
- buildId: number,
84
- artifactName: string
85
- ): Promise<ArrayBuffer> {
86
-
87
- const queryValues: any = {
88
- artifactName: artifactName
89
- };
90
-
91
- return this.beginRequest<ArrayBuffer>({
92
- apiVersion: "7.2-preview.5",
93
- httpResponseType: "application/zip",
94
- routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
95
- routeValues: {
96
- project: project,
97
- buildId: buildId
98
- },
99
- queryParams: queryValues
100
- });
101
- }
102
-
103
- /**
104
- * Gets all artifacts for a build.
105
- *
106
- * @param project - Project ID or project name
107
- * @param buildId - The ID of the build.
108
- */
109
- public async getArtifacts(
110
- project: string,
111
- buildId: number
112
- ): Promise<Build.BuildArtifact[]> {
113
-
114
- return this.beginRequest<Build.BuildArtifact[]>({
115
- apiVersion: "7.2-preview.5",
116
- routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
117
- routeValues: {
118
- project: project,
119
- buildId: buildId
120
- }
121
- });
122
- }
123
-
124
- /**
125
- * Gets a file from the build.
126
- *
127
- * @param project - Project ID or project name
128
- * @param buildId - The ID of the build.
129
- * @param artifactName - The name of the artifact.
130
- * @param fileId - The primary key for the file.
131
- * @param fileName - The name that the file will be set to.
132
- */
133
- public async getFile(
134
- project: string,
135
- buildId: number,
136
- artifactName: string,
137
- fileId: string,
138
- fileName: string
139
- ): Promise<ArrayBuffer> {
140
-
141
- const queryValues: any = {
142
- artifactName: artifactName,
143
- fileId: fileId,
144
- fileName: fileName
145
- };
146
-
147
- return this.beginRequest<ArrayBuffer>({
148
- apiVersion: "7.2-preview.5",
149
- httpResponseType: "application/octet-stream",
150
- routeTemplate: "{project}/_apis/build/builds/{buildId}/artifacts/{artifactName}",
151
- routeValues: {
152
- project: project,
153
- buildId: buildId
154
- },
155
- queryParams: queryValues
156
- });
157
- }
158
-
159
- /**
160
- * Gets the list of attachments of a specific type that are associated with a build.
161
- *
162
- * @param project - Project ID or project name
163
- * @param buildId - The ID of the build.
164
- * @param type - The type of attachment.
165
- */
166
- public async getAttachments(
167
- project: string,
168
- buildId: number,
169
- type: string
170
- ): Promise<Build.Attachment[]> {
171
-
172
- return this.beginRequest<Build.Attachment[]>({
173
- apiVersion: "7.2-preview.2",
174
- routeTemplate: "{project}/_apis/build/builds/{buildId}/attachments/{type}",
175
- routeValues: {
176
- project: project,
177
- buildId: buildId,
178
- type: type
179
- }
180
- });
181
- }
182
-
183
- /**
184
- * Gets a specific attachment.
185
- *
186
- * @param project - Project ID or project name
187
- * @param buildId - The ID of the build.
188
- * @param timelineId - The ID of the timeline.
189
- * @param recordId - The ID of the timeline record.
190
- * @param type - The type of the attachment.
191
- * @param name - The name of the attachment.
192
- */
193
- public async getAttachment(
194
- project: string,
195
- buildId: number,
196
- timelineId: string,
197
- recordId: string,
198
- type: string,
199
- name: string
200
- ): Promise<ArrayBuffer> {
201
-
202
- return this.beginRequest<ArrayBuffer>({
203
- apiVersion: "7.2-preview.2",
204
- httpResponseType: "application/octet-stream",
205
- routeTemplate: "{project}/_apis/build/builds/{buildId}/{timelineId}/{recordId}/attachments/{type}/{name}",
206
- routeValues: {
207
- project: project,
208
- buildId: buildId,
209
- timelineId: timelineId,
210
- recordId: recordId,
211
- type: type,
212
- name: name
213
- }
214
- });
215
- }
216
-
217
- /**
218
- * @param resources -
219
- * @param project - Project ID or project name
220
- */
221
- public async authorizeProjectResources(
222
- resources: Build.DefinitionResourceReference[],
223
- project: string
224
- ): Promise<Build.DefinitionResourceReference[]> {
225
-
226
- return this.beginRequest<Build.DefinitionResourceReference[]>({
227
- apiVersion: "7.2-preview.1",
228
- method: "PATCH",
229
- routeTemplate: "{project}/_apis/build/authorizedresources",
230
- routeValues: {
231
- project: project
232
- },
233
- body: resources
234
- });
235
- }
236
-
237
- /**
238
- * @param project - Project ID or project name
239
- * @param type -
240
- * @param id -
241
- */
242
- public async getProjectResources(
243
- project: string,
244
- type?: string,
245
- id?: string
246
- ): Promise<Build.DefinitionResourceReference[]> {
247
-
248
- const queryValues: any = {
249
- type: type,
250
- id: id
251
- };
252
-
253
- return this.beginRequest<Build.DefinitionResourceReference[]>({
254
- apiVersion: "7.2-preview.1",
255
- routeTemplate: "{project}/_apis/build/authorizedresources",
256
- routeValues: {
257
- project: project
258
- },
259
- queryParams: queryValues
260
- });
261
- }
262
-
263
- /**
264
- * Gets a badge that indicates the status of the most recent build for a definition. Note that this API is deprecated. Prefer StatusBadgeController.GetStatusBadge.
265
- *
266
- * @param project - The project ID or name.
267
- * @param definitionId - The ID of the definition.
268
- * @param branchName - The name of the branch.
269
- */
270
- public async getBadge(
271
- project: string,
272
- definitionId: number,
273
- branchName?: string
274
- ): Promise<string> {
275
-
276
- const queryValues: any = {
277
- branchName: branchName
278
- };
279
-
280
- return this.beginRequest<string>({
281
- apiVersion: "7.2-preview.2",
282
- routeTemplate: "_apis/public/build/definitions/{project}/{definitionId}/badge",
283
- routeValues: {
284
- project: project,
285
- definitionId: definitionId
286
- },
287
- queryParams: queryValues
288
- });
289
- }
290
-
291
- /**
292
- * Gets a list of branches for the given source code repository.
293
- *
294
- * @param project - Project ID or project name
295
- * @param providerName - The name of the source provider.
296
- * @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
297
- * @param repository - The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
298
- * @param branchName - If supplied, the name of the branch to check for specifically.
299
- */
300
- public async listBranches(
301
- project: string,
302
- providerName: string,
303
- serviceEndpointId?: string,
304
- repository?: string,
305
- branchName?: string
306
- ): Promise<string[]> {
307
-
308
- const queryValues: any = {
309
- serviceEndpointId: serviceEndpointId,
310
- repository: repository,
311
- branchName: branchName
312
- };
313
-
314
- return this.beginRequest<string[]>({
315
- apiVersion: "7.2-preview.1",
316
- routeTemplate: "{project}/_apis/sourceProviders/{providerName}/branches",
317
- routeValues: {
318
- project: project,
319
- providerName: providerName
320
- },
321
- queryParams: queryValues
322
- });
323
- }
324
-
325
- /**
326
- * Gets a badge that indicates the status of the most recent build for the specified branch.
327
- *
328
- * @param project - Project ID or project name
329
- * @param repoType - The repository type.
330
- * @param repoId - The repository ID.
331
- * @param branchName - The branch name.
332
- */
333
- public async getBuildBadge(
334
- project: string,
335
- repoType: string,
336
- repoId?: string,
337
- branchName?: string
338
- ): Promise<Build.BuildBadge> {
339
-
340
- const queryValues: any = {
341
- repoId: repoId,
342
- branchName: branchName
343
- };
344
-
345
- return this.beginRequest<Build.BuildBadge>({
346
- apiVersion: "7.2-preview.2",
347
- routeTemplate: "{project}/_apis/build/repos/{repoType}/badge",
348
- routeValues: {
349
- project: project,
350
- repoType: repoType
351
- },
352
- queryParams: queryValues
353
- });
354
- }
355
-
356
- /**
357
- * Gets a badge that indicates the status of the most recent build for the specified branch.
358
- *
359
- * @param project - Project ID or project name
360
- * @param repoType - The repository type.
361
- * @param repoId - The repository ID.
362
- * @param branchName - The branch name.
363
- */
364
- public async getBuildBadgeData(
365
- project: string,
366
- repoType: string,
367
- repoId?: string,
368
- branchName?: string
369
- ): Promise<string> {
370
-
371
- const queryValues: any = {
372
- repoId: repoId,
373
- branchName: branchName
374
- };
375
-
376
- return this.beginRequest<string>({
377
- apiVersion: "7.2-preview.2",
378
- routeTemplate: "{project}/_apis/build/repos/{repoType}/badge",
379
- routeValues: {
380
- project: project,
381
- repoType: repoType
382
- },
383
- queryParams: queryValues
384
- });
385
- }
386
-
387
- /**
388
- * Gets all retention leases that apply to a specific build.
389
- *
390
- * @param project - Project ID or project name
391
- * @param buildId - The ID of the build.
392
- */
393
- public async getRetentionLeasesForBuild(
394
- project: string,
395
- buildId: number
396
- ): Promise<Build.RetentionLease[]> {
397
-
398
- return this.beginRequest<Build.RetentionLease[]>({
399
- apiVersion: "7.2-preview.1",
400
- routeTemplate: "{project}/_apis/build/builds/{buildId}/leases",
401
- routeValues: {
402
- project: project,
403
- buildId: buildId
404
- }
405
- });
406
- }
407
-
408
- /**
409
- * Deletes a build.
410
- *
411
- * @param project - Project ID or project name
412
- * @param buildId - The ID of the build.
413
- */
414
- public async deleteBuild(
415
- project: string,
416
- buildId: number
417
- ): Promise<void> {
418
-
419
- return this.beginRequest<void>({
420
- apiVersion: "7.2-preview.7",
421
- method: "DELETE",
422
- routeTemplate: "{project}/_apis/build/builds/{buildId}",
423
- routeValues: {
424
- project: project,
425
- buildId: buildId
426
- }
427
- });
428
- }
429
-
430
- /**
431
- * Gets a build
432
- *
433
- * @param project - Project ID or project name
434
- * @param buildId -
435
- * @param propertyFilters -
436
- */
437
- public async getBuild(
438
- project: string,
439
- buildId: number,
440
- propertyFilters?: string
441
- ): Promise<Build.Build> {
442
-
443
- const queryValues: any = {
444
- propertyFilters: propertyFilters
445
- };
446
-
447
- return this.beginRequest<Build.Build>({
448
- apiVersion: "7.2-preview.7",
449
- routeTemplate: "{project}/_apis/build/builds/{buildId}",
450
- routeValues: {
451
- project: project,
452
- buildId: buildId
453
- },
454
- queryParams: queryValues
455
- });
456
- }
457
-
458
- /**
459
- * Gets a list of builds.
460
- *
461
- * @param project - Project ID or project name
462
- * @param definitions - A comma-delimited list of definition IDs. If specified, filters to builds for these definitions.
463
- * @param queues - A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues.
464
- * @param buildNumber - If specified, filters to builds that match this build number. Append * to do a prefix search.
465
- * @param minTime - If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified.
466
- * @param maxTime - If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified.
467
- * @param requestedFor - If specified, filters to builds requested for the specified user.
468
- * @param reasonFilter - If specified, filters to builds that match this reason.
469
- * @param statusFilter - If specified, filters to builds that match this status.
470
- * @param resultFilter - If specified, filters to builds that match this result.
471
- * @param tagFilters - A comma-delimited list of tags. If specified, filters to builds that have the specified tags.
472
- * @param properties - A comma-delimited list of properties to retrieve.
473
- * @param top - The maximum number of builds to return.
474
- * @param continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of builds.
475
- * @param maxBuildsPerDefinition - The maximum number of builds to return per definition.
476
- * @param deletedFilter - Indicates whether to exclude, include, or only return deleted builds.
477
- * @param queryOrder - The order in which builds should be returned.
478
- * @param branchName - If specified, filters to builds that built branches that built this branch.
479
- * @param buildIds - A comma-delimited list that specifies the IDs of builds to retrieve.
480
- * @param repositoryId - If specified, filters to builds that built from this repository.
481
- * @param repositoryType - If specified, filters to builds that built from repositories of this type.
482
- */
483
- public async getBuilds(
484
- project: string,
485
- definitions?: number[],
486
- queues?: number[],
487
- buildNumber?: string,
488
- minTime?: Date,
489
- maxTime?: Date,
490
- requestedFor?: string,
491
- reasonFilter?: Build.BuildReason,
492
- statusFilter?: Build.BuildStatus,
493
- resultFilter?: Build.BuildResult,
494
- tagFilters?: string[],
495
- properties?: string[],
496
- top?: number,
497
- continuationToken?: string,
498
- maxBuildsPerDefinition?: number,
499
- deletedFilter?: Build.QueryDeletedOption,
500
- queryOrder?: Build.BuildQueryOrder,
501
- branchName?: string,
502
- buildIds?: number[],
503
- repositoryId?: string,
504
- repositoryType?: string
505
- ): Promise<WebApi.PagedList<Build.Build>> {
506
-
507
- const queryValues: any = {
508
- definitions: definitions && definitions.join(","),
509
- queues: queues && queues.join(","),
510
- buildNumber: buildNumber,
511
- minTime: minTime,
512
- maxTime: maxTime,
513
- requestedFor: requestedFor,
514
- reasonFilter: reasonFilter,
515
- statusFilter: statusFilter,
516
- resultFilter: resultFilter,
517
- tagFilters: tagFilters && tagFilters.join(","),
518
- properties: properties && properties.join(","),
519
- '$top': top,
520
- continuationToken: continuationToken,
521
- maxBuildsPerDefinition: maxBuildsPerDefinition,
522
- deletedFilter: deletedFilter,
523
- queryOrder: queryOrder,
524
- branchName: branchName,
525
- buildIds: buildIds && buildIds.join(","),
526
- repositoryId: repositoryId,
527
- repositoryType: repositoryType
528
- };
529
-
530
- return this.beginRequest<Response>({
531
- apiVersion: "7.2-preview.7",
532
- routeTemplate: "{project}/_apis/build/builds/{buildId}",
533
- routeValues: {
534
- project: project
535
- },
536
- queryParams: queryValues,
537
- returnRawResponse: true
538
- }).then(async response => {
539
- const body = <WebApi.PagedList<Build.Build>>await response.text().then(deserializeVssJsonObject);
540
- body.continuationToken = response.headers.get("x-ms-continuationtoken");
541
- return body;
542
- });
543
- }
544
-
545
- /**
546
- * Queues a build
547
- *
548
- * @param build -
549
- * @param project - Project ID or project name
550
- * @param ignoreWarnings -
551
- * @param checkInTicket -
552
- * @param sourceBuildId -
553
- * @param definitionId - Optional definition id to queue a build without a body. Ignored if there's a valid body
554
- */
555
- public async queueBuild(
556
- build: Build.Build,
557
- project: string,
558
- ignoreWarnings?: boolean,
559
- checkInTicket?: string,
560
- sourceBuildId?: number,
561
- definitionId?: number
562
- ): Promise<Build.Build> {
563
-
564
- const queryValues: any = {
565
- ignoreWarnings: ignoreWarnings,
566
- checkInTicket: checkInTicket,
567
- sourceBuildId: sourceBuildId,
568
- definitionId: definitionId
569
- };
570
-
571
- return this.beginRequest<Build.Build>({
572
- apiVersion: "7.2-preview.7",
573
- method: "POST",
574
- routeTemplate: "{project}/_apis/build/builds/{buildId}",
575
- routeValues: {
576
- project: project
577
- },
578
- queryParams: queryValues,
579
- body: build
580
- });
581
- }
582
-
583
- /**
584
- * Updates a build.
585
- *
586
- * @param build - The build.
587
- * @param project - Project ID or project name
588
- * @param buildId - The ID of the build.
589
- * @param retry -
590
- */
591
- public async updateBuild(
592
- build: Build.Build,
593
- project: string,
594
- buildId: number,
595
- retry?: boolean
596
- ): Promise<Build.Build> {
597
-
598
- const queryValues: any = {
599
- retry: retry
600
- };
601
-
602
- return this.beginRequest<Build.Build>({
603
- apiVersion: "7.2-preview.7",
604
- method: "PATCH",
605
- routeTemplate: "{project}/_apis/build/builds/{buildId}",
606
- routeValues: {
607
- project: project,
608
- buildId: buildId
609
- },
610
- queryParams: queryValues,
611
- body: build
612
- });
613
- }
614
-
615
- /**
616
- * Updates multiple builds.
617
- *
618
- * @param builds - The builds to update.
619
- * @param project - Project ID or project name
620
- */
621
- public async updateBuilds(
622
- builds: Build.Build[],
623
- project: string
624
- ): Promise<Build.Build[]> {
625
-
626
- return this.beginRequest<Build.Build[]>({
627
- apiVersion: "7.2-preview.7",
628
- method: "PATCH",
629
- routeTemplate: "{project}/_apis/build/builds/{buildId}",
630
- routeValues: {
631
- project: project
632
- },
633
- body: builds
634
- });
635
- }
636
-
637
- /**
638
- * Gets the changes associated with a build
639
- *
640
- * @param project - Project ID or project name
641
- * @param buildId -
642
- * @param continuationToken -
643
- * @param top - The maximum number of changes to return
644
- * @param includeSourceChange -
645
- */
646
- public async getBuildChanges(
647
- project: string,
648
- buildId: number,
649
- continuationToken?: string,
650
- top?: number,
651
- includeSourceChange?: boolean
652
- ): Promise<WebApi.PagedList<Build.Change>> {
653
-
654
- const queryValues: any = {
655
- continuationToken: continuationToken,
656
- '$top': top,
657
- includeSourceChange: includeSourceChange
658
- };
659
-
660
- return this.beginRequest<Response>({
661
- apiVersion: "7.2-preview.2",
662
- routeTemplate: "{project}/_apis/build/builds/{buildId}/changes",
663
- routeValues: {
664
- project: project,
665
- buildId: buildId
666
- },
667
- queryParams: queryValues,
668
- returnRawResponse: true
669
- }).then(async response => {
670
- const body = <WebApi.PagedList<Build.Change>>await response.text().then(deserializeVssJsonObject);
671
- body.continuationToken = response.headers.get("x-ms-continuationtoken");
672
- return body;
673
- });
674
- }
675
-
676
- /**
677
- * Gets the changes made to the repository between two given builds.
678
- *
679
- * @param project - Project ID or project name
680
- * @param fromBuildId - The ID of the first build.
681
- * @param toBuildId - The ID of the last build.
682
- * @param top - The maximum number of changes to return.
683
- */
684
- public async getChangesBetweenBuilds(
685
- project: string,
686
- fromBuildId?: number,
687
- toBuildId?: number,
688
- top?: number
689
- ): Promise<Build.Change[]> {
690
-
691
- const queryValues: any = {
692
- fromBuildId: fromBuildId,
693
- toBuildId: toBuildId,
694
- '$top': top
695
- };
696
-
697
- return this.beginRequest<Build.Change[]>({
698
- apiVersion: "7.2-preview.2",
699
- routeTemplate: "{project}/_apis/build/changes",
700
- routeValues: {
701
- project: project
702
- },
703
- queryParams: queryValues
704
- });
705
- }
706
-
707
- /**
708
- * Gets a controller
709
- *
710
- * @param controllerId -
711
- */
712
- public async getBuildController(
713
- controllerId: number
714
- ): Promise<Build.BuildController> {
715
-
716
- return this.beginRequest<Build.BuildController>({
717
- apiVersion: "7.2-preview.2",
718
- routeTemplate: "_apis/build/Controllers/{controllerId}",
719
- routeValues: {
720
- controllerId: controllerId
721
- }
722
- });
723
- }
724
-
725
- /**
726
- * Gets controller, optionally filtered by name
727
- *
728
- * @param name -
729
- */
730
- public async getBuildControllers(
731
- name?: string
732
- ): Promise<Build.BuildController[]> {
733
-
734
- const queryValues: any = {
735
- name: name
736
- };
737
-
738
- return this.beginRequest<Build.BuildController[]>({
739
- apiVersion: "7.2-preview.2",
740
- routeTemplate: "_apis/build/Controllers/{controllerId}",
741
- queryParams: queryValues
742
- });
743
- }
744
-
745
- /**
746
- * Creates a new definition.
747
- *
748
- * @param definition - The definition.
749
- * @param project - Project ID or project name
750
- * @param definitionToCloneId -
751
- * @param definitionToCloneRevision -
752
- */
753
- public async createDefinition(
754
- definition: Build.BuildDefinition,
755
- project: string,
756
- definitionToCloneId?: number,
757
- definitionToCloneRevision?: number
758
- ): Promise<Build.BuildDefinition> {
759
-
760
- const queryValues: any = {
761
- definitionToCloneId: definitionToCloneId,
762
- definitionToCloneRevision: definitionToCloneRevision
763
- };
764
-
765
- return this.beginRequest<Build.BuildDefinition>({
766
- apiVersion: "7.2-preview.7",
767
- method: "POST",
768
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
769
- routeValues: {
770
- project: project
771
- },
772
- queryParams: queryValues,
773
- body: definition
774
- });
775
- }
776
-
777
- /**
778
- * Deletes a definition and all associated builds.
779
- *
780
- * @param project - Project ID or project name
781
- * @param definitionId - The ID of the definition.
782
- */
783
- public async deleteDefinition(
784
- project: string,
785
- definitionId: number
786
- ): Promise<void> {
787
-
788
- return this.beginRequest<void>({
789
- apiVersion: "7.2-preview.7",
790
- method: "DELETE",
791
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
792
- routeValues: {
793
- project: project,
794
- definitionId: definitionId
795
- }
796
- });
797
- }
798
-
799
- /**
800
- * Gets a definition, optionally at a specific revision.
801
- *
802
- * @param project - Project ID or project name
803
- * @param definitionId - The ID of the definition.
804
- * @param revision - The revision number to retrieve. If this is not specified, the latest version will be returned.
805
- * @param minMetricsTime - If specified, indicates the date from which metrics should be included.
806
- * @param propertyFilters - A comma-delimited list of properties to include in the results.
807
- * @param includeLatestBuilds -
808
- */
809
- public async getDefinition(
810
- project: string,
811
- definitionId: number,
812
- revision?: number,
813
- minMetricsTime?: Date,
814
- propertyFilters?: string[],
815
- includeLatestBuilds?: boolean
816
- ): Promise<Build.BuildDefinition> {
817
-
818
- const queryValues: any = {
819
- revision: revision,
820
- minMetricsTime: minMetricsTime,
821
- propertyFilters: propertyFilters && propertyFilters.join(","),
822
- includeLatestBuilds: includeLatestBuilds
823
- };
824
-
825
- return this.beginRequest<Build.BuildDefinition>({
826
- apiVersion: "7.2-preview.7",
827
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
828
- routeValues: {
829
- project: project,
830
- definitionId: definitionId
831
- },
832
- queryParams: queryValues
833
- });
834
- }
835
-
836
- /**
837
- * Gets a list of definitions.
838
- *
839
- * @param project - Project ID or project name
840
- * @param name - If specified, filters to definitions whose names match this pattern.
841
- * @param repositoryId - A repository ID. If specified, filters to definitions that use this repository.
842
- * @param repositoryType - If specified, filters to definitions that have a repository of this type.
843
- * @param queryOrder - Indicates the order in which definitions should be returned.
844
- * @param top - The maximum number of definitions to return.
845
- * @param continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions.
846
- * @param minMetricsTime - If specified, indicates the date from which metrics should be included.
847
- * @param definitionIds - A comma-delimited list that specifies the IDs of definitions to retrieve.
848
- * @param path - If specified, filters to definitions under this folder.
849
- * @param builtAfter - If specified, filters to definitions that have builds after this date.
850
- * @param notBuiltAfter - If specified, filters to definitions that do not have builds after this date.
851
- * @param includeAllProperties - Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned.
852
- * @param includeLatestBuilds - Indicates whether to return the latest and latest completed builds for this definition.
853
- * @param taskIdFilter - If specified, filters to definitions that use the specified task.
854
- * @param processType - If specified, filters to definitions with the given process type.
855
- * @param yamlFilename - If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true
856
- */
857
- public async getDefinitions(
858
- project: string,
859
- name?: string,
860
- repositoryId?: string,
861
- repositoryType?: string,
862
- queryOrder?: Build.DefinitionQueryOrder,
863
- top?: number,
864
- continuationToken?: string,
865
- minMetricsTime?: Date,
866
- definitionIds?: number[],
867
- path?: string,
868
- builtAfter?: Date,
869
- notBuiltAfter?: Date,
870
- includeAllProperties?: boolean,
871
- includeLatestBuilds?: boolean,
872
- taskIdFilter?: string,
873
- processType?: number,
874
- yamlFilename?: string
875
- ): Promise<WebApi.PagedList<Build.BuildDefinitionReference>> {
876
-
877
- const queryValues: any = {
878
- name: name,
879
- repositoryId: repositoryId,
880
- repositoryType: repositoryType,
881
- queryOrder: queryOrder,
882
- '$top': top,
883
- continuationToken: continuationToken,
884
- minMetricsTime: minMetricsTime,
885
- definitionIds: definitionIds && definitionIds.join(","),
886
- path: path,
887
- builtAfter: builtAfter,
888
- notBuiltAfter: notBuiltAfter,
889
- includeAllProperties: includeAllProperties,
890
- includeLatestBuilds: includeLatestBuilds,
891
- taskIdFilter: taskIdFilter,
892
- processType: processType,
893
- yamlFilename: yamlFilename
894
- };
895
-
896
- return this.beginRequest<Response>({
897
- apiVersion: "7.2-preview.7",
898
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
899
- routeValues: {
900
- project: project
901
- },
902
- queryParams: queryValues,
903
- returnRawResponse: true
904
- }).then(async response => {
905
- const body = <WebApi.PagedList<Build.BuildDefinitionReference>>await response.text().then(deserializeVssJsonObject);
906
- body.continuationToken = response.headers.get("x-ms-continuationtoken");
907
- return body;
908
- });
909
- }
910
-
911
- /**
912
- * Restores a deleted definition
913
- *
914
- * @param project - Project ID or project name
915
- * @param definitionId - The identifier of the definition to restore.
916
- * @param deleted - When false, restores a deleted definition.
917
- */
918
- public async restoreDefinition(
919
- project: string,
920
- definitionId: number,
921
- deleted: boolean
922
- ): Promise<Build.BuildDefinition> {
923
-
924
- const queryValues: any = {
925
- deleted: deleted
926
- };
927
-
928
- return this.beginRequest<Build.BuildDefinition>({
929
- apiVersion: "7.2-preview.7",
930
- method: "PATCH",
931
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
932
- routeValues: {
933
- project: project,
934
- definitionId: definitionId
935
- },
936
- queryParams: queryValues
937
- });
938
- }
939
-
940
- /**
941
- * Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT.
942
- *
943
- * @param definition - The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted.
944
- * @param project - Project ID or project name
945
- * @param definitionId - The ID of the definition.
946
- * @param secretsSourceDefinitionId -
947
- * @param secretsSourceDefinitionRevision -
948
- */
949
- public async updateDefinition(
950
- definition: Build.BuildDefinition,
951
- project: string,
952
- definitionId: number,
953
- secretsSourceDefinitionId?: number,
954
- secretsSourceDefinitionRevision?: number
955
- ): Promise<Build.BuildDefinition> {
956
-
957
- const queryValues: any = {
958
- secretsSourceDefinitionId: secretsSourceDefinitionId,
959
- secretsSourceDefinitionRevision: secretsSourceDefinitionRevision
960
- };
961
-
962
- return this.beginRequest<Build.BuildDefinition>({
963
- apiVersion: "7.2-preview.7",
964
- method: "PUT",
965
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}",
966
- routeValues: {
967
- project: project,
968
- definitionId: definitionId
969
- },
970
- queryParams: queryValues,
971
- body: definition
972
- });
973
- }
974
-
975
- /**
976
- * Gets the contents of a file in the given source code repository.
977
- *
978
- * @param project - Project ID or project name
979
- * @param providerName - The name of the source provider.
980
- * @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
981
- * @param repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
982
- * @param commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved.
983
- * @param path - The path to the file to retrieve, relative to the root of the repository.
984
- */
985
- public async getFileContents(
986
- project: string,
987
- providerName: string,
988
- serviceEndpointId?: string,
989
- repository?: string,
990
- commitOrBranch?: string,
991
- path?: string
992
- ): Promise<string> {
993
-
994
- const queryValues: any = {
995
- serviceEndpointId: serviceEndpointId,
996
- repository: repository,
997
- commitOrBranch: commitOrBranch,
998
- path: path
999
- };
1000
-
1001
- return this.beginRequest<string>({
1002
- apiVersion: "7.2-preview.1",
1003
- httpResponseType: "text/plain",
1004
- routeTemplate: "{project}/_apis/sourceProviders/{providerName}/fileContents",
1005
- routeValues: {
1006
- project: project,
1007
- providerName: providerName
1008
- },
1009
- queryParams: queryValues
1010
- });
1011
- }
1012
-
1013
- /**
1014
- * Creates a new folder.
1015
- *
1016
- * @param folder - The folder.
1017
- * @param project - Project ID or project name
1018
- * @param path - The full path of the folder.
1019
- */
1020
- public async createFolder(
1021
- folder: Build.Folder,
1022
- project: string,
1023
- path: string
1024
- ): Promise<Build.Folder> {
1025
-
1026
- const queryValues: any = {
1027
- path: path
1028
- };
1029
-
1030
- return this.beginRequest<Build.Folder>({
1031
- apiVersion: "7.2-preview.2",
1032
- method: "PUT",
1033
- routeTemplate: "{project}/_apis/build/folders/{*path}",
1034
- routeValues: {
1035
- project: project
1036
- },
1037
- queryParams: queryValues,
1038
- body: folder
1039
- });
1040
- }
1041
-
1042
- /**
1043
- * Deletes a definition folder. Definitions and their corresponding builds will also be deleted.
1044
- *
1045
- * @param project - Project ID or project name
1046
- * @param path - The full path to the folder.
1047
- */
1048
- public async deleteFolder(
1049
- project: string,
1050
- path: string
1051
- ): Promise<void> {
1052
-
1053
- const queryValues: any = {
1054
- path: path
1055
- };
1056
-
1057
- return this.beginRequest<void>({
1058
- apiVersion: "7.2-preview.2",
1059
- method: "DELETE",
1060
- routeTemplate: "{project}/_apis/build/folders/{*path}",
1061
- routeValues: {
1062
- project: project
1063
- },
1064
- queryParams: queryValues
1065
- });
1066
- }
1067
-
1068
- /**
1069
- * Gets a list of build definition folders.
1070
- *
1071
- * @param project - Project ID or project name
1072
- * @param path - The path to start with.
1073
- * @param queryOrder - The order in which folders should be returned.
1074
- */
1075
- public async getFolders(
1076
- project: string,
1077
- path?: string,
1078
- queryOrder?: Build.FolderQueryOrder
1079
- ): Promise<Build.Folder[]> {
1080
-
1081
- const queryValues: any = {
1082
- queryOrder: queryOrder
1083
- };
1084
-
1085
- return this.beginRequest<Build.Folder[]>({
1086
- apiVersion: "7.2-preview.2",
1087
- routeTemplate: "{project}/_apis/build/folders/{*path}",
1088
- routeValues: {
1089
- project: project,
1090
- path: path
1091
- },
1092
- queryParams: queryValues
1093
- });
1094
- }
1095
-
1096
- /**
1097
- * Updates an existing folder at given existing path
1098
- *
1099
- * @param folder - The new version of the folder.
1100
- * @param project - Project ID or project name
1101
- * @param path - The full path to the folder.
1102
- */
1103
- public async updateFolder(
1104
- folder: Build.Folder,
1105
- project: string,
1106
- path: string
1107
- ): Promise<Build.Folder> {
1108
-
1109
- const queryValues: any = {
1110
- path: path
1111
- };
1112
-
1113
- return this.beginRequest<Build.Folder>({
1114
- apiVersion: "7.2-preview.2",
1115
- method: "POST",
1116
- routeTemplate: "{project}/_apis/build/folders/{*path}",
1117
- routeValues: {
1118
- project: project
1119
- },
1120
- queryParams: queryValues,
1121
- body: folder
1122
- });
1123
- }
1124
-
1125
- /**
1126
- * Gets pipeline general settings.
1127
- *
1128
- * @param project - Project ID or project name
1129
- */
1130
- public async getBuildGeneralSettings(
1131
- project: string
1132
- ): Promise<Build.PipelineGeneralSettings> {
1133
-
1134
- return this.beginRequest<Build.PipelineGeneralSettings>({
1135
- apiVersion: "7.2-preview.1",
1136
- routeTemplate: "{project}/_apis/build/generalSettings",
1137
- routeValues: {
1138
- project: project
1139
- }
1140
- });
1141
- }
1142
-
1143
- /**
1144
- * Updates pipeline general settings.
1145
- *
1146
- * @param newSettings -
1147
- * @param project - Project ID or project name
1148
- */
1149
- public async updateBuildGeneralSettings(
1150
- newSettings: Build.PipelineGeneralSettings,
1151
- project: string
1152
- ): Promise<Build.PipelineGeneralSettings> {
1153
-
1154
- return this.beginRequest<Build.PipelineGeneralSettings>({
1155
- apiVersion: "7.2-preview.1",
1156
- method: "PATCH",
1157
- routeTemplate: "{project}/_apis/build/generalSettings",
1158
- routeValues: {
1159
- project: project
1160
- },
1161
- body: newSettings
1162
- });
1163
- }
1164
-
1165
- /**
1166
- * Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline.
1167
- *
1168
- * @param daysToLookback -
1169
- */
1170
- public async getRetentionHistory(
1171
- daysToLookback?: number
1172
- ): Promise<Build.BuildRetentionHistory> {
1173
-
1174
- const queryValues: any = {
1175
- daysToLookback: daysToLookback
1176
- };
1177
-
1178
- return this.beginRequest<Build.BuildRetentionHistory>({
1179
- apiVersion: "7.2-preview.1",
1180
- routeTemplate: "_apis/build/retention/history",
1181
- queryParams: queryValues
1182
- });
1183
- }
1184
-
1185
- /**
1186
- * Gets the latest build for a definition, optionally scoped to a specific branch.
1187
- *
1188
- * @param project - Project ID or project name
1189
- * @param definition - definition name with optional leading folder path, or the definition id
1190
- * @param branchName - optional parameter that indicates the specific branch to use. If not specified, the default branch is used.
1191
- */
1192
- public async getLatestBuild(
1193
- project: string,
1194
- definition: string,
1195
- branchName?: string
1196
- ): Promise<Build.Build> {
1197
-
1198
- const queryValues: any = {
1199
- branchName: branchName
1200
- };
1201
-
1202
- return this.beginRequest<Build.Build>({
1203
- apiVersion: "7.2-preview.1",
1204
- routeTemplate: "{project}/_apis/build/latest/{*definition}",
1205
- routeValues: {
1206
- project: project,
1207
- definition: definition
1208
- },
1209
- queryParams: queryValues
1210
- });
1211
- }
1212
-
1213
- /**
1214
- * Adds new leases for pipeline runs.
1215
- *
1216
- * @param newLeases -
1217
- * @param project - Project ID or project name
1218
- */
1219
- public async addRetentionLeases(
1220
- newLeases: Build.NewRetentionLease[],
1221
- project: string
1222
- ): Promise<Build.RetentionLease[]> {
1223
-
1224
- return this.beginRequest<Build.RetentionLease[]>({
1225
- apiVersion: "7.2-preview.2",
1226
- method: "POST",
1227
- routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1228
- routeValues: {
1229
- project: project
1230
- },
1231
- body: newLeases
1232
- });
1233
- }
1234
-
1235
- /**
1236
- * Removes specific retention leases.
1237
- *
1238
- * @param project - Project ID or project name
1239
- * @param ids -
1240
- */
1241
- public async deleteRetentionLeasesById(
1242
- project: string,
1243
- ids: number[]
1244
- ): Promise<void> {
1245
-
1246
- const queryValues: any = {
1247
- ids: ids && ids.join(",")
1248
- };
1249
-
1250
- return this.beginRequest<void>({
1251
- apiVersion: "7.2-preview.2",
1252
- method: "DELETE",
1253
- routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1254
- routeValues: {
1255
- project: project
1256
- },
1257
- queryParams: queryValues
1258
- });
1259
- }
1260
-
1261
- /**
1262
- * Returns the details of the retention lease given a lease id.
1263
- *
1264
- * @param project - Project ID or project name
1265
- * @param leaseId -
1266
- */
1267
- public async getRetentionLease(
1268
- project: string,
1269
- leaseId: number
1270
- ): Promise<Build.RetentionLease> {
1271
-
1272
- return this.beginRequest<Build.RetentionLease>({
1273
- apiVersion: "7.2-preview.2",
1274
- routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1275
- routeValues: {
1276
- project: project,
1277
- leaseId: leaseId
1278
- }
1279
- });
1280
- }
1281
-
1282
- /**
1283
- * Returns any leases matching the specified MinimalRetentionLeases
1284
- *
1285
- * @param project - Project ID or project name
1286
- * @param leasesToFetch - List of JSON-serialized MinimalRetentionLeases separated by '|'
1287
- */
1288
- public async getRetentionLeasesByMinimalRetentionLeases(
1289
- project: string,
1290
- leasesToFetch: Build.MinimalRetentionLease[]
1291
- ): Promise<Build.RetentionLease[]> {
1292
-
1293
- const queryValues: any = {
1294
- leasesToFetch: leasesToFetch && leasesToFetch.join("|")
1295
- };
1296
-
1297
- return this.beginRequest<Build.RetentionLease[]>({
1298
- apiVersion: "7.2-preview.2",
1299
- routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1300
- routeValues: {
1301
- project: project
1302
- },
1303
- queryParams: queryValues
1304
- });
1305
- }
1306
-
1307
- /**
1308
- * Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run.
1309
- *
1310
- * @param project - Project ID or project name
1311
- * @param ownerId -
1312
- * @param definitionId - An optional parameter to limit the search to a specific pipeline definition.
1313
- * @param runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId.
1314
- */
1315
- public async getRetentionLeasesByOwnerId(
1316
- project: string,
1317
- ownerId?: string,
1318
- definitionId?: number,
1319
- runId?: number
1320
- ): Promise<Build.RetentionLease[]> {
1321
-
1322
- const queryValues: any = {
1323
- ownerId: ownerId,
1324
- definitionId: definitionId,
1325
- runId: runId
1326
- };
1327
-
1328
- return this.beginRequest<Build.RetentionLease[]>({
1329
- apiVersion: "7.2-preview.2",
1330
- routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1331
- routeValues: {
1332
- project: project
1333
- },
1334
- queryParams: queryValues
1335
- });
1336
- }
1337
-
1338
- /**
1339
- * Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run.
1340
- *
1341
- * @param project - Project ID or project name
1342
- * @param userOwnerId - The user id to search for.
1343
- * @param definitionId - An optional parameter to limit the search to a specific pipeline definition.
1344
- * @param runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId.
1345
- */
1346
- public async getRetentionLeasesByUserId(
1347
- project: string,
1348
- userOwnerId: string,
1349
- definitionId?: number,
1350
- runId?: number
1351
- ): Promise<Build.RetentionLease[]> {
1352
-
1353
- const queryValues: any = {
1354
- userOwnerId: userOwnerId,
1355
- definitionId: definitionId,
1356
- runId: runId
1357
- };
1358
-
1359
- return this.beginRequest<Build.RetentionLease[]>({
1360
- apiVersion: "7.2-preview.2",
1361
- routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1362
- routeValues: {
1363
- project: project
1364
- },
1365
- queryParams: queryValues
1366
- });
1367
- }
1368
-
1369
- /**
1370
- * Updates the duration or pipeline protection status of a retention lease.
1371
- *
1372
- * @param leaseUpdate - The new data for the retention lease.
1373
- * @param project - Project ID or project name
1374
- * @param leaseId - The ID of the lease to update.
1375
- */
1376
- public async updateRetentionLease(
1377
- leaseUpdate: Build.RetentionLeaseUpdate,
1378
- project: string,
1379
- leaseId: number
1380
- ): Promise<Build.RetentionLease> {
1381
-
1382
- return this.beginRequest<Build.RetentionLease>({
1383
- apiVersion: "7.2-preview.2",
1384
- method: "PATCH",
1385
- routeTemplate: "{project}/_apis/build/retention/leases/{*leaseId}",
1386
- routeValues: {
1387
- project: project,
1388
- leaseId: leaseId
1389
- },
1390
- body: leaseUpdate
1391
- });
1392
- }
1393
-
1394
- /**
1395
- * Gets an individual log file for a build.
1396
- *
1397
- * @param project - Project ID or project name
1398
- * @param buildId - The ID of the build.
1399
- * @param logId - The ID of the log file.
1400
- * @param startLine - The start line.
1401
- * @param endLine - The end line.
1402
- */
1403
- public async getBuildLog(
1404
- project: string,
1405
- buildId: number,
1406
- logId: number,
1407
- startLine?: number,
1408
- endLine?: number
1409
- ): Promise<string> {
1410
-
1411
- const queryValues: any = {
1412
- startLine: startLine,
1413
- endLine: endLine
1414
- };
1415
-
1416
- return this.beginRequest<string>({
1417
- apiVersion: "7.2-preview.2",
1418
- httpResponseType: "text/plain",
1419
- routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
1420
- routeValues: {
1421
- project: project,
1422
- buildId: buildId,
1423
- logId: logId
1424
- },
1425
- queryParams: queryValues
1426
- });
1427
- }
1428
-
1429
- /**
1430
- * Gets an individual log file for a build.
1431
- *
1432
- * @param project - Project ID or project name
1433
- * @param buildId - The ID of the build.
1434
- * @param logId - The ID of the log file.
1435
- * @param startLine - The start line.
1436
- * @param endLine - The end line.
1437
- */
1438
- public async getBuildLogLines(
1439
- project: string,
1440
- buildId: number,
1441
- logId: number,
1442
- startLine?: number,
1443
- endLine?: number
1444
- ): Promise<string[]> {
1445
-
1446
- const queryValues: any = {
1447
- startLine: startLine,
1448
- endLine: endLine
1449
- };
1450
-
1451
- return this.beginRequest<string[]>({
1452
- apiVersion: "7.2-preview.2",
1453
- routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
1454
- routeValues: {
1455
- project: project,
1456
- buildId: buildId,
1457
- logId: logId
1458
- },
1459
- queryParams: queryValues
1460
- });
1461
- }
1462
-
1463
- /**
1464
- * Gets the logs for a build.
1465
- *
1466
- * @param project - Project ID or project name
1467
- * @param buildId - The ID of the build.
1468
- */
1469
- public async getBuildLogs(
1470
- project: string,
1471
- buildId: number
1472
- ): Promise<Build.BuildLog[]> {
1473
-
1474
- return this.beginRequest<Build.BuildLog[]>({
1475
- apiVersion: "7.2-preview.2",
1476
- routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
1477
- routeValues: {
1478
- project: project,
1479
- buildId: buildId
1480
- }
1481
- });
1482
- }
1483
-
1484
- /**
1485
- * Gets the logs for a build.
1486
- *
1487
- * @param project - Project ID or project name
1488
- * @param buildId - The ID of the build.
1489
- */
1490
- public async getBuildLogsZip(
1491
- project: string,
1492
- buildId: number
1493
- ): Promise<ArrayBuffer> {
1494
-
1495
- return this.beginRequest<ArrayBuffer>({
1496
- apiVersion: "7.2-preview.2",
1497
- httpResponseType: "application/zip",
1498
- routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
1499
- routeValues: {
1500
- project: project,
1501
- buildId: buildId
1502
- }
1503
- });
1504
- }
1505
-
1506
- /**
1507
- * Gets an individual log file for a build.
1508
- *
1509
- * @param project - Project ID or project name
1510
- * @param buildId - The ID of the build.
1511
- * @param logId - The ID of the log file.
1512
- * @param startLine - The start line.
1513
- * @param endLine - The end line.
1514
- */
1515
- public async getBuildLogZip(
1516
- project: string,
1517
- buildId: number,
1518
- logId: number,
1519
- startLine?: number,
1520
- endLine?: number
1521
- ): Promise<ArrayBuffer> {
1522
-
1523
- const queryValues: any = {
1524
- startLine: startLine,
1525
- endLine: endLine
1526
- };
1527
-
1528
- return this.beginRequest<ArrayBuffer>({
1529
- apiVersion: "7.2-preview.2",
1530
- httpResponseType: "application/zip",
1531
- routeTemplate: "{project}/_apis/build/builds/{buildId}/logs/{logId}",
1532
- routeValues: {
1533
- project: project,
1534
- buildId: buildId,
1535
- logId: logId
1536
- },
1537
- queryParams: queryValues
1538
- });
1539
- }
1540
-
1541
- /**
1542
- * Gets build metrics for a project.
1543
- *
1544
- * @param project - Project ID or project name
1545
- * @param metricAggregationType - The aggregation type to use (hourly, daily).
1546
- * @param minMetricsTime - The date from which to calculate metrics.
1547
- */
1548
- public async getProjectMetrics(
1549
- project: string,
1550
- metricAggregationType?: string,
1551
- minMetricsTime?: Date
1552
- ): Promise<Build.BuildMetric[]> {
1553
-
1554
- const queryValues: any = {
1555
- minMetricsTime: minMetricsTime
1556
- };
1557
-
1558
- return this.beginRequest<Build.BuildMetric[]>({
1559
- apiVersion: "7.2-preview.1",
1560
- routeTemplate: "{project}/_apis/build/Metrics/{metricAggregationType}",
1561
- routeValues: {
1562
- project: project,
1563
- metricAggregationType: metricAggregationType
1564
- },
1565
- queryParams: queryValues
1566
- });
1567
- }
1568
-
1569
- /**
1570
- * Gets build metrics for a definition.
1571
- *
1572
- * @param project - Project ID or project name
1573
- * @param definitionId - The ID of the definition.
1574
- * @param minMetricsTime - The date from which to calculate metrics.
1575
- */
1576
- public async getDefinitionMetrics(
1577
- project: string,
1578
- definitionId: number,
1579
- minMetricsTime?: Date
1580
- ): Promise<Build.BuildMetric[]> {
1581
-
1582
- const queryValues: any = {
1583
- minMetricsTime: minMetricsTime
1584
- };
1585
-
1586
- return this.beginRequest<Build.BuildMetric[]>({
1587
- apiVersion: "7.2-preview.1",
1588
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}/Metrics",
1589
- routeValues: {
1590
- project: project,
1591
- definitionId: definitionId
1592
- },
1593
- queryParams: queryValues
1594
- });
1595
- }
1596
-
1597
- /**
1598
- * Gets all build definition options supported by the system.
1599
- *
1600
- * @param project - Project ID or project name
1601
- */
1602
- public async getBuildOptionDefinitions(
1603
- project?: string
1604
- ): Promise<Build.BuildOptionDefinition[]> {
1605
-
1606
- return this.beginRequest<Build.BuildOptionDefinition[]>({
1607
- apiVersion: "7.2-preview.2",
1608
- routeTemplate: "{project}/_apis/build/options",
1609
- routeValues: {
1610
- project: project
1611
- }
1612
- });
1613
- }
1614
-
1615
- /**
1616
- * Gets the contents of a directory in the given source code repository.
1617
- *
1618
- * @param project - Project ID or project name
1619
- * @param providerName - The name of the source provider.
1620
- * @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
1621
- * @param repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories.
1622
- * @param commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved.
1623
- * @param path - The path contents to list, relative to the root of the repository.
1624
- */
1625
- public async getPathContents(
1626
- project: string,
1627
- providerName: string,
1628
- serviceEndpointId?: string,
1629
- repository?: string,
1630
- commitOrBranch?: string,
1631
- path?: string
1632
- ): Promise<Build.SourceRepositoryItem[]> {
1633
-
1634
- const queryValues: any = {
1635
- serviceEndpointId: serviceEndpointId,
1636
- repository: repository,
1637
- commitOrBranch: commitOrBranch,
1638
- path: path
1639
- };
1640
-
1641
- return this.beginRequest<Build.SourceRepositoryItem[]>({
1642
- apiVersion: "7.2-preview.1",
1643
- routeTemplate: "{project}/_apis/sourceProviders/{providerName}/pathContents",
1644
- routeValues: {
1645
- project: project,
1646
- providerName: providerName
1647
- },
1648
- queryParams: queryValues
1649
- });
1650
- }
1651
-
1652
- /**
1653
- * Gets properties for a build.
1654
- *
1655
- * @param project - Project ID or project name
1656
- * @param buildId - The ID of the build.
1657
- * @param filter - A comma-delimited list of properties. If specified, filters to these specific properties.
1658
- */
1659
- public async getBuildProperties(
1660
- project: string,
1661
- buildId: number,
1662
- filter?: string[]
1663
- ): Promise<any> {
1664
-
1665
- const queryValues: any = {
1666
- filter: filter && filter.join(",")
1667
- };
1668
-
1669
- return this.beginRequest<any>({
1670
- apiVersion: "7.2-preview.1",
1671
- routeTemplate: "{project}/_apis/build/builds/{buildId}/properties",
1672
- routeValues: {
1673
- project: project,
1674
- buildId: buildId
1675
- },
1676
- queryParams: queryValues
1677
- });
1678
- }
1679
-
1680
- /**
1681
- * Updates properties for a build.
1682
- *
1683
- * @param document - A json-patch document describing the properties to update.
1684
- * @param project - Project ID or project name
1685
- * @param buildId - The ID of the build.
1686
- */
1687
- public async updateBuildProperties(
1688
- document: WebApi.JsonPatchDocument,
1689
- project: string,
1690
- buildId: number
1691
- ): Promise<any> {
1692
-
1693
- return this.beginRequest<any>({
1694
- apiVersion: "7.2-preview.1",
1695
- method: "PATCH",
1696
- routeTemplate: "{project}/_apis/build/builds/{buildId}/properties",
1697
- routeValues: {
1698
- project: project,
1699
- buildId: buildId
1700
- },
1701
- customHeaders: {
1702
- "Content-Type": "application/json-patch+json",
1703
- },
1704
- body: document
1705
- });
1706
- }
1707
-
1708
- /**
1709
- * Gets properties for a definition.
1710
- *
1711
- * @param project - Project ID or project name
1712
- * @param definitionId - The ID of the definition.
1713
- * @param filter - A comma-delimited list of properties. If specified, filters to these specific properties.
1714
- */
1715
- public async getDefinitionProperties(
1716
- project: string,
1717
- definitionId: number,
1718
- filter?: string[]
1719
- ): Promise<any> {
1720
-
1721
- const queryValues: any = {
1722
- filter: filter && filter.join(",")
1723
- };
1724
-
1725
- return this.beginRequest<any>({
1726
- apiVersion: "7.2-preview.1",
1727
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}/properties",
1728
- routeValues: {
1729
- project: project,
1730
- definitionId: definitionId
1731
- },
1732
- queryParams: queryValues
1733
- });
1734
- }
1735
-
1736
- /**
1737
- * Updates properties for a definition.
1738
- *
1739
- * @param document - A json-patch document describing the properties to update.
1740
- * @param project - Project ID or project name
1741
- * @param definitionId - The ID of the definition.
1742
- */
1743
- public async updateDefinitionProperties(
1744
- document: WebApi.JsonPatchDocument,
1745
- project: string,
1746
- definitionId: number
1747
- ): Promise<any> {
1748
-
1749
- return this.beginRequest<any>({
1750
- apiVersion: "7.2-preview.1",
1751
- method: "PATCH",
1752
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}/properties",
1753
- routeValues: {
1754
- project: project,
1755
- definitionId: definitionId
1756
- },
1757
- customHeaders: {
1758
- "Content-Type": "application/json-patch+json",
1759
- },
1760
- body: document
1761
- });
1762
- }
1763
-
1764
- /**
1765
- * Gets a pull request object from source provider.
1766
- *
1767
- * @param project - Project ID or project name
1768
- * @param providerName - The name of the source provider.
1769
- * @param pullRequestId - Vendor-specific id of the pull request.
1770
- * @param repositoryId - Vendor-specific identifier or the name of the repository that contains the pull request.
1771
- * @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
1772
- */
1773
- public async getPullRequest(
1774
- project: string,
1775
- providerName: string,
1776
- pullRequestId: string,
1777
- repositoryId?: string,
1778
- serviceEndpointId?: string
1779
- ): Promise<Build.PullRequest> {
1780
-
1781
- const queryValues: any = {
1782
- repositoryId: repositoryId,
1783
- serviceEndpointId: serviceEndpointId
1784
- };
1785
-
1786
- return this.beginRequest<Build.PullRequest>({
1787
- apiVersion: "7.2-preview.1",
1788
- routeTemplate: "{project}/_apis/sourceProviders/{providerName}/pullRequests/{pullRequestId}",
1789
- routeValues: {
1790
- project: project,
1791
- providerName: providerName,
1792
- pullRequestId: pullRequestId
1793
- },
1794
- queryParams: queryValues
1795
- });
1796
- }
1797
-
1798
- /**
1799
- * Gets a build report.
1800
- *
1801
- * @param project - Project ID or project name
1802
- * @param buildId - The ID of the build.
1803
- * @param type -
1804
- */
1805
- public async getBuildReport(
1806
- project: string,
1807
- buildId: number,
1808
- type?: string
1809
- ): Promise<Build.BuildReportMetadata> {
1810
-
1811
- const queryValues: any = {
1812
- type: type
1813
- };
1814
-
1815
- return this.beginRequest<Build.BuildReportMetadata>({
1816
- apiVersion: "7.2-preview.2",
1817
- routeTemplate: "{project}/_apis/build/builds/{buildId}/report",
1818
- routeValues: {
1819
- project: project,
1820
- buildId: buildId
1821
- },
1822
- queryParams: queryValues
1823
- });
1824
- }
1825
-
1826
- /**
1827
- * Gets a build report.
1828
- *
1829
- * @param project - Project ID or project name
1830
- * @param buildId - The ID of the build.
1831
- * @param type -
1832
- */
1833
- public async getBuildReportHtmlContent(
1834
- project: string,
1835
- buildId: number,
1836
- type?: string
1837
- ): Promise<any> {
1838
-
1839
- const queryValues: any = {
1840
- type: type
1841
- };
1842
-
1843
- return this.beginRequest<any>({
1844
- apiVersion: "7.2-preview.2",
1845
- httpResponseType: "text/html",
1846
- routeTemplate: "{project}/_apis/build/builds/{buildId}/report",
1847
- routeValues: {
1848
- project: project,
1849
- buildId: buildId
1850
- },
1851
- queryParams: queryValues
1852
- });
1853
- }
1854
-
1855
- /**
1856
- * Gets a list of source code repositories.
1857
- *
1858
- * @param project - Project ID or project name
1859
- * @param providerName - The name of the source provider.
1860
- * @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
1861
- * @param repository - If specified, the vendor-specific identifier or the name of a single repository to get.
1862
- * @param resultSet - 'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set.
1863
- * @param pageResults - If set to true, this will limit the set of results and will return a continuation token to continue the query.
1864
- * @param continuationToken - When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories.
1865
- */
1866
- public async listRepositories(
1867
- project: string,
1868
- providerName: string,
1869
- serviceEndpointId?: string,
1870
- repository?: string,
1871
- resultSet?: Build.ResultSet,
1872
- pageResults?: boolean,
1873
- continuationToken?: string
1874
- ): Promise<Build.SourceRepositories> {
1875
-
1876
- const queryValues: any = {
1877
- serviceEndpointId: serviceEndpointId,
1878
- repository: repository,
1879
- resultSet: resultSet,
1880
- pageResults: pageResults,
1881
- continuationToken: continuationToken
1882
- };
1883
-
1884
- return this.beginRequest<Build.SourceRepositories>({
1885
- apiVersion: "7.2-preview.1",
1886
- routeTemplate: "{project}/_apis/sourceProviders/{providerName}/repositories",
1887
- routeValues: {
1888
- project: project,
1889
- providerName: providerName
1890
- },
1891
- queryParams: queryValues
1892
- });
1893
- }
1894
-
1895
- /**
1896
- * @param resources -
1897
- * @param project - Project ID or project name
1898
- * @param definitionId -
1899
- */
1900
- public async authorizeDefinitionResources(
1901
- resources: Build.DefinitionResourceReference[],
1902
- project: string,
1903
- definitionId: number
1904
- ): Promise<Build.DefinitionResourceReference[]> {
1905
-
1906
- return this.beginRequest<Build.DefinitionResourceReference[]>({
1907
- apiVersion: "7.2-preview.1",
1908
- method: "PATCH",
1909
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}/resources",
1910
- routeValues: {
1911
- project: project,
1912
- definitionId: definitionId
1913
- },
1914
- body: resources
1915
- });
1916
- }
1917
-
1918
- /**
1919
- * @param project - Project ID or project name
1920
- * @param definitionId -
1921
- */
1922
- public async getDefinitionResources(
1923
- project: string,
1924
- definitionId: number
1925
- ): Promise<Build.DefinitionResourceReference[]> {
1926
-
1927
- return this.beginRequest<Build.DefinitionResourceReference[]>({
1928
- apiVersion: "7.2-preview.1",
1929
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}/resources",
1930
- routeValues: {
1931
- project: project,
1932
- definitionId: definitionId
1933
- }
1934
- });
1935
- }
1936
-
1937
- /**
1938
- * Gets information about build resources in the system.
1939
- *
1940
- */
1941
- public async getResourceUsage(
1942
- ): Promise<Build.BuildResourceUsage> {
1943
-
1944
- return this.beginRequest<Build.BuildResourceUsage>({
1945
- apiVersion: "7.2-preview.2",
1946
- routeTemplate: "_apis/build/ResourceUsage"
1947
- });
1948
- }
1949
-
1950
- /**
1951
- * Gets the project's retention settings.
1952
- *
1953
- * @param project - Project ID or project name
1954
- */
1955
- public async getRetentionSettings(
1956
- project: string
1957
- ): Promise<Build.ProjectRetentionSetting> {
1958
-
1959
- return this.beginRequest<Build.ProjectRetentionSetting>({
1960
- apiVersion: "7.2-preview.1",
1961
- routeTemplate: "{project}/_apis/build/retention",
1962
- routeValues: {
1963
- project: project
1964
- }
1965
- });
1966
- }
1967
-
1968
- /**
1969
- * Updates the project's retention settings.
1970
- *
1971
- * @param updateModel -
1972
- * @param project - Project ID or project name
1973
- */
1974
- public async updateRetentionSettings(
1975
- updateModel: Build.UpdateProjectRetentionSettingModel,
1976
- project: string
1977
- ): Promise<Build.ProjectRetentionSetting> {
1978
-
1979
- return this.beginRequest<Build.ProjectRetentionSetting>({
1980
- apiVersion: "7.2-preview.1",
1981
- method: "PATCH",
1982
- routeTemplate: "{project}/_apis/build/retention",
1983
- routeValues: {
1984
- project: project
1985
- },
1986
- body: updateModel
1987
- });
1988
- }
1989
-
1990
- /**
1991
- * Gets all revisions of a definition.
1992
- *
1993
- * @param project - Project ID or project name
1994
- * @param definitionId - The ID of the definition.
1995
- */
1996
- public async getDefinitionRevisions(
1997
- project: string,
1998
- definitionId: number
1999
- ): Promise<Build.BuildDefinitionRevision[]> {
2000
-
2001
- return this.beginRequest<Build.BuildDefinitionRevision[]>({
2002
- apiVersion: "7.2-preview.3",
2003
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}/revisions",
2004
- routeValues: {
2005
- project: project,
2006
- definitionId: definitionId
2007
- }
2008
- });
2009
- }
2010
-
2011
- /**
2012
- * Gets the build settings.
2013
- *
2014
- * @param project - Project ID or project name
2015
- */
2016
- public async getBuildSettings(
2017
- project?: string
2018
- ): Promise<Build.BuildSettings> {
2019
-
2020
- return this.beginRequest<Build.BuildSettings>({
2021
- apiVersion: "7.2-preview.1",
2022
- routeTemplate: "{project}/_apis/build/settings",
2023
- routeValues: {
2024
- project: project
2025
- }
2026
- });
2027
- }
2028
-
2029
- /**
2030
- * Updates the build settings.
2031
- *
2032
- * @param settings - The new settings.
2033
- * @param project - Project ID or project name
2034
- */
2035
- public async updateBuildSettings(
2036
- settings: Build.BuildSettings,
2037
- project?: string
2038
- ): Promise<Build.BuildSettings> {
2039
-
2040
- return this.beginRequest<Build.BuildSettings>({
2041
- apiVersion: "7.2-preview.1",
2042
- method: "PATCH",
2043
- routeTemplate: "{project}/_apis/build/settings",
2044
- routeValues: {
2045
- project: project
2046
- },
2047
- body: settings
2048
- });
2049
- }
2050
-
2051
- /**
2052
- * Get a list of source providers and their capabilities.
2053
- *
2054
- * @param project - Project ID or project name
2055
- */
2056
- public async listSourceProviders(
2057
- project: string
2058
- ): Promise<Build.SourceProviderAttributes[]> {
2059
-
2060
- return this.beginRequest<Build.SourceProviderAttributes[]>({
2061
- apiVersion: "7.2-preview.1",
2062
- routeTemplate: "{project}/_apis/sourceProviders",
2063
- routeValues: {
2064
- project: project
2065
- }
2066
- });
2067
- }
2068
-
2069
- /**
2070
- * Update a build stage
2071
- *
2072
- * @param updateParameters -
2073
- * @param buildId -
2074
- * @param stageRefName -
2075
- * @param project - Project ID or project name
2076
- */
2077
- public async updateStage(
2078
- updateParameters: Build.UpdateStageParameters,
2079
- buildId: number,
2080
- stageRefName: string,
2081
- project?: string
2082
- ): Promise<void> {
2083
-
2084
- return this.beginRequest<void>({
2085
- apiVersion: "7.2-preview.1",
2086
- method: "PATCH",
2087
- routeTemplate: "{project}/_apis/build/builds/{buildId}/stages/{stageRefName}",
2088
- routeValues: {
2089
- project: project,
2090
- buildId: buildId,
2091
- stageRefName: stageRefName
2092
- },
2093
- body: updateParameters
2094
- });
2095
- }
2096
-
2097
- /**
2098
- * \<p\>Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.\</p\> \<p\>If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.\</p\>
2099
- *
2100
- * @param project - Project ID or project name
2101
- * @param definition - Either the definition name with optional leading folder path, or the definition id.
2102
- * @param branchName - Only consider the most recent build for this branch. If not specified, the default branch is used.
2103
- * @param stageName - Use this stage within the pipeline to render the status.
2104
- * @param jobName - Use this job within a stage of the pipeline to render the status.
2105
- * @param configuration - Use this job configuration to render the status
2106
- * @param label - Replaces the default text on the left side of the badge.
2107
- */
2108
- public async getStatusBadge(
2109
- project: string,
2110
- definition: string,
2111
- branchName?: string,
2112
- stageName?: string,
2113
- jobName?: string,
2114
- configuration?: string,
2115
- label?: string
2116
- ): Promise<string> {
2117
-
2118
- const queryValues: any = {
2119
- branchName: branchName,
2120
- stageName: stageName,
2121
- jobName: jobName,
2122
- configuration: configuration,
2123
- label: label
2124
- };
2125
-
2126
- return this.beginRequest<string>({
2127
- apiVersion: "7.2-preview.1",
2128
- routeTemplate: "{project}/_apis/build/status/{*definition}",
2129
- routeValues: {
2130
- project: project,
2131
- definition: definition
2132
- },
2133
- queryParams: queryValues
2134
- });
2135
- }
2136
-
2137
- /**
2138
- * Adds a tag to a build.
2139
- *
2140
- * @param project - Project ID or project name
2141
- * @param buildId - The ID of the build.
2142
- * @param tag - The tag to add.
2143
- */
2144
- public async addBuildTag(
2145
- project: string,
2146
- buildId: number,
2147
- tag: string
2148
- ): Promise<string[]> {
2149
-
2150
- return this.beginRequest<string[]>({
2151
- apiVersion: "7.2-preview.3",
2152
- method: "PUT",
2153
- routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
2154
- routeValues: {
2155
- project: project,
2156
- buildId: buildId,
2157
- tag: tag
2158
- }
2159
- });
2160
- }
2161
-
2162
- /**
2163
- * Adds tags to a build.
2164
- *
2165
- * @param tags - The tags to add. Request body is composed directly from listed tags.
2166
- * @param project - Project ID or project name
2167
- * @param buildId - The ID of the build.
2168
- */
2169
- public async addBuildTags(
2170
- tags: string[],
2171
- project: string,
2172
- buildId: number
2173
- ): Promise<string[]> {
2174
-
2175
- return this.beginRequest<string[]>({
2176
- apiVersion: "7.2-preview.3",
2177
- method: "POST",
2178
- routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
2179
- routeValues: {
2180
- project: project,
2181
- buildId: buildId
2182
- },
2183
- body: tags
2184
- });
2185
- }
2186
-
2187
- /**
2188
- * Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)
2189
- *
2190
- * @param project - Project ID or project name
2191
- * @param buildId - The ID of the build.
2192
- * @param tag - The tag to remove.
2193
- */
2194
- public async deleteBuildTag(
2195
- project: string,
2196
- buildId: number,
2197
- tag: string
2198
- ): Promise<string[]> {
2199
-
2200
- return this.beginRequest<string[]>({
2201
- apiVersion: "7.2-preview.3",
2202
- method: "DELETE",
2203
- routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
2204
- routeValues: {
2205
- project: project,
2206
- buildId: buildId,
2207
- tag: tag
2208
- }
2209
- });
2210
- }
2211
-
2212
- /**
2213
- * Gets the tags for a build.
2214
- *
2215
- * @param project - Project ID or project name
2216
- * @param buildId - The ID of the build.
2217
- */
2218
- public async getBuildTags(
2219
- project: string,
2220
- buildId: number
2221
- ): Promise<string[]> {
2222
-
2223
- return this.beginRequest<string[]>({
2224
- apiVersion: "7.2-preview.3",
2225
- routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
2226
- routeValues: {
2227
- project: project,
2228
- buildId: buildId
2229
- }
2230
- });
2231
- }
2232
-
2233
- /**
2234
- * Adds/Removes tags from a build.
2235
- *
2236
- * @param updateParameters - The tags to add/remove.
2237
- * @param project - Project ID or project name
2238
- * @param buildId - The ID of the build.
2239
- */
2240
- public async updateBuildTags(
2241
- updateParameters: Build.UpdateTagParameters,
2242
- project: string,
2243
- buildId: number
2244
- ): Promise<string[]> {
2245
-
2246
- return this.beginRequest<string[]>({
2247
- apiVersion: "7.2-preview.3",
2248
- method: "PATCH",
2249
- routeTemplate: "{project}/_apis/build/builds/{buildId}/tags/{*tag}",
2250
- routeValues: {
2251
- project: project,
2252
- buildId: buildId
2253
- },
2254
- body: updateParameters
2255
- });
2256
- }
2257
-
2258
- /**
2259
- * Adds a tag to a definition
2260
- *
2261
- * @param project - Project ID or project name
2262
- * @param definitionId - The ID of the definition.
2263
- * @param tag - The tag to add.
2264
- */
2265
- public async addDefinitionTag(
2266
- project: string,
2267
- definitionId: number,
2268
- tag: string
2269
- ): Promise<string[]> {
2270
-
2271
- return this.beginRequest<string[]>({
2272
- apiVersion: "7.2-preview.3",
2273
- method: "PUT",
2274
- routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
2275
- routeValues: {
2276
- project: project,
2277
- definitionId: definitionId,
2278
- tag: tag
2279
- }
2280
- });
2281
- }
2282
-
2283
- /**
2284
- * Adds multiple tags to a definition.
2285
- *
2286
- * @param tags - The tags to add.
2287
- * @param project - Project ID or project name
2288
- * @param definitionId - The ID of the definition.
2289
- */
2290
- public async addDefinitionTags(
2291
- tags: string[],
2292
- project: string,
2293
- definitionId: number
2294
- ): Promise<string[]> {
2295
-
2296
- return this.beginRequest<string[]>({
2297
- apiVersion: "7.2-preview.3",
2298
- method: "POST",
2299
- routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
2300
- routeValues: {
2301
- project: project,
2302
- definitionId: definitionId
2303
- },
2304
- body: tags
2305
- });
2306
- }
2307
-
2308
- /**
2309
- * Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+)
2310
- *
2311
- * @param project - Project ID or project name
2312
- * @param definitionId - The ID of the definition.
2313
- * @param tag - The tag to remove.
2314
- */
2315
- public async deleteDefinitionTag(
2316
- project: string,
2317
- definitionId: number,
2318
- tag: string
2319
- ): Promise<string[]> {
2320
-
2321
- return this.beginRequest<string[]>({
2322
- apiVersion: "7.2-preview.3",
2323
- method: "DELETE",
2324
- routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
2325
- routeValues: {
2326
- project: project,
2327
- definitionId: definitionId,
2328
- tag: tag
2329
- }
2330
- });
2331
- }
2332
-
2333
- /**
2334
- * Gets the tags for a definition.
2335
- *
2336
- * @param project - Project ID or project name
2337
- * @param definitionId - The ID of the definition.
2338
- * @param revision - The definition revision number. If not specified, uses the latest revision of the definition.
2339
- */
2340
- public async getDefinitionTags(
2341
- project: string,
2342
- definitionId: number,
2343
- revision?: number
2344
- ): Promise<string[]> {
2345
-
2346
- const queryValues: any = {
2347
- revision: revision
2348
- };
2349
-
2350
- return this.beginRequest<string[]>({
2351
- apiVersion: "7.2-preview.3",
2352
- routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
2353
- routeValues: {
2354
- project: project,
2355
- definitionId: definitionId
2356
- },
2357
- queryParams: queryValues
2358
- });
2359
- }
2360
-
2361
- /**
2362
- * Adds/Removes tags from a definition.
2363
- *
2364
- * @param updateParameters - The tags to add/remove.
2365
- * @param project - Project ID or project name
2366
- * @param definitionId - The ID of the definition.
2367
- */
2368
- public async updateDefinitionTags(
2369
- updateParameters: Build.UpdateTagParameters,
2370
- project: string,
2371
- definitionId: number
2372
- ): Promise<string[]> {
2373
-
2374
- return this.beginRequest<string[]>({
2375
- apiVersion: "7.2-preview.3",
2376
- method: "PATCH",
2377
- routeTemplate: "{project}/_apis/build/definitions/{DefinitionId}/tags/{*tag}",
2378
- routeValues: {
2379
- project: project,
2380
- definitionId: definitionId
2381
- },
2382
- body: updateParameters
2383
- });
2384
- }
2385
-
2386
- /**
2387
- * Removes a tag from builds, definitions, and from the tag store
2388
- *
2389
- * @param project - Project ID or project name
2390
- * @param tag - The tag to remove.
2391
- */
2392
- public async deleteTag(
2393
- project: string,
2394
- tag: string
2395
- ): Promise<string[]> {
2396
-
2397
- return this.beginRequest<string[]>({
2398
- apiVersion: "7.2-preview.3",
2399
- method: "DELETE",
2400
- routeTemplate: "{project}/_apis/build/tags/{*tag}",
2401
- routeValues: {
2402
- project: project,
2403
- tag: tag
2404
- }
2405
- });
2406
- }
2407
-
2408
- /**
2409
- * Gets a list of all build tags in the project.
2410
- *
2411
- * @param project - Project ID or project name
2412
- */
2413
- public async getTags(
2414
- project: string
2415
- ): Promise<string[]> {
2416
-
2417
- return this.beginRequest<string[]>({
2418
- apiVersion: "7.2-preview.3",
2419
- routeTemplate: "{project}/_apis/build/tags/{*tag}",
2420
- routeValues: {
2421
- project: project
2422
- }
2423
- });
2424
- }
2425
-
2426
- /**
2427
- * Deletes a build definition template.
2428
- *
2429
- * @param project - Project ID or project name
2430
- * @param templateId - The ID of the template.
2431
- */
2432
- public async deleteTemplate(
2433
- project: string,
2434
- templateId: string
2435
- ): Promise<void> {
2436
-
2437
- return this.beginRequest<void>({
2438
- apiVersion: "7.2-preview.3",
2439
- method: "DELETE",
2440
- routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
2441
- routeValues: {
2442
- project: project,
2443
- templateId: templateId
2444
- }
2445
- });
2446
- }
2447
-
2448
- /**
2449
- * Gets a specific build definition template.
2450
- *
2451
- * @param project - Project ID or project name
2452
- * @param templateId - The ID of the requested template.
2453
- */
2454
- public async getTemplate(
2455
- project: string,
2456
- templateId: string
2457
- ): Promise<Build.BuildDefinitionTemplate> {
2458
-
2459
- return this.beginRequest<Build.BuildDefinitionTemplate>({
2460
- apiVersion: "7.2-preview.3",
2461
- routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
2462
- routeValues: {
2463
- project: project,
2464
- templateId: templateId
2465
- }
2466
- });
2467
- }
2468
-
2469
- /**
2470
- * Gets all definition templates.
2471
- *
2472
- * @param project - Project ID or project name
2473
- */
2474
- public async getTemplates(
2475
- project: string
2476
- ): Promise<Build.BuildDefinitionTemplate[]> {
2477
-
2478
- return this.beginRequest<Build.BuildDefinitionTemplate[]>({
2479
- apiVersion: "7.2-preview.3",
2480
- routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
2481
- routeValues: {
2482
- project: project
2483
- }
2484
- });
2485
- }
2486
-
2487
- /**
2488
- * Updates an existing build definition template.
2489
- *
2490
- * @param template - The new version of the template.
2491
- * @param project - Project ID or project name
2492
- * @param templateId - The ID of the template.
2493
- */
2494
- public async saveTemplate(
2495
- template: Build.BuildDefinitionTemplate,
2496
- project: string,
2497
- templateId: string
2498
- ): Promise<Build.BuildDefinitionTemplate> {
2499
-
2500
- return this.beginRequest<Build.BuildDefinitionTemplate>({
2501
- apiVersion: "7.2-preview.3",
2502
- method: "PUT",
2503
- routeTemplate: "{project}/_apis/build/definitions/templates/{templateId}",
2504
- routeValues: {
2505
- project: project,
2506
- templateId: templateId
2507
- },
2508
- body: template
2509
- });
2510
- }
2511
-
2512
- /**
2513
- * Gets details for a build
2514
- *
2515
- * @param project - Project ID or project name
2516
- * @param buildId -
2517
- * @param timelineId -
2518
- * @param changeId -
2519
- * @param planId -
2520
- */
2521
- public async getBuildTimeline(
2522
- project: string,
2523
- buildId: number,
2524
- timelineId?: string,
2525
- changeId?: number,
2526
- planId?: string
2527
- ): Promise<Build.Timeline> {
2528
-
2529
- const queryValues: any = {
2530
- changeId: changeId,
2531
- planId: planId
2532
- };
2533
-
2534
- return this.beginRequest<Build.Timeline>({
2535
- apiVersion: "7.2-preview.3",
2536
- routeTemplate: "{project}/_apis/build/builds/{buildId}/Timeline/{timelineId}",
2537
- routeValues: {
2538
- project: project,
2539
- buildId: buildId,
2540
- timelineId: timelineId
2541
- },
2542
- queryParams: queryValues
2543
- });
2544
- }
2545
-
2546
- /**
2547
- * Recreates the webhooks for the specified triggers in the given source code repository.
2548
- *
2549
- * @param triggerTypes - The types of triggers to restore webhooks for.
2550
- * @param project - Project ID or project name
2551
- * @param providerName - The name of the source provider.
2552
- * @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
2553
- * @param repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.
2554
- */
2555
- public async restoreWebhooks(
2556
- triggerTypes: Build.DefinitionTriggerType[],
2557
- project: string,
2558
- providerName: string,
2559
- serviceEndpointId?: string,
2560
- repository?: string
2561
- ): Promise<void> {
2562
-
2563
- const queryValues: any = {
2564
- serviceEndpointId: serviceEndpointId,
2565
- repository: repository
2566
- };
2567
-
2568
- return this.beginRequest<void>({
2569
- apiVersion: "7.2-preview.1",
2570
- method: "POST",
2571
- routeTemplate: "{project}/_apis/sourceProviders/{providerName}/webhooks",
2572
- routeValues: {
2573
- project: project,
2574
- providerName: providerName
2575
- },
2576
- queryParams: queryValues,
2577
- body: triggerTypes
2578
- });
2579
- }
2580
-
2581
- /**
2582
- * Gets a list of webhooks installed in the given source code repository.
2583
- *
2584
- * @param project - Project ID or project name
2585
- * @param providerName - The name of the source provider.
2586
- * @param serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit.
2587
- * @param repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories.
2588
- */
2589
- public async listWebhooks(
2590
- project: string,
2591
- providerName: string,
2592
- serviceEndpointId?: string,
2593
- repository?: string
2594
- ): Promise<Build.RepositoryWebhook[]> {
2595
-
2596
- const queryValues: any = {
2597
- serviceEndpointId: serviceEndpointId,
2598
- repository: repository
2599
- };
2600
-
2601
- return this.beginRequest<Build.RepositoryWebhook[]>({
2602
- apiVersion: "7.2-preview.1",
2603
- routeTemplate: "{project}/_apis/sourceProviders/{providerName}/webhooks",
2604
- routeValues: {
2605
- project: project,
2606
- providerName: providerName
2607
- },
2608
- queryParams: queryValues
2609
- });
2610
- }
2611
-
2612
- /**
2613
- * Gets the work items associated with a build. Only work items in the same project are returned.
2614
- *
2615
- * @param project - Project ID or project name
2616
- * @param buildId - The ID of the build.
2617
- * @param top - The maximum number of work items to return.
2618
- */
2619
- public async getBuildWorkItemsRefs(
2620
- project: string,
2621
- buildId: number,
2622
- top?: number
2623
- ): Promise<WebApi.ResourceRef[]> {
2624
-
2625
- const queryValues: any = {
2626
- '$top': top
2627
- };
2628
-
2629
- return this.beginRequest<WebApi.ResourceRef[]>({
2630
- apiVersion: "7.2-preview.2",
2631
- routeTemplate: "{project}/_apis/build/builds/{buildId}/workitems",
2632
- routeValues: {
2633
- project: project,
2634
- buildId: buildId
2635
- },
2636
- queryParams: queryValues
2637
- });
2638
- }
2639
-
2640
- /**
2641
- * Gets the work items associated with a build, filtered to specific commits.
2642
- *
2643
- * @param commitIds - A comma-delimited list of commit IDs.
2644
- * @param project - Project ID or project name
2645
- * @param buildId - The ID of the build.
2646
- * @param top - The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified.
2647
- */
2648
- public async getBuildWorkItemsRefsFromCommits(
2649
- commitIds: string[],
2650
- project: string,
2651
- buildId: number,
2652
- top?: number
2653
- ): Promise<WebApi.ResourceRef[]> {
2654
-
2655
- const queryValues: any = {
2656
- '$top': top
2657
- };
2658
-
2659
- return this.beginRequest<WebApi.ResourceRef[]>({
2660
- apiVersion: "7.2-preview.2",
2661
- method: "POST",
2662
- routeTemplate: "{project}/_apis/build/builds/{buildId}/workitems",
2663
- routeValues: {
2664
- project: project,
2665
- buildId: buildId
2666
- },
2667
- queryParams: queryValues,
2668
- body: commitIds
2669
- });
2670
- }
2671
-
2672
- /**
2673
- * Gets all the work items between two builds.
2674
- *
2675
- * @param project - Project ID or project name
2676
- * @param fromBuildId - The ID of the first build.
2677
- * @param toBuildId - The ID of the last build.
2678
- * @param top - The maximum number of work items to return.
2679
- */
2680
- public async getWorkItemsBetweenBuilds(
2681
- project: string,
2682
- fromBuildId: number,
2683
- toBuildId: number,
2684
- top?: number
2685
- ): Promise<WebApi.ResourceRef[]> {
2686
-
2687
- const queryValues: any = {
2688
- fromBuildId: fromBuildId,
2689
- toBuildId: toBuildId,
2690
- '$top': top
2691
- };
2692
-
2693
- return this.beginRequest<WebApi.ResourceRef[]>({
2694
- apiVersion: "7.2-preview.2",
2695
- routeTemplate: "{project}/_apis/build/workitems",
2696
- routeValues: {
2697
- project: project
2698
- },
2699
- queryParams: queryValues
2700
- });
2701
- }
2702
-
2703
- /**
2704
- * Converts a definition to YAML, optionally at a specific revision.
2705
- *
2706
- * @param project - Project ID or project name
2707
- * @param definitionId - The ID of the definition.
2708
- * @param revision - The revision number to retrieve. If this is not specified, the latest version will be returned.
2709
- * @param minMetricsTime - If specified, indicates the date from which metrics should be included.
2710
- * @param propertyFilters - A comma-delimited list of properties to include in the results.
2711
- * @param includeLatestBuilds -
2712
- */
2713
- public async getDefinitionYaml(
2714
- project: string,
2715
- definitionId: number,
2716
- revision?: number,
2717
- minMetricsTime?: Date,
2718
- propertyFilters?: string[],
2719
- includeLatestBuilds?: boolean
2720
- ): Promise<Build.YamlBuild> {
2721
-
2722
- const queryValues: any = {
2723
- revision: revision,
2724
- minMetricsTime: minMetricsTime,
2725
- propertyFilters: propertyFilters && propertyFilters.join(","),
2726
- includeLatestBuilds: includeLatestBuilds
2727
- };
2728
-
2729
- return this.beginRequest<Build.YamlBuild>({
2730
- apiVersion: "7.2-preview.1",
2731
- routeTemplate: "{project}/_apis/build/definitions/{definitionId}/yaml",
2732
- routeValues: {
2733
- project: project,
2734
- definitionId: definitionId
2735
- },
2736
- queryParams: queryValues
2737
- });
2738
- }
2739
-
2740
- }