azure-devops-extension-api 4.246.0 → 4.248.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (559) hide show
  1. package/SECURITY.md +41 -0
  2. package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/Reporting.d.ts +48 -0
  3. package/bin/AdvancedSecurity.Reporting/Reporting.js +32 -0
  4. package/bin/AdvancedSecurity.Reporting/Reporting.min.js +1 -0
  5. package/{Alert → bin/Alert}/Alert.d.ts +8 -8
  6. package/{Contributions → bin/Contributions}/ContributionsClient.js +2 -2
  7. package/{Contributions → bin/Contributions}/ContributionsClient.min.js +1 -1
  8. package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.js +7 -7
  9. package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.min.js +1 -1
  10. package/{Git → bin/Git}/Git.d.ts +4 -0
  11. package/bin/LICENSE +21 -0
  12. package/{Management → bin/Management}/Management.d.ts +4 -0
  13. package/bin/README.md +2 -0
  14. package/{TaskAgent → bin/TaskAgent}/TaskAgent.d.ts +8 -0
  15. package/{Test → bin/Test}/Test.d.ts +31 -7
  16. package/{TestPlan → bin/TestPlan}/TestPlan.d.ts +6 -2
  17. package/{TestResults → bin/TestResults}/TestResultsClient.d.ts +24 -1
  18. package/{TestResults → bin/TestResults}/TestResultsClient.js +79 -1
  19. package/bin/TestResults/TestResultsClient.min.js +1 -0
  20. package/bin/package.json +37 -0
  21. package/buildpackage.js +80 -0
  22. package/package.json +1 -1
  23. package/src/Accounts/Accounts.ts +134 -0
  24. package/src/Accounts/AccountsClient.ts +83 -0
  25. package/src/Accounts/index.ts +2 -0
  26. package/src/AdvancedSecurity.Reporting/Reporting.ts +180 -0
  27. package/src/AdvancedSecurity.Reporting/ReportingClient.ts +47 -0
  28. package/src/Alert/Alert.ts +1037 -0
  29. package/src/Alert/AlertClient.ts +330 -0
  30. package/src/Boards/Boards.ts +684 -0
  31. package/src/Boards/BoardsClient.ts +593 -0
  32. package/src/Boards/index.ts +2 -0
  33. package/src/Build/Build.ts +3416 -0
  34. package/src/Build/BuildClient.ts +2740 -0
  35. package/src/Build/BuildServices.ts +39 -0
  36. package/src/Build/index.ts +3 -0
  37. package/src/Comments/Comments.ts +330 -0
  38. package/src/Comments/index.ts +1 -0
  39. package/src/Common/Client.ts +37 -0
  40. package/src/Common/CommonServices.ts +853 -0
  41. package/src/Common/Context.d.ts +46 -0
  42. package/src/Common/Fetch.ts +239 -0
  43. package/src/Common/RestClientBase.ts +186 -0
  44. package/src/Common/System.ts +36 -0
  45. package/src/Common/SystemData.ts +135 -0
  46. package/src/Common/Util/Serialization.ts +59 -0
  47. package/src/Common/Util/Url.ts +773 -0
  48. package/src/Common/index.ts +3 -0
  49. package/src/Contributions/Contributions.ts +708 -0
  50. package/src/Contributions/ContributionsClient.ts +109 -0
  51. package/src/Contributions/index.ts +2 -0
  52. package/src/Core/Core.ts +579 -0
  53. package/src/Core/CoreClient.ts +765 -0
  54. package/src/Core/index.ts +2 -0
  55. package/src/Dashboard/Dashboard.ts +419 -0
  56. package/src/Dashboard/DashboardClient.ts +370 -0
  57. package/src/Dashboard/WidgetConfigHelpers.ts +43 -0
  58. package/src/Dashboard/WidgetContracts.ts +226 -0
  59. package/src/Dashboard/WidgetHelpers.ts +145 -0
  60. package/src/Dashboard/index.ts +5 -0
  61. package/src/DistributedTaskCommon/DistributedTaskCommon.ts +108 -0
  62. package/src/DistributedTaskCommon/index.ts +1 -0
  63. package/src/ExtensionManagement/ExtensionManagement.ts +1205 -0
  64. package/src/ExtensionManagement/ExtensionManagementClient.ts +646 -0
  65. package/src/ExtensionManagement/index.ts +2 -0
  66. package/src/Favorite/Favorite.ts +136 -0
  67. package/src/Favorite/FavoriteClient.ts +301 -0
  68. package/src/FeatureAvailability/FeatureAvailability.ts +20 -0
  69. package/src/FeatureAvailability/FeatureAvailabilityClient.ts +153 -0
  70. package/src/FeatureAvailability/index.ts +2 -0
  71. package/src/FeatureManagement/FeatureManagement.ts +166 -0
  72. package/src/FeatureManagement/FeatureManagementClient.ts +246 -0
  73. package/src/FeatureManagement/index.ts +2 -0
  74. package/src/FileContainer/FileContainer.ts +205 -0
  75. package/src/FileContainer/FileContainerClient.ts +154 -0
  76. package/src/FileContainer/index.ts +2 -0
  77. package/src/FormInput/FormInput.ts +288 -0
  78. package/src/FormInput/index.ts +1 -0
  79. package/src/Gallery/Gallery.ts +1977 -0
  80. package/src/Gallery/GalleryClient.ts +2251 -0
  81. package/src/Gallery/index.ts +2 -0
  82. package/src/Git/CodeEditorTypes.ts +335 -0
  83. package/src/Git/Git.ts +4062 -0
  84. package/src/Git/GitClient.ts +4750 -0
  85. package/src/Git/GitServices.ts +18 -0
  86. package/src/Git/index.ts +4 -0
  87. package/src/Graph/Graph.ts +572 -0
  88. package/src/Graph/GraphClient.ts +846 -0
  89. package/src/Graph/index.ts +2 -0
  90. package/src/Identities/Identities.ts +261 -0
  91. package/src/Identities/IdentityProvider.ts +90 -0
  92. package/src/Identities/IdentityService.ts +89 -0
  93. package/src/Identities/index.ts +3 -0
  94. package/src/Locations/Locations.ts +165 -0
  95. package/src/Locations/LocationsClient.ts +220 -0
  96. package/src/Locations/index.ts +2 -0
  97. package/src/Management/Management.ts +176 -0
  98. package/src/Management/ManagementClient.ts +348 -0
  99. package/src/Notification/Notification.ts +1460 -0
  100. package/src/Notification/NotificationClient.ts +477 -0
  101. package/src/Notification/index.ts +2 -0
  102. package/src/Operations/Operations.ts +86 -0
  103. package/src/Operations/OperationsClient.ts +42 -0
  104. package/src/Operations/index.ts +2 -0
  105. package/src/Pipelines/Pipelines.ts +354 -0
  106. package/src/Pipelines/PipelinesClient.ts +306 -0
  107. package/src/Policy/Policy.ts +173 -0
  108. package/src/Policy/PolicyClient.ts +315 -0
  109. package/src/Policy/index.ts +2 -0
  110. package/src/Profile/Profile.ts +187 -0
  111. package/src/Profile/ProfileClient.ts +328 -0
  112. package/src/Profile/index.ts +2 -0
  113. package/src/ProjectAnalysis/ProjectAnalysis.ts +74 -0
  114. package/src/ProjectAnalysis/ProjectAnalysisClient.ts +124 -0
  115. package/src/ProjectAnalysis/index.ts +2 -0
  116. package/src/Release/Release.ts +4237 -0
  117. package/src/Release/ReleaseClient.ts +2450 -0
  118. package/src/Release/index.ts +2 -0
  119. package/src/ResourceUsage/ResourceUsage.ts +19 -0
  120. package/src/ResourceUsage/ResourceUsageClient.ts +48 -0
  121. package/src/ServiceEndpoint/ServiceEndpoint.ts +930 -0
  122. package/src/ServiceEndpoint/ServiceEndpointClient.ts +617 -0
  123. package/src/ServiceEndpoint/index.ts +2 -0
  124. package/src/ServiceHooks/ServiceHooks.ts +759 -0
  125. package/src/ServiceHooks/ServiceHooksClient.ts +499 -0
  126. package/src/ServiceHooks/index.ts +2 -0
  127. package/src/TaskAgent/TaskAgent.ts +3896 -0
  128. package/src/TaskAgent/TaskAgentClient.ts +3918 -0
  129. package/src/TaskAgent/index.ts +2 -0
  130. package/src/Test/Test.ts +5853 -0
  131. package/src/Test/TestClient.ts +2201 -0
  132. package/src/Test/index.ts +2 -0
  133. package/src/TestPlan/TestPlan.ts +1384 -0
  134. package/src/TestPlan/TestPlanClient.ts +1367 -0
  135. package/src/TestPlan/index.ts +2 -0
  136. package/{AdvancedSecurity.Reporting/Reporting.js → src/TestResults/TestResults.ts} +7 -5
  137. package/src/TestResults/TestResultsClient.ts +3506 -0
  138. package/src/TestResults/index.ts +2 -0
  139. package/src/Tfvc/Tfvc.ts +770 -0
  140. package/src/Tfvc/TfvcClient.ts +757 -0
  141. package/src/Tfvc/index.ts +2 -0
  142. package/src/WebApi/WebApi.ts +452 -0
  143. package/src/WebApi/index.ts +1 -0
  144. package/src/Wiki/Wiki.ts +352 -0
  145. package/src/Wiki/WikiClient.ts +712 -0
  146. package/src/Wiki/index.ts +2 -0
  147. package/src/Work/Work.ts +1367 -0
  148. package/src/Work/WorkClient.ts +1489 -0
  149. package/src/Work/index.ts +2 -0
  150. package/src/WorkItemTracking/WorkItemTracking.ts +2215 -0
  151. package/src/WorkItemTracking/WorkItemTrackingClient.ts +2032 -0
  152. package/src/WorkItemTracking/WorkItemTrackingServices.ts +329 -0
  153. package/src/WorkItemTracking/index.ts +3 -0
  154. package/src/WorkItemTrackingProcess/WorkItemTrackingProcess.ts +1295 -0
  155. package/src/WorkItemTrackingProcess/WorkItemTrackingProcessClient.ts +1455 -0
  156. package/src/WorkItemTrackingProcess/index.ts +2 -0
  157. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.ts +606 -0
  158. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.ts +1175 -0
  159. package/src/WorkItemTrackingProcessDefinitions/index.ts +2 -0
  160. package/src/index.ts +1 -0
  161. package/tsconfig.json +21 -0
  162. package/AdvancedSecurity.Reporting/Reporting.min.js +0 -1
  163. package/TestResults/TestResultsClient.min.js +0 -1
  164. /package/{Accounts → bin/Accounts}/Accounts.d.ts +0 -0
  165. /package/{Accounts → bin/Accounts}/Accounts.js +0 -0
  166. /package/{Accounts → bin/Accounts}/Accounts.min.js +0 -0
  167. /package/{Accounts → bin/Accounts}/AccountsClient.d.ts +0 -0
  168. /package/{Accounts → bin/Accounts}/AccountsClient.js +0 -0
  169. /package/{Accounts → bin/Accounts}/AccountsClient.min.js +0 -0
  170. /package/{Accounts → bin/Accounts}/index.d.ts +0 -0
  171. /package/{Accounts → bin/Accounts}/index.js +0 -0
  172. /package/{Accounts → bin/Accounts}/index.min.js +0 -0
  173. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.d.ts +0 -0
  174. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.js +0 -0
  175. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.min.js +0 -0
  176. /package/{Alert → bin/Alert}/Alert.js +0 -0
  177. /package/{Alert → bin/Alert}/Alert.min.js +0 -0
  178. /package/{Alert → bin/Alert}/AlertClient.d.ts +0 -0
  179. /package/{Alert → bin/Alert}/AlertClient.js +0 -0
  180. /package/{Alert → bin/Alert}/AlertClient.min.js +0 -0
  181. /package/{Boards → bin/Boards}/Boards.d.ts +0 -0
  182. /package/{Boards → bin/Boards}/Boards.js +0 -0
  183. /package/{Boards → bin/Boards}/Boards.min.js +0 -0
  184. /package/{Boards → bin/Boards}/BoardsClient.d.ts +0 -0
  185. /package/{Boards → bin/Boards}/BoardsClient.js +0 -0
  186. /package/{Boards → bin/Boards}/BoardsClient.min.js +0 -0
  187. /package/{Boards → bin/Boards}/index.d.ts +0 -0
  188. /package/{Boards → bin/Boards}/index.js +0 -0
  189. /package/{Boards → bin/Boards}/index.min.js +0 -0
  190. /package/{Build → bin/Build}/Build.d.ts +0 -0
  191. /package/{Build → bin/Build}/Build.js +0 -0
  192. /package/{Build → bin/Build}/Build.min.js +0 -0
  193. /package/{Build → bin/Build}/BuildClient.d.ts +0 -0
  194. /package/{Build → bin/Build}/BuildClient.js +0 -0
  195. /package/{Build → bin/Build}/BuildClient.min.js +0 -0
  196. /package/{Build → bin/Build}/BuildServices.d.ts +0 -0
  197. /package/{Build → bin/Build}/BuildServices.js +0 -0
  198. /package/{Build → bin/Build}/BuildServices.min.js +0 -0
  199. /package/{Build → bin/Build}/index.d.ts +0 -0
  200. /package/{Build → bin/Build}/index.js +0 -0
  201. /package/{Build → bin/Build}/index.min.js +0 -0
  202. /package/{Comments → bin/Comments}/Comments.d.ts +0 -0
  203. /package/{Comments → bin/Comments}/Comments.js +0 -0
  204. /package/{Comments → bin/Comments}/Comments.min.js +0 -0
  205. /package/{Comments → bin/Comments}/index.d.ts +0 -0
  206. /package/{Comments → bin/Comments}/index.js +0 -0
  207. /package/{Comments → bin/Comments}/index.min.js +0 -0
  208. /package/{Common → bin/Common}/Client.d.ts +0 -0
  209. /package/{Common → bin/Common}/Client.js +0 -0
  210. /package/{Common → bin/Common}/Client.min.js +0 -0
  211. /package/{Common → bin/Common}/CommonServices.d.ts +0 -0
  212. /package/{Common → bin/Common}/CommonServices.js +0 -0
  213. /package/{Common → bin/Common}/CommonServices.min.js +0 -0
  214. /package/{Common → bin/Common}/Context.d.ts +0 -0
  215. /package/{Common → bin/Common}/Fetch.d.ts +0 -0
  216. /package/{Common → bin/Common}/Fetch.js +0 -0
  217. /package/{Common → bin/Common}/Fetch.min.js +0 -0
  218. /package/{Common → bin/Common}/RestClientBase.d.ts +0 -0
  219. /package/{Common → bin/Common}/RestClientBase.js +0 -0
  220. /package/{Common → bin/Common}/RestClientBase.min.js +0 -0
  221. /package/{Common → bin/Common}/System.d.ts +0 -0
  222. /package/{Common → bin/Common}/System.js +0 -0
  223. /package/{Common → bin/Common}/System.min.js +0 -0
  224. /package/{Common → bin/Common}/SystemData.d.ts +0 -0
  225. /package/{Common → bin/Common}/SystemData.js +0 -0
  226. /package/{Common → bin/Common}/SystemData.min.js +0 -0
  227. /package/{Common → bin/Common}/Util/Serialization.d.ts +0 -0
  228. /package/{Common → bin/Common}/Util/Serialization.js +0 -0
  229. /package/{Common → bin/Common}/Util/Serialization.min.js +0 -0
  230. /package/{Common → bin/Common}/Util/Url.d.ts +0 -0
  231. /package/{Common → bin/Common}/Util/Url.js +0 -0
  232. /package/{Common → bin/Common}/Util/Url.min.js +0 -0
  233. /package/{Common → bin/Common}/index.d.ts +0 -0
  234. /package/{Common → bin/Common}/index.js +0 -0
  235. /package/{Common → bin/Common}/index.min.js +0 -0
  236. /package/{Contributions → bin/Contributions}/Contributions.d.ts +0 -0
  237. /package/{Contributions → bin/Contributions}/Contributions.js +0 -0
  238. /package/{Contributions → bin/Contributions}/Contributions.min.js +0 -0
  239. /package/{Contributions → bin/Contributions}/ContributionsClient.d.ts +0 -0
  240. /package/{Contributions → bin/Contributions}/index.d.ts +0 -0
  241. /package/{Contributions → bin/Contributions}/index.js +0 -0
  242. /package/{Contributions → bin/Contributions}/index.min.js +0 -0
  243. /package/{Core → bin/Core}/Core.d.ts +0 -0
  244. /package/{Core → bin/Core}/Core.js +0 -0
  245. /package/{Core → bin/Core}/Core.min.js +0 -0
  246. /package/{Core → bin/Core}/CoreClient.d.ts +0 -0
  247. /package/{Core → bin/Core}/CoreClient.js +0 -0
  248. /package/{Core → bin/Core}/CoreClient.min.js +0 -0
  249. /package/{Core → bin/Core}/index.d.ts +0 -0
  250. /package/{Core → bin/Core}/index.js +0 -0
  251. /package/{Core → bin/Core}/index.min.js +0 -0
  252. /package/{Dashboard → bin/Dashboard}/Dashboard.d.ts +0 -0
  253. /package/{Dashboard → bin/Dashboard}/Dashboard.js +0 -0
  254. /package/{Dashboard → bin/Dashboard}/Dashboard.min.js +0 -0
  255. /package/{Dashboard → bin/Dashboard}/DashboardClient.d.ts +0 -0
  256. /package/{Dashboard → bin/Dashboard}/DashboardClient.js +0 -0
  257. /package/{Dashboard → bin/Dashboard}/DashboardClient.min.js +0 -0
  258. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.d.ts +0 -0
  259. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.js +0 -0
  260. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.min.js +0 -0
  261. /package/{Dashboard → bin/Dashboard}/WidgetContracts.d.ts +0 -0
  262. /package/{Dashboard → bin/Dashboard}/WidgetContracts.js +0 -0
  263. /package/{Dashboard → bin/Dashboard}/WidgetContracts.min.js +0 -0
  264. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.d.ts +0 -0
  265. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.js +0 -0
  266. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.min.js +0 -0
  267. /package/{Dashboard → bin/Dashboard}/index.d.ts +0 -0
  268. /package/{Dashboard → bin/Dashboard}/index.js +0 -0
  269. /package/{Dashboard → bin/Dashboard}/index.min.js +0 -0
  270. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.d.ts +0 -0
  271. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.js +0 -0
  272. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.min.js +0 -0
  273. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.d.ts +0 -0
  274. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.js +0 -0
  275. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.min.js +0 -0
  276. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.d.ts +0 -0
  277. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.js +0 -0
  278. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.min.js +0 -0
  279. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.d.ts +0 -0
  280. /package/{ExtensionManagement → bin/ExtensionManagement}/index.d.ts +0 -0
  281. /package/{ExtensionManagement → bin/ExtensionManagement}/index.js +0 -0
  282. /package/{ExtensionManagement → bin/ExtensionManagement}/index.min.js +0 -0
  283. /package/{Favorite → bin/Favorite}/Favorite.d.ts +0 -0
  284. /package/{Favorite → bin/Favorite}/Favorite.js +0 -0
  285. /package/{Favorite → bin/Favorite}/Favorite.min.js +0 -0
  286. /package/{Favorite → bin/Favorite}/FavoriteClient.d.ts +0 -0
  287. /package/{Favorite → bin/Favorite}/FavoriteClient.js +0 -0
  288. /package/{Favorite → bin/Favorite}/FavoriteClient.min.js +0 -0
  289. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.d.ts +0 -0
  290. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.js +0 -0
  291. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.min.js +0 -0
  292. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.d.ts +0 -0
  293. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.js +0 -0
  294. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.min.js +0 -0
  295. /package/{FeatureAvailability → bin/FeatureAvailability}/index.d.ts +0 -0
  296. /package/{FeatureAvailability → bin/FeatureAvailability}/index.js +0 -0
  297. /package/{FeatureAvailability → bin/FeatureAvailability}/index.min.js +0 -0
  298. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.d.ts +0 -0
  299. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.js +0 -0
  300. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.min.js +0 -0
  301. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.d.ts +0 -0
  302. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.js +0 -0
  303. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.min.js +0 -0
  304. /package/{FeatureManagement → bin/FeatureManagement}/index.d.ts +0 -0
  305. /package/{FeatureManagement → bin/FeatureManagement}/index.js +0 -0
  306. /package/{FeatureManagement → bin/FeatureManagement}/index.min.js +0 -0
  307. /package/{FileContainer → bin/FileContainer}/FileContainer.d.ts +0 -0
  308. /package/{FileContainer → bin/FileContainer}/FileContainer.js +0 -0
  309. /package/{FileContainer → bin/FileContainer}/FileContainer.min.js +0 -0
  310. /package/{FileContainer → bin/FileContainer}/FileContainerClient.d.ts +0 -0
  311. /package/{FileContainer → bin/FileContainer}/FileContainerClient.js +0 -0
  312. /package/{FileContainer → bin/FileContainer}/FileContainerClient.min.js +0 -0
  313. /package/{FileContainer → bin/FileContainer}/index.d.ts +0 -0
  314. /package/{FileContainer → bin/FileContainer}/index.js +0 -0
  315. /package/{FileContainer → bin/FileContainer}/index.min.js +0 -0
  316. /package/{FormInput → bin/FormInput}/FormInput.d.ts +0 -0
  317. /package/{FormInput → bin/FormInput}/FormInput.js +0 -0
  318. /package/{FormInput → bin/FormInput}/FormInput.min.js +0 -0
  319. /package/{FormInput → bin/FormInput}/index.d.ts +0 -0
  320. /package/{FormInput → bin/FormInput}/index.js +0 -0
  321. /package/{FormInput → bin/FormInput}/index.min.js +0 -0
  322. /package/{Gallery → bin/Gallery}/Gallery.d.ts +0 -0
  323. /package/{Gallery → bin/Gallery}/Gallery.js +0 -0
  324. /package/{Gallery → bin/Gallery}/Gallery.min.js +0 -0
  325. /package/{Gallery → bin/Gallery}/GalleryClient.d.ts +0 -0
  326. /package/{Gallery → bin/Gallery}/GalleryClient.js +0 -0
  327. /package/{Gallery → bin/Gallery}/GalleryClient.min.js +0 -0
  328. /package/{Gallery → bin/Gallery}/index.d.ts +0 -0
  329. /package/{Gallery → bin/Gallery}/index.js +0 -0
  330. /package/{Gallery → bin/Gallery}/index.min.js +0 -0
  331. /package/{Git → bin/Git}/CodeEditorTypes.d.ts +0 -0
  332. /package/{Git → bin/Git}/CodeEditorTypes.js +0 -0
  333. /package/{Git → bin/Git}/CodeEditorTypes.min.js +0 -0
  334. /package/{Git → bin/Git}/Git.js +0 -0
  335. /package/{Git → bin/Git}/Git.min.js +0 -0
  336. /package/{Git → bin/Git}/GitClient.d.ts +0 -0
  337. /package/{Git → bin/Git}/GitClient.js +0 -0
  338. /package/{Git → bin/Git}/GitClient.min.js +0 -0
  339. /package/{Git → bin/Git}/GitServices.d.ts +0 -0
  340. /package/{Git → bin/Git}/GitServices.js +0 -0
  341. /package/{Git → bin/Git}/GitServices.min.js +0 -0
  342. /package/{Git → bin/Git}/index.d.ts +0 -0
  343. /package/{Git → bin/Git}/index.js +0 -0
  344. /package/{Git → bin/Git}/index.min.js +0 -0
  345. /package/{Graph → bin/Graph}/Graph.d.ts +0 -0
  346. /package/{Graph → bin/Graph}/Graph.js +0 -0
  347. /package/{Graph → bin/Graph}/Graph.min.js +0 -0
  348. /package/{Graph → bin/Graph}/GraphClient.d.ts +0 -0
  349. /package/{Graph → bin/Graph}/GraphClient.js +0 -0
  350. /package/{Graph → bin/Graph}/GraphClient.min.js +0 -0
  351. /package/{Graph → bin/Graph}/index.d.ts +0 -0
  352. /package/{Graph → bin/Graph}/index.js +0 -0
  353. /package/{Graph → bin/Graph}/index.min.js +0 -0
  354. /package/{Identities → bin/Identities}/Identities.d.ts +0 -0
  355. /package/{Identities → bin/Identities}/Identities.js +0 -0
  356. /package/{Identities → bin/Identities}/Identities.min.js +0 -0
  357. /package/{Identities → bin/Identities}/IdentityProvider.d.ts +0 -0
  358. /package/{Identities → bin/Identities}/IdentityProvider.js +0 -0
  359. /package/{Identities → bin/Identities}/IdentityProvider.min.js +0 -0
  360. /package/{Identities → bin/Identities}/IdentityService.d.ts +0 -0
  361. /package/{Identities → bin/Identities}/IdentityService.js +0 -0
  362. /package/{Identities → bin/Identities}/IdentityService.min.js +0 -0
  363. /package/{Identities → bin/Identities}/index.d.ts +0 -0
  364. /package/{Identities → bin/Identities}/index.js +0 -0
  365. /package/{Identities → bin/Identities}/index.min.js +0 -0
  366. /package/{Locations → bin/Locations}/Locations.d.ts +0 -0
  367. /package/{Locations → bin/Locations}/Locations.js +0 -0
  368. /package/{Locations → bin/Locations}/Locations.min.js +0 -0
  369. /package/{Locations → bin/Locations}/LocationsClient.d.ts +0 -0
  370. /package/{Locations → bin/Locations}/LocationsClient.js +0 -0
  371. /package/{Locations → bin/Locations}/LocationsClient.min.js +0 -0
  372. /package/{Locations → bin/Locations}/index.d.ts +0 -0
  373. /package/{Locations → bin/Locations}/index.js +0 -0
  374. /package/{Locations → bin/Locations}/index.min.js +0 -0
  375. /package/{Management → bin/Management}/Management.js +0 -0
  376. /package/{Management → bin/Management}/Management.min.js +0 -0
  377. /package/{Management → bin/Management}/ManagementClient.d.ts +0 -0
  378. /package/{Management → bin/Management}/ManagementClient.js +0 -0
  379. /package/{Management → bin/Management}/ManagementClient.min.js +0 -0
  380. /package/{Notification → bin/Notification}/Notification.d.ts +0 -0
  381. /package/{Notification → bin/Notification}/Notification.js +0 -0
  382. /package/{Notification → bin/Notification}/Notification.min.js +0 -0
  383. /package/{Notification → bin/Notification}/NotificationClient.d.ts +0 -0
  384. /package/{Notification → bin/Notification}/NotificationClient.js +0 -0
  385. /package/{Notification → bin/Notification}/NotificationClient.min.js +0 -0
  386. /package/{Notification → bin/Notification}/index.d.ts +0 -0
  387. /package/{Notification → bin/Notification}/index.js +0 -0
  388. /package/{Notification → bin/Notification}/index.min.js +0 -0
  389. /package/{Operations → bin/Operations}/Operations.d.ts +0 -0
  390. /package/{Operations → bin/Operations}/Operations.js +0 -0
  391. /package/{Operations → bin/Operations}/Operations.min.js +0 -0
  392. /package/{Operations → bin/Operations}/OperationsClient.d.ts +0 -0
  393. /package/{Operations → bin/Operations}/OperationsClient.js +0 -0
  394. /package/{Operations → bin/Operations}/OperationsClient.min.js +0 -0
  395. /package/{Operations → bin/Operations}/index.d.ts +0 -0
  396. /package/{Operations → bin/Operations}/index.js +0 -0
  397. /package/{Operations → bin/Operations}/index.min.js +0 -0
  398. /package/{Pipelines → bin/Pipelines}/Pipelines.d.ts +0 -0
  399. /package/{Pipelines → bin/Pipelines}/Pipelines.js +0 -0
  400. /package/{Pipelines → bin/Pipelines}/Pipelines.min.js +0 -0
  401. /package/{Pipelines → bin/Pipelines}/PipelinesClient.d.ts +0 -0
  402. /package/{Pipelines → bin/Pipelines}/PipelinesClient.js +0 -0
  403. /package/{Pipelines → bin/Pipelines}/PipelinesClient.min.js +0 -0
  404. /package/{Policy → bin/Policy}/Policy.d.ts +0 -0
  405. /package/{Policy → bin/Policy}/Policy.js +0 -0
  406. /package/{Policy → bin/Policy}/Policy.min.js +0 -0
  407. /package/{Policy → bin/Policy}/PolicyClient.d.ts +0 -0
  408. /package/{Policy → bin/Policy}/PolicyClient.js +0 -0
  409. /package/{Policy → bin/Policy}/PolicyClient.min.js +0 -0
  410. /package/{Policy → bin/Policy}/index.d.ts +0 -0
  411. /package/{Policy → bin/Policy}/index.js +0 -0
  412. /package/{Policy → bin/Policy}/index.min.js +0 -0
  413. /package/{Profile → bin/Profile}/Profile.d.ts +0 -0
  414. /package/{Profile → bin/Profile}/Profile.js +0 -0
  415. /package/{Profile → bin/Profile}/Profile.min.js +0 -0
  416. /package/{Profile → bin/Profile}/ProfileClient.d.ts +0 -0
  417. /package/{Profile → bin/Profile}/ProfileClient.js +0 -0
  418. /package/{Profile → bin/Profile}/ProfileClient.min.js +0 -0
  419. /package/{Profile → bin/Profile}/index.d.ts +0 -0
  420. /package/{Profile → bin/Profile}/index.js +0 -0
  421. /package/{Profile → bin/Profile}/index.min.js +0 -0
  422. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.d.ts +0 -0
  423. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.js +0 -0
  424. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.min.js +0 -0
  425. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.d.ts +0 -0
  426. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.js +0 -0
  427. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.min.js +0 -0
  428. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.d.ts +0 -0
  429. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.js +0 -0
  430. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.min.js +0 -0
  431. /package/{Release → bin/Release}/Release.d.ts +0 -0
  432. /package/{Release → bin/Release}/Release.js +0 -0
  433. /package/{Release → bin/Release}/Release.min.js +0 -0
  434. /package/{Release → bin/Release}/ReleaseClient.d.ts +0 -0
  435. /package/{Release → bin/Release}/ReleaseClient.js +0 -0
  436. /package/{Release → bin/Release}/ReleaseClient.min.js +0 -0
  437. /package/{Release → bin/Release}/index.d.ts +0 -0
  438. /package/{Release → bin/Release}/index.js +0 -0
  439. /package/{Release → bin/Release}/index.min.js +0 -0
  440. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.d.ts +0 -0
  441. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.js +0 -0
  442. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.min.js +0 -0
  443. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.d.ts +0 -0
  444. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.js +0 -0
  445. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.min.js +0 -0
  446. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.d.ts +0 -0
  447. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.js +0 -0
  448. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.min.js +0 -0
  449. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.d.ts +0 -0
  450. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.js +0 -0
  451. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.min.js +0 -0
  452. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.d.ts +0 -0
  453. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.js +0 -0
  454. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.min.js +0 -0
  455. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.d.ts +0 -0
  456. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.js +0 -0
  457. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.min.js +0 -0
  458. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.d.ts +0 -0
  459. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.js +0 -0
  460. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.min.js +0 -0
  461. /package/{ServiceHooks → bin/ServiceHooks}/index.d.ts +0 -0
  462. /package/{ServiceHooks → bin/ServiceHooks}/index.js +0 -0
  463. /package/{ServiceHooks → bin/ServiceHooks}/index.min.js +0 -0
  464. /package/{TaskAgent → bin/TaskAgent}/TaskAgent.js +0 -0
  465. /package/{TaskAgent → bin/TaskAgent}/TaskAgent.min.js +0 -0
  466. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.d.ts +0 -0
  467. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.js +0 -0
  468. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.min.js +0 -0
  469. /package/{TaskAgent → bin/TaskAgent}/index.d.ts +0 -0
  470. /package/{TaskAgent → bin/TaskAgent}/index.js +0 -0
  471. /package/{TaskAgent → bin/TaskAgent}/index.min.js +0 -0
  472. /package/{Test → bin/Test}/Test.js +0 -0
  473. /package/{Test → bin/Test}/Test.min.js +0 -0
  474. /package/{Test → bin/Test}/TestClient.d.ts +0 -0
  475. /package/{Test → bin/Test}/TestClient.js +0 -0
  476. /package/{Test → bin/Test}/TestClient.min.js +0 -0
  477. /package/{Test → bin/Test}/index.d.ts +0 -0
  478. /package/{Test → bin/Test}/index.js +0 -0
  479. /package/{Test → bin/Test}/index.min.js +0 -0
  480. /package/{TestPlan → bin/TestPlan}/TestPlan.js +0 -0
  481. /package/{TestPlan → bin/TestPlan}/TestPlan.min.js +0 -0
  482. /package/{TestPlan → bin/TestPlan}/TestPlanClient.d.ts +0 -0
  483. /package/{TestPlan → bin/TestPlan}/TestPlanClient.js +0 -0
  484. /package/{TestPlan → bin/TestPlan}/TestPlanClient.min.js +0 -0
  485. /package/{TestPlan → bin/TestPlan}/index.d.ts +0 -0
  486. /package/{TestPlan → bin/TestPlan}/index.js +0 -0
  487. /package/{TestPlan → bin/TestPlan}/index.min.js +0 -0
  488. /package/{TestResults → bin/TestResults}/TestResults.d.ts +0 -0
  489. /package/{TestResults → bin/TestResults}/TestResults.js +0 -0
  490. /package/{TestResults → bin/TestResults}/TestResults.min.js +0 -0
  491. /package/{TestResults → bin/TestResults}/index.d.ts +0 -0
  492. /package/{TestResults → bin/TestResults}/index.js +0 -0
  493. /package/{TestResults → bin/TestResults}/index.min.js +0 -0
  494. /package/{Tfvc → bin/Tfvc}/Tfvc.d.ts +0 -0
  495. /package/{Tfvc → bin/Tfvc}/Tfvc.js +0 -0
  496. /package/{Tfvc → bin/Tfvc}/Tfvc.min.js +0 -0
  497. /package/{Tfvc → bin/Tfvc}/TfvcClient.d.ts +0 -0
  498. /package/{Tfvc → bin/Tfvc}/TfvcClient.js +0 -0
  499. /package/{Tfvc → bin/Tfvc}/TfvcClient.min.js +0 -0
  500. /package/{Tfvc → bin/Tfvc}/index.d.ts +0 -0
  501. /package/{Tfvc → bin/Tfvc}/index.js +0 -0
  502. /package/{Tfvc → bin/Tfvc}/index.min.js +0 -0
  503. /package/{WebApi → bin/WebApi}/WebApi.d.ts +0 -0
  504. /package/{WebApi → bin/WebApi}/WebApi.js +0 -0
  505. /package/{WebApi → bin/WebApi}/WebApi.min.js +0 -0
  506. /package/{WebApi → bin/WebApi}/index.d.ts +0 -0
  507. /package/{WebApi → bin/WebApi}/index.js +0 -0
  508. /package/{WebApi → bin/WebApi}/index.min.js +0 -0
  509. /package/{Wiki → bin/Wiki}/Wiki.d.ts +0 -0
  510. /package/{Wiki → bin/Wiki}/Wiki.js +0 -0
  511. /package/{Wiki → bin/Wiki}/Wiki.min.js +0 -0
  512. /package/{Wiki → bin/Wiki}/WikiClient.d.ts +0 -0
  513. /package/{Wiki → bin/Wiki}/WikiClient.js +0 -0
  514. /package/{Wiki → bin/Wiki}/WikiClient.min.js +0 -0
  515. /package/{Wiki → bin/Wiki}/index.d.ts +0 -0
  516. /package/{Wiki → bin/Wiki}/index.js +0 -0
  517. /package/{Wiki → bin/Wiki}/index.min.js +0 -0
  518. /package/{Work → bin/Work}/Work.d.ts +0 -0
  519. /package/{Work → bin/Work}/Work.js +0 -0
  520. /package/{Work → bin/Work}/Work.min.js +0 -0
  521. /package/{Work → bin/Work}/WorkClient.d.ts +0 -0
  522. /package/{Work → bin/Work}/WorkClient.js +0 -0
  523. /package/{Work → bin/Work}/WorkClient.min.js +0 -0
  524. /package/{Work → bin/Work}/index.d.ts +0 -0
  525. /package/{Work → bin/Work}/index.js +0 -0
  526. /package/{Work → bin/Work}/index.min.js +0 -0
  527. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.d.ts +0 -0
  528. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.js +0 -0
  529. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.min.js +0 -0
  530. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.d.ts +0 -0
  531. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.js +0 -0
  532. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.min.js +0 -0
  533. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.d.ts +0 -0
  534. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.js +0 -0
  535. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.min.js +0 -0
  536. /package/{WorkItemTracking → bin/WorkItemTracking}/index.d.ts +0 -0
  537. /package/{WorkItemTracking → bin/WorkItemTracking}/index.js +0 -0
  538. /package/{WorkItemTracking → bin/WorkItemTracking}/index.min.js +0 -0
  539. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.d.ts +0 -0
  540. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.js +0 -0
  541. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.min.js +0 -0
  542. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.d.ts +0 -0
  543. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.js +0 -0
  544. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.min.js +0 -0
  545. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.d.ts +0 -0
  546. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.js +0 -0
  547. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.min.js +0 -0
  548. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.d.ts +0 -0
  549. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.js +0 -0
  550. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.min.js +0 -0
  551. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.d.ts +0 -0
  552. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.js +0 -0
  553. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.min.js +0 -0
  554. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.d.ts +0 -0
  555. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.js +0 -0
  556. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.min.js +0 -0
  557. /package/{index.d.ts → bin/index.d.ts} +0 -0
  558. /package/{index.js → bin/index.js} +0 -0
  559. /package/{index.min.js → bin/index.min.js} +0 -0
@@ -0,0 +1,2201 @@
1
+ /*
2
+ * ---------------------------------------------------------
3
+ * Copyright(C) Microsoft Corporation. All rights reserved.
4
+ * ---------------------------------------------------------
5
+ */
6
+
7
+ import { IVssRestClientOptions } from "../Common/Context";
8
+ import { RestClientBase } from "../Common/RestClientBase";
9
+ import { deserializeVssJsonObject } from "../Common/Util/Serialization";
10
+
11
+ import * as TfsCore from "../Core/Core";
12
+ import * as Test from "../Test/Test";
13
+ import * as WebApi from "../WebApi/WebApi";
14
+
15
+ export class TestRestClient extends RestClientBase {
16
+ constructor(options: IVssRestClientOptions) {
17
+ super(options);
18
+ }
19
+
20
+ public static readonly RESOURCE_AREA_ID = "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e";
21
+
22
+ /**
23
+ * Attach a file to test step result
24
+ *
25
+ * @param attachmentRequestModel - Attachment details TestAttachmentRequestModel
26
+ * @param project - Project ID or project name
27
+ * @param runId - ID of the test run that contains the result.
28
+ * @param testCaseResultId - ID of the test result that contains the iteration
29
+ * @param iterationId - ID of the test result iteration.
30
+ * @param actionPath - Hex value of test result action path.
31
+ */
32
+ public async createTestIterationResultAttachment(
33
+ attachmentRequestModel: Test.TestAttachmentRequestModel,
34
+ project: string,
35
+ runId: number,
36
+ testCaseResultId: number,
37
+ iterationId: number,
38
+ actionPath?: string
39
+ ): Promise<Test.TestAttachmentReference> {
40
+
41
+ const queryValues: any = {
42
+ iterationId: iterationId,
43
+ actionPath: actionPath
44
+ };
45
+
46
+ return this.beginRequest<Test.TestAttachmentReference>({
47
+ apiVersion: "7.2-preview.1",
48
+ method: "POST",
49
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
50
+ routeValues: {
51
+ project: project,
52
+ runId: runId,
53
+ testCaseResultId: testCaseResultId
54
+ },
55
+ queryParams: queryValues,
56
+ body: attachmentRequestModel
57
+ });
58
+ }
59
+
60
+ /**
61
+ * Attach a file to a test result.
62
+ *
63
+ * @param attachmentRequestModel - Attachment details TestAttachmentRequestModel
64
+ * @param project - Project ID or project name
65
+ * @param runId - ID of the test run that contains the result.
66
+ * @param testCaseResultId - ID of the test result against which attachment has to be uploaded.
67
+ */
68
+ public async createTestResultAttachment(
69
+ attachmentRequestModel: Test.TestAttachmentRequestModel,
70
+ project: string,
71
+ runId: number,
72
+ testCaseResultId: number
73
+ ): Promise<Test.TestAttachmentReference> {
74
+
75
+ return this.beginRequest<Test.TestAttachmentReference>({
76
+ apiVersion: "7.2-preview.1",
77
+ method: "POST",
78
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
79
+ routeValues: {
80
+ project: project,
81
+ runId: runId,
82
+ testCaseResultId: testCaseResultId
83
+ },
84
+ body: attachmentRequestModel
85
+ });
86
+ }
87
+
88
+ /**
89
+ * Attach a file to a test result
90
+ *
91
+ * @param attachmentRequestModel - Attachment Request Model.
92
+ * @param project - Project ID or project name
93
+ * @param runId - ID of the test run that contains the result.
94
+ * @param testCaseResultId - ID of the test results that contains sub result.
95
+ * @param testSubResultId - ID of the test sub results against which attachment has to be uploaded.
96
+ */
97
+ public async createTestSubResultAttachment(
98
+ attachmentRequestModel: Test.TestAttachmentRequestModel,
99
+ project: string,
100
+ runId: number,
101
+ testCaseResultId: number,
102
+ testSubResultId: number
103
+ ): Promise<Test.TestAttachmentReference> {
104
+
105
+ const queryValues: any = {
106
+ testSubResultId: testSubResultId
107
+ };
108
+
109
+ return this.beginRequest<Test.TestAttachmentReference>({
110
+ apiVersion: "7.2-preview.1",
111
+ method: "POST",
112
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
113
+ routeValues: {
114
+ project: project,
115
+ runId: runId,
116
+ testCaseResultId: testCaseResultId
117
+ },
118
+ queryParams: queryValues,
119
+ body: attachmentRequestModel
120
+ });
121
+ }
122
+
123
+ /**
124
+ * Download a test result attachment by its ID.
125
+ *
126
+ * @param project - Project ID or project name
127
+ * @param runId - ID of the test run that contains the testCaseResultId.
128
+ * @param testCaseResultId - ID of the test result whose attachment has to be downloaded.
129
+ * @param attachmentId - ID of the test result attachment to be downloaded.
130
+ */
131
+ public async getTestResultAttachmentContent(
132
+ project: string,
133
+ runId: number,
134
+ testCaseResultId: number,
135
+ attachmentId: number
136
+ ): Promise<ArrayBuffer> {
137
+
138
+ return this.beginRequest<ArrayBuffer>({
139
+ apiVersion: "7.2-preview.1",
140
+ httpResponseType: "application/octet-stream",
141
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
142
+ routeValues: {
143
+ project: project,
144
+ runId: runId,
145
+ testCaseResultId: testCaseResultId,
146
+ attachmentId: attachmentId
147
+ }
148
+ });
149
+ }
150
+
151
+ /**
152
+ * Get list of test result attachments reference.
153
+ *
154
+ * @param project - Project ID or project name
155
+ * @param runId - ID of the test run that contains the result.
156
+ * @param testCaseResultId - ID of the test result.
157
+ */
158
+ public async getTestResultAttachments(
159
+ project: string,
160
+ runId: number,
161
+ testCaseResultId: number
162
+ ): Promise<Test.TestAttachment[]> {
163
+
164
+ return this.beginRequest<Test.TestAttachment[]>({
165
+ apiVersion: "7.2-preview.1",
166
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
167
+ routeValues: {
168
+ project: project,
169
+ runId: runId,
170
+ testCaseResultId: testCaseResultId
171
+ }
172
+ });
173
+ }
174
+
175
+ /**
176
+ * Download a test result attachment by its ID.
177
+ *
178
+ * @param project - Project ID or project name
179
+ * @param runId - ID of the test run that contains the testCaseResultId.
180
+ * @param testCaseResultId - ID of the test result whose attachment has to be downloaded.
181
+ * @param attachmentId - ID of the test result attachment to be downloaded.
182
+ */
183
+ public async getTestResultAttachmentZip(
184
+ project: string,
185
+ runId: number,
186
+ testCaseResultId: number,
187
+ attachmentId: number
188
+ ): Promise<ArrayBuffer> {
189
+
190
+ return this.beginRequest<ArrayBuffer>({
191
+ apiVersion: "7.2-preview.1",
192
+ httpResponseType: "application/zip",
193
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
194
+ routeValues: {
195
+ project: project,
196
+ runId: runId,
197
+ testCaseResultId: testCaseResultId,
198
+ attachmentId: attachmentId
199
+ }
200
+ });
201
+ }
202
+
203
+ /**
204
+ * Download a test sub result attachment
205
+ *
206
+ * @param project - Project ID or project name
207
+ * @param runId - ID of the test run that contains the result.
208
+ * @param testCaseResultId - ID of the test results that contains sub result.
209
+ * @param attachmentId - ID of the test result attachment to be downloaded
210
+ * @param testSubResultId - ID of the test sub result whose attachment has to be downloaded
211
+ */
212
+ public async getTestSubResultAttachmentContent(
213
+ project: string,
214
+ runId: number,
215
+ testCaseResultId: number,
216
+ attachmentId: number,
217
+ testSubResultId: number
218
+ ): Promise<ArrayBuffer> {
219
+
220
+ const queryValues: any = {
221
+ testSubResultId: testSubResultId
222
+ };
223
+
224
+ return this.beginRequest<ArrayBuffer>({
225
+ apiVersion: "7.2-preview.1",
226
+ httpResponseType: "application/octet-stream",
227
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
228
+ routeValues: {
229
+ project: project,
230
+ runId: runId,
231
+ testCaseResultId: testCaseResultId,
232
+ attachmentId: attachmentId
233
+ },
234
+ queryParams: queryValues
235
+ });
236
+ }
237
+
238
+ /**
239
+ * Get list of test sub result attachments
240
+ *
241
+ * @param project - Project ID or project name
242
+ * @param runId - ID of the test run that contains the result.
243
+ * @param testCaseResultId - ID of the test results that contains sub result.
244
+ * @param testSubResultId - ID of the test sub result whose attachment has to be downloaded
245
+ */
246
+ public async getTestSubResultAttachments(
247
+ project: string,
248
+ runId: number,
249
+ testCaseResultId: number,
250
+ testSubResultId: number
251
+ ): Promise<Test.TestAttachment[]> {
252
+
253
+ const queryValues: any = {
254
+ testSubResultId: testSubResultId
255
+ };
256
+
257
+ return this.beginRequest<Test.TestAttachment[]>({
258
+ apiVersion: "7.2-preview.1",
259
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
260
+ routeValues: {
261
+ project: project,
262
+ runId: runId,
263
+ testCaseResultId: testCaseResultId
264
+ },
265
+ queryParams: queryValues
266
+ });
267
+ }
268
+
269
+ /**
270
+ * Download a test sub result attachment
271
+ *
272
+ * @param project - Project ID or project name
273
+ * @param runId - ID of the test run that contains the result.
274
+ * @param testCaseResultId - ID of the test results that contains sub result.
275
+ * @param attachmentId - ID of the test result attachment to be downloaded
276
+ * @param testSubResultId - ID of the test sub result whose attachment has to be downloaded
277
+ */
278
+ public async getTestSubResultAttachmentZip(
279
+ project: string,
280
+ runId: number,
281
+ testCaseResultId: number,
282
+ attachmentId: number,
283
+ testSubResultId: number
284
+ ): Promise<ArrayBuffer> {
285
+
286
+ const queryValues: any = {
287
+ testSubResultId: testSubResultId
288
+ };
289
+
290
+ return this.beginRequest<ArrayBuffer>({
291
+ apiVersion: "7.2-preview.1",
292
+ httpResponseType: "application/zip",
293
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Attachments/{attachmentId}",
294
+ routeValues: {
295
+ project: project,
296
+ runId: runId,
297
+ testCaseResultId: testCaseResultId,
298
+ attachmentId: attachmentId
299
+ },
300
+ queryParams: queryValues
301
+ });
302
+ }
303
+
304
+ /**
305
+ * Attach a file to a test run.
306
+ *
307
+ * @param attachmentRequestModel - Attachment details TestAttachmentRequestModel
308
+ * @param project - Project ID or project name
309
+ * @param runId - ID of the test run against which attachment has to be uploaded.
310
+ */
311
+ public async createTestRunAttachment(
312
+ attachmentRequestModel: Test.TestAttachmentRequestModel,
313
+ project: string,
314
+ runId: number
315
+ ): Promise<Test.TestAttachmentReference> {
316
+
317
+ return this.beginRequest<Test.TestAttachmentReference>({
318
+ apiVersion: "7.2-preview.1",
319
+ method: "POST",
320
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",
321
+ routeValues: {
322
+ project: project,
323
+ runId: runId
324
+ },
325
+ body: attachmentRequestModel
326
+ });
327
+ }
328
+
329
+ /**
330
+ * Download a test run attachment by its ID.
331
+ *
332
+ * @param project - Project ID or project name
333
+ * @param runId - ID of the test run whose attachment has to be downloaded.
334
+ * @param attachmentId - ID of the test run attachment to be downloaded.
335
+ */
336
+ public async getTestRunAttachmentContent(
337
+ project: string,
338
+ runId: number,
339
+ attachmentId: number
340
+ ): Promise<ArrayBuffer> {
341
+
342
+ return this.beginRequest<ArrayBuffer>({
343
+ apiVersion: "7.2-preview.1",
344
+ httpResponseType: "application/octet-stream",
345
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",
346
+ routeValues: {
347
+ project: project,
348
+ runId: runId,
349
+ attachmentId: attachmentId
350
+ }
351
+ });
352
+ }
353
+
354
+ /**
355
+ * Get list of test run attachments reference.
356
+ *
357
+ * @param project - Project ID or project name
358
+ * @param runId - ID of the test run.
359
+ */
360
+ public async getTestRunAttachments(
361
+ project: string,
362
+ runId: number
363
+ ): Promise<Test.TestAttachment[]> {
364
+
365
+ return this.beginRequest<Test.TestAttachment[]>({
366
+ apiVersion: "7.2-preview.1",
367
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",
368
+ routeValues: {
369
+ project: project,
370
+ runId: runId
371
+ }
372
+ });
373
+ }
374
+
375
+ /**
376
+ * Download a test run attachment by its ID.
377
+ *
378
+ * @param project - Project ID or project name
379
+ * @param runId - ID of the test run whose attachment has to be downloaded.
380
+ * @param attachmentId - ID of the test run attachment to be downloaded.
381
+ */
382
+ public async getTestRunAttachmentZip(
383
+ project: string,
384
+ runId: number,
385
+ attachmentId: number
386
+ ): Promise<ArrayBuffer> {
387
+
388
+ return this.beginRequest<ArrayBuffer>({
389
+ apiVersion: "7.2-preview.1",
390
+ httpResponseType: "application/zip",
391
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Attachments/{attachmentId}",
392
+ routeValues: {
393
+ project: project,
394
+ runId: runId,
395
+ attachmentId: attachmentId
396
+ }
397
+ });
398
+ }
399
+
400
+ /**
401
+ * @param project - Project ID or project name
402
+ * @param runId -
403
+ * @param testCaseResultId -
404
+ */
405
+ public async getBugsLinkedToTestResult(
406
+ project: string,
407
+ runId: number,
408
+ testCaseResultId: number
409
+ ): Promise<Test.WorkItemReference[]> {
410
+
411
+ return this.beginRequest<Test.WorkItemReference[]>({
412
+ apiVersion: "7.2-preview.1",
413
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Bugs",
414
+ routeValues: {
415
+ project: project,
416
+ runId: runId,
417
+ testCaseResultId: testCaseResultId
418
+ }
419
+ });
420
+ }
421
+
422
+ /**
423
+ * Get code coverage data for a build.
424
+ *
425
+ * @param project - Project ID or project name
426
+ * @param buildId - ID of the build for which code coverage data needs to be fetched.
427
+ * @param flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
428
+ */
429
+ public async getBuildCodeCoverage(
430
+ project: string,
431
+ buildId: number,
432
+ flags: number
433
+ ): Promise<Test.BuildCoverage[]> {
434
+
435
+ const queryValues: any = {
436
+ buildId: buildId,
437
+ flags: flags
438
+ };
439
+
440
+ return this.beginRequest<Test.BuildCoverage[]>({
441
+ apiVersion: "7.2-preview.1",
442
+ routeTemplate: "{project}/_apis/test/CodeCoverage",
443
+ routeValues: {
444
+ project: project
445
+ },
446
+ queryParams: queryValues
447
+ });
448
+ }
449
+
450
+ /**
451
+ * Get Code Coverage Summary for Build.
452
+ *
453
+ * @param project - Project ID or project name
454
+ * @param buildId - ID of the build for which code coverage data needs to be fetched.
455
+ * @param deltaBuildId - Delta Build id (optional)
456
+ */
457
+ public async getCodeCoverageSummary(
458
+ project: string,
459
+ buildId: number,
460
+ deltaBuildId?: number
461
+ ): Promise<Test.CodeCoverageSummary> {
462
+
463
+ const queryValues: any = {
464
+ buildId: buildId,
465
+ deltaBuildId: deltaBuildId
466
+ };
467
+
468
+ return this.beginRequest<Test.CodeCoverageSummary>({
469
+ apiVersion: "7.2-preview.1",
470
+ routeTemplate: "{project}/_apis/test/CodeCoverage",
471
+ routeValues: {
472
+ project: project
473
+ },
474
+ queryParams: queryValues
475
+ });
476
+ }
477
+
478
+ /**
479
+ * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary
480
+ *
481
+ * @param coverageData -
482
+ * @param project - Project ID or project name
483
+ * @param buildId -
484
+ */
485
+ public async updateCodeCoverageSummary(
486
+ coverageData: Test.CodeCoverageData,
487
+ project: string,
488
+ buildId: number
489
+ ): Promise<void> {
490
+
491
+ const queryValues: any = {
492
+ buildId: buildId
493
+ };
494
+
495
+ return this.beginRequest<void>({
496
+ apiVersion: "7.2-preview.1",
497
+ method: "POST",
498
+ routeTemplate: "{project}/_apis/test/CodeCoverage",
499
+ routeValues: {
500
+ project: project
501
+ },
502
+ queryParams: queryValues,
503
+ body: coverageData
504
+ });
505
+ }
506
+
507
+ /**
508
+ * Get code coverage data for a test run
509
+ *
510
+ * @param project - Project ID or project name
511
+ * @param runId - ID of the test run for which code coverage data needs to be fetched.
512
+ * @param flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData.
513
+ */
514
+ public async getTestRunCodeCoverage(
515
+ project: string,
516
+ runId: number,
517
+ flags: number
518
+ ): Promise<Test.TestRunCoverage[]> {
519
+
520
+ const queryValues: any = {
521
+ flags: flags
522
+ };
523
+
524
+ return this.beginRequest<Test.TestRunCoverage[]>({
525
+ apiVersion: "7.2-preview.1",
526
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/CodeCoverage",
527
+ routeValues: {
528
+ project: project,
529
+ runId: runId
530
+ },
531
+ queryParams: queryValues
532
+ });
533
+ }
534
+
535
+ /**
536
+ * @param newFields -
537
+ * @param project - Project ID or project name
538
+ */
539
+ public async addCustomFields(
540
+ newFields: Test.CustomTestFieldDefinition[],
541
+ project: string
542
+ ): Promise<Test.CustomTestFieldDefinition[]> {
543
+
544
+ return this.beginRequest<Test.CustomTestFieldDefinition[]>({
545
+ apiVersion: "7.2-preview.1",
546
+ method: "POST",
547
+ routeTemplate: "{project}/_apis/test/ExtensionFields",
548
+ routeValues: {
549
+ project: project
550
+ },
551
+ body: newFields
552
+ });
553
+ }
554
+
555
+ /**
556
+ * @param project - Project ID or project name
557
+ * @param scopeFilter -
558
+ */
559
+ public async queryCustomFields(
560
+ project: string,
561
+ scopeFilter: Test.CustomTestFieldScope
562
+ ): Promise<Test.CustomTestFieldDefinition[]> {
563
+
564
+ const queryValues: any = {
565
+ scopeFilter: scopeFilter
566
+ };
567
+
568
+ return this.beginRequest<Test.CustomTestFieldDefinition[]>({
569
+ apiVersion: "7.2-preview.1",
570
+ routeTemplate: "{project}/_apis/test/ExtensionFields",
571
+ routeValues: {
572
+ project: project
573
+ },
574
+ queryParams: queryValues
575
+ });
576
+ }
577
+
578
+ /**
579
+ * @param filter -
580
+ * @param project - Project ID or project name
581
+ */
582
+ public async queryTestResultHistory(
583
+ filter: Test.ResultsFilter,
584
+ project: string
585
+ ): Promise<Test.TestResultHistory> {
586
+
587
+ return this.beginRequest<Test.TestResultHistory>({
588
+ apiVersion: "7.2-preview.1",
589
+ method: "POST",
590
+ routeTemplate: "{project}/_apis/test/Results/History",
591
+ routeValues: {
592
+ project: project
593
+ },
594
+ body: filter
595
+ });
596
+ }
597
+
598
+ /**
599
+ * Get iteration for a result
600
+ *
601
+ * @param project - Project ID or project name
602
+ * @param runId - ID of the test run that contains the result.
603
+ * @param testCaseResultId - ID of the test result that contains the iterations.
604
+ * @param iterationId - Id of the test results Iteration.
605
+ * @param includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration.
606
+ */
607
+ public async getTestIteration(
608
+ project: string,
609
+ runId: number,
610
+ testCaseResultId: number,
611
+ iterationId: number,
612
+ includeActionResults?: boolean
613
+ ): Promise<Test.TestIterationDetailsModel> {
614
+
615
+ const queryValues: any = {
616
+ includeActionResults: includeActionResults
617
+ };
618
+
619
+ return this.beginRequest<Test.TestIterationDetailsModel>({
620
+ apiVersion: "7.2-preview.3",
621
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}",
622
+ routeValues: {
623
+ project: project,
624
+ runId: runId,
625
+ testCaseResultId: testCaseResultId,
626
+ iterationId: iterationId
627
+ },
628
+ queryParams: queryValues
629
+ });
630
+ }
631
+
632
+ /**
633
+ * Get iterations for a result
634
+ *
635
+ * @param project - Project ID or project name
636
+ * @param runId - ID of the test run that contains the result.
637
+ * @param testCaseResultId - ID of the test result that contains the iterations.
638
+ * @param includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration.
639
+ */
640
+ public async getTestIterations(
641
+ project: string,
642
+ runId: number,
643
+ testCaseResultId: number,
644
+ includeActionResults?: boolean
645
+ ): Promise<Test.TestIterationDetailsModel[]> {
646
+
647
+ const queryValues: any = {
648
+ includeActionResults: includeActionResults
649
+ };
650
+
651
+ return this.beginRequest<Test.TestIterationDetailsModel[]>({
652
+ apiVersion: "7.2-preview.3",
653
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}/Iterations/{iterationId}",
654
+ routeValues: {
655
+ project: project,
656
+ runId: runId,
657
+ testCaseResultId: testCaseResultId
658
+ },
659
+ queryParams: queryValues
660
+ });
661
+ }
662
+
663
+ /**
664
+ * @param workItemQuery -
665
+ * @param project - Project ID or project name
666
+ */
667
+ public async getLinkedWorkItemsByQuery(
668
+ workItemQuery: Test.LinkedWorkItemsQuery,
669
+ project: string
670
+ ): Promise<Test.LinkedWorkItemsQueryResult[]> {
671
+
672
+ return this.beginRequest<Test.LinkedWorkItemsQueryResult[]>({
673
+ apiVersion: "7.2-preview.1",
674
+ method: "POST",
675
+ routeTemplate: "{project}/_apis/test/LinkedWorkItemsQuery",
676
+ routeValues: {
677
+ project: project
678
+ },
679
+ body: workItemQuery
680
+ });
681
+ }
682
+
683
+ /**
684
+ * Get test run message logs
685
+ *
686
+ * @param project - Project ID or project name
687
+ * @param runId - ID of the run to get.
688
+ */
689
+ public async getTestRunLogs(
690
+ project: string,
691
+ runId: number
692
+ ): Promise<Test.TestMessageLogDetails[]> {
693
+
694
+ return this.beginRequest<Test.TestMessageLogDetails[]>({
695
+ apiVersion: "7.2-preview.1",
696
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/MessageLogs",
697
+ routeValues: {
698
+ project: project,
699
+ runId: runId
700
+ }
701
+ });
702
+ }
703
+
704
+ /**
705
+ * Get a test point.
706
+ *
707
+ * @param project - Project ID or project name
708
+ * @param planId - ID of the test plan.
709
+ * @param suiteId - ID of the suite that contains the point.
710
+ * @param pointIds - ID of the test point to get.
711
+ * @param witFields - Comma-separated list of work item field names.
712
+ */
713
+ public async getPoint(
714
+ project: string,
715
+ planId: number,
716
+ suiteId: number,
717
+ pointIds: number,
718
+ witFields?: string
719
+ ): Promise<Test.TestPoint> {
720
+
721
+ const queryValues: any = {
722
+ witFields: witFields
723
+ };
724
+
725
+ return this.beginRequest<Test.TestPoint>({
726
+ apiVersion: "7.2-preview.2",
727
+ routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",
728
+ routeValues: {
729
+ project: project,
730
+ planId: planId,
731
+ suiteId: suiteId,
732
+ pointIds: pointIds
733
+ },
734
+ queryParams: queryValues
735
+ });
736
+ }
737
+
738
+ /**
739
+ * Get a list of test points.
740
+ *
741
+ * @param project - Project ID or project name
742
+ * @param planId - ID of the test plan.
743
+ * @param suiteId - ID of the suite that contains the points.
744
+ * @param witFields - Comma-separated list of work item field names.
745
+ * @param configurationId - Get test points for specific configuration.
746
+ * @param testCaseId - Get test points for a specific test case, valid when configurationId is not set.
747
+ * @param testPointIds - Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set.
748
+ * @param includePointDetails - Include all properties for the test point.
749
+ * @param skip - Number of test points to skip..
750
+ * @param top - Number of test points to return.
751
+ */
752
+ public async getPoints(
753
+ project: string,
754
+ planId: number,
755
+ suiteId: number,
756
+ witFields?: string,
757
+ configurationId?: string,
758
+ testCaseId?: string,
759
+ testPointIds?: string,
760
+ includePointDetails?: boolean,
761
+ skip?: number,
762
+ top?: number
763
+ ): Promise<Test.TestPoint[]> {
764
+
765
+ const queryValues: any = {
766
+ witFields: witFields,
767
+ configurationId: configurationId,
768
+ testCaseId: testCaseId,
769
+ testPointIds: testPointIds,
770
+ includePointDetails: includePointDetails,
771
+ '$skip': skip,
772
+ '$top': top
773
+ };
774
+
775
+ return this.beginRequest<Test.TestPoint[]>({
776
+ apiVersion: "7.2-preview.2",
777
+ routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",
778
+ routeValues: {
779
+ project: project,
780
+ planId: planId,
781
+ suiteId: suiteId
782
+ },
783
+ queryParams: queryValues
784
+ });
785
+ }
786
+
787
+ /**
788
+ * Update test points.
789
+ *
790
+ * @param pointUpdateModel - Data to update.
791
+ * @param project - Project ID or project name
792
+ * @param planId - ID of the test plan.
793
+ * @param suiteId - ID of the suite that contains the points.
794
+ * @param pointIds - ID of the test point to get. Use a comma-separated list of IDs to update multiple test points.
795
+ */
796
+ public async updateTestPoints(
797
+ pointUpdateModel: Test.PointUpdateModel,
798
+ project: string,
799
+ planId: number,
800
+ suiteId: number,
801
+ pointIds: string
802
+ ): Promise<Test.TestPoint[]> {
803
+
804
+ return this.beginRequest<Test.TestPoint[]>({
805
+ apiVersion: "7.2-preview.2",
806
+ method: "PATCH",
807
+ routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/Points/{pointIds}",
808
+ routeValues: {
809
+ project: project,
810
+ planId: planId,
811
+ suiteId: suiteId,
812
+ pointIds: pointIds
813
+ },
814
+ body: pointUpdateModel
815
+ });
816
+ }
817
+
818
+ /**
819
+ * Get test points using query.
820
+ *
821
+ * @param query - TestPointsQuery to get test points.
822
+ * @param project - Project ID or project name
823
+ * @param skip - Number of test points to skip..
824
+ * @param top - Number of test points to return.
825
+ */
826
+ public async getPointsByQuery(
827
+ query: Test.TestPointsQuery,
828
+ project: string,
829
+ skip?: number,
830
+ top?: number
831
+ ): Promise<Test.TestPointsQuery> {
832
+
833
+ const queryValues: any = {
834
+ '$skip': skip,
835
+ '$top': top
836
+ };
837
+
838
+ return this.beginRequest<Test.TestPointsQuery>({
839
+ apiVersion: "7.2-preview.2",
840
+ method: "POST",
841
+ routeTemplate: "{project}/_apis/test/Points",
842
+ routeValues: {
843
+ project: project
844
+ },
845
+ queryParams: queryValues,
846
+ body: query
847
+ });
848
+ }
849
+
850
+ /**
851
+ * @param project - Project ID or project name
852
+ * @param buildId -
853
+ * @param publishContext -
854
+ * @param groupBy -
855
+ * @param filter -
856
+ * @param orderby -
857
+ * @param shouldIncludeResults -
858
+ * @param queryRunSummaryForInProgress -
859
+ */
860
+ public async getTestResultDetailsForBuild(
861
+ project: string,
862
+ buildId: number,
863
+ publishContext?: string,
864
+ groupBy?: string,
865
+ filter?: string,
866
+ orderby?: string,
867
+ shouldIncludeResults?: boolean,
868
+ queryRunSummaryForInProgress?: boolean
869
+ ): Promise<Test.TestResultsDetails> {
870
+
871
+ const queryValues: any = {
872
+ buildId: buildId,
873
+ publishContext: publishContext,
874
+ groupBy: groupBy,
875
+ '$filter': filter,
876
+ '$orderby': orderby,
877
+ shouldIncludeResults: shouldIncludeResults,
878
+ queryRunSummaryForInProgress: queryRunSummaryForInProgress
879
+ };
880
+
881
+ return this.beginRequest<Test.TestResultsDetails>({
882
+ apiVersion: "7.2-preview.2",
883
+ routeTemplate: "{project}/_apis/test/ResultDetailsByBuild",
884
+ routeValues: {
885
+ project: project
886
+ },
887
+ queryParams: queryValues
888
+ });
889
+ }
890
+
891
+ /**
892
+ * @param project - Project ID or project name
893
+ * @param releaseId -
894
+ * @param releaseEnvId -
895
+ * @param publishContext -
896
+ * @param groupBy -
897
+ * @param filter -
898
+ * @param orderby -
899
+ * @param shouldIncludeResults -
900
+ * @param queryRunSummaryForInProgress -
901
+ */
902
+ public async getTestResultDetailsForRelease(
903
+ project: string,
904
+ releaseId: number,
905
+ releaseEnvId: number,
906
+ publishContext?: string,
907
+ groupBy?: string,
908
+ filter?: string,
909
+ orderby?: string,
910
+ shouldIncludeResults?: boolean,
911
+ queryRunSummaryForInProgress?: boolean
912
+ ): Promise<Test.TestResultsDetails> {
913
+
914
+ const queryValues: any = {
915
+ releaseId: releaseId,
916
+ releaseEnvId: releaseEnvId,
917
+ publishContext: publishContext,
918
+ groupBy: groupBy,
919
+ '$filter': filter,
920
+ '$orderby': orderby,
921
+ shouldIncludeResults: shouldIncludeResults,
922
+ queryRunSummaryForInProgress: queryRunSummaryForInProgress
923
+ };
924
+
925
+ return this.beginRequest<Test.TestResultsDetails>({
926
+ apiVersion: "7.2-preview.2",
927
+ routeTemplate: "{project}/_apis/test/ResultDetailsByRelease",
928
+ routeValues: {
929
+ project: project
930
+ },
931
+ queryParams: queryValues
932
+ });
933
+ }
934
+
935
+ /**
936
+ * @param document -
937
+ * @param project - Project ID or project name
938
+ * @param runId -
939
+ */
940
+ public async publishTestResultDocument(
941
+ document: Test.TestResultDocument,
942
+ project: string,
943
+ runId: number
944
+ ): Promise<Test.TestResultDocument> {
945
+
946
+ return this.beginRequest<Test.TestResultDocument>({
947
+ apiVersion: "7.2-preview.1",
948
+ method: "POST",
949
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/ResultDocument",
950
+ routeValues: {
951
+ project: project,
952
+ runId: runId
953
+ },
954
+ body: document
955
+ });
956
+ }
957
+
958
+ /**
959
+ * @param project - Project ID or project name
960
+ * @param buildId -
961
+ * @param publishContext -
962
+ * @param fields -
963
+ * @param continuationToken -
964
+ */
965
+ public async getResultGroupsByBuild(
966
+ project: string,
967
+ buildId: number,
968
+ publishContext: string,
969
+ fields?: string[],
970
+ continuationToken?: string
971
+ ): Promise<WebApi.PagedList<Test.FieldDetailsForTestResults>> {
972
+
973
+ const queryValues: any = {
974
+ buildId: buildId,
975
+ publishContext: publishContext,
976
+ fields: fields && fields.join(","),
977
+ continuationToken: continuationToken
978
+ };
979
+
980
+ return this.beginRequest<Response>({
981
+ apiVersion: "7.2-preview.2",
982
+ routeTemplate: "{project}/_apis/test/ResultGroupsByBuild",
983
+ routeValues: {
984
+ project: project
985
+ },
986
+ queryParams: queryValues,
987
+ returnRawResponse: true
988
+ }).then(async response => {
989
+ const body = <WebApi.PagedList<Test.FieldDetailsForTestResults>>await response.text().then(deserializeVssJsonObject);
990
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
991
+ return body;
992
+ });
993
+ }
994
+
995
+ /**
996
+ * @param project - Project ID or project name
997
+ * @param releaseId -
998
+ * @param publishContext -
999
+ * @param releaseEnvId -
1000
+ * @param fields -
1001
+ * @param continuationToken -
1002
+ */
1003
+ public async getResultGroupsByRelease(
1004
+ project: string,
1005
+ releaseId: number,
1006
+ publishContext: string,
1007
+ releaseEnvId?: number,
1008
+ fields?: string[],
1009
+ continuationToken?: string
1010
+ ): Promise<WebApi.PagedList<Test.FieldDetailsForTestResults>> {
1011
+
1012
+ const queryValues: any = {
1013
+ releaseId: releaseId,
1014
+ publishContext: publishContext,
1015
+ releaseEnvId: releaseEnvId,
1016
+ fields: fields && fields.join(","),
1017
+ continuationToken: continuationToken
1018
+ };
1019
+
1020
+ return this.beginRequest<Response>({
1021
+ apiVersion: "7.2-preview.2",
1022
+ routeTemplate: "{project}/_apis/test/ResultGroupsByRelease",
1023
+ routeValues: {
1024
+ project: project
1025
+ },
1026
+ queryParams: queryValues,
1027
+ returnRawResponse: true
1028
+ }).then(async response => {
1029
+ const body = <WebApi.PagedList<Test.FieldDetailsForTestResults>>await response.text().then(deserializeVssJsonObject);
1030
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
1031
+ return body;
1032
+ });
1033
+ }
1034
+
1035
+ /**
1036
+ * Get list of test Result meta data details for corresponding testcasereferenceId
1037
+ *
1038
+ * @param testReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200).
1039
+ * @param project - Project ID or project name
1040
+ */
1041
+ public async queryTestResultsMetaData(
1042
+ testReferenceIds: string[],
1043
+ project: string
1044
+ ): Promise<Test.TestResultMetaData[]> {
1045
+
1046
+ return this.beginRequest<Test.TestResultMetaData[]>({
1047
+ apiVersion: "7.2-preview.2",
1048
+ method: "POST",
1049
+ routeTemplate: "{project}/_apis/test/Results/ResultMetaData",
1050
+ routeValues: {
1051
+ project: project
1052
+ },
1053
+ body: testReferenceIds
1054
+ });
1055
+ }
1056
+
1057
+ /**
1058
+ * Get test result retention settings
1059
+ *
1060
+ * @param project - Project ID or project name
1061
+ */
1062
+ public async getResultRetentionSettings(
1063
+ project: string
1064
+ ): Promise<Test.ResultRetentionSettings> {
1065
+
1066
+ return this.beginRequest<Test.ResultRetentionSettings>({
1067
+ apiVersion: "7.2-preview.1",
1068
+ routeTemplate: "{project}/_apis/test/ResultRetentionSettings",
1069
+ routeValues: {
1070
+ project: project
1071
+ }
1072
+ });
1073
+ }
1074
+
1075
+ /**
1076
+ * Update test result retention settings
1077
+ *
1078
+ * @param retentionSettings - Test result retention settings details to be updated
1079
+ * @param project - Project ID or project name
1080
+ */
1081
+ public async updateResultRetentionSettings(
1082
+ retentionSettings: Test.ResultRetentionSettings,
1083
+ project: string
1084
+ ): Promise<Test.ResultRetentionSettings> {
1085
+
1086
+ return this.beginRequest<Test.ResultRetentionSettings>({
1087
+ apiVersion: "7.2-preview.1",
1088
+ method: "PATCH",
1089
+ routeTemplate: "{project}/_apis/test/ResultRetentionSettings",
1090
+ routeValues: {
1091
+ project: project
1092
+ },
1093
+ body: retentionSettings
1094
+ });
1095
+ }
1096
+
1097
+ /**
1098
+ * Add test results to a test run.
1099
+ *
1100
+ * @param results - List of test results to add.
1101
+ * @param project - Project ID or project name
1102
+ * @param runId - Test run ID into which test results to add.
1103
+ */
1104
+ public async addTestResultsToTestRun(
1105
+ results: Test.TestCaseResult[],
1106
+ project: string,
1107
+ runId: number
1108
+ ): Promise<Test.TestCaseResult[]> {
1109
+
1110
+ return this.beginRequest<Test.TestCaseResult[]>({
1111
+ apiVersion: "7.2-preview.6",
1112
+ method: "POST",
1113
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",
1114
+ routeValues: {
1115
+ project: project,
1116
+ runId: runId
1117
+ },
1118
+ body: results
1119
+ });
1120
+ }
1121
+
1122
+ /**
1123
+ * Get a test result for a test run.
1124
+ *
1125
+ * @param project - Project ID or project name
1126
+ * @param runId - Test run ID of a test result to fetch.
1127
+ * @param testCaseResultId - Test result ID.
1128
+ * @param detailsToInclude - Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults.
1129
+ */
1130
+ public async getTestResultById(
1131
+ project: string,
1132
+ runId: number,
1133
+ testCaseResultId: number,
1134
+ detailsToInclude?: Test.ResultDetails
1135
+ ): Promise<Test.TestCaseResult> {
1136
+
1137
+ const queryValues: any = {
1138
+ detailsToInclude: detailsToInclude
1139
+ };
1140
+
1141
+ return this.beginRequest<Test.TestCaseResult>({
1142
+ apiVersion: "7.2-preview.6",
1143
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",
1144
+ routeValues: {
1145
+ project: project,
1146
+ runId: runId,
1147
+ testCaseResultId: testCaseResultId
1148
+ },
1149
+ queryParams: queryValues
1150
+ });
1151
+ }
1152
+
1153
+ /**
1154
+ * Get test results for a test run.
1155
+ *
1156
+ * @param project - Project ID or project name
1157
+ * @param runId - Test run ID of test results to fetch.
1158
+ * @param detailsToInclude - Details to include with test results. Default is None. Other values are Iterations and WorkItems.
1159
+ * @param skip - Number of test results to skip from beginning.
1160
+ * @param top - Number of test results to return. Maximum is 1000 when detailsToInclude is None and 200 otherwise.
1161
+ * @param outcomes - Comma separated list of test outcomes to filter test results.
1162
+ */
1163
+ public async getTestResults(
1164
+ project: string,
1165
+ runId: number,
1166
+ detailsToInclude?: Test.ResultDetails,
1167
+ skip?: number,
1168
+ top?: number,
1169
+ outcomes?: Test.TestOutcome[]
1170
+ ): Promise<Test.TestCaseResult[]> {
1171
+
1172
+ const queryValues: any = {
1173
+ detailsToInclude: detailsToInclude,
1174
+ '$skip': skip,
1175
+ '$top': top,
1176
+ outcomes: outcomes && outcomes.join(",")
1177
+ };
1178
+
1179
+ return this.beginRequest<Test.TestCaseResult[]>({
1180
+ apiVersion: "7.2-preview.6",
1181
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",
1182
+ routeValues: {
1183
+ project: project,
1184
+ runId: runId
1185
+ },
1186
+ queryParams: queryValues
1187
+ });
1188
+ }
1189
+
1190
+ /**
1191
+ * Update test results in a test run.
1192
+ *
1193
+ * @param results - List of test results to update.
1194
+ * @param project - Project ID or project name
1195
+ * @param runId - Test run ID whose test results to update.
1196
+ */
1197
+ public async updateTestResults(
1198
+ results: Test.TestCaseResult[],
1199
+ project: string,
1200
+ runId: number
1201
+ ): Promise<Test.TestCaseResult[]> {
1202
+
1203
+ return this.beginRequest<Test.TestCaseResult[]>({
1204
+ apiVersion: "7.2-preview.6",
1205
+ method: "PATCH",
1206
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Results/{testCaseResultId}",
1207
+ routeValues: {
1208
+ project: project,
1209
+ runId: runId
1210
+ },
1211
+ body: results
1212
+ });
1213
+ }
1214
+
1215
+ /**
1216
+ * This API will return results by Ids with fields specified/trend for particular automated test method. We are still improving this API and have not finalized proper signature and contract.
1217
+ *
1218
+ * @param query -
1219
+ * @param project - Project ID or project name
1220
+ */
1221
+ public async getTestResultsByQuery(
1222
+ query: Test.TestResultsQuery,
1223
+ project: string
1224
+ ): Promise<Test.TestResultsQuery> {
1225
+
1226
+ return this.beginRequest<Test.TestResultsQuery>({
1227
+ apiVersion: "7.2-preview.6",
1228
+ method: "POST",
1229
+ routeTemplate: "{project}/_apis/test/Results",
1230
+ routeValues: {
1231
+ project: project
1232
+ },
1233
+ body: query
1234
+ });
1235
+ }
1236
+
1237
+ /**
1238
+ * @param project - Project ID or project name
1239
+ * @param buildId -
1240
+ * @param publishContext -
1241
+ * @param outcomes -
1242
+ * @param top -
1243
+ * @param continuationToken -
1244
+ */
1245
+ public async getTestResultsByBuild(
1246
+ project: string,
1247
+ buildId: number,
1248
+ publishContext?: string,
1249
+ outcomes?: Test.TestOutcome[],
1250
+ top?: number,
1251
+ continuationToken?: string
1252
+ ): Promise<WebApi.PagedList<Test.ShallowTestCaseResult>> {
1253
+
1254
+ const queryValues: any = {
1255
+ buildId: buildId,
1256
+ publishContext: publishContext,
1257
+ outcomes: outcomes && outcomes.join(","),
1258
+ '$top': top,
1259
+ continuationToken: continuationToken
1260
+ };
1261
+
1262
+ return this.beginRequest<Response>({
1263
+ apiVersion: "7.2-preview.1",
1264
+ routeTemplate: "{project}/_apis/test/ResultsByBuild",
1265
+ routeValues: {
1266
+ project: project
1267
+ },
1268
+ queryParams: queryValues,
1269
+ returnRawResponse: true
1270
+ }).then(async response => {
1271
+ const body = <WebApi.PagedList<Test.ShallowTestCaseResult>>await response.text().then(deserializeVssJsonObject);
1272
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
1273
+ return body;
1274
+ });
1275
+ }
1276
+
1277
+ /**
1278
+ * @param project - Project ID or project name
1279
+ * @param releaseId -
1280
+ * @param releaseEnvid -
1281
+ * @param publishContext -
1282
+ * @param outcomes -
1283
+ * @param top -
1284
+ * @param continuationToken -
1285
+ */
1286
+ public async getTestResultsByRelease(
1287
+ project: string,
1288
+ releaseId: number,
1289
+ releaseEnvid?: number,
1290
+ publishContext?: string,
1291
+ outcomes?: Test.TestOutcome[],
1292
+ top?: number,
1293
+ continuationToken?: string
1294
+ ): Promise<WebApi.PagedList<Test.ShallowTestCaseResult>> {
1295
+
1296
+ const queryValues: any = {
1297
+ releaseId: releaseId,
1298
+ releaseEnvid: releaseEnvid,
1299
+ publishContext: publishContext,
1300
+ outcomes: outcomes && outcomes.join(","),
1301
+ '$top': top,
1302
+ continuationToken: continuationToken
1303
+ };
1304
+
1305
+ return this.beginRequest<Response>({
1306
+ apiVersion: "7.2-preview.1",
1307
+ routeTemplate: "{project}/_apis/test/ResultsByRelease",
1308
+ routeValues: {
1309
+ project: project
1310
+ },
1311
+ queryParams: queryValues,
1312
+ returnRawResponse: true
1313
+ }).then(async response => {
1314
+ const body = <WebApi.PagedList<Test.ShallowTestCaseResult>>await response.text().then(deserializeVssJsonObject);
1315
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
1316
+ return body;
1317
+ });
1318
+ }
1319
+
1320
+ /**
1321
+ * @param project - Project ID or project name
1322
+ * @param buildId -
1323
+ * @param publishContext -
1324
+ * @param includeFailureDetails -
1325
+ * @param buildToCompare -
1326
+ */
1327
+ public async queryTestResultsReportForBuild(
1328
+ project: string,
1329
+ buildId: number,
1330
+ publishContext?: string,
1331
+ includeFailureDetails?: boolean,
1332
+ buildToCompare?: Test.BuildReference
1333
+ ): Promise<Test.TestResultSummary> {
1334
+
1335
+ const queryValues: any = {
1336
+ buildId: buildId,
1337
+ publishContext: publishContext,
1338
+ includeFailureDetails: includeFailureDetails,
1339
+ buildToCompare: buildToCompare
1340
+ };
1341
+
1342
+ return this.beginRequest<Test.TestResultSummary>({
1343
+ apiVersion: "7.2-preview.3",
1344
+ routeTemplate: "{project}/_apis/test/ResultSummaryByBuild",
1345
+ routeValues: {
1346
+ project: project
1347
+ },
1348
+ queryParams: queryValues
1349
+ });
1350
+ }
1351
+
1352
+ /**
1353
+ * @param project - Project ID or project name
1354
+ * @param releaseId -
1355
+ * @param releaseEnvId -
1356
+ * @param publishContext -
1357
+ * @param includeFailureDetails -
1358
+ * @param releaseToCompare -
1359
+ */
1360
+ public async queryTestResultsReportForRelease(
1361
+ project: string,
1362
+ releaseId: number,
1363
+ releaseEnvId: number,
1364
+ publishContext?: string,
1365
+ includeFailureDetails?: boolean,
1366
+ releaseToCompare?: Test.ReleaseReference
1367
+ ): Promise<Test.TestResultSummary> {
1368
+
1369
+ const queryValues: any = {
1370
+ releaseId: releaseId,
1371
+ releaseEnvId: releaseEnvId,
1372
+ publishContext: publishContext,
1373
+ includeFailureDetails: includeFailureDetails,
1374
+ releaseToCompare: releaseToCompare
1375
+ };
1376
+
1377
+ return this.beginRequest<Test.TestResultSummary>({
1378
+ apiVersion: "7.2-preview.3",
1379
+ routeTemplate: "{project}/_apis/test/ResultSummaryByRelease",
1380
+ routeValues: {
1381
+ project: project
1382
+ },
1383
+ queryParams: queryValues
1384
+ });
1385
+ }
1386
+
1387
+ /**
1388
+ * @param releases -
1389
+ * @param project - Project ID or project name
1390
+ */
1391
+ public async queryTestResultsSummaryForReleases(
1392
+ releases: Test.ReleaseReference[],
1393
+ project: string
1394
+ ): Promise<Test.TestResultSummary[]> {
1395
+
1396
+ return this.beginRequest<Test.TestResultSummary[]>({
1397
+ apiVersion: "7.2-preview.3",
1398
+ method: "POST",
1399
+ routeTemplate: "{project}/_apis/test/ResultSummaryByRelease",
1400
+ routeValues: {
1401
+ project: project
1402
+ },
1403
+ body: releases
1404
+ });
1405
+ }
1406
+
1407
+ /**
1408
+ * @param resultsContext -
1409
+ * @param project - Project ID or project name
1410
+ * @param workItemIds -
1411
+ */
1412
+ public async queryTestSummaryByRequirement(
1413
+ resultsContext: Test.TestResultsContext,
1414
+ project: string,
1415
+ workItemIds?: number[]
1416
+ ): Promise<Test.TestSummaryForWorkItem[]> {
1417
+
1418
+ const queryValues: any = {
1419
+ workItemIds: workItemIds && workItemIds.join(",")
1420
+ };
1421
+
1422
+ return this.beginRequest<Test.TestSummaryForWorkItem[]>({
1423
+ apiVersion: "7.2-preview.1",
1424
+ method: "POST",
1425
+ routeTemplate: "{project}/_apis/test/ResultSummaryByRequirement",
1426
+ routeValues: {
1427
+ project: project
1428
+ },
1429
+ queryParams: queryValues,
1430
+ body: resultsContext
1431
+ });
1432
+ }
1433
+
1434
+ /**
1435
+ * @param filter -
1436
+ * @param project - Project ID or project name
1437
+ */
1438
+ public async queryResultTrendForBuild(
1439
+ filter: Test.TestResultTrendFilter,
1440
+ project: string
1441
+ ): Promise<Test.AggregatedDataForResultTrend[]> {
1442
+
1443
+ return this.beginRequest<Test.AggregatedDataForResultTrend[]>({
1444
+ apiVersion: "7.2-preview.1",
1445
+ method: "POST",
1446
+ routeTemplate: "{project}/_apis/test/ResultTrendByBuild",
1447
+ routeValues: {
1448
+ project: project
1449
+ },
1450
+ body: filter
1451
+ });
1452
+ }
1453
+
1454
+ /**
1455
+ * @param filter -
1456
+ * @param project - Project ID or project name
1457
+ */
1458
+ public async queryResultTrendForRelease(
1459
+ filter: Test.TestResultTrendFilter,
1460
+ project: string
1461
+ ): Promise<Test.AggregatedDataForResultTrend[]> {
1462
+
1463
+ return this.beginRequest<Test.AggregatedDataForResultTrend[]>({
1464
+ apiVersion: "7.2-preview.1",
1465
+ method: "POST",
1466
+ routeTemplate: "{project}/_apis/test/ResultTrendByRelease",
1467
+ routeValues: {
1468
+ project: project
1469
+ },
1470
+ body: filter
1471
+ });
1472
+ }
1473
+
1474
+ /**
1475
+ * Get test run statistics , used when we want to get summary of a run by outcome.
1476
+ *
1477
+ * @param project - Project ID or project name
1478
+ * @param runId - ID of the run to get.
1479
+ */
1480
+ public async getTestRunStatistics(
1481
+ project: string,
1482
+ runId: number
1483
+ ): Promise<Test.TestRunStatistic> {
1484
+
1485
+ return this.beginRequest<Test.TestRunStatistic>({
1486
+ apiVersion: "7.2-preview.3",
1487
+ routeTemplate: "{project}/_apis/test/Runs/{runId}/Statistics",
1488
+ routeValues: {
1489
+ project: project,
1490
+ runId: runId
1491
+ }
1492
+ });
1493
+ }
1494
+
1495
+ /**
1496
+ * Create new test run.
1497
+ *
1498
+ * @param testRun - Run details RunCreateModel
1499
+ * @param project - Project ID or project name
1500
+ */
1501
+ public async createTestRun(
1502
+ testRun: Test.RunCreateModel,
1503
+ project: string
1504
+ ): Promise<Test.TestRun> {
1505
+
1506
+ return this.beginRequest<Test.TestRun>({
1507
+ apiVersion: "7.2-preview.3",
1508
+ method: "POST",
1509
+ routeTemplate: "{project}/_apis/test/Runs/{runId}",
1510
+ routeValues: {
1511
+ project: project
1512
+ },
1513
+ body: testRun
1514
+ });
1515
+ }
1516
+
1517
+ /**
1518
+ * Delete a test run by its ID.
1519
+ *
1520
+ * @param project - Project ID or project name
1521
+ * @param runId - ID of the run to delete.
1522
+ */
1523
+ public async deleteTestRun(
1524
+ project: string,
1525
+ runId: number
1526
+ ): Promise<void> {
1527
+
1528
+ return this.beginRequest<void>({
1529
+ apiVersion: "7.2-preview.3",
1530
+ method: "DELETE",
1531
+ routeTemplate: "{project}/_apis/test/Runs/{runId}",
1532
+ routeValues: {
1533
+ project: project,
1534
+ runId: runId
1535
+ }
1536
+ });
1537
+ }
1538
+
1539
+ /**
1540
+ * Get a test run by its ID.
1541
+ *
1542
+ * @param project - Project ID or project name
1543
+ * @param runId - ID of the run to get.
1544
+ * @param includeDetails - Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more.
1545
+ */
1546
+ public async getTestRunById(
1547
+ project: string,
1548
+ runId: number,
1549
+ includeDetails?: boolean
1550
+ ): Promise<Test.TestRun> {
1551
+
1552
+ const queryValues: any = {
1553
+ includeDetails: includeDetails
1554
+ };
1555
+
1556
+ return this.beginRequest<Test.TestRun>({
1557
+ apiVersion: "7.2-preview.3",
1558
+ routeTemplate: "{project}/_apis/test/Runs/{runId}",
1559
+ routeValues: {
1560
+ project: project,
1561
+ runId: runId
1562
+ },
1563
+ queryParams: queryValues
1564
+ });
1565
+ }
1566
+
1567
+ /**
1568
+ * Get a list of test runs.
1569
+ *
1570
+ * @param project - Project ID or project name
1571
+ * @param buildUri - URI of the build that the runs used.
1572
+ * @param owner - Team foundation ID of the owner of the runs.
1573
+ * @param tmiRunId -
1574
+ * @param planId - ID of the test plan that the runs are a part of.
1575
+ * @param includeRunDetails - If true, include all the properties of the runs.
1576
+ * @param automated - If true, only returns automated runs.
1577
+ * @param skip - Number of test runs to skip.
1578
+ * @param top - Number of test runs to return.
1579
+ */
1580
+ public async getTestRuns(
1581
+ project: string,
1582
+ buildUri?: string,
1583
+ owner?: string,
1584
+ tmiRunId?: string,
1585
+ planId?: number,
1586
+ includeRunDetails?: boolean,
1587
+ automated?: boolean,
1588
+ skip?: number,
1589
+ top?: number
1590
+ ): Promise<Test.TestRun[]> {
1591
+
1592
+ const queryValues: any = {
1593
+ buildUri: buildUri,
1594
+ owner: owner,
1595
+ tmiRunId: tmiRunId,
1596
+ planId: planId,
1597
+ includeRunDetails: includeRunDetails,
1598
+ automated: automated,
1599
+ '$skip': skip,
1600
+ '$top': top
1601
+ };
1602
+
1603
+ return this.beginRequest<Test.TestRun[]>({
1604
+ apiVersion: "7.2-preview.3",
1605
+ routeTemplate: "{project}/_apis/test/Runs/{runId}",
1606
+ routeValues: {
1607
+ project: project
1608
+ },
1609
+ queryParams: queryValues
1610
+ });
1611
+ }
1612
+
1613
+ /**
1614
+ * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate.
1615
+ *
1616
+ * @param project - Project ID or project name
1617
+ * @param minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory).
1618
+ * @param maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days).
1619
+ * @param state - Current state of the Runs to be queried.
1620
+ * @param planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
1621
+ * @param isAutomated - Automation type of the Runs to be queried.
1622
+ * @param publishContext - PublishContext of the Runs to be queried.
1623
+ * @param buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
1624
+ * @param buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
1625
+ * @param branchName - Source Branch name of the Runs to be queried.
1626
+ * @param releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
1627
+ * @param releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
1628
+ * @param releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
1629
+ * @param releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10).
1630
+ * @param runTitle - Run Title of the Runs to be queried.
1631
+ * @param top - Number of runs to be queried. Limit is 100
1632
+ * @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.
1633
+ */
1634
+ public async queryTestRuns(
1635
+ project: string,
1636
+ minLastUpdatedDate: Date,
1637
+ maxLastUpdatedDate: Date,
1638
+ state?: Test.TestRunState,
1639
+ planIds?: number[],
1640
+ isAutomated?: boolean,
1641
+ publishContext?: Test.TestRunPublishContext,
1642
+ buildIds?: number[],
1643
+ buildDefIds?: number[],
1644
+ branchName?: string,
1645
+ releaseIds?: number[],
1646
+ releaseDefIds?: number[],
1647
+ releaseEnvIds?: number[],
1648
+ releaseEnvDefIds?: number[],
1649
+ runTitle?: string,
1650
+ top?: number,
1651
+ continuationToken?: string
1652
+ ): Promise<WebApi.PagedList<Test.TestRun>> {
1653
+
1654
+ const queryValues: any = {
1655
+ minLastUpdatedDate: minLastUpdatedDate,
1656
+ maxLastUpdatedDate: maxLastUpdatedDate,
1657
+ state: state,
1658
+ planIds: planIds && planIds.join(","),
1659
+ isAutomated: isAutomated,
1660
+ publishContext: publishContext,
1661
+ buildIds: buildIds && buildIds.join(","),
1662
+ buildDefIds: buildDefIds && buildDefIds.join(","),
1663
+ branchName: branchName,
1664
+ releaseIds: releaseIds && releaseIds.join(","),
1665
+ releaseDefIds: releaseDefIds && releaseDefIds.join(","),
1666
+ releaseEnvIds: releaseEnvIds && releaseEnvIds.join(","),
1667
+ releaseEnvDefIds: releaseEnvDefIds && releaseEnvDefIds.join(","),
1668
+ runTitle: runTitle,
1669
+ '$top': top,
1670
+ continuationToken: continuationToken
1671
+ };
1672
+
1673
+ return this.beginRequest<Response>({
1674
+ apiVersion: "7.2-preview.3",
1675
+ routeTemplate: "{project}/_apis/test/Runs/{runId}",
1676
+ routeValues: {
1677
+ project: project
1678
+ },
1679
+ queryParams: queryValues,
1680
+ returnRawResponse: true
1681
+ }).then(async response => {
1682
+ const body = <WebApi.PagedList<Test.TestRun>>await response.text().then(deserializeVssJsonObject);
1683
+ body.continuationToken = response.headers.get("x-ms-continuationtoken");
1684
+ return body;
1685
+ });
1686
+ }
1687
+
1688
+ /**
1689
+ * Update test run by its ID.
1690
+ *
1691
+ * @param runUpdateModel - Run details RunUpdateModel
1692
+ * @param project - Project ID or project name
1693
+ * @param runId - ID of the run to update.
1694
+ */
1695
+ public async updateTestRun(
1696
+ runUpdateModel: Test.RunUpdateModel,
1697
+ project: string,
1698
+ runId: number
1699
+ ): Promise<Test.TestRun> {
1700
+
1701
+ return this.beginRequest<Test.TestRun>({
1702
+ apiVersion: "7.2-preview.3",
1703
+ method: "PATCH",
1704
+ routeTemplate: "{project}/_apis/test/Runs/{runId}",
1705
+ routeValues: {
1706
+ project: project,
1707
+ runId: runId
1708
+ },
1709
+ body: runUpdateModel
1710
+ });
1711
+ }
1712
+
1713
+ /**
1714
+ * Create a test session
1715
+ *
1716
+ * @param testSession - Test session details for creation
1717
+ * @param teamContext - The team context for the operation
1718
+ */
1719
+ public async createTestSession(
1720
+ testSession: Test.TestSession,
1721
+ teamContext: TfsCore.TeamContext
1722
+ ): Promise<Test.TestSession> {
1723
+
1724
+ const project = teamContext.projectId || teamContext.project;
1725
+ const team = teamContext.teamId || teamContext.team;
1726
+
1727
+ return this.beginRequest<Test.TestSession>({
1728
+ apiVersion: "7.2-preview.1",
1729
+ method: "POST",
1730
+ routeTemplate: "{project}/{team}/_apis/test/Session/{testSessionId}",
1731
+ routeValues: {
1732
+ project: project,
1733
+ team: team
1734
+ },
1735
+ body: testSession
1736
+ });
1737
+ }
1738
+
1739
+ /**
1740
+ * Get a list of test sessions
1741
+ *
1742
+ * @param teamContext - The team context for the operation
1743
+ * @param period - Period in days from now, for which test sessions are fetched.
1744
+ * @param allSessions - If false, returns test sessions for current user. Otherwise, it returns test sessions for all users
1745
+ * @param includeAllProperties - If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version.
1746
+ * @param source - Source of the test session.
1747
+ * @param includeOnlyCompletedSessions - If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states
1748
+ */
1749
+ public async getTestSessions(
1750
+ teamContext: TfsCore.TeamContext,
1751
+ period?: number,
1752
+ allSessions?: boolean,
1753
+ includeAllProperties?: boolean,
1754
+ source?: Test.TestSessionSource,
1755
+ includeOnlyCompletedSessions?: boolean
1756
+ ): Promise<Test.TestSession[]> {
1757
+
1758
+ const queryValues: any = {
1759
+ period: period,
1760
+ allSessions: allSessions,
1761
+ includeAllProperties: includeAllProperties,
1762
+ source: source,
1763
+ includeOnlyCompletedSessions: includeOnlyCompletedSessions
1764
+ };
1765
+
1766
+ const project = teamContext.projectId || teamContext.project;
1767
+ const team = teamContext.teamId || teamContext.team;
1768
+
1769
+ return this.beginRequest<Test.TestSession[]>({
1770
+ apiVersion: "7.2-preview.1",
1771
+ routeTemplate: "{project}/{team}/_apis/test/Session/{testSessionId}",
1772
+ routeValues: {
1773
+ project: project,
1774
+ team: team
1775
+ },
1776
+ queryParams: queryValues
1777
+ });
1778
+ }
1779
+
1780
+ /**
1781
+ * Update a test session
1782
+ *
1783
+ * @param testSession - Test session details for update
1784
+ * @param teamContext - The team context for the operation
1785
+ */
1786
+ public async updateTestSession(
1787
+ testSession: Test.TestSession,
1788
+ teamContext: TfsCore.TeamContext
1789
+ ): Promise<Test.TestSession> {
1790
+
1791
+ const project = teamContext.projectId || teamContext.project;
1792
+ const team = teamContext.teamId || teamContext.team;
1793
+
1794
+ return this.beginRequest<Test.TestSession>({
1795
+ apiVersion: "7.2-preview.1",
1796
+ method: "PATCH",
1797
+ routeTemplate: "{project}/{team}/_apis/test/Session/{testSessionId}",
1798
+ routeValues: {
1799
+ project: project,
1800
+ team: team
1801
+ },
1802
+ body: testSession
1803
+ });
1804
+ }
1805
+
1806
+ /**
1807
+ * @param project - Project ID or project name
1808
+ * @param sharedParameterId -
1809
+ */
1810
+ public async deleteSharedParameter(
1811
+ project: string,
1812
+ sharedParameterId: number
1813
+ ): Promise<void> {
1814
+
1815
+ return this.beginRequest<void>({
1816
+ apiVersion: "7.2-preview.1",
1817
+ method: "DELETE",
1818
+ routeTemplate: "{project}/_apis/test/SharedParameter/{sharedParameterId}",
1819
+ routeValues: {
1820
+ project: project,
1821
+ sharedParameterId: sharedParameterId
1822
+ }
1823
+ });
1824
+ }
1825
+
1826
+ /**
1827
+ * @param project - Project ID or project name
1828
+ * @param sharedStepId -
1829
+ */
1830
+ public async deleteSharedStep(
1831
+ project: string,
1832
+ sharedStepId: number
1833
+ ): Promise<void> {
1834
+
1835
+ return this.beginRequest<void>({
1836
+ apiVersion: "7.2-preview.1",
1837
+ method: "DELETE",
1838
+ routeTemplate: "{project}/_apis/test/SharedStep/{sharedStepId}",
1839
+ routeValues: {
1840
+ project: project,
1841
+ sharedStepId: sharedStepId
1842
+ }
1843
+ });
1844
+ }
1845
+
1846
+ /**
1847
+ * Add test cases to suite.
1848
+ *
1849
+ * @param project - Project ID or project name
1850
+ * @param planId - ID of the test plan that contains the suite.
1851
+ * @param suiteId - ID of the test suite to which the test cases must be added.
1852
+ * @param testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format.
1853
+ */
1854
+ public async addTestCasesToSuite(
1855
+ project: string,
1856
+ planId: number,
1857
+ suiteId: number,
1858
+ testCaseIds: string
1859
+ ): Promise<Test.SuiteTestCase[]> {
1860
+
1861
+ return this.beginRequest<Test.SuiteTestCase[]>({
1862
+ apiVersion: "7.2-preview.3",
1863
+ method: "POST",
1864
+ routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",
1865
+ routeValues: {
1866
+ project: project,
1867
+ planId: planId,
1868
+ suiteId: suiteId,
1869
+ testCaseIds: testCaseIds,
1870
+ action: "TestCases"
1871
+ }
1872
+ });
1873
+ }
1874
+
1875
+ /**
1876
+ * Get a specific test case in a test suite with test case id.
1877
+ *
1878
+ * @param project - Project ID or project name
1879
+ * @param planId - ID of the test plan that contains the suites.
1880
+ * @param suiteId - ID of the suite that contains the test case.
1881
+ * @param testCaseIds - ID of the test case to get.
1882
+ */
1883
+ public async getTestCaseById(
1884
+ project: string,
1885
+ planId: number,
1886
+ suiteId: number,
1887
+ testCaseIds: number
1888
+ ): Promise<Test.SuiteTestCase> {
1889
+
1890
+ return this.beginRequest<Test.SuiteTestCase>({
1891
+ apiVersion: "7.2-preview.3",
1892
+ routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",
1893
+ routeValues: {
1894
+ project: project,
1895
+ planId: planId,
1896
+ suiteId: suiteId,
1897
+ testCaseIds: testCaseIds,
1898
+ action: "TestCases"
1899
+ }
1900
+ });
1901
+ }
1902
+
1903
+ /**
1904
+ * Get all test cases in a suite.
1905
+ *
1906
+ * @param project - Project ID or project name
1907
+ * @param planId - ID of the test plan that contains the suites.
1908
+ * @param suiteId - ID of the suite to get.
1909
+ */
1910
+ public async getTestCases(
1911
+ project: string,
1912
+ planId: number,
1913
+ suiteId: number
1914
+ ): Promise<Test.SuiteTestCase[]> {
1915
+
1916
+ return this.beginRequest<Test.SuiteTestCase[]>({
1917
+ apiVersion: "7.2-preview.3",
1918
+ routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",
1919
+ routeValues: {
1920
+ project: project,
1921
+ planId: planId,
1922
+ suiteId: suiteId,
1923
+ action: "TestCases"
1924
+ }
1925
+ });
1926
+ }
1927
+
1928
+ /**
1929
+ * The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently.
1930
+ *
1931
+ * @param project - Project ID or project name
1932
+ * @param planId - ID of the test plan that contains the suite.
1933
+ * @param suiteId - ID of the suite to get.
1934
+ * @param testCaseIds - IDs of the test cases to remove from the suite.
1935
+ */
1936
+ public async removeTestCasesFromSuiteUrl(
1937
+ project: string,
1938
+ planId: number,
1939
+ suiteId: number,
1940
+ testCaseIds: string
1941
+ ): Promise<void> {
1942
+
1943
+ return this.beginRequest<void>({
1944
+ apiVersion: "7.2-preview.3",
1945
+ method: "DELETE",
1946
+ routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",
1947
+ routeValues: {
1948
+ project: project,
1949
+ planId: planId,
1950
+ suiteId: suiteId,
1951
+ testCaseIds: testCaseIds,
1952
+ action: "TestCases"
1953
+ }
1954
+ });
1955
+ }
1956
+
1957
+ /**
1958
+ * Updates the properties of the test case association in a suite.
1959
+ *
1960
+ * @param suiteTestCaseUpdateModel - Model for updation of the properties of test case suite association.
1961
+ * @param project - Project ID or project name
1962
+ * @param planId - ID of the test plan that contains the suite.
1963
+ * @param suiteId - ID of the test suite to which the test cases must be added.
1964
+ * @param testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format.
1965
+ */
1966
+ public async updateSuiteTestCases(
1967
+ suiteTestCaseUpdateModel: Test.SuiteTestCaseUpdateModel,
1968
+ project: string,
1969
+ planId: number,
1970
+ suiteId: number,
1971
+ testCaseIds: string
1972
+ ): Promise<Test.SuiteTestCase[]> {
1973
+
1974
+ return this.beginRequest<Test.SuiteTestCase[]>({
1975
+ apiVersion: "7.2-preview.3",
1976
+ method: "PATCH",
1977
+ routeTemplate: "{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/{action}/{testCaseIds}",
1978
+ routeValues: {
1979
+ project: project,
1980
+ planId: planId,
1981
+ suiteId: suiteId,
1982
+ testCaseIds: testCaseIds,
1983
+ action: "TestCases"
1984
+ },
1985
+ body: suiteTestCaseUpdateModel
1986
+ });
1987
+ }
1988
+
1989
+ /**
1990
+ * Delete a test case.
1991
+ *
1992
+ * @param project - Project ID or project name
1993
+ * @param testCaseId - Id of test case to delete.
1994
+ */
1995
+ public async deleteTestCase(
1996
+ project: string,
1997
+ testCaseId: number
1998
+ ): Promise<void> {
1999
+
2000
+ return this.beginRequest<void>({
2001
+ apiVersion: "7.2-preview.1",
2002
+ method: "DELETE",
2003
+ routeTemplate: "{project}/_apis/test/TestCases/{testCaseId}",
2004
+ routeValues: {
2005
+ project: project,
2006
+ testCaseId: testCaseId
2007
+ }
2008
+ });
2009
+ }
2010
+
2011
+ /**
2012
+ * Get history of a test method using TestHistoryQuery
2013
+ *
2014
+ * @param filter - TestHistoryQuery to get history
2015
+ * @param project - Project ID or project name
2016
+ */
2017
+ public async queryTestHistory(
2018
+ filter: Test.TestHistoryQuery,
2019
+ project: string
2020
+ ): Promise<Test.TestHistoryQuery> {
2021
+
2022
+ return this.beginRequest<Test.TestHistoryQuery>({
2023
+ apiVersion: "7.2-preview.2",
2024
+ method: "POST",
2025
+ routeTemplate: "{project}/_apis/test/Results/TestHistory",
2026
+ routeValues: {
2027
+ project: project
2028
+ },
2029
+ body: filter
2030
+ });
2031
+ }
2032
+
2033
+ /**
2034
+ * @param testSettings -
2035
+ * @param project - Project ID or project name
2036
+ */
2037
+ public async createTestSettings(
2038
+ testSettings: Test.TestSettings,
2039
+ project: string
2040
+ ): Promise<number> {
2041
+
2042
+ return this.beginRequest<number>({
2043
+ apiVersion: "7.2-preview.1",
2044
+ method: "POST",
2045
+ routeTemplate: "{project}/_apis/test/TestSettings/{testSettingsId}",
2046
+ routeValues: {
2047
+ project: project
2048
+ },
2049
+ body: testSettings
2050
+ });
2051
+ }
2052
+
2053
+ /**
2054
+ * @param project - Project ID or project name
2055
+ * @param testSettingsId -
2056
+ */
2057
+ public async deleteTestSettings(
2058
+ project: string,
2059
+ testSettingsId: number
2060
+ ): Promise<void> {
2061
+
2062
+ return this.beginRequest<void>({
2063
+ apiVersion: "7.2-preview.1",
2064
+ method: "DELETE",
2065
+ routeTemplate: "{project}/_apis/test/TestSettings/{testSettingsId}",
2066
+ routeValues: {
2067
+ project: project,
2068
+ testSettingsId: testSettingsId
2069
+ }
2070
+ });
2071
+ }
2072
+
2073
+ /**
2074
+ * @param project - Project ID or project name
2075
+ * @param testSettingsId -
2076
+ */
2077
+ public async getTestSettingsById(
2078
+ project: string,
2079
+ testSettingsId: number
2080
+ ): Promise<Test.TestSettings> {
2081
+
2082
+ return this.beginRequest<Test.TestSettings>({
2083
+ apiVersion: "7.2-preview.1",
2084
+ routeTemplate: "{project}/_apis/test/TestSettings/{testSettingsId}",
2085
+ routeValues: {
2086
+ project: project,
2087
+ testSettingsId: testSettingsId
2088
+ }
2089
+ });
2090
+ }
2091
+
2092
+ /**
2093
+ * @param workItemToTestLinks -
2094
+ * @param project - Project ID or project name
2095
+ */
2096
+ public async addWorkItemToTestLinks(
2097
+ workItemToTestLinks: Test.WorkItemToTestLinks,
2098
+ project: string
2099
+ ): Promise<Test.WorkItemToTestLinks> {
2100
+
2101
+ return this.beginRequest<Test.WorkItemToTestLinks>({
2102
+ apiVersion: "7.2-preview.1",
2103
+ method: "POST",
2104
+ routeTemplate: "{project}/_apis/test/TestMethods/WorkItems",
2105
+ routeValues: {
2106
+ project: project
2107
+ },
2108
+ body: workItemToTestLinks
2109
+ });
2110
+ }
2111
+
2112
+ /**
2113
+ * @param project - Project ID or project name
2114
+ * @param testName -
2115
+ * @param workItemId -
2116
+ */
2117
+ public async deleteTestMethodToWorkItemLink(
2118
+ project: string,
2119
+ testName: string,
2120
+ workItemId: number
2121
+ ): Promise<boolean> {
2122
+
2123
+ const queryValues: any = {
2124
+ testName: testName,
2125
+ workItemId: workItemId
2126
+ };
2127
+
2128
+ return this.beginRequest<boolean>({
2129
+ apiVersion: "7.2-preview.1",
2130
+ method: "DELETE",
2131
+ routeTemplate: "{project}/_apis/test/TestMethods/{testName}/WorkItems/{workItemId}",
2132
+ routeValues: {
2133
+ project: project
2134
+ },
2135
+ queryParams: queryValues
2136
+ });
2137
+ }
2138
+
2139
+ /**
2140
+ * @param project - Project ID or project name
2141
+ * @param testName -
2142
+ */
2143
+ public async queryTestMethodLinkedWorkItems(
2144
+ project: string,
2145
+ testName: string
2146
+ ): Promise<Test.TestToWorkItemLinks> {
2147
+
2148
+ const queryValues: any = {
2149
+ testName: testName
2150
+ };
2151
+
2152
+ return this.beginRequest<Test.TestToWorkItemLinks>({
2153
+ apiVersion: "7.2-preview.1",
2154
+ method: "POST",
2155
+ routeTemplate: "{project}/_apis/test/TestMethods/{testName}/WorkItems/{workItemId}",
2156
+ routeValues: {
2157
+ project: project
2158
+ },
2159
+ queryParams: queryValues
2160
+ });
2161
+ }
2162
+
2163
+ /**
2164
+ * @param project - Project ID or project name
2165
+ * @param workItemCategory -
2166
+ * @param automatedTestName -
2167
+ * @param testCaseId -
2168
+ * @param maxCompleteDate -
2169
+ * @param days -
2170
+ * @param workItemCount -
2171
+ */
2172
+ public async queryTestResultWorkItems(
2173
+ project: string,
2174
+ workItemCategory: string,
2175
+ automatedTestName?: string,
2176
+ testCaseId?: number,
2177
+ maxCompleteDate?: Date,
2178
+ days?: number,
2179
+ workItemCount?: number
2180
+ ): Promise<Test.WorkItemReference[]> {
2181
+
2182
+ const queryValues: any = {
2183
+ workItemCategory: workItemCategory,
2184
+ automatedTestName: automatedTestName,
2185
+ testCaseId: testCaseId,
2186
+ maxCompleteDate: maxCompleteDate,
2187
+ days: days,
2188
+ '$workItemCount': workItemCount
2189
+ };
2190
+
2191
+ return this.beginRequest<Test.WorkItemReference[]>({
2192
+ apiVersion: "7.2-preview.1",
2193
+ routeTemplate: "{project}/_apis/test/Results/WorkItems",
2194
+ routeValues: {
2195
+ project: project
2196
+ },
2197
+ queryParams: queryValues
2198
+ });
2199
+ }
2200
+
2201
+ }