azure-devops-extension-api 4.245.1 → 4.247.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (558) hide show
  1. package/SECURITY.md +41 -0
  2. package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/Reporting.d.ts +48 -0
  3. package/bin/AdvancedSecurity.Reporting/Reporting.js +32 -0
  4. package/bin/AdvancedSecurity.Reporting/Reporting.min.js +1 -0
  5. package/{Alert → bin/Alert}/Alert.d.ts +8 -8
  6. package/{Alert → bin/Alert}/AlertClient.d.ts +1 -1
  7. package/{Alert → bin/Alert}/AlertClient.js +1 -1
  8. package/{Contributions → bin/Contributions}/ContributionsClient.js +2 -2
  9. package/{Contributions → bin/Contributions}/ContributionsClient.min.js +1 -1
  10. package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.js +7 -7
  11. package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.min.js +1 -1
  12. package/{FormInput → bin/FormInput}/FormInput.d.ts +8 -0
  13. package/bin/LICENSE +21 -0
  14. package/bin/README.md +2 -0
  15. package/{TaskAgent → bin/TaskAgent}/TaskAgent.d.ts +12 -0
  16. package/{Test → bin/Test}/Test.d.ts +31 -7
  17. package/{TestPlan → bin/TestPlan}/TestPlan.d.ts +6 -2
  18. package/{TestPlan → bin/TestPlan}/TestPlanClient.d.ts +19 -0
  19. package/{TestPlan → bin/TestPlan}/TestPlanClient.js +84 -0
  20. package/{TestPlan → bin/TestPlan}/TestPlanClient.min.js +1 -1
  21. package/{TestResults → bin/TestResults}/TestResultsClient.d.ts +8 -0
  22. package/{TestResults → bin/TestResults}/TestResultsClient.js +23 -0
  23. package/{TestResults → bin/TestResults}/TestResultsClient.min.js +1 -1
  24. package/bin/package.json +37 -0
  25. package/buildpackage.js +80 -0
  26. package/package.json +1 -1
  27. package/src/Accounts/Accounts.ts +134 -0
  28. package/src/Accounts/AccountsClient.ts +83 -0
  29. package/src/Accounts/index.ts +2 -0
  30. package/src/AdvancedSecurity.Reporting/Reporting.ts +180 -0
  31. package/src/AdvancedSecurity.Reporting/ReportingClient.ts +47 -0
  32. package/src/Alert/Alert.ts +1037 -0
  33. package/src/Alert/AlertClient.ts +330 -0
  34. package/src/Boards/Boards.ts +684 -0
  35. package/src/Boards/BoardsClient.ts +593 -0
  36. package/src/Boards/index.ts +2 -0
  37. package/src/Build/Build.ts +3416 -0
  38. package/src/Build/BuildClient.ts +2740 -0
  39. package/src/Build/BuildServices.ts +39 -0
  40. package/src/Build/index.ts +3 -0
  41. package/src/Comments/Comments.ts +330 -0
  42. package/src/Comments/index.ts +1 -0
  43. package/src/Common/Client.ts +37 -0
  44. package/src/Common/CommonServices.ts +853 -0
  45. package/src/Common/Context.d.ts +46 -0
  46. package/src/Common/Fetch.ts +239 -0
  47. package/src/Common/RestClientBase.ts +186 -0
  48. package/src/Common/System.ts +36 -0
  49. package/src/Common/SystemData.ts +135 -0
  50. package/src/Common/Util/Serialization.ts +59 -0
  51. package/src/Common/Util/Url.ts +773 -0
  52. package/src/Common/index.ts +3 -0
  53. package/src/Contributions/Contributions.ts +708 -0
  54. package/src/Contributions/ContributionsClient.ts +109 -0
  55. package/src/Contributions/index.ts +2 -0
  56. package/src/Core/Core.ts +579 -0
  57. package/src/Core/CoreClient.ts +765 -0
  58. package/src/Core/index.ts +2 -0
  59. package/src/Dashboard/Dashboard.ts +419 -0
  60. package/src/Dashboard/DashboardClient.ts +370 -0
  61. package/src/Dashboard/WidgetConfigHelpers.ts +43 -0
  62. package/src/Dashboard/WidgetContracts.ts +226 -0
  63. package/src/Dashboard/WidgetHelpers.ts +145 -0
  64. package/src/Dashboard/index.ts +5 -0
  65. package/src/DistributedTaskCommon/DistributedTaskCommon.ts +108 -0
  66. package/src/DistributedTaskCommon/index.ts +1 -0
  67. package/src/ExtensionManagement/ExtensionManagement.ts +1205 -0
  68. package/src/ExtensionManagement/ExtensionManagementClient.ts +646 -0
  69. package/src/ExtensionManagement/index.ts +2 -0
  70. package/src/Favorite/Favorite.ts +136 -0
  71. package/src/Favorite/FavoriteClient.ts +301 -0
  72. package/src/FeatureAvailability/FeatureAvailability.ts +20 -0
  73. package/src/FeatureAvailability/FeatureAvailabilityClient.ts +153 -0
  74. package/src/FeatureAvailability/index.ts +2 -0
  75. package/src/FeatureManagement/FeatureManagement.ts +166 -0
  76. package/src/FeatureManagement/FeatureManagementClient.ts +246 -0
  77. package/src/FeatureManagement/index.ts +2 -0
  78. package/src/FileContainer/FileContainer.ts +205 -0
  79. package/src/FileContainer/FileContainerClient.ts +154 -0
  80. package/src/FileContainer/index.ts +2 -0
  81. package/src/FormInput/FormInput.ts +288 -0
  82. package/src/FormInput/index.ts +1 -0
  83. package/src/Gallery/Gallery.ts +1977 -0
  84. package/src/Gallery/GalleryClient.ts +2251 -0
  85. package/src/Gallery/index.ts +2 -0
  86. package/src/Git/CodeEditorTypes.ts +335 -0
  87. package/src/Git/Git.ts +4058 -0
  88. package/src/Git/GitClient.ts +4750 -0
  89. package/src/Git/GitServices.ts +18 -0
  90. package/src/Git/index.ts +4 -0
  91. package/src/Graph/Graph.ts +572 -0
  92. package/src/Graph/GraphClient.ts +846 -0
  93. package/src/Graph/index.ts +2 -0
  94. package/src/Identities/Identities.ts +261 -0
  95. package/src/Identities/IdentityProvider.ts +90 -0
  96. package/src/Identities/IdentityService.ts +89 -0
  97. package/src/Identities/index.ts +3 -0
  98. package/src/Locations/Locations.ts +165 -0
  99. package/src/Locations/LocationsClient.ts +220 -0
  100. package/src/Locations/index.ts +2 -0
  101. package/src/Management/Management.ts +172 -0
  102. package/src/Management/ManagementClient.ts +348 -0
  103. package/src/Notification/Notification.ts +1460 -0
  104. package/src/Notification/NotificationClient.ts +477 -0
  105. package/src/Notification/index.ts +2 -0
  106. package/src/Operations/Operations.ts +86 -0
  107. package/src/Operations/OperationsClient.ts +42 -0
  108. package/src/Operations/index.ts +2 -0
  109. package/src/Pipelines/Pipelines.ts +354 -0
  110. package/src/Pipelines/PipelinesClient.ts +306 -0
  111. package/src/Policy/Policy.ts +173 -0
  112. package/src/Policy/PolicyClient.ts +315 -0
  113. package/src/Policy/index.ts +2 -0
  114. package/src/Profile/Profile.ts +187 -0
  115. package/src/Profile/ProfileClient.ts +328 -0
  116. package/src/Profile/index.ts +2 -0
  117. package/src/ProjectAnalysis/ProjectAnalysis.ts +74 -0
  118. package/src/ProjectAnalysis/ProjectAnalysisClient.ts +124 -0
  119. package/src/ProjectAnalysis/index.ts +2 -0
  120. package/src/Release/Release.ts +4237 -0
  121. package/src/Release/ReleaseClient.ts +2450 -0
  122. package/src/Release/index.ts +2 -0
  123. package/src/ResourceUsage/ResourceUsage.ts +19 -0
  124. package/src/ResourceUsage/ResourceUsageClient.ts +48 -0
  125. package/src/ServiceEndpoint/ServiceEndpoint.ts +930 -0
  126. package/src/ServiceEndpoint/ServiceEndpointClient.ts +617 -0
  127. package/src/ServiceEndpoint/index.ts +2 -0
  128. package/src/ServiceHooks/ServiceHooks.ts +759 -0
  129. package/src/ServiceHooks/ServiceHooksClient.ts +499 -0
  130. package/src/ServiceHooks/index.ts +2 -0
  131. package/src/TaskAgent/TaskAgent.ts +3896 -0
  132. package/src/TaskAgent/TaskAgentClient.ts +3918 -0
  133. package/src/TaskAgent/index.ts +2 -0
  134. package/src/Test/Test.ts +5853 -0
  135. package/src/Test/TestClient.ts +2201 -0
  136. package/src/Test/index.ts +2 -0
  137. package/src/TestPlan/TestPlan.ts +1384 -0
  138. package/src/TestPlan/TestPlanClient.ts +1367 -0
  139. package/src/TestPlan/index.ts +2 -0
  140. package/{AdvancedSecurity.Reporting/Reporting.js → src/TestResults/TestResults.ts} +7 -5
  141. package/src/TestResults/TestResultsClient.ts +3450 -0
  142. package/src/TestResults/index.ts +2 -0
  143. package/src/Tfvc/Tfvc.ts +770 -0
  144. package/src/Tfvc/TfvcClient.ts +757 -0
  145. package/src/Tfvc/index.ts +2 -0
  146. package/src/WebApi/WebApi.ts +452 -0
  147. package/src/WebApi/index.ts +1 -0
  148. package/src/Wiki/Wiki.ts +352 -0
  149. package/src/Wiki/WikiClient.ts +712 -0
  150. package/src/Wiki/index.ts +2 -0
  151. package/src/Work/Work.ts +1367 -0
  152. package/src/Work/WorkClient.ts +1489 -0
  153. package/src/Work/index.ts +2 -0
  154. package/src/WorkItemTracking/WorkItemTracking.ts +2215 -0
  155. package/src/WorkItemTracking/WorkItemTrackingClient.ts +2032 -0
  156. package/src/WorkItemTracking/WorkItemTrackingServices.ts +329 -0
  157. package/src/WorkItemTracking/index.ts +3 -0
  158. package/src/WorkItemTrackingProcess/WorkItemTrackingProcess.ts +1295 -0
  159. package/src/WorkItemTrackingProcess/WorkItemTrackingProcessClient.ts +1455 -0
  160. package/src/WorkItemTrackingProcess/index.ts +2 -0
  161. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.ts +606 -0
  162. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.ts +1175 -0
  163. package/src/WorkItemTrackingProcessDefinitions/index.ts +2 -0
  164. package/src/index.ts +1 -0
  165. package/tsconfig.json +21 -0
  166. package/AdvancedSecurity.Reporting/Reporting.min.js +0 -1
  167. /package/{Accounts → bin/Accounts}/Accounts.d.ts +0 -0
  168. /package/{Accounts → bin/Accounts}/Accounts.js +0 -0
  169. /package/{Accounts → bin/Accounts}/Accounts.min.js +0 -0
  170. /package/{Accounts → bin/Accounts}/AccountsClient.d.ts +0 -0
  171. /package/{Accounts → bin/Accounts}/AccountsClient.js +0 -0
  172. /package/{Accounts → bin/Accounts}/AccountsClient.min.js +0 -0
  173. /package/{Accounts → bin/Accounts}/index.d.ts +0 -0
  174. /package/{Accounts → bin/Accounts}/index.js +0 -0
  175. /package/{Accounts → bin/Accounts}/index.min.js +0 -0
  176. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.d.ts +0 -0
  177. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.js +0 -0
  178. /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.min.js +0 -0
  179. /package/{Alert → bin/Alert}/Alert.js +0 -0
  180. /package/{Alert → bin/Alert}/Alert.min.js +0 -0
  181. /package/{Alert → bin/Alert}/AlertClient.min.js +0 -0
  182. /package/{Boards → bin/Boards}/Boards.d.ts +0 -0
  183. /package/{Boards → bin/Boards}/Boards.js +0 -0
  184. /package/{Boards → bin/Boards}/Boards.min.js +0 -0
  185. /package/{Boards → bin/Boards}/BoardsClient.d.ts +0 -0
  186. /package/{Boards → bin/Boards}/BoardsClient.js +0 -0
  187. /package/{Boards → bin/Boards}/BoardsClient.min.js +0 -0
  188. /package/{Boards → bin/Boards}/index.d.ts +0 -0
  189. /package/{Boards → bin/Boards}/index.js +0 -0
  190. /package/{Boards → bin/Boards}/index.min.js +0 -0
  191. /package/{Build → bin/Build}/Build.d.ts +0 -0
  192. /package/{Build → bin/Build}/Build.js +0 -0
  193. /package/{Build → bin/Build}/Build.min.js +0 -0
  194. /package/{Build → bin/Build}/BuildClient.d.ts +0 -0
  195. /package/{Build → bin/Build}/BuildClient.js +0 -0
  196. /package/{Build → bin/Build}/BuildClient.min.js +0 -0
  197. /package/{Build → bin/Build}/BuildServices.d.ts +0 -0
  198. /package/{Build → bin/Build}/BuildServices.js +0 -0
  199. /package/{Build → bin/Build}/BuildServices.min.js +0 -0
  200. /package/{Build → bin/Build}/index.d.ts +0 -0
  201. /package/{Build → bin/Build}/index.js +0 -0
  202. /package/{Build → bin/Build}/index.min.js +0 -0
  203. /package/{Comments → bin/Comments}/Comments.d.ts +0 -0
  204. /package/{Comments → bin/Comments}/Comments.js +0 -0
  205. /package/{Comments → bin/Comments}/Comments.min.js +0 -0
  206. /package/{Comments → bin/Comments}/index.d.ts +0 -0
  207. /package/{Comments → bin/Comments}/index.js +0 -0
  208. /package/{Comments → bin/Comments}/index.min.js +0 -0
  209. /package/{Common → bin/Common}/Client.d.ts +0 -0
  210. /package/{Common → bin/Common}/Client.js +0 -0
  211. /package/{Common → bin/Common}/Client.min.js +0 -0
  212. /package/{Common → bin/Common}/CommonServices.d.ts +0 -0
  213. /package/{Common → bin/Common}/CommonServices.js +0 -0
  214. /package/{Common → bin/Common}/CommonServices.min.js +0 -0
  215. /package/{Common → bin/Common}/Context.d.ts +0 -0
  216. /package/{Common → bin/Common}/Fetch.d.ts +0 -0
  217. /package/{Common → bin/Common}/Fetch.js +0 -0
  218. /package/{Common → bin/Common}/Fetch.min.js +0 -0
  219. /package/{Common → bin/Common}/RestClientBase.d.ts +0 -0
  220. /package/{Common → bin/Common}/RestClientBase.js +0 -0
  221. /package/{Common → bin/Common}/RestClientBase.min.js +0 -0
  222. /package/{Common → bin/Common}/System.d.ts +0 -0
  223. /package/{Common → bin/Common}/System.js +0 -0
  224. /package/{Common → bin/Common}/System.min.js +0 -0
  225. /package/{Common → bin/Common}/SystemData.d.ts +0 -0
  226. /package/{Common → bin/Common}/SystemData.js +0 -0
  227. /package/{Common → bin/Common}/SystemData.min.js +0 -0
  228. /package/{Common → bin/Common}/Util/Serialization.d.ts +0 -0
  229. /package/{Common → bin/Common}/Util/Serialization.js +0 -0
  230. /package/{Common → bin/Common}/Util/Serialization.min.js +0 -0
  231. /package/{Common → bin/Common}/Util/Url.d.ts +0 -0
  232. /package/{Common → bin/Common}/Util/Url.js +0 -0
  233. /package/{Common → bin/Common}/Util/Url.min.js +0 -0
  234. /package/{Common → bin/Common}/index.d.ts +0 -0
  235. /package/{Common → bin/Common}/index.js +0 -0
  236. /package/{Common → bin/Common}/index.min.js +0 -0
  237. /package/{Contributions → bin/Contributions}/Contributions.d.ts +0 -0
  238. /package/{Contributions → bin/Contributions}/Contributions.js +0 -0
  239. /package/{Contributions → bin/Contributions}/Contributions.min.js +0 -0
  240. /package/{Contributions → bin/Contributions}/ContributionsClient.d.ts +0 -0
  241. /package/{Contributions → bin/Contributions}/index.d.ts +0 -0
  242. /package/{Contributions → bin/Contributions}/index.js +0 -0
  243. /package/{Contributions → bin/Contributions}/index.min.js +0 -0
  244. /package/{Core → bin/Core}/Core.d.ts +0 -0
  245. /package/{Core → bin/Core}/Core.js +0 -0
  246. /package/{Core → bin/Core}/Core.min.js +0 -0
  247. /package/{Core → bin/Core}/CoreClient.d.ts +0 -0
  248. /package/{Core → bin/Core}/CoreClient.js +0 -0
  249. /package/{Core → bin/Core}/CoreClient.min.js +0 -0
  250. /package/{Core → bin/Core}/index.d.ts +0 -0
  251. /package/{Core → bin/Core}/index.js +0 -0
  252. /package/{Core → bin/Core}/index.min.js +0 -0
  253. /package/{Dashboard → bin/Dashboard}/Dashboard.d.ts +0 -0
  254. /package/{Dashboard → bin/Dashboard}/Dashboard.js +0 -0
  255. /package/{Dashboard → bin/Dashboard}/Dashboard.min.js +0 -0
  256. /package/{Dashboard → bin/Dashboard}/DashboardClient.d.ts +0 -0
  257. /package/{Dashboard → bin/Dashboard}/DashboardClient.js +0 -0
  258. /package/{Dashboard → bin/Dashboard}/DashboardClient.min.js +0 -0
  259. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.d.ts +0 -0
  260. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.js +0 -0
  261. /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.min.js +0 -0
  262. /package/{Dashboard → bin/Dashboard}/WidgetContracts.d.ts +0 -0
  263. /package/{Dashboard → bin/Dashboard}/WidgetContracts.js +0 -0
  264. /package/{Dashboard → bin/Dashboard}/WidgetContracts.min.js +0 -0
  265. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.d.ts +0 -0
  266. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.js +0 -0
  267. /package/{Dashboard → bin/Dashboard}/WidgetHelpers.min.js +0 -0
  268. /package/{Dashboard → bin/Dashboard}/index.d.ts +0 -0
  269. /package/{Dashboard → bin/Dashboard}/index.js +0 -0
  270. /package/{Dashboard → bin/Dashboard}/index.min.js +0 -0
  271. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.d.ts +0 -0
  272. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.js +0 -0
  273. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.min.js +0 -0
  274. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.d.ts +0 -0
  275. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.js +0 -0
  276. /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.min.js +0 -0
  277. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.d.ts +0 -0
  278. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.js +0 -0
  279. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.min.js +0 -0
  280. /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.d.ts +0 -0
  281. /package/{ExtensionManagement → bin/ExtensionManagement}/index.d.ts +0 -0
  282. /package/{ExtensionManagement → bin/ExtensionManagement}/index.js +0 -0
  283. /package/{ExtensionManagement → bin/ExtensionManagement}/index.min.js +0 -0
  284. /package/{Favorite → bin/Favorite}/Favorite.d.ts +0 -0
  285. /package/{Favorite → bin/Favorite}/Favorite.js +0 -0
  286. /package/{Favorite → bin/Favorite}/Favorite.min.js +0 -0
  287. /package/{Favorite → bin/Favorite}/FavoriteClient.d.ts +0 -0
  288. /package/{Favorite → bin/Favorite}/FavoriteClient.js +0 -0
  289. /package/{Favorite → bin/Favorite}/FavoriteClient.min.js +0 -0
  290. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.d.ts +0 -0
  291. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.js +0 -0
  292. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.min.js +0 -0
  293. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.d.ts +0 -0
  294. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.js +0 -0
  295. /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.min.js +0 -0
  296. /package/{FeatureAvailability → bin/FeatureAvailability}/index.d.ts +0 -0
  297. /package/{FeatureAvailability → bin/FeatureAvailability}/index.js +0 -0
  298. /package/{FeatureAvailability → bin/FeatureAvailability}/index.min.js +0 -0
  299. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.d.ts +0 -0
  300. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.js +0 -0
  301. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.min.js +0 -0
  302. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.d.ts +0 -0
  303. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.js +0 -0
  304. /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.min.js +0 -0
  305. /package/{FeatureManagement → bin/FeatureManagement}/index.d.ts +0 -0
  306. /package/{FeatureManagement → bin/FeatureManagement}/index.js +0 -0
  307. /package/{FeatureManagement → bin/FeatureManagement}/index.min.js +0 -0
  308. /package/{FileContainer → bin/FileContainer}/FileContainer.d.ts +0 -0
  309. /package/{FileContainer → bin/FileContainer}/FileContainer.js +0 -0
  310. /package/{FileContainer → bin/FileContainer}/FileContainer.min.js +0 -0
  311. /package/{FileContainer → bin/FileContainer}/FileContainerClient.d.ts +0 -0
  312. /package/{FileContainer → bin/FileContainer}/FileContainerClient.js +0 -0
  313. /package/{FileContainer → bin/FileContainer}/FileContainerClient.min.js +0 -0
  314. /package/{FileContainer → bin/FileContainer}/index.d.ts +0 -0
  315. /package/{FileContainer → bin/FileContainer}/index.js +0 -0
  316. /package/{FileContainer → bin/FileContainer}/index.min.js +0 -0
  317. /package/{FormInput → bin/FormInput}/FormInput.js +0 -0
  318. /package/{FormInput → bin/FormInput}/FormInput.min.js +0 -0
  319. /package/{FormInput → bin/FormInput}/index.d.ts +0 -0
  320. /package/{FormInput → bin/FormInput}/index.js +0 -0
  321. /package/{FormInput → bin/FormInput}/index.min.js +0 -0
  322. /package/{Gallery → bin/Gallery}/Gallery.d.ts +0 -0
  323. /package/{Gallery → bin/Gallery}/Gallery.js +0 -0
  324. /package/{Gallery → bin/Gallery}/Gallery.min.js +0 -0
  325. /package/{Gallery → bin/Gallery}/GalleryClient.d.ts +0 -0
  326. /package/{Gallery → bin/Gallery}/GalleryClient.js +0 -0
  327. /package/{Gallery → bin/Gallery}/GalleryClient.min.js +0 -0
  328. /package/{Gallery → bin/Gallery}/index.d.ts +0 -0
  329. /package/{Gallery → bin/Gallery}/index.js +0 -0
  330. /package/{Gallery → bin/Gallery}/index.min.js +0 -0
  331. /package/{Git → bin/Git}/CodeEditorTypes.d.ts +0 -0
  332. /package/{Git → bin/Git}/CodeEditorTypes.js +0 -0
  333. /package/{Git → bin/Git}/CodeEditorTypes.min.js +0 -0
  334. /package/{Git → bin/Git}/Git.d.ts +0 -0
  335. /package/{Git → bin/Git}/Git.js +0 -0
  336. /package/{Git → bin/Git}/Git.min.js +0 -0
  337. /package/{Git → bin/Git}/GitClient.d.ts +0 -0
  338. /package/{Git → bin/Git}/GitClient.js +0 -0
  339. /package/{Git → bin/Git}/GitClient.min.js +0 -0
  340. /package/{Git → bin/Git}/GitServices.d.ts +0 -0
  341. /package/{Git → bin/Git}/GitServices.js +0 -0
  342. /package/{Git → bin/Git}/GitServices.min.js +0 -0
  343. /package/{Git → bin/Git}/index.d.ts +0 -0
  344. /package/{Git → bin/Git}/index.js +0 -0
  345. /package/{Git → bin/Git}/index.min.js +0 -0
  346. /package/{Graph → bin/Graph}/Graph.d.ts +0 -0
  347. /package/{Graph → bin/Graph}/Graph.js +0 -0
  348. /package/{Graph → bin/Graph}/Graph.min.js +0 -0
  349. /package/{Graph → bin/Graph}/GraphClient.d.ts +0 -0
  350. /package/{Graph → bin/Graph}/GraphClient.js +0 -0
  351. /package/{Graph → bin/Graph}/GraphClient.min.js +0 -0
  352. /package/{Graph → bin/Graph}/index.d.ts +0 -0
  353. /package/{Graph → bin/Graph}/index.js +0 -0
  354. /package/{Graph → bin/Graph}/index.min.js +0 -0
  355. /package/{Identities → bin/Identities}/Identities.d.ts +0 -0
  356. /package/{Identities → bin/Identities}/Identities.js +0 -0
  357. /package/{Identities → bin/Identities}/Identities.min.js +0 -0
  358. /package/{Identities → bin/Identities}/IdentityProvider.d.ts +0 -0
  359. /package/{Identities → bin/Identities}/IdentityProvider.js +0 -0
  360. /package/{Identities → bin/Identities}/IdentityProvider.min.js +0 -0
  361. /package/{Identities → bin/Identities}/IdentityService.d.ts +0 -0
  362. /package/{Identities → bin/Identities}/IdentityService.js +0 -0
  363. /package/{Identities → bin/Identities}/IdentityService.min.js +0 -0
  364. /package/{Identities → bin/Identities}/index.d.ts +0 -0
  365. /package/{Identities → bin/Identities}/index.js +0 -0
  366. /package/{Identities → bin/Identities}/index.min.js +0 -0
  367. /package/{Locations → bin/Locations}/Locations.d.ts +0 -0
  368. /package/{Locations → bin/Locations}/Locations.js +0 -0
  369. /package/{Locations → bin/Locations}/Locations.min.js +0 -0
  370. /package/{Locations → bin/Locations}/LocationsClient.d.ts +0 -0
  371. /package/{Locations → bin/Locations}/LocationsClient.js +0 -0
  372. /package/{Locations → bin/Locations}/LocationsClient.min.js +0 -0
  373. /package/{Locations → bin/Locations}/index.d.ts +0 -0
  374. /package/{Locations → bin/Locations}/index.js +0 -0
  375. /package/{Locations → bin/Locations}/index.min.js +0 -0
  376. /package/{Management → bin/Management}/Management.d.ts +0 -0
  377. /package/{Management → bin/Management}/Management.js +0 -0
  378. /package/{Management → bin/Management}/Management.min.js +0 -0
  379. /package/{Management → bin/Management}/ManagementClient.d.ts +0 -0
  380. /package/{Management → bin/Management}/ManagementClient.js +0 -0
  381. /package/{Management → bin/Management}/ManagementClient.min.js +0 -0
  382. /package/{Notification → bin/Notification}/Notification.d.ts +0 -0
  383. /package/{Notification → bin/Notification}/Notification.js +0 -0
  384. /package/{Notification → bin/Notification}/Notification.min.js +0 -0
  385. /package/{Notification → bin/Notification}/NotificationClient.d.ts +0 -0
  386. /package/{Notification → bin/Notification}/NotificationClient.js +0 -0
  387. /package/{Notification → bin/Notification}/NotificationClient.min.js +0 -0
  388. /package/{Notification → bin/Notification}/index.d.ts +0 -0
  389. /package/{Notification → bin/Notification}/index.js +0 -0
  390. /package/{Notification → bin/Notification}/index.min.js +0 -0
  391. /package/{Operations → bin/Operations}/Operations.d.ts +0 -0
  392. /package/{Operations → bin/Operations}/Operations.js +0 -0
  393. /package/{Operations → bin/Operations}/Operations.min.js +0 -0
  394. /package/{Operations → bin/Operations}/OperationsClient.d.ts +0 -0
  395. /package/{Operations → bin/Operations}/OperationsClient.js +0 -0
  396. /package/{Operations → bin/Operations}/OperationsClient.min.js +0 -0
  397. /package/{Operations → bin/Operations}/index.d.ts +0 -0
  398. /package/{Operations → bin/Operations}/index.js +0 -0
  399. /package/{Operations → bin/Operations}/index.min.js +0 -0
  400. /package/{Pipelines → bin/Pipelines}/Pipelines.d.ts +0 -0
  401. /package/{Pipelines → bin/Pipelines}/Pipelines.js +0 -0
  402. /package/{Pipelines → bin/Pipelines}/Pipelines.min.js +0 -0
  403. /package/{Pipelines → bin/Pipelines}/PipelinesClient.d.ts +0 -0
  404. /package/{Pipelines → bin/Pipelines}/PipelinesClient.js +0 -0
  405. /package/{Pipelines → bin/Pipelines}/PipelinesClient.min.js +0 -0
  406. /package/{Policy → bin/Policy}/Policy.d.ts +0 -0
  407. /package/{Policy → bin/Policy}/Policy.js +0 -0
  408. /package/{Policy → bin/Policy}/Policy.min.js +0 -0
  409. /package/{Policy → bin/Policy}/PolicyClient.d.ts +0 -0
  410. /package/{Policy → bin/Policy}/PolicyClient.js +0 -0
  411. /package/{Policy → bin/Policy}/PolicyClient.min.js +0 -0
  412. /package/{Policy → bin/Policy}/index.d.ts +0 -0
  413. /package/{Policy → bin/Policy}/index.js +0 -0
  414. /package/{Policy → bin/Policy}/index.min.js +0 -0
  415. /package/{Profile → bin/Profile}/Profile.d.ts +0 -0
  416. /package/{Profile → bin/Profile}/Profile.js +0 -0
  417. /package/{Profile → bin/Profile}/Profile.min.js +0 -0
  418. /package/{Profile → bin/Profile}/ProfileClient.d.ts +0 -0
  419. /package/{Profile → bin/Profile}/ProfileClient.js +0 -0
  420. /package/{Profile → bin/Profile}/ProfileClient.min.js +0 -0
  421. /package/{Profile → bin/Profile}/index.d.ts +0 -0
  422. /package/{Profile → bin/Profile}/index.js +0 -0
  423. /package/{Profile → bin/Profile}/index.min.js +0 -0
  424. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.d.ts +0 -0
  425. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.js +0 -0
  426. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.min.js +0 -0
  427. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.d.ts +0 -0
  428. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.js +0 -0
  429. /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.min.js +0 -0
  430. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.d.ts +0 -0
  431. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.js +0 -0
  432. /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.min.js +0 -0
  433. /package/{Release → bin/Release}/Release.d.ts +0 -0
  434. /package/{Release → bin/Release}/Release.js +0 -0
  435. /package/{Release → bin/Release}/Release.min.js +0 -0
  436. /package/{Release → bin/Release}/ReleaseClient.d.ts +0 -0
  437. /package/{Release → bin/Release}/ReleaseClient.js +0 -0
  438. /package/{Release → bin/Release}/ReleaseClient.min.js +0 -0
  439. /package/{Release → bin/Release}/index.d.ts +0 -0
  440. /package/{Release → bin/Release}/index.js +0 -0
  441. /package/{Release → bin/Release}/index.min.js +0 -0
  442. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.d.ts +0 -0
  443. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.js +0 -0
  444. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.min.js +0 -0
  445. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.d.ts +0 -0
  446. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.js +0 -0
  447. /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.min.js +0 -0
  448. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.d.ts +0 -0
  449. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.js +0 -0
  450. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.min.js +0 -0
  451. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.d.ts +0 -0
  452. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.js +0 -0
  453. /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.min.js +0 -0
  454. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.d.ts +0 -0
  455. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.js +0 -0
  456. /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.min.js +0 -0
  457. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.d.ts +0 -0
  458. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.js +0 -0
  459. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.min.js +0 -0
  460. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.d.ts +0 -0
  461. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.js +0 -0
  462. /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.min.js +0 -0
  463. /package/{ServiceHooks → bin/ServiceHooks}/index.d.ts +0 -0
  464. /package/{ServiceHooks → bin/ServiceHooks}/index.js +0 -0
  465. /package/{ServiceHooks → bin/ServiceHooks}/index.min.js +0 -0
  466. /package/{TaskAgent → bin/TaskAgent}/TaskAgent.js +0 -0
  467. /package/{TaskAgent → bin/TaskAgent}/TaskAgent.min.js +0 -0
  468. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.d.ts +0 -0
  469. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.js +0 -0
  470. /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.min.js +0 -0
  471. /package/{TaskAgent → bin/TaskAgent}/index.d.ts +0 -0
  472. /package/{TaskAgent → bin/TaskAgent}/index.js +0 -0
  473. /package/{TaskAgent → bin/TaskAgent}/index.min.js +0 -0
  474. /package/{Test → bin/Test}/Test.js +0 -0
  475. /package/{Test → bin/Test}/Test.min.js +0 -0
  476. /package/{Test → bin/Test}/TestClient.d.ts +0 -0
  477. /package/{Test → bin/Test}/TestClient.js +0 -0
  478. /package/{Test → bin/Test}/TestClient.min.js +0 -0
  479. /package/{Test → bin/Test}/index.d.ts +0 -0
  480. /package/{Test → bin/Test}/index.js +0 -0
  481. /package/{Test → bin/Test}/index.min.js +0 -0
  482. /package/{TestPlan → bin/TestPlan}/TestPlan.js +0 -0
  483. /package/{TestPlan → bin/TestPlan}/TestPlan.min.js +0 -0
  484. /package/{TestPlan → bin/TestPlan}/index.d.ts +0 -0
  485. /package/{TestPlan → bin/TestPlan}/index.js +0 -0
  486. /package/{TestPlan → bin/TestPlan}/index.min.js +0 -0
  487. /package/{TestResults → bin/TestResults}/TestResults.d.ts +0 -0
  488. /package/{TestResults → bin/TestResults}/TestResults.js +0 -0
  489. /package/{TestResults → bin/TestResults}/TestResults.min.js +0 -0
  490. /package/{TestResults → bin/TestResults}/index.d.ts +0 -0
  491. /package/{TestResults → bin/TestResults}/index.js +0 -0
  492. /package/{TestResults → bin/TestResults}/index.min.js +0 -0
  493. /package/{Tfvc → bin/Tfvc}/Tfvc.d.ts +0 -0
  494. /package/{Tfvc → bin/Tfvc}/Tfvc.js +0 -0
  495. /package/{Tfvc → bin/Tfvc}/Tfvc.min.js +0 -0
  496. /package/{Tfvc → bin/Tfvc}/TfvcClient.d.ts +0 -0
  497. /package/{Tfvc → bin/Tfvc}/TfvcClient.js +0 -0
  498. /package/{Tfvc → bin/Tfvc}/TfvcClient.min.js +0 -0
  499. /package/{Tfvc → bin/Tfvc}/index.d.ts +0 -0
  500. /package/{Tfvc → bin/Tfvc}/index.js +0 -0
  501. /package/{Tfvc → bin/Tfvc}/index.min.js +0 -0
  502. /package/{WebApi → bin/WebApi}/WebApi.d.ts +0 -0
  503. /package/{WebApi → bin/WebApi}/WebApi.js +0 -0
  504. /package/{WebApi → bin/WebApi}/WebApi.min.js +0 -0
  505. /package/{WebApi → bin/WebApi}/index.d.ts +0 -0
  506. /package/{WebApi → bin/WebApi}/index.js +0 -0
  507. /package/{WebApi → bin/WebApi}/index.min.js +0 -0
  508. /package/{Wiki → bin/Wiki}/Wiki.d.ts +0 -0
  509. /package/{Wiki → bin/Wiki}/Wiki.js +0 -0
  510. /package/{Wiki → bin/Wiki}/Wiki.min.js +0 -0
  511. /package/{Wiki → bin/Wiki}/WikiClient.d.ts +0 -0
  512. /package/{Wiki → bin/Wiki}/WikiClient.js +0 -0
  513. /package/{Wiki → bin/Wiki}/WikiClient.min.js +0 -0
  514. /package/{Wiki → bin/Wiki}/index.d.ts +0 -0
  515. /package/{Wiki → bin/Wiki}/index.js +0 -0
  516. /package/{Wiki → bin/Wiki}/index.min.js +0 -0
  517. /package/{Work → bin/Work}/Work.d.ts +0 -0
  518. /package/{Work → bin/Work}/Work.js +0 -0
  519. /package/{Work → bin/Work}/Work.min.js +0 -0
  520. /package/{Work → bin/Work}/WorkClient.d.ts +0 -0
  521. /package/{Work → bin/Work}/WorkClient.js +0 -0
  522. /package/{Work → bin/Work}/WorkClient.min.js +0 -0
  523. /package/{Work → bin/Work}/index.d.ts +0 -0
  524. /package/{Work → bin/Work}/index.js +0 -0
  525. /package/{Work → bin/Work}/index.min.js +0 -0
  526. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.d.ts +0 -0
  527. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.js +0 -0
  528. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.min.js +0 -0
  529. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.d.ts +0 -0
  530. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.js +0 -0
  531. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.min.js +0 -0
  532. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.d.ts +0 -0
  533. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.js +0 -0
  534. /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.min.js +0 -0
  535. /package/{WorkItemTracking → bin/WorkItemTracking}/index.d.ts +0 -0
  536. /package/{WorkItemTracking → bin/WorkItemTracking}/index.js +0 -0
  537. /package/{WorkItemTracking → bin/WorkItemTracking}/index.min.js +0 -0
  538. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.d.ts +0 -0
  539. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.js +0 -0
  540. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.min.js +0 -0
  541. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.d.ts +0 -0
  542. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.js +0 -0
  543. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.min.js +0 -0
  544. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.d.ts +0 -0
  545. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.js +0 -0
  546. /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.min.js +0 -0
  547. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.d.ts +0 -0
  548. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.js +0 -0
  549. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.min.js +0 -0
  550. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.d.ts +0 -0
  551. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.js +0 -0
  552. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.min.js +0 -0
  553. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.d.ts +0 -0
  554. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.js +0 -0
  555. /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.min.js +0 -0
  556. /package/{index.d.ts → bin/index.d.ts} +0 -0
  557. /package/{index.js → bin/index.js} +0 -0
  558. /package/{index.min.js → bin/index.min.js} +0 -0
@@ -0,0 +1,2032 @@
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
+
10
+ import * as WebApi from "../WebApi/WebApi";
11
+ import * as WorkItemTracking from "../WorkItemTracking/WorkItemTracking";
12
+
13
+ export class WorkItemTrackingRestClient extends RestClientBase {
14
+ constructor(options: IVssRestClientOptions) {
15
+ super(options);
16
+ }
17
+
18
+ public static readonly RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5";
19
+
20
+ /**
21
+ * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details.
22
+ *
23
+ * @param queryOption -
24
+ */
25
+ public async getAccountMyWorkData(
26
+ queryOption?: WorkItemTracking.QueryOption
27
+ ): Promise<WorkItemTracking.AccountMyWorkResult> {
28
+
29
+ const queryValues: any = {
30
+ '$queryOption': queryOption
31
+ };
32
+
33
+ return this.beginRequest<WorkItemTracking.AccountMyWorkResult>({
34
+ apiVersion: "5.0-preview.1",
35
+ routeTemplate: "_apis/work/accountMyWork",
36
+ queryParams: queryValues
37
+ });
38
+ }
39
+
40
+ /**
41
+ * Gets recent work item activities
42
+ *
43
+ */
44
+ public async getRecentActivityData(
45
+ ): Promise<WorkItemTracking.AccountRecentActivityWorkItemModel2[]> {
46
+
47
+ return this.beginRequest<WorkItemTracking.AccountRecentActivityWorkItemModel2[]>({
48
+ apiVersion: "5.0-preview.2",
49
+ routeTemplate: "_apis/work/accountMyWorkRecentActivity"
50
+ });
51
+ }
52
+
53
+ /**
54
+ * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE.
55
+ *
56
+ */
57
+ public async getRecentMentions(
58
+ ): Promise<WorkItemTracking.AccountRecentMentionWorkItemModel[]> {
59
+
60
+ return this.beginRequest<WorkItemTracking.AccountRecentMentionWorkItemModel[]>({
61
+ apiVersion: "5.0-preview.1",
62
+ routeTemplate: "_apis/work/accountRecentMentions"
63
+ });
64
+ }
65
+
66
+ /**
67
+ * Get the list of work item tracking outbound artifact link types.
68
+ *
69
+ */
70
+ public async getWorkArtifactLinkTypes(
71
+ ): Promise<WorkItemTracking.WorkArtifactLink[]> {
72
+
73
+ return this.beginRequest<WorkItemTracking.WorkArtifactLink[]>({
74
+ apiVersion: "5.0-preview.1",
75
+ routeTemplate: "_apis/wit/artifactLinkTypes"
76
+ });
77
+ }
78
+
79
+ /**
80
+ * Queries work items linked to a given list of artifact URI.
81
+ *
82
+ * @param artifactUriQuery - Defines a list of artifact URI for querying work items.
83
+ * @param project - Project ID or project name
84
+ */
85
+ public async queryWorkItemsForArtifactUris(
86
+ artifactUriQuery: WorkItemTracking.ArtifactUriQuery,
87
+ project?: string
88
+ ): Promise<WorkItemTracking.ArtifactUriQueryResult> {
89
+
90
+ return this.beginRequest<WorkItemTracking.ArtifactUriQueryResult>({
91
+ apiVersion: "5.0-preview.1",
92
+ method: "POST",
93
+ routeTemplate: "{project}/_apis/wit/artifactUriQuery",
94
+ routeValues: {
95
+ project: project
96
+ },
97
+ body: artifactUriQuery
98
+ });
99
+ }
100
+
101
+ /**
102
+ * Uploads an attachment.
103
+ *
104
+ * @param content - Content to upload
105
+ * @param project - Project ID or project name
106
+ * @param fileName - The name of the file
107
+ * @param uploadType - Attachment upload type: Simple or Chunked
108
+ * @param areaPath - Target project Area Path
109
+ */
110
+ public async createAttachment(
111
+ content: any,
112
+ project?: string,
113
+ fileName?: string,
114
+ uploadType?: string,
115
+ areaPath?: string
116
+ ): Promise<WorkItemTracking.AttachmentReference> {
117
+
118
+ const queryValues: any = {
119
+ fileName: fileName,
120
+ uploadType: uploadType,
121
+ areaPath: areaPath
122
+ };
123
+
124
+ return this.beginRequest<WorkItemTracking.AttachmentReference>({
125
+ apiVersion: "5.0-preview.3",
126
+ method: "POST",
127
+ routeTemplate: "{project}/_apis/wit/attachments/{id}",
128
+ routeValues: {
129
+ project: project
130
+ },
131
+ customHeaders: {
132
+ "Content-Type": "application/octet-stream",
133
+ },
134
+ queryParams: queryValues,
135
+ body: content,
136
+ isRawData: true
137
+ });
138
+ }
139
+
140
+ /**
141
+ * Downloads an attachment.
142
+ *
143
+ * @param id - Attachment ID
144
+ * @param project - Project ID or project name
145
+ * @param fileName - Name of the file
146
+ * @param download - If set to \<c\>true\</c\> always download attachment
147
+ */
148
+ public async getAttachmentContent(
149
+ id: string,
150
+ project?: string,
151
+ fileName?: string,
152
+ download?: boolean
153
+ ): Promise<ArrayBuffer> {
154
+
155
+ const queryValues: any = {
156
+ fileName: fileName,
157
+ download: download
158
+ };
159
+
160
+ return this.beginRequest<ArrayBuffer>({
161
+ apiVersion: "5.0-preview.3",
162
+ httpResponseType: "application/octet-stream",
163
+ routeTemplate: "{project}/_apis/wit/attachments/{id}",
164
+ routeValues: {
165
+ project: project,
166
+ id: id
167
+ },
168
+ queryParams: queryValues
169
+ });
170
+ }
171
+
172
+ /**
173
+ * Downloads an attachment.
174
+ *
175
+ * @param id - Attachment ID
176
+ * @param project - Project ID or project name
177
+ * @param fileName - Name of the file
178
+ * @param download - If set to \<c\>true\</c\> always download attachment
179
+ */
180
+ public async getAttachmentZip(
181
+ id: string,
182
+ project?: string,
183
+ fileName?: string,
184
+ download?: boolean
185
+ ): Promise<ArrayBuffer> {
186
+
187
+ const queryValues: any = {
188
+ fileName: fileName,
189
+ download: download
190
+ };
191
+
192
+ return this.beginRequest<ArrayBuffer>({
193
+ apiVersion: "5.0-preview.3",
194
+ httpResponseType: "application/zip",
195
+ routeTemplate: "{project}/_apis/wit/attachments/{id}",
196
+ routeValues: {
197
+ project: project,
198
+ id: id
199
+ },
200
+ queryParams: queryValues
201
+ });
202
+ }
203
+
204
+ /**
205
+ * Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project.
206
+ *
207
+ * @param project - Project ID or project name
208
+ * @param ids - Comma separated integer classification nodes ids. It's not required, if you want root nodes.
209
+ * @param depth - Depth of children to fetch.
210
+ * @param errorPolicy - Flag to handle errors in getting some nodes. Possible options are Fail and Omit.
211
+ */
212
+ public async getClassificationNodes(
213
+ project: string,
214
+ ids: number[],
215
+ depth?: number,
216
+ errorPolicy?: WorkItemTracking.ClassificationNodesErrorPolicy
217
+ ): Promise<WorkItemTracking.WorkItemClassificationNode[]> {
218
+
219
+ const queryValues: any = {
220
+ ids: ids && ids.join(","),
221
+ '$depth': depth,
222
+ errorPolicy: errorPolicy
223
+ };
224
+
225
+ return this.beginRequest<WorkItemTracking.WorkItemClassificationNode[]>({
226
+ apiVersion: "5.0-preview.2",
227
+ routeTemplate: "{project}/_apis/wit/classificationNodes",
228
+ routeValues: {
229
+ project: project
230
+ },
231
+ queryParams: queryValues
232
+ });
233
+ }
234
+
235
+ /**
236
+ * Gets root classification nodes under the project.
237
+ *
238
+ * @param project - Project ID or project name
239
+ * @param depth - Depth of children to fetch.
240
+ */
241
+ public async getRootNodes(
242
+ project: string,
243
+ depth?: number
244
+ ): Promise<WorkItemTracking.WorkItemClassificationNode[]> {
245
+
246
+ const queryValues: any = {
247
+ '$depth': depth
248
+ };
249
+
250
+ return this.beginRequest<WorkItemTracking.WorkItemClassificationNode[]>({
251
+ apiVersion: "5.0-preview.2",
252
+ routeTemplate: "{project}/_apis/wit/classificationNodes",
253
+ routeValues: {
254
+ project: project
255
+ },
256
+ queryParams: queryValues
257
+ });
258
+ }
259
+
260
+ /**
261
+ * Create new or update an existing classification node.
262
+ *
263
+ * @param postedNode - Node to create or update.
264
+ * @param project - Project ID or project name
265
+ * @param structureGroup - Structure group of the classification node, area or iteration.
266
+ * @param path - Path of the classification node.
267
+ */
268
+ public async createOrUpdateClassificationNode(
269
+ postedNode: WorkItemTracking.WorkItemClassificationNode,
270
+ project: string,
271
+ structureGroup: WorkItemTracking.TreeStructureGroup,
272
+ path?: string
273
+ ): Promise<WorkItemTracking.WorkItemClassificationNode> {
274
+
275
+ return this.beginRequest<WorkItemTracking.WorkItemClassificationNode>({
276
+ apiVersion: "5.0-preview.2",
277
+ method: "POST",
278
+ routeTemplate: "{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",
279
+ routeValues: {
280
+ project: project,
281
+ structureGroup: structureGroup,
282
+ path: path
283
+ },
284
+ body: postedNode
285
+ });
286
+ }
287
+
288
+ /**
289
+ * Delete an existing classification node.
290
+ *
291
+ * @param project - Project ID or project name
292
+ * @param structureGroup - Structure group of the classification node, area or iteration.
293
+ * @param path - Path of the classification node.
294
+ * @param reclassifyId - Id of the target classification node for reclassification.
295
+ */
296
+ public async deleteClassificationNode(
297
+ project: string,
298
+ structureGroup: WorkItemTracking.TreeStructureGroup,
299
+ path?: string,
300
+ reclassifyId?: number
301
+ ): Promise<void> {
302
+
303
+ const queryValues: any = {
304
+ '$reclassifyId': reclassifyId
305
+ };
306
+
307
+ return this.beginRequest<void>({
308
+ apiVersion: "5.0-preview.2",
309
+ method: "DELETE",
310
+ routeTemplate: "{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",
311
+ routeValues: {
312
+ project: project,
313
+ structureGroup: structureGroup,
314
+ path: path
315
+ },
316
+ queryParams: queryValues
317
+ });
318
+ }
319
+
320
+ /**
321
+ * Gets the classification node for a given node path.
322
+ *
323
+ * @param project - Project ID or project name
324
+ * @param structureGroup - Structure group of the classification node, area or iteration.
325
+ * @param path - Path of the classification node.
326
+ * @param depth - Depth of children to fetch.
327
+ */
328
+ public async getClassificationNode(
329
+ project: string,
330
+ structureGroup: WorkItemTracking.TreeStructureGroup,
331
+ path?: string,
332
+ depth?: number
333
+ ): Promise<WorkItemTracking.WorkItemClassificationNode> {
334
+
335
+ const queryValues: any = {
336
+ '$depth': depth
337
+ };
338
+
339
+ return this.beginRequest<WorkItemTracking.WorkItemClassificationNode>({
340
+ apiVersion: "5.0-preview.2",
341
+ routeTemplate: "{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",
342
+ routeValues: {
343
+ project: project,
344
+ structureGroup: structureGroup,
345
+ path: path
346
+ },
347
+ queryParams: queryValues
348
+ });
349
+ }
350
+
351
+ /**
352
+ * Update an existing classification node.
353
+ *
354
+ * @param postedNode - Node to create or update.
355
+ * @param project - Project ID or project name
356
+ * @param structureGroup - Structure group of the classification node, area or iteration.
357
+ * @param path - Path of the classification node.
358
+ */
359
+ public async updateClassificationNode(
360
+ postedNode: WorkItemTracking.WorkItemClassificationNode,
361
+ project: string,
362
+ structureGroup: WorkItemTracking.TreeStructureGroup,
363
+ path?: string
364
+ ): Promise<WorkItemTracking.WorkItemClassificationNode> {
365
+
366
+ return this.beginRequest<WorkItemTracking.WorkItemClassificationNode>({
367
+ apiVersion: "5.0-preview.2",
368
+ method: "PATCH",
369
+ routeTemplate: "{project}/_apis/wit/classificationNodes/{structureGroup}/{*path}",
370
+ routeValues: {
371
+ project: project,
372
+ structureGroup: structureGroup,
373
+ path: path
374
+ },
375
+ body: postedNode
376
+ });
377
+ }
378
+
379
+ /**
380
+ * Gets a comment for a work item at the specified revision.
381
+ *
382
+ * @param id - Work item id
383
+ * @param revision - Revision for which the comment need to be fetched
384
+ * @param project - Project ID or project name
385
+ */
386
+ public async getComment(
387
+ id: number,
388
+ revision: number,
389
+ project?: string
390
+ ): Promise<WorkItemTracking.WorkItemComment> {
391
+
392
+ return this.beginRequest<WorkItemTracking.WorkItemComment>({
393
+ apiVersion: "5.0-preview.2",
394
+ routeTemplate: "{project}/_apis/wit/workItems/{id}/comments/{revision}",
395
+ routeValues: {
396
+ project: project,
397
+ id: id,
398
+ revision: revision
399
+ }
400
+ });
401
+ }
402
+
403
+ /**
404
+ * Gets the specified number of comments for a work item from the specified revision.
405
+ *
406
+ * @param id - Work item id
407
+ * @param project - Project ID or project name
408
+ * @param fromRevision - Revision from which comments are to be fetched (default is 1)
409
+ * @param top - The number of comments to return (default is 200)
410
+ * @param order - Ascending or descending by revision id (default is ascending)
411
+ */
412
+ public async getComments(
413
+ id: number,
414
+ project?: string,
415
+ fromRevision?: number,
416
+ top?: number,
417
+ order?: WorkItemTracking.CommentSortOrder
418
+ ): Promise<WorkItemTracking.WorkItemComments> {
419
+
420
+ const queryValues: any = {
421
+ fromRevision: fromRevision,
422
+ '$top': top,
423
+ order: order
424
+ };
425
+
426
+ return this.beginRequest<WorkItemTracking.WorkItemComments>({
427
+ apiVersion: "5.0-preview.2",
428
+ routeTemplate: "{project}/_apis/wit/workItems/{id}/comments/{revision}",
429
+ routeValues: {
430
+ project: project,
431
+ id: id
432
+ },
433
+ queryParams: queryValues
434
+ });
435
+ }
436
+
437
+ /**
438
+ * Create a new field.
439
+ *
440
+ * @param workItemField - New field definition
441
+ * @param project - Project ID or project name
442
+ */
443
+ public async createField(
444
+ workItemField: WorkItemTracking.WorkItemField,
445
+ project?: string
446
+ ): Promise<WorkItemTracking.WorkItemField> {
447
+
448
+ return this.beginRequest<WorkItemTracking.WorkItemField>({
449
+ apiVersion: "5.0-preview.2",
450
+ method: "POST",
451
+ routeTemplate: "{project}/_apis/wit/fields/{fieldNameOrRefName}",
452
+ routeValues: {
453
+ project: project
454
+ },
455
+ body: workItemField
456
+ });
457
+ }
458
+
459
+ /**
460
+ * Deletes the field. To undelete a filed, see "Update Field" API.
461
+ *
462
+ * @param fieldNameOrRefName - Field simple name or reference name
463
+ * @param project - Project ID or project name
464
+ */
465
+ public async deleteField(
466
+ fieldNameOrRefName: string,
467
+ project?: string
468
+ ): Promise<void> {
469
+
470
+ return this.beginRequest<void>({
471
+ apiVersion: "5.0-preview.2",
472
+ method: "DELETE",
473
+ routeTemplate: "{project}/_apis/wit/fields/{fieldNameOrRefName}",
474
+ routeValues: {
475
+ project: project,
476
+ fieldNameOrRefName: fieldNameOrRefName
477
+ }
478
+ });
479
+ }
480
+
481
+ /**
482
+ * Gets information on a specific field.
483
+ *
484
+ * @param fieldNameOrRefName - Field simple name or reference name
485
+ * @param project - Project ID or project name
486
+ */
487
+ public async getField(
488
+ fieldNameOrRefName: string,
489
+ project?: string
490
+ ): Promise<WorkItemTracking.WorkItemField> {
491
+
492
+ return this.beginRequest<WorkItemTracking.WorkItemField>({
493
+ apiVersion: "5.0-preview.2",
494
+ routeTemplate: "{project}/_apis/wit/fields/{fieldNameOrRefName}",
495
+ routeValues: {
496
+ project: project,
497
+ fieldNameOrRefName: fieldNameOrRefName
498
+ }
499
+ });
500
+ }
501
+
502
+ /**
503
+ * Returns information for all fields. The project ID/name parameter is optional.
504
+ *
505
+ * @param project - Project ID or project name
506
+ * @param expand - Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included.
507
+ */
508
+ public async getFields(
509
+ project?: string,
510
+ expand?: WorkItemTracking.GetFieldsExpand
511
+ ): Promise<WorkItemTracking.WorkItemField[]> {
512
+
513
+ const queryValues: any = {
514
+ '$expand': expand
515
+ };
516
+
517
+ return this.beginRequest<WorkItemTracking.WorkItemField[]>({
518
+ apiVersion: "5.0-preview.2",
519
+ routeTemplate: "{project}/_apis/wit/fields/{fieldNameOrRefName}",
520
+ routeValues: {
521
+ project: project
522
+ },
523
+ queryParams: queryValues
524
+ });
525
+ }
526
+
527
+ /**
528
+ * Update a field.
529
+ *
530
+ * @param payload - Payload contains desired value of the field's properties
531
+ * @param fieldNameOrRefName - Name/reference name of the field to be updated
532
+ * @param project - Project ID or project name
533
+ */
534
+ public async updateField(
535
+ payload: WorkItemTracking.UpdateWorkItemField,
536
+ fieldNameOrRefName: string,
537
+ project?: string
538
+ ): Promise<WorkItemTracking.WorkItemField> {
539
+
540
+ return this.beginRequest<WorkItemTracking.WorkItemField>({
541
+ apiVersion: "5.0-preview.2",
542
+ method: "PATCH",
543
+ routeTemplate: "{project}/_apis/wit/fields/{fieldNameOrRefName}",
544
+ routeValues: {
545
+ project: project,
546
+ fieldNameOrRefName: fieldNameOrRefName
547
+ },
548
+ body: payload
549
+ });
550
+ }
551
+
552
+ /**
553
+ * Creates a query, or moves a query.
554
+ *
555
+ * @param postedQuery - The query to create.
556
+ * @param project - Project ID or project name
557
+ * @param query - The parent id or path under which the query is to be created.
558
+ * @param validateWiqlOnly - If you only want to validate your WIQL query without actually creating one, set it to true. Default is false.
559
+ */
560
+ public async createQuery(
561
+ postedQuery: WorkItemTracking.QueryHierarchyItem,
562
+ project: string,
563
+ query: string,
564
+ validateWiqlOnly?: boolean
565
+ ): Promise<WorkItemTracking.QueryHierarchyItem> {
566
+
567
+ const queryValues: any = {
568
+ validateWiqlOnly: validateWiqlOnly
569
+ };
570
+
571
+ return this.beginRequest<WorkItemTracking.QueryHierarchyItem>({
572
+ apiVersion: "5.0-preview.2",
573
+ method: "POST",
574
+ routeTemplate: "{project}/_apis/wit/queries/{*query}",
575
+ routeValues: {
576
+ project: project,
577
+ query: query
578
+ },
579
+ queryParams: queryValues,
580
+ body: postedQuery
581
+ });
582
+ }
583
+
584
+ /**
585
+ * Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder.
586
+ *
587
+ * @param project - Project ID or project name
588
+ * @param query - ID or path of the query or folder to delete.
589
+ */
590
+ public async deleteQuery(
591
+ project: string,
592
+ query: string
593
+ ): Promise<void> {
594
+
595
+ return this.beginRequest<void>({
596
+ apiVersion: "5.0-preview.2",
597
+ method: "DELETE",
598
+ routeTemplate: "{project}/_apis/wit/queries/{*query}",
599
+ routeValues: {
600
+ project: project,
601
+ query: query
602
+ }
603
+ });
604
+ }
605
+
606
+ /**
607
+ * Gets the root queries and their children
608
+ *
609
+ * @param project - Project ID or project name
610
+ * @param expand - Include the query string (wiql), clauses, query result columns, and sort options in the results.
611
+ * @param depth - In the folder of queries, return child queries and folders to this depth.
612
+ * @param includeDeleted - Include deleted queries and folders
613
+ */
614
+ public async getQueries(
615
+ project: string,
616
+ expand?: WorkItemTracking.QueryExpand,
617
+ depth?: number,
618
+ includeDeleted?: boolean
619
+ ): Promise<WorkItemTracking.QueryHierarchyItem[]> {
620
+
621
+ const queryValues: any = {
622
+ '$expand': expand,
623
+ '$depth': depth,
624
+ '$includeDeleted': includeDeleted
625
+ };
626
+
627
+ return this.beginRequest<WorkItemTracking.QueryHierarchyItem[]>({
628
+ apiVersion: "5.0-preview.2",
629
+ routeTemplate: "{project}/_apis/wit/queries/{*query}",
630
+ routeValues: {
631
+ project: project
632
+ },
633
+ queryParams: queryValues
634
+ });
635
+ }
636
+
637
+ /**
638
+ * Retrieves an individual query and its children
639
+ *
640
+ * @param project - Project ID or project name
641
+ * @param query - ID or path of the query.
642
+ * @param expand - Include the query string (wiql), clauses, query result columns, and sort options in the results.
643
+ * @param depth - In the folder of queries, return child queries and folders to this depth.
644
+ * @param includeDeleted - Include deleted queries and folders
645
+ * @param useIsoDateFormat - DateTime query clauses will be formatted using a ISO 8601 compliant format
646
+ */
647
+ public async getQuery(
648
+ project: string,
649
+ query: string,
650
+ expand?: WorkItemTracking.QueryExpand,
651
+ depth?: number,
652
+ includeDeleted?: boolean,
653
+ useIsoDateFormat?: boolean
654
+ ): Promise<WorkItemTracking.QueryHierarchyItem> {
655
+
656
+ const queryValues: any = {
657
+ '$expand': expand,
658
+ '$depth': depth,
659
+ '$includeDeleted': includeDeleted,
660
+ '$useIsoDateFormat': useIsoDateFormat
661
+ };
662
+
663
+ return this.beginRequest<WorkItemTracking.QueryHierarchyItem>({
664
+ apiVersion: "5.0-preview.2",
665
+ routeTemplate: "{project}/_apis/wit/queries/{*query}",
666
+ routeValues: {
667
+ project: project,
668
+ query: query
669
+ },
670
+ queryParams: queryValues
671
+ });
672
+ }
673
+
674
+ /**
675
+ * Searches all queries the user has access to in the current project
676
+ *
677
+ * @param project - Project ID or project name
678
+ * @param filter - The text to filter the queries with.
679
+ * @param top - The number of queries to return (Default is 50 and maximum is 200).
680
+ * @param expand -
681
+ * @param includeDeleted - Include deleted queries and folders
682
+ */
683
+ public async searchQueries(
684
+ project: string,
685
+ filter: string,
686
+ top?: number,
687
+ expand?: WorkItemTracking.QueryExpand,
688
+ includeDeleted?: boolean
689
+ ): Promise<WorkItemTracking.QueryHierarchyItemsResult> {
690
+
691
+ const queryValues: any = {
692
+ '$filter': filter,
693
+ '$top': top,
694
+ '$expand': expand,
695
+ '$includeDeleted': includeDeleted
696
+ };
697
+
698
+ return this.beginRequest<WorkItemTracking.QueryHierarchyItemsResult>({
699
+ apiVersion: "5.0-preview.2",
700
+ routeTemplate: "{project}/_apis/wit/queries/{*query}",
701
+ routeValues: {
702
+ project: project
703
+ },
704
+ queryParams: queryValues
705
+ });
706
+ }
707
+
708
+ /**
709
+ * Update a query or a folder. This allows you to update, rename and move queries and folders.
710
+ *
711
+ * @param queryUpdate - The query to update.
712
+ * @param project - Project ID or project name
713
+ * @param query - The ID or path for the query to update.
714
+ * @param undeleteDescendants - Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants.
715
+ */
716
+ public async updateQuery(
717
+ queryUpdate: WorkItemTracking.QueryHierarchyItem,
718
+ project: string,
719
+ query: string,
720
+ undeleteDescendants?: boolean
721
+ ): Promise<WorkItemTracking.QueryHierarchyItem> {
722
+
723
+ const queryValues: any = {
724
+ '$undeleteDescendants': undeleteDescendants
725
+ };
726
+
727
+ return this.beginRequest<WorkItemTracking.QueryHierarchyItem>({
728
+ apiVersion: "5.0-preview.2",
729
+ method: "PATCH",
730
+ routeTemplate: "{project}/_apis/wit/queries/{*query}",
731
+ routeValues: {
732
+ project: project,
733
+ query: query
734
+ },
735
+ queryParams: queryValues,
736
+ body: queryUpdate
737
+ });
738
+ }
739
+
740
+ /**
741
+ * Gets a list of queries by ids (Maximum 1000)
742
+ *
743
+ * @param queryGetRequest -
744
+ * @param project - Project ID or project name
745
+ */
746
+ public async getQueriesBatch(
747
+ queryGetRequest: WorkItemTracking.QueryBatchGetRequest,
748
+ project: string
749
+ ): Promise<WorkItemTracking.QueryHierarchyItem[]> {
750
+
751
+ return this.beginRequest<WorkItemTracking.QueryHierarchyItem[]>({
752
+ apiVersion: "5.0-preview.1",
753
+ method: "POST",
754
+ routeTemplate: "{project}/_apis/wit/queriesBatch",
755
+ routeValues: {
756
+ project: project
757
+ },
758
+ body: queryGetRequest
759
+ });
760
+ }
761
+
762
+ /**
763
+ * Destroys the specified work item permanently from the Recycle Bin. This action can not be undone.
764
+ *
765
+ * @param id - ID of the work item to be destroyed permanently
766
+ * @param project - Project ID or project name
767
+ */
768
+ public async destroyWorkItem(
769
+ id: number,
770
+ project?: string
771
+ ): Promise<void> {
772
+
773
+ return this.beginRequest<void>({
774
+ apiVersion: "5.0-preview.2",
775
+ method: "DELETE",
776
+ routeTemplate: "{project}/_apis/wit/recyclebin/{id}",
777
+ routeValues: {
778
+ project: project,
779
+ id: id
780
+ }
781
+ });
782
+ }
783
+
784
+ /**
785
+ * Gets a deleted work item from Recycle Bin.
786
+ *
787
+ * @param id - ID of the work item to be returned
788
+ * @param project - Project ID or project name
789
+ */
790
+ public async getDeletedWorkItem(
791
+ id: number,
792
+ project?: string
793
+ ): Promise<WorkItemTracking.WorkItemDelete> {
794
+
795
+ return this.beginRequest<WorkItemTracking.WorkItemDelete>({
796
+ apiVersion: "5.0-preview.2",
797
+ routeTemplate: "{project}/_apis/wit/recyclebin/{id}",
798
+ routeValues: {
799
+ project: project,
800
+ id: id
801
+ }
802
+ });
803
+ }
804
+
805
+ /**
806
+ * Gets the work items from the recycle bin, whose IDs have been specified in the parameters
807
+ *
808
+ * @param ids - Comma separated list of IDs of the deleted work items to be returned
809
+ * @param project - Project ID or project name
810
+ */
811
+ public async getDeletedWorkItems(
812
+ ids: number[],
813
+ project?: string
814
+ ): Promise<WorkItemTracking.WorkItemDeleteReference[]> {
815
+
816
+ const queryValues: any = {
817
+ ids: ids && ids.join(",")
818
+ };
819
+
820
+ return this.beginRequest<WorkItemTracking.WorkItemDeleteReference[]>({
821
+ apiVersion: "5.0-preview.2",
822
+ routeTemplate: "{project}/_apis/wit/recyclebin/{id}",
823
+ routeValues: {
824
+ project: project
825
+ },
826
+ queryParams: queryValues
827
+ });
828
+ }
829
+
830
+ /**
831
+ * Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin.
832
+ *
833
+ * @param project - Project ID or project name
834
+ */
835
+ public async getDeletedWorkItemShallowReferences(
836
+ project?: string
837
+ ): Promise<WorkItemTracking.WorkItemDeleteShallowReference[]> {
838
+
839
+ return this.beginRequest<WorkItemTracking.WorkItemDeleteShallowReference[]>({
840
+ apiVersion: "5.0-preview.2",
841
+ routeTemplate: "{project}/_apis/wit/recyclebin/{id}",
842
+ routeValues: {
843
+ project: project
844
+ }
845
+ });
846
+ }
847
+
848
+ /**
849
+ * Restores the deleted work item from Recycle Bin.
850
+ *
851
+ * @param payload - Paylod with instructions to update the IsDeleted flag to false
852
+ * @param id - ID of the work item to be restored
853
+ * @param project - Project ID or project name
854
+ */
855
+ public async restoreWorkItem(
856
+ payload: WorkItemTracking.WorkItemDeleteUpdate,
857
+ id: number,
858
+ project?: string
859
+ ): Promise<WorkItemTracking.WorkItemDelete> {
860
+
861
+ return this.beginRequest<WorkItemTracking.WorkItemDelete>({
862
+ apiVersion: "5.0-preview.2",
863
+ method: "PATCH",
864
+ routeTemplate: "{project}/_apis/wit/recyclebin/{id}",
865
+ routeValues: {
866
+ project: project,
867
+ id: id
868
+ },
869
+ body: payload
870
+ });
871
+ }
872
+
873
+ /**
874
+ * Returns a fully hydrated work item for the requested revision
875
+ *
876
+ * @param id -
877
+ * @param revisionNumber -
878
+ * @param project - Project ID or project name
879
+ * @param expand -
880
+ */
881
+ public async getRevision(
882
+ id: number,
883
+ revisionNumber: number,
884
+ project?: string,
885
+ expand?: WorkItemTracking.WorkItemExpand
886
+ ): Promise<WorkItemTracking.WorkItem> {
887
+
888
+ const queryValues: any = {
889
+ '$expand': expand
890
+ };
891
+
892
+ return this.beginRequest<WorkItemTracking.WorkItem>({
893
+ apiVersion: "5.0-preview.3",
894
+ routeTemplate: "{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}",
895
+ routeValues: {
896
+ project: project,
897
+ id: id,
898
+ revisionNumber: revisionNumber
899
+ },
900
+ queryParams: queryValues
901
+ });
902
+ }
903
+
904
+ /**
905
+ * Returns the list of fully hydrated work item revisions, paged.
906
+ *
907
+ * @param id -
908
+ * @param project - Project ID or project name
909
+ * @param top -
910
+ * @param skip -
911
+ * @param expand -
912
+ */
913
+ public async getRevisions(
914
+ id: number,
915
+ project?: string,
916
+ top?: number,
917
+ skip?: number,
918
+ expand?: WorkItemTracking.WorkItemExpand
919
+ ): Promise<WorkItemTracking.WorkItem[]> {
920
+
921
+ const queryValues: any = {
922
+ '$top': top,
923
+ '$skip': skip,
924
+ '$expand': expand
925
+ };
926
+
927
+ return this.beginRequest<WorkItemTracking.WorkItem[]>({
928
+ apiVersion: "5.0-preview.3",
929
+ routeTemplate: "{project}/_apis/wit/workItems/{id}/revisions/{revisionNumber}",
930
+ routeValues: {
931
+ project: project,
932
+ id: id
933
+ },
934
+ queryParams: queryValues
935
+ });
936
+ }
937
+
938
+ /**
939
+ * RESTful method to send mail for selected/queried work items.
940
+ *
941
+ * @param body -
942
+ * @param project - Project ID or project name
943
+ */
944
+ public async sendMail(
945
+ body: WorkItemTracking.SendMailBody,
946
+ project?: string
947
+ ): Promise<void> {
948
+
949
+ return this.beginRequest<void>({
950
+ apiVersion: "5.0-preview.1",
951
+ method: "POST",
952
+ routeTemplate: "{project}/_apis/wit/sendMail",
953
+ routeValues: {
954
+ project: project
955
+ },
956
+ body: body
957
+ });
958
+ }
959
+
960
+ /**
961
+ * Creates a template
962
+ *
963
+ * @param template - Template contents
964
+ * @param project - Project ID or project name
965
+ * @param team - Team ID or team name
966
+ */
967
+ public async createTemplate(
968
+ template: WorkItemTracking.WorkItemTemplate,
969
+ project: string,
970
+ team: string
971
+ ): Promise<WorkItemTracking.WorkItemTemplate> {
972
+
973
+ return this.beginRequest<WorkItemTracking.WorkItemTemplate>({
974
+ apiVersion: "5.0-preview.1",
975
+ method: "POST",
976
+ routeTemplate: "{project}/{team}/_apis/wit/templates",
977
+ routeValues: {
978
+ project: project,
979
+ team: team
980
+ },
981
+ body: template
982
+ });
983
+ }
984
+
985
+ /**
986
+ * Gets template
987
+ *
988
+ * @param project - Project ID or project name
989
+ * @param team - Team ID or team name
990
+ * @param workitemtypename - Optional, When specified returns templates for given Work item type.
991
+ */
992
+ public async getTemplates(
993
+ project: string,
994
+ team: string,
995
+ workitemtypename?: string
996
+ ): Promise<WorkItemTracking.WorkItemTemplateReference[]> {
997
+
998
+ const queryValues: any = {
999
+ workitemtypename: workitemtypename
1000
+ };
1001
+
1002
+ return this.beginRequest<WorkItemTracking.WorkItemTemplateReference[]>({
1003
+ apiVersion: "5.0-preview.1",
1004
+ routeTemplate: "{project}/{team}/_apis/wit/templates",
1005
+ routeValues: {
1006
+ project: project,
1007
+ team: team
1008
+ },
1009
+ queryParams: queryValues
1010
+ });
1011
+ }
1012
+
1013
+ /**
1014
+ * Deletes the template with given id
1015
+ *
1016
+ * @param project - Project ID or project name
1017
+ * @param team - Team ID or team name
1018
+ * @param templateId - Template id
1019
+ */
1020
+ public async deleteTemplate(
1021
+ project: string,
1022
+ team: string,
1023
+ templateId: string
1024
+ ): Promise<void> {
1025
+
1026
+ return this.beginRequest<void>({
1027
+ apiVersion: "5.0-preview.1",
1028
+ method: "DELETE",
1029
+ routeTemplate: "{project}/{team}/_apis/wit/templates/{templateId}",
1030
+ routeValues: {
1031
+ project: project,
1032
+ team: team,
1033
+ templateId: templateId
1034
+ }
1035
+ });
1036
+ }
1037
+
1038
+ /**
1039
+ * Gets the template with specified id
1040
+ *
1041
+ * @param project - Project ID or project name
1042
+ * @param team - Team ID or team name
1043
+ * @param templateId - Template Id
1044
+ */
1045
+ public async getTemplate(
1046
+ project: string,
1047
+ team: string,
1048
+ templateId: string
1049
+ ): Promise<WorkItemTracking.WorkItemTemplate> {
1050
+
1051
+ return this.beginRequest<WorkItemTracking.WorkItemTemplate>({
1052
+ apiVersion: "5.0-preview.1",
1053
+ routeTemplate: "{project}/{team}/_apis/wit/templates/{templateId}",
1054
+ routeValues: {
1055
+ project: project,
1056
+ team: team,
1057
+ templateId: templateId
1058
+ }
1059
+ });
1060
+ }
1061
+
1062
+ /**
1063
+ * Replace template contents
1064
+ *
1065
+ * @param templateContent - Template contents to replace with
1066
+ * @param project - Project ID or project name
1067
+ * @param team - Team ID or team name
1068
+ * @param templateId - Template id
1069
+ */
1070
+ public async replaceTemplate(
1071
+ templateContent: WorkItemTracking.WorkItemTemplate,
1072
+ project: string,
1073
+ team: string,
1074
+ templateId: string
1075
+ ): Promise<WorkItemTracking.WorkItemTemplate> {
1076
+
1077
+ return this.beginRequest<WorkItemTracking.WorkItemTemplate>({
1078
+ apiVersion: "5.0-preview.1",
1079
+ method: "PUT",
1080
+ routeTemplate: "{project}/{team}/_apis/wit/templates/{templateId}",
1081
+ routeValues: {
1082
+ project: project,
1083
+ team: team,
1084
+ templateId: templateId
1085
+ },
1086
+ body: templateContent
1087
+ });
1088
+ }
1089
+
1090
+ /**
1091
+ * Returns a single update for a work item
1092
+ *
1093
+ * @param id -
1094
+ * @param updateNumber -
1095
+ * @param project - Project ID or project name
1096
+ */
1097
+ public async getUpdate(
1098
+ id: number,
1099
+ updateNumber: number,
1100
+ project?: string
1101
+ ): Promise<WorkItemTracking.WorkItemUpdate> {
1102
+
1103
+ return this.beginRequest<WorkItemTracking.WorkItemUpdate>({
1104
+ apiVersion: "5.0-preview.3",
1105
+ routeTemplate: "{project}/_apis/wit/workItems/{id}/updates/{updateNumber}",
1106
+ routeValues: {
1107
+ project: project,
1108
+ id: id,
1109
+ updateNumber: updateNumber
1110
+ }
1111
+ });
1112
+ }
1113
+
1114
+ /**
1115
+ * Returns the deltas between work item revisions
1116
+ *
1117
+ * @param id -
1118
+ * @param project - Project ID or project name
1119
+ * @param top -
1120
+ * @param skip -
1121
+ */
1122
+ public async getUpdates(
1123
+ id: number,
1124
+ project?: string,
1125
+ top?: number,
1126
+ skip?: number
1127
+ ): Promise<WorkItemTracking.WorkItemUpdate[]> {
1128
+
1129
+ const queryValues: any = {
1130
+ '$top': top,
1131
+ '$skip': skip
1132
+ };
1133
+
1134
+ return this.beginRequest<WorkItemTracking.WorkItemUpdate[]>({
1135
+ apiVersion: "5.0-preview.3",
1136
+ routeTemplate: "{project}/_apis/wit/workItems/{id}/updates/{updateNumber}",
1137
+ routeValues: {
1138
+ project: project,
1139
+ id: id
1140
+ },
1141
+ queryParams: queryValues
1142
+ });
1143
+ }
1144
+
1145
+ /**
1146
+ * Gets the results of the query given its WIQL.
1147
+ *
1148
+ * @param wiql - The query containing the WIQL.
1149
+ * @param project - Project ID or project name
1150
+ * @param team - Team ID or team name
1151
+ * @param timePrecision - Whether or not to use time precision.
1152
+ * @param top - The max number of results to return.
1153
+ */
1154
+ public async queryByWiql(
1155
+ wiql: WorkItemTracking.Wiql,
1156
+ project?: string,
1157
+ team?: string,
1158
+ timePrecision?: boolean,
1159
+ top?: number
1160
+ ): Promise<WorkItemTracking.WorkItemQueryResult> {
1161
+
1162
+ const queryValues: any = {
1163
+ timePrecision: timePrecision,
1164
+ '$top': top
1165
+ };
1166
+
1167
+ return this.beginRequest<WorkItemTracking.WorkItemQueryResult>({
1168
+ apiVersion: "5.0-preview.2",
1169
+ method: "POST",
1170
+ routeTemplate: "{project}/{team}/_apis/wit/wiql",
1171
+ routeValues: {
1172
+ project: project,
1173
+ team: team
1174
+ },
1175
+ queryParams: queryValues,
1176
+ body: wiql
1177
+ });
1178
+ }
1179
+
1180
+ /**
1181
+ * Gets the results of the query given the query ID.
1182
+ *
1183
+ * @param id - The query ID.
1184
+ * @param project - Project ID or project name
1185
+ * @param team - Team ID or team name
1186
+ * @param timePrecision - Whether or not to use time precision.
1187
+ * @param top - The max number of results to return.
1188
+ */
1189
+ public async getQueryResultCount(
1190
+ id: string,
1191
+ project?: string,
1192
+ team?: string,
1193
+ timePrecision?: boolean,
1194
+ top?: number
1195
+ ): Promise<number> {
1196
+
1197
+ const queryValues: any = {
1198
+ timePrecision: timePrecision,
1199
+ '$top': top
1200
+ };
1201
+
1202
+ return this.beginRequest<Response>({
1203
+ apiVersion: "5.0-preview.2",
1204
+ method: "HEAD",
1205
+ routeTemplate: "{project}/{team}/_apis/wit/wiql/{id}",
1206
+ routeValues: {
1207
+ project: project,
1208
+ team: team,
1209
+ id: id
1210
+ },
1211
+ queryParams: queryValues,
1212
+ returnRawResponse: true
1213
+ }).then(async response => {
1214
+ return Number(response.headers.get("X-Total-Count"));
1215
+ });
1216
+ }
1217
+
1218
+ /**
1219
+ * Gets the results of the query given the query ID.
1220
+ *
1221
+ * @param id - The query ID.
1222
+ * @param project - Project ID or project name
1223
+ * @param team - Team ID or team name
1224
+ * @param timePrecision - Whether or not to use time precision.
1225
+ * @param top - The max number of results to return.
1226
+ */
1227
+ public async queryById(
1228
+ id: string,
1229
+ project?: string,
1230
+ team?: string,
1231
+ timePrecision?: boolean,
1232
+ top?: number
1233
+ ): Promise<WorkItemTracking.WorkItemQueryResult> {
1234
+
1235
+ const queryValues: any = {
1236
+ timePrecision: timePrecision,
1237
+ '$top': top
1238
+ };
1239
+
1240
+ return this.beginRequest<WorkItemTracking.WorkItemQueryResult>({
1241
+ apiVersion: "5.0-preview.2",
1242
+ routeTemplate: "{project}/{team}/_apis/wit/wiql/{id}",
1243
+ routeValues: {
1244
+ project: project,
1245
+ team: team,
1246
+ id: id
1247
+ },
1248
+ queryParams: queryValues
1249
+ });
1250
+ }
1251
+
1252
+ /**
1253
+ * Get a work item icon given the friendly name and icon color.
1254
+ *
1255
+ * @param icon - The name of the icon
1256
+ * @param color - The 6-digit hex color for the icon
1257
+ * @param v - The version of the icon (used only for cache invalidation)
1258
+ */
1259
+ public async getWorkItemIconJson(
1260
+ icon: string,
1261
+ color?: string,
1262
+ v?: number
1263
+ ): Promise<WorkItemTracking.WorkItemIcon> {
1264
+
1265
+ const queryValues: any = {
1266
+ color: color,
1267
+ v: v
1268
+ };
1269
+
1270
+ return this.beginRequest<WorkItemTracking.WorkItemIcon>({
1271
+ apiVersion: "5.0-preview.1",
1272
+ routeTemplate: "_apis/wit/workItemIcons/{icon}",
1273
+ routeValues: {
1274
+ icon: icon
1275
+ },
1276
+ queryParams: queryValues
1277
+ });
1278
+ }
1279
+
1280
+ /**
1281
+ * Get a list of all work item icons.
1282
+ *
1283
+ */
1284
+ public async getWorkItemIcons(
1285
+ ): Promise<WorkItemTracking.WorkItemIcon[]> {
1286
+
1287
+ return this.beginRequest<WorkItemTracking.WorkItemIcon[]>({
1288
+ apiVersion: "5.0-preview.1",
1289
+ routeTemplate: "_apis/wit/workItemIcons/{icon}"
1290
+ });
1291
+ }
1292
+
1293
+ /**
1294
+ * Get a work item icon given the friendly name and icon color.
1295
+ *
1296
+ * @param icon - The name of the icon
1297
+ * @param color - The 6-digit hex color for the icon
1298
+ * @param v - The version of the icon (used only for cache invalidation)
1299
+ */
1300
+ public async getWorkItemIconSvg(
1301
+ icon: string,
1302
+ color?: string,
1303
+ v?: number
1304
+ ): Promise<any> {
1305
+
1306
+ const queryValues: any = {
1307
+ color: color,
1308
+ v: v
1309
+ };
1310
+
1311
+ return this.beginRequest<any>({
1312
+ apiVersion: "5.0-preview.1",
1313
+ httpResponseType: "image/svg+xml",
1314
+ routeTemplate: "_apis/wit/workItemIcons/{icon}",
1315
+ routeValues: {
1316
+ icon: icon
1317
+ },
1318
+ queryParams: queryValues
1319
+ });
1320
+ }
1321
+
1322
+ /**
1323
+ * Get a work item icon given the friendly name and icon color.
1324
+ *
1325
+ * @param icon - The name of the icon
1326
+ * @param color - The 6-digit hex color for the icon
1327
+ * @param v - The version of the icon (used only for cache invalidation)
1328
+ */
1329
+ public async getWorkItemIconXaml(
1330
+ icon: string,
1331
+ color?: string,
1332
+ v?: number
1333
+ ): Promise<any> {
1334
+
1335
+ const queryValues: any = {
1336
+ color: color,
1337
+ v: v
1338
+ };
1339
+
1340
+ return this.beginRequest<any>({
1341
+ apiVersion: "5.0-preview.1",
1342
+ httpResponseType: "image/xaml+xml",
1343
+ routeTemplate: "_apis/wit/workItemIcons/{icon}",
1344
+ routeValues: {
1345
+ icon: icon
1346
+ },
1347
+ queryParams: queryValues
1348
+ });
1349
+ }
1350
+
1351
+ /**
1352
+ * Get a batch of work item links
1353
+ *
1354
+ * @param project - Project ID or project name
1355
+ * @param linkTypes - A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types.
1356
+ * @param types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types.
1357
+ * @param continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links.
1358
+ * @param startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter.
1359
+ */
1360
+ public async getReportingLinksByLinkType(
1361
+ project?: string,
1362
+ linkTypes?: string[],
1363
+ types?: string[],
1364
+ continuationToken?: string,
1365
+ startDateTime?: Date
1366
+ ): Promise<WorkItemTracking.ReportingWorkItemLinksBatch> {
1367
+
1368
+ const queryValues: any = {
1369
+ linkTypes: linkTypes && linkTypes.join(","),
1370
+ types: types && types.join(","),
1371
+ continuationToken: continuationToken,
1372
+ startDateTime: startDateTime
1373
+ };
1374
+
1375
+ return this.beginRequest<WorkItemTracking.ReportingWorkItemLinksBatch>({
1376
+ apiVersion: "5.0-preview.3",
1377
+ routeTemplate: "{project}/_apis/wit/reporting/workItemLinks",
1378
+ routeValues: {
1379
+ project: project
1380
+ },
1381
+ queryParams: queryValues
1382
+ });
1383
+ }
1384
+
1385
+ /**
1386
+ * Gets the work item relation type definition.
1387
+ *
1388
+ * @param relation - The relation name
1389
+ */
1390
+ public async getRelationType(
1391
+ relation: string
1392
+ ): Promise<WorkItemTracking.WorkItemRelationType> {
1393
+
1394
+ return this.beginRequest<WorkItemTracking.WorkItemRelationType>({
1395
+ apiVersion: "5.0-preview.2",
1396
+ routeTemplate: "_apis/wit/workItemRelationTypes/{relation}",
1397
+ routeValues: {
1398
+ relation: relation
1399
+ }
1400
+ });
1401
+ }
1402
+
1403
+ /**
1404
+ * Gets the work item relation types.
1405
+ *
1406
+ */
1407
+ public async getRelationTypes(
1408
+ ): Promise<WorkItemTracking.WorkItemRelationType[]> {
1409
+
1410
+ return this.beginRequest<WorkItemTracking.WorkItemRelationType[]>({
1411
+ apiVersion: "5.0-preview.2",
1412
+ routeTemplate: "_apis/wit/workItemRelationTypes/{relation}"
1413
+ });
1414
+ }
1415
+
1416
+ /**
1417
+ * Get a batch of work item revisions with the option of including deleted items
1418
+ *
1419
+ * @param project - Project ID or project name
1420
+ * @param fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields.
1421
+ * @param types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types.
1422
+ * @param continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.
1423
+ * @param startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter.
1424
+ * @param includeIdentityRef - Return an identity reference instead of a string value for identity fields.
1425
+ * @param includeDeleted - Specify if the deleted item should be returned.
1426
+ * @param includeTagRef - Specify if the tag objects should be returned for System.Tags field.
1427
+ * @param includeLatestOnly - Return only the latest revisions of work items, skipping all historical revisions
1428
+ * @param expand - Return all the fields in work item revisions, including long text fields which are not returned by default
1429
+ * @param includeDiscussionChangesOnly - Return only the those revisions of work items, where only history field was changed
1430
+ * @param maxPageSize - The maximum number of results to return in this batch
1431
+ */
1432
+ public async readReportingRevisionsGet(
1433
+ project?: string,
1434
+ fields?: string[],
1435
+ types?: string[],
1436
+ continuationToken?: string,
1437
+ startDateTime?: Date,
1438
+ includeIdentityRef?: boolean,
1439
+ includeDeleted?: boolean,
1440
+ includeTagRef?: boolean,
1441
+ includeLatestOnly?: boolean,
1442
+ expand?: WorkItemTracking.ReportingRevisionsExpand,
1443
+ includeDiscussionChangesOnly?: boolean,
1444
+ maxPageSize?: number
1445
+ ): Promise<WorkItemTracking.ReportingWorkItemRevisionsBatch> {
1446
+
1447
+ const queryValues: any = {
1448
+ fields: fields && fields.join(","),
1449
+ types: types && types.join(","),
1450
+ continuationToken: continuationToken,
1451
+ startDateTime: startDateTime,
1452
+ includeIdentityRef: includeIdentityRef,
1453
+ includeDeleted: includeDeleted,
1454
+ includeTagRef: includeTagRef,
1455
+ includeLatestOnly: includeLatestOnly,
1456
+ '$expand': expand,
1457
+ includeDiscussionChangesOnly: includeDiscussionChangesOnly,
1458
+ '$maxPageSize': maxPageSize
1459
+ };
1460
+
1461
+ return this.beginRequest<WorkItemTracking.ReportingWorkItemRevisionsBatch>({
1462
+ apiVersion: "5.0-preview.2",
1463
+ routeTemplate: "{project}/_apis/wit/reporting/workItemRevisions",
1464
+ routeValues: {
1465
+ project: project
1466
+ },
1467
+ queryParams: queryValues
1468
+ });
1469
+ }
1470
+
1471
+ /**
1472
+ * Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit.
1473
+ *
1474
+ * @param filter - An object that contains request settings: field filter, type filter, identity format
1475
+ * @param project - Project ID or project name
1476
+ * @param continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions.
1477
+ * @param startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter.
1478
+ * @param expand -
1479
+ */
1480
+ public async readReportingRevisionsPost(
1481
+ filter: WorkItemTracking.ReportingWorkItemRevisionsFilter,
1482
+ project?: string,
1483
+ continuationToken?: string,
1484
+ startDateTime?: Date,
1485
+ expand?: WorkItemTracking.ReportingRevisionsExpand
1486
+ ): Promise<WorkItemTracking.ReportingWorkItemRevisionsBatch> {
1487
+
1488
+ const queryValues: any = {
1489
+ continuationToken: continuationToken,
1490
+ startDateTime: startDateTime,
1491
+ '$expand': expand
1492
+ };
1493
+
1494
+ return this.beginRequest<WorkItemTracking.ReportingWorkItemRevisionsBatch>({
1495
+ apiVersion: "5.0-preview.2",
1496
+ method: "POST",
1497
+ routeTemplate: "{project}/_apis/wit/reporting/workItemRevisions",
1498
+ routeValues: {
1499
+ project: project
1500
+ },
1501
+ queryParams: queryValues,
1502
+ body: filter
1503
+ });
1504
+ }
1505
+
1506
+ /**
1507
+ * Creates a single work item.
1508
+ *
1509
+ * @param document - The JSON Patch document representing the work item
1510
+ * @param project - Project ID or project name
1511
+ * @param type - The work item type of the work item to create
1512
+ * @param validateOnly - Indicate if you only want to validate the changes without saving the work item
1513
+ * @param bypassRules - Do not enforce the work item type rules on this update
1514
+ * @param suppressNotifications - Do not fire any notifications for this change
1515
+ * @param expand - The expand parameters for work item attributes. Possible options are \{ None, Relations, Fields, Links, All \}.
1516
+ */
1517
+ public async createWorkItem(
1518
+ document: WebApi.JsonPatchDocument,
1519
+ project: string,
1520
+ type: string,
1521
+ validateOnly?: boolean,
1522
+ bypassRules?: boolean,
1523
+ suppressNotifications?: boolean,
1524
+ expand?: WorkItemTracking.WorkItemExpand
1525
+ ): Promise<WorkItemTracking.WorkItem> {
1526
+
1527
+ const queryValues: any = {
1528
+ validateOnly: validateOnly,
1529
+ bypassRules: bypassRules,
1530
+ suppressNotifications: suppressNotifications,
1531
+ '$expand': expand
1532
+ };
1533
+
1534
+ return this.beginRequest<WorkItemTracking.WorkItem>({
1535
+ apiVersion: "5.0-preview.3",
1536
+ method: "POST",
1537
+ routeTemplate: "{project}/_apis/wit/workItems/${type}",
1538
+ routeValues: {
1539
+ project: project,
1540
+ type: type
1541
+ },
1542
+ customHeaders: {
1543
+ "Content-Type": "application/json-patch+json",
1544
+ },
1545
+ queryParams: queryValues,
1546
+ body: document
1547
+ });
1548
+ }
1549
+
1550
+ /**
1551
+ * Returns a single work item from a template.
1552
+ *
1553
+ * @param project - Project ID or project name
1554
+ * @param type - The work item type name
1555
+ * @param fields - Comma-separated list of requested fields
1556
+ * @param asOf - AsOf UTC date time string
1557
+ * @param expand - The expand parameters for work item attributes. Possible options are \{ None, Relations, Fields, Links, All \}.
1558
+ */
1559
+ public async getWorkItemTemplate(
1560
+ project: string,
1561
+ type: string,
1562
+ fields?: string,
1563
+ asOf?: Date,
1564
+ expand?: WorkItemTracking.WorkItemExpand
1565
+ ): Promise<WorkItemTracking.WorkItem> {
1566
+
1567
+ const queryValues: any = {
1568
+ fields: fields,
1569
+ asOf: asOf,
1570
+ '$expand': expand
1571
+ };
1572
+
1573
+ return this.beginRequest<WorkItemTracking.WorkItem>({
1574
+ apiVersion: "5.0-preview.3",
1575
+ routeTemplate: "{project}/_apis/wit/workItems/${type}",
1576
+ routeValues: {
1577
+ project: project,
1578
+ type: type
1579
+ },
1580
+ queryParams: queryValues
1581
+ });
1582
+ }
1583
+
1584
+ /**
1585
+ * Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
1586
+ *
1587
+ * @param id - ID of the work item to be deleted
1588
+ * @param project - Project ID or project name
1589
+ * @param destroy - Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.
1590
+ */
1591
+ public async deleteWorkItem(
1592
+ id: number,
1593
+ project?: string,
1594
+ destroy?: boolean
1595
+ ): Promise<WorkItemTracking.WorkItemDelete> {
1596
+
1597
+ const queryValues: any = {
1598
+ destroy: destroy
1599
+ };
1600
+
1601
+ return this.beginRequest<WorkItemTracking.WorkItemDelete>({
1602
+ apiVersion: "5.0-preview.3",
1603
+ method: "DELETE",
1604
+ routeTemplate: "{project}/_apis/wit/workItems/{id}",
1605
+ routeValues: {
1606
+ project: project,
1607
+ id: id
1608
+ },
1609
+ queryParams: queryValues
1610
+ });
1611
+ }
1612
+
1613
+ /**
1614
+ * Returns a single work item.
1615
+ *
1616
+ * @param id - The work item id
1617
+ * @param project - Project ID or project name
1618
+ * @param fields - Comma-separated list of requested fields
1619
+ * @param asOf - AsOf UTC date time string
1620
+ * @param expand - The expand parameters for work item attributes. Possible options are \{ None, Relations, Fields, Links, All \}.
1621
+ */
1622
+ public async getWorkItem(
1623
+ id: number,
1624
+ project?: string,
1625
+ fields?: string[],
1626
+ asOf?: Date,
1627
+ expand?: WorkItemTracking.WorkItemExpand
1628
+ ): Promise<WorkItemTracking.WorkItem> {
1629
+
1630
+ const queryValues: any = {
1631
+ fields: fields && fields.join(","),
1632
+ asOf: asOf,
1633
+ '$expand': expand
1634
+ };
1635
+
1636
+ return this.beginRequest<WorkItemTracking.WorkItem>({
1637
+ apiVersion: "5.0-preview.3",
1638
+ routeTemplate: "{project}/_apis/wit/workItems/{id}",
1639
+ routeValues: {
1640
+ project: project,
1641
+ id: id
1642
+ },
1643
+ queryParams: queryValues
1644
+ });
1645
+ }
1646
+
1647
+ /**
1648
+ * Returns a list of work items (Maximum 200)
1649
+ *
1650
+ * @param ids - The comma-separated list of requested work item ids. (Maximum 200 ids allowed).
1651
+ * @param project - Project ID or project name
1652
+ * @param fields - Comma-separated list of requested fields
1653
+ * @param asOf - AsOf UTC date time string
1654
+ * @param expand - The expand parameters for work item attributes. Possible options are \{ None, Relations, Fields, Links, All \}.
1655
+ * @param errorPolicy - The flag to control error policy in a bulk get work items request. Possible options are \{Fail, Omit\}.
1656
+ */
1657
+ public async getWorkItems(
1658
+ ids: number[],
1659
+ project?: string,
1660
+ fields?: string[],
1661
+ asOf?: Date,
1662
+ expand?: WorkItemTracking.WorkItemExpand,
1663
+ errorPolicy?: WorkItemTracking.WorkItemErrorPolicy
1664
+ ): Promise<WorkItemTracking.WorkItem[]> {
1665
+
1666
+ const queryValues: any = {
1667
+ ids: ids && ids.join(","),
1668
+ fields: fields && fields.join(","),
1669
+ asOf: asOf,
1670
+ '$expand': expand,
1671
+ errorPolicy: errorPolicy
1672
+ };
1673
+
1674
+ return this.beginRequest<WorkItemTracking.WorkItem[]>({
1675
+ apiVersion: "5.0-preview.3",
1676
+ routeTemplate: "{project}/_apis/wit/workItems/{id}",
1677
+ routeValues: {
1678
+ project: project
1679
+ },
1680
+ queryParams: queryValues
1681
+ });
1682
+ }
1683
+
1684
+ /**
1685
+ * Updates a single work item.
1686
+ *
1687
+ * @param document - The JSON Patch document representing the update
1688
+ * @param id - The id of the work item to update
1689
+ * @param project - Project ID or project name
1690
+ * @param validateOnly - Indicate if you only want to validate the changes without saving the work item
1691
+ * @param bypassRules - Do not enforce the work item type rules on this update
1692
+ * @param suppressNotifications - Do not fire any notifications for this change
1693
+ * @param expand - The expand parameters for work item attributes. Possible options are \{ None, Relations, Fields, Links, All \}.
1694
+ */
1695
+ public async updateWorkItem(
1696
+ document: WebApi.JsonPatchDocument,
1697
+ id: number,
1698
+ project?: string,
1699
+ validateOnly?: boolean,
1700
+ bypassRules?: boolean,
1701
+ suppressNotifications?: boolean,
1702
+ expand?: WorkItemTracking.WorkItemExpand
1703
+ ): Promise<WorkItemTracking.WorkItem> {
1704
+
1705
+ const queryValues: any = {
1706
+ validateOnly: validateOnly,
1707
+ bypassRules: bypassRules,
1708
+ suppressNotifications: suppressNotifications,
1709
+ '$expand': expand
1710
+ };
1711
+
1712
+ return this.beginRequest<WorkItemTracking.WorkItem>({
1713
+ apiVersion: "5.0-preview.3",
1714
+ method: "PATCH",
1715
+ routeTemplate: "{project}/_apis/wit/workItems/{id}",
1716
+ routeValues: {
1717
+ project: project,
1718
+ id: id
1719
+ },
1720
+ customHeaders: {
1721
+ "Content-Type": "application/json-patch+json",
1722
+ },
1723
+ queryParams: queryValues,
1724
+ body: document
1725
+ });
1726
+ }
1727
+
1728
+ /**
1729
+ * Gets work items for a list of work item ids (Maximum 200)
1730
+ *
1731
+ * @param workItemGetRequest -
1732
+ * @param project - Project ID or project name
1733
+ */
1734
+ public async getWorkItemsBatch(
1735
+ workItemGetRequest: WorkItemTracking.WorkItemBatchGetRequest,
1736
+ project?: string
1737
+ ): Promise<WorkItemTracking.WorkItem[]> {
1738
+
1739
+ return this.beginRequest<WorkItemTracking.WorkItem[]>({
1740
+ apiVersion: "5.0-preview.1",
1741
+ method: "POST",
1742
+ routeTemplate: "{project}/_apis/wit/workItemsBatch",
1743
+ routeValues: {
1744
+ project: project
1745
+ },
1746
+ body: workItemGetRequest
1747
+ });
1748
+ }
1749
+
1750
+ /**
1751
+ * INTERNAL ONLY: It will be used for My account work experience. Get the work item type state color for multiple projects
1752
+ *
1753
+ * @param projectNames -
1754
+ */
1755
+ public async getWorkItemStateColors(
1756
+ projectNames: string[]
1757
+ ): Promise<WorkItemTracking.ProjectWorkItemStateColors[]> {
1758
+
1759
+ return this.beginRequest<WorkItemTracking.ProjectWorkItemStateColors[]>({
1760
+ apiVersion: "5.0-preview.1",
1761
+ method: "POST",
1762
+ routeTemplate: "_apis/work/workitemStateColor",
1763
+ body: projectNames
1764
+ });
1765
+ }
1766
+
1767
+ /**
1768
+ * Returns the next state on the given work item IDs.
1769
+ *
1770
+ * @param ids - list of work item ids
1771
+ * @param action - possible actions. Currently only supports checkin
1772
+ */
1773
+ public async getWorkItemNextStatesOnCheckinAction(
1774
+ ids: number[],
1775
+ action?: string
1776
+ ): Promise<WorkItemTracking.WorkItemNextStateOnTransition[]> {
1777
+
1778
+ const queryValues: any = {
1779
+ ids: ids && ids.join(","),
1780
+ action: action
1781
+ };
1782
+
1783
+ return this.beginRequest<WorkItemTracking.WorkItemNextStateOnTransition[]>({
1784
+ apiVersion: "5.0-preview.1",
1785
+ routeTemplate: "_apis/wit/workItemTransitions",
1786
+ queryParams: queryValues
1787
+ });
1788
+ }
1789
+
1790
+ /**
1791
+ * Get all work item type categories.
1792
+ *
1793
+ * @param project - Project ID or project name
1794
+ */
1795
+ public async getWorkItemTypeCategories(
1796
+ project: string
1797
+ ): Promise<WorkItemTracking.WorkItemTypeCategory[]> {
1798
+
1799
+ return this.beginRequest<WorkItemTracking.WorkItemTypeCategory[]>({
1800
+ apiVersion: "5.0-preview.2",
1801
+ routeTemplate: "{project}/_apis/wit/workItemTypeCategories/{category}",
1802
+ routeValues: {
1803
+ project: project
1804
+ }
1805
+ });
1806
+ }
1807
+
1808
+ /**
1809
+ * Get specific work item type category by name.
1810
+ *
1811
+ * @param project - Project ID or project name
1812
+ * @param category - The category name
1813
+ */
1814
+ public async getWorkItemTypeCategory(
1815
+ project: string,
1816
+ category: string
1817
+ ): Promise<WorkItemTracking.WorkItemTypeCategory> {
1818
+
1819
+ return this.beginRequest<WorkItemTracking.WorkItemTypeCategory>({
1820
+ apiVersion: "5.0-preview.2",
1821
+ routeTemplate: "{project}/_apis/wit/workItemTypeCategories/{category}",
1822
+ routeValues: {
1823
+ project: project,
1824
+ category: category
1825
+ }
1826
+ });
1827
+ }
1828
+
1829
+ /**
1830
+ * INTERNAL ONLY: It will be used for My account work experience. Get the wit type color for multiple projects
1831
+ *
1832
+ * @param projectNames -
1833
+ */
1834
+ public async getWorkItemTypeColors(
1835
+ projectNames: string[]
1836
+ ): Promise<{ key: string; value: WorkItemTracking.WorkItemTypeColor[] }[]> {
1837
+
1838
+ return this.beginRequest<{ key: string; value: WorkItemTracking.WorkItemTypeColor[] }[]>({
1839
+ apiVersion: "5.0-preview.1",
1840
+ method: "POST",
1841
+ routeTemplate: "_apis/work/workitemTypeColor",
1842
+ body: projectNames
1843
+ });
1844
+ }
1845
+
1846
+ /**
1847
+ * INTERNAL ONLY: It is used for color and icon providers. Get the wit type color for multiple projects
1848
+ *
1849
+ * @param projectNames -
1850
+ */
1851
+ public async getWorkItemTypeColorAndIcons(
1852
+ projectNames: string[]
1853
+ ): Promise<{ key: string; value: WorkItemTracking.WorkItemTypeColorAndIcon[] }[]> {
1854
+
1855
+ return this.beginRequest<{ key: string; value: WorkItemTracking.WorkItemTypeColorAndIcon[] }[]>({
1856
+ apiVersion: "5.0-preview.1",
1857
+ method: "POST",
1858
+ routeTemplate: "_apis/wit/workItemTypeColorAndIcon",
1859
+ body: projectNames
1860
+ });
1861
+ }
1862
+
1863
+ /**
1864
+ * Returns a work item type definition.
1865
+ *
1866
+ * @param project - Project ID or project name
1867
+ * @param type - Work item type name
1868
+ */
1869
+ public async getWorkItemType(
1870
+ project: string,
1871
+ type: string
1872
+ ): Promise<WorkItemTracking.WorkItemType> {
1873
+
1874
+ return this.beginRequest<WorkItemTracking.WorkItemType>({
1875
+ apiVersion: "5.0-preview.2",
1876
+ routeTemplate: "{project}/_apis/wit/workItemTypes/{type}",
1877
+ routeValues: {
1878
+ project: project,
1879
+ type: type
1880
+ }
1881
+ });
1882
+ }
1883
+
1884
+ /**
1885
+ * Returns the list of work item types
1886
+ *
1887
+ * @param project - Project ID or project name
1888
+ */
1889
+ public async getWorkItemTypes(
1890
+ project: string
1891
+ ): Promise<WorkItemTracking.WorkItemType[]> {
1892
+
1893
+ return this.beginRequest<WorkItemTracking.WorkItemType[]>({
1894
+ apiVersion: "5.0-preview.2",
1895
+ routeTemplate: "{project}/_apis/wit/workItemTypes/{type}",
1896
+ routeValues: {
1897
+ project: project
1898
+ }
1899
+ });
1900
+ }
1901
+
1902
+ /**
1903
+ * Get a list of fields for a work item type with detailed references.
1904
+ *
1905
+ * @param project - Project ID or project name
1906
+ * @param type - Work item type.
1907
+ * @param expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.
1908
+ */
1909
+ public async getWorkItemTypeFieldsWithReferences(
1910
+ project: string,
1911
+ type: string,
1912
+ expand?: WorkItemTracking.WorkItemTypeFieldsExpandLevel
1913
+ ): Promise<WorkItemTracking.WorkItemTypeFieldWithReferences[]> {
1914
+
1915
+ const queryValues: any = {
1916
+ '$expand': expand
1917
+ };
1918
+
1919
+ return this.beginRequest<WorkItemTracking.WorkItemTypeFieldWithReferences[]>({
1920
+ apiVersion: "5.0-preview.3",
1921
+ routeTemplate: "{project}/_apis/wit/workitemtypes/{type}/fields/{field}",
1922
+ routeValues: {
1923
+ project: project,
1924
+ type: type
1925
+ },
1926
+ queryParams: queryValues
1927
+ });
1928
+ }
1929
+
1930
+ /**
1931
+ * Get a field for a work item type with detailed references.
1932
+ *
1933
+ * @param project - Project ID or project name
1934
+ * @param type - Work item type.
1935
+ * @param field -
1936
+ * @param expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties.
1937
+ */
1938
+ public async getWorkItemTypeFieldWithReferences(
1939
+ project: string,
1940
+ type: string,
1941
+ field: string,
1942
+ expand?: WorkItemTracking.WorkItemTypeFieldsExpandLevel
1943
+ ): Promise<WorkItemTracking.WorkItemTypeFieldWithReferences> {
1944
+
1945
+ const queryValues: any = {
1946
+ '$expand': expand
1947
+ };
1948
+
1949
+ return this.beginRequest<WorkItemTracking.WorkItemTypeFieldWithReferences>({
1950
+ apiVersion: "5.0-preview.3",
1951
+ routeTemplate: "{project}/_apis/wit/workitemtypes/{type}/fields/{field}",
1952
+ routeValues: {
1953
+ project: project,
1954
+ type: type,
1955
+ field: field
1956
+ },
1957
+ queryParams: queryValues
1958
+ });
1959
+ }
1960
+
1961
+ /**
1962
+ * Returns the state names and colors for a work item type.
1963
+ *
1964
+ * @param project - Project ID or project name
1965
+ * @param type - The state name
1966
+ */
1967
+ public async getWorkItemTypeStates(
1968
+ project: string,
1969
+ type: string
1970
+ ): Promise<WorkItemTracking.WorkItemStateColor[]> {
1971
+
1972
+ return this.beginRequest<WorkItemTracking.WorkItemStateColor[]>({
1973
+ apiVersion: "5.0-preview.1",
1974
+ routeTemplate: "{project}/_apis/wit/workitemtypes/{type}/states",
1975
+ routeValues: {
1976
+ project: project,
1977
+ type: type
1978
+ }
1979
+ });
1980
+ }
1981
+
1982
+ /**
1983
+ * Export work item type
1984
+ *
1985
+ * @param project - Project ID or project name
1986
+ * @param type -
1987
+ * @param exportGlobalLists -
1988
+ */
1989
+ public async exportWorkItemTypeDefinition(
1990
+ project?: string,
1991
+ type?: string,
1992
+ exportGlobalLists?: boolean
1993
+ ): Promise<WorkItemTracking.WorkItemTypeTemplate> {
1994
+
1995
+ const queryValues: any = {
1996
+ exportGlobalLists: exportGlobalLists
1997
+ };
1998
+
1999
+ return this.beginRequest<WorkItemTracking.WorkItemTypeTemplate>({
2000
+ apiVersion: "5.0-preview.1",
2001
+ routeTemplate: "{project}/_apis/wit/workItemTypeTemplate/{type}",
2002
+ routeValues: {
2003
+ project: project,
2004
+ type: type
2005
+ },
2006
+ queryParams: queryValues
2007
+ });
2008
+ }
2009
+
2010
+ /**
2011
+ * Add/updates a work item type
2012
+ *
2013
+ * @param updateModel -
2014
+ * @param project - Project ID or project name
2015
+ */
2016
+ public async updateWorkItemTypeDefinition(
2017
+ updateModel: WorkItemTracking.WorkItemTypeTemplateUpdateModel,
2018
+ project?: string
2019
+ ): Promise<WorkItemTracking.ProvisioningResult> {
2020
+
2021
+ return this.beginRequest<WorkItemTracking.ProvisioningResult>({
2022
+ apiVersion: "5.0-preview.1",
2023
+ method: "POST",
2024
+ routeTemplate: "{project}/_apis/wit/workItemTypeTemplate/{type}",
2025
+ routeValues: {
2026
+ project: project
2027
+ },
2028
+ body: updateModel
2029
+ });
2030
+ }
2031
+
2032
+ }