azure-devops-extension-api 4.269.1 → 5.271.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 (694) hide show
  1. package/Accounts/Accounts.d.ts +126 -126
  2. package/Accounts/Accounts.js +61 -62
  3. package/Accounts/Accounts.min.js +1 -1
  4. package/Accounts/AccountsClient.d.ts +24 -24
  5. package/Accounts/AccountsClient.js +78 -124
  6. package/Accounts/AccountsClient.min.js +1 -1
  7. package/Accounts/index.d.ts +2 -2
  8. package/Accounts/index.js +18 -9
  9. package/Accounts/index.min.js +1 -1
  10. package/AdvancedSecurity.Reporting/Reporting.d.ts +717 -712
  11. package/AdvancedSecurity.Reporting/Reporting.js +203 -204
  12. package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
  13. package/AdvancedSecurity.Reporting/ReportingClient.d.ts +83 -83
  14. package/AdvancedSecurity.Reporting/ReportingClient.js +267 -343
  15. package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -1
  16. package/Alert/Alert.d.ts +1265 -1245
  17. package/Alert/Alert.js +425 -426
  18. package/Alert/Alert.min.js +1 -1
  19. package/Alert/AlertClient.d.ts +184 -159
  20. package/Alert/AlertClient.js +512 -533
  21. package/Alert/AlertClient.min.js +1 -1
  22. package/Build/Build.d.ts +3318 -3292
  23. package/Build/Build.js +613 -607
  24. package/Build/Build.min.js +1 -1
  25. package/Build/BuildClient.d.ts +842 -820
  26. package/Build/BuildClient.js +2319 -2568
  27. package/Build/BuildClient.min.js +1 -1
  28. package/Build/BuildServices.d.ts +32 -32
  29. package/Build/BuildServices.js +13 -14
  30. package/Build/BuildServices.min.js +1 -1
  31. package/Build/index.d.ts +3 -3
  32. package/Build/index.js +19 -10
  33. package/Build/index.min.js +1 -1
  34. package/Comments/Comments.d.ts +309 -309
  35. package/Comments/Comments.js +93 -94
  36. package/Comments/Comments.min.js +1 -1
  37. package/Comments/index.d.ts +1 -1
  38. package/Comments/index.js +17 -8
  39. package/Comments/index.min.js +1 -1
  40. package/Common/Client.d.ts +9 -9
  41. package/Common/Client.js +25 -26
  42. package/Common/Client.min.js +1 -1
  43. package/Common/CommonServices.d.ts +774 -735
  44. package/Common/CommonServices.js +71 -72
  45. package/Common/CommonServices.min.js +1 -1
  46. package/Common/Context.js +2 -0
  47. package/Common/Fetch.d.ts +95 -95
  48. package/Common/Fetch.js +131 -169
  49. package/Common/Fetch.min.js +1 -1
  50. package/Common/RestClientBase.d.ts +96 -96
  51. package/Common/RestClientBase.js +109 -139
  52. package/Common/RestClientBase.min.js +1 -1
  53. package/Common/System.d.ts +30 -30
  54. package/Common/System.js +39 -40
  55. package/Common/System.min.js +1 -1
  56. package/Common/SystemData.d.ts +129 -129
  57. package/Common/SystemData.js +138 -139
  58. package/Common/SystemData.min.js +1 -1
  59. package/Common/Util/Serialization.d.ts +15 -15
  60. package/Common/Util/Serialization.js +51 -53
  61. package/Common/Util/Serialization.min.js +1 -1
  62. package/Common/Util/Url.d.ts +238 -236
  63. package/Common/Util/Url.js +605 -626
  64. package/Common/Util/Url.min.js +1 -1
  65. package/Common/index.d.ts +3 -3
  66. package/Common/index.js +19 -9
  67. package/Common/index.min.js +1 -1
  68. package/Contributions/Contributions.d.ts +694 -694
  69. package/Contributions/Contributions.js +185 -186
  70. package/Contributions/Contributions.min.js +1 -1
  71. package/Contributions/ContributionsClient.d.ts +31 -31
  72. package/Contributions/ContributionsClient.js +99 -147
  73. package/Contributions/ContributionsClient.min.js +1 -1
  74. package/Contributions/index.d.ts +2 -2
  75. package/Contributions/index.js +18 -9
  76. package/Contributions/index.min.js +1 -1
  77. package/Core/Core.d.ts +546 -546
  78. package/Core/Core.js +79 -80
  79. package/Core/Core.min.js +1 -1
  80. package/Core/CoreClient.d.ts +224 -224
  81. package/Core/CoreClient.js +652 -777
  82. package/Core/CoreClient.min.js +1 -1
  83. package/Core/index.d.ts +2 -2
  84. package/Core/index.js +18 -9
  85. package/Core/index.min.js +1 -1
  86. package/Dashboard/Dashboard.d.ts +393 -393
  87. package/Dashboard/Dashboard.js +56 -57
  88. package/Dashboard/Dashboard.min.js +1 -1
  89. package/Dashboard/DashboardClient.d.ts +106 -106
  90. package/Dashboard/DashboardClient.js +317 -393
  91. package/Dashboard/DashboardClient.min.js +1 -1
  92. package/Dashboard/WidgetConfigHelpers.d.ts +34 -34
  93. package/Dashboard/WidgetConfigHelpers.js +41 -45
  94. package/Dashboard/WidgetConfigHelpers.min.js +1 -1
  95. package/Dashboard/WidgetContracts.d.ts +213 -213
  96. package/Dashboard/WidgetContracts.js +24 -25
  97. package/Dashboard/WidgetContracts.min.js +1 -1
  98. package/Dashboard/WidgetHelpers.d.ts +89 -89
  99. package/Dashboard/WidgetHelpers.js +135 -146
  100. package/Dashboard/WidgetHelpers.min.js +1 -1
  101. package/Dashboard/index.d.ts +5 -5
  102. package/Dashboard/index.js +21 -12
  103. package/Dashboard/index.min.js +1 -1
  104. package/DistributedTaskCommon/DistributedTaskCommon.d.ts +103 -103
  105. package/DistributedTaskCommon/DistributedTaskCommon.js +7 -9
  106. package/DistributedTaskCommon/DistributedTaskCommon.min.js +1 -1
  107. package/DistributedTaskCommon/index.d.ts +1 -1
  108. package/DistributedTaskCommon/index.js +17 -4
  109. package/DistributedTaskCommon/index.min.js +1 -1
  110. package/ExtensionManagement/ExtensionManagement.d.ts +1163 -1163
  111. package/ExtensionManagement/ExtensionManagement.js +284 -285
  112. package/ExtensionManagement/ExtensionManagement.min.js +1 -1
  113. package/ExtensionManagement/ExtensionManagementClient.d.ts +191 -191
  114. package/ExtensionManagement/ExtensionManagementClient.js +551 -648
  115. package/ExtensionManagement/ExtensionManagementClient.min.js +1 -1
  116. package/ExtensionManagement/index.d.ts +2 -2
  117. package/ExtensionManagement/index.js +18 -9
  118. package/ExtensionManagement/index.min.js +1 -1
  119. package/Favorite/Favorite.d.ts +124 -124
  120. package/Favorite/Favorite.js +7 -9
  121. package/Favorite/Favorite.min.js +1 -1
  122. package/Favorite/FavoriteClient.d.ts +78 -78
  123. package/Favorite/FavoriteClient.js +247 -314
  124. package/Favorite/FavoriteClient.min.js +1 -1
  125. package/FeatureAvailability/FeatureAvailability.d.ts +13 -13
  126. package/FeatureAvailability/FeatureAvailability.js +7 -9
  127. package/FeatureAvailability/FeatureAvailability.min.js +1 -1
  128. package/FeatureAvailability/FeatureAvailabilityClient.d.ts +45 -45
  129. package/FeatureAvailability/FeatureAvailabilityClient.js +136 -189
  130. package/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -1
  131. package/FeatureAvailability/index.d.ts +2 -2
  132. package/FeatureAvailability/index.js +18 -8
  133. package/FeatureAvailability/index.min.js +1 -1
  134. package/FeatureManagement/FeatureManagement.d.ts +161 -161
  135. package/FeatureManagement/FeatureManagement.js +26 -27
  136. package/FeatureManagement/FeatureManagement.min.js +1 -1
  137. package/FeatureManagement/FeatureManagementClient.d.ts +78 -78
  138. package/FeatureManagement/FeatureManagementClient.js +214 -273
  139. package/FeatureManagement/FeatureManagementClient.min.js +1 -1
  140. package/FeatureManagement/index.d.ts +2 -2
  141. package/FeatureManagement/index.js +18 -9
  142. package/FeatureManagement/index.min.js +1 -1
  143. package/FileContainer/FileContainer.d.ts +193 -193
  144. package/FileContainer/FileContainer.js +58 -59
  145. package/FileContainer/FileContainer.min.js +1 -1
  146. package/FileContainer/FileContainerClient.d.ts +47 -47
  147. package/FileContainer/FileContainerClient.js +132 -182
  148. package/FileContainer/FileContainerClient.min.js +1 -1
  149. package/FileContainer/index.d.ts +2 -2
  150. package/FileContainer/index.js +18 -9
  151. package/FileContainer/index.min.js +1 -1
  152. package/FormInput/FormInput.d.ts +278 -278
  153. package/FormInput/FormInput.js +77 -78
  154. package/FormInput/FormInput.min.js +1 -1
  155. package/FormInput/index.d.ts +1 -1
  156. package/FormInput/index.js +17 -8
  157. package/FormInput/index.min.js +1 -1
  158. package/Gallery/Gallery.d.ts +1911 -1911
  159. package/Gallery/Gallery.js +788 -789
  160. package/Gallery/Gallery.min.js +1 -1
  161. package/Gallery/GalleryClient.d.ts +613 -603
  162. package/Gallery/GalleryClient.js +1884 -2100
  163. package/Gallery/GalleryClient.min.js +1 -1
  164. package/Gallery/index.d.ts +2 -2
  165. package/Gallery/index.js +18 -9
  166. package/Gallery/index.min.js +1 -1
  167. package/Git/CodeEditorTypes.d.ts +305 -305
  168. package/Git/CodeEditorTypes.js +27 -28
  169. package/Git/CodeEditorTypes.min.js +1 -1
  170. package/Git/Git.d.ts +3976 -3888
  171. package/Git/Git.js +830 -817
  172. package/Git/Git.min.js +1 -1
  173. package/Git/GitClient.d.ts +1468 -1454
  174. package/Git/GitClient.js +3892 -4313
  175. package/Git/GitClient.min.js +1 -1
  176. package/Git/GitServices.d.ts +16 -16
  177. package/Git/GitServices.js +10 -11
  178. package/Git/GitServices.min.js +1 -1
  179. package/Git/index.d.ts +4 -4
  180. package/Git/index.js +20 -11
  181. package/Git/index.min.js +1 -1
  182. package/Graph/Graph.d.ts +518 -518
  183. package/Graph/Graph.js +14 -15
  184. package/Graph/Graph.min.js +1 -1
  185. package/Graph/GraphClient.d.ts +261 -261
  186. package/Graph/GraphClient.js +737 -867
  187. package/Graph/GraphClient.min.js +1 -1
  188. package/Graph/index.d.ts +2 -2
  189. package/Graph/index.js +18 -9
  190. package/Graph/index.min.js +1 -1
  191. package/Identities/Identities.d.ts +242 -241
  192. package/Identities/Identities.js +49 -50
  193. package/Identities/Identities.min.js +1 -1
  194. package/Identities/IdentityProvider.d.ts +40 -40
  195. package/Identities/IdentityProvider.js +47 -49
  196. package/Identities/IdentityProvider.min.js +1 -1
  197. package/Identities/IdentityService.d.ts +72 -72
  198. package/Identities/IdentityService.js +13 -14
  199. package/Identities/IdentityService.min.js +1 -1
  200. package/Identities/index.d.ts +3 -3
  201. package/Identities/index.js +19 -10
  202. package/Identities/index.min.js +1 -1
  203. package/Locations/Locations.d.ts +150 -150
  204. package/Locations/Locations.js +28 -29
  205. package/Locations/Locations.min.js +1 -1
  206. package/Locations/LocationsClient.d.ts +65 -65
  207. package/Locations/LocationsClient.js +211 -276
  208. package/Locations/LocationsClient.min.js +1 -1
  209. package/Locations/index.d.ts +2 -2
  210. package/Locations/index.js +18 -9
  211. package/Locations/index.min.js +1 -1
  212. package/Management/Management.d.ts +424 -407
  213. package/Management/Management.js +27 -28
  214. package/Management/Management.min.js +1 -1
  215. package/Management/ManagementClient.d.ts +116 -105
  216. package/Management/ManagementClient.js +349 -398
  217. package/Management/ManagementClient.min.js +1 -1
  218. package/Notification/Notification.d.ts +1387 -1387
  219. package/Notification/Notification.js +385 -386
  220. package/Notification/Notification.min.js +1 -1
  221. package/Notification/NotificationClient.d.ts +149 -149
  222. package/Notification/NotificationClient.js +420 -511
  223. package/Notification/NotificationClient.min.js +1 -1
  224. package/Notification/index.d.ts +2 -2
  225. package/Notification/index.js +18 -9
  226. package/Notification/index.min.js +1 -1
  227. package/Operations/Operations.d.ts +77 -77
  228. package/Operations/Operations.js +38 -39
  229. package/Operations/Operations.min.js +1 -1
  230. package/Operations/OperationsClient.d.ts +13 -13
  231. package/Operations/OperationsClient.js +45 -86
  232. package/Operations/OperationsClient.min.js +1 -1
  233. package/Operations/index.d.ts +2 -2
  234. package/Operations/index.js +18 -9
  235. package/Operations/index.min.js +1 -1
  236. package/Pipelines/Pipelines.d.ts +341 -341
  237. package/Pipelines/Pipelines.js +82 -83
  238. package/Pipelines/Pipelines.min.js +1 -1
  239. package/Pipelines/PipelinesClient.d.ts +92 -92
  240. package/Pipelines/PipelinesClient.js +260 -325
  241. package/Pipelines/PipelinesClient.min.js +1 -1
  242. package/Policy/Policy.d.ts +160 -160
  243. package/Policy/Policy.js +38 -39
  244. package/Policy/Policy.min.js +1 -1
  245. package/Policy/PolicyClient.d.ts +99 -99
  246. package/Policy/PolicyClient.js +274 -346
  247. package/Policy/PolicyClient.min.js +1 -1
  248. package/Policy/index.d.ts +2 -2
  249. package/Policy/index.js +18 -9
  250. package/Policy/index.min.js +1 -1
  251. package/Profile/Profile.d.ts +175 -175
  252. package/Profile/Profile.js +35 -36
  253. package/Profile/Profile.min.js +1 -1
  254. package/Profile/ProfileClient.d.ts +86 -86
  255. package/Profile/ProfileClient.js +277 -347
  256. package/Profile/ProfileClient.min.js +1 -1
  257. package/Profile/index.d.ts +2 -2
  258. package/Profile/index.js +18 -9
  259. package/Profile/index.min.js +1 -1
  260. package/ProjectAnalysis/ProjectAnalysis.d.ts +59 -59
  261. package/ProjectAnalysis/ProjectAnalysis.js +18 -19
  262. package/ProjectAnalysis/ProjectAnalysis.min.js +1 -1
  263. package/ProjectAnalysis/ProjectAnalysisClient.d.ts +34 -34
  264. package/ProjectAnalysis/ProjectAnalysisClient.js +110 -159
  265. package/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -1
  266. package/ProjectAnalysis/index.d.ts +2 -2
  267. package/ProjectAnalysis/index.js +18 -9
  268. package/ProjectAnalysis/index.min.js +1 -1
  269. package/README.md +57 -1
  270. package/Release/Release.d.ts +4068 -4068
  271. package/Release/Release.js +876 -877
  272. package/Release/Release.min.js +1 -1
  273. package/Release/ReleaseClient.d.ts +720 -720
  274. package/Release/ReleaseClient.js +2003 -2273
  275. package/Release/ReleaseClient.min.js +1 -1
  276. package/Release/index.d.ts +2 -2
  277. package/Release/index.js +18 -9
  278. package/Release/index.min.js +1 -1
  279. package/ResourceUsage/ResourceUsage.d.ts +13 -13
  280. package/ResourceUsage/ResourceUsage.js +7 -9
  281. package/ResourceUsage/ResourceUsage.min.js +1 -1
  282. package/ResourceUsage/ResourceUsageClient.d.ts +20 -20
  283. package/ResourceUsage/ResourceUsageClient.js +51 -93
  284. package/ResourceUsage/ResourceUsageClient.min.js +1 -1
  285. package/ServiceEndpoint/ServiceEndpoint.d.ts +894 -894
  286. package/ServiceEndpoint/ServiceEndpoint.js +84 -85
  287. package/ServiceEndpoint/ServiceEndpoint.min.js +1 -1
  288. package/ServiceEndpoint/ServiceEndpointClient.d.ts +190 -190
  289. package/ServiceEndpoint/ServiceEndpointClient.js +556 -669
  290. package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
  291. package/ServiceEndpoint/index.d.ts +2 -2
  292. package/ServiceEndpoint/index.js +18 -9
  293. package/ServiceEndpoint/index.min.js +1 -1
  294. package/ServiceHooks/ServiceHooks.d.ts +758 -758
  295. package/ServiceHooks/ServiceHooks.js +114 -115
  296. package/ServiceHooks/ServiceHooks.min.js +1 -1
  297. package/ServiceHooks/ServiceHooksClient.d.ts +156 -156
  298. package/ServiceHooks/ServiceHooksClient.js +434 -526
  299. package/ServiceHooks/ServiceHooksClient.min.js +1 -1
  300. package/ServiceHooks/index.d.ts +2 -2
  301. package/ServiceHooks/index.js +18 -9
  302. package/ServiceHooks/index.min.js +1 -1
  303. package/TaskAgent/TaskAgent.d.ts +3777 -3764
  304. package/TaskAgent/TaskAgent.js +594 -594
  305. package/TaskAgent/TaskAgent.min.js +1 -1
  306. package/TaskAgent/TaskAgentClient.d.ts +1085 -1073
  307. package/TaskAgent/TaskAgentClient.js +3273 -3731
  308. package/TaskAgent/TaskAgentClient.min.js +1 -1
  309. package/TaskAgent/index.d.ts +2 -2
  310. package/TaskAgent/index.js +18 -9
  311. package/TaskAgent/index.min.js +1 -1
  312. package/Test/Test.d.ts +5918 -5874
  313. package/Test/Test.js +1068 -1069
  314. package/Test/Test.min.js +1 -1
  315. package/Test/TestClient.d.ts +635 -635
  316. package/Test/TestClient.js +1822 -2088
  317. package/Test/TestClient.min.js +1 -1
  318. package/Test/index.d.ts +2 -2
  319. package/Test/index.js +18 -9
  320. package/Test/index.min.js +1 -1
  321. package/TestPlan/TestPlan.d.ts +1616 -1616
  322. package/TestPlan/TestPlan.js +270 -271
  323. package/TestPlan/TestPlan.min.js +1 -1
  324. package/TestPlan/TestPlanClient.d.ts +408 -408
  325. package/TestPlan/TestPlanClient.js +1160 -1387
  326. package/TestPlan/TestPlanClient.min.js +1 -1
  327. package/TestPlan/index.d.ts +2 -2
  328. package/TestPlan/index.js +18 -9
  329. package/TestPlan/index.min.js +1 -1
  330. package/TestResults/TestResults.d.ts +5 -5
  331. package/TestResults/TestResults.js +7 -9
  332. package/TestResults/TestResults.min.js +1 -1
  333. package/TestResults/TestResultsClient.d.ts +1060 -1039
  334. package/TestResults/TestResultsClient.js +3099 -3491
  335. package/TestResults/TestResultsClient.min.js +1 -1
  336. package/TestResults/index.d.ts +2 -2
  337. package/TestResults/index.js +18 -8
  338. package/TestResults/index.min.js +1 -1
  339. package/Tfvc/Tfvc.d.ts +730 -730
  340. package/Tfvc/Tfvc.js +106 -107
  341. package/Tfvc/Tfvc.min.js +1 -1
  342. package/Tfvc/TfvcClient.d.ts +227 -227
  343. package/Tfvc/TfvcClient.js +620 -732
  344. package/Tfvc/TfvcClient.min.js +1 -1
  345. package/Tfvc/index.d.ts +2 -2
  346. package/Tfvc/index.js +18 -9
  347. package/Tfvc/index.min.js +1 -1
  348. package/WebApi/WebApi.d.ts +408 -408
  349. package/WebApi/WebApi.js +55 -56
  350. package/WebApi/WebApi.min.js +1 -1
  351. package/WebApi/index.d.ts +1 -1
  352. package/WebApi/index.js +17 -8
  353. package/WebApi/index.min.js +1 -1
  354. package/Wiki/Wiki.d.ts +328 -328
  355. package/Wiki/Wiki.js +22 -23
  356. package/Wiki/Wiki.min.js +1 -1
  357. package/Wiki/WikiClient.d.ts +218 -218
  358. package/Wiki/WikiClient.js +585 -684
  359. package/Wiki/WikiClient.min.js +1 -1
  360. package/Wiki/index.d.ts +2 -2
  361. package/Wiki/index.js +18 -9
  362. package/Wiki/index.min.js +1 -1
  363. package/Work/Work.d.ts +1298 -1298
  364. package/Work/Work.js +187 -188
  365. package/Work/Work.min.js +1 -1
  366. package/Work/WorkClient.d.ts +421 -421
  367. package/Work/WorkClient.js +1255 -1455
  368. package/Work/WorkClient.min.js +1 -1
  369. package/Work/index.d.ts +2 -2
  370. package/Work/index.js +18 -9
  371. package/Work/index.min.js +1 -1
  372. package/WorkItemTracking/WorkItemTracking.d.ts +2158 -2124
  373. package/WorkItemTracking/WorkItemTracking.js +431 -432
  374. package/WorkItemTracking/WorkItemTracking.min.js +1 -1
  375. package/WorkItemTracking/WorkItemTrackingClient.d.ts +624 -624
  376. package/WorkItemTracking/WorkItemTrackingClient.js +1688 -1918
  377. package/WorkItemTracking/WorkItemTrackingClient.min.js +1 -1
  378. package/WorkItemTracking/WorkItemTrackingServices.d.ts +320 -320
  379. package/WorkItemTracking/WorkItemTrackingServices.js +18 -19
  380. package/WorkItemTracking/WorkItemTrackingServices.min.js +1 -1
  381. package/WorkItemTracking/index.d.ts +3 -3
  382. package/WorkItemTracking/index.js +19 -10
  383. package/WorkItemTracking/index.min.js +1 -1
  384. package/WorkItemTrackingProcess/WorkItemTrackingProcess.d.ts +1238 -1238
  385. package/WorkItemTrackingProcess/WorkItemTrackingProcess.js +299 -300
  386. package/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -1
  387. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.d.ts +462 -462
  388. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +1224 -1386
  389. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -1
  390. package/WorkItemTrackingProcess/index.d.ts +2 -2
  391. package/WorkItemTrackingProcess/index.js +18 -9
  392. package/WorkItemTrackingProcess/index.min.js +1 -1
  393. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.d.ts +575 -575
  394. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.js +96 -97
  395. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.min.js +1 -1
  396. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.d.ts +376 -376
  397. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +991 -1126
  398. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -1
  399. package/WorkItemTrackingProcessDefinitions/index.d.ts +2 -2
  400. package/WorkItemTrackingProcessDefinitions/index.js +18 -9
  401. package/WorkItemTrackingProcessDefinitions/index.min.js +1 -1
  402. package/_manifest/Spdx2xVs3xComparisonToolOutput.json +33 -0
  403. package/_manifest/spdx_2.2/ESRPClientLogs0504231512019.json +1 -0
  404. package/_manifest/spdx_2.2/bsi.cose +0 -0
  405. package/_manifest/spdx_2.2/bsi.json +1 -1
  406. package/_manifest/spdx_2.2/manifest.cat +0 -0
  407. package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
  408. package/_manifest/spdx_2.2/manifest.spdx.json +1 -1
  409. package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -1
  410. package/_manifest/spdx_3.0/manifest.spdx.json +1 -1
  411. package/_manifest/spdx_3.0/manifest.spdx.json.sha256 +1 -1
  412. package/esm/Accounts/Accounts.js +58 -0
  413. package/esm/Accounts/Accounts.min.js +1 -0
  414. package/esm/Accounts/AccountsClient.js +59 -0
  415. package/esm/Accounts/AccountsClient.min.js +1 -0
  416. package/esm/Accounts/index.js +2 -0
  417. package/esm/Accounts/index.min.js +1 -0
  418. package/esm/AdvancedSecurity.Reporting/Reporting.js +200 -0
  419. package/esm/AdvancedSecurity.Reporting/Reporting.min.js +1 -0
  420. package/esm/AdvancedSecurity.Reporting/ReportingClient.js +228 -0
  421. package/esm/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -0
  422. package/esm/Alert/Alert.js +422 -0
  423. package/esm/Alert/Alert.min.js +1 -0
  424. package/esm/Alert/AlertClient.js +457 -0
  425. package/esm/Alert/AlertClient.min.js +1 -0
  426. package/esm/Build/Build.js +610 -0
  427. package/esm/Build/Build.min.js +1 -0
  428. package/esm/Build/BuildClient.js +2108 -0
  429. package/esm/Build/BuildClient.min.js +1 -0
  430. package/esm/Build/BuildServices.js +10 -0
  431. package/esm/Build/BuildServices.min.js +1 -0
  432. package/esm/Build/index.js +3 -0
  433. package/esm/Build/index.min.js +1 -0
  434. package/esm/Comments/Comments.js +90 -0
  435. package/esm/Comments/Comments.min.js +1 -0
  436. package/esm/Comments/index.js +1 -0
  437. package/esm/Comments/index.min.js +1 -0
  438. package/esm/Common/Client.js +22 -0
  439. package/esm/Common/Client.min.js +1 -0
  440. package/esm/Common/CommonServices.js +68 -0
  441. package/esm/Common/CommonServices.min.js +1 -0
  442. package/esm/Common/Context.js +1 -0
  443. package/esm/Common/Fetch.js +117 -0
  444. package/esm/Common/Fetch.min.js +1 -0
  445. package/esm/Common/RestClientBase.js +92 -0
  446. package/esm/Common/RestClientBase.min.js +1 -0
  447. package/esm/Common/System.js +36 -0
  448. package/esm/Common/System.min.js +1 -0
  449. package/esm/Common/SystemData.js +135 -0
  450. package/esm/Common/SystemData.min.js +1 -0
  451. package/esm/Common/Util/Serialization.js +48 -0
  452. package/esm/Common/Util/Serialization.min.js +1 -0
  453. package/esm/Common/Util/Url.js +595 -0
  454. package/esm/Common/Util/Url.min.js +1 -0
  455. package/esm/Common/index.js +3 -0
  456. package/esm/Common/index.min.js +1 -0
  457. package/esm/Contributions/Contributions.js +182 -0
  458. package/esm/Contributions/Contributions.min.js +1 -0
  459. package/esm/Contributions/ContributionsClient.js +78 -0
  460. package/esm/Contributions/ContributionsClient.min.js +1 -0
  461. package/esm/Contributions/index.js +2 -0
  462. package/esm/Contributions/index.min.js +1 -0
  463. package/esm/Core/Core.js +76 -0
  464. package/esm/Core/Core.min.js +1 -0
  465. package/esm/Core/CoreClient.js +573 -0
  466. package/esm/Core/CoreClient.min.js +1 -0
  467. package/esm/Core/index.js +2 -0
  468. package/esm/Core/index.min.js +1 -0
  469. package/esm/Dashboard/Dashboard.js +53 -0
  470. package/esm/Dashboard/Dashboard.min.js +1 -0
  471. package/esm/Dashboard/DashboardClient.js +278 -0
  472. package/esm/Dashboard/DashboardClient.min.js +1 -0
  473. package/esm/Dashboard/WidgetConfigHelpers.js +37 -0
  474. package/esm/Dashboard/WidgetConfigHelpers.min.js +1 -0
  475. package/esm/Dashboard/WidgetContracts.js +21 -0
  476. package/esm/Dashboard/WidgetContracts.min.js +1 -0
  477. package/esm/Dashboard/WidgetHelpers.js +129 -0
  478. package/esm/Dashboard/WidgetHelpers.min.js +1 -0
  479. package/esm/Dashboard/index.js +5 -0
  480. package/esm/Dashboard/index.min.js +1 -0
  481. package/esm/DistributedTaskCommon/DistributedTaskCommon.js +6 -0
  482. package/esm/DistributedTaskCommon/DistributedTaskCommon.min.js +1 -0
  483. package/esm/DistributedTaskCommon/index.js +1 -0
  484. package/esm/DistributedTaskCommon/index.min.js +1 -0
  485. package/esm/ExtensionManagement/ExtensionManagement.js +281 -0
  486. package/esm/ExtensionManagement/ExtensionManagement.min.js +1 -0
  487. package/esm/ExtensionManagement/ExtensionManagementClient.js +486 -0
  488. package/esm/ExtensionManagement/ExtensionManagementClient.min.js +1 -0
  489. package/esm/ExtensionManagement/index.js +2 -0
  490. package/esm/ExtensionManagement/index.min.js +1 -0
  491. package/esm/Favorite/Favorite.js +6 -0
  492. package/esm/Favorite/Favorite.min.js +1 -0
  493. package/esm/Favorite/FavoriteClient.js +214 -0
  494. package/esm/Favorite/FavoriteClient.min.js +1 -0
  495. package/esm/FeatureAvailability/FeatureAvailability.js +6 -0
  496. package/esm/FeatureAvailability/FeatureAvailability.min.js +1 -0
  497. package/esm/FeatureAvailability/FeatureAvailabilityClient.js +113 -0
  498. package/esm/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -0
  499. package/esm/FeatureAvailability/index.js +2 -0
  500. package/esm/FeatureAvailability/index.min.js +1 -0
  501. package/esm/FeatureManagement/FeatureManagement.js +23 -0
  502. package/esm/FeatureManagement/FeatureManagement.min.js +1 -0
  503. package/esm/FeatureManagement/FeatureManagementClient.js +183 -0
  504. package/esm/FeatureManagement/FeatureManagementClient.min.js +1 -0
  505. package/esm/FeatureManagement/index.js +2 -0
  506. package/esm/FeatureManagement/index.min.js +1 -0
  507. package/esm/FileContainer/FileContainer.js +55 -0
  508. package/esm/FileContainer/FileContainer.min.js +1 -0
  509. package/esm/FileContainer/FileContainerClient.js +111 -0
  510. package/esm/FileContainer/FileContainerClient.min.js +1 -0
  511. package/esm/FileContainer/index.js +2 -0
  512. package/esm/FileContainer/index.min.js +1 -0
  513. package/esm/FormInput/FormInput.js +74 -0
  514. package/esm/FormInput/FormInput.min.js +1 -0
  515. package/esm/FormInput/index.js +1 -0
  516. package/esm/FormInput/index.min.js +1 -0
  517. package/esm/Gallery/Gallery.js +785 -0
  518. package/esm/Gallery/Gallery.min.js +1 -0
  519. package/esm/Gallery/GalleryClient.js +1701 -0
  520. package/esm/Gallery/GalleryClient.min.js +1 -0
  521. package/esm/Gallery/index.js +2 -0
  522. package/esm/Gallery/index.min.js +1 -0
  523. package/esm/Git/CodeEditorTypes.js +24 -0
  524. package/esm/Git/CodeEditorTypes.min.js +1 -0
  525. package/esm/Git/Git.js +827 -0
  526. package/esm/Git/Git.min.js +1 -0
  527. package/esm/Git/GitClient.js +3571 -0
  528. package/esm/Git/GitClient.min.js +1 -0
  529. package/esm/Git/GitServices.js +7 -0
  530. package/esm/Git/GitServices.min.js +1 -0
  531. package/esm/Git/index.js +4 -0
  532. package/esm/Git/index.min.js +1 -0
  533. package/esm/Graph/Graph.js +11 -0
  534. package/esm/Graph/Graph.min.js +1 -0
  535. package/esm/Graph/GraphClient.js +644 -0
  536. package/esm/Graph/GraphClient.min.js +1 -0
  537. package/esm/Graph/index.js +2 -0
  538. package/esm/Graph/index.min.js +1 -0
  539. package/esm/Identities/Identities.js +46 -0
  540. package/esm/Identities/Identities.min.js +1 -0
  541. package/esm/Identities/IdentityProvider.js +43 -0
  542. package/esm/Identities/IdentityProvider.min.js +1 -0
  543. package/esm/Identities/IdentityService.js +10 -0
  544. package/esm/Identities/IdentityService.min.js +1 -0
  545. package/esm/Identities/index.js +3 -0
  546. package/esm/Identities/index.min.js +1 -0
  547. package/esm/Locations/Locations.js +25 -0
  548. package/esm/Locations/Locations.min.js +1 -0
  549. package/esm/Locations/LocationsClient.js +178 -0
  550. package/esm/Locations/LocationsClient.min.js +1 -0
  551. package/esm/Locations/index.js +2 -0
  552. package/esm/Locations/index.min.js +1 -0
  553. package/esm/Management/Management.js +24 -0
  554. package/esm/Management/Management.min.js +1 -0
  555. package/esm/Management/ManagementClient.js +302 -0
  556. package/esm/Management/ManagementClient.min.js +1 -0
  557. package/esm/Notification/Notification.js +382 -0
  558. package/esm/Notification/Notification.min.js +1 -0
  559. package/esm/Notification/NotificationClient.js +359 -0
  560. package/esm/Notification/NotificationClient.min.js +1 -0
  561. package/esm/Notification/index.js +2 -0
  562. package/esm/Notification/index.min.js +1 -0
  563. package/esm/Operations/Operations.js +35 -0
  564. package/esm/Operations/Operations.min.js +1 -0
  565. package/esm/Operations/OperationsClient.js +30 -0
  566. package/esm/Operations/OperationsClient.min.js +1 -0
  567. package/esm/Operations/index.js +2 -0
  568. package/esm/Operations/index.min.js +1 -0
  569. package/esm/Pipelines/Pipelines.js +79 -0
  570. package/esm/Pipelines/Pipelines.min.js +1 -0
  571. package/esm/Pipelines/PipelinesClient.js +227 -0
  572. package/esm/Pipelines/PipelinesClient.min.js +1 -0
  573. package/esm/Policy/Policy.js +35 -0
  574. package/esm/Policy/Policy.min.js +1 -0
  575. package/esm/Policy/PolicyClient.js +237 -0
  576. package/esm/Policy/PolicyClient.min.js +1 -0
  577. package/esm/Policy/index.js +2 -0
  578. package/esm/Policy/index.min.js +1 -0
  579. package/esm/Profile/Profile.js +32 -0
  580. package/esm/Profile/Profile.min.js +1 -0
  581. package/esm/Profile/ProfileClient.js +240 -0
  582. package/esm/Profile/ProfileClient.min.js +1 -0
  583. package/esm/Profile/index.js +2 -0
  584. package/esm/Profile/index.min.js +1 -0
  585. package/esm/ProjectAnalysis/ProjectAnalysis.js +15 -0
  586. package/esm/ProjectAnalysis/ProjectAnalysis.min.js +1 -0
  587. package/esm/ProjectAnalysis/ProjectAnalysisClient.js +89 -0
  588. package/esm/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -0
  589. package/esm/ProjectAnalysis/index.js +2 -0
  590. package/esm/ProjectAnalysis/index.min.js +1 -0
  591. package/esm/Release/Release.js +873 -0
  592. package/esm/Release/Release.min.js +1 -0
  593. package/esm/Release/ReleaseClient.js +1816 -0
  594. package/esm/Release/ReleaseClient.min.js +1 -0
  595. package/esm/Release/index.js +2 -0
  596. package/esm/Release/index.min.js +1 -0
  597. package/esm/ResourceUsage/ResourceUsage.js +6 -0
  598. package/esm/ResourceUsage/ResourceUsage.min.js +1 -0
  599. package/esm/ResourceUsage/ResourceUsageClient.js +34 -0
  600. package/esm/ResourceUsage/ResourceUsageClient.min.js +1 -0
  601. package/esm/ServiceEndpoint/ServiceEndpoint.js +81 -0
  602. package/esm/ServiceEndpoint/ServiceEndpoint.min.js +1 -0
  603. package/esm/ServiceEndpoint/ServiceEndpointClient.js +489 -0
  604. package/esm/ServiceEndpoint/ServiceEndpointClient.min.js +1 -0
  605. package/esm/ServiceEndpoint/index.js +2 -0
  606. package/esm/ServiceEndpoint/index.min.js +1 -0
  607. package/esm/ServiceHooks/ServiceHooks.js +111 -0
  608. package/esm/ServiceHooks/ServiceHooks.min.js +1 -0
  609. package/esm/ServiceHooks/ServiceHooksClient.js +375 -0
  610. package/esm/ServiceHooks/ServiceHooksClient.min.js +1 -0
  611. package/esm/ServiceHooks/index.js +2 -0
  612. package/esm/ServiceHooks/index.min.js +1 -0
  613. package/esm/TaskAgent/TaskAgent.js +590 -0
  614. package/esm/TaskAgent/TaskAgent.min.js +1 -0
  615. package/esm/TaskAgent/TaskAgentClient.js +2946 -0
  616. package/esm/TaskAgent/TaskAgentClient.min.js +1 -0
  617. package/esm/TaskAgent/index.js +2 -0
  618. package/esm/TaskAgent/index.min.js +1 -0
  619. package/esm/Test/Test.js +1065 -0
  620. package/esm/Test/Test.min.js +1 -0
  621. package/esm/Test/TestClient.js +1655 -0
  622. package/esm/Test/TestClient.min.js +1 -0
  623. package/esm/Test/index.js +2 -0
  624. package/esm/Test/index.min.js +1 -0
  625. package/esm/TestPlan/TestPlan.js +267 -0
  626. package/esm/TestPlan/TestPlan.min.js +1 -0
  627. package/esm/TestPlan/TestPlanClient.js +1051 -0
  628. package/esm/TestPlan/TestPlanClient.min.js +1 -0
  629. package/esm/TestPlan/index.js +2 -0
  630. package/esm/TestPlan/index.min.js +1 -0
  631. package/esm/TestResults/TestResults.js +6 -0
  632. package/esm/TestResults/TestResults.min.js +1 -0
  633. package/esm/TestResults/TestResultsClient.js +2822 -0
  634. package/esm/TestResults/TestResultsClient.min.js +1 -0
  635. package/esm/TestResults/index.js +2 -0
  636. package/esm/TestResults/index.min.js +1 -0
  637. package/esm/Tfvc/Tfvc.js +103 -0
  638. package/esm/Tfvc/Tfvc.min.js +1 -0
  639. package/esm/Tfvc/TfvcClient.js +559 -0
  640. package/esm/Tfvc/TfvcClient.min.js +1 -0
  641. package/esm/Tfvc/index.js +2 -0
  642. package/esm/Tfvc/index.min.js +1 -0
  643. package/esm/WebApi/WebApi.js +52 -0
  644. package/esm/WebApi/WebApi.min.js +1 -0
  645. package/esm/WebApi/index.js +1 -0
  646. package/esm/WebApi/index.min.js +1 -0
  647. package/esm/Wiki/Wiki.js +19 -0
  648. package/esm/Wiki/Wiki.min.js +1 -0
  649. package/esm/Wiki/WikiClient.js +528 -0
  650. package/esm/Wiki/WikiClient.min.js +1 -0
  651. package/esm/Wiki/index.js +2 -0
  652. package/esm/Wiki/index.min.js +1 -0
  653. package/esm/Work/Work.js +184 -0
  654. package/esm/Work/Work.min.js +1 -0
  655. package/esm/Work/WorkClient.js +1128 -0
  656. package/esm/Work/WorkClient.min.js +1 -0
  657. package/esm/Work/index.js +2 -0
  658. package/esm/Work/index.min.js +1 -0
  659. package/esm/WorkItemTracking/WorkItemTracking.js +428 -0
  660. package/esm/WorkItemTracking/WorkItemTracking.min.js +1 -0
  661. package/esm/WorkItemTracking/WorkItemTrackingClient.js +1525 -0
  662. package/esm/WorkItemTracking/WorkItemTrackingClient.min.js +1 -0
  663. package/esm/WorkItemTracking/WorkItemTrackingServices.js +15 -0
  664. package/esm/WorkItemTracking/WorkItemTrackingServices.min.js +1 -0
  665. package/esm/WorkItemTracking/index.js +3 -0
  666. package/esm/WorkItemTracking/index.min.js +1 -0
  667. package/esm/WorkItemTrackingProcess/WorkItemTrackingProcess.js +296 -0
  668. package/esm/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -0
  669. package/esm/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +1097 -0
  670. package/esm/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -0
  671. package/esm/WorkItemTrackingProcess/index.js +2 -0
  672. package/esm/WorkItemTrackingProcess/index.min.js +1 -0
  673. package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.js +93 -0
  674. package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.min.js +1 -0
  675. package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +886 -0
  676. package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -0
  677. package/esm/WorkItemTrackingProcessDefinitions/index.js +2 -0
  678. package/esm/WorkItemTrackingProcessDefinitions/index.min.js +1 -0
  679. package/esm/index.js +1 -0
  680. package/esm/index.min.js +1 -0
  681. package/index.d.ts +1 -1
  682. package/index.js +17 -8
  683. package/index.min.js +1 -1
  684. package/package.json +232 -37
  685. package/Boards/Boards.d.ts +0 -631
  686. package/Boards/Boards.js +0 -26
  687. package/Boards/Boards.min.js +0 -1
  688. package/Boards/BoardsClient.d.ts +0 -187
  689. package/Boards/BoardsClient.js +0 -589
  690. package/Boards/BoardsClient.min.js +0 -1
  691. package/Boards/index.d.ts +0 -2
  692. package/Boards/index.js +0 -9
  693. package/Boards/index.min.js +0 -1
  694. package/_manifest/spdx_2.2/ESRPClientLogs0305214508957.json +0 -1
@@ -0,0 +1,2822 @@
1
+ /*
2
+ * ---------------------------------------------------------
3
+ * Copyright(C) Microsoft Corporation. All rights reserved.
4
+ * ---------------------------------------------------------
5
+ */
6
+ import { RestClientBase } from "../Common/RestClientBase";
7
+ import { deserializeVssJsonObject } from "../Common/Util/Serialization";
8
+ export class TestResultsRestClient extends RestClientBase {
9
+ constructor(options) {
10
+ super(options);
11
+ }
12
+ /**
13
+ * @param key -
14
+ */
15
+ async getAfdTcmEndpoint(key) {
16
+ const queryValues = {
17
+ key: key
18
+ };
19
+ return this.beginRequest({
20
+ apiVersion: "7.2-preview.1",
21
+ routeTemplate: "_apis/afdtcmendpointlookup",
22
+ queryParams: queryValues
23
+ });
24
+ }
25
+ /**
26
+ * @param attachmentRequestModel -
27
+ * @param project - Project ID or project name
28
+ * @param runId -
29
+ * @param testCaseResultId -
30
+ * @param iterationId -
31
+ * @param actionPath -
32
+ */
33
+ async createTestIterationResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, iterationId, actionPath) {
34
+ const queryValues = {
35
+ iterationId: iterationId,
36
+ actionPath: actionPath
37
+ };
38
+ return this.beginRequest({
39
+ apiVersion: "7.2-preview.1",
40
+ method: "POST",
41
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
42
+ routeValues: {
43
+ project: project,
44
+ runId: runId,
45
+ testCaseResultId: testCaseResultId
46
+ },
47
+ queryParams: queryValues,
48
+ body: attachmentRequestModel
49
+ });
50
+ }
51
+ /**
52
+ * @param attachmentRequestModel -
53
+ * @param project - Project ID or project name
54
+ * @param runId -
55
+ * @param testCaseResultId -
56
+ */
57
+ async createTestResultAttachment(attachmentRequestModel, project, runId, testCaseResultId) {
58
+ return this.beginRequest({
59
+ apiVersion: "7.2-preview.1",
60
+ method: "POST",
61
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
62
+ routeValues: {
63
+ project: project,
64
+ runId: runId,
65
+ testCaseResultId: testCaseResultId
66
+ },
67
+ body: attachmentRequestModel
68
+ });
69
+ }
70
+ /**
71
+ * @param attachmentRequestModel -
72
+ * @param project - Project ID or project name
73
+ * @param runId -
74
+ * @param testCaseResultId -
75
+ * @param testSubResultId -
76
+ */
77
+ async createTestSubResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, testSubResultId) {
78
+ const queryValues = {
79
+ testSubResultId: testSubResultId
80
+ };
81
+ return this.beginRequest({
82
+ apiVersion: "7.2-preview.1",
83
+ method: "POST",
84
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
85
+ routeValues: {
86
+ project: project,
87
+ runId: runId,
88
+ testCaseResultId: testCaseResultId
89
+ },
90
+ queryParams: queryValues,
91
+ body: attachmentRequestModel
92
+ });
93
+ }
94
+ /**
95
+ * @param project - Project ID or project name
96
+ * @param runId -
97
+ * @param testCaseResultId -
98
+ * @param attachmentId -
99
+ */
100
+ async deleteTestResultAttachment(project, runId, testCaseResultId, attachmentId) {
101
+ return this.beginRequest({
102
+ apiVersion: "7.2-preview.1",
103
+ method: "DELETE",
104
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
105
+ routeValues: {
106
+ project: project,
107
+ runId: runId,
108
+ testCaseResultId: testCaseResultId,
109
+ attachmentId: attachmentId
110
+ }
111
+ });
112
+ }
113
+ /**
114
+ * Returns a test iteration attachment
115
+ *
116
+ * @param project - Project ID or project name
117
+ * @param runId -
118
+ * @param testCaseResultId -
119
+ * @param attachmentId -
120
+ * @param iterationId -
121
+ */
122
+ async getTestIterationAttachmentContent(project, runId, testCaseResultId, attachmentId, iterationId) {
123
+ const queryValues = {
124
+ iterationId: iterationId
125
+ };
126
+ return this.beginRequest({
127
+ apiVersion: "7.2-preview.1",
128
+ httpResponseType: "application/octet-stream",
129
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
130
+ routeValues: {
131
+ project: project,
132
+ runId: runId,
133
+ testCaseResultId: testCaseResultId,
134
+ attachmentId: attachmentId
135
+ },
136
+ queryParams: queryValues
137
+ });
138
+ }
139
+ /**
140
+ * Returns a test iteration attachment
141
+ *
142
+ * @param project - Project ID or project name
143
+ * @param runId -
144
+ * @param testCaseResultId -
145
+ * @param attachmentId -
146
+ * @param iterationId -
147
+ */
148
+ async getTestIterationAttachmentZip(project, runId, testCaseResultId, attachmentId, iterationId) {
149
+ const queryValues = {
150
+ iterationId: iterationId
151
+ };
152
+ return this.beginRequest({
153
+ apiVersion: "7.2-preview.1",
154
+ httpResponseType: "application/zip",
155
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
156
+ routeValues: {
157
+ project: project,
158
+ runId: runId,
159
+ testCaseResultId: testCaseResultId,
160
+ attachmentId: attachmentId
161
+ },
162
+ queryParams: queryValues
163
+ });
164
+ }
165
+ /**
166
+ * Returns a test result attachment
167
+ *
168
+ * @param project - Project ID or project name
169
+ * @param runId -
170
+ * @param testCaseResultId -
171
+ * @param attachmentId -
172
+ */
173
+ async getTestResultAttachmentContent(project, runId, testCaseResultId, attachmentId) {
174
+ return this.beginRequest({
175
+ apiVersion: "7.2-preview.1",
176
+ httpResponseType: "application/octet-stream",
177
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
178
+ routeValues: {
179
+ project: project,
180
+ runId: runId,
181
+ testCaseResultId: testCaseResultId,
182
+ attachmentId: attachmentId
183
+ }
184
+ });
185
+ }
186
+ /**
187
+ * @param project - Project ID or project name
188
+ * @param runId -
189
+ * @param testCaseResultId -
190
+ */
191
+ async getTestResultAttachments(project, runId, testCaseResultId) {
192
+ return this.beginRequest({
193
+ apiVersion: "7.2-preview.1",
194
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
195
+ routeValues: {
196
+ project: project,
197
+ runId: runId,
198
+ testCaseResultId: testCaseResultId
199
+ }
200
+ });
201
+ }
202
+ /**
203
+ * Returns a test result attachment
204
+ *
205
+ * @param project - Project ID or project name
206
+ * @param runId -
207
+ * @param testCaseResultId -
208
+ * @param attachmentId -
209
+ */
210
+ async getTestResultAttachmentZip(project, runId, testCaseResultId, attachmentId) {
211
+ return this.beginRequest({
212
+ apiVersion: "7.2-preview.1",
213
+ httpResponseType: "application/zip",
214
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
215
+ routeValues: {
216
+ project: project,
217
+ runId: runId,
218
+ testCaseResultId: testCaseResultId,
219
+ attachmentId: attachmentId
220
+ }
221
+ });
222
+ }
223
+ /**
224
+ * Returns a test sub result attachment
225
+ *
226
+ * @param project - Project ID or project name
227
+ * @param runId -
228
+ * @param testCaseResultId -
229
+ * @param attachmentId -
230
+ * @param testSubResultId -
231
+ */
232
+ async getTestSubResultAttachmentContent(project, runId, testCaseResultId, attachmentId, testSubResultId) {
233
+ const queryValues = {
234
+ testSubResultId: testSubResultId
235
+ };
236
+ return this.beginRequest({
237
+ apiVersion: "7.2-preview.1",
238
+ httpResponseType: "application/octet-stream",
239
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
240
+ routeValues: {
241
+ project: project,
242
+ runId: runId,
243
+ testCaseResultId: testCaseResultId,
244
+ attachmentId: attachmentId
245
+ },
246
+ queryParams: queryValues
247
+ });
248
+ }
249
+ /**
250
+ * Returns attachment references for test sub result.
251
+ *
252
+ * @param project - Project ID or project name
253
+ * @param runId -
254
+ * @param testCaseResultId -
255
+ * @param testSubResultId -
256
+ */
257
+ async getTestSubResultAttachments(project, runId, testCaseResultId, testSubResultId) {
258
+ const queryValues = {
259
+ testSubResultId: testSubResultId
260
+ };
261
+ return this.beginRequest({
262
+ apiVersion: "7.2-preview.1",
263
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
264
+ routeValues: {
265
+ project: project,
266
+ runId: runId,
267
+ testCaseResultId: testCaseResultId
268
+ },
269
+ queryParams: queryValues
270
+ });
271
+ }
272
+ /**
273
+ * Returns a test sub result attachment
274
+ *
275
+ * @param project - Project ID or project name
276
+ * @param runId -
277
+ * @param testCaseResultId -
278
+ * @param attachmentId -
279
+ * @param testSubResultId -
280
+ */
281
+ async getTestSubResultAttachmentZip(project, runId, testCaseResultId, attachmentId, testSubResultId) {
282
+ const queryValues = {
283
+ testSubResultId: testSubResultId
284
+ };
285
+ return this.beginRequest({
286
+ apiVersion: "7.2-preview.1",
287
+ httpResponseType: "application/zip",
288
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/attachments/{attachmentId}",
289
+ routeValues: {
290
+ project: project,
291
+ runId: runId,
292
+ testCaseResultId: testCaseResultId,
293
+ attachmentId: attachmentId
294
+ },
295
+ queryParams: queryValues
296
+ });
297
+ }
298
+ /**
299
+ * @param attachmentRequestModel -
300
+ * @param project - Project ID or project name
301
+ * @param runId -
302
+ */
303
+ async createTestRunAttachment(attachmentRequestModel, project, runId) {
304
+ return this.beginRequest({
305
+ apiVersion: "7.2-preview.1",
306
+ method: "POST",
307
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",
308
+ routeValues: {
309
+ project: project,
310
+ runId: runId
311
+ },
312
+ body: attachmentRequestModel
313
+ });
314
+ }
315
+ /**
316
+ * @param project - Project ID or project name
317
+ * @param runId -
318
+ * @param attachmentId -
319
+ */
320
+ async deleteTestRunAttachment(project, runId, attachmentId) {
321
+ return this.beginRequest({
322
+ apiVersion: "7.2-preview.1",
323
+ method: "DELETE",
324
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",
325
+ routeValues: {
326
+ project: project,
327
+ runId: runId,
328
+ attachmentId: attachmentId
329
+ }
330
+ });
331
+ }
332
+ /**
333
+ * Returns a test run attachment
334
+ *
335
+ * @param project - Project ID or project name
336
+ * @param runId -
337
+ * @param attachmentId -
338
+ */
339
+ async getTestRunAttachmentContent(project, runId, attachmentId) {
340
+ return this.beginRequest({
341
+ apiVersion: "7.2-preview.1",
342
+ httpResponseType: "application/octet-stream",
343
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",
344
+ routeValues: {
345
+ project: project,
346
+ runId: runId,
347
+ attachmentId: attachmentId
348
+ }
349
+ });
350
+ }
351
+ /**
352
+ * @param project - Project ID or project name
353
+ * @param runId -
354
+ */
355
+ async getTestRunAttachments(project, runId) {
356
+ return this.beginRequest({
357
+ apiVersion: "7.2-preview.1",
358
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",
359
+ routeValues: {
360
+ project: project,
361
+ runId: runId
362
+ }
363
+ });
364
+ }
365
+ /**
366
+ * Returns a test run attachment
367
+ *
368
+ * @param project - Project ID or project name
369
+ * @param runId -
370
+ * @param attachmentId -
371
+ */
372
+ async getTestRunAttachmentZip(project, runId, attachmentId) {
373
+ return this.beginRequest({
374
+ apiVersion: "7.2-preview.1",
375
+ httpResponseType: "application/zip",
376
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/attachments/{attachmentId}",
377
+ routeValues: {
378
+ project: project,
379
+ runId: runId,
380
+ attachmentId: attachmentId
381
+ }
382
+ });
383
+ }
384
+ /**
385
+ * @param project - Project ID or project name
386
+ * @param runId -
387
+ * @param testCaseResultId -
388
+ */
389
+ async getBugsLinkedToTestResult(project, runId, testCaseResultId) {
390
+ return this.beginRequest({
391
+ apiVersion: "7.2-preview.1",
392
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/bugs",
393
+ routeValues: {
394
+ project: project,
395
+ runId: runId,
396
+ testCaseResultId: testCaseResultId
397
+ }
398
+ });
399
+ }
400
+ /**
401
+ * @param project - Project ID or project name
402
+ * @param buildId -
403
+ */
404
+ async fetchSourceCodeCoverageReport(project, buildId) {
405
+ const queryValues = {
406
+ buildId: buildId
407
+ };
408
+ return this.beginRequest({
409
+ apiVersion: "7.2-preview.1",
410
+ routeTemplate: "{project}/_apis/testresults/codecoverage/sourceview",
411
+ routeValues: {
412
+ project: project
413
+ },
414
+ queryParams: queryValues
415
+ });
416
+ }
417
+ /**
418
+ * @param project - Project ID or project name
419
+ * @param buildId -
420
+ * @param flags -
421
+ */
422
+ async getBuildCodeCoverage(project, buildId, flags) {
423
+ const queryValues = {
424
+ buildId: buildId,
425
+ flags: flags
426
+ };
427
+ return this.beginRequest({
428
+ apiVersion: "7.2-preview.1",
429
+ routeTemplate: "{project}/_apis/testresults/codecoverage",
430
+ routeValues: {
431
+ project: project
432
+ },
433
+ queryParams: queryValues
434
+ });
435
+ }
436
+ /**
437
+ * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10&deltaBuildId=9 Request: build id and delta build id (optional)
438
+ *
439
+ * @param project - Project ID or project name
440
+ * @param buildId -
441
+ * @param deltaBuildId -
442
+ */
443
+ async getCodeCoverageSummary(project, buildId, deltaBuildId) {
444
+ const queryValues = {
445
+ buildId: buildId,
446
+ deltaBuildId: deltaBuildId
447
+ };
448
+ return this.beginRequest({
449
+ apiVersion: "7.2-preview.1",
450
+ routeTemplate: "{project}/_apis/testresults/codecoverage",
451
+ routeValues: {
452
+ project: project
453
+ },
454
+ queryParams: queryValues
455
+ });
456
+ }
457
+ /**
458
+ * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary
459
+ *
460
+ * @param project - Project ID or project name
461
+ * @param buildId -
462
+ * @param coverageData -
463
+ */
464
+ async updateCodeCoverageSummary(project, buildId, coverageData) {
465
+ const queryValues = {
466
+ buildId: buildId
467
+ };
468
+ return this.beginRequest({
469
+ apiVersion: "7.2-preview.1",
470
+ method: "POST",
471
+ routeTemplate: "{project}/_apis/testresults/codecoverage",
472
+ routeValues: {
473
+ project: project
474
+ },
475
+ queryParams: queryValues,
476
+ body: coverageData
477
+ });
478
+ }
479
+ /**
480
+ * @param project - Project ID or project name
481
+ * @param runId -
482
+ * @param flags -
483
+ */
484
+ async getTestRunCodeCoverage(project, runId, flags) {
485
+ const queryValues = {
486
+ flags: flags
487
+ };
488
+ return this.beginRequest({
489
+ apiVersion: "7.2-preview.1",
490
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/codecoverage",
491
+ routeValues: {
492
+ project: project,
493
+ runId: runId
494
+ },
495
+ queryParams: queryValues
496
+ });
497
+ }
498
+ /**
499
+ * Creates custom test fields based on the data provided.
500
+ *
501
+ * @param newFields - NewFields is an array of type CustomTestFieldDefinition.
502
+ * @param project - Project ID or project name
503
+ */
504
+ async addCustomFields(newFields, project) {
505
+ return this.beginRequest({
506
+ apiVersion: "7.2-preview.1",
507
+ method: "POST",
508
+ routeTemplate: "{project}/_apis/testresults/extensionfields",
509
+ routeValues: {
510
+ project: project
511
+ },
512
+ body: newFields
513
+ });
514
+ }
515
+ /**
516
+ * Returns List of custom test fields for the given custom test field scope.
517
+ *
518
+ * @param project - Project ID or project name
519
+ * @param scopeFilter - Scope of custom test fields which are to be returned.
520
+ */
521
+ async queryCustomFields(project, scopeFilter) {
522
+ const queryValues = {
523
+ scopeFilter: scopeFilter
524
+ };
525
+ return this.beginRequest({
526
+ apiVersion: "7.2-preview.1",
527
+ routeTemplate: "{project}/_apis/testresults/extensionfields",
528
+ routeValues: {
529
+ project: project
530
+ },
531
+ queryParams: queryValues
532
+ });
533
+ }
534
+ /**
535
+ * Returns details of the custom test field for the specified testExtensionFieldId.
536
+ *
537
+ * @param project - Project ID or project name
538
+ * @param testExtensionFieldId - Custom test field id which has to be deleted.
539
+ */
540
+ async deleteCustomFieldById(project, testExtensionFieldId) {
541
+ return this.beginRequest({
542
+ apiVersion: "7.2-preview.1",
543
+ method: "DELETE",
544
+ routeTemplate: "{project}/_apis/testresults/extensionfields/{testExtensionFieldId}",
545
+ routeValues: {
546
+ project: project,
547
+ testExtensionFieldId: testExtensionFieldId
548
+ }
549
+ });
550
+ }
551
+ /**
552
+ * Returns details of the custom test field which is updated.
553
+ *
554
+ * @param updateCustomTestField - Custom test field which has to be updated.
555
+ * @param project - Project ID or project name
556
+ */
557
+ async updateCustomField(updateCustomTestField, project) {
558
+ return this.beginRequest({
559
+ apiVersion: "7.2-preview.1",
560
+ method: "PATCH",
561
+ routeTemplate: "{project}/_apis/testresults/extensionfields/{testExtensionFieldId}",
562
+ routeValues: {
563
+ project: project
564
+ },
565
+ body: updateCustomTestField
566
+ });
567
+ }
568
+ /**
569
+ * Get file coverage for the specified file
570
+ *
571
+ * @param fileCoverageRequest - File details with pull request iteration context
572
+ * @param project - Project ID or project name
573
+ */
574
+ async getFileLevelCodeCoverage(fileCoverageRequest, project) {
575
+ return this.beginRequest({
576
+ apiVersion: "7.2-preview.1",
577
+ method: "POST",
578
+ httpResponseType: "text/plain",
579
+ routeTemplate: "{project}/_apis/testresults/codecoverage/filecoverage",
580
+ routeValues: {
581
+ project: project
582
+ },
583
+ body: fileCoverageRequest
584
+ });
585
+ }
586
+ /**
587
+ * Delete flaky test case reference IDs by branch and repository information
588
+ *
589
+ * @param project - Project ID or project name
590
+ * @param repositoryId - Guid of the repository
591
+ * @param branchInfo - Branch information containing name and type Note: Operations on protected branches such as 'master' or 'main' are not supported.
592
+ */
593
+ async deleteFlakyTestCaseRefIdsByBranch(project, repositoryId, branchInfo) {
594
+ const queryValues = {
595
+ branchInfo: branchInfo
596
+ };
597
+ return this.beginRequest({
598
+ apiVersion: "7.2-preview.1",
599
+ method: "DELETE",
600
+ routeTemplate: "{project}/_apis/testresults/flakytestresults/repositories/{repositoryId}",
601
+ routeValues: {
602
+ project: project,
603
+ repositoryId: repositoryId
604
+ },
605
+ queryParams: queryValues
606
+ });
607
+ }
608
+ /**
609
+ * @param project - Project ID or project name
610
+ * @param repositoryId -
611
+ * @param branchInfo -
612
+ */
613
+ async getFlakyTestCaseRefIdsByBranch(project, repositoryId, branchInfo) {
614
+ const queryValues = {
615
+ branchInfo: branchInfo
616
+ };
617
+ return this.beginRequest({
618
+ apiVersion: "7.2-preview.1",
619
+ routeTemplate: "{project}/_apis/testresults/flakytestresults/repositories/{repositoryId}",
620
+ routeValues: {
621
+ project: project,
622
+ repositoryId: repositoryId
623
+ },
624
+ queryParams: queryValues
625
+ });
626
+ }
627
+ /**
628
+ * @param project - Project ID or project name
629
+ * @param buildDefinitionId -
630
+ * @param minBuildCreatedDate -
631
+ */
632
+ async getFlakyTestResultsByBuildDefinitionId(project, buildDefinitionId, minBuildCreatedDate) {
633
+ const queryValues = {
634
+ buildDefinitionId: buildDefinitionId,
635
+ minBuildCreatedDate: minBuildCreatedDate
636
+ };
637
+ return this.beginRequest({
638
+ apiVersion: "7.2-preview.1",
639
+ routeTemplate: "{project}/_apis/testresults/flakytestresults/builddefinition",
640
+ routeValues: {
641
+ project: project
642
+ },
643
+ queryParams: queryValues
644
+ });
645
+ }
646
+ /**
647
+ * @param project - Project ID or project name
648
+ * @param runId -
649
+ */
650
+ async getFlakyTestResultsByTestRun(project, runId) {
651
+ return this.beginRequest({
652
+ apiVersion: "7.2-preview.1",
653
+ routeTemplate: "{project}/_apis/testresults/flakytestresults/runs/{runId}",
654
+ routeValues: {
655
+ project: project,
656
+ runId: runId
657
+ }
658
+ });
659
+ }
660
+ /**
661
+ * Get list of branches where a test case reference id has flaked
662
+ *
663
+ * @param project - Project ID or project name
664
+ * @param testCaseReferenceId - Reference ID of test used by test result
665
+ */
666
+ async getBranchesByFlakyTestCaseRefId(project, testCaseReferenceId) {
667
+ return this.beginRequest({
668
+ apiVersion: "7.2-preview.1",
669
+ routeTemplate: "{project}/_apis/testresults/flakytestresults/testcasereference/{testCaseReferenceId}",
670
+ routeValues: {
671
+ project: project,
672
+ testCaseReferenceId: testCaseReferenceId
673
+ }
674
+ });
675
+ }
676
+ /**
677
+ * @param filter -
678
+ * @param project - Project ID or project name
679
+ */
680
+ async queryTestResultHistory(filter, project) {
681
+ return this.beginRequest({
682
+ apiVersion: "7.2-preview.1",
683
+ method: "POST",
684
+ routeTemplate: "{project}/_apis/testresults/results/History",
685
+ routeValues: {
686
+ project: project
687
+ },
688
+ body: filter
689
+ });
690
+ }
691
+ /**
692
+ * Get test run message logs
693
+ *
694
+ * @param project - Project ID or project name
695
+ * @param runId - ID of the run to get.
696
+ */
697
+ async getTestRunMessageLogs(project, runId) {
698
+ return this.beginRequest({
699
+ apiVersion: "7.2-preview.1",
700
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/MessageLogs",
701
+ routeValues: {
702
+ project: project,
703
+ runId: runId
704
+ }
705
+ });
706
+ }
707
+ /**
708
+ * Get summary of test results.
709
+ *
710
+ * @param project - Project ID or project name
711
+ * @param pipelineId - Pipeline Id. This is same as build Id.
712
+ * @param stageName - Name of the stage. Maximum supported length for name is 256 character.
713
+ * @param phaseName - Name of the phase. Maximum supported length for name is 256 character.
714
+ * @param jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
715
+ * @param metricNames -
716
+ * @param groupByNode - Group summary for each node of the pipleine heirarchy
717
+ */
718
+ async getTestPipelineMetrics(project, pipelineId, stageName, phaseName, jobName, metricNames, groupByNode) {
719
+ const queryValues = {
720
+ pipelineId: pipelineId,
721
+ stageName: stageName,
722
+ phaseName: phaseName,
723
+ jobName: jobName,
724
+ metricNames: metricNames && metricNames.join(","),
725
+ groupByNode: groupByNode
726
+ };
727
+ return this.beginRequest({
728
+ apiVersion: "7.2-preview.1",
729
+ routeTemplate: "{project}/_apis/testresults/metrics",
730
+ routeValues: {
731
+ project: project
732
+ },
733
+ queryParams: queryValues
734
+ });
735
+ }
736
+ /**
737
+ * Retrieves the AI analysis result for a given build. Downloads the analysis JSON from the TCM Log Store (Azure Blob Storage) where it was uploaded by PipelineDebuggerJob upon completion.
738
+ *
739
+ * @param project - Project ID or project name
740
+ * @param buildId - Build ID that was analyzed
741
+ */
742
+ async getAnalysisResult(project, buildId) {
743
+ return this.beginRequest({
744
+ apiVersion: "7.2-preview.1",
745
+ routeTemplate: "{project}/_apis/testresults/pipelinedebugger/analysisresult/build/{buildId}",
746
+ routeValues: {
747
+ project: project,
748
+ buildId: buildId
749
+ }
750
+ });
751
+ }
752
+ /**
753
+ * Queues a pipeline analysis job to analyze failed pipeline jobs using AI.
754
+ *
755
+ * @param project - Project ID or project name
756
+ * @param buildId - Build ID to analyze
757
+ */
758
+ async queueAnalysisJob(project, buildId) {
759
+ return this.beginRequest({
760
+ apiVersion: "7.2-preview.1",
761
+ method: "POST",
762
+ routeTemplate: "{project}/_apis/testresults/pipelinedebugger/build/{buildId}",
763
+ routeValues: {
764
+ project: project,
765
+ buildId: buildId
766
+ }
767
+ });
768
+ }
769
+ /**
770
+ * @param project - Project ID or project name
771
+ * @param buildId -
772
+ * @param publishContext -
773
+ * @param groupBy -
774
+ * @param filter -
775
+ * @param orderby -
776
+ * @param shouldIncludeResults -
777
+ * @param queryRunSummaryForInProgress -
778
+ */
779
+ async getTestResultDetailsForBuild(project, buildId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) {
780
+ const queryValues = {
781
+ buildId: buildId,
782
+ publishContext: publishContext,
783
+ groupBy: groupBy,
784
+ '$filter': filter,
785
+ '$orderby': orderby,
786
+ shouldIncludeResults: shouldIncludeResults,
787
+ queryRunSummaryForInProgress: queryRunSummaryForInProgress
788
+ };
789
+ return this.beginRequest({
790
+ apiVersion: "7.2-preview.1",
791
+ routeTemplate: "{project}/_apis/testresults/resultdetailsbybuild",
792
+ routeValues: {
793
+ project: project
794
+ },
795
+ queryParams: queryValues
796
+ });
797
+ }
798
+ /**
799
+ * @param project - Project ID or project name
800
+ * @param releaseId -
801
+ * @param releaseEnvId -
802
+ * @param publishContext -
803
+ * @param groupBy -
804
+ * @param filter -
805
+ * @param orderby -
806
+ * @param shouldIncludeResults -
807
+ * @param queryRunSummaryForInProgress -
808
+ */
809
+ async getTestResultDetailsForRelease(project, releaseId, releaseEnvId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) {
810
+ const queryValues = {
811
+ releaseId: releaseId,
812
+ releaseEnvId: releaseEnvId,
813
+ publishContext: publishContext,
814
+ groupBy: groupBy,
815
+ '$filter': filter,
816
+ '$orderby': orderby,
817
+ shouldIncludeResults: shouldIncludeResults,
818
+ queryRunSummaryForInProgress: queryRunSummaryForInProgress
819
+ };
820
+ return this.beginRequest({
821
+ apiVersion: "7.2-preview.1",
822
+ routeTemplate: "{project}/_apis/testresults/resultdetailsbyrelease",
823
+ routeValues: {
824
+ project: project
825
+ },
826
+ queryParams: queryValues
827
+ });
828
+ }
829
+ /**
830
+ * @param document -
831
+ * @param project - Project ID or project name
832
+ * @param runId -
833
+ */
834
+ async publishTestResultDocument(document, project, runId) {
835
+ return this.beginRequest({
836
+ apiVersion: "7.2-preview.1",
837
+ method: "POST",
838
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/ResultDocument",
839
+ routeValues: {
840
+ project: project,
841
+ runId: runId
842
+ },
843
+ body: document
844
+ });
845
+ }
846
+ /**
847
+ * @param project - Project ID or project name
848
+ * @param buildId -
849
+ * @param publishContext -
850
+ * @param fields -
851
+ * @param continuationToken -
852
+ */
853
+ async getResultGroupsByBuild(project, buildId, publishContext, fields, continuationToken) {
854
+ const queryValues = {
855
+ buildId: buildId,
856
+ publishContext: publishContext,
857
+ fields: fields && fields.join(","),
858
+ continuationToken: continuationToken
859
+ };
860
+ return this.beginRequest({
861
+ apiVersion: "7.2-preview.1",
862
+ routeTemplate: "{project}/_apis/testresults/resultgroupsbybuild",
863
+ routeValues: {
864
+ project: project
865
+ },
866
+ queryParams: queryValues,
867
+ returnRawResponse: true
868
+ }).then(async (response) => {
869
+ const body = await response.text().then(deserializeVssJsonObject);
870
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
871
+ return body;
872
+ });
873
+ }
874
+ /**
875
+ * @param project - Project ID or project name
876
+ * @param releaseId -
877
+ * @param publishContext -
878
+ * @param releaseEnvId -
879
+ * @param fields -
880
+ * @param continuationToken -
881
+ */
882
+ async getResultGroupsByRelease(project, releaseId, publishContext, releaseEnvId, fields, continuationToken) {
883
+ const queryValues = {
884
+ releaseId: releaseId,
885
+ publishContext: publishContext,
886
+ releaseEnvId: releaseEnvId,
887
+ fields: fields && fields.join(","),
888
+ continuationToken: continuationToken
889
+ };
890
+ return this.beginRequest({
891
+ apiVersion: "7.2-preview.1",
892
+ routeTemplate: "{project}/_apis/testresults/resultgroupsbyrelease",
893
+ routeValues: {
894
+ project: project
895
+ },
896
+ queryParams: queryValues,
897
+ returnRawResponse: true
898
+ }).then(async (response) => {
899
+ const body = await response.text().then(deserializeVssJsonObject);
900
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
901
+ return body;
902
+ });
903
+ }
904
+ /**
905
+ * Get list of test Result meta data details for corresponding testcasereferenceId
906
+ *
907
+ * @param testCaseReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200).
908
+ * @param project - Project ID or project name
909
+ * @param detailsToInclude - Details to include with test results metadata. Default is None. Other values are FlakyIdentifiers.
910
+ */
911
+ async queryTestResultsMetaData(testCaseReferenceIds, project, detailsToInclude) {
912
+ const queryValues = {
913
+ detailsToInclude: detailsToInclude
914
+ };
915
+ return this.beginRequest({
916
+ apiVersion: "7.2-preview.4",
917
+ method: "POST",
918
+ routeTemplate: "{project}/_apis/testresults/results/ResultMetaData/{testCaseReferenceId}",
919
+ routeValues: {
920
+ project: project
921
+ },
922
+ queryParams: queryValues,
923
+ body: testCaseReferenceIds
924
+ });
925
+ }
926
+ /**
927
+ * Update properties of test result meta data
928
+ *
929
+ * @param testResultMetaDataUpdateInput - TestResultMetaData update input TestResultMetaDataUpdateInput
930
+ * @param project - Project ID or project name
931
+ * @param testCaseReferenceId - TestCaseReference Id of Test Result to be updated.
932
+ */
933
+ async updateTestResultsMetaData(testResultMetaDataUpdateInput, project, testCaseReferenceId) {
934
+ return this.beginRequest({
935
+ apiVersion: "7.2-preview.4",
936
+ method: "PATCH",
937
+ routeTemplate: "{project}/_apis/testresults/results/ResultMetaData/{testCaseReferenceId}",
938
+ routeValues: {
939
+ project: project,
940
+ testCaseReferenceId: testCaseReferenceId
941
+ },
942
+ body: testResultMetaDataUpdateInput
943
+ });
944
+ }
945
+ /**
946
+ * @param query -
947
+ * @param project - Project ID or project name
948
+ */
949
+ async getTestResultsByQuery(query, project) {
950
+ return this.beginRequest({
951
+ apiVersion: "7.2-preview.2",
952
+ method: "POST",
953
+ routeTemplate: "{project}/_apis/testresults/results",
954
+ routeValues: {
955
+ project: project
956
+ },
957
+ body: query
958
+ });
959
+ }
960
+ /**
961
+ * @param queryModel -
962
+ * @param project - Project ID or project name
963
+ * @param includeResultDetails -
964
+ * @param includeIterationDetails -
965
+ * @param skip -
966
+ * @param top -
967
+ */
968
+ async getTestResultsByQueryWiql(queryModel, project, includeResultDetails, includeIterationDetails, skip, top) {
969
+ const queryValues = {
970
+ includeResultDetails: includeResultDetails,
971
+ includeIterationDetails: includeIterationDetails,
972
+ '$skip': skip,
973
+ '$top': top
974
+ };
975
+ return this.beginRequest({
976
+ apiVersion: "7.2-preview.2",
977
+ method: "POST",
978
+ routeTemplate: "{project}/_apis/testresults/results/query",
979
+ routeValues: {
980
+ project: project
981
+ },
982
+ queryParams: queryValues,
983
+ body: queryModel
984
+ });
985
+ }
986
+ /**
987
+ * @param results -
988
+ * @param project - Project ID or project name
989
+ * @param runId -
990
+ */
991
+ async addTestResultsToTestRun(results, project, runId) {
992
+ return this.beginRequest({
993
+ apiVersion: "7.2-preview.2",
994
+ method: "POST",
995
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testResultId}",
996
+ routeValues: {
997
+ project: project,
998
+ runId: runId
999
+ },
1000
+ body: results
1001
+ });
1002
+ }
1003
+ /**
1004
+ * @param project - Project ID or project name
1005
+ * @param runId -
1006
+ * @param testResultId -
1007
+ * @param detailsToInclude -
1008
+ */
1009
+ async getTestResultById(project, runId, testResultId, detailsToInclude) {
1010
+ const queryValues = {
1011
+ detailsToInclude: detailsToInclude
1012
+ };
1013
+ return this.beginRequest({
1014
+ apiVersion: "7.2-preview.2",
1015
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testResultId}",
1016
+ routeValues: {
1017
+ project: project,
1018
+ runId: runId,
1019
+ testResultId: testResultId
1020
+ },
1021
+ queryParams: queryValues
1022
+ });
1023
+ }
1024
+ /**
1025
+ * @param project - Project ID or project name
1026
+ * @param runId -
1027
+ * @param detailsToInclude -
1028
+ * @param skip -
1029
+ * @param top -
1030
+ * @param outcomes -
1031
+ * @param newTestsOnly -
1032
+ */
1033
+ async getTestResults(project, runId, detailsToInclude, skip, top, outcomes, newTestsOnly) {
1034
+ const queryValues = {
1035
+ detailsToInclude: detailsToInclude,
1036
+ '$skip': skip,
1037
+ '$top': top,
1038
+ outcomes: outcomes && outcomes.join(","),
1039
+ '$newTestsOnly': newTestsOnly
1040
+ };
1041
+ return this.beginRequest({
1042
+ apiVersion: "7.2-preview.2",
1043
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testResultId}",
1044
+ routeValues: {
1045
+ project: project,
1046
+ runId: runId
1047
+ },
1048
+ queryParams: queryValues
1049
+ });
1050
+ }
1051
+ /**
1052
+ * @param results -
1053
+ * @param project - Project ID or project name
1054
+ * @param runId -
1055
+ */
1056
+ async updateTestResults(results, project, runId) {
1057
+ return this.beginRequest({
1058
+ apiVersion: "7.2-preview.2",
1059
+ method: "PATCH",
1060
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testResultId}",
1061
+ routeValues: {
1062
+ project: project,
1063
+ runId: runId
1064
+ },
1065
+ body: results
1066
+ });
1067
+ }
1068
+ /**
1069
+ * @param project - Project ID or project name
1070
+ * @param buildId -
1071
+ * @param publishContext -
1072
+ * @param outcomes -
1073
+ * @param top -
1074
+ * @param continuationToken -
1075
+ */
1076
+ async getTestResultsByBuild(project, buildId, publishContext, outcomes, top, continuationToken) {
1077
+ const queryValues = {
1078
+ buildId: buildId,
1079
+ publishContext: publishContext,
1080
+ outcomes: outcomes && outcomes.join(","),
1081
+ '$top': top,
1082
+ continuationToken: continuationToken
1083
+ };
1084
+ return this.beginRequest({
1085
+ apiVersion: "7.2-preview.1",
1086
+ routeTemplate: "{project}/_apis/testresults/resultsbybuild",
1087
+ routeValues: {
1088
+ project: project
1089
+ },
1090
+ queryParams: queryValues,
1091
+ returnRawResponse: true
1092
+ }).then(async (response) => {
1093
+ const body = await response.text().then(deserializeVssJsonObject);
1094
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
1095
+ return body;
1096
+ });
1097
+ }
1098
+ /**
1099
+ * Get a list of results.
1100
+ *
1101
+ * @param project - Project ID or project name
1102
+ * @param pipelineId - Pipeline Id. This is same as build Id.
1103
+ * @param stageName - Name of the stage. Maximum supported length for name is 256 character.
1104
+ * @param phaseName - Name of the phase. Maximum supported length for name is 256 character.
1105
+ * @param jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
1106
+ * @param outcomes - List of outcome of results
1107
+ * @param includeAllBuildRuns - Whether to include Test Runs from from all the build runs or not.
1108
+ * @param top - Maximum number of results to return
1109
+ * @param continuationToken - Header to pass the continuationToken
1110
+ */
1111
+ async getTestResultsByPipeline(project, pipelineId, stageName, phaseName, jobName, outcomes, includeAllBuildRuns, top, continuationToken) {
1112
+ const queryValues = {
1113
+ pipelineId: pipelineId,
1114
+ stageName: stageName,
1115
+ phaseName: phaseName,
1116
+ jobName: jobName,
1117
+ outcomes: outcomes && outcomes.join(","),
1118
+ includeAllBuildRuns: includeAllBuildRuns,
1119
+ '$top': top
1120
+ };
1121
+ return this.beginRequest({
1122
+ apiVersion: "7.2-preview.1",
1123
+ routeTemplate: "{project}/_apis/testresults/resultsbypipeline",
1124
+ routeValues: {
1125
+ project: project
1126
+ },
1127
+ customHeaders: {
1128
+ "x-ms-continuationtoken": continuationToken,
1129
+ },
1130
+ queryParams: queryValues,
1131
+ returnRawResponse: true
1132
+ }).then(async (response) => {
1133
+ const body = await response.text().then(deserializeVssJsonObject);
1134
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
1135
+ return body;
1136
+ });
1137
+ }
1138
+ /**
1139
+ * @param project - Project ID or project name
1140
+ * @param releaseId -
1141
+ * @param releaseEnvid -
1142
+ * @param publishContext -
1143
+ * @param outcomes -
1144
+ * @param top -
1145
+ * @param continuationToken -
1146
+ */
1147
+ async getTestResultsByRelease(project, releaseId, releaseEnvid, publishContext, outcomes, top, continuationToken) {
1148
+ const queryValues = {
1149
+ releaseId: releaseId,
1150
+ releaseEnvid: releaseEnvid,
1151
+ publishContext: publishContext,
1152
+ outcomes: outcomes && outcomes.join(","),
1153
+ '$top': top,
1154
+ continuationToken: continuationToken
1155
+ };
1156
+ return this.beginRequest({
1157
+ apiVersion: "7.2-preview.1",
1158
+ routeTemplate: "{project}/_apis/testresults/resultsbyrelease",
1159
+ routeValues: {
1160
+ project: project
1161
+ },
1162
+ queryParams: queryValues,
1163
+ returnRawResponse: true
1164
+ }).then(async (response) => {
1165
+ const body = await response.text().then(deserializeVssJsonObject);
1166
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
1167
+ return body;
1168
+ });
1169
+ }
1170
+ /**
1171
+ * Get all the available groups details and for these groups get failed and aborted results.
1172
+ *
1173
+ * @param project - Project ID or project name
1174
+ * @param pipelineId - Pipeline Id. This is same as build Id.
1175
+ * @param stageName - Name of the stage. Maximum supported length for name is 256 character.
1176
+ * @param phaseName - Name of the phase. Maximum supported length for name is 256 character.
1177
+ * @param jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
1178
+ * @param shouldIncludeFailedAndAbortedResults - If true, it will return Ids of failed and aborted results for each test group
1179
+ * @param queryGroupSummaryForInProgress - If true, it will calculate summary for InProgress runs as well.
1180
+ */
1181
+ async testResultsGroupDetails(project, pipelineId, stageName, phaseName, jobName, shouldIncludeFailedAndAbortedResults, queryGroupSummaryForInProgress) {
1182
+ const queryValues = {
1183
+ pipelineId: pipelineId,
1184
+ stageName: stageName,
1185
+ phaseName: phaseName,
1186
+ jobName: jobName,
1187
+ shouldIncludeFailedAndAbortedResults: shouldIncludeFailedAndAbortedResults,
1188
+ queryGroupSummaryForInProgress: queryGroupSummaryForInProgress
1189
+ };
1190
+ return this.beginRequest({
1191
+ apiVersion: "7.2-preview.1",
1192
+ routeTemplate: "{project}/_apis/testresults/resultsgroupDetails",
1193
+ routeValues: {
1194
+ project: project
1195
+ },
1196
+ queryParams: queryValues
1197
+ });
1198
+ }
1199
+ /**
1200
+ * @param project - Project ID or project name
1201
+ * @param buildId -
1202
+ * @param publishContext -
1203
+ * @param includeFailureDetails -
1204
+ * @param buildToCompare -
1205
+ */
1206
+ async queryTestResultsReportForBuild(project, buildId, publishContext, includeFailureDetails, buildToCompare) {
1207
+ const queryValues = {
1208
+ buildId: buildId,
1209
+ publishContext: publishContext,
1210
+ includeFailureDetails: includeFailureDetails,
1211
+ buildToCompare: buildToCompare
1212
+ };
1213
+ return this.beginRequest({
1214
+ apiVersion: "7.2-preview.1",
1215
+ routeTemplate: "{project}/_apis/testresults/resultsummarybybuild",
1216
+ routeValues: {
1217
+ project: project
1218
+ },
1219
+ queryParams: queryValues
1220
+ });
1221
+ }
1222
+ /**
1223
+ * Get summary of test results.
1224
+ *
1225
+ * @param project - Project ID or project name
1226
+ * @param pipelineId - Pipeline Id. This is same as build Id.
1227
+ * @param stageName - Name of the stage. Maximum supported length for name is 256 character.
1228
+ * @param phaseName - Name of the phase. Maximum supported length for name is 256 character.
1229
+ * @param jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
1230
+ * @param includeFailureDetails - If true returns failure insights
1231
+ */
1232
+ async queryTestResultsReportForPipeline(project, pipelineId, stageName, phaseName, jobName, includeFailureDetails) {
1233
+ const queryValues = {
1234
+ pipelineId: pipelineId,
1235
+ stageName: stageName,
1236
+ phaseName: phaseName,
1237
+ jobName: jobName,
1238
+ includeFailureDetails: includeFailureDetails
1239
+ };
1240
+ return this.beginRequest({
1241
+ apiVersion: "7.2-preview.1",
1242
+ routeTemplate: "{project}/_apis/testresults/resultsummarybypipeline",
1243
+ routeValues: {
1244
+ project: project
1245
+ },
1246
+ queryParams: queryValues
1247
+ });
1248
+ }
1249
+ /**
1250
+ * @param project - Project ID or project name
1251
+ * @param releaseId -
1252
+ * @param releaseEnvId -
1253
+ * @param publishContext -
1254
+ * @param includeFailureDetails -
1255
+ * @param releaseToCompare -
1256
+ */
1257
+ async queryTestResultsReportForRelease(project, releaseId, releaseEnvId, publishContext, includeFailureDetails, releaseToCompare) {
1258
+ const queryValues = {
1259
+ releaseId: releaseId,
1260
+ releaseEnvId: releaseEnvId,
1261
+ publishContext: publishContext,
1262
+ includeFailureDetails: includeFailureDetails,
1263
+ releaseToCompare: releaseToCompare
1264
+ };
1265
+ return this.beginRequest({
1266
+ apiVersion: "7.2-preview.1",
1267
+ routeTemplate: "{project}/_apis/testresults/resultsummarybyrelease",
1268
+ routeValues: {
1269
+ project: project
1270
+ },
1271
+ queryParams: queryValues
1272
+ });
1273
+ }
1274
+ /**
1275
+ * @param releases -
1276
+ * @param project - Project ID or project name
1277
+ */
1278
+ async queryTestResultsSummaryForReleases(releases, project) {
1279
+ return this.beginRequest({
1280
+ apiVersion: "7.2-preview.1",
1281
+ method: "POST",
1282
+ routeTemplate: "{project}/_apis/testresults/resultsummarybyrelease",
1283
+ routeValues: {
1284
+ project: project
1285
+ },
1286
+ body: releases
1287
+ });
1288
+ }
1289
+ /**
1290
+ * @param resultsContext -
1291
+ * @param project - Project ID or project name
1292
+ * @param workItemIds -
1293
+ */
1294
+ async queryTestSummaryByRequirement(resultsContext, project, workItemIds) {
1295
+ const queryValues = {
1296
+ workItemIds: workItemIds && workItemIds.join(",")
1297
+ };
1298
+ return this.beginRequest({
1299
+ apiVersion: "7.2-preview.1",
1300
+ method: "POST",
1301
+ routeTemplate: "{project}/_apis/testresults/resultsummarybyrequirement",
1302
+ routeValues: {
1303
+ project: project
1304
+ },
1305
+ queryParams: queryValues,
1306
+ body: resultsContext
1307
+ });
1308
+ }
1309
+ /**
1310
+ * @param filter -
1311
+ * @param project - Project ID or project name
1312
+ */
1313
+ async queryResultTrendForBuild(filter, project) {
1314
+ return this.beginRequest({
1315
+ apiVersion: "7.2-preview.1",
1316
+ method: "POST",
1317
+ routeTemplate: "{project}/_apis/testresults/ResultTrendByBuild",
1318
+ routeValues: {
1319
+ project: project
1320
+ },
1321
+ body: filter
1322
+ });
1323
+ }
1324
+ /**
1325
+ * @param filter -
1326
+ * @param project - Project ID or project name
1327
+ */
1328
+ async queryResultTrendForRelease(filter, project) {
1329
+ return this.beginRequest({
1330
+ apiVersion: "7.2-preview.1",
1331
+ method: "POST",
1332
+ routeTemplate: "{project}/_apis/testresults/ResultTrendByRelease",
1333
+ routeValues: {
1334
+ project: project
1335
+ },
1336
+ body: filter
1337
+ });
1338
+ }
1339
+ /**
1340
+ * @param testRun -
1341
+ * @param project - Project ID or project name
1342
+ */
1343
+ async createTestRun(testRun, project) {
1344
+ return this.beginRequest({
1345
+ apiVersion: "7.2-preview.1",
1346
+ method: "POST",
1347
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}",
1348
+ routeValues: {
1349
+ project: project
1350
+ },
1351
+ body: testRun
1352
+ });
1353
+ }
1354
+ /**
1355
+ * @param project - Project ID or project name
1356
+ * @param runId -
1357
+ */
1358
+ async deleteTestRun(project, runId) {
1359
+ return this.beginRequest({
1360
+ apiVersion: "7.2-preview.1",
1361
+ method: "DELETE",
1362
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}",
1363
+ routeValues: {
1364
+ project: project,
1365
+ runId: runId
1366
+ }
1367
+ });
1368
+ }
1369
+ /**
1370
+ * @param project - Project ID or project name
1371
+ * @param runId -
1372
+ * @param includeDetails -
1373
+ * @param includeTags -
1374
+ */
1375
+ async getTestRunById(project, runId, includeDetails, includeTags) {
1376
+ const queryValues = {
1377
+ includeDetails: includeDetails,
1378
+ includeTags: includeTags
1379
+ };
1380
+ return this.beginRequest({
1381
+ apiVersion: "7.2-preview.1",
1382
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}",
1383
+ routeValues: {
1384
+ project: project,
1385
+ runId: runId
1386
+ },
1387
+ queryParams: queryValues
1388
+ });
1389
+ }
1390
+ /**
1391
+ * @param project - Project ID or project name
1392
+ * @param buildUri -
1393
+ * @param owner -
1394
+ * @param tmiRunId -
1395
+ * @param planId -
1396
+ * @param includeRunDetails -
1397
+ * @param automated -
1398
+ * @param skip -
1399
+ * @param top -
1400
+ */
1401
+ async getTestRuns(project, buildUri, owner, tmiRunId, planId, includeRunDetails, automated, skip, top) {
1402
+ const queryValues = {
1403
+ buildUri: buildUri,
1404
+ owner: owner,
1405
+ tmiRunId: tmiRunId,
1406
+ planId: planId,
1407
+ includeRunDetails: includeRunDetails,
1408
+ automated: automated,
1409
+ '$skip': skip,
1410
+ '$top': top
1411
+ };
1412
+ return this.beginRequest({
1413
+ apiVersion: "7.2-preview.1",
1414
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}",
1415
+ routeValues: {
1416
+ project: project
1417
+ },
1418
+ queryParams: queryValues
1419
+ });
1420
+ }
1421
+ /**
1422
+ * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.
1423
+ *
1424
+ * @param project - Project ID or project name
1425
+ * @param minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory).
1426
+ * @param maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).
1427
+ * @param state - Current state of the Runs to be queried.
1428
+ * @param planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids.
1429
+ * @param isAutomated - Automation type of the Runs to be queried.
1430
+ * @param publishContext - PublishContext of the Runs to be queried.
1431
+ * @param buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids.
1432
+ * @param buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids.
1433
+ * @param branchName - Source Branch name of the Runs to be queried.
1434
+ * @param releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids.
1435
+ * @param releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids.
1436
+ * @param releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids.
1437
+ * @param releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids.
1438
+ * @param runTitle - Run Title of the Runs to be queried.
1439
+ * @param top - Number of runs to be queried. Limit is 100
1440
+ * @param sortOrder - Sort order by LastUpdated for the test runs.
1441
+ * @param continuationToken - continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user.
1442
+ */
1443
+ async queryTestRuns(project, minLastUpdatedDate, maxLastUpdatedDate, state, planIds, isAutomated, publishContext, buildIds, buildDefIds, branchName, releaseIds, releaseDefIds, releaseEnvIds, releaseEnvDefIds, runTitle, top, sortOrder, continuationToken) {
1444
+ const queryValues = {
1445
+ minLastUpdatedDate: minLastUpdatedDate,
1446
+ maxLastUpdatedDate: maxLastUpdatedDate,
1447
+ state: state,
1448
+ planIds: planIds && planIds.join(","),
1449
+ isAutomated: isAutomated,
1450
+ publishContext: publishContext,
1451
+ buildIds: buildIds && buildIds.join(","),
1452
+ buildDefIds: buildDefIds && buildDefIds.join(","),
1453
+ branchName: branchName,
1454
+ releaseIds: releaseIds && releaseIds.join(","),
1455
+ releaseDefIds: releaseDefIds && releaseDefIds.join(","),
1456
+ releaseEnvIds: releaseEnvIds && releaseEnvIds.join(","),
1457
+ releaseEnvDefIds: releaseEnvDefIds && releaseEnvDefIds.join(","),
1458
+ runTitle: runTitle,
1459
+ '$top': top,
1460
+ '$sortOrder': sortOrder,
1461
+ continuationToken: continuationToken
1462
+ };
1463
+ return this.beginRequest({
1464
+ apiVersion: "7.2-preview.1",
1465
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}",
1466
+ routeValues: {
1467
+ project: project
1468
+ },
1469
+ queryParams: queryValues,
1470
+ returnRawResponse: true
1471
+ }).then(async (response) => {
1472
+ const body = await response.text().then(deserializeVssJsonObject);
1473
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
1474
+ return body;
1475
+ });
1476
+ }
1477
+ /**
1478
+ * @param runUpdateModel -
1479
+ * @param project - Project ID or project name
1480
+ * @param runId -
1481
+ */
1482
+ async updateTestRun(runUpdateModel, project, runId) {
1483
+ return this.beginRequest({
1484
+ apiVersion: "7.2-preview.1",
1485
+ method: "PATCH",
1486
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}",
1487
+ routeValues: {
1488
+ project: project,
1489
+ runId: runId
1490
+ },
1491
+ body: runUpdateModel
1492
+ });
1493
+ }
1494
+ /**
1495
+ * Get test run summary, used when we want to get summary of a run by outcome. Test run should be in completed state.
1496
+ *
1497
+ * @param project - Project ID or project name
1498
+ * @param runId - ID of the run to get.
1499
+ */
1500
+ async getTestRunSummaryByOutcome(project, runId) {
1501
+ return this.beginRequest({
1502
+ apiVersion: "7.2-preview.1",
1503
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/runsummary",
1504
+ routeValues: {
1505
+ project: project,
1506
+ runId: runId
1507
+ }
1508
+ });
1509
+ }
1510
+ /**
1511
+ * Get TestResultsSettings data
1512
+ *
1513
+ * @param project - Project ID or project name
1514
+ * @param settingsType -
1515
+ */
1516
+ async getTestResultsSettings(project, settingsType) {
1517
+ const queryValues = {
1518
+ settingsType: settingsType
1519
+ };
1520
+ return this.beginRequest({
1521
+ apiVersion: "7.2-preview.3",
1522
+ routeTemplate: "{project}/_apis/testresults/settings",
1523
+ routeValues: {
1524
+ project: project
1525
+ },
1526
+ queryParams: queryValues
1527
+ });
1528
+ }
1529
+ /**
1530
+ * Update project settings of test results
1531
+ *
1532
+ * @param testResultsUpdateSettings -
1533
+ * @param project - Project ID or project name
1534
+ */
1535
+ async updatePipelinesTestSettings(testResultsUpdateSettings, project) {
1536
+ return this.beginRequest({
1537
+ apiVersion: "7.2-preview.3",
1538
+ method: "PATCH",
1539
+ routeTemplate: "{project}/_apis/testresults/settings",
1540
+ routeValues: {
1541
+ project: project
1542
+ },
1543
+ body: testResultsUpdateSettings
1544
+ });
1545
+ }
1546
+ /**
1547
+ * Gets the list of results whose failure matches with the provided one.
1548
+ *
1549
+ * @param project - Project ID or project name
1550
+ * @param runId - id of test run
1551
+ * @param testResultId - id of test result inside a test run
1552
+ * @param testSubResultId - id of subresult inside a test result
1553
+ * @param top - Maximum number of results to return
1554
+ * @param continuationToken - Header to pass the continuationToken
1555
+ */
1556
+ async getSimilarTestResults(project, runId, testResultId, testSubResultId, top, continuationToken) {
1557
+ const queryValues = {
1558
+ testSubResultId: testSubResultId,
1559
+ '$top': top
1560
+ };
1561
+ return this.beginRequest({
1562
+ apiVersion: "7.2-preview.1",
1563
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testResultId}/SimilarTestResults",
1564
+ routeValues: {
1565
+ project: project,
1566
+ runId: runId,
1567
+ testResultId: testResultId
1568
+ },
1569
+ customHeaders: {
1570
+ "x-ms-continuationtoken": continuationToken,
1571
+ },
1572
+ queryParams: queryValues
1573
+ });
1574
+ }
1575
+ /**
1576
+ * Get test run statistics , used when we want to get summary of a run by outcome.
1577
+ *
1578
+ * @param project - Project ID or project name
1579
+ * @param runId - ID of the run to get.
1580
+ */
1581
+ async getTestRunStatistics(project, runId) {
1582
+ return this.beginRequest({
1583
+ apiVersion: "7.2-preview.2",
1584
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/statistics",
1585
+ routeValues: {
1586
+ project: project,
1587
+ runId: runId
1588
+ }
1589
+ });
1590
+ }
1591
+ /**
1592
+ * \<p\>Gets the coverage status for the last successful build of a definition, optionally scoped to a specific branch\</p\>
1593
+ *
1594
+ * @param project - Project ID or project name
1595
+ * @param definition - The ID or name of the definition.
1596
+ * @param branchName - The branch name.
1597
+ * @param label - The String to replace the default text on the left side of the badge.
1598
+ */
1599
+ async getCoverageStatusBadge(project, definition, branchName, label) {
1600
+ const queryValues = {
1601
+ branchName: branchName,
1602
+ label: label
1603
+ };
1604
+ return this.beginRequest({
1605
+ apiVersion: "7.2-preview.1",
1606
+ routeTemplate: "{project}/_apis/testresults/codecoverage/status/{*definition}",
1607
+ routeValues: {
1608
+ project: project,
1609
+ definition: definition
1610
+ },
1611
+ queryParams: queryValues
1612
+ });
1613
+ }
1614
+ /**
1615
+ * Get all the tags in a build.
1616
+ *
1617
+ * @param project - Project ID or project name
1618
+ * @param buildId - Build ID
1619
+ */
1620
+ async getTestTagsForBuild(project, buildId) {
1621
+ const queryValues = {
1622
+ buildId: buildId
1623
+ };
1624
+ return this.beginRequest({
1625
+ apiVersion: "7.2-preview.1",
1626
+ routeTemplate: "{project}/_apis/testresults/tags",
1627
+ routeValues: {
1628
+ project: project
1629
+ },
1630
+ queryParams: queryValues
1631
+ });
1632
+ }
1633
+ /**
1634
+ * Get all the tags in a release.
1635
+ *
1636
+ * @param project - Project ID or project name
1637
+ * @param releaseId - Release ID
1638
+ * @param releaseEnvId - Release environment ID
1639
+ */
1640
+ async getTestTagsForRelease(project, releaseId, releaseEnvId) {
1641
+ const queryValues = {
1642
+ releaseId: releaseId,
1643
+ releaseEnvId: releaseEnvId
1644
+ };
1645
+ return this.beginRequest({
1646
+ apiVersion: "7.2-preview.1",
1647
+ routeTemplate: "{project}/_apis/testresults/tags",
1648
+ routeValues: {
1649
+ project: project
1650
+ },
1651
+ queryParams: queryValues
1652
+ });
1653
+ }
1654
+ /**
1655
+ * Update tags of a run, Tags can be Added and Deleted
1656
+ *
1657
+ * @param testTagsUpdateModel - TestTagsUpdateModel
1658
+ * @param project - Project ID or project name
1659
+ * @param runId - RunId of the run
1660
+ */
1661
+ async updateTestRunTags(testTagsUpdateModel, project, runId) {
1662
+ return this.beginRequest({
1663
+ apiVersion: "7.2-preview.1",
1664
+ method: "PATCH",
1665
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/tags",
1666
+ routeValues: {
1667
+ project: project,
1668
+ runId: runId
1669
+ },
1670
+ body: testTagsUpdateModel
1671
+ });
1672
+ }
1673
+ /**
1674
+ * Get all the tags in a build.
1675
+ *
1676
+ * @param project - Project ID or project name
1677
+ * @param buildId - Build ID
1678
+ */
1679
+ async getTestTagSummaryForBuild(project, buildId) {
1680
+ const queryValues = {
1681
+ buildId: buildId
1682
+ };
1683
+ return this.beginRequest({
1684
+ apiVersion: "7.2-preview.1",
1685
+ routeTemplate: "{project}/_apis/testresults/tagsummary",
1686
+ routeValues: {
1687
+ project: project
1688
+ },
1689
+ queryParams: queryValues
1690
+ });
1691
+ }
1692
+ /**
1693
+ * Get all the tags in a release.
1694
+ *
1695
+ * @param project - Project ID or project name
1696
+ * @param releaseId - Release ID
1697
+ * @param releaseEnvId - Release environment ID
1698
+ */
1699
+ async getTestTagSummaryForRelease(project, releaseId, releaseEnvId) {
1700
+ const queryValues = {
1701
+ releaseId: releaseId,
1702
+ releaseEnvId: releaseEnvId
1703
+ };
1704
+ return this.beginRequest({
1705
+ apiVersion: "7.2-preview.1",
1706
+ routeTemplate: "{project}/_apis/testresults/tagsummary",
1707
+ routeValues: {
1708
+ project: project
1709
+ },
1710
+ queryParams: queryValues
1711
+ });
1712
+ }
1713
+ /**
1714
+ * @param request -
1715
+ * @param project - Project ID or project name
1716
+ */
1717
+ async callbackTestAgent(request, project) {
1718
+ return this.beginRequest({
1719
+ apiVersion: "7.2-preview.1",
1720
+ method: "POST",
1721
+ routeTemplate: "{project}/_apis/testresults/testagent/callback",
1722
+ routeValues: {
1723
+ project: project
1724
+ },
1725
+ body: request
1726
+ });
1727
+ }
1728
+ /**
1729
+ * @param request -
1730
+ * @param project - Project ID or project name
1731
+ */
1732
+ async triggerTestAgent(request, project) {
1733
+ return this.beginRequest({
1734
+ apiVersion: "7.2-preview.1",
1735
+ method: "POST",
1736
+ routeTemplate: "{project}/_apis/testresults/testagent/trigger",
1737
+ routeValues: {
1738
+ project: project
1739
+ },
1740
+ body: request
1741
+ });
1742
+ }
1743
+ /**
1744
+ * OAuth callback endpoint. GitHub redirects here after user authorizes. Exchanges the authorization code for tokens and stores them in TCM StrongBox. Requires the callback URL to be registered in the GitHub OAuth App settings.
1745
+ *
1746
+ * @param project - Project ID or project name
1747
+ * @param code - The authorization code returned by GitHub after user consent
1748
+ */
1749
+ async completeGitHubAuth(project, code) {
1750
+ const queryValues = {
1751
+ code: code
1752
+ };
1753
+ return this.beginRequest({
1754
+ apiVersion: "7.2-preview.1",
1755
+ routeTemplate: "{project}/_apis/testresults/testai/completegithubauth",
1756
+ routeValues: {
1757
+ project: project
1758
+ },
1759
+ queryParams: queryValues
1760
+ });
1761
+ }
1762
+ /**
1763
+ * Generates manual test plan from a work item using AI. If the user has no valid Copilot token, returns needsAuth=true with an authUrl instead of queuing the job.
1764
+ *
1765
+ * @param generateTestPlanFromWorkItemModel -
1766
+ * @param project - Project ID or project name
1767
+ * @param workItemId -
1768
+ */
1769
+ async generateTestPlanFromWorkItem(generateTestPlanFromWorkItemModel, project, workItemId) {
1770
+ return this.beginRequest({
1771
+ apiVersion: "7.2-preview.1",
1772
+ method: "POST",
1773
+ routeTemplate: "{project}/_apis/testresults/testai/generatetestplanfromworkitem/{workItemId}",
1774
+ routeValues: {
1775
+ project: project,
1776
+ workItemId: workItemId
1777
+ },
1778
+ body: generateTestPlanFromWorkItemModel
1779
+ });
1780
+ }
1781
+ /**
1782
+ * Creates an attachment in the LogStore for the specified buildId.
1783
+ *
1784
+ * @param attachmentRequestModel - Contains attachment info like stream, filename, comment, attachmentType
1785
+ * @param project - Project ID or project name
1786
+ * @param buildId - BuildId
1787
+ */
1788
+ async createBuildAttachmentInLogStore(attachmentRequestModel, project, buildId) {
1789
+ return this.beginRequest({
1790
+ apiVersion: "7.2-preview.1",
1791
+ method: "POST",
1792
+ routeTemplate: "{project}/_apis/testresults/uploadbuildattachments/{buildId}",
1793
+ routeValues: {
1794
+ project: project,
1795
+ buildId: buildId
1796
+ },
1797
+ body: attachmentRequestModel
1798
+ });
1799
+ }
1800
+ /**
1801
+ * Creates an attachment in the LogStore for the specified runId.
1802
+ *
1803
+ * @param attachmentRequestModel - Contains attachment info like stream, filename, comment, attachmentType
1804
+ * @param project - Project ID or project name
1805
+ * @param runId - Test RunId
1806
+ */
1807
+ async createTestRunLogStoreAttachment(attachmentRequestModel, project, runId) {
1808
+ return this.beginRequest({
1809
+ apiVersion: "7.2-preview.1",
1810
+ method: "POST",
1811
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/testattachments",
1812
+ routeValues: {
1813
+ project: project,
1814
+ runId: runId
1815
+ },
1816
+ body: attachmentRequestModel
1817
+ });
1818
+ }
1819
+ /**
1820
+ * Deletes the attachment with the specified filename for the specified runId from the LogStore.
1821
+ *
1822
+ * @param project - Project ID or project name
1823
+ * @param runId - Test RunId
1824
+ * @param filename - Attachment FileName
1825
+ */
1826
+ async deleteTestRunLogStoreAttachment(project, runId, filename) {
1827
+ const queryValues = {
1828
+ filename: filename
1829
+ };
1830
+ return this.beginRequest({
1831
+ apiVersion: "7.2-preview.1",
1832
+ method: "DELETE",
1833
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/testattachments",
1834
+ routeValues: {
1835
+ project: project,
1836
+ runId: runId
1837
+ },
1838
+ queryParams: queryValues
1839
+ });
1840
+ }
1841
+ /**
1842
+ * Returns the attachment with the specified filename for the specified runId from the LogStore.
1843
+ *
1844
+ * @param project - Project ID or project name
1845
+ * @param runId - Test RunId
1846
+ * @param filename - Attachment FileName
1847
+ */
1848
+ async getTestRunLogStoreAttachmentContent(project, runId, filename) {
1849
+ const queryValues = {
1850
+ filename: filename
1851
+ };
1852
+ return this.beginRequest({
1853
+ apiVersion: "7.2-preview.1",
1854
+ httpResponseType: "application/octet-stream",
1855
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/testattachments",
1856
+ routeValues: {
1857
+ project: project,
1858
+ runId: runId
1859
+ },
1860
+ queryParams: queryValues
1861
+ });
1862
+ }
1863
+ /**
1864
+ * Returns a list of attachments for the specified runId from the LogStore.
1865
+ *
1866
+ * @param project - Project ID or project name
1867
+ * @param runId - Test RunId
1868
+ */
1869
+ async getTestRunLogStoreAttachments(project, runId) {
1870
+ return this.beginRequest({
1871
+ apiVersion: "7.2-preview.1",
1872
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/testattachments",
1873
+ routeValues: {
1874
+ project: project,
1875
+ runId: runId
1876
+ }
1877
+ });
1878
+ }
1879
+ /**
1880
+ * Returns the attachment with the specified filename for the specified runId from the LogStore.
1881
+ *
1882
+ * @param project - Project ID or project name
1883
+ * @param runId - Test RunId
1884
+ * @param filename - Attachment FileName
1885
+ */
1886
+ async getTestRunLogStoreAttachmentZip(project, runId, filename) {
1887
+ const queryValues = {
1888
+ filename: filename
1889
+ };
1890
+ return this.beginRequest({
1891
+ apiVersion: "7.2-preview.1",
1892
+ httpResponseType: "application/zip",
1893
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/testattachments",
1894
+ routeValues: {
1895
+ project: project,
1896
+ runId: runId
1897
+ },
1898
+ queryParams: queryValues
1899
+ });
1900
+ }
1901
+ /**
1902
+ * Creates a new test failure type
1903
+ *
1904
+ * @param testResultFailureType -
1905
+ * @param project - Project ID or project name
1906
+ */
1907
+ async createFailureType(testResultFailureType, project) {
1908
+ return this.beginRequest({
1909
+ apiVersion: "7.2-preview.1",
1910
+ method: "POST",
1911
+ routeTemplate: "{project}/_apis/testresults/testfailuretype/{failureTypeId}",
1912
+ routeValues: {
1913
+ project: project
1914
+ },
1915
+ body: testResultFailureType
1916
+ });
1917
+ }
1918
+ /**
1919
+ * Deletes a test failure type with specified failureTypeId
1920
+ *
1921
+ * @param project - Project ID or project name
1922
+ * @param failureTypeId -
1923
+ */
1924
+ async deleteFailureType(project, failureTypeId) {
1925
+ return this.beginRequest({
1926
+ apiVersion: "7.2-preview.1",
1927
+ method: "DELETE",
1928
+ routeTemplate: "{project}/_apis/testresults/testfailuretype/{failureTypeId}",
1929
+ routeValues: {
1930
+ project: project,
1931
+ failureTypeId: failureTypeId
1932
+ }
1933
+ });
1934
+ }
1935
+ /**
1936
+ * Returns the list of test failure types.
1937
+ *
1938
+ * @param project - Project ID or project name
1939
+ */
1940
+ async getFailureTypes(project) {
1941
+ return this.beginRequest({
1942
+ apiVersion: "7.2-preview.1",
1943
+ routeTemplate: "{project}/_apis/testresults/testfailuretype/{failureTypeId}",
1944
+ routeValues: {
1945
+ project: project
1946
+ }
1947
+ });
1948
+ }
1949
+ /**
1950
+ * Get history of a test method using TestHistoryQuery
1951
+ *
1952
+ * @param filter - TestHistoryQuery to get history
1953
+ * @param project - Project ID or project name
1954
+ */
1955
+ async queryTestHistory(filter, project) {
1956
+ return this.beginRequest({
1957
+ apiVersion: "7.2-preview.2",
1958
+ method: "POST",
1959
+ routeTemplate: "{project}/_apis/testresults/results/TestHistory",
1960
+ routeValues: {
1961
+ project: project
1962
+ },
1963
+ body: filter
1964
+ });
1965
+ }
1966
+ /**
1967
+ * Get list of build attachments reference
1968
+ *
1969
+ * @param project - Project ID or project name
1970
+ * @param buildId - Id of the build to get
1971
+ * @param type - type of the attachment to get
1972
+ * @param directoryPath - directory path for which attachments are needed
1973
+ * @param fileNamePrefix - file name prefix to filter the list of attachment
1974
+ * @param fetchMetaData - Default is false, set if metadata is needed
1975
+ * @param top - Number of test attachments reference to return
1976
+ * @param continuationToken - Header to pass the continuationToken
1977
+ */
1978
+ async getTestLogsForBuild(project, buildId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) {
1979
+ const queryValues = {
1980
+ buildId: buildId,
1981
+ type: type,
1982
+ directoryPath: directoryPath,
1983
+ fileNamePrefix: fileNamePrefix,
1984
+ fetchMetaData: fetchMetaData,
1985
+ top: top
1986
+ };
1987
+ return this.beginRequest({
1988
+ apiVersion: "7.2-preview.1",
1989
+ routeTemplate: "{project}/_apis/testresults/testlog",
1990
+ routeValues: {
1991
+ project: project
1992
+ },
1993
+ customHeaders: {
1994
+ "x-ms-continuationtoken": continuationToken,
1995
+ },
1996
+ queryParams: queryValues,
1997
+ returnRawResponse: true
1998
+ }).then(async (response) => {
1999
+ const body = await response.text().then(deserializeVssJsonObject);
2000
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
2001
+ return body;
2002
+ });
2003
+ }
2004
+ /**
2005
+ * Get list of test result attachments reference
2006
+ *
2007
+ * @param project - Project ID or project name
2008
+ * @param runId - Id of the test run that contains the result
2009
+ * @param resultId - Id of the test result
2010
+ * @param type - type of attachments to get
2011
+ * @param directoryPath - directory path of attachments to get
2012
+ * @param fileNamePrefix - file name prefix to filter the list of attachment
2013
+ * @param fetchMetaData - Default is false, set if metadata is needed
2014
+ * @param top - Numbe of attachments reference to return
2015
+ * @param continuationToken - Header to pass the continuationToken
2016
+ */
2017
+ async getTestResultLogs(project, runId, resultId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) {
2018
+ const queryValues = {
2019
+ type: type,
2020
+ directoryPath: directoryPath,
2021
+ fileNamePrefix: fileNamePrefix,
2022
+ fetchMetaData: fetchMetaData,
2023
+ top: top
2024
+ };
2025
+ return this.beginRequest({
2026
+ apiVersion: "7.2-preview.1",
2027
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlog",
2028
+ routeValues: {
2029
+ project: project,
2030
+ runId: runId,
2031
+ resultId: resultId
2032
+ },
2033
+ customHeaders: {
2034
+ "x-ms-continuationtoken": continuationToken,
2035
+ },
2036
+ queryParams: queryValues,
2037
+ returnRawResponse: true
2038
+ }).then(async (response) => {
2039
+ const body = await response.text().then(deserializeVssJsonObject);
2040
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
2041
+ return body;
2042
+ });
2043
+ }
2044
+ /**
2045
+ * Get list of test subresult attachments reference
2046
+ *
2047
+ * @param project - Project ID or project name
2048
+ * @param runId - Id of the test run that contains the results
2049
+ * @param resultId - Id of the test result that contains subresult
2050
+ * @param subResultId - Id of the test subresult
2051
+ * @param type - type of the attachments to get
2052
+ * @param directoryPath - directory path of the attachment to get
2053
+ * @param fileNamePrefix - file name prefix to filter the list of attachments
2054
+ * @param fetchMetaData - Default is false, set if metadata is needed
2055
+ * @param top - Number of attachments reference to return
2056
+ * @param continuationToken - Header to pass the continuationToken
2057
+ */
2058
+ async getTestSubResultLogs(project, runId, resultId, subResultId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) {
2059
+ const queryValues = {
2060
+ subResultId: subResultId,
2061
+ type: type,
2062
+ directoryPath: directoryPath,
2063
+ fileNamePrefix: fileNamePrefix,
2064
+ fetchMetaData: fetchMetaData,
2065
+ top: top
2066
+ };
2067
+ return this.beginRequest({
2068
+ apiVersion: "7.2-preview.1",
2069
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlog",
2070
+ routeValues: {
2071
+ project: project,
2072
+ runId: runId,
2073
+ resultId: resultId
2074
+ },
2075
+ customHeaders: {
2076
+ "x-ms-continuationtoken": continuationToken,
2077
+ },
2078
+ queryParams: queryValues,
2079
+ returnRawResponse: true
2080
+ }).then(async (response) => {
2081
+ const body = await response.text().then(deserializeVssJsonObject);
2082
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
2083
+ return body;
2084
+ });
2085
+ }
2086
+ /**
2087
+ * Get list of test run attachments reference
2088
+ *
2089
+ * @param project - Project ID or project name
2090
+ * @param runId - Id of the test run
2091
+ * @param type - type of the attachments to get
2092
+ * @param directoryPath - directory path for which attachments are needed
2093
+ * @param fileNamePrefix - file name prefix to filter the list of attachment
2094
+ * @param fetchMetaData - Default is false, set if metadata is needed
2095
+ * @param top - Number of attachments reference to return
2096
+ * @param continuationToken - Header to pass the continuationToken
2097
+ */
2098
+ async getTestRunLogs(project, runId, type, directoryPath, fileNamePrefix, fetchMetaData, top, continuationToken) {
2099
+ const queryValues = {
2100
+ type: type,
2101
+ directoryPath: directoryPath,
2102
+ fileNamePrefix: fileNamePrefix,
2103
+ fetchMetaData: fetchMetaData,
2104
+ top: top
2105
+ };
2106
+ return this.beginRequest({
2107
+ apiVersion: "7.2-preview.1",
2108
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/testlog",
2109
+ routeValues: {
2110
+ project: project,
2111
+ runId: runId
2112
+ },
2113
+ customHeaders: {
2114
+ "x-ms-continuationtoken": continuationToken,
2115
+ },
2116
+ queryParams: queryValues,
2117
+ returnRawResponse: true
2118
+ }).then(async (response) => {
2119
+ const body = await response.text().then(deserializeVssJsonObject);
2120
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
2121
+ return body;
2122
+ });
2123
+ }
2124
+ /**
2125
+ * Get SAS Uri of a build attachment
2126
+ *
2127
+ * @param project - Project ID or project name
2128
+ * @param build - Id of the build to get
2129
+ * @param type - type of the file
2130
+ * @param filePath - filePath for which sas uri is needed
2131
+ */
2132
+ async getTestLogStoreEndpointDetailsForBuildLog(project, build, type, filePath) {
2133
+ const queryValues = {
2134
+ build: build,
2135
+ type: type,
2136
+ filePath: filePath
2137
+ };
2138
+ return this.beginRequest({
2139
+ apiVersion: "7.2-preview.1",
2140
+ routeTemplate: "{project}/_apis/testresults/testlogstoreendpoint",
2141
+ routeValues: {
2142
+ project: project
2143
+ },
2144
+ queryParams: queryValues
2145
+ });
2146
+ }
2147
+ /**
2148
+ * Create and Get sas uri of the build container
2149
+ *
2150
+ * @param project - Project ID or project name
2151
+ * @param buildId - Id of the build to get
2152
+ * @param testLogStoreOperationType - Type of operation to perform using sas uri
2153
+ */
2154
+ async testLogStoreEndpointDetailsForBuild(project, buildId, testLogStoreOperationType) {
2155
+ const queryValues = {
2156
+ buildId: buildId,
2157
+ testLogStoreOperationType: testLogStoreOperationType
2158
+ };
2159
+ return this.beginRequest({
2160
+ apiVersion: "7.2-preview.1",
2161
+ method: "POST",
2162
+ routeTemplate: "{project}/_apis/testresults/testlogstoreendpoint",
2163
+ routeValues: {
2164
+ project: project
2165
+ },
2166
+ queryParams: queryValues
2167
+ });
2168
+ }
2169
+ /**
2170
+ * Get SAS Uri of a test results attachment
2171
+ *
2172
+ * @param project - Project ID or project name
2173
+ * @param runId - Id of the test run that contains result
2174
+ * @param resultId - Id of the test result whose files need to be downloaded
2175
+ * @param type - type of the file
2176
+ * @param filePath - filePath for which sas uri is needed
2177
+ */
2178
+ async getTestLogStoreEndpointDetailsForResultLog(project, runId, resultId, type, filePath) {
2179
+ const queryValues = {
2180
+ type: type,
2181
+ filePath: filePath
2182
+ };
2183
+ return this.beginRequest({
2184
+ apiVersion: "7.2-preview.1",
2185
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint",
2186
+ routeValues: {
2187
+ project: project,
2188
+ runId: runId,
2189
+ resultId: resultId
2190
+ },
2191
+ queryParams: queryValues
2192
+ });
2193
+ }
2194
+ /**
2195
+ * Get SAS Uri of a test subresults attachment
2196
+ *
2197
+ * @param project - Project ID or project name
2198
+ * @param runId - Id of the test run that contains result
2199
+ * @param resultId - Id of the test result that contains subresult
2200
+ * @param subResultId - Id of the test subresult whose file sas uri is needed
2201
+ * @param type - type of the file
2202
+ * @param filePath - filePath for which sas uri is needed
2203
+ */
2204
+ async getTestLogStoreEndpointDetailsForSubResultLog(project, runId, resultId, subResultId, type, filePath) {
2205
+ const queryValues = {
2206
+ subResultId: subResultId,
2207
+ type: type,
2208
+ filePath: filePath
2209
+ };
2210
+ return this.beginRequest({
2211
+ apiVersion: "7.2-preview.1",
2212
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint",
2213
+ routeValues: {
2214
+ project: project,
2215
+ runId: runId,
2216
+ resultId: resultId
2217
+ },
2218
+ queryParams: queryValues
2219
+ });
2220
+ }
2221
+ /**
2222
+ * Create empty file for a result and Get Sas uri for the file
2223
+ *
2224
+ * @param project - Project ID or project name
2225
+ * @param runId - Id of the test run that contains the result
2226
+ * @param resultId - Id of the test results that contains sub result
2227
+ * @param subResultId - Id of the test sub result whose file sas uri is needed
2228
+ * @param filePath - file path inside the sub result for which sas uri is needed
2229
+ * @param type - Type of the file for download
2230
+ */
2231
+ async testLogStoreEndpointDetailsForResult(project, runId, resultId, subResultId, filePath, type) {
2232
+ const queryValues = {
2233
+ subResultId: subResultId,
2234
+ filePath: filePath,
2235
+ type: type
2236
+ };
2237
+ return this.beginRequest({
2238
+ apiVersion: "7.2-preview.1",
2239
+ method: "POST",
2240
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{resultId}/testlogstoreendpoint",
2241
+ routeValues: {
2242
+ project: project,
2243
+ runId: runId,
2244
+ resultId: resultId
2245
+ },
2246
+ queryParams: queryValues
2247
+ });
2248
+ }
2249
+ /**
2250
+ * Get SAS Uri of a test run attachment
2251
+ *
2252
+ * @param project - Project ID or project name
2253
+ * @param runId - Id of the test run whose file has to be downloaded
2254
+ * @param type - type of the file
2255
+ * @param filePath - filePath for which sas uri is needed
2256
+ */
2257
+ async getTestLogStoreEndpointDetailsForRunLog(project, runId, type, filePath) {
2258
+ const queryValues = {
2259
+ type: type,
2260
+ filePath: filePath
2261
+ };
2262
+ return this.beginRequest({
2263
+ apiVersion: "7.2-preview.1",
2264
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/testlogstoreendpoint",
2265
+ routeValues: {
2266
+ project: project,
2267
+ runId: runId
2268
+ },
2269
+ queryParams: queryValues
2270
+ });
2271
+ }
2272
+ /**
2273
+ * Create empty file for a run and Get Sas uri for the file
2274
+ *
2275
+ * @param project - Project ID or project name
2276
+ * @param runId - Id of the run to get endpoint details
2277
+ * @param testLogStoreOperationType - Type of operation to perform using sas uri
2278
+ * @param filePath - file path to create an empty file
2279
+ * @param type - Default is GeneralAttachment, type of empty file to be created
2280
+ */
2281
+ async testLogStoreEndpointDetailsForRun(project, runId, testLogStoreOperationType, filePath, type) {
2282
+ const queryValues = {
2283
+ testLogStoreOperationType: testLogStoreOperationType,
2284
+ filePath: filePath,
2285
+ type: type
2286
+ };
2287
+ return this.beginRequest({
2288
+ apiVersion: "7.2-preview.1",
2289
+ method: "POST",
2290
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/testlogstoreendpoint",
2291
+ routeValues: {
2292
+ project: project,
2293
+ runId: runId
2294
+ },
2295
+ queryParams: queryValues
2296
+ });
2297
+ }
2298
+ /**
2299
+ * Creates TestResultsSession object in TCM data store
2300
+ *
2301
+ * @param session - Received session object.
2302
+ * @param project - Project ID or project name
2303
+ */
2304
+ async createTestSession(session, project) {
2305
+ return this.beginRequest({
2306
+ apiVersion: "7.2-preview.2",
2307
+ method: "POST",
2308
+ routeTemplate: "{project}/_apis/testresults/testsession/session/{sessionId}",
2309
+ routeValues: {
2310
+ project: project
2311
+ },
2312
+ body: session
2313
+ });
2314
+ }
2315
+ /**
2316
+ * Retrieves TestResultsSession metadata object in TCM data store
2317
+ *
2318
+ * @param project - Project ID or project name
2319
+ * @param buildId -
2320
+ */
2321
+ async getTestSession(project, buildId) {
2322
+ const queryValues = {
2323
+ buildId: buildId
2324
+ };
2325
+ return this.beginRequest({
2326
+ apiVersion: "7.2-preview.2",
2327
+ routeTemplate: "{project}/_apis/testresults/testsession/session/{sessionId}",
2328
+ routeValues: {
2329
+ project: project
2330
+ },
2331
+ queryParams: queryValues
2332
+ });
2333
+ }
2334
+ /**
2335
+ * Retrieves TestResultsSession Layout object in TCM data store
2336
+ *
2337
+ * @param project - Project ID or project name
2338
+ * @param sessionId -
2339
+ */
2340
+ async getTestSessionLayout(project, sessionId) {
2341
+ return this.beginRequest({
2342
+ apiVersion: "7.2-preview.2",
2343
+ routeTemplate: "{project}/_apis/testresults/testsession/session/{sessionId}",
2344
+ routeValues: {
2345
+ project: project,
2346
+ sessionId: sessionId
2347
+ }
2348
+ });
2349
+ }
2350
+ /**
2351
+ * Updates Test session object associated to a sessionId
2352
+ *
2353
+ * @param session - Update Session object
2354
+ * @param project - Project ID or project name
2355
+ * @param sessionId - Id of TestResults session to update Test session object for.
2356
+ */
2357
+ async updateTestSession(session, project, sessionId) {
2358
+ return this.beginRequest({
2359
+ apiVersion: "7.2-preview.2",
2360
+ method: "PATCH",
2361
+ routeTemplate: "{project}/_apis/testresults/testsession/session/{sessionId}",
2362
+ routeValues: {
2363
+ project: project,
2364
+ sessionId: sessionId
2365
+ },
2366
+ body: session
2367
+ });
2368
+ }
2369
+ /**
2370
+ * Creates Session Analysis object in TCM data store for a given session
2371
+ *
2372
+ * @param analysis - Session Analysis details
2373
+ * @param project - Project ID or project name
2374
+ * @param sessionId - ID of Session to add Notification
2375
+ */
2376
+ async createAnalysis(analysis, project, sessionId) {
2377
+ return this.beginRequest({
2378
+ apiVersion: "7.2-preview.2",
2379
+ method: "POST",
2380
+ routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/analysis",
2381
+ routeValues: {
2382
+ project: project,
2383
+ sessionId: sessionId
2384
+ },
2385
+ body: analysis
2386
+ });
2387
+ }
2388
+ /**
2389
+ * Creates Environment object in TCM data store
2390
+ *
2391
+ * @param environments - Received Environment object.
2392
+ * @param project - Project ID or project name
2393
+ */
2394
+ async createEnvironment(environments, project) {
2395
+ return this.beginRequest({
2396
+ apiVersion: "7.2-preview.2",
2397
+ method: "POST",
2398
+ routeTemplate: "{project}/_apis/testresults/testsession/environment",
2399
+ routeValues: {
2400
+ project: project
2401
+ },
2402
+ body: environments
2403
+ });
2404
+ }
2405
+ /**
2406
+ * For the provided sessionId, creates environment, configuration, and machine objects in TCM data store
2407
+ *
2408
+ * @param sessionEnvironmentAndMachine -
2409
+ * @param project - Project ID or project name
2410
+ * @param sessionId -
2411
+ */
2412
+ async createEnvironmentAndMachine(sessionEnvironmentAndMachine, project, sessionId) {
2413
+ return this.beginRequest({
2414
+ apiVersion: "7.2-preview.2",
2415
+ method: "POST",
2416
+ routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/machines",
2417
+ routeValues: {
2418
+ project: project,
2419
+ sessionId: sessionId
2420
+ },
2421
+ body: sessionEnvironmentAndMachine
2422
+ });
2423
+ }
2424
+ /**
2425
+ * Retrieves TestResultsSession Layout object in TCM data store
2426
+ *
2427
+ * @param project - Project ID or project name
2428
+ * @param sessionId - Retrieve session object.
2429
+ */
2430
+ async getTestSessionLayoutBySessionId(project, sessionId) {
2431
+ return this.beginRequest({
2432
+ apiVersion: "7.2-preview.2",
2433
+ routeTemplate: "{project}/_apis/testresults/testsession/session/{sessionId}/layout",
2434
+ routeValues: {
2435
+ project: project,
2436
+ sessionId: sessionId
2437
+ }
2438
+ });
2439
+ }
2440
+ /**
2441
+ * Creates Notification object in TCM data store for a given session
2442
+ *
2443
+ * @param notifications - Notification(s) to add for the specified sessionId
2444
+ * @param project - Project ID or project name
2445
+ * @param sessionId - ID of Session to add Notification
2446
+ */
2447
+ async createNotification(notifications, project, sessionId) {
2448
+ return this.beginRequest({
2449
+ apiVersion: "7.2-preview.2",
2450
+ method: "POST",
2451
+ routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/notifications",
2452
+ routeValues: {
2453
+ project: project,
2454
+ sessionId: sessionId
2455
+ },
2456
+ body: notifications
2457
+ });
2458
+ }
2459
+ /**
2460
+ * Retrieves TestResultsSession Notification objects in TCM data store
2461
+ *
2462
+ * @param project - Project ID or project name
2463
+ * @param sessionId - Id of TestResults session to obtain Notifications for.
2464
+ */
2465
+ async getSessionNotifications(project, sessionId) {
2466
+ return this.beginRequest({
2467
+ apiVersion: "7.2-preview.2",
2468
+ routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/notifications",
2469
+ routeValues: {
2470
+ project: project,
2471
+ sessionId: sessionId
2472
+ }
2473
+ });
2474
+ }
2475
+ /**
2476
+ * Add Test Results to test run session
2477
+ *
2478
+ * @param results -
2479
+ * @param project - Project ID or project name
2480
+ * @param runId - RunId of test run
2481
+ */
2482
+ async addTestResultsToTestRunSession(results, project, runId) {
2483
+ return this.beginRequest({
2484
+ apiVersion: "7.2-preview.2",
2485
+ method: "POST",
2486
+ routeTemplate: "{project}/_apis/testresults/testsession/runs/{runId}/results/{testResultId}",
2487
+ routeValues: {
2488
+ project: project,
2489
+ runId: runId
2490
+ },
2491
+ body: results
2492
+ });
2493
+ }
2494
+ /**
2495
+ * @param project - Project ID or project name
2496
+ * @param runId -
2497
+ * @param detailsToInclude -
2498
+ * @param skip -
2499
+ * @param top -
2500
+ * @param outcomes -
2501
+ * @param newTestsOnly -
2502
+ */
2503
+ async getTestSessionResults(project, runId, detailsToInclude, skip, top, outcomes, newTestsOnly) {
2504
+ const queryValues = {
2505
+ detailsToInclude: detailsToInclude,
2506
+ '$skip': skip,
2507
+ '$top': top,
2508
+ outcomes: outcomes && outcomes.join(","),
2509
+ '$newTestsOnly': newTestsOnly
2510
+ };
2511
+ return this.beginRequest({
2512
+ apiVersion: "7.2-preview.2",
2513
+ routeTemplate: "{project}/_apis/testresults/testsession/runs/{runId}/results/{testResultId}",
2514
+ routeValues: {
2515
+ project: project,
2516
+ runId: runId
2517
+ },
2518
+ queryParams: queryValues
2519
+ });
2520
+ }
2521
+ /**
2522
+ * Creates TestResultsMRX objects in TCM data store for existing test results
2523
+ *
2524
+ * @param results - Results object with only test results MRX properties and existing testResultId
2525
+ * @param project - Project ID or project name
2526
+ * @param runId - RunId of test run
2527
+ */
2528
+ async updateTestResultsToTestRunSession(results, project, runId) {
2529
+ return this.beginRequest({
2530
+ apiVersion: "7.2-preview.2",
2531
+ method: "PATCH",
2532
+ routeTemplate: "{project}/_apis/testresults/testsession/runs/{runId}/results/{testResultId}",
2533
+ routeValues: {
2534
+ project: project,
2535
+ runId: runId
2536
+ },
2537
+ body: results
2538
+ });
2539
+ }
2540
+ /**
2541
+ * Creates test result machines for the provided TestRunId
2542
+ *
2543
+ * @param testResultMachines - List of machines for test results in the run
2544
+ * @param project - Project ID or project name
2545
+ * @param runId - ID of the TestRun to add machines for
2546
+ */
2547
+ async createTestResultMachines(testResultMachines, project, runId) {
2548
+ return this.beginRequest({
2549
+ apiVersion: "7.2-preview.2",
2550
+ method: "POST",
2551
+ routeTemplate: "{project}/_apis/testresults/testsession/runs/{runId}/machines",
2552
+ routeValues: {
2553
+ project: project,
2554
+ runId: runId
2555
+ },
2556
+ body: testResultMachines
2557
+ });
2558
+ }
2559
+ /**
2560
+ * Gets test result machines for the provided TestRunId
2561
+ *
2562
+ * @param project - Project ID or project name
2563
+ * @param runId - ID of the TestRun to add machines for
2564
+ */
2565
+ async getTestResultMachines(project, runId) {
2566
+ return this.beginRequest({
2567
+ apiVersion: "7.2-preview.2",
2568
+ routeTemplate: "{project}/_apis/testresults/testsession/runs/{runId}/machines",
2569
+ routeValues: {
2570
+ project: project,
2571
+ runId: runId
2572
+ }
2573
+ });
2574
+ }
2575
+ /**
2576
+ * Gets full TestCaseResult objects with 1MRX details for the provided pipelineId
2577
+ *
2578
+ * @param project - Project ID or project name
2579
+ * @param pipelineId - Pipeline Id. This is same as build Id.
2580
+ * @param stageName - Name of the stage. Maximum supported length for name is 256 character.
2581
+ * @param phaseName - Name of the phase. Maximum supported length for name is 256 character.
2582
+ * @param jobName - Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character.
2583
+ * @param outcomes - List of outcome of results
2584
+ * @param includeAllBuildRuns - Whether to include Test Runs from from all the build runs or not. Defaults to false.
2585
+ * @param top - Maximum number of results to return. Defaults to 10000.
2586
+ * @param continuationToken - Header to pass the continuationToken
2587
+ */
2588
+ async getTestResultsByPipelineMRX(project, pipelineId, stageName, phaseName, jobName, outcomes, includeAllBuildRuns, top, continuationToken) {
2589
+ const queryValues = {
2590
+ pipelineId: pipelineId,
2591
+ stageName: stageName,
2592
+ phaseName: phaseName,
2593
+ jobName: jobName,
2594
+ outcomes: outcomes && outcomes.join(","),
2595
+ includeAllBuildRuns: includeAllBuildRuns,
2596
+ '$top': top
2597
+ };
2598
+ return this.beginRequest({
2599
+ apiVersion: "7.2-preview.2",
2600
+ routeTemplate: "{project}/_apis/testresults/testsession/resultsbypipeline",
2601
+ routeValues: {
2602
+ project: project
2603
+ },
2604
+ customHeaders: {
2605
+ "x-ms-continuationtoken": continuationToken,
2606
+ },
2607
+ queryParams: queryValues,
2608
+ returnRawResponse: true
2609
+ }).then(async (response) => {
2610
+ const body = await response.text().then(deserializeVssJsonObject);
2611
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
2612
+ return body;
2613
+ });
2614
+ }
2615
+ /**
2616
+ * Retrieves Test runs associated to a session
2617
+ *
2618
+ * @param project - Project ID or project name
2619
+ * @param sessionId - Id of TestResults session to obtain Test Runs for.
2620
+ */
2621
+ async getTestRunsBySessionId(project, sessionId) {
2622
+ return this.beginRequest({
2623
+ apiVersion: "7.2-preview.2",
2624
+ routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/runs",
2625
+ routeValues: {
2626
+ project: project,
2627
+ sessionId: sessionId
2628
+ }
2629
+ });
2630
+ }
2631
+ /**
2632
+ * Updates Test runs associated to a session
2633
+ *
2634
+ * @param testRunIds -
2635
+ * @param project - Project ID or project name
2636
+ * @param sessionId - Id of TestResults session to update Test Runs for.
2637
+ */
2638
+ async updateTestRunsBySessionId(testRunIds, project, sessionId) {
2639
+ return this.beginRequest({
2640
+ apiVersion: "7.2-preview.2",
2641
+ method: "PATCH",
2642
+ routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/runs",
2643
+ routeValues: {
2644
+ project: project,
2645
+ sessionId: sessionId
2646
+ },
2647
+ body: testRunIds
2648
+ });
2649
+ }
2650
+ /**
2651
+ * @param testSettings -
2652
+ * @param project - Project ID or project name
2653
+ */
2654
+ async createTestSettings(testSettings, project) {
2655
+ return this.beginRequest({
2656
+ apiVersion: "7.2-preview.1",
2657
+ method: "POST",
2658
+ routeTemplate: "{project}/_apis/testresults/testsettings",
2659
+ routeValues: {
2660
+ project: project
2661
+ },
2662
+ body: testSettings
2663
+ });
2664
+ }
2665
+ /**
2666
+ * @param project - Project ID or project name
2667
+ * @param testSettingsId -
2668
+ */
2669
+ async deleteTestSettings(project, testSettingsId) {
2670
+ const queryValues = {
2671
+ testSettingsId: testSettingsId
2672
+ };
2673
+ return this.beginRequest({
2674
+ apiVersion: "7.2-preview.1",
2675
+ method: "DELETE",
2676
+ routeTemplate: "{project}/_apis/testresults/testsettings",
2677
+ routeValues: {
2678
+ project: project
2679
+ },
2680
+ queryParams: queryValues
2681
+ });
2682
+ }
2683
+ /**
2684
+ * @param project - Project ID or project name
2685
+ * @param testSettingsId -
2686
+ */
2687
+ async getTestSettingsById(project, testSettingsId) {
2688
+ const queryValues = {
2689
+ testSettingsId: testSettingsId
2690
+ };
2691
+ return this.beginRequest({
2692
+ apiVersion: "7.2-preview.1",
2693
+ routeTemplate: "{project}/_apis/testresults/testsettings",
2694
+ routeValues: {
2695
+ project: project
2696
+ },
2697
+ queryParams: queryValues
2698
+ });
2699
+ }
2700
+ /**
2701
+ * Calculate Test Weighted Score for given comman separated list of Test Runs Ids.
2702
+ *
2703
+ * @param project - Project ID or project name
2704
+ * @param runIds - Comman Separated Test Run Ids. Maximum 100 supported.
2705
+ * @param includeAllOutcomes - Include all test results outcome for TWS Calculation. By default, false is considered
2706
+ * @param onlyFlakyResults - Option to return only flaky test results identified as flaky. By default, true is passed
2707
+ */
2708
+ async getTestWeightedScoreByTestRun(project, runIds, includeAllOutcomes, onlyFlakyResults) {
2709
+ const queryValues = {
2710
+ includeAllOutcomes: includeAllOutcomes,
2711
+ onlyFlakyResults: onlyFlakyResults
2712
+ };
2713
+ return this.beginRequest({
2714
+ apiVersion: "7.2-preview.7",
2715
+ routeTemplate: "{project}/_apis/testresults/testweightedscore/{runIds}",
2716
+ routeValues: {
2717
+ project: project,
2718
+ runIds: runIds
2719
+ },
2720
+ queryParams: queryValues
2721
+ });
2722
+ }
2723
+ /**
2724
+ * @param workItemToTestLinks -
2725
+ * @param project - Project ID or project name
2726
+ */
2727
+ async addWorkItemToTestLinks(workItemToTestLinks, project) {
2728
+ return this.beginRequest({
2729
+ apiVersion: "7.2-preview.2",
2730
+ method: "POST",
2731
+ routeTemplate: "{project}/_apis/testresults/testmethods/workitems",
2732
+ routeValues: {
2733
+ project: project
2734
+ },
2735
+ body: workItemToTestLinks
2736
+ });
2737
+ }
2738
+ /**
2739
+ * @param project - Project ID or project name
2740
+ * @param testName -
2741
+ * @param workItemId -
2742
+ */
2743
+ async deleteTestMethodToWorkItemLink(project, testName, workItemId) {
2744
+ const queryValues = {
2745
+ testName: testName,
2746
+ workItemId: workItemId
2747
+ };
2748
+ return this.beginRequest({
2749
+ apiVersion: "7.2-preview.2",
2750
+ method: "DELETE",
2751
+ routeTemplate: "{project}/_apis/testresults/testmethods/{testName}/workitems/{workItemId}",
2752
+ routeValues: {
2753
+ project: project
2754
+ },
2755
+ queryParams: queryValues
2756
+ });
2757
+ }
2758
+ /**
2759
+ * @param project - Project ID or project name
2760
+ * @param testName -
2761
+ */
2762
+ async queryTestMethodLinkedWorkItems(project, testName) {
2763
+ const queryValues = {
2764
+ testName: testName
2765
+ };
2766
+ return this.beginRequest({
2767
+ apiVersion: "7.2-preview.2",
2768
+ method: "POST",
2769
+ routeTemplate: "{project}/_apis/testresults/testmethods/{testName}/workitems/{workItemId}",
2770
+ routeValues: {
2771
+ project: project
2772
+ },
2773
+ queryParams: queryValues
2774
+ });
2775
+ }
2776
+ /**
2777
+ * @param project - Project ID or project name
2778
+ * @param runId -
2779
+ * @param testCaseResultId -
2780
+ */
2781
+ async getTestResultWorkItemsById(project, runId, testCaseResultId) {
2782
+ return this.beginRequest({
2783
+ apiVersion: "7.2-preview.2",
2784
+ routeTemplate: "{project}/_apis/testresults/runs/{runId}/results/{testCaseResultId}/workitems",
2785
+ routeValues: {
2786
+ project: project,
2787
+ runId: runId,
2788
+ testCaseResultId: testCaseResultId
2789
+ }
2790
+ });
2791
+ }
2792
+ /**
2793
+ * Query Test Result WorkItems based on filter
2794
+ *
2795
+ * @param project - Project ID or project name
2796
+ * @param workItemCategory - can take values Microsoft.BugCategory or all(for getting all workitems)
2797
+ * @param automatedTestName -
2798
+ * @param testCaseId -
2799
+ * @param maxCompleteDate -
2800
+ * @param days -
2801
+ * @param workItemCount -
2802
+ */
2803
+ async queryTestResultWorkItems(project, workItemCategory, automatedTestName, testCaseId, maxCompleteDate, days, workItemCount) {
2804
+ const queryValues = {
2805
+ workItemCategory: workItemCategory,
2806
+ automatedTestName: automatedTestName,
2807
+ testCaseId: testCaseId,
2808
+ maxCompleteDate: maxCompleteDate,
2809
+ days: days,
2810
+ '$workItemCount': workItemCount
2811
+ };
2812
+ return this.beginRequest({
2813
+ apiVersion: "7.2-preview.2",
2814
+ routeTemplate: "{project}/_apis/testresults/results/workitems",
2815
+ routeValues: {
2816
+ project: project
2817
+ },
2818
+ queryParams: queryValues
2819
+ });
2820
+ }
2821
+ }
2822
+ TestResultsRestClient.RESOURCE_AREA_ID = "c83eaf52-edf3-4034-ae11-17d38f25404c";