azure-devops-extension-api 4.270.0 → 5.271.0

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