azure-devops-extension-api 4.248.0 → 4.250.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/{bin/Alert → Alert}/Alert.d.ts +12 -2
  2. package/{bin/Alert → Alert}/Alert.js +11 -0
  3. package/Alert/Alert.min.js +1 -0
  4. package/{bin/Alert → Alert}/AlertClient.d.ts +2 -1
  5. package/{bin/Alert → Alert}/AlertClient.js +3 -1
  6. package/Alert/AlertClient.min.js +1 -0
  7. package/{bin/Gallery → Gallery}/GalleryClient.d.ts +7 -5
  8. package/{bin/Gallery → Gallery}/GalleryClient.js +20 -19
  9. package/Gallery/GalleryClient.min.js +1 -0
  10. package/{bin/Management → Management}/Management.d.ts +4 -0
  11. package/{bin/Release → Release}/ReleaseClient.d.ts +4 -2
  12. package/{bin/Release → Release}/ReleaseClient.js +8 -4
  13. package/Release/ReleaseClient.min.js +1 -0
  14. package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpoint.d.ts +4 -0
  15. package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpointClient.d.ts +3 -2
  16. package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpointClient.js +5 -3
  17. package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -0
  18. package/{bin/TestResults → TestResults}/TestResultsClient.d.ts +8 -0
  19. package/{bin/TestResults → TestResults}/TestResultsClient.js +28 -9
  20. package/{bin/TestResults → TestResults}/TestResultsClient.min.js +1 -1
  21. package/package.json +1 -1
  22. package/SECURITY.md +0 -41
  23. package/bin/Alert/Alert.min.js +0 -1
  24. package/bin/Alert/AlertClient.min.js +0 -1
  25. package/bin/Gallery/GalleryClient.min.js +0 -1
  26. package/bin/LICENSE +0 -21
  27. package/bin/README.md +0 -2
  28. package/bin/Release/ReleaseClient.min.js +0 -1
  29. package/bin/ServiceEndpoint/ServiceEndpointClient.min.js +0 -1
  30. package/bin/package.json +0 -37
  31. package/buildpackage.js +0 -80
  32. package/src/Accounts/Accounts.ts +0 -134
  33. package/src/Accounts/AccountsClient.ts +0 -83
  34. package/src/Accounts/index.ts +0 -2
  35. package/src/AdvancedSecurity.Reporting/Reporting.ts +0 -180
  36. package/src/AdvancedSecurity.Reporting/ReportingClient.ts +0 -47
  37. package/src/Alert/Alert.ts +0 -1037
  38. package/src/Alert/AlertClient.ts +0 -330
  39. package/src/Boards/Boards.ts +0 -684
  40. package/src/Boards/BoardsClient.ts +0 -593
  41. package/src/Boards/index.ts +0 -2
  42. package/src/Build/Build.ts +0 -3416
  43. package/src/Build/BuildClient.ts +0 -2740
  44. package/src/Build/BuildServices.ts +0 -39
  45. package/src/Build/index.ts +0 -3
  46. package/src/Comments/Comments.ts +0 -330
  47. package/src/Comments/index.ts +0 -1
  48. package/src/Common/Client.ts +0 -37
  49. package/src/Common/CommonServices.ts +0 -853
  50. package/src/Common/Context.d.ts +0 -46
  51. package/src/Common/Fetch.ts +0 -239
  52. package/src/Common/RestClientBase.ts +0 -186
  53. package/src/Common/System.ts +0 -36
  54. package/src/Common/SystemData.ts +0 -135
  55. package/src/Common/Util/Serialization.ts +0 -59
  56. package/src/Common/Util/Url.ts +0 -773
  57. package/src/Common/index.ts +0 -3
  58. package/src/Contributions/Contributions.ts +0 -708
  59. package/src/Contributions/ContributionsClient.ts +0 -109
  60. package/src/Contributions/index.ts +0 -2
  61. package/src/Core/Core.ts +0 -579
  62. package/src/Core/CoreClient.ts +0 -765
  63. package/src/Core/index.ts +0 -2
  64. package/src/Dashboard/Dashboard.ts +0 -419
  65. package/src/Dashboard/DashboardClient.ts +0 -370
  66. package/src/Dashboard/WidgetConfigHelpers.ts +0 -43
  67. package/src/Dashboard/WidgetContracts.ts +0 -226
  68. package/src/Dashboard/WidgetHelpers.ts +0 -145
  69. package/src/Dashboard/index.ts +0 -5
  70. package/src/DistributedTaskCommon/DistributedTaskCommon.ts +0 -108
  71. package/src/DistributedTaskCommon/index.ts +0 -1
  72. package/src/ExtensionManagement/ExtensionManagement.ts +0 -1205
  73. package/src/ExtensionManagement/ExtensionManagementClient.ts +0 -646
  74. package/src/ExtensionManagement/index.ts +0 -2
  75. package/src/Favorite/Favorite.ts +0 -136
  76. package/src/Favorite/FavoriteClient.ts +0 -301
  77. package/src/FeatureAvailability/FeatureAvailability.ts +0 -20
  78. package/src/FeatureAvailability/FeatureAvailabilityClient.ts +0 -153
  79. package/src/FeatureAvailability/index.ts +0 -2
  80. package/src/FeatureManagement/FeatureManagement.ts +0 -166
  81. package/src/FeatureManagement/FeatureManagementClient.ts +0 -246
  82. package/src/FeatureManagement/index.ts +0 -2
  83. package/src/FileContainer/FileContainer.ts +0 -205
  84. package/src/FileContainer/FileContainerClient.ts +0 -154
  85. package/src/FileContainer/index.ts +0 -2
  86. package/src/FormInput/FormInput.ts +0 -288
  87. package/src/FormInput/index.ts +0 -1
  88. package/src/Gallery/Gallery.ts +0 -1977
  89. package/src/Gallery/GalleryClient.ts +0 -2251
  90. package/src/Gallery/index.ts +0 -2
  91. package/src/Git/CodeEditorTypes.ts +0 -335
  92. package/src/Git/Git.ts +0 -4062
  93. package/src/Git/GitClient.ts +0 -4750
  94. package/src/Git/GitServices.ts +0 -18
  95. package/src/Git/index.ts +0 -4
  96. package/src/Graph/Graph.ts +0 -572
  97. package/src/Graph/GraphClient.ts +0 -846
  98. package/src/Graph/index.ts +0 -2
  99. package/src/Identities/Identities.ts +0 -261
  100. package/src/Identities/IdentityProvider.ts +0 -90
  101. package/src/Identities/IdentityService.ts +0 -89
  102. package/src/Identities/index.ts +0 -3
  103. package/src/Locations/Locations.ts +0 -165
  104. package/src/Locations/LocationsClient.ts +0 -220
  105. package/src/Locations/index.ts +0 -2
  106. package/src/Management/Management.ts +0 -176
  107. package/src/Management/ManagementClient.ts +0 -348
  108. package/src/Notification/Notification.ts +0 -1460
  109. package/src/Notification/NotificationClient.ts +0 -477
  110. package/src/Notification/index.ts +0 -2
  111. package/src/Operations/Operations.ts +0 -86
  112. package/src/Operations/OperationsClient.ts +0 -42
  113. package/src/Operations/index.ts +0 -2
  114. package/src/Pipelines/Pipelines.ts +0 -354
  115. package/src/Pipelines/PipelinesClient.ts +0 -306
  116. package/src/Policy/Policy.ts +0 -173
  117. package/src/Policy/PolicyClient.ts +0 -315
  118. package/src/Policy/index.ts +0 -2
  119. package/src/Profile/Profile.ts +0 -187
  120. package/src/Profile/ProfileClient.ts +0 -328
  121. package/src/Profile/index.ts +0 -2
  122. package/src/ProjectAnalysis/ProjectAnalysis.ts +0 -74
  123. package/src/ProjectAnalysis/ProjectAnalysisClient.ts +0 -124
  124. package/src/ProjectAnalysis/index.ts +0 -2
  125. package/src/Release/Release.ts +0 -4237
  126. package/src/Release/ReleaseClient.ts +0 -2450
  127. package/src/Release/index.ts +0 -2
  128. package/src/ResourceUsage/ResourceUsage.ts +0 -19
  129. package/src/ResourceUsage/ResourceUsageClient.ts +0 -48
  130. package/src/ServiceEndpoint/ServiceEndpoint.ts +0 -930
  131. package/src/ServiceEndpoint/ServiceEndpointClient.ts +0 -617
  132. package/src/ServiceEndpoint/index.ts +0 -2
  133. package/src/ServiceHooks/ServiceHooks.ts +0 -759
  134. package/src/ServiceHooks/ServiceHooksClient.ts +0 -499
  135. package/src/ServiceHooks/index.ts +0 -2
  136. package/src/TaskAgent/TaskAgent.ts +0 -3896
  137. package/src/TaskAgent/TaskAgentClient.ts +0 -3918
  138. package/src/TaskAgent/index.ts +0 -2
  139. package/src/Test/Test.ts +0 -5853
  140. package/src/Test/TestClient.ts +0 -2201
  141. package/src/Test/index.ts +0 -2
  142. package/src/TestPlan/TestPlan.ts +0 -1384
  143. package/src/TestPlan/TestPlanClient.ts +0 -1367
  144. package/src/TestPlan/index.ts +0 -2
  145. package/src/TestResults/TestResults.ts +0 -11
  146. package/src/TestResults/TestResultsClient.ts +0 -3506
  147. package/src/TestResults/index.ts +0 -2
  148. package/src/Tfvc/Tfvc.ts +0 -770
  149. package/src/Tfvc/TfvcClient.ts +0 -757
  150. package/src/Tfvc/index.ts +0 -2
  151. package/src/WebApi/WebApi.ts +0 -452
  152. package/src/WebApi/index.ts +0 -1
  153. package/src/Wiki/Wiki.ts +0 -352
  154. package/src/Wiki/WikiClient.ts +0 -712
  155. package/src/Wiki/index.ts +0 -2
  156. package/src/Work/Work.ts +0 -1367
  157. package/src/Work/WorkClient.ts +0 -1489
  158. package/src/Work/index.ts +0 -2
  159. package/src/WorkItemTracking/WorkItemTracking.ts +0 -2215
  160. package/src/WorkItemTracking/WorkItemTrackingClient.ts +0 -2032
  161. package/src/WorkItemTracking/WorkItemTrackingServices.ts +0 -329
  162. package/src/WorkItemTracking/index.ts +0 -3
  163. package/src/WorkItemTrackingProcess/WorkItemTrackingProcess.ts +0 -1295
  164. package/src/WorkItemTrackingProcess/WorkItemTrackingProcessClient.ts +0 -1455
  165. package/src/WorkItemTrackingProcess/index.ts +0 -2
  166. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.ts +0 -606
  167. package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.ts +0 -1175
  168. package/src/WorkItemTrackingProcessDefinitions/index.ts +0 -2
  169. package/src/index.ts +0 -1
  170. package/tsconfig.json +0 -21
  171. /package/{bin/Accounts → Accounts}/Accounts.d.ts +0 -0
  172. /package/{bin/Accounts → Accounts}/Accounts.js +0 -0
  173. /package/{bin/Accounts → Accounts}/Accounts.min.js +0 -0
  174. /package/{bin/Accounts → Accounts}/AccountsClient.d.ts +0 -0
  175. /package/{bin/Accounts → Accounts}/AccountsClient.js +0 -0
  176. /package/{bin/Accounts → Accounts}/AccountsClient.min.js +0 -0
  177. /package/{bin/Accounts → Accounts}/index.d.ts +0 -0
  178. /package/{bin/Accounts → Accounts}/index.js +0 -0
  179. /package/{bin/Accounts → Accounts}/index.min.js +0 -0
  180. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/Reporting.d.ts +0 -0
  181. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/Reporting.js +0 -0
  182. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/Reporting.min.js +0 -0
  183. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/ReportingClient.d.ts +0 -0
  184. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/ReportingClient.js +0 -0
  185. /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/ReportingClient.min.js +0 -0
  186. /package/{bin/Boards → Boards}/Boards.d.ts +0 -0
  187. /package/{bin/Boards → Boards}/Boards.js +0 -0
  188. /package/{bin/Boards → Boards}/Boards.min.js +0 -0
  189. /package/{bin/Boards → Boards}/BoardsClient.d.ts +0 -0
  190. /package/{bin/Boards → Boards}/BoardsClient.js +0 -0
  191. /package/{bin/Boards → Boards}/BoardsClient.min.js +0 -0
  192. /package/{bin/Boards → Boards}/index.d.ts +0 -0
  193. /package/{bin/Boards → Boards}/index.js +0 -0
  194. /package/{bin/Boards → Boards}/index.min.js +0 -0
  195. /package/{bin/Build → Build}/Build.d.ts +0 -0
  196. /package/{bin/Build → Build}/Build.js +0 -0
  197. /package/{bin/Build → Build}/Build.min.js +0 -0
  198. /package/{bin/Build → Build}/BuildClient.d.ts +0 -0
  199. /package/{bin/Build → Build}/BuildClient.js +0 -0
  200. /package/{bin/Build → Build}/BuildClient.min.js +0 -0
  201. /package/{bin/Build → Build}/BuildServices.d.ts +0 -0
  202. /package/{bin/Build → Build}/BuildServices.js +0 -0
  203. /package/{bin/Build → Build}/BuildServices.min.js +0 -0
  204. /package/{bin/Build → Build}/index.d.ts +0 -0
  205. /package/{bin/Build → Build}/index.js +0 -0
  206. /package/{bin/Build → Build}/index.min.js +0 -0
  207. /package/{bin/Comments → Comments}/Comments.d.ts +0 -0
  208. /package/{bin/Comments → Comments}/Comments.js +0 -0
  209. /package/{bin/Comments → Comments}/Comments.min.js +0 -0
  210. /package/{bin/Comments → Comments}/index.d.ts +0 -0
  211. /package/{bin/Comments → Comments}/index.js +0 -0
  212. /package/{bin/Comments → Comments}/index.min.js +0 -0
  213. /package/{bin/Common → Common}/Client.d.ts +0 -0
  214. /package/{bin/Common → Common}/Client.js +0 -0
  215. /package/{bin/Common → Common}/Client.min.js +0 -0
  216. /package/{bin/Common → Common}/CommonServices.d.ts +0 -0
  217. /package/{bin/Common → Common}/CommonServices.js +0 -0
  218. /package/{bin/Common → Common}/CommonServices.min.js +0 -0
  219. /package/{bin/Common → Common}/Context.d.ts +0 -0
  220. /package/{bin/Common → Common}/Fetch.d.ts +0 -0
  221. /package/{bin/Common → Common}/Fetch.js +0 -0
  222. /package/{bin/Common → Common}/Fetch.min.js +0 -0
  223. /package/{bin/Common → Common}/RestClientBase.d.ts +0 -0
  224. /package/{bin/Common → Common}/RestClientBase.js +0 -0
  225. /package/{bin/Common → Common}/RestClientBase.min.js +0 -0
  226. /package/{bin/Common → Common}/System.d.ts +0 -0
  227. /package/{bin/Common → Common}/System.js +0 -0
  228. /package/{bin/Common → Common}/System.min.js +0 -0
  229. /package/{bin/Common → Common}/SystemData.d.ts +0 -0
  230. /package/{bin/Common → Common}/SystemData.js +0 -0
  231. /package/{bin/Common → Common}/SystemData.min.js +0 -0
  232. /package/{bin/Common → Common}/Util/Serialization.d.ts +0 -0
  233. /package/{bin/Common → Common}/Util/Serialization.js +0 -0
  234. /package/{bin/Common → Common}/Util/Serialization.min.js +0 -0
  235. /package/{bin/Common → Common}/Util/Url.d.ts +0 -0
  236. /package/{bin/Common → Common}/Util/Url.js +0 -0
  237. /package/{bin/Common → Common}/Util/Url.min.js +0 -0
  238. /package/{bin/Common → Common}/index.d.ts +0 -0
  239. /package/{bin/Common → Common}/index.js +0 -0
  240. /package/{bin/Common → Common}/index.min.js +0 -0
  241. /package/{bin/Contributions → Contributions}/Contributions.d.ts +0 -0
  242. /package/{bin/Contributions → Contributions}/Contributions.js +0 -0
  243. /package/{bin/Contributions → Contributions}/Contributions.min.js +0 -0
  244. /package/{bin/Contributions → Contributions}/ContributionsClient.d.ts +0 -0
  245. /package/{bin/Contributions → Contributions}/ContributionsClient.js +0 -0
  246. /package/{bin/Contributions → Contributions}/ContributionsClient.min.js +0 -0
  247. /package/{bin/Contributions → Contributions}/index.d.ts +0 -0
  248. /package/{bin/Contributions → Contributions}/index.js +0 -0
  249. /package/{bin/Contributions → Contributions}/index.min.js +0 -0
  250. /package/{bin/Core → Core}/Core.d.ts +0 -0
  251. /package/{bin/Core → Core}/Core.js +0 -0
  252. /package/{bin/Core → Core}/Core.min.js +0 -0
  253. /package/{bin/Core → Core}/CoreClient.d.ts +0 -0
  254. /package/{bin/Core → Core}/CoreClient.js +0 -0
  255. /package/{bin/Core → Core}/CoreClient.min.js +0 -0
  256. /package/{bin/Core → Core}/index.d.ts +0 -0
  257. /package/{bin/Core → Core}/index.js +0 -0
  258. /package/{bin/Core → Core}/index.min.js +0 -0
  259. /package/{bin/Dashboard → Dashboard}/Dashboard.d.ts +0 -0
  260. /package/{bin/Dashboard → Dashboard}/Dashboard.js +0 -0
  261. /package/{bin/Dashboard → Dashboard}/Dashboard.min.js +0 -0
  262. /package/{bin/Dashboard → Dashboard}/DashboardClient.d.ts +0 -0
  263. /package/{bin/Dashboard → Dashboard}/DashboardClient.js +0 -0
  264. /package/{bin/Dashboard → Dashboard}/DashboardClient.min.js +0 -0
  265. /package/{bin/Dashboard → Dashboard}/WidgetConfigHelpers.d.ts +0 -0
  266. /package/{bin/Dashboard → Dashboard}/WidgetConfigHelpers.js +0 -0
  267. /package/{bin/Dashboard → Dashboard}/WidgetConfigHelpers.min.js +0 -0
  268. /package/{bin/Dashboard → Dashboard}/WidgetContracts.d.ts +0 -0
  269. /package/{bin/Dashboard → Dashboard}/WidgetContracts.js +0 -0
  270. /package/{bin/Dashboard → Dashboard}/WidgetContracts.min.js +0 -0
  271. /package/{bin/Dashboard → Dashboard}/WidgetHelpers.d.ts +0 -0
  272. /package/{bin/Dashboard → Dashboard}/WidgetHelpers.js +0 -0
  273. /package/{bin/Dashboard → Dashboard}/WidgetHelpers.min.js +0 -0
  274. /package/{bin/Dashboard → Dashboard}/index.d.ts +0 -0
  275. /package/{bin/Dashboard → Dashboard}/index.js +0 -0
  276. /package/{bin/Dashboard → Dashboard}/index.min.js +0 -0
  277. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/DistributedTaskCommon.d.ts +0 -0
  278. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/DistributedTaskCommon.js +0 -0
  279. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/DistributedTaskCommon.min.js +0 -0
  280. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/index.d.ts +0 -0
  281. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/index.js +0 -0
  282. /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/index.min.js +0 -0
  283. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagement.d.ts +0 -0
  284. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagement.js +0 -0
  285. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagement.min.js +0 -0
  286. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagementClient.d.ts +0 -0
  287. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagementClient.js +0 -0
  288. /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagementClient.min.js +0 -0
  289. /package/{bin/ExtensionManagement → ExtensionManagement}/index.d.ts +0 -0
  290. /package/{bin/ExtensionManagement → ExtensionManagement}/index.js +0 -0
  291. /package/{bin/ExtensionManagement → ExtensionManagement}/index.min.js +0 -0
  292. /package/{bin/Favorite → Favorite}/Favorite.d.ts +0 -0
  293. /package/{bin/Favorite → Favorite}/Favorite.js +0 -0
  294. /package/{bin/Favorite → Favorite}/Favorite.min.js +0 -0
  295. /package/{bin/Favorite → Favorite}/FavoriteClient.d.ts +0 -0
  296. /package/{bin/Favorite → Favorite}/FavoriteClient.js +0 -0
  297. /package/{bin/Favorite → Favorite}/FavoriteClient.min.js +0 -0
  298. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailability.d.ts +0 -0
  299. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailability.js +0 -0
  300. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailability.min.js +0 -0
  301. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailabilityClient.d.ts +0 -0
  302. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailabilityClient.js +0 -0
  303. /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailabilityClient.min.js +0 -0
  304. /package/{bin/FeatureAvailability → FeatureAvailability}/index.d.ts +0 -0
  305. /package/{bin/FeatureAvailability → FeatureAvailability}/index.js +0 -0
  306. /package/{bin/FeatureAvailability → FeatureAvailability}/index.min.js +0 -0
  307. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagement.d.ts +0 -0
  308. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagement.js +0 -0
  309. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagement.min.js +0 -0
  310. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagementClient.d.ts +0 -0
  311. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagementClient.js +0 -0
  312. /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagementClient.min.js +0 -0
  313. /package/{bin/FeatureManagement → FeatureManagement}/index.d.ts +0 -0
  314. /package/{bin/FeatureManagement → FeatureManagement}/index.js +0 -0
  315. /package/{bin/FeatureManagement → FeatureManagement}/index.min.js +0 -0
  316. /package/{bin/FileContainer → FileContainer}/FileContainer.d.ts +0 -0
  317. /package/{bin/FileContainer → FileContainer}/FileContainer.js +0 -0
  318. /package/{bin/FileContainer → FileContainer}/FileContainer.min.js +0 -0
  319. /package/{bin/FileContainer → FileContainer}/FileContainerClient.d.ts +0 -0
  320. /package/{bin/FileContainer → FileContainer}/FileContainerClient.js +0 -0
  321. /package/{bin/FileContainer → FileContainer}/FileContainerClient.min.js +0 -0
  322. /package/{bin/FileContainer → FileContainer}/index.d.ts +0 -0
  323. /package/{bin/FileContainer → FileContainer}/index.js +0 -0
  324. /package/{bin/FileContainer → FileContainer}/index.min.js +0 -0
  325. /package/{bin/FormInput → FormInput}/FormInput.d.ts +0 -0
  326. /package/{bin/FormInput → FormInput}/FormInput.js +0 -0
  327. /package/{bin/FormInput → FormInput}/FormInput.min.js +0 -0
  328. /package/{bin/FormInput → FormInput}/index.d.ts +0 -0
  329. /package/{bin/FormInput → FormInput}/index.js +0 -0
  330. /package/{bin/FormInput → FormInput}/index.min.js +0 -0
  331. /package/{bin/Gallery → Gallery}/Gallery.d.ts +0 -0
  332. /package/{bin/Gallery → Gallery}/Gallery.js +0 -0
  333. /package/{bin/Gallery → Gallery}/Gallery.min.js +0 -0
  334. /package/{bin/Gallery → Gallery}/index.d.ts +0 -0
  335. /package/{bin/Gallery → Gallery}/index.js +0 -0
  336. /package/{bin/Gallery → Gallery}/index.min.js +0 -0
  337. /package/{bin/Git → Git}/CodeEditorTypes.d.ts +0 -0
  338. /package/{bin/Git → Git}/CodeEditorTypes.js +0 -0
  339. /package/{bin/Git → Git}/CodeEditorTypes.min.js +0 -0
  340. /package/{bin/Git → Git}/Git.d.ts +0 -0
  341. /package/{bin/Git → Git}/Git.js +0 -0
  342. /package/{bin/Git → Git}/Git.min.js +0 -0
  343. /package/{bin/Git → Git}/GitClient.d.ts +0 -0
  344. /package/{bin/Git → Git}/GitClient.js +0 -0
  345. /package/{bin/Git → Git}/GitClient.min.js +0 -0
  346. /package/{bin/Git → Git}/GitServices.d.ts +0 -0
  347. /package/{bin/Git → Git}/GitServices.js +0 -0
  348. /package/{bin/Git → Git}/GitServices.min.js +0 -0
  349. /package/{bin/Git → Git}/index.d.ts +0 -0
  350. /package/{bin/Git → Git}/index.js +0 -0
  351. /package/{bin/Git → Git}/index.min.js +0 -0
  352. /package/{bin/Graph → Graph}/Graph.d.ts +0 -0
  353. /package/{bin/Graph → Graph}/Graph.js +0 -0
  354. /package/{bin/Graph → Graph}/Graph.min.js +0 -0
  355. /package/{bin/Graph → Graph}/GraphClient.d.ts +0 -0
  356. /package/{bin/Graph → Graph}/GraphClient.js +0 -0
  357. /package/{bin/Graph → Graph}/GraphClient.min.js +0 -0
  358. /package/{bin/Graph → Graph}/index.d.ts +0 -0
  359. /package/{bin/Graph → Graph}/index.js +0 -0
  360. /package/{bin/Graph → Graph}/index.min.js +0 -0
  361. /package/{bin/Identities → Identities}/Identities.d.ts +0 -0
  362. /package/{bin/Identities → Identities}/Identities.js +0 -0
  363. /package/{bin/Identities → Identities}/Identities.min.js +0 -0
  364. /package/{bin/Identities → Identities}/IdentityProvider.d.ts +0 -0
  365. /package/{bin/Identities → Identities}/IdentityProvider.js +0 -0
  366. /package/{bin/Identities → Identities}/IdentityProvider.min.js +0 -0
  367. /package/{bin/Identities → Identities}/IdentityService.d.ts +0 -0
  368. /package/{bin/Identities → Identities}/IdentityService.js +0 -0
  369. /package/{bin/Identities → Identities}/IdentityService.min.js +0 -0
  370. /package/{bin/Identities → Identities}/index.d.ts +0 -0
  371. /package/{bin/Identities → Identities}/index.js +0 -0
  372. /package/{bin/Identities → Identities}/index.min.js +0 -0
  373. /package/{bin/Locations → Locations}/Locations.d.ts +0 -0
  374. /package/{bin/Locations → Locations}/Locations.js +0 -0
  375. /package/{bin/Locations → Locations}/Locations.min.js +0 -0
  376. /package/{bin/Locations → Locations}/LocationsClient.d.ts +0 -0
  377. /package/{bin/Locations → Locations}/LocationsClient.js +0 -0
  378. /package/{bin/Locations → Locations}/LocationsClient.min.js +0 -0
  379. /package/{bin/Locations → Locations}/index.d.ts +0 -0
  380. /package/{bin/Locations → Locations}/index.js +0 -0
  381. /package/{bin/Locations → Locations}/index.min.js +0 -0
  382. /package/{bin/Management → Management}/Management.js +0 -0
  383. /package/{bin/Management → Management}/Management.min.js +0 -0
  384. /package/{bin/Management → Management}/ManagementClient.d.ts +0 -0
  385. /package/{bin/Management → Management}/ManagementClient.js +0 -0
  386. /package/{bin/Management → Management}/ManagementClient.min.js +0 -0
  387. /package/{bin/Notification → Notification}/Notification.d.ts +0 -0
  388. /package/{bin/Notification → Notification}/Notification.js +0 -0
  389. /package/{bin/Notification → Notification}/Notification.min.js +0 -0
  390. /package/{bin/Notification → Notification}/NotificationClient.d.ts +0 -0
  391. /package/{bin/Notification → Notification}/NotificationClient.js +0 -0
  392. /package/{bin/Notification → Notification}/NotificationClient.min.js +0 -0
  393. /package/{bin/Notification → Notification}/index.d.ts +0 -0
  394. /package/{bin/Notification → Notification}/index.js +0 -0
  395. /package/{bin/Notification → Notification}/index.min.js +0 -0
  396. /package/{bin/Operations → Operations}/Operations.d.ts +0 -0
  397. /package/{bin/Operations → Operations}/Operations.js +0 -0
  398. /package/{bin/Operations → Operations}/Operations.min.js +0 -0
  399. /package/{bin/Operations → Operations}/OperationsClient.d.ts +0 -0
  400. /package/{bin/Operations → Operations}/OperationsClient.js +0 -0
  401. /package/{bin/Operations → Operations}/OperationsClient.min.js +0 -0
  402. /package/{bin/Operations → Operations}/index.d.ts +0 -0
  403. /package/{bin/Operations → Operations}/index.js +0 -0
  404. /package/{bin/Operations → Operations}/index.min.js +0 -0
  405. /package/{bin/Pipelines → Pipelines}/Pipelines.d.ts +0 -0
  406. /package/{bin/Pipelines → Pipelines}/Pipelines.js +0 -0
  407. /package/{bin/Pipelines → Pipelines}/Pipelines.min.js +0 -0
  408. /package/{bin/Pipelines → Pipelines}/PipelinesClient.d.ts +0 -0
  409. /package/{bin/Pipelines → Pipelines}/PipelinesClient.js +0 -0
  410. /package/{bin/Pipelines → Pipelines}/PipelinesClient.min.js +0 -0
  411. /package/{bin/Policy → Policy}/Policy.d.ts +0 -0
  412. /package/{bin/Policy → Policy}/Policy.js +0 -0
  413. /package/{bin/Policy → Policy}/Policy.min.js +0 -0
  414. /package/{bin/Policy → Policy}/PolicyClient.d.ts +0 -0
  415. /package/{bin/Policy → Policy}/PolicyClient.js +0 -0
  416. /package/{bin/Policy → Policy}/PolicyClient.min.js +0 -0
  417. /package/{bin/Policy → Policy}/index.d.ts +0 -0
  418. /package/{bin/Policy → Policy}/index.js +0 -0
  419. /package/{bin/Policy → Policy}/index.min.js +0 -0
  420. /package/{bin/Profile → Profile}/Profile.d.ts +0 -0
  421. /package/{bin/Profile → Profile}/Profile.js +0 -0
  422. /package/{bin/Profile → Profile}/Profile.min.js +0 -0
  423. /package/{bin/Profile → Profile}/ProfileClient.d.ts +0 -0
  424. /package/{bin/Profile → Profile}/ProfileClient.js +0 -0
  425. /package/{bin/Profile → Profile}/ProfileClient.min.js +0 -0
  426. /package/{bin/Profile → Profile}/index.d.ts +0 -0
  427. /package/{bin/Profile → Profile}/index.js +0 -0
  428. /package/{bin/Profile → Profile}/index.min.js +0 -0
  429. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysis.d.ts +0 -0
  430. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysis.js +0 -0
  431. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysis.min.js +0 -0
  432. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysisClient.d.ts +0 -0
  433. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysisClient.js +0 -0
  434. /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysisClient.min.js +0 -0
  435. /package/{bin/ProjectAnalysis → ProjectAnalysis}/index.d.ts +0 -0
  436. /package/{bin/ProjectAnalysis → ProjectAnalysis}/index.js +0 -0
  437. /package/{bin/ProjectAnalysis → ProjectAnalysis}/index.min.js +0 -0
  438. /package/{bin/Release → Release}/Release.d.ts +0 -0
  439. /package/{bin/Release → Release}/Release.js +0 -0
  440. /package/{bin/Release → Release}/Release.min.js +0 -0
  441. /package/{bin/Release → Release}/index.d.ts +0 -0
  442. /package/{bin/Release → Release}/index.js +0 -0
  443. /package/{bin/Release → Release}/index.min.js +0 -0
  444. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsage.d.ts +0 -0
  445. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsage.js +0 -0
  446. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsage.min.js +0 -0
  447. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsageClient.d.ts +0 -0
  448. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsageClient.js +0 -0
  449. /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsageClient.min.js +0 -0
  450. /package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpoint.js +0 -0
  451. /package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpoint.min.js +0 -0
  452. /package/{bin/ServiceEndpoint → ServiceEndpoint}/index.d.ts +0 -0
  453. /package/{bin/ServiceEndpoint → ServiceEndpoint}/index.js +0 -0
  454. /package/{bin/ServiceEndpoint → ServiceEndpoint}/index.min.js +0 -0
  455. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooks.d.ts +0 -0
  456. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooks.js +0 -0
  457. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooks.min.js +0 -0
  458. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooksClient.d.ts +0 -0
  459. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooksClient.js +0 -0
  460. /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooksClient.min.js +0 -0
  461. /package/{bin/ServiceHooks → ServiceHooks}/index.d.ts +0 -0
  462. /package/{bin/ServiceHooks → ServiceHooks}/index.js +0 -0
  463. /package/{bin/ServiceHooks → ServiceHooks}/index.min.js +0 -0
  464. /package/{bin/TaskAgent → TaskAgent}/TaskAgent.d.ts +0 -0
  465. /package/{bin/TaskAgent → TaskAgent}/TaskAgent.js +0 -0
  466. /package/{bin/TaskAgent → TaskAgent}/TaskAgent.min.js +0 -0
  467. /package/{bin/TaskAgent → TaskAgent}/TaskAgentClient.d.ts +0 -0
  468. /package/{bin/TaskAgent → TaskAgent}/TaskAgentClient.js +0 -0
  469. /package/{bin/TaskAgent → TaskAgent}/TaskAgentClient.min.js +0 -0
  470. /package/{bin/TaskAgent → TaskAgent}/index.d.ts +0 -0
  471. /package/{bin/TaskAgent → TaskAgent}/index.js +0 -0
  472. /package/{bin/TaskAgent → TaskAgent}/index.min.js +0 -0
  473. /package/{bin/Test → Test}/Test.d.ts +0 -0
  474. /package/{bin/Test → Test}/Test.js +0 -0
  475. /package/{bin/Test → Test}/Test.min.js +0 -0
  476. /package/{bin/Test → Test}/TestClient.d.ts +0 -0
  477. /package/{bin/Test → Test}/TestClient.js +0 -0
  478. /package/{bin/Test → Test}/TestClient.min.js +0 -0
  479. /package/{bin/Test → Test}/index.d.ts +0 -0
  480. /package/{bin/Test → Test}/index.js +0 -0
  481. /package/{bin/Test → Test}/index.min.js +0 -0
  482. /package/{bin/TestPlan → TestPlan}/TestPlan.d.ts +0 -0
  483. /package/{bin/TestPlan → TestPlan}/TestPlan.js +0 -0
  484. /package/{bin/TestPlan → TestPlan}/TestPlan.min.js +0 -0
  485. /package/{bin/TestPlan → TestPlan}/TestPlanClient.d.ts +0 -0
  486. /package/{bin/TestPlan → TestPlan}/TestPlanClient.js +0 -0
  487. /package/{bin/TestPlan → TestPlan}/TestPlanClient.min.js +0 -0
  488. /package/{bin/TestPlan → TestPlan}/index.d.ts +0 -0
  489. /package/{bin/TestPlan → TestPlan}/index.js +0 -0
  490. /package/{bin/TestPlan → TestPlan}/index.min.js +0 -0
  491. /package/{bin/TestResults → TestResults}/TestResults.d.ts +0 -0
  492. /package/{bin/TestResults → TestResults}/TestResults.js +0 -0
  493. /package/{bin/TestResults → TestResults}/TestResults.min.js +0 -0
  494. /package/{bin/TestResults → TestResults}/index.d.ts +0 -0
  495. /package/{bin/TestResults → TestResults}/index.js +0 -0
  496. /package/{bin/TestResults → TestResults}/index.min.js +0 -0
  497. /package/{bin/Tfvc → Tfvc}/Tfvc.d.ts +0 -0
  498. /package/{bin/Tfvc → Tfvc}/Tfvc.js +0 -0
  499. /package/{bin/Tfvc → Tfvc}/Tfvc.min.js +0 -0
  500. /package/{bin/Tfvc → Tfvc}/TfvcClient.d.ts +0 -0
  501. /package/{bin/Tfvc → Tfvc}/TfvcClient.js +0 -0
  502. /package/{bin/Tfvc → Tfvc}/TfvcClient.min.js +0 -0
  503. /package/{bin/Tfvc → Tfvc}/index.d.ts +0 -0
  504. /package/{bin/Tfvc → Tfvc}/index.js +0 -0
  505. /package/{bin/Tfvc → Tfvc}/index.min.js +0 -0
  506. /package/{bin/WebApi → WebApi}/WebApi.d.ts +0 -0
  507. /package/{bin/WebApi → WebApi}/WebApi.js +0 -0
  508. /package/{bin/WebApi → WebApi}/WebApi.min.js +0 -0
  509. /package/{bin/WebApi → WebApi}/index.d.ts +0 -0
  510. /package/{bin/WebApi → WebApi}/index.js +0 -0
  511. /package/{bin/WebApi → WebApi}/index.min.js +0 -0
  512. /package/{bin/Wiki → Wiki}/Wiki.d.ts +0 -0
  513. /package/{bin/Wiki → Wiki}/Wiki.js +0 -0
  514. /package/{bin/Wiki → Wiki}/Wiki.min.js +0 -0
  515. /package/{bin/Wiki → Wiki}/WikiClient.d.ts +0 -0
  516. /package/{bin/Wiki → Wiki}/WikiClient.js +0 -0
  517. /package/{bin/Wiki → Wiki}/WikiClient.min.js +0 -0
  518. /package/{bin/Wiki → Wiki}/index.d.ts +0 -0
  519. /package/{bin/Wiki → Wiki}/index.js +0 -0
  520. /package/{bin/Wiki → Wiki}/index.min.js +0 -0
  521. /package/{bin/Work → Work}/Work.d.ts +0 -0
  522. /package/{bin/Work → Work}/Work.js +0 -0
  523. /package/{bin/Work → Work}/Work.min.js +0 -0
  524. /package/{bin/Work → Work}/WorkClient.d.ts +0 -0
  525. /package/{bin/Work → Work}/WorkClient.js +0 -0
  526. /package/{bin/Work → Work}/WorkClient.min.js +0 -0
  527. /package/{bin/Work → Work}/index.d.ts +0 -0
  528. /package/{bin/Work → Work}/index.js +0 -0
  529. /package/{bin/Work → Work}/index.min.js +0 -0
  530. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTracking.d.ts +0 -0
  531. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTracking.js +0 -0
  532. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTracking.min.js +0 -0
  533. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingClient.d.ts +0 -0
  534. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingClient.js +0 -0
  535. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingClient.min.js +0 -0
  536. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingServices.d.ts +0 -0
  537. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingServices.js +0 -0
  538. /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingServices.min.js +0 -0
  539. /package/{bin/WorkItemTracking → WorkItemTracking}/index.d.ts +0 -0
  540. /package/{bin/WorkItemTracking → WorkItemTracking}/index.js +0 -0
  541. /package/{bin/WorkItemTracking → WorkItemTracking}/index.min.js +0 -0
  542. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcess.d.ts +0 -0
  543. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcess.js +0 -0
  544. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcess.min.js +0 -0
  545. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcessClient.d.ts +0 -0
  546. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcessClient.js +0 -0
  547. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcessClient.min.js +0 -0
  548. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/index.d.ts +0 -0
  549. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/index.js +0 -0
  550. /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/index.min.js +0 -0
  551. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.d.ts +0 -0
  552. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.js +0 -0
  553. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.min.js +0 -0
  554. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.d.ts +0 -0
  555. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.js +0 -0
  556. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.min.js +0 -0
  557. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/index.d.ts +0 -0
  558. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/index.js +0 -0
  559. /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/index.min.js +0 -0
  560. /package/{bin/index.d.ts → index.d.ts} +0 -0
  561. /package/{bin/index.js → index.js} +0 -0
  562. /package/{bin/index.min.js → index.min.js} +0 -0
@@ -1,773 +0,0 @@
1
- /*
2
- * ---------------------------------------------------------
3
- * Copyright(C) Microsoft Corporation. All rights reserved.
4
- * ---------------------------------------------------------
5
- */
6
-
7
- /**
8
- * Key constants used by route parsing.
9
- */
10
- const enum KeyCodes {
11
- asterisk = 42,
12
- endCurlyBrace = 125,
13
- startCurlyBrace = 123
14
- }
15
-
16
- /**
17
- * A single query parameter entry in a Uri
18
- */
19
- export interface IQueryParameter {
20
-
21
- /**
22
- * Unencoded name of the query parameter
23
- */
24
- name: string;
25
-
26
- /**
27
- * Unencoded value of the query parameter
28
- */
29
- value: string | null;
30
- }
31
-
32
- /**
33
- * Options for parsing a Uri string
34
- */
35
- export interface IUriParseOptions {
36
-
37
- /**
38
- * If true, throw if the Uri is not absolute
39
- */
40
- absoluteUriRequired?: boolean;
41
- }
42
-
43
- /**
44
- * Type of individual entry values that can be used in Uri.addQueryParams call
45
- */
46
- export type QueryParameterEntryValueType = string | boolean | number | Date | undefined;
47
-
48
- /**
49
- * Type of values supported by Uri.addQueryParams call
50
- */
51
- export type QueryParameterValueType =
52
- | QueryParameterEntryValueType
53
- | Array<QueryParameterEntryValueType>
54
- | { [key: string]: QueryParameterEntryValueType };
55
-
56
- function prepareForComparison(value: string, upperCase: boolean): string {
57
- return value ? (upperCase ? value.toLocaleUpperCase() : value) : "";
58
- }
59
-
60
- function stringEquals(str1: string, str2: string, ignoreCase: boolean): boolean {
61
- if (str1 === str2) {
62
- return true;
63
- }
64
- return prepareForComparison(str1, ignoreCase).localeCompare(prepareForComparison(str2, ignoreCase)) === 0;
65
- }
66
-
67
- /**
68
- * Class that represents a Uri and allows parsing/getting and setting of individual parts
69
- */
70
- export class Uri {
71
-
72
- /**
73
- * The uri scheme such as http or https
74
- */
75
- public scheme: string = "";
76
-
77
- /**
78
- * If true, do not emit the "//" separator after the scheme:
79
- * Set to true for schemes like mailto (e.g. mailto:foo@bar)
80
- */
81
- public noSchemeSeparator: boolean = false;
82
-
83
- /**
84
- * The uri hostname (does not include port or scheme)
85
- */
86
- public host: string = "";
87
-
88
- /**
89
- * The port number of the uri as supplied in the url. 0 if left out in the url (e.g. the default port for the scheme).
90
- */
91
- public port: number = 0;
92
-
93
- /**
94
- * The relative path of the uri
95
- */
96
- public path: string = "";
97
-
98
- /**
99
- * The array of query parameters in the uri
100
- */
101
- public queryParameters: IQueryParameter[] = [];
102
-
103
- /**
104
- * The hash string of the uri
105
- */
106
- public hashString: string = "";
107
-
108
- /**
109
- * Create a new Uri.
110
- *
111
- * @param uri Optional uri string to populate values with
112
- * @param options Options for parsing the uri string
113
- */
114
- constructor(uri?: string, options?: IUriParseOptions) {
115
- if (uri) {
116
- this._setFromUriString(uri, options);
117
- }
118
- }
119
-
120
- private _setFromUriString(uriString: string, options?: IUriParseOptions) {
121
- let uri = uriString;
122
-
123
- // Parse out the hash string
124
- let hashSplit = this._singleSplit(uri, "#");
125
- if (hashSplit) {
126
- uri = hashSplit.part1;
127
- this.hashString = this._decodeUriComponent(hashSplit.part2);
128
- }
129
- else {
130
- this.hashString = "";
131
- }
132
-
133
- // Parse the query parameters
134
- let querySplit = this._singleSplit(uri, "?");
135
- if (querySplit) {
136
- uri = querySplit.part1;
137
- this.queryString = querySplit.part2;
138
- }
139
- else {
140
- this.queryParameters = [];
141
- }
142
-
143
- this.scheme = "";
144
- this.host = "";
145
- this.port = 0;
146
- this.path = "";
147
-
148
- // Parse out the scheme components of the uri
149
- this.noSchemeSeparator = false;
150
- const schemeSplit = this._singleSplit(uri, ":");
151
- if (schemeSplit) {
152
- this.scheme = schemeSplit.part1;
153
- uri = schemeSplit.part2;
154
-
155
- if (uri.substr(0, 2) === "//") {
156
- uri = uri.substr(2);
157
-
158
- // Parse out the path part of the uri
159
- const pathSplit = this._singleSplit(uri, "/");
160
- if (pathSplit) {
161
- uri = pathSplit.part1;
162
- this.path = pathSplit.part2;
163
- }
164
- else {
165
- this.path = "";
166
- }
167
-
168
- // Parse out the port number
169
- const portSplit = this._singleSplit(uri, ":");
170
- if (portSplit) {
171
- this.host = portSplit.part1;
172
- this.port = parseInt(portSplit.part2);
173
-
174
- if (isNaN(this.port)) {
175
- // Segment after : was not a port, consider it part of the path
176
- this.host += ":";
177
- this.path = portSplit.part2 + "/" + this.path;
178
- }
179
- }
180
- else {
181
- this.host = uri;
182
- }
183
- }
184
- else {
185
- // No host for schemes like mailto: just use path
186
- this.noSchemeSeparator = true;
187
- this.path = uri;
188
- }
189
- }
190
- else {
191
- // Relative Url was given
192
- this.path = uri;
193
- }
194
-
195
- if (options && options.absoluteUriRequired && !this.scheme) {
196
- throw new Error(`The uri string "${uriString}" does not represent a valid absolute uri.`);
197
- }
198
- }
199
-
200
- private _singleSplit(value: string, separator: string): { part1: string, part2: string } | undefined {
201
- const matchIndex = value.indexOf(separator);
202
- if (matchIndex >= 0) {
203
- return {
204
- part1: value.substr(0, matchIndex),
205
- part2: value.substr(matchIndex + 1)
206
- };
207
- }
208
- else {
209
- return undefined;
210
- }
211
- }
212
-
213
- private _decodeUriComponent(value: string): string {
214
- if (value) {
215
- // Replace "+" character with %20.
216
- value = value.replace(/\+/g, "%20");
217
- value = decodeURIComponent(value);
218
- }
219
- return value;
220
- }
221
-
222
- /**
223
- * Get the absolute uri string for this Uri
224
- */
225
- public get absoluteUri(): string {
226
- let uri = "";
227
-
228
- if (this.scheme) {
229
- uri = encodeURI(decodeURI(this.scheme)) + ":";
230
- if (!this.noSchemeSeparator) {
231
- uri += "//";
232
- }
233
- }
234
-
235
- if (this.host) {
236
- uri += encodeURI(decodeURI(this.host));
237
-
238
- if (this.port) {
239
- uri += ":" + this.port;
240
- }
241
-
242
- if (!this.noSchemeSeparator || this.path) {
243
- uri += "/";
244
- }
245
- }
246
-
247
- if (this.path) {
248
- let encodedPath: string;
249
- if (this.noSchemeSeparator) {
250
- // Only do simple encoding for schemes like mailto: or blob: where
251
- // we can't determine host versus path
252
- encodedPath = encodeURI(decodeURI(this.path));
253
- }
254
- else {
255
- const parts = this.path.split('/');
256
- encodedPath = parts.map(p => encodeURIComponent(decodeURIComponent(p))).join("/");
257
- }
258
-
259
- if (this.host) {
260
- uri = combineUrlPaths(uri, encodedPath);
261
- }
262
- else {
263
- uri = uri + encodedPath;
264
- }
265
- }
266
-
267
- const queryString = this.queryString;
268
- if (queryString) {
269
- uri += "?" + queryString;
270
- }
271
-
272
- if (this.hashString) {
273
- const params = this._splitStringIntoParams(this.hashString);
274
- const encodedString = this._getParamsAsString(params);
275
- uri += "#" + encodedString;
276
- }
277
-
278
- return uri;
279
- }
280
-
281
- /**
282
- * Set the absolute uri string for this Uri. Replaces all existing values
283
- */
284
- public set absoluteUri(uri: string) {
285
- this._setFromUriString(uri || "");
286
- }
287
-
288
- /**
289
- * Gets the effective port number, returning the default port number if omitted for the given scheme.
290
- */
291
- public getEffectivePort(): number {
292
- if (this.port) {
293
- return this.port;
294
- }
295
- else {
296
- if (stringEquals(this.scheme, "http", true)) {
297
- return 80;
298
- }
299
- else if (stringEquals(this.scheme, "https", true)) {
300
- return 443;
301
- }
302
- else {
303
- return 0;
304
- }
305
- }
306
- }
307
-
308
- /**
309
- * Builds an encoded key/value pair string
310
- * like query string or hash strings
311
- */
312
- private _getParamsAsString(params: IQueryParameter[]): string {
313
- if (params && params.length) {
314
- return params.map((param) => {
315
- if (param.value !== null) {
316
- return encodeURIComponent(param.name) + "=" + encodeURIComponent(param.value);
317
- }
318
- else {
319
- return encodeURIComponent(param.name);
320
- }
321
- }).join("&");
322
- }
323
- else {
324
- return "";
325
- }
326
- }
327
-
328
- /**
329
- * Get the query string for this Uri.
330
- */
331
- public get queryString(): string {
332
- return this._getParamsAsString(this.queryParameters);
333
- }
334
-
335
- /**
336
- * Set the query string for this Uri. Replaces existing value
337
- */
338
- public set queryString(queryString: string) {
339
- this.queryParameters = this._splitStringIntoParams(queryString);
340
- }
341
-
342
- /**
343
- * Coverts a key/value pair string into parameters array
344
- * @param paramString String such as a=b&c=d
345
- */
346
- private _splitStringIntoParams(paramString: string): IQueryParameter[] {
347
- let params: IQueryParameter[] = [];
348
- paramString.split('&').forEach((pair) => {
349
- if (pair) {
350
- const valueSplit = this._singleSplit(pair, "=");
351
- if (valueSplit) {
352
- params.push({
353
- name: this._decodeUriComponent(valueSplit.part1),
354
- value: this._decodeUriComponent(valueSplit.part2)
355
- });
356
- }
357
- else {
358
- params.push({
359
- name: this._decodeUriComponent(pair),
360
- value: null
361
- });
362
- }
363
- }
364
- });
365
-
366
- return params;
367
- }
368
-
369
- /**
370
- * Get the value of the query parameter with the given key
371
- *
372
- * @param name Query parameter name
373
- */
374
- public getQueryParam(name: string): string | null | undefined {
375
- let value: string | undefined | null;
376
- if (this.queryParameters) {
377
- let matchingPairs = this.queryParameters.filter(p => stringEquals(p.name, name, true));
378
- if (matchingPairs.length > 0) {
379
- value = matchingPairs[0].value;
380
- }
381
- }
382
- return value;
383
- }
384
-
385
- /**
386
- * Adds a query string parameter to the current uri
387
- *
388
- * @param name The Query parameter name
389
- * @param value The Query parameter value
390
- * @param replaceExisting If true, replace all existing parameters with the same name
391
- */
392
- public addQueryParam(name: string, value: string | null, replaceExisting?: boolean): void {
393
- if (replaceExisting) {
394
- this.removeQueryParam(name);
395
- }
396
- if (!this.queryParameters) {
397
- this.queryParameters = [];
398
- }
399
- this.queryParameters.push({ name: name, value: value });
400
- }
401
-
402
- /**
403
- * Adds query string parameters to the current uri
404
- *
405
- * @param parameters Query parameters to add
406
- * @param replaceExisting If true, replace all existing parameters with the same name
407
- * @param keyPrefix If specified, a value to prepend to all query parameter keys
408
- */
409
- public addQueryParams(parameters: { [key: string]: QueryParameterValueType }, replaceExisting?: boolean, keyPrefix?: string): void {
410
- for (const key in parameters) {
411
- const value = parameters[key];
412
- if (value !== null && value !== undefined) {
413
- const keyWithPrefix = (keyPrefix || "") + key;
414
- if (value instanceof Date) {
415
- this.addQueryParam(keyWithPrefix, value.toJSON(), replaceExisting);
416
- } else if (Array.isArray(value)) {
417
- value.forEach(v => this.addQueryParam(keyWithPrefix, "" + v, replaceExisting));
418
- } else if (typeof value === "object") {
419
- this.addQueryParams(value, replaceExisting, keyWithPrefix + ".");
420
- } else {
421
- this.addQueryParam(keyWithPrefix, "" + value, replaceExisting);
422
- }
423
- }
424
- }
425
- }
426
-
427
- /**
428
- * Removes a query string parameter
429
- *
430
- * @param name The Query parameter name
431
- */
432
- public removeQueryParam(name: string): void {
433
- if (this.queryParameters) {
434
- this.queryParameters = this.queryParameters.filter(p => !stringEquals(p.name, name, true));
435
- }
436
- }
437
- }
438
-
439
- /**
440
- * Take url segments and join them with a single slash character. Takes care of path segements that start and/or end
441
- * with a slash to ensure that the resulting URL does not have double-slashes
442
- *
443
- * @param paths Path segments to concatenate
444
- */
445
- export function combineUrlPaths(...paths: string[]): string {
446
-
447
- let segmentsToJoin: string[] = [];
448
-
449
- // Trim leading and trailing slash in each segment
450
- for (let i = 0, last = paths.length - 1; i <= last; i++) {
451
- let path = paths[i];
452
- if (path) {
453
- if (path === "/" && (i === 0 || i === last)) {
454
- // For a "/" segment at the beginning or end of the list, insert an empty entry to force
455
- // a leading or trailing slash in the resulting URL
456
- segmentsToJoin.push("");
457
- }
458
- else {
459
- if (i > 0 && path[0] === "/") {
460
- // Trim leading slash in any segment except the first one
461
- path = path.substr(1);
462
- }
463
- if (i < last && path[path.length - 1] === "/") {
464
- // Trim trailing slash in any segment except the last one
465
- path = path.substr(0, path.length - 1);
466
- }
467
- if (path) {
468
- segmentsToJoin.push(path);
469
- }
470
- }
471
- }
472
- }
473
-
474
- if (segmentsToJoin.length === 1 && segmentsToJoin[0] === "") {
475
- return "/";
476
- }
477
-
478
- // Join segments by slash
479
- return segmentsToJoin.join("/");
480
- }
481
-
482
- /**
483
- * Represents a route parsed by parseRoute
484
- */
485
- export interface IParsedRoute {
486
-
487
- /**
488
- * Array of the segements in the route
489
- */
490
- segments: IParsedRouteSegment[];
491
- }
492
-
493
- /**
494
- * And individual segment of the route (fixed text or a parameter)
495
- */
496
- export interface IParsedRouteSegment {
497
-
498
- /**
499
- * If present, the fixed text for this segement. Either text or paramName will be defined for a segment, never both.
500
- */
501
- text?: string;
502
-
503
- /**
504
- * If present, the name of the route value parameter to substitute for this segment. Either text or paramName will be defined for a segment, never both.
505
- */
506
- paramName?: string;
507
-
508
- /**
509
- * For parameters, whether or not this parameter is a wildcard (*) parameter, which means it allows multiple path segments (i.e. don't escape "/")
510
- */
511
- isWildCardParam?: boolean;
512
-
513
- /**
514
- * Whether the parameter is required in order for the URL to be valid.
515
- */
516
- isRequiredParam?: boolean;
517
- }
518
-
519
- /**
520
- * Parse a route template into a structure that can be used to quickly do route replacements
521
- *
522
- * @param routeTemplate MVC route template string (like "/foo/{id}/{*params}")
523
- */
524
- export function parseRouteTemplate(routeTemplate: string): IParsedRoute {
525
-
526
- const parsedRoute: IParsedRoute = {
527
- segments: []
528
- };
529
-
530
- let paramStartIndex = -1;
531
- let segmentStartIndex = -1;
532
- let segmentPrefix = "";
533
-
534
- for (let charIndex = 0, routeTemplateLen = routeTemplate.length; charIndex < routeTemplateLen; charIndex++) {
535
- let c = routeTemplate.charCodeAt(charIndex);
536
-
537
- if (paramStartIndex >= 0) {
538
- if (c === KeyCodes.endCurlyBrace) {
539
-
540
- let paramName = routeTemplate.substring(paramStartIndex, charIndex);
541
- let isWildCardParam = false;
542
-
543
- if (paramName.charCodeAt(0) === KeyCodes.asterisk) {
544
- paramName = paramName.substr(1);
545
- isWildCardParam = true;
546
- }
547
-
548
- parsedRoute.segments.push({
549
- paramName,
550
- isWildCardParam
551
- });
552
-
553
- paramStartIndex = -1;
554
- }
555
- }
556
- else {
557
- if (c === KeyCodes.startCurlyBrace && routeTemplate.charCodeAt(charIndex + 1) !== KeyCodes.startCurlyBrace) {
558
- // Start of a parameter
559
- if (segmentPrefix || segmentStartIndex >= 0) {
560
-
561
- // Store the previous segment
562
- let segmentText = segmentPrefix;
563
- if (segmentStartIndex >= 0) {
564
- segmentText += routeTemplate.substring(segmentStartIndex, charIndex);
565
- }
566
-
567
- if (segmentText) {
568
- parsedRoute.segments.push({
569
- text: segmentText
570
- });
571
- }
572
-
573
- // Reset the segment tracking info
574
- segmentStartIndex = -1;
575
- segmentPrefix = "";
576
- }
577
- paramStartIndex = charIndex + 1;
578
- }
579
- else {
580
-
581
- // Handle double {{ or double }} as an escape sequence. This is rare. For simplicity we will
582
- if ((c === KeyCodes.startCurlyBrace && routeTemplate.charCodeAt(charIndex + 1) === KeyCodes.startCurlyBrace) ||
583
- (c === KeyCodes.endCurlyBrace && routeTemplate.charCodeAt(charIndex + 1) === KeyCodes.endCurlyBrace)) {
584
-
585
- segmentPrefix = segmentPrefix + routeTemplate.substring(segmentStartIndex >= 0 ? segmentStartIndex : charIndex, charIndex + 1);
586
- segmentStartIndex = -1;
587
- charIndex++;
588
- }
589
-
590
- if (segmentStartIndex < 0) {
591
- segmentStartIndex = charIndex;
592
- }
593
- }
594
- }
595
- }
596
-
597
- // Store any pending segment
598
- if (segmentStartIndex >= 0 || paramStartIndex >= 0) {
599
- const segmentText = segmentPrefix + routeTemplate.substring(segmentStartIndex >= 0 ? segmentStartIndex : paramStartIndex);
600
- if (segmentText) {
601
- parsedRoute.segments.push({
602
- text: segmentText
603
- });
604
- }
605
- }
606
-
607
- // Mark any param as required if it has a text segment (other than just "/") after it
608
- let required = false;
609
- for (let i = parsedRoute.segments.length - 1; i >= 0; i--) {
610
- let segment = parsedRoute.segments[i];
611
- if (segment.text && segment.text !== "/") {
612
- required = true;
613
- }
614
- else if (required && segment.paramName) {
615
- segment.isRequiredParam = true;
616
- }
617
- }
618
-
619
- return parsedRoute;
620
- }
621
-
622
- /**
623
- * Take a set of routes and route values and form a url using the best match. The best match
624
- * is the route with the highest number of replacements (of the given routeValues dictionary).
625
- * In the event of a tie (same number of replacements) the route that came first wins.
626
- *
627
- * @param routeCollection Array of parsed routes
628
- * @param routeValues Replacement values
629
- */
630
- export function routeUrl(routeCollection: IParsedRoute[], routeValues: { [name: string]: string }): string {
631
-
632
- let bestMatch = getBestRouteMatch(routeCollection, routeValues);
633
- if (!bestMatch) {
634
- return "";
635
- }
636
-
637
- let uri = new Uri(bestMatch.url);
638
- for (let routeValueKey in routeValues) {
639
- if (!bestMatch.matchedParameters[routeValueKey]) {
640
- uri.addQueryParam(routeValueKey, routeValues[routeValueKey]);
641
- }
642
- }
643
-
644
- return uri.absoluteUri;
645
- }
646
-
647
- /**
648
- * Take a set of routes and find the best match. The best match is the route with the highest number of replacements
649
- * (of the given routeValues dictionary). In the event of a tie (same number of replacements) the route that came first wins.
650
- *
651
- * @param routeCollection Array of parsed routes
652
- * @param routeValues Replacement values
653
- */
654
- export function getBestRouteMatch(routeCollection: IParsedRoute[], routeValues: { [name: string]: string }): IRouteMatchResult | undefined {
655
-
656
- let bestMatch: IRouteMatchResult | undefined;
657
- let totalRouteValues = Object.keys(routeValues).length;
658
-
659
- for (let route of routeCollection) {
660
- let match = replaceParsedRouteValues(route, routeValues, false);
661
- if (match && (!bestMatch || match.matchedParametersCount > bestMatch.matchedParametersCount)) {
662
- bestMatch = match;
663
-
664
- if (match.matchedParametersCount === totalRouteValues) {
665
- // This route matched all route values. Return its url directly (no need to even add query params)
666
- return bestMatch;
667
- }
668
- }
669
- }
670
-
671
- return bestMatch;
672
- }
673
-
674
- /**
675
- * Result of a call to replace route values for a parsed route
676
- */
677
- export interface IRouteMatchResult {
678
-
679
- /**
680
- * Resulting URL from the template replacement. Does NOT include any query parameters that would be added from extra route values.
681
- */
682
- url: string;
683
-
684
- /**
685
- * Dictionary of the route value keys that were used as replacements
686
- */
687
- matchedParameters: { [key: string]: boolean };
688
-
689
- /**
690
- * The number of parameter replacements made
691
- */
692
- matchedParametersCount: number;
693
- }
694
-
695
- /**
696
- * Replace route values for a specific parsed route
697
- *
698
- * @param parsedRoute The route to evaluate
699
- * @param routeValues Dictionary of route replacement parameters
700
- * @param continueOnUnmatchedSegements If true, continue with replacements even after a miss. By default (false), stop replacements once a parameter is not present.
701
- */
702
- export function replaceParsedRouteValues(parsedRoute: IParsedRoute, routeValues: { [name: string]: string | number | undefined }, continueOnUnmatchedSegements?: boolean): IRouteMatchResult | undefined {
703
-
704
- let urlParts: string[] = [];
705
- let matchedParameters: { [key: string]: boolean } = {};
706
- let matchedParametersCount = 0;
707
-
708
- for (let segmentIndex = 0, l = parsedRoute.segments.length; segmentIndex < l; segmentIndex++) {
709
- const segment = parsedRoute.segments[segmentIndex];
710
-
711
- if (segment.text) {
712
- let segmentText = segment.text;
713
- if (continueOnUnmatchedSegements) {
714
- // Make sure we don't have consecutive slash (/) characters in the case of missing segments
715
- if (segmentIndex > 0 && segmentText.charAt(0) === "/") {
716
- if (urlParts.length === 0) {
717
- // First text segment after one or more missing parameter segments. Remove the leading slash.
718
- segmentText = segmentText.substr(1);
719
- }
720
- }
721
- }
722
-
723
- if (segmentText) {
724
- urlParts.push(segmentText);
725
- }
726
- }
727
- else {
728
- const value = routeValues[segment.paramName!];
729
- if (!value && value !== 0) {
730
- // The route value was not supplied
731
- if (!continueOnUnmatchedSegements) {
732
- if (segment.isRequiredParam) {
733
- // This is a required parameter. Return undefined since this route was not a match.
734
- return undefined;
735
- }
736
- else {
737
- // This is an omitted optional parameter. Return what we've computed so far.
738
- break;
739
- }
740
- }
741
- else if (urlParts.length) {
742
- // Unmatched segment being omitted. Remove any previously trailing slash
743
- let lastSegment = urlParts[urlParts.length - 1];
744
- if (lastSegment[lastSegment.length - 1] === "/") {
745
- urlParts[urlParts.length - 1] = lastSegment.substr(0, lastSegment.length - 1);
746
- }
747
- }
748
- }
749
- else {
750
- urlParts.push(segment.isWildCardParam ? encodeURI("" + value) : encodeURIComponent("" + value));
751
- matchedParameters[segment.paramName!] = true;
752
- matchedParametersCount++;
753
- }
754
- }
755
- }
756
-
757
- return {
758
- url: urlParts.join(""),
759
- matchedParameters,
760
- matchedParametersCount
761
- };
762
- }
763
-
764
- /**
765
- * Take an MVC route template (like "/foo/{id}/{*params}") and replace the templated parts with values from the given dictionary
766
- *
767
- * @param routeTemplate MVC route template (like "/foo/{id}/{*params}")
768
- * @param routeValues Route value replacements
769
- */
770
- export function replaceRouteValues(routeTemplate: string, routeValues: { [name: string]: string | number | undefined }): string {
771
- let parsedRoute = parseRouteTemplate(routeTemplate);
772
- return replaceParsedRouteValues(parsedRoute, routeValues, true)!.url;
773
- }