azure-devops-extension-api 4.269.1 → 5.271.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (694) hide show
  1. package/Accounts/Accounts.d.ts +126 -126
  2. package/Accounts/Accounts.js +61 -62
  3. package/Accounts/Accounts.min.js +1 -1
  4. package/Accounts/AccountsClient.d.ts +24 -24
  5. package/Accounts/AccountsClient.js +78 -124
  6. package/Accounts/AccountsClient.min.js +1 -1
  7. package/Accounts/index.d.ts +2 -2
  8. package/Accounts/index.js +18 -9
  9. package/Accounts/index.min.js +1 -1
  10. package/AdvancedSecurity.Reporting/Reporting.d.ts +717 -712
  11. package/AdvancedSecurity.Reporting/Reporting.js +203 -204
  12. package/AdvancedSecurity.Reporting/Reporting.min.js +1 -1
  13. package/AdvancedSecurity.Reporting/ReportingClient.d.ts +83 -83
  14. package/AdvancedSecurity.Reporting/ReportingClient.js +267 -343
  15. package/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -1
  16. package/Alert/Alert.d.ts +1265 -1245
  17. package/Alert/Alert.js +425 -426
  18. package/Alert/Alert.min.js +1 -1
  19. package/Alert/AlertClient.d.ts +184 -159
  20. package/Alert/AlertClient.js +512 -533
  21. package/Alert/AlertClient.min.js +1 -1
  22. package/Build/Build.d.ts +3318 -3292
  23. package/Build/Build.js +613 -607
  24. package/Build/Build.min.js +1 -1
  25. package/Build/BuildClient.d.ts +842 -820
  26. package/Build/BuildClient.js +2319 -2568
  27. package/Build/BuildClient.min.js +1 -1
  28. package/Build/BuildServices.d.ts +32 -32
  29. package/Build/BuildServices.js +13 -14
  30. package/Build/BuildServices.min.js +1 -1
  31. package/Build/index.d.ts +3 -3
  32. package/Build/index.js +19 -10
  33. package/Build/index.min.js +1 -1
  34. package/Comments/Comments.d.ts +309 -309
  35. package/Comments/Comments.js +93 -94
  36. package/Comments/Comments.min.js +1 -1
  37. package/Comments/index.d.ts +1 -1
  38. package/Comments/index.js +17 -8
  39. package/Comments/index.min.js +1 -1
  40. package/Common/Client.d.ts +9 -9
  41. package/Common/Client.js +25 -26
  42. package/Common/Client.min.js +1 -1
  43. package/Common/CommonServices.d.ts +774 -735
  44. package/Common/CommonServices.js +71 -72
  45. package/Common/CommonServices.min.js +1 -1
  46. package/Common/Context.js +2 -0
  47. package/Common/Fetch.d.ts +95 -95
  48. package/Common/Fetch.js +131 -169
  49. package/Common/Fetch.min.js +1 -1
  50. package/Common/RestClientBase.d.ts +96 -96
  51. package/Common/RestClientBase.js +109 -139
  52. package/Common/RestClientBase.min.js +1 -1
  53. package/Common/System.d.ts +30 -30
  54. package/Common/System.js +39 -40
  55. package/Common/System.min.js +1 -1
  56. package/Common/SystemData.d.ts +129 -129
  57. package/Common/SystemData.js +138 -139
  58. package/Common/SystemData.min.js +1 -1
  59. package/Common/Util/Serialization.d.ts +15 -15
  60. package/Common/Util/Serialization.js +51 -53
  61. package/Common/Util/Serialization.min.js +1 -1
  62. package/Common/Util/Url.d.ts +238 -236
  63. package/Common/Util/Url.js +605 -626
  64. package/Common/Util/Url.min.js +1 -1
  65. package/Common/index.d.ts +3 -3
  66. package/Common/index.js +19 -9
  67. package/Common/index.min.js +1 -1
  68. package/Contributions/Contributions.d.ts +694 -694
  69. package/Contributions/Contributions.js +185 -186
  70. package/Contributions/Contributions.min.js +1 -1
  71. package/Contributions/ContributionsClient.d.ts +31 -31
  72. package/Contributions/ContributionsClient.js +99 -147
  73. package/Contributions/ContributionsClient.min.js +1 -1
  74. package/Contributions/index.d.ts +2 -2
  75. package/Contributions/index.js +18 -9
  76. package/Contributions/index.min.js +1 -1
  77. package/Core/Core.d.ts +546 -546
  78. package/Core/Core.js +79 -80
  79. package/Core/Core.min.js +1 -1
  80. package/Core/CoreClient.d.ts +224 -224
  81. package/Core/CoreClient.js +652 -777
  82. package/Core/CoreClient.min.js +1 -1
  83. package/Core/index.d.ts +2 -2
  84. package/Core/index.js +18 -9
  85. package/Core/index.min.js +1 -1
  86. package/Dashboard/Dashboard.d.ts +393 -393
  87. package/Dashboard/Dashboard.js +56 -57
  88. package/Dashboard/Dashboard.min.js +1 -1
  89. package/Dashboard/DashboardClient.d.ts +106 -106
  90. package/Dashboard/DashboardClient.js +317 -393
  91. package/Dashboard/DashboardClient.min.js +1 -1
  92. package/Dashboard/WidgetConfigHelpers.d.ts +34 -34
  93. package/Dashboard/WidgetConfigHelpers.js +41 -45
  94. package/Dashboard/WidgetConfigHelpers.min.js +1 -1
  95. package/Dashboard/WidgetContracts.d.ts +213 -213
  96. package/Dashboard/WidgetContracts.js +24 -25
  97. package/Dashboard/WidgetContracts.min.js +1 -1
  98. package/Dashboard/WidgetHelpers.d.ts +89 -89
  99. package/Dashboard/WidgetHelpers.js +135 -146
  100. package/Dashboard/WidgetHelpers.min.js +1 -1
  101. package/Dashboard/index.d.ts +5 -5
  102. package/Dashboard/index.js +21 -12
  103. package/Dashboard/index.min.js +1 -1
  104. package/DistributedTaskCommon/DistributedTaskCommon.d.ts +103 -103
  105. package/DistributedTaskCommon/DistributedTaskCommon.js +7 -9
  106. package/DistributedTaskCommon/DistributedTaskCommon.min.js +1 -1
  107. package/DistributedTaskCommon/index.d.ts +1 -1
  108. package/DistributedTaskCommon/index.js +17 -4
  109. package/DistributedTaskCommon/index.min.js +1 -1
  110. package/ExtensionManagement/ExtensionManagement.d.ts +1163 -1163
  111. package/ExtensionManagement/ExtensionManagement.js +284 -285
  112. package/ExtensionManagement/ExtensionManagement.min.js +1 -1
  113. package/ExtensionManagement/ExtensionManagementClient.d.ts +191 -191
  114. package/ExtensionManagement/ExtensionManagementClient.js +551 -648
  115. package/ExtensionManagement/ExtensionManagementClient.min.js +1 -1
  116. package/ExtensionManagement/index.d.ts +2 -2
  117. package/ExtensionManagement/index.js +18 -9
  118. package/ExtensionManagement/index.min.js +1 -1
  119. package/Favorite/Favorite.d.ts +124 -124
  120. package/Favorite/Favorite.js +7 -9
  121. package/Favorite/Favorite.min.js +1 -1
  122. package/Favorite/FavoriteClient.d.ts +78 -78
  123. package/Favorite/FavoriteClient.js +247 -314
  124. package/Favorite/FavoriteClient.min.js +1 -1
  125. package/FeatureAvailability/FeatureAvailability.d.ts +13 -13
  126. package/FeatureAvailability/FeatureAvailability.js +7 -9
  127. package/FeatureAvailability/FeatureAvailability.min.js +1 -1
  128. package/FeatureAvailability/FeatureAvailabilityClient.d.ts +45 -45
  129. package/FeatureAvailability/FeatureAvailabilityClient.js +136 -189
  130. package/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -1
  131. package/FeatureAvailability/index.d.ts +2 -2
  132. package/FeatureAvailability/index.js +18 -8
  133. package/FeatureAvailability/index.min.js +1 -1
  134. package/FeatureManagement/FeatureManagement.d.ts +161 -161
  135. package/FeatureManagement/FeatureManagement.js +26 -27
  136. package/FeatureManagement/FeatureManagement.min.js +1 -1
  137. package/FeatureManagement/FeatureManagementClient.d.ts +78 -78
  138. package/FeatureManagement/FeatureManagementClient.js +214 -273
  139. package/FeatureManagement/FeatureManagementClient.min.js +1 -1
  140. package/FeatureManagement/index.d.ts +2 -2
  141. package/FeatureManagement/index.js +18 -9
  142. package/FeatureManagement/index.min.js +1 -1
  143. package/FileContainer/FileContainer.d.ts +193 -193
  144. package/FileContainer/FileContainer.js +58 -59
  145. package/FileContainer/FileContainer.min.js +1 -1
  146. package/FileContainer/FileContainerClient.d.ts +47 -47
  147. package/FileContainer/FileContainerClient.js +132 -182
  148. package/FileContainer/FileContainerClient.min.js +1 -1
  149. package/FileContainer/index.d.ts +2 -2
  150. package/FileContainer/index.js +18 -9
  151. package/FileContainer/index.min.js +1 -1
  152. package/FormInput/FormInput.d.ts +278 -278
  153. package/FormInput/FormInput.js +77 -78
  154. package/FormInput/FormInput.min.js +1 -1
  155. package/FormInput/index.d.ts +1 -1
  156. package/FormInput/index.js +17 -8
  157. package/FormInput/index.min.js +1 -1
  158. package/Gallery/Gallery.d.ts +1911 -1911
  159. package/Gallery/Gallery.js +788 -789
  160. package/Gallery/Gallery.min.js +1 -1
  161. package/Gallery/GalleryClient.d.ts +613 -603
  162. package/Gallery/GalleryClient.js +1884 -2100
  163. package/Gallery/GalleryClient.min.js +1 -1
  164. package/Gallery/index.d.ts +2 -2
  165. package/Gallery/index.js +18 -9
  166. package/Gallery/index.min.js +1 -1
  167. package/Git/CodeEditorTypes.d.ts +305 -305
  168. package/Git/CodeEditorTypes.js +27 -28
  169. package/Git/CodeEditorTypes.min.js +1 -1
  170. package/Git/Git.d.ts +3976 -3888
  171. package/Git/Git.js +830 -817
  172. package/Git/Git.min.js +1 -1
  173. package/Git/GitClient.d.ts +1468 -1454
  174. package/Git/GitClient.js +3892 -4313
  175. package/Git/GitClient.min.js +1 -1
  176. package/Git/GitServices.d.ts +16 -16
  177. package/Git/GitServices.js +10 -11
  178. package/Git/GitServices.min.js +1 -1
  179. package/Git/index.d.ts +4 -4
  180. package/Git/index.js +20 -11
  181. package/Git/index.min.js +1 -1
  182. package/Graph/Graph.d.ts +518 -518
  183. package/Graph/Graph.js +14 -15
  184. package/Graph/Graph.min.js +1 -1
  185. package/Graph/GraphClient.d.ts +261 -261
  186. package/Graph/GraphClient.js +737 -867
  187. package/Graph/GraphClient.min.js +1 -1
  188. package/Graph/index.d.ts +2 -2
  189. package/Graph/index.js +18 -9
  190. package/Graph/index.min.js +1 -1
  191. package/Identities/Identities.d.ts +242 -241
  192. package/Identities/Identities.js +49 -50
  193. package/Identities/Identities.min.js +1 -1
  194. package/Identities/IdentityProvider.d.ts +40 -40
  195. package/Identities/IdentityProvider.js +47 -49
  196. package/Identities/IdentityProvider.min.js +1 -1
  197. package/Identities/IdentityService.d.ts +72 -72
  198. package/Identities/IdentityService.js +13 -14
  199. package/Identities/IdentityService.min.js +1 -1
  200. package/Identities/index.d.ts +3 -3
  201. package/Identities/index.js +19 -10
  202. package/Identities/index.min.js +1 -1
  203. package/Locations/Locations.d.ts +150 -150
  204. package/Locations/Locations.js +28 -29
  205. package/Locations/Locations.min.js +1 -1
  206. package/Locations/LocationsClient.d.ts +65 -65
  207. package/Locations/LocationsClient.js +211 -276
  208. package/Locations/LocationsClient.min.js +1 -1
  209. package/Locations/index.d.ts +2 -2
  210. package/Locations/index.js +18 -9
  211. package/Locations/index.min.js +1 -1
  212. package/Management/Management.d.ts +424 -407
  213. package/Management/Management.js +27 -28
  214. package/Management/Management.min.js +1 -1
  215. package/Management/ManagementClient.d.ts +116 -105
  216. package/Management/ManagementClient.js +349 -398
  217. package/Management/ManagementClient.min.js +1 -1
  218. package/Notification/Notification.d.ts +1387 -1387
  219. package/Notification/Notification.js +385 -386
  220. package/Notification/Notification.min.js +1 -1
  221. package/Notification/NotificationClient.d.ts +149 -149
  222. package/Notification/NotificationClient.js +420 -511
  223. package/Notification/NotificationClient.min.js +1 -1
  224. package/Notification/index.d.ts +2 -2
  225. package/Notification/index.js +18 -9
  226. package/Notification/index.min.js +1 -1
  227. package/Operations/Operations.d.ts +77 -77
  228. package/Operations/Operations.js +38 -39
  229. package/Operations/Operations.min.js +1 -1
  230. package/Operations/OperationsClient.d.ts +13 -13
  231. package/Operations/OperationsClient.js +45 -86
  232. package/Operations/OperationsClient.min.js +1 -1
  233. package/Operations/index.d.ts +2 -2
  234. package/Operations/index.js +18 -9
  235. package/Operations/index.min.js +1 -1
  236. package/Pipelines/Pipelines.d.ts +341 -341
  237. package/Pipelines/Pipelines.js +82 -83
  238. package/Pipelines/Pipelines.min.js +1 -1
  239. package/Pipelines/PipelinesClient.d.ts +92 -92
  240. package/Pipelines/PipelinesClient.js +260 -325
  241. package/Pipelines/PipelinesClient.min.js +1 -1
  242. package/Policy/Policy.d.ts +160 -160
  243. package/Policy/Policy.js +38 -39
  244. package/Policy/Policy.min.js +1 -1
  245. package/Policy/PolicyClient.d.ts +99 -99
  246. package/Policy/PolicyClient.js +274 -346
  247. package/Policy/PolicyClient.min.js +1 -1
  248. package/Policy/index.d.ts +2 -2
  249. package/Policy/index.js +18 -9
  250. package/Policy/index.min.js +1 -1
  251. package/Profile/Profile.d.ts +175 -175
  252. package/Profile/Profile.js +35 -36
  253. package/Profile/Profile.min.js +1 -1
  254. package/Profile/ProfileClient.d.ts +86 -86
  255. package/Profile/ProfileClient.js +277 -347
  256. package/Profile/ProfileClient.min.js +1 -1
  257. package/Profile/index.d.ts +2 -2
  258. package/Profile/index.js +18 -9
  259. package/Profile/index.min.js +1 -1
  260. package/ProjectAnalysis/ProjectAnalysis.d.ts +59 -59
  261. package/ProjectAnalysis/ProjectAnalysis.js +18 -19
  262. package/ProjectAnalysis/ProjectAnalysis.min.js +1 -1
  263. package/ProjectAnalysis/ProjectAnalysisClient.d.ts +34 -34
  264. package/ProjectAnalysis/ProjectAnalysisClient.js +110 -159
  265. package/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -1
  266. package/ProjectAnalysis/index.d.ts +2 -2
  267. package/ProjectAnalysis/index.js +18 -9
  268. package/ProjectAnalysis/index.min.js +1 -1
  269. package/README.md +57 -1
  270. package/Release/Release.d.ts +4068 -4068
  271. package/Release/Release.js +876 -877
  272. package/Release/Release.min.js +1 -1
  273. package/Release/ReleaseClient.d.ts +720 -720
  274. package/Release/ReleaseClient.js +2003 -2273
  275. package/Release/ReleaseClient.min.js +1 -1
  276. package/Release/index.d.ts +2 -2
  277. package/Release/index.js +18 -9
  278. package/Release/index.min.js +1 -1
  279. package/ResourceUsage/ResourceUsage.d.ts +13 -13
  280. package/ResourceUsage/ResourceUsage.js +7 -9
  281. package/ResourceUsage/ResourceUsage.min.js +1 -1
  282. package/ResourceUsage/ResourceUsageClient.d.ts +20 -20
  283. package/ResourceUsage/ResourceUsageClient.js +51 -93
  284. package/ResourceUsage/ResourceUsageClient.min.js +1 -1
  285. package/ServiceEndpoint/ServiceEndpoint.d.ts +894 -894
  286. package/ServiceEndpoint/ServiceEndpoint.js +84 -85
  287. package/ServiceEndpoint/ServiceEndpoint.min.js +1 -1
  288. package/ServiceEndpoint/ServiceEndpointClient.d.ts +190 -190
  289. package/ServiceEndpoint/ServiceEndpointClient.js +556 -669
  290. package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -1
  291. package/ServiceEndpoint/index.d.ts +2 -2
  292. package/ServiceEndpoint/index.js +18 -9
  293. package/ServiceEndpoint/index.min.js +1 -1
  294. package/ServiceHooks/ServiceHooks.d.ts +758 -758
  295. package/ServiceHooks/ServiceHooks.js +114 -115
  296. package/ServiceHooks/ServiceHooks.min.js +1 -1
  297. package/ServiceHooks/ServiceHooksClient.d.ts +156 -156
  298. package/ServiceHooks/ServiceHooksClient.js +434 -526
  299. package/ServiceHooks/ServiceHooksClient.min.js +1 -1
  300. package/ServiceHooks/index.d.ts +2 -2
  301. package/ServiceHooks/index.js +18 -9
  302. package/ServiceHooks/index.min.js +1 -1
  303. package/TaskAgent/TaskAgent.d.ts +3777 -3764
  304. package/TaskAgent/TaskAgent.js +594 -594
  305. package/TaskAgent/TaskAgent.min.js +1 -1
  306. package/TaskAgent/TaskAgentClient.d.ts +1085 -1073
  307. package/TaskAgent/TaskAgentClient.js +3273 -3731
  308. package/TaskAgent/TaskAgentClient.min.js +1 -1
  309. package/TaskAgent/index.d.ts +2 -2
  310. package/TaskAgent/index.js +18 -9
  311. package/TaskAgent/index.min.js +1 -1
  312. package/Test/Test.d.ts +5918 -5874
  313. package/Test/Test.js +1068 -1069
  314. package/Test/Test.min.js +1 -1
  315. package/Test/TestClient.d.ts +635 -635
  316. package/Test/TestClient.js +1822 -2088
  317. package/Test/TestClient.min.js +1 -1
  318. package/Test/index.d.ts +2 -2
  319. package/Test/index.js +18 -9
  320. package/Test/index.min.js +1 -1
  321. package/TestPlan/TestPlan.d.ts +1616 -1616
  322. package/TestPlan/TestPlan.js +270 -271
  323. package/TestPlan/TestPlan.min.js +1 -1
  324. package/TestPlan/TestPlanClient.d.ts +408 -408
  325. package/TestPlan/TestPlanClient.js +1160 -1387
  326. package/TestPlan/TestPlanClient.min.js +1 -1
  327. package/TestPlan/index.d.ts +2 -2
  328. package/TestPlan/index.js +18 -9
  329. package/TestPlan/index.min.js +1 -1
  330. package/TestResults/TestResults.d.ts +5 -5
  331. package/TestResults/TestResults.js +7 -9
  332. package/TestResults/TestResults.min.js +1 -1
  333. package/TestResults/TestResultsClient.d.ts +1060 -1039
  334. package/TestResults/TestResultsClient.js +3099 -3491
  335. package/TestResults/TestResultsClient.min.js +1 -1
  336. package/TestResults/index.d.ts +2 -2
  337. package/TestResults/index.js +18 -8
  338. package/TestResults/index.min.js +1 -1
  339. package/Tfvc/Tfvc.d.ts +730 -730
  340. package/Tfvc/Tfvc.js +106 -107
  341. package/Tfvc/Tfvc.min.js +1 -1
  342. package/Tfvc/TfvcClient.d.ts +227 -227
  343. package/Tfvc/TfvcClient.js +620 -732
  344. package/Tfvc/TfvcClient.min.js +1 -1
  345. package/Tfvc/index.d.ts +2 -2
  346. package/Tfvc/index.js +18 -9
  347. package/Tfvc/index.min.js +1 -1
  348. package/WebApi/WebApi.d.ts +408 -408
  349. package/WebApi/WebApi.js +55 -56
  350. package/WebApi/WebApi.min.js +1 -1
  351. package/WebApi/index.d.ts +1 -1
  352. package/WebApi/index.js +17 -8
  353. package/WebApi/index.min.js +1 -1
  354. package/Wiki/Wiki.d.ts +328 -328
  355. package/Wiki/Wiki.js +22 -23
  356. package/Wiki/Wiki.min.js +1 -1
  357. package/Wiki/WikiClient.d.ts +218 -218
  358. package/Wiki/WikiClient.js +585 -684
  359. package/Wiki/WikiClient.min.js +1 -1
  360. package/Wiki/index.d.ts +2 -2
  361. package/Wiki/index.js +18 -9
  362. package/Wiki/index.min.js +1 -1
  363. package/Work/Work.d.ts +1298 -1298
  364. package/Work/Work.js +187 -188
  365. package/Work/Work.min.js +1 -1
  366. package/Work/WorkClient.d.ts +421 -421
  367. package/Work/WorkClient.js +1255 -1455
  368. package/Work/WorkClient.min.js +1 -1
  369. package/Work/index.d.ts +2 -2
  370. package/Work/index.js +18 -9
  371. package/Work/index.min.js +1 -1
  372. package/WorkItemTracking/WorkItemTracking.d.ts +2158 -2124
  373. package/WorkItemTracking/WorkItemTracking.js +431 -432
  374. package/WorkItemTracking/WorkItemTracking.min.js +1 -1
  375. package/WorkItemTracking/WorkItemTrackingClient.d.ts +624 -624
  376. package/WorkItemTracking/WorkItemTrackingClient.js +1688 -1918
  377. package/WorkItemTracking/WorkItemTrackingClient.min.js +1 -1
  378. package/WorkItemTracking/WorkItemTrackingServices.d.ts +320 -320
  379. package/WorkItemTracking/WorkItemTrackingServices.js +18 -19
  380. package/WorkItemTracking/WorkItemTrackingServices.min.js +1 -1
  381. package/WorkItemTracking/index.d.ts +3 -3
  382. package/WorkItemTracking/index.js +19 -10
  383. package/WorkItemTracking/index.min.js +1 -1
  384. package/WorkItemTrackingProcess/WorkItemTrackingProcess.d.ts +1238 -1238
  385. package/WorkItemTrackingProcess/WorkItemTrackingProcess.js +299 -300
  386. package/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -1
  387. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.d.ts +462 -462
  388. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +1224 -1386
  389. package/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -1
  390. package/WorkItemTrackingProcess/index.d.ts +2 -2
  391. package/WorkItemTrackingProcess/index.js +18 -9
  392. package/WorkItemTrackingProcess/index.min.js +1 -1
  393. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.d.ts +575 -575
  394. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.js +96 -97
  395. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.min.js +1 -1
  396. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.d.ts +376 -376
  397. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +991 -1126
  398. package/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -1
  399. package/WorkItemTrackingProcessDefinitions/index.d.ts +2 -2
  400. package/WorkItemTrackingProcessDefinitions/index.js +18 -9
  401. package/WorkItemTrackingProcessDefinitions/index.min.js +1 -1
  402. package/_manifest/Spdx2xVs3xComparisonToolOutput.json +33 -0
  403. package/_manifest/spdx_2.2/ESRPClientLogs0504231512019.json +1 -0
  404. package/_manifest/spdx_2.2/bsi.cose +0 -0
  405. package/_manifest/spdx_2.2/bsi.json +1 -1
  406. package/_manifest/spdx_2.2/manifest.cat +0 -0
  407. package/_manifest/spdx_2.2/manifest.spdx.cose +0 -0
  408. package/_manifest/spdx_2.2/manifest.spdx.json +1 -1
  409. package/_manifest/spdx_2.2/manifest.spdx.json.sha256 +1 -1
  410. package/_manifest/spdx_3.0/manifest.spdx.json +1 -1
  411. package/_manifest/spdx_3.0/manifest.spdx.json.sha256 +1 -1
  412. package/esm/Accounts/Accounts.js +58 -0
  413. package/esm/Accounts/Accounts.min.js +1 -0
  414. package/esm/Accounts/AccountsClient.js +59 -0
  415. package/esm/Accounts/AccountsClient.min.js +1 -0
  416. package/esm/Accounts/index.js +2 -0
  417. package/esm/Accounts/index.min.js +1 -0
  418. package/esm/AdvancedSecurity.Reporting/Reporting.js +200 -0
  419. package/esm/AdvancedSecurity.Reporting/Reporting.min.js +1 -0
  420. package/esm/AdvancedSecurity.Reporting/ReportingClient.js +228 -0
  421. package/esm/AdvancedSecurity.Reporting/ReportingClient.min.js +1 -0
  422. package/esm/Alert/Alert.js +422 -0
  423. package/esm/Alert/Alert.min.js +1 -0
  424. package/esm/Alert/AlertClient.js +457 -0
  425. package/esm/Alert/AlertClient.min.js +1 -0
  426. package/esm/Build/Build.js +610 -0
  427. package/esm/Build/Build.min.js +1 -0
  428. package/esm/Build/BuildClient.js +2108 -0
  429. package/esm/Build/BuildClient.min.js +1 -0
  430. package/esm/Build/BuildServices.js +10 -0
  431. package/esm/Build/BuildServices.min.js +1 -0
  432. package/esm/Build/index.js +3 -0
  433. package/esm/Build/index.min.js +1 -0
  434. package/esm/Comments/Comments.js +90 -0
  435. package/esm/Comments/Comments.min.js +1 -0
  436. package/esm/Comments/index.js +1 -0
  437. package/esm/Comments/index.min.js +1 -0
  438. package/esm/Common/Client.js +22 -0
  439. package/esm/Common/Client.min.js +1 -0
  440. package/esm/Common/CommonServices.js +68 -0
  441. package/esm/Common/CommonServices.min.js +1 -0
  442. package/esm/Common/Context.js +1 -0
  443. package/esm/Common/Fetch.js +117 -0
  444. package/esm/Common/Fetch.min.js +1 -0
  445. package/esm/Common/RestClientBase.js +92 -0
  446. package/esm/Common/RestClientBase.min.js +1 -0
  447. package/esm/Common/System.js +36 -0
  448. package/esm/Common/System.min.js +1 -0
  449. package/esm/Common/SystemData.js +135 -0
  450. package/esm/Common/SystemData.min.js +1 -0
  451. package/esm/Common/Util/Serialization.js +48 -0
  452. package/esm/Common/Util/Serialization.min.js +1 -0
  453. package/esm/Common/Util/Url.js +595 -0
  454. package/esm/Common/Util/Url.min.js +1 -0
  455. package/esm/Common/index.js +3 -0
  456. package/esm/Common/index.min.js +1 -0
  457. package/esm/Contributions/Contributions.js +182 -0
  458. package/esm/Contributions/Contributions.min.js +1 -0
  459. package/esm/Contributions/ContributionsClient.js +78 -0
  460. package/esm/Contributions/ContributionsClient.min.js +1 -0
  461. package/esm/Contributions/index.js +2 -0
  462. package/esm/Contributions/index.min.js +1 -0
  463. package/esm/Core/Core.js +76 -0
  464. package/esm/Core/Core.min.js +1 -0
  465. package/esm/Core/CoreClient.js +573 -0
  466. package/esm/Core/CoreClient.min.js +1 -0
  467. package/esm/Core/index.js +2 -0
  468. package/esm/Core/index.min.js +1 -0
  469. package/esm/Dashboard/Dashboard.js +53 -0
  470. package/esm/Dashboard/Dashboard.min.js +1 -0
  471. package/esm/Dashboard/DashboardClient.js +278 -0
  472. package/esm/Dashboard/DashboardClient.min.js +1 -0
  473. package/esm/Dashboard/WidgetConfigHelpers.js +37 -0
  474. package/esm/Dashboard/WidgetConfigHelpers.min.js +1 -0
  475. package/esm/Dashboard/WidgetContracts.js +21 -0
  476. package/esm/Dashboard/WidgetContracts.min.js +1 -0
  477. package/esm/Dashboard/WidgetHelpers.js +129 -0
  478. package/esm/Dashboard/WidgetHelpers.min.js +1 -0
  479. package/esm/Dashboard/index.js +5 -0
  480. package/esm/Dashboard/index.min.js +1 -0
  481. package/esm/DistributedTaskCommon/DistributedTaskCommon.js +6 -0
  482. package/esm/DistributedTaskCommon/DistributedTaskCommon.min.js +1 -0
  483. package/esm/DistributedTaskCommon/index.js +1 -0
  484. package/esm/DistributedTaskCommon/index.min.js +1 -0
  485. package/esm/ExtensionManagement/ExtensionManagement.js +281 -0
  486. package/esm/ExtensionManagement/ExtensionManagement.min.js +1 -0
  487. package/esm/ExtensionManagement/ExtensionManagementClient.js +486 -0
  488. package/esm/ExtensionManagement/ExtensionManagementClient.min.js +1 -0
  489. package/esm/ExtensionManagement/index.js +2 -0
  490. package/esm/ExtensionManagement/index.min.js +1 -0
  491. package/esm/Favorite/Favorite.js +6 -0
  492. package/esm/Favorite/Favorite.min.js +1 -0
  493. package/esm/Favorite/FavoriteClient.js +214 -0
  494. package/esm/Favorite/FavoriteClient.min.js +1 -0
  495. package/esm/FeatureAvailability/FeatureAvailability.js +6 -0
  496. package/esm/FeatureAvailability/FeatureAvailability.min.js +1 -0
  497. package/esm/FeatureAvailability/FeatureAvailabilityClient.js +113 -0
  498. package/esm/FeatureAvailability/FeatureAvailabilityClient.min.js +1 -0
  499. package/esm/FeatureAvailability/index.js +2 -0
  500. package/esm/FeatureAvailability/index.min.js +1 -0
  501. package/esm/FeatureManagement/FeatureManagement.js +23 -0
  502. package/esm/FeatureManagement/FeatureManagement.min.js +1 -0
  503. package/esm/FeatureManagement/FeatureManagementClient.js +183 -0
  504. package/esm/FeatureManagement/FeatureManagementClient.min.js +1 -0
  505. package/esm/FeatureManagement/index.js +2 -0
  506. package/esm/FeatureManagement/index.min.js +1 -0
  507. package/esm/FileContainer/FileContainer.js +55 -0
  508. package/esm/FileContainer/FileContainer.min.js +1 -0
  509. package/esm/FileContainer/FileContainerClient.js +111 -0
  510. package/esm/FileContainer/FileContainerClient.min.js +1 -0
  511. package/esm/FileContainer/index.js +2 -0
  512. package/esm/FileContainer/index.min.js +1 -0
  513. package/esm/FormInput/FormInput.js +74 -0
  514. package/esm/FormInput/FormInput.min.js +1 -0
  515. package/esm/FormInput/index.js +1 -0
  516. package/esm/FormInput/index.min.js +1 -0
  517. package/esm/Gallery/Gallery.js +785 -0
  518. package/esm/Gallery/Gallery.min.js +1 -0
  519. package/esm/Gallery/GalleryClient.js +1701 -0
  520. package/esm/Gallery/GalleryClient.min.js +1 -0
  521. package/esm/Gallery/index.js +2 -0
  522. package/esm/Gallery/index.min.js +1 -0
  523. package/esm/Git/CodeEditorTypes.js +24 -0
  524. package/esm/Git/CodeEditorTypes.min.js +1 -0
  525. package/esm/Git/Git.js +827 -0
  526. package/esm/Git/Git.min.js +1 -0
  527. package/esm/Git/GitClient.js +3571 -0
  528. package/esm/Git/GitClient.min.js +1 -0
  529. package/esm/Git/GitServices.js +7 -0
  530. package/esm/Git/GitServices.min.js +1 -0
  531. package/esm/Git/index.js +4 -0
  532. package/esm/Git/index.min.js +1 -0
  533. package/esm/Graph/Graph.js +11 -0
  534. package/esm/Graph/Graph.min.js +1 -0
  535. package/esm/Graph/GraphClient.js +644 -0
  536. package/esm/Graph/GraphClient.min.js +1 -0
  537. package/esm/Graph/index.js +2 -0
  538. package/esm/Graph/index.min.js +1 -0
  539. package/esm/Identities/Identities.js +46 -0
  540. package/esm/Identities/Identities.min.js +1 -0
  541. package/esm/Identities/IdentityProvider.js +43 -0
  542. package/esm/Identities/IdentityProvider.min.js +1 -0
  543. package/esm/Identities/IdentityService.js +10 -0
  544. package/esm/Identities/IdentityService.min.js +1 -0
  545. package/esm/Identities/index.js +3 -0
  546. package/esm/Identities/index.min.js +1 -0
  547. package/esm/Locations/Locations.js +25 -0
  548. package/esm/Locations/Locations.min.js +1 -0
  549. package/esm/Locations/LocationsClient.js +178 -0
  550. package/esm/Locations/LocationsClient.min.js +1 -0
  551. package/esm/Locations/index.js +2 -0
  552. package/esm/Locations/index.min.js +1 -0
  553. package/esm/Management/Management.js +24 -0
  554. package/esm/Management/Management.min.js +1 -0
  555. package/esm/Management/ManagementClient.js +302 -0
  556. package/esm/Management/ManagementClient.min.js +1 -0
  557. package/esm/Notification/Notification.js +382 -0
  558. package/esm/Notification/Notification.min.js +1 -0
  559. package/esm/Notification/NotificationClient.js +359 -0
  560. package/esm/Notification/NotificationClient.min.js +1 -0
  561. package/esm/Notification/index.js +2 -0
  562. package/esm/Notification/index.min.js +1 -0
  563. package/esm/Operations/Operations.js +35 -0
  564. package/esm/Operations/Operations.min.js +1 -0
  565. package/esm/Operations/OperationsClient.js +30 -0
  566. package/esm/Operations/OperationsClient.min.js +1 -0
  567. package/esm/Operations/index.js +2 -0
  568. package/esm/Operations/index.min.js +1 -0
  569. package/esm/Pipelines/Pipelines.js +79 -0
  570. package/esm/Pipelines/Pipelines.min.js +1 -0
  571. package/esm/Pipelines/PipelinesClient.js +227 -0
  572. package/esm/Pipelines/PipelinesClient.min.js +1 -0
  573. package/esm/Policy/Policy.js +35 -0
  574. package/esm/Policy/Policy.min.js +1 -0
  575. package/esm/Policy/PolicyClient.js +237 -0
  576. package/esm/Policy/PolicyClient.min.js +1 -0
  577. package/esm/Policy/index.js +2 -0
  578. package/esm/Policy/index.min.js +1 -0
  579. package/esm/Profile/Profile.js +32 -0
  580. package/esm/Profile/Profile.min.js +1 -0
  581. package/esm/Profile/ProfileClient.js +240 -0
  582. package/esm/Profile/ProfileClient.min.js +1 -0
  583. package/esm/Profile/index.js +2 -0
  584. package/esm/Profile/index.min.js +1 -0
  585. package/esm/ProjectAnalysis/ProjectAnalysis.js +15 -0
  586. package/esm/ProjectAnalysis/ProjectAnalysis.min.js +1 -0
  587. package/esm/ProjectAnalysis/ProjectAnalysisClient.js +89 -0
  588. package/esm/ProjectAnalysis/ProjectAnalysisClient.min.js +1 -0
  589. package/esm/ProjectAnalysis/index.js +2 -0
  590. package/esm/ProjectAnalysis/index.min.js +1 -0
  591. package/esm/Release/Release.js +873 -0
  592. package/esm/Release/Release.min.js +1 -0
  593. package/esm/Release/ReleaseClient.js +1816 -0
  594. package/esm/Release/ReleaseClient.min.js +1 -0
  595. package/esm/Release/index.js +2 -0
  596. package/esm/Release/index.min.js +1 -0
  597. package/esm/ResourceUsage/ResourceUsage.js +6 -0
  598. package/esm/ResourceUsage/ResourceUsage.min.js +1 -0
  599. package/esm/ResourceUsage/ResourceUsageClient.js +34 -0
  600. package/esm/ResourceUsage/ResourceUsageClient.min.js +1 -0
  601. package/esm/ServiceEndpoint/ServiceEndpoint.js +81 -0
  602. package/esm/ServiceEndpoint/ServiceEndpoint.min.js +1 -0
  603. package/esm/ServiceEndpoint/ServiceEndpointClient.js +489 -0
  604. package/esm/ServiceEndpoint/ServiceEndpointClient.min.js +1 -0
  605. package/esm/ServiceEndpoint/index.js +2 -0
  606. package/esm/ServiceEndpoint/index.min.js +1 -0
  607. package/esm/ServiceHooks/ServiceHooks.js +111 -0
  608. package/esm/ServiceHooks/ServiceHooks.min.js +1 -0
  609. package/esm/ServiceHooks/ServiceHooksClient.js +375 -0
  610. package/esm/ServiceHooks/ServiceHooksClient.min.js +1 -0
  611. package/esm/ServiceHooks/index.js +2 -0
  612. package/esm/ServiceHooks/index.min.js +1 -0
  613. package/esm/TaskAgent/TaskAgent.js +590 -0
  614. package/esm/TaskAgent/TaskAgent.min.js +1 -0
  615. package/esm/TaskAgent/TaskAgentClient.js +2946 -0
  616. package/esm/TaskAgent/TaskAgentClient.min.js +1 -0
  617. package/esm/TaskAgent/index.js +2 -0
  618. package/esm/TaskAgent/index.min.js +1 -0
  619. package/esm/Test/Test.js +1065 -0
  620. package/esm/Test/Test.min.js +1 -0
  621. package/esm/Test/TestClient.js +1655 -0
  622. package/esm/Test/TestClient.min.js +1 -0
  623. package/esm/Test/index.js +2 -0
  624. package/esm/Test/index.min.js +1 -0
  625. package/esm/TestPlan/TestPlan.js +267 -0
  626. package/esm/TestPlan/TestPlan.min.js +1 -0
  627. package/esm/TestPlan/TestPlanClient.js +1051 -0
  628. package/esm/TestPlan/TestPlanClient.min.js +1 -0
  629. package/esm/TestPlan/index.js +2 -0
  630. package/esm/TestPlan/index.min.js +1 -0
  631. package/esm/TestResults/TestResults.js +6 -0
  632. package/esm/TestResults/TestResults.min.js +1 -0
  633. package/esm/TestResults/TestResultsClient.js +2822 -0
  634. package/esm/TestResults/TestResultsClient.min.js +1 -0
  635. package/esm/TestResults/index.js +2 -0
  636. package/esm/TestResults/index.min.js +1 -0
  637. package/esm/Tfvc/Tfvc.js +103 -0
  638. package/esm/Tfvc/Tfvc.min.js +1 -0
  639. package/esm/Tfvc/TfvcClient.js +559 -0
  640. package/esm/Tfvc/TfvcClient.min.js +1 -0
  641. package/esm/Tfvc/index.js +2 -0
  642. package/esm/Tfvc/index.min.js +1 -0
  643. package/esm/WebApi/WebApi.js +52 -0
  644. package/esm/WebApi/WebApi.min.js +1 -0
  645. package/esm/WebApi/index.js +1 -0
  646. package/esm/WebApi/index.min.js +1 -0
  647. package/esm/Wiki/Wiki.js +19 -0
  648. package/esm/Wiki/Wiki.min.js +1 -0
  649. package/esm/Wiki/WikiClient.js +528 -0
  650. package/esm/Wiki/WikiClient.min.js +1 -0
  651. package/esm/Wiki/index.js +2 -0
  652. package/esm/Wiki/index.min.js +1 -0
  653. package/esm/Work/Work.js +184 -0
  654. package/esm/Work/Work.min.js +1 -0
  655. package/esm/Work/WorkClient.js +1128 -0
  656. package/esm/Work/WorkClient.min.js +1 -0
  657. package/esm/Work/index.js +2 -0
  658. package/esm/Work/index.min.js +1 -0
  659. package/esm/WorkItemTracking/WorkItemTracking.js +428 -0
  660. package/esm/WorkItemTracking/WorkItemTracking.min.js +1 -0
  661. package/esm/WorkItemTracking/WorkItemTrackingClient.js +1525 -0
  662. package/esm/WorkItemTracking/WorkItemTrackingClient.min.js +1 -0
  663. package/esm/WorkItemTracking/WorkItemTrackingServices.js +15 -0
  664. package/esm/WorkItemTracking/WorkItemTrackingServices.min.js +1 -0
  665. package/esm/WorkItemTracking/index.js +3 -0
  666. package/esm/WorkItemTracking/index.min.js +1 -0
  667. package/esm/WorkItemTrackingProcess/WorkItemTrackingProcess.js +296 -0
  668. package/esm/WorkItemTrackingProcess/WorkItemTrackingProcess.min.js +1 -0
  669. package/esm/WorkItemTrackingProcess/WorkItemTrackingProcessClient.js +1097 -0
  670. package/esm/WorkItemTrackingProcess/WorkItemTrackingProcessClient.min.js +1 -0
  671. package/esm/WorkItemTrackingProcess/index.js +2 -0
  672. package/esm/WorkItemTrackingProcess/index.min.js +1 -0
  673. package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.js +93 -0
  674. package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.min.js +1 -0
  675. package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.js +886 -0
  676. package/esm/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.min.js +1 -0
  677. package/esm/WorkItemTrackingProcessDefinitions/index.js +2 -0
  678. package/esm/WorkItemTrackingProcessDefinitions/index.min.js +1 -0
  679. package/esm/index.js +1 -0
  680. package/esm/index.min.js +1 -0
  681. package/index.d.ts +1 -1
  682. package/index.js +17 -8
  683. package/index.min.js +1 -1
  684. package/package.json +232 -37
  685. package/Boards/Boards.d.ts +0 -631
  686. package/Boards/Boards.js +0 -26
  687. package/Boards/Boards.min.js +0 -1
  688. package/Boards/BoardsClient.d.ts +0 -187
  689. package/Boards/BoardsClient.js +0 -589
  690. package/Boards/BoardsClient.min.js +0 -1
  691. package/Boards/index.d.ts +0 -2
  692. package/Boards/index.js +0 -9
  693. package/Boards/index.min.js +0 -1
  694. package/_manifest/spdx_2.2/ESRPClientLogs0305214508957.json +0 -1
@@ -1,2100 +1,1884 @@
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 GalleryRestClient = /** @class */ (function (_super) {
55
- __extends(GalleryRestClient, _super);
56
- function GalleryRestClient(options) {
57
- return _super.call(this, options) || this;
58
- }
59
- /**
60
- * @param extensionId -
61
- * @param accountName -
62
- */
63
- GalleryRestClient.prototype.shareExtensionById = function (extensionId, accountName) {
64
- return __awaiter(this, void 0, void 0, function () {
65
- return __generator(this, function (_a) {
66
- return [2 /*return*/, this.beginRequest({
67
- apiVersion: "7.2-preview.1",
68
- method: "POST",
69
- routeTemplate: "_apis/gallery/extensions/{extensionId}/accounts/{accountName}",
70
- routeValues: {
71
- extensionId: extensionId,
72
- accountName: accountName
73
- }
74
- })];
75
- });
76
- });
77
- };
78
- /**
79
- * @param extensionId -
80
- * @param accountName -
81
- */
82
- GalleryRestClient.prototype.unshareExtensionById = function (extensionId, accountName) {
83
- return __awaiter(this, void 0, void 0, function () {
84
- return __generator(this, function (_a) {
85
- return [2 /*return*/, this.beginRequest({
86
- apiVersion: "7.2-preview.1",
87
- method: "DELETE",
88
- routeTemplate: "_apis/gallery/extensions/{extensionId}/accounts/{accountName}",
89
- routeValues: {
90
- extensionId: extensionId,
91
- accountName: accountName
92
- }
93
- })];
94
- });
95
- });
96
- };
97
- /**
98
- * @param publisherName -
99
- * @param extensionName -
100
- * @param accountName -
101
- */
102
- GalleryRestClient.prototype.shareExtension = function (publisherName, extensionName, accountName) {
103
- return __awaiter(this, void 0, void 0, function () {
104
- return __generator(this, function (_a) {
105
- return [2 /*return*/, this.beginRequest({
106
- apiVersion: "7.2-preview.1",
107
- method: "POST",
108
- routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/accountsbyname/{accountName}",
109
- routeValues: {
110
- publisherName: publisherName,
111
- extensionName: extensionName,
112
- accountName: accountName
113
- }
114
- })];
115
- });
116
- });
117
- };
118
- /**
119
- * @param publisherName -
120
- * @param extensionName -
121
- * @param accountName -
122
- */
123
- GalleryRestClient.prototype.unshareExtension = function (publisherName, extensionName, accountName) {
124
- return __awaiter(this, void 0, void 0, function () {
125
- return __generator(this, function (_a) {
126
- return [2 /*return*/, this.beginRequest({
127
- apiVersion: "7.2-preview.1",
128
- method: "DELETE",
129
- routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/accountsbyname/{accountName}",
130
- routeValues: {
131
- publisherName: publisherName,
132
- extensionName: extensionName,
133
- accountName: accountName
134
- }
135
- })];
136
- });
137
- });
138
- };
139
- /**
140
- * @param itemId -
141
- * @param installationTarget -
142
- * @param testCommerce -
143
- * @param isFreeOrTrialInstall -
144
- */
145
- GalleryRestClient.prototype.getAcquisitionOptions = function (itemId, installationTarget, testCommerce, isFreeOrTrialInstall) {
146
- return __awaiter(this, void 0, void 0, function () {
147
- var queryValues;
148
- return __generator(this, function (_a) {
149
- queryValues = {
150
- installationTarget: installationTarget,
151
- testCommerce: testCommerce,
152
- isFreeOrTrialInstall: isFreeOrTrialInstall
153
- };
154
- return [2 /*return*/, this.beginRequest({
155
- apiVersion: "7.2-preview.1",
156
- routeTemplate: "_apis/gallery/acquisitionoptions/{itemId}",
157
- routeValues: {
158
- itemId: itemId
159
- },
160
- queryParams: queryValues
161
- })];
162
- });
163
- });
164
- };
165
- /**
166
- * @param acquisitionRequest -
167
- */
168
- GalleryRestClient.prototype.requestAcquisition = function (acquisitionRequest) {
169
- return __awaiter(this, void 0, void 0, function () {
170
- return __generator(this, function (_a) {
171
- return [2 /*return*/, this.beginRequest({
172
- apiVersion: "7.2-preview.1",
173
- method: "POST",
174
- routeTemplate: "_apis/gallery/acquisitionrequests",
175
- body: acquisitionRequest
176
- })];
177
- });
178
- });
179
- };
180
- /**
181
- * @param publisherName -
182
- * @param extensionName -
183
- * @param version -
184
- * @param assetType -
185
- * @param accountToken -
186
- * @param acceptDefault -
187
- * @param accountTokenHeader - Header to pass the account token
188
- */
189
- GalleryRestClient.prototype.getAssetByName = function (publisherName, extensionName, version, assetType, accountToken, acceptDefault, accountTokenHeader) {
190
- return __awaiter(this, void 0, void 0, function () {
191
- var queryValues;
192
- return __generator(this, function (_a) {
193
- queryValues = {
194
- accountToken: accountToken,
195
- acceptDefault: acceptDefault
196
- };
197
- return [2 /*return*/, this.beginRequest({
198
- apiVersion: "7.2-preview.1",
199
- httpResponseType: "application/octet-stream",
200
- routeTemplate: "_apis/public/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/assetbyname/{*assetType}",
201
- routeValues: {
202
- publisherName: publisherName,
203
- extensionName: extensionName,
204
- version: version,
205
- assetType: assetType
206
- },
207
- customHeaders: {
208
- "X-Market-AccountToken": accountTokenHeader,
209
- },
210
- queryParams: queryValues
211
- })];
212
- });
213
- });
214
- };
215
- /**
216
- * @param extensionId -
217
- * @param version -
218
- * @param assetType -
219
- * @param accountToken -
220
- * @param acceptDefault -
221
- * @param accountTokenHeader - Header to pass the account token
222
- */
223
- GalleryRestClient.prototype.getAsset = function (extensionId, version, assetType, accountToken, acceptDefault, accountTokenHeader) {
224
- return __awaiter(this, void 0, void 0, function () {
225
- var queryValues;
226
- return __generator(this, function (_a) {
227
- queryValues = {
228
- accountToken: accountToken,
229
- acceptDefault: acceptDefault
230
- };
231
- return [2 /*return*/, this.beginRequest({
232
- apiVersion: "7.2-preview.1",
233
- httpResponseType: "application/octet-stream",
234
- routeTemplate: "_apis/public/gallery/extensions/{extensionId}/{version}/assets/{assetType}",
235
- routeValues: {
236
- extensionId: extensionId,
237
- version: version,
238
- assetType: assetType
239
- },
240
- customHeaders: {
241
- "X-Market-AccountToken": accountTokenHeader,
242
- },
243
- queryParams: queryValues
244
- })];
245
- });
246
- });
247
- };
248
- /**
249
- * @param publisherName -
250
- * @param extensionName -
251
- * @param version -
252
- * @param assetType -
253
- * @param accountToken -
254
- * @param accountTokenHeader - Header to pass the account token
255
- */
256
- GalleryRestClient.prototype.getAssetAuthenticated = function (publisherName, extensionName, version, assetType, accountToken, accountTokenHeader) {
257
- return __awaiter(this, void 0, void 0, function () {
258
- var queryValues;
259
- return __generator(this, function (_a) {
260
- queryValues = {
261
- accountToken: accountToken
262
- };
263
- return [2 /*return*/, this.beginRequest({
264
- apiVersion: "7.2-preview.1",
265
- httpResponseType: "application/octet-stream",
266
- routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/assets/{*assetType}",
267
- routeValues: {
268
- publisherName: publisherName,
269
- extensionName: extensionName,
270
- version: version,
271
- assetType: assetType
272
- },
273
- customHeaders: {
274
- "X-Market-AccountToken": accountTokenHeader,
275
- },
276
- queryParams: queryValues
277
- })];
278
- });
279
- });
280
- };
281
- /**
282
- * @param publisherName -
283
- * @param azurePublisherId -
284
- */
285
- GalleryRestClient.prototype.associateAzurePublisher = function (publisherName, azurePublisherId) {
286
- return __awaiter(this, void 0, void 0, function () {
287
- var queryValues;
288
- return __generator(this, function (_a) {
289
- queryValues = {
290
- azurePublisherId: azurePublisherId
291
- };
292
- return [2 /*return*/, this.beginRequest({
293
- apiVersion: "7.2-preview.1",
294
- method: "PUT",
295
- routeTemplate: "_apis/gallery/publishers/{publisherName}/azurepublisher",
296
- routeValues: {
297
- publisherName: publisherName
298
- },
299
- queryParams: queryValues
300
- })];
301
- });
302
- });
303
- };
304
- /**
305
- * @param publisherName -
306
- */
307
- GalleryRestClient.prototype.queryAssociatedAzurePublisher = function (publisherName) {
308
- return __awaiter(this, void 0, void 0, function () {
309
- return __generator(this, function (_a) {
310
- return [2 /*return*/, this.beginRequest({
311
- apiVersion: "7.2-preview.1",
312
- routeTemplate: "_apis/gallery/publishers/{publisherName}/azurepublisher",
313
- routeValues: {
314
- publisherName: publisherName
315
- }
316
- })];
317
- });
318
- });
319
- };
320
- /**
321
- * @param languages -
322
- */
323
- GalleryRestClient.prototype.getCategories = function (languages) {
324
- return __awaiter(this, void 0, void 0, function () {
325
- var queryValues;
326
- return __generator(this, function (_a) {
327
- queryValues = {
328
- languages: languages
329
- };
330
- return [2 /*return*/, this.beginRequest({
331
- apiVersion: "7.2-preview.1",
332
- routeTemplate: "_apis/public/gallery/categories",
333
- queryParams: queryValues
334
- })];
335
- });
336
- });
337
- };
338
- /**
339
- * @param categoryName -
340
- * @param languages -
341
- * @param product -
342
- */
343
- GalleryRestClient.prototype.getCategoryDetails = function (categoryName, languages, product) {
344
- return __awaiter(this, void 0, void 0, function () {
345
- var queryValues;
346
- return __generator(this, function (_a) {
347
- queryValues = {
348
- languages: languages,
349
- product: product
350
- };
351
- return [2 /*return*/, this.beginRequest({
352
- apiVersion: "7.2-preview.1",
353
- routeTemplate: "_apis/public/gallery/categories/{categoryName}",
354
- routeValues: {
355
- categoryName: categoryName
356
- },
357
- queryParams: queryValues
358
- })];
359
- });
360
- });
361
- };
362
- /**
363
- * @param product -
364
- * @param categoryId -
365
- * @param lcid -
366
- * @param source -
367
- * @param productVersion -
368
- * @param skus -
369
- * @param subSkus -
370
- * @param productArchitecture -
371
- */
372
- GalleryRestClient.prototype.getCategoryTree = function (product, categoryId, lcid, source, productVersion, skus, subSkus, productArchitecture) {
373
- return __awaiter(this, void 0, void 0, function () {
374
- var queryValues;
375
- return __generator(this, function (_a) {
376
- queryValues = {
377
- lcid: lcid,
378
- source: source,
379
- productVersion: productVersion,
380
- skus: skus,
381
- subSkus: subSkus,
382
- productArchitecture: productArchitecture
383
- };
384
- return [2 /*return*/, this.beginRequest({
385
- apiVersion: "7.2-preview.1",
386
- routeTemplate: "_apis/public/gallery/{product}/categories/{categoryId}",
387
- routeValues: {
388
- product: product,
389
- categoryId: categoryId
390
- },
391
- queryParams: queryValues
392
- })];
393
- });
394
- });
395
- };
396
- /**
397
- * @param product -
398
- * @param lcid -
399
- * @param source -
400
- * @param productVersion -
401
- * @param skus -
402
- * @param subSkus -
403
- */
404
- GalleryRestClient.prototype.getRootCategories = function (product, lcid, source, productVersion, skus, subSkus) {
405
- return __awaiter(this, void 0, void 0, function () {
406
- var queryValues;
407
- return __generator(this, function (_a) {
408
- queryValues = {
409
- lcid: lcid,
410
- source: source,
411
- productVersion: productVersion,
412
- skus: skus,
413
- subSkus: subSkus
414
- };
415
- return [2 /*return*/, this.beginRequest({
416
- apiVersion: "7.2-preview.1",
417
- routeTemplate: "_apis/public/gallery/{product}/categories/root",
418
- routeValues: {
419
- product: product
420
- },
421
- queryParams: queryValues
422
- })];
423
- });
424
- });
425
- };
426
- /**
427
- * @param publisherName -
428
- * @param extensionName -
429
- * @param version -
430
- */
431
- GalleryRestClient.prototype.getCertificate = function (publisherName, extensionName, version) {
432
- return __awaiter(this, void 0, void 0, function () {
433
- return __generator(this, function (_a) {
434
- return [2 /*return*/, this.beginRequest({
435
- apiVersion: "7.2-preview.1",
436
- httpResponseType: "application/octet-stream",
437
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/certificates/{version}",
438
- routeValues: {
439
- publisherName: publisherName,
440
- extensionName: extensionName,
441
- version: version
442
- }
443
- })];
444
- });
445
- });
446
- };
447
- /**
448
- * @param customerSupportRequest -
449
- */
450
- GalleryRestClient.prototype.createSupportRequest = function (customerSupportRequest) {
451
- return __awaiter(this, void 0, void 0, function () {
452
- return __generator(this, function (_a) {
453
- return [2 /*return*/, this.beginRequest({
454
- apiVersion: "7.2-preview.1",
455
- method: "POST",
456
- routeTemplate: "_apis/public/support",
457
- body: customerSupportRequest
458
- })];
459
- });
460
- });
461
- };
462
- /**
463
- * @param publisherName -
464
- * @param extensionName -
465
- */
466
- GalleryRestClient.prototype.createDraftForEditExtension = function (publisherName, extensionName) {
467
- return __awaiter(this, void 0, void 0, function () {
468
- return __generator(this, function (_a) {
469
- return [2 /*return*/, this.beginRequest({
470
- apiVersion: "7.2-preview.1",
471
- method: "POST",
472
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",
473
- routeValues: {
474
- publisherName: publisherName,
475
- extensionName: extensionName
476
- }
477
- })];
478
- });
479
- });
480
- };
481
- /**
482
- * @param draftPatch -
483
- * @param publisherName -
484
- * @param extensionName -
485
- * @param draftId -
486
- */
487
- GalleryRestClient.prototype.performEditExtensionDraftOperation = function (draftPatch, publisherName, extensionName, draftId) {
488
- return __awaiter(this, void 0, void 0, function () {
489
- return __generator(this, function (_a) {
490
- return [2 /*return*/, this.beginRequest({
491
- apiVersion: "7.2-preview.1",
492
- method: "PATCH",
493
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",
494
- routeValues: {
495
- publisherName: publisherName,
496
- extensionName: extensionName,
497
- draftId: draftId
498
- },
499
- body: draftPatch
500
- })];
501
- });
502
- });
503
- };
504
- /**
505
- * @param content - Content to upload
506
- * @param publisherName -
507
- * @param extensionName -
508
- * @param draftId -
509
- * @param fileName - Header to pass the filename of the uploaded data
510
- */
511
- GalleryRestClient.prototype.updatePayloadInDraftForEditExtension = function (content, publisherName, extensionName, draftId, fileName) {
512
- return __awaiter(this, void 0, void 0, function () {
513
- return __generator(this, function (_a) {
514
- return [2 /*return*/, this.beginRequest({
515
- apiVersion: "7.2-preview.1",
516
- method: "PUT",
517
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",
518
- routeValues: {
519
- publisherName: publisherName,
520
- extensionName: extensionName,
521
- draftId: draftId
522
- },
523
- customHeaders: {
524
- "Content-Type": "application/octet-stream",
525
- "X-Market-UploadFileName": fileName,
526
- },
527
- body: content,
528
- isRawData: true
529
- })];
530
- });
531
- });
532
- };
533
- /**
534
- * @param content - Content to upload
535
- * @param publisherName -
536
- * @param extensionName -
537
- * @param draftId -
538
- * @param assetType -
539
- */
540
- GalleryRestClient.prototype.addAssetForEditExtensionDraft = function (content, publisherName, extensionName, draftId, assetType) {
541
- return __awaiter(this, void 0, void 0, function () {
542
- return __generator(this, function (_a) {
543
- return [2 /*return*/, this.beginRequest({
544
- apiVersion: "7.2-preview.1",
545
- method: "PUT",
546
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}/assets/{*assetType}",
547
- routeValues: {
548
- publisherName: publisherName,
549
- extensionName: extensionName,
550
- draftId: draftId,
551
- assetType: assetType
552
- },
553
- customHeaders: {
554
- "Content-Type": "application/octet-stream",
555
- },
556
- body: content,
557
- isRawData: true
558
- })];
559
- });
560
- });
561
- };
562
- /**
563
- * @param content - Content to upload
564
- * @param publisherName -
565
- * @param product - Header to pass the product type of the payload file
566
- * @param fileName - Header to pass the filename of the uploaded data
567
- */
568
- GalleryRestClient.prototype.createDraftForNewExtension = function (content, publisherName, product, fileName) {
569
- return __awaiter(this, void 0, void 0, function () {
570
- return __generator(this, function (_a) {
571
- return [2 /*return*/, this.beginRequest({
572
- apiVersion: "7.2-preview.1",
573
- method: "POST",
574
- routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}",
575
- routeValues: {
576
- publisherName: publisherName
577
- },
578
- customHeaders: {
579
- "Content-Type": "application/octet-stream",
580
- "X-Market-UploadFileProduct": product,
581
- "X-Market-UploadFileName": fileName,
582
- },
583
- body: content,
584
- isRawData: true
585
- })];
586
- });
587
- });
588
- };
589
- /**
590
- * @param draftPatch -
591
- * @param publisherName -
592
- * @param draftId -
593
- */
594
- GalleryRestClient.prototype.performNewExtensionDraftOperation = function (draftPatch, publisherName, draftId) {
595
- return __awaiter(this, void 0, void 0, function () {
596
- return __generator(this, function (_a) {
597
- return [2 /*return*/, this.beginRequest({
598
- apiVersion: "7.2-preview.1",
599
- method: "PATCH",
600
- routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}",
601
- routeValues: {
602
- publisherName: publisherName,
603
- draftId: draftId
604
- },
605
- body: draftPatch
606
- })];
607
- });
608
- });
609
- };
610
- /**
611
- * @param content - Content to upload
612
- * @param publisherName -
613
- * @param draftId -
614
- * @param fileName - Header to pass the filename of the uploaded data
615
- */
616
- GalleryRestClient.prototype.updatePayloadInDraftForNewExtension = function (content, publisherName, draftId, fileName) {
617
- return __awaiter(this, void 0, void 0, function () {
618
- return __generator(this, function (_a) {
619
- return [2 /*return*/, this.beginRequest({
620
- apiVersion: "7.2-preview.1",
621
- method: "PUT",
622
- routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}",
623
- routeValues: {
624
- publisherName: publisherName,
625
- draftId: draftId
626
- },
627
- customHeaders: {
628
- "Content-Type": "application/octet-stream",
629
- "X-Market-UploadFileName": fileName,
630
- },
631
- body: content,
632
- isRawData: true
633
- })];
634
- });
635
- });
636
- };
637
- /**
638
- * @param content - Content to upload
639
- * @param publisherName -
640
- * @param draftId -
641
- * @param assetType -
642
- */
643
- GalleryRestClient.prototype.addAssetForNewExtensionDraft = function (content, publisherName, draftId, assetType) {
644
- return __awaiter(this, void 0, void 0, function () {
645
- return __generator(this, function (_a) {
646
- return [2 /*return*/, this.beginRequest({
647
- apiVersion: "7.2-preview.1",
648
- method: "PUT",
649
- routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",
650
- routeValues: {
651
- publisherName: publisherName,
652
- draftId: draftId,
653
- assetType: assetType
654
- },
655
- customHeaders: {
656
- "Content-Type": "application/octet-stream",
657
- },
658
- body: content,
659
- isRawData: true
660
- })];
661
- });
662
- });
663
- };
664
- /**
665
- * @param publisherName -
666
- * @param draftId -
667
- * @param assetType -
668
- * @param extensionName -
669
- */
670
- GalleryRestClient.prototype.getAssetFromEditExtensionDraft = function (publisherName, draftId, assetType, extensionName) {
671
- return __awaiter(this, void 0, void 0, function () {
672
- var queryValues;
673
- return __generator(this, function (_a) {
674
- queryValues = {
675
- extensionName: extensionName
676
- };
677
- return [2 /*return*/, this.beginRequest({
678
- apiVersion: "7.2-preview.1",
679
- httpResponseType: "application/octet-stream",
680
- routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",
681
- routeValues: {
682
- publisherName: publisherName,
683
- draftId: draftId,
684
- assetType: assetType
685
- },
686
- queryParams: queryValues
687
- })];
688
- });
689
- });
690
- };
691
- /**
692
- * @param publisherName -
693
- * @param draftId -
694
- * @param assetType -
695
- */
696
- GalleryRestClient.prototype.getAssetFromNewExtensionDraft = function (publisherName, draftId, assetType) {
697
- return __awaiter(this, void 0, void 0, function () {
698
- return __generator(this, function (_a) {
699
- return [2 /*return*/, this.beginRequest({
700
- apiVersion: "7.2-preview.1",
701
- httpResponseType: "application/octet-stream",
702
- routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",
703
- routeValues: {
704
- publisherName: publisherName,
705
- draftId: draftId,
706
- assetType: assetType
707
- }
708
- })];
709
- });
710
- });
711
- };
712
- /**
713
- * Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence.
714
- *
715
- * @param publisherName - Name of the publisher
716
- * @param extensionName - Name of the extension
717
- * @param count - Count of events to fetch, applies to each event type.
718
- * @param afterDate - Fetch events that occurred on or after this date
719
- * @param include - Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events
720
- * @param includeProperty - Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events
721
- */
722
- GalleryRestClient.prototype.getExtensionEvents = function (publisherName, extensionName, count, afterDate, include, includeProperty) {
723
- return __awaiter(this, void 0, void 0, function () {
724
- var queryValues;
725
- return __generator(this, function (_a) {
726
- queryValues = {
727
- count: count,
728
- afterDate: afterDate,
729
- include: include,
730
- includeProperty: includeProperty
731
- };
732
- return [2 /*return*/, this.beginRequest({
733
- apiVersion: "7.2-preview.1",
734
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/events",
735
- routeValues: {
736
- publisherName: publisherName,
737
- extensionName: extensionName
738
- },
739
- queryParams: queryValues
740
- })];
741
- });
742
- });
743
- };
744
- /**
745
- * API endpoint to publish extension install/uninstall events. This is meant to be invoked by EMS only for sending us data related to install/uninstall of an extension.
746
- *
747
- * @param extensionEvents -
748
- */
749
- GalleryRestClient.prototype.publishExtensionEvents = function (extensionEvents) {
750
- return __awaiter(this, void 0, void 0, function () {
751
- return __generator(this, function (_a) {
752
- return [2 /*return*/, this.beginRequest({
753
- apiVersion: "7.2-preview.1",
754
- method: "POST",
755
- routeTemplate: "_apis/gallery/events",
756
- body: extensionEvents
757
- })];
758
- });
759
- });
760
- };
761
- /**
762
- * @param extensionQuery -
763
- * @param accountToken -
764
- * @param accountTokenHeader - Header to pass the account token
765
- */
766
- GalleryRestClient.prototype.queryExtensions = function (extensionQuery, accountToken, accountTokenHeader) {
767
- return __awaiter(this, void 0, void 0, function () {
768
- var queryValues;
769
- return __generator(this, function (_a) {
770
- queryValues = {
771
- accountToken: accountToken
772
- };
773
- return [2 /*return*/, this.beginRequest({
774
- apiVersion: "7.2-preview.1",
775
- method: "POST",
776
- routeTemplate: "_apis/public/gallery/extensionquery",
777
- customHeaders: {
778
- "X-Market-AccountToken": accountTokenHeader,
779
- },
780
- queryParams: queryValues,
781
- body: extensionQuery
782
- })];
783
- });
784
- });
785
- };
786
- /**
787
- * @param content - Content to upload
788
- * @param extensionType -
789
- * @param reCaptchaToken -
790
- */
791
- GalleryRestClient.prototype.createExtension = function (content, extensionType, reCaptchaToken) {
792
- return __awaiter(this, void 0, void 0, function () {
793
- var queryValues;
794
- return __generator(this, function (_a) {
795
- queryValues = {
796
- extensionType: extensionType,
797
- reCaptchaToken: reCaptchaToken
798
- };
799
- return [2 /*return*/, this.beginRequest({
800
- apiVersion: "7.2-preview.2",
801
- method: "POST",
802
- routeTemplate: "_apis/gallery/extensions/{extensionId}",
803
- customHeaders: {
804
- "Content-Type": "application/octet-stream",
805
- },
806
- queryParams: queryValues,
807
- body: content,
808
- isRawData: true
809
- })];
810
- });
811
- });
812
- };
813
- /**
814
- * @param extensionId -
815
- * @param version -
816
- */
817
- GalleryRestClient.prototype.deleteExtensionById = function (extensionId, version) {
818
- return __awaiter(this, void 0, void 0, function () {
819
- var queryValues;
820
- return __generator(this, function (_a) {
821
- queryValues = {
822
- version: version
823
- };
824
- return [2 /*return*/, this.beginRequest({
825
- apiVersion: "7.2-preview.2",
826
- method: "DELETE",
827
- routeTemplate: "_apis/gallery/extensions/{extensionId}",
828
- routeValues: {
829
- extensionId: extensionId
830
- },
831
- queryParams: queryValues
832
- })];
833
- });
834
- });
835
- };
836
- /**
837
- * @param extensionId -
838
- * @param version -
839
- * @param flags -
840
- */
841
- GalleryRestClient.prototype.getExtensionById = function (extensionId, version, flags) {
842
- return __awaiter(this, void 0, void 0, function () {
843
- var queryValues;
844
- return __generator(this, function (_a) {
845
- queryValues = {
846
- version: version,
847
- flags: flags
848
- };
849
- return [2 /*return*/, this.beginRequest({
850
- apiVersion: "7.2-preview.2",
851
- routeTemplate: "_apis/gallery/extensions/{extensionId}",
852
- routeValues: {
853
- extensionId: extensionId
854
- },
855
- queryParams: queryValues
856
- })];
857
- });
858
- });
859
- };
860
- /**
861
- * @param extensionId -
862
- * @param reCaptchaToken -
863
- */
864
- GalleryRestClient.prototype.updateExtensionById = function (extensionId, reCaptchaToken) {
865
- return __awaiter(this, void 0, void 0, function () {
866
- var queryValues;
867
- return __generator(this, function (_a) {
868
- queryValues = {
869
- reCaptchaToken: reCaptchaToken
870
- };
871
- return [2 /*return*/, this.beginRequest({
872
- apiVersion: "7.2-preview.2",
873
- method: "PUT",
874
- routeTemplate: "_apis/gallery/extensions/{extensionId}",
875
- routeValues: {
876
- extensionId: extensionId
877
- },
878
- queryParams: queryValues
879
- })];
880
- });
881
- });
882
- };
883
- /**
884
- * @param content - Content to upload
885
- * @param publisherName -
886
- * @param extensionType -
887
- * @param reCaptchaToken -
888
- */
889
- GalleryRestClient.prototype.createExtensionWithPublisher = function (content, publisherName, extensionType, reCaptchaToken) {
890
- return __awaiter(this, void 0, void 0, function () {
891
- var queryValues;
892
- return __generator(this, function (_a) {
893
- queryValues = {
894
- extensionType: extensionType,
895
- reCaptchaToken: reCaptchaToken
896
- };
897
- return [2 /*return*/, this.beginRequest({
898
- apiVersion: "7.2-preview.2",
899
- method: "POST",
900
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
901
- routeValues: {
902
- publisherName: publisherName
903
- },
904
- customHeaders: {
905
- "Content-Type": "application/octet-stream",
906
- },
907
- queryParams: queryValues,
908
- body: content,
909
- isRawData: true
910
- })];
911
- });
912
- });
913
- };
914
- /**
915
- * @param publisherName -
916
- * @param extensionName -
917
- * @param version -
918
- */
919
- GalleryRestClient.prototype.deleteExtension = function (publisherName, extensionName, version) {
920
- return __awaiter(this, void 0, void 0, function () {
921
- var queryValues;
922
- return __generator(this, function (_a) {
923
- queryValues = {
924
- version: version
925
- };
926
- return [2 /*return*/, this.beginRequest({
927
- apiVersion: "7.2-preview.2",
928
- method: "DELETE",
929
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
930
- routeValues: {
931
- publisherName: publisherName,
932
- extensionName: extensionName
933
- },
934
- queryParams: queryValues
935
- })];
936
- });
937
- });
938
- };
939
- /**
940
- * @param publisherName -
941
- * @param extensionName -
942
- * @param version -
943
- * @param flags -
944
- * @param accountToken -
945
- * @param accountTokenHeader - Header to pass the account token
946
- */
947
- GalleryRestClient.prototype.getExtension = function (publisherName, extensionName, version, flags, accountToken, accountTokenHeader) {
948
- return __awaiter(this, void 0, void 0, function () {
949
- var queryValues;
950
- return __generator(this, function (_a) {
951
- queryValues = {
952
- version: version,
953
- flags: flags,
954
- accountToken: accountToken
955
- };
956
- return [2 /*return*/, this.beginRequest({
957
- apiVersion: "7.2-preview.2",
958
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
959
- routeValues: {
960
- publisherName: publisherName,
961
- extensionName: extensionName
962
- },
963
- customHeaders: {
964
- "X-Market-AccountToken": accountTokenHeader,
965
- },
966
- queryParams: queryValues
967
- })];
968
- });
969
- });
970
- };
971
- /**
972
- * REST endpoint to update an extension.
973
- *
974
- * @param content - Content to upload
975
- * @param publisherName - Name of the publisher
976
- * @param extensionName - Name of the extension
977
- * @param extensionType -
978
- * @param reCaptchaToken -
979
- * @param bypassScopeCheck - This parameter decides if the scope change check needs to be invoked or not
980
- */
981
- GalleryRestClient.prototype.updateExtension = function (content, publisherName, extensionName, extensionType, reCaptchaToken, bypassScopeCheck) {
982
- return __awaiter(this, void 0, void 0, function () {
983
- var queryValues;
984
- return __generator(this, function (_a) {
985
- queryValues = {
986
- extensionType: extensionType,
987
- reCaptchaToken: reCaptchaToken,
988
- bypassScopeCheck: bypassScopeCheck
989
- };
990
- return [2 /*return*/, this.beginRequest({
991
- apiVersion: "7.2-preview.2",
992
- method: "PUT",
993
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
994
- routeValues: {
995
- publisherName: publisherName,
996
- extensionName: extensionName
997
- },
998
- customHeaders: {
999
- "Content-Type": "application/octet-stream",
1000
- },
1001
- queryParams: queryValues,
1002
- body: content,
1003
- isRawData: true
1004
- })];
1005
- });
1006
- });
1007
- };
1008
- /**
1009
- * @param publisherName -
1010
- * @param extensionName -
1011
- * @param flags -
1012
- */
1013
- GalleryRestClient.prototype.updateExtensionProperties = function (publisherName, extensionName, flags) {
1014
- return __awaiter(this, void 0, void 0, function () {
1015
- var queryValues;
1016
- return __generator(this, function (_a) {
1017
- queryValues = {
1018
- flags: flags
1019
- };
1020
- return [2 /*return*/, this.beginRequest({
1021
- apiVersion: "7.2-preview.2",
1022
- method: "PATCH",
1023
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
1024
- routeValues: {
1025
- publisherName: publisherName,
1026
- extensionName: extensionName
1027
- },
1028
- queryParams: queryValues
1029
- })];
1030
- });
1031
- });
1032
- };
1033
- /**
1034
- * @param publisherName -
1035
- * @param extensionName -
1036
- * @param hostType -
1037
- * @param hostName -
1038
- */
1039
- GalleryRestClient.prototype.shareExtensionWithHost = function (publisherName, extensionName, hostType, hostName) {
1040
- return __awaiter(this, void 0, void 0, function () {
1041
- return __generator(this, function (_a) {
1042
- return [2 /*return*/, this.beginRequest({
1043
- apiVersion: "7.2-preview.1",
1044
- method: "POST",
1045
- routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/extensionshare/{hostType}/{hostName}",
1046
- routeValues: {
1047
- publisherName: publisherName,
1048
- extensionName: extensionName,
1049
- hostType: hostType,
1050
- hostName: hostName
1051
- }
1052
- })];
1053
- });
1054
- });
1055
- };
1056
- /**
1057
- * @param publisherName -
1058
- * @param extensionName -
1059
- * @param hostType -
1060
- * @param hostName -
1061
- */
1062
- GalleryRestClient.prototype.unshareExtensionWithHost = function (publisherName, extensionName, hostType, hostName) {
1063
- return __awaiter(this, void 0, void 0, function () {
1064
- return __generator(this, function (_a) {
1065
- return [2 /*return*/, this.beginRequest({
1066
- apiVersion: "7.2-preview.1",
1067
- method: "DELETE",
1068
- routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/extensionshare/{hostType}/{hostName}",
1069
- routeValues: {
1070
- publisherName: publisherName,
1071
- extensionName: extensionName,
1072
- hostType: hostType,
1073
- hostName: hostName
1074
- }
1075
- })];
1076
- });
1077
- });
1078
- };
1079
- /**
1080
- * Rest end point to validate if an Azure publisher owns an extension for 3rd party commerce scenario. Azure only supports POST operations and the above signature is not typical of the REST operations. http://sharepoint/sites/AzureUX/_layouts/15/WopiFrame2.aspx?sourcedoc=\{A793D31E-6DC6-4174-8FA3-DE3F82B51642\}&file=Data%20Market%20Partner%20integration%20with%20Marketplace%20service.docx&action=default
1081
- *
1082
- * @param azureRestApiRequestModel - All the parameters are sent in the request body
1083
- */
1084
- GalleryRestClient.prototype.extensionValidator = function (azureRestApiRequestModel) {
1085
- return __awaiter(this, void 0, void 0, function () {
1086
- return __generator(this, function (_a) {
1087
- return [2 /*return*/, this.beginRequest({
1088
- apiVersion: "7.2-preview.1",
1089
- method: "POST",
1090
- routeTemplate: "_apis/gallery/extensionValidator",
1091
- body: azureRestApiRequestModel
1092
- })];
1093
- });
1094
- });
1095
- };
1096
- /**
1097
- * Send Notification
1098
- *
1099
- * @param notificationData - Denoting the data needed to send notification
1100
- */
1101
- GalleryRestClient.prototype.sendNotifications = function (notificationData) {
1102
- return __awaiter(this, void 0, void 0, function () {
1103
- return __generator(this, function (_a) {
1104
- return [2 /*return*/, this.beginRequest({
1105
- apiVersion: "7.2-preview.1",
1106
- method: "POST",
1107
- routeTemplate: "_apis/gallery/notifications",
1108
- body: notificationData
1109
- })];
1110
- });
1111
- });
1112
- };
1113
- /**
1114
- * This endpoint gets hit when you download a VSTS extension from the Web UI
1115
- *
1116
- * @param publisherName -
1117
- * @param extensionName -
1118
- * @param version -
1119
- * @param accountToken -
1120
- * @param acceptDefault -
1121
- * @param accountTokenHeader - Header to pass the account token
1122
- */
1123
- GalleryRestClient.prototype.getPackage = function (publisherName, extensionName, version, accountToken, acceptDefault, accountTokenHeader) {
1124
- return __awaiter(this, void 0, void 0, function () {
1125
- var queryValues;
1126
- return __generator(this, function (_a) {
1127
- queryValues = {
1128
- accountToken: accountToken,
1129
- acceptDefault: acceptDefault
1130
- };
1131
- return [2 /*return*/, this.beginRequest({
1132
- apiVersion: "7.2-preview.1",
1133
- httpResponseType: "application/octet-stream",
1134
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/package",
1135
- routeValues: {
1136
- publisherName: publisherName,
1137
- extensionName: extensionName,
1138
- version: version
1139
- },
1140
- customHeaders: {
1141
- "X-Market-AccountToken": accountTokenHeader,
1142
- },
1143
- queryParams: queryValues
1144
- })];
1145
- });
1146
- });
1147
- };
1148
- /**
1149
- * @param publisherName -
1150
- * @param extensionName -
1151
- * @param version -
1152
- * @param assetType -
1153
- * @param assetToken -
1154
- * @param accountToken -
1155
- * @param acceptDefault -
1156
- * @param accountTokenHeader - Header to pass the account token
1157
- */
1158
- GalleryRestClient.prototype.getAssetWithToken = function (publisherName, extensionName, version, assetType, assetToken, accountToken, acceptDefault, accountTokenHeader) {
1159
- return __awaiter(this, void 0, void 0, function () {
1160
- var queryValues;
1161
- return __generator(this, function (_a) {
1162
- queryValues = {
1163
- accountToken: accountToken,
1164
- acceptDefault: acceptDefault
1165
- };
1166
- return [2 /*return*/, this.beginRequest({
1167
- apiVersion: "7.2-preview.1",
1168
- httpResponseType: "application/octet-stream",
1169
- routeTemplate: "_apis/public/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/privateasset/{assetToken}/{*assetType}",
1170
- routeValues: {
1171
- publisherName: publisherName,
1172
- extensionName: extensionName,
1173
- version: version,
1174
- assetType: assetType,
1175
- assetToken: assetToken
1176
- },
1177
- customHeaders: {
1178
- "X-Market-AccountToken": accountTokenHeader,
1179
- },
1180
- queryParams: queryValues
1181
- })];
1182
- });
1183
- });
1184
- };
1185
- /**
1186
- * Delete publisher asset like logo
1187
- *
1188
- * @param publisherName - Internal name of the publisher
1189
- * @param assetType - Type of asset. Default value is 'logo'.
1190
- */
1191
- GalleryRestClient.prototype.deletePublisherAsset = function (publisherName, assetType) {
1192
- return __awaiter(this, void 0, void 0, function () {
1193
- var queryValues;
1194
- return __generator(this, function (_a) {
1195
- queryValues = {
1196
- assetType: assetType
1197
- };
1198
- return [2 /*return*/, this.beginRequest({
1199
- apiVersion: "7.2-preview.1",
1200
- method: "DELETE",
1201
- routeTemplate: "_apis/gallery/publishers/{publisherName}/publisherasset",
1202
- routeValues: {
1203
- publisherName: publisherName
1204
- },
1205
- queryParams: queryValues
1206
- })];
1207
- });
1208
- });
1209
- };
1210
- /**
1211
- * Get publisher asset like logo as a stream
1212
- *
1213
- * @param publisherName - Internal name of the publisher
1214
- * @param assetType - Type of asset. Default value is 'logo'.
1215
- */
1216
- GalleryRestClient.prototype.getPublisherAsset = function (publisherName, assetType) {
1217
- return __awaiter(this, void 0, void 0, function () {
1218
- var queryValues;
1219
- return __generator(this, function (_a) {
1220
- queryValues = {
1221
- assetType: assetType
1222
- };
1223
- return [2 /*return*/, this.beginRequest({
1224
- apiVersion: "7.2-preview.1",
1225
- httpResponseType: "application/octet-stream",
1226
- routeTemplate: "_apis/gallery/publishers/{publisherName}/publisherasset",
1227
- routeValues: {
1228
- publisherName: publisherName
1229
- },
1230
- queryParams: queryValues
1231
- })];
1232
- });
1233
- });
1234
- };
1235
- /**
1236
- * Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values.
1237
- *
1238
- * @param content - Content to upload
1239
- * @param publisherName - Internal name of the publisher
1240
- * @param assetType - Type of asset. Default value is 'logo'.
1241
- * @param fileName - Header to pass the filename of the uploaded data
1242
- */
1243
- GalleryRestClient.prototype.updatePublisherAsset = function (content, publisherName, assetType, fileName) {
1244
- return __awaiter(this, void 0, void 0, function () {
1245
- var queryValues;
1246
- return __generator(this, function (_a) {
1247
- queryValues = {
1248
- assetType: assetType
1249
- };
1250
- return [2 /*return*/, this.beginRequest({
1251
- apiVersion: "7.2-preview.1",
1252
- method: "PUT",
1253
- routeTemplate: "_apis/gallery/publishers/{publisherName}/publisherasset",
1254
- routeValues: {
1255
- publisherName: publisherName
1256
- },
1257
- customHeaders: {
1258
- "Content-Type": "application/octet-stream",
1259
- "X-Market-UploadFileName": fileName,
1260
- },
1261
- queryParams: queryValues,
1262
- body: content,
1263
- isRawData: true
1264
- })];
1265
- });
1266
- });
1267
- };
1268
- /**
1269
- * @param publisherName -
1270
- */
1271
- GalleryRestClient.prototype.fetchDomainToken = function (publisherName) {
1272
- return __awaiter(this, void 0, void 0, function () {
1273
- return __generator(this, function (_a) {
1274
- return [2 /*return*/, this.beginRequest({
1275
- apiVersion: "7.2-preview.1",
1276
- routeTemplate: "_apis/gallery/publishers/{publisherName}/verify/token",
1277
- routeValues: {
1278
- publisherName: publisherName
1279
- }
1280
- })];
1281
- });
1282
- });
1283
- };
1284
- /**
1285
- * @param publisherName -
1286
- */
1287
- GalleryRestClient.prototype.verifyDomainToken = function (publisherName) {
1288
- return __awaiter(this, void 0, void 0, function () {
1289
- return __generator(this, function (_a) {
1290
- return [2 /*return*/, this.beginRequest({
1291
- apiVersion: "7.2-preview.1",
1292
- method: "PUT",
1293
- routeTemplate: "_apis/gallery/publishers/{publisherName}/verify/token",
1294
- routeValues: {
1295
- publisherName: publisherName
1296
- }
1297
- })];
1298
- });
1299
- });
1300
- };
1301
- /**
1302
- * @param publisherQuery -
1303
- */
1304
- GalleryRestClient.prototype.queryPublishers = function (publisherQuery) {
1305
- return __awaiter(this, void 0, void 0, function () {
1306
- return __generator(this, function (_a) {
1307
- return [2 /*return*/, this.beginRequest({
1308
- apiVersion: "7.2-preview.1",
1309
- method: "POST",
1310
- routeTemplate: "_apis/public/gallery/publisherquery",
1311
- body: publisherQuery
1312
- })];
1313
- });
1314
- });
1315
- };
1316
- /**
1317
- * @param publisher -
1318
- */
1319
- GalleryRestClient.prototype.createPublisher = function (publisher) {
1320
- return __awaiter(this, void 0, void 0, function () {
1321
- return __generator(this, function (_a) {
1322
- return [2 /*return*/, this.beginRequest({
1323
- apiVersion: "7.2-preview.1",
1324
- method: "POST",
1325
- routeTemplate: "_apis/gallery/publishers/{publisherName}",
1326
- body: publisher
1327
- })];
1328
- });
1329
- });
1330
- };
1331
- /**
1332
- * @param publisherName -
1333
- */
1334
- GalleryRestClient.prototype.deletePublisher = function (publisherName) {
1335
- return __awaiter(this, void 0, void 0, function () {
1336
- return __generator(this, function (_a) {
1337
- return [2 /*return*/, this.beginRequest({
1338
- apiVersion: "7.2-preview.1",
1339
- method: "DELETE",
1340
- routeTemplate: "_apis/gallery/publishers/{publisherName}",
1341
- routeValues: {
1342
- publisherName: publisherName
1343
- }
1344
- })];
1345
- });
1346
- });
1347
- };
1348
- /**
1349
- * @param publisherName -
1350
- * @param flags -
1351
- */
1352
- GalleryRestClient.prototype.getPublisher = function (publisherName, flags) {
1353
- return __awaiter(this, void 0, void 0, function () {
1354
- var queryValues;
1355
- return __generator(this, function (_a) {
1356
- queryValues = {
1357
- flags: flags
1358
- };
1359
- return [2 /*return*/, this.beginRequest({
1360
- apiVersion: "7.2-preview.1",
1361
- routeTemplate: "_apis/gallery/publishers/{publisherName}",
1362
- routeValues: {
1363
- publisherName: publisherName
1364
- },
1365
- queryParams: queryValues
1366
- })];
1367
- });
1368
- });
1369
- };
1370
- /**
1371
- * @param publisher -
1372
- * @param publisherName -
1373
- */
1374
- GalleryRestClient.prototype.updatePublisher = function (publisher, publisherName) {
1375
- return __awaiter(this, void 0, void 0, function () {
1376
- return __generator(this, function (_a) {
1377
- return [2 /*return*/, this.beginRequest({
1378
- apiVersion: "7.2-preview.1",
1379
- method: "PUT",
1380
- routeTemplate: "_apis/gallery/publishers/{publisherName}",
1381
- routeValues: {
1382
- publisherName: publisherName
1383
- },
1384
- body: publisher
1385
- })];
1386
- });
1387
- });
1388
- };
1389
- /**
1390
- * Endpoint to add/modify publisher membership. Currently Supports only addition/modification of 1 user at a time Works only for adding members of same tenant.
1391
- *
1392
- * @param roleAssignments - List of user identifiers(email address) and role to be added. Currently only one entry is supported.
1393
- * @param publisherName - The name/id of publisher to which users have to be added
1394
- * @param limitToCallerIdentityDomain - Should cross tenant addtions be allowed or not.
1395
- */
1396
- GalleryRestClient.prototype.updatePublisherMembers = function (roleAssignments, publisherName, limitToCallerIdentityDomain) {
1397
- return __awaiter(this, void 0, void 0, function () {
1398
- var queryValues;
1399
- return __generator(this, function (_a) {
1400
- queryValues = {
1401
- limitToCallerIdentityDomain: limitToCallerIdentityDomain
1402
- };
1403
- return [2 /*return*/, this.beginRequest({
1404
- apiVersion: "7.2-preview.1",
1405
- method: "POST",
1406
- routeTemplate: "_apis/gallery/publishers/{publisherName}",
1407
- routeValues: {
1408
- publisherName: publisherName
1409
- },
1410
- queryParams: queryValues,
1411
- body: roleAssignments
1412
- })];
1413
- });
1414
- });
1415
- };
1416
- /**
1417
- * @param content - Content to upload
1418
- * @param publisherName -
1419
- * @param extensionName -
1420
- * @param extensionType -
1421
- * @param reCaptchaToken -
1422
- * @param bypassScopeCheck -
1423
- */
1424
- GalleryRestClient.prototype.publishExtensionWithPublisherSignature = function (content, publisherName, extensionName, extensionType, reCaptchaToken, bypassScopeCheck) {
1425
- return __awaiter(this, void 0, void 0, function () {
1426
- var queryValues;
1427
- return __generator(this, function (_a) {
1428
- queryValues = {
1429
- extensionType: extensionType,
1430
- reCaptchaToken: reCaptchaToken,
1431
- bypassScopeCheck: bypassScopeCheck
1432
- };
1433
- return [2 /*return*/, this.beginRequest({
1434
- apiVersion: "7.2-preview.1",
1435
- method: "PUT",
1436
- routeTemplate: "_apis/gallery/publishers/{publisherName}/publishersignedextension/{extensionName}",
1437
- routeValues: {
1438
- publisherName: publisherName,
1439
- extensionName: extensionName
1440
- },
1441
- customHeaders: {
1442
- "Content-Type": "multipart/related",
1443
- },
1444
- queryParams: queryValues,
1445
- body: content,
1446
- isRawData: true
1447
- })];
1448
- });
1449
- });
1450
- };
1451
- /**
1452
- * @param publisherName -
1453
- */
1454
- GalleryRestClient.prototype.getPublisherWithoutToken = function (publisherName) {
1455
- return __awaiter(this, void 0, void 0, function () {
1456
- return __generator(this, function (_a) {
1457
- return [2 /*return*/, this.beginRequest({
1458
- apiVersion: "7.2-preview.1",
1459
- routeTemplate: "_apis/public/gallery/publisherWithoutToken/{publisherName}",
1460
- routeValues: {
1461
- publisherName: publisherName
1462
- }
1463
- })];
1464
- });
1465
- });
1466
- };
1467
- /**
1468
- * Returns a list of questions with their responses associated with an extension.
1469
- *
1470
- * @param publisherName - Name of the publisher who published the extension.
1471
- * @param extensionName - Name of the extension.
1472
- * @param count - Number of questions to retrieve (defaults to 10).
1473
- * @param page - Page number from which set of questions are to be retrieved.
1474
- * @param afterDate - If provided, results questions are returned which were posted after this date
1475
- */
1476
- GalleryRestClient.prototype.getQuestions = function (publisherName, extensionName, count, page, afterDate) {
1477
- return __awaiter(this, void 0, void 0, function () {
1478
- var queryValues;
1479
- return __generator(this, function (_a) {
1480
- queryValues = {
1481
- count: count,
1482
- page: page,
1483
- afterDate: afterDate
1484
- };
1485
- return [2 /*return*/, this.beginRequest({
1486
- apiVersion: "7.2-preview.1",
1487
- routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/qna",
1488
- routeValues: {
1489
- publisherName: publisherName,
1490
- extensionName: extensionName
1491
- },
1492
- queryParams: queryValues
1493
- })];
1494
- });
1495
- });
1496
- };
1497
- /**
1498
- * Flags a concern with an existing question for an extension.
1499
- *
1500
- * @param concern - User reported concern with a question for the extension.
1501
- * @param pubName - Name of the publisher who published the extension.
1502
- * @param extName - Name of the extension.
1503
- * @param questionId - Identifier of the question to be updated for the extension.
1504
- */
1505
- GalleryRestClient.prototype.reportQuestion = function (concern, pubName, extName, questionId) {
1506
- return __awaiter(this, void 0, void 0, function () {
1507
- return __generator(this, function (_a) {
1508
- return [2 /*return*/, this.beginRequest({
1509
- apiVersion: "7.2-preview.1",
1510
- method: "POST",
1511
- routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/qna/{questionId}/concern",
1512
- routeValues: {
1513
- pubName: pubName,
1514
- extName: extName,
1515
- questionId: questionId
1516
- },
1517
- body: concern
1518
- })];
1519
- });
1520
- });
1521
- };
1522
- /**
1523
- * Creates a new question for an extension.
1524
- *
1525
- * @param question - Question to be created for the extension.
1526
- * @param publisherName - Name of the publisher who published the extension.
1527
- * @param extensionName - Name of the extension.
1528
- */
1529
- GalleryRestClient.prototype.createQuestion = function (question, publisherName, extensionName) {
1530
- return __awaiter(this, void 0, void 0, function () {
1531
- return __generator(this, function (_a) {
1532
- return [2 /*return*/, this.beginRequest({
1533
- apiVersion: "7.2-preview.1",
1534
- method: "POST",
1535
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",
1536
- routeValues: {
1537
- publisherName: publisherName,
1538
- extensionName: extensionName
1539
- },
1540
- body: question
1541
- })];
1542
- });
1543
- });
1544
- };
1545
- /**
1546
- * Deletes an existing question and all its associated responses for an extension. (soft delete)
1547
- *
1548
- * @param publisherName - Name of the publisher who published the extension.
1549
- * @param extensionName - Name of the extension.
1550
- * @param questionId - Identifier of the question to be deleted for the extension.
1551
- */
1552
- GalleryRestClient.prototype.deleteQuestion = function (publisherName, extensionName, questionId) {
1553
- return __awaiter(this, void 0, void 0, function () {
1554
- return __generator(this, function (_a) {
1555
- return [2 /*return*/, this.beginRequest({
1556
- apiVersion: "7.2-preview.1",
1557
- method: "DELETE",
1558
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",
1559
- routeValues: {
1560
- publisherName: publisherName,
1561
- extensionName: extensionName,
1562
- questionId: questionId
1563
- }
1564
- })];
1565
- });
1566
- });
1567
- };
1568
- /**
1569
- * Updates an existing question for an extension.
1570
- *
1571
- * @param question - Updated question to be set for the extension.
1572
- * @param publisherName - Name of the publisher who published the extension.
1573
- * @param extensionName - Name of the extension.
1574
- * @param questionId - Identifier of the question to be updated for the extension.
1575
- */
1576
- GalleryRestClient.prototype.updateQuestion = function (question, publisherName, extensionName, questionId) {
1577
- return __awaiter(this, void 0, void 0, function () {
1578
- return __generator(this, function (_a) {
1579
- return [2 /*return*/, this.beginRequest({
1580
- apiVersion: "7.2-preview.1",
1581
- method: "PATCH",
1582
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",
1583
- routeValues: {
1584
- publisherName: publisherName,
1585
- extensionName: extensionName,
1586
- questionId: questionId
1587
- },
1588
- body: question
1589
- })];
1590
- });
1591
- });
1592
- };
1593
- /**
1594
- * Creates a new response for a given question for an extension.
1595
- *
1596
- * @param response - Response to be created for the extension.
1597
- * @param publisherName - Name of the publisher who published the extension.
1598
- * @param extensionName - Name of the extension.
1599
- * @param questionId - Identifier of the question for which response is to be created for the extension.
1600
- */
1601
- GalleryRestClient.prototype.createResponse = function (response, publisherName, extensionName, questionId) {
1602
- return __awaiter(this, void 0, void 0, function () {
1603
- return __generator(this, function (_a) {
1604
- return [2 /*return*/, this.beginRequest({
1605
- apiVersion: "7.2-preview.1",
1606
- method: "POST",
1607
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",
1608
- routeValues: {
1609
- publisherName: publisherName,
1610
- extensionName: extensionName,
1611
- questionId: questionId
1612
- },
1613
- body: response
1614
- })];
1615
- });
1616
- });
1617
- };
1618
- /**
1619
- * Deletes a response for an extension. (soft delete)
1620
- *
1621
- * @param publisherName - Name of the publisher who published the extension.
1622
- * @param extensionName - Name of the extension.
1623
- * @param questionId - Identifies the question whose response is to be deleted.
1624
- * @param responseId - Identifies the response to be deleted.
1625
- */
1626
- GalleryRestClient.prototype.deleteResponse = function (publisherName, extensionName, questionId, responseId) {
1627
- return __awaiter(this, void 0, void 0, function () {
1628
- return __generator(this, function (_a) {
1629
- return [2 /*return*/, this.beginRequest({
1630
- apiVersion: "7.2-preview.1",
1631
- method: "DELETE",
1632
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",
1633
- routeValues: {
1634
- publisherName: publisherName,
1635
- extensionName: extensionName,
1636
- questionId: questionId,
1637
- responseId: responseId
1638
- }
1639
- })];
1640
- });
1641
- });
1642
- };
1643
- /**
1644
- * Updates an existing response for a given question for an extension.
1645
- *
1646
- * @param response - Updated response to be set for the extension.
1647
- * @param publisherName - Name of the publisher who published the extension.
1648
- * @param extensionName - Name of the extension.
1649
- * @param questionId - Identifier of the question for which response is to be updated for the extension.
1650
- * @param responseId - Identifier of the response which has to be updated.
1651
- */
1652
- GalleryRestClient.prototype.updateResponse = function (response, publisherName, extensionName, questionId, responseId) {
1653
- return __awaiter(this, void 0, void 0, function () {
1654
- return __generator(this, function (_a) {
1655
- return [2 /*return*/, this.beginRequest({
1656
- apiVersion: "7.2-preview.1",
1657
- method: "PATCH",
1658
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",
1659
- routeValues: {
1660
- publisherName: publisherName,
1661
- extensionName: extensionName,
1662
- questionId: questionId,
1663
- responseId: responseId
1664
- },
1665
- body: response
1666
- })];
1667
- });
1668
- });
1669
- };
1670
- /**
1671
- * Returns extension reports
1672
- *
1673
- * @param publisherName - Name of the publisher who published the extension
1674
- * @param extensionName - Name of the extension
1675
- * @param days - Last n days report. If afterDate and days are specified, days will take priority
1676
- * @param count - Number of events to be returned
1677
- * @param afterDate - Use if you want to fetch events newer than the specified date
1678
- */
1679
- GalleryRestClient.prototype.getExtensionReports = function (publisherName, extensionName, days, count, afterDate) {
1680
- return __awaiter(this, void 0, void 0, function () {
1681
- var queryValues;
1682
- return __generator(this, function (_a) {
1683
- queryValues = {
1684
- days: days,
1685
- count: count,
1686
- afterDate: afterDate
1687
- };
1688
- return [2 /*return*/, this.beginRequest({
1689
- apiVersion: "7.2-preview.1",
1690
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/reports",
1691
- routeValues: {
1692
- publisherName: publisherName,
1693
- extensionName: extensionName
1694
- },
1695
- queryParams: queryValues
1696
- })];
1697
- });
1698
- });
1699
- };
1700
- /**
1701
- * Returns a list of reviews associated with an extension
1702
- *
1703
- * @param publisherName - Name of the publisher who published the extension
1704
- * @param extensionName - Name of the extension
1705
- * @param count - Number of reviews to retrieve (defaults to 5)
1706
- * @param filterOptions - FilterOptions to filter out empty reviews etcetera, defaults to none
1707
- * @param beforeDate - Use if you want to fetch reviews older than the specified date, defaults to null
1708
- * @param afterDate - Use if you want to fetch reviews newer than the specified date, defaults to null
1709
- */
1710
- GalleryRestClient.prototype.getReviews = function (publisherName, extensionName, count, filterOptions, beforeDate, afterDate) {
1711
- return __awaiter(this, void 0, void 0, function () {
1712
- var queryValues;
1713
- return __generator(this, function (_a) {
1714
- queryValues = {
1715
- count: count,
1716
- filterOptions: filterOptions,
1717
- beforeDate: beforeDate,
1718
- afterDate: afterDate
1719
- };
1720
- return [2 /*return*/, this.beginRequest({
1721
- apiVersion: "7.2-preview.1",
1722
- routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/reviews",
1723
- routeValues: {
1724
- publisherName: publisherName,
1725
- extensionName: extensionName
1726
- },
1727
- queryParams: queryValues
1728
- })];
1729
- });
1730
- });
1731
- };
1732
- /**
1733
- * Returns a summary of the reviews
1734
- *
1735
- * @param pubName - Name of the publisher who published the extension
1736
- * @param extName - Name of the extension
1737
- * @param beforeDate - Use if you want to fetch summary of reviews older than the specified date, defaults to null
1738
- * @param afterDate - Use if you want to fetch summary of reviews newer than the specified date, defaults to null
1739
- */
1740
- GalleryRestClient.prototype.getReviewsSummary = function (pubName, extName, beforeDate, afterDate) {
1741
- return __awaiter(this, void 0, void 0, function () {
1742
- var queryValues;
1743
- return __generator(this, function (_a) {
1744
- queryValues = {
1745
- beforeDate: beforeDate,
1746
- afterDate: afterDate
1747
- };
1748
- return [2 /*return*/, this.beginRequest({
1749
- apiVersion: "7.2-preview.1",
1750
- routeTemplate: "_apis/public/gallery/publishers/{pubName}/extensions/{extName}/reviews/summary",
1751
- routeValues: {
1752
- pubName: pubName,
1753
- extName: extName
1754
- },
1755
- queryParams: queryValues
1756
- })];
1757
- });
1758
- });
1759
- };
1760
- /**
1761
- * Creates a new review for an extension
1762
- *
1763
- * @param review - Review to be created for the extension
1764
- * @param pubName - Name of the publisher who published the extension
1765
- * @param extName - Name of the extension
1766
- */
1767
- GalleryRestClient.prototype.createReview = function (review, pubName, extName) {
1768
- return __awaiter(this, void 0, void 0, function () {
1769
- return __generator(this, function (_a) {
1770
- return [2 /*return*/, this.beginRequest({
1771
- apiVersion: "7.2-preview.1",
1772
- method: "POST",
1773
- routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",
1774
- routeValues: {
1775
- pubName: pubName,
1776
- extName: extName
1777
- },
1778
- body: review
1779
- })];
1780
- });
1781
- });
1782
- };
1783
- /**
1784
- * Deletes a review
1785
- *
1786
- * @param pubName - Name of the publisher who published the extension
1787
- * @param extName - Name of the extension
1788
- * @param reviewId - Id of the review which needs to be updated
1789
- */
1790
- GalleryRestClient.prototype.deleteReview = function (pubName, extName, reviewId) {
1791
- return __awaiter(this, void 0, void 0, function () {
1792
- return __generator(this, function (_a) {
1793
- return [2 /*return*/, this.beginRequest({
1794
- apiVersion: "7.2-preview.1",
1795
- method: "DELETE",
1796
- routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",
1797
- routeValues: {
1798
- pubName: pubName,
1799
- extName: extName,
1800
- reviewId: reviewId
1801
- }
1802
- })];
1803
- });
1804
- });
1805
- };
1806
- /**
1807
- * Updates or Flags a review
1808
- *
1809
- * @param reviewPatch - ReviewPatch object which contains the changes to be applied to the review
1810
- * @param pubName - Name of the publisher who published the extension
1811
- * @param extName - Name of the extension
1812
- * @param reviewId - Id of the review which needs to be updated
1813
- */
1814
- GalleryRestClient.prototype.updateReview = function (reviewPatch, pubName, extName, reviewId) {
1815
- return __awaiter(this, void 0, void 0, function () {
1816
- return __generator(this, function (_a) {
1817
- return [2 /*return*/, this.beginRequest({
1818
- apiVersion: "7.2-preview.1",
1819
- method: "PATCH",
1820
- routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",
1821
- routeValues: {
1822
- pubName: pubName,
1823
- extName: extName,
1824
- reviewId: reviewId
1825
- },
1826
- body: reviewPatch
1827
- })];
1828
- });
1829
- });
1830
- };
1831
- /**
1832
- * @param category -
1833
- */
1834
- GalleryRestClient.prototype.createCategory = function (category) {
1835
- return __awaiter(this, void 0, void 0, function () {
1836
- return __generator(this, function (_a) {
1837
- return [2 /*return*/, this.beginRequest({
1838
- apiVersion: "7.2-preview.1",
1839
- method: "POST",
1840
- routeTemplate: "_apis/gallery/categories",
1841
- body: category
1842
- })];
1843
- });
1844
- });
1845
- };
1846
- /**
1847
- * Get all setting entries for the given user/all-users scope
1848
- *
1849
- * @param userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
1850
- * @param key - Optional key under which to filter all the entries
1851
- */
1852
- GalleryRestClient.prototype.getGalleryUserSettings = function (userScope, key) {
1853
- return __awaiter(this, void 0, void 0, function () {
1854
- return __generator(this, function (_a) {
1855
- return [2 /*return*/, this.beginRequest({
1856
- apiVersion: "7.2-preview.1",
1857
- routeTemplate: "_apis/gallery/settings/{userScope}/{*key}",
1858
- routeValues: {
1859
- userScope: userScope,
1860
- key: key
1861
- }
1862
- })];
1863
- });
1864
- });
1865
- };
1866
- /**
1867
- * Set all setting entries for the given user/all-users scope
1868
- *
1869
- * @param entries - A key-value pair of all settings that need to be set
1870
- * @param userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
1871
- */
1872
- GalleryRestClient.prototype.setGalleryUserSettings = function (entries, userScope) {
1873
- return __awaiter(this, void 0, void 0, function () {
1874
- return __generator(this, function (_a) {
1875
- return [2 /*return*/, this.beginRequest({
1876
- apiVersion: "7.2-preview.1",
1877
- method: "PATCH",
1878
- routeTemplate: "_apis/gallery/settings/{userScope}/{*key}",
1879
- routeValues: {
1880
- userScope: userScope
1881
- },
1882
- body: entries
1883
- })];
1884
- });
1885
- });
1886
- };
1887
- /**
1888
- * @param keyType -
1889
- * @param expireCurrentSeconds -
1890
- */
1891
- GalleryRestClient.prototype.generateKey = function (keyType, expireCurrentSeconds) {
1892
- return __awaiter(this, void 0, void 0, function () {
1893
- var queryValues;
1894
- return __generator(this, function (_a) {
1895
- queryValues = {
1896
- expireCurrentSeconds: expireCurrentSeconds
1897
- };
1898
- return [2 /*return*/, this.beginRequest({
1899
- apiVersion: "7.2-preview.1",
1900
- method: "POST",
1901
- routeTemplate: "_apis/gallery/signingkey/{keyType}",
1902
- routeValues: {
1903
- keyType: keyType
1904
- },
1905
- queryParams: queryValues
1906
- })];
1907
- });
1908
- });
1909
- };
1910
- /**
1911
- * @param keyType -
1912
- */
1913
- GalleryRestClient.prototype.getSigningKey = function (keyType) {
1914
- return __awaiter(this, void 0, void 0, function () {
1915
- return __generator(this, function (_a) {
1916
- return [2 /*return*/, this.beginRequest({
1917
- apiVersion: "7.2-preview.1",
1918
- routeTemplate: "_apis/gallery/signingkey/{keyType}",
1919
- routeValues: {
1920
- keyType: keyType
1921
- }
1922
- })];
1923
- });
1924
- });
1925
- };
1926
- /**
1927
- * @param extensionStatisticsUpdate -
1928
- * @param publisherName -
1929
- * @param extensionName -
1930
- */
1931
- GalleryRestClient.prototype.updateExtensionStatistics = function (extensionStatisticsUpdate, publisherName, extensionName) {
1932
- return __awaiter(this, void 0, void 0, function () {
1933
- return __generator(this, function (_a) {
1934
- return [2 /*return*/, this.beginRequest({
1935
- apiVersion: "7.2-preview.1",
1936
- method: "PATCH",
1937
- routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/statistics",
1938
- routeValues: {
1939
- publisherName: publisherName,
1940
- extensionName: extensionName
1941
- },
1942
- body: extensionStatisticsUpdate
1943
- })];
1944
- });
1945
- });
1946
- };
1947
- /**
1948
- * @param publisherName -
1949
- * @param extensionName -
1950
- * @param days -
1951
- * @param aggregate -
1952
- * @param afterDate -
1953
- */
1954
- GalleryRestClient.prototype.getExtensionDailyStats = function (publisherName, extensionName, days, aggregate, afterDate) {
1955
- return __awaiter(this, void 0, void 0, function () {
1956
- var queryValues;
1957
- return __generator(this, function (_a) {
1958
- queryValues = {
1959
- days: days,
1960
- aggregate: aggregate,
1961
- afterDate: afterDate
1962
- };
1963
- return [2 /*return*/, this.beginRequest({
1964
- apiVersion: "7.2-preview.1",
1965
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/stats",
1966
- routeValues: {
1967
- publisherName: publisherName,
1968
- extensionName: extensionName
1969
- },
1970
- queryParams: queryValues
1971
- })];
1972
- });
1973
- });
1974
- };
1975
- /**
1976
- * This route/location id only supports HTTP POST anonymously, so that the page view daily stat can be incremented from Marketplace client. Trying to call GET on this route should result in an exception. Without this explicit implementation, calling GET on this public route invokes the above GET implementation GetExtensionDailyStats.
1977
- *
1978
- * @param publisherName - Name of the publisher
1979
- * @param extensionName - Name of the extension
1980
- * @param version - Version of the extension
1981
- */
1982
- GalleryRestClient.prototype.getExtensionDailyStatsAnonymous = function (publisherName, extensionName, version) {
1983
- return __awaiter(this, void 0, void 0, function () {
1984
- return __generator(this, function (_a) {
1985
- return [2 /*return*/, this.beginRequest({
1986
- apiVersion: "7.2-preview.1",
1987
- routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/stats",
1988
- routeValues: {
1989
- publisherName: publisherName,
1990
- extensionName: extensionName,
1991
- version: version
1992
- }
1993
- })];
1994
- });
1995
- });
1996
- };
1997
- /**
1998
- * Increments a daily statistic associated with the extension
1999
- *
2000
- * @param publisherName - Name of the publisher
2001
- * @param extensionName - Name of the extension
2002
- * @param version - Version of the extension
2003
- * @param statType - Type of stat to increment
2004
- * @param targetPlatform -
2005
- */
2006
- GalleryRestClient.prototype.incrementExtensionDailyStat = function (publisherName, extensionName, version, statType, targetPlatform) {
2007
- return __awaiter(this, void 0, void 0, function () {
2008
- var queryValues;
2009
- return __generator(this, function (_a) {
2010
- queryValues = {
2011
- statType: statType,
2012
- targetPlatform: targetPlatform
2013
- };
2014
- return [2 /*return*/, this.beginRequest({
2015
- apiVersion: "7.2-preview.1",
2016
- method: "POST",
2017
- routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/stats",
2018
- routeValues: {
2019
- publisherName: publisherName,
2020
- extensionName: extensionName,
2021
- version: version
2022
- },
2023
- queryParams: queryValues
2024
- })];
2025
- });
2026
- });
2027
- };
2028
- /**
2029
- * @param publisherName -
2030
- * @param extensionName -
2031
- * @param version -
2032
- * @param targetPlatform -
2033
- */
2034
- GalleryRestClient.prototype.getVerificationLog = function (publisherName, extensionName, version, targetPlatform) {
2035
- return __awaiter(this, void 0, void 0, function () {
2036
- var queryValues;
2037
- return __generator(this, function (_a) {
2038
- queryValues = {
2039
- targetPlatform: targetPlatform
2040
- };
2041
- return [2 /*return*/, this.beginRequest({
2042
- apiVersion: "7.2-preview.1",
2043
- httpResponseType: "application/octet-stream",
2044
- routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/verificationlog",
2045
- routeValues: {
2046
- publisherName: publisherName,
2047
- extensionName: extensionName,
2048
- version: version
2049
- },
2050
- queryParams: queryValues
2051
- })];
2052
- });
2053
- });
2054
- };
2055
- /**
2056
- * Endpoint to get the latest version(s) of a VS Code extension.
2057
- *
2058
- * @param publisherName - The name of the publisher of the requested VS Code extension.
2059
- * @param extensionName - The extension name.
2060
- */
2061
- GalleryRestClient.prototype.getVSCodeExtensionLatestVersion = function (publisherName, extensionName) {
2062
- return __awaiter(this, void 0, void 0, function () {
2063
- return __generator(this, function (_a) {
2064
- return [2 /*return*/, this.beginRequest({
2065
- apiVersion: "7.2-preview.1",
2066
- routeTemplate: "_apis/public/gallery/vscode/{publisherName}/{extensionName}/latest",
2067
- routeValues: {
2068
- publisherName: publisherName,
2069
- extensionName: extensionName
2070
- }
2071
- })];
2072
- });
2073
- });
2074
- };
2075
- /**
2076
- * @param itemName -
2077
- * @param version -
2078
- * @param statType -
2079
- */
2080
- GalleryRestClient.prototype.updateVSCodeWebExtensionStatistics = function (itemName, version, statType) {
2081
- return __awaiter(this, void 0, void 0, function () {
2082
- return __generator(this, function (_a) {
2083
- return [2 /*return*/, this.beginRequest({
2084
- apiVersion: "7.2-preview.1",
2085
- method: "POST",
2086
- routeTemplate: "_apis/public/gallery/itemName/{itemName}/version/{version}/statType/{statType}/vscodewebextension",
2087
- routeValues: {
2088
- itemName: itemName,
2089
- version: version,
2090
- statType: statType
2091
- }
2092
- })];
2093
- });
2094
- });
2095
- };
2096
- GalleryRestClient.RESOURCE_AREA_ID = "69d21c00-f135-441b-b5ce-3626378e0819";
2097
- return GalleryRestClient;
2098
- }(RestClientBase_1.RestClientBase));
2099
- exports.GalleryRestClient = GalleryRestClient;
2100
- });
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.GalleryRestClient = void 0;
18
+ const RestClientBase_1 = require("../Common/RestClientBase");
19
+ class GalleryRestClient extends RestClientBase_1.RestClientBase {
20
+ constructor(options) {
21
+ super(options);
22
+ }
23
+ /**
24
+ * @param extensionId -
25
+ * @param accountName -
26
+ */
27
+ shareExtensionById(extensionId, accountName) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ return this.beginRequest({
30
+ apiVersion: "7.2-preview.1",
31
+ method: "POST",
32
+ routeTemplate: "_apis/gallery/extensions/{extensionId}/accounts/{accountName}",
33
+ routeValues: {
34
+ extensionId: extensionId,
35
+ accountName: accountName
36
+ }
37
+ });
38
+ });
39
+ }
40
+ /**
41
+ * @param extensionId -
42
+ * @param accountName -
43
+ */
44
+ unshareExtensionById(extensionId, accountName) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ return this.beginRequest({
47
+ apiVersion: "7.2-preview.1",
48
+ method: "DELETE",
49
+ routeTemplate: "_apis/gallery/extensions/{extensionId}/accounts/{accountName}",
50
+ routeValues: {
51
+ extensionId: extensionId,
52
+ accountName: accountName
53
+ }
54
+ });
55
+ });
56
+ }
57
+ /**
58
+ * @param publisherName -
59
+ * @param extensionName -
60
+ * @param accountName -
61
+ */
62
+ shareExtension(publisherName, extensionName, accountName) {
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ return this.beginRequest({
65
+ apiVersion: "7.2-preview.1",
66
+ method: "POST",
67
+ routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/accountsbyname/{accountName}",
68
+ routeValues: {
69
+ publisherName: publisherName,
70
+ extensionName: extensionName,
71
+ accountName: accountName
72
+ }
73
+ });
74
+ });
75
+ }
76
+ /**
77
+ * @param publisherName -
78
+ * @param extensionName -
79
+ * @param accountName -
80
+ */
81
+ unshareExtension(publisherName, extensionName, accountName) {
82
+ return __awaiter(this, void 0, void 0, function* () {
83
+ return this.beginRequest({
84
+ apiVersion: "7.2-preview.1",
85
+ method: "DELETE",
86
+ routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/accountsbyname/{accountName}",
87
+ routeValues: {
88
+ publisherName: publisherName,
89
+ extensionName: extensionName,
90
+ accountName: accountName
91
+ }
92
+ });
93
+ });
94
+ }
95
+ /**
96
+ * @param itemId -
97
+ * @param installationTarget -
98
+ * @param testCommerce -
99
+ * @param isFreeOrTrialInstall -
100
+ */
101
+ getAcquisitionOptions(itemId, installationTarget, testCommerce, isFreeOrTrialInstall) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const queryValues = {
104
+ installationTarget: installationTarget,
105
+ testCommerce: testCommerce,
106
+ isFreeOrTrialInstall: isFreeOrTrialInstall
107
+ };
108
+ return this.beginRequest({
109
+ apiVersion: "7.2-preview.1",
110
+ routeTemplate: "_apis/gallery/acquisitionoptions/{itemId}",
111
+ routeValues: {
112
+ itemId: itemId
113
+ },
114
+ queryParams: queryValues
115
+ });
116
+ });
117
+ }
118
+ /**
119
+ * @param acquisitionRequest -
120
+ */
121
+ requestAcquisition(acquisitionRequest) {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ return this.beginRequest({
124
+ apiVersion: "7.2-preview.1",
125
+ method: "POST",
126
+ routeTemplate: "_apis/gallery/acquisitionrequests",
127
+ body: acquisitionRequest
128
+ });
129
+ });
130
+ }
131
+ /**
132
+ * @param publisherName -
133
+ * @param extensionName -
134
+ * @param version -
135
+ * @param assetType -
136
+ * @param accountToken -
137
+ * @param acceptDefault -
138
+ * @param accountTokenHeader - Header to pass the account token
139
+ */
140
+ getAssetByName(publisherName, extensionName, version, assetType, accountToken, acceptDefault, accountTokenHeader) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ const queryValues = {
143
+ accountToken: accountToken,
144
+ acceptDefault: acceptDefault
145
+ };
146
+ return this.beginRequest({
147
+ apiVersion: "7.2-preview.1",
148
+ httpResponseType: "application/octet-stream",
149
+ routeTemplate: "_apis/public/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/assetbyname/{*assetType}",
150
+ routeValues: {
151
+ publisherName: publisherName,
152
+ extensionName: extensionName,
153
+ version: version,
154
+ assetType: assetType
155
+ },
156
+ customHeaders: {
157
+ "X-Market-AccountToken": accountTokenHeader,
158
+ },
159
+ queryParams: queryValues
160
+ });
161
+ });
162
+ }
163
+ /**
164
+ * @param extensionId -
165
+ * @param version -
166
+ * @param assetType -
167
+ * @param accountToken -
168
+ * @param acceptDefault -
169
+ * @param accountTokenHeader - Header to pass the account token
170
+ */
171
+ getAsset(extensionId, version, assetType, accountToken, acceptDefault, accountTokenHeader) {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ const queryValues = {
174
+ accountToken: accountToken,
175
+ acceptDefault: acceptDefault
176
+ };
177
+ return this.beginRequest({
178
+ apiVersion: "7.2-preview.1",
179
+ httpResponseType: "application/octet-stream",
180
+ routeTemplate: "_apis/public/gallery/extensions/{extensionId}/{version}/assets/{assetType}",
181
+ routeValues: {
182
+ extensionId: extensionId,
183
+ version: version,
184
+ assetType: assetType
185
+ },
186
+ customHeaders: {
187
+ "X-Market-AccountToken": accountTokenHeader,
188
+ },
189
+ queryParams: queryValues
190
+ });
191
+ });
192
+ }
193
+ /**
194
+ * @param publisherName -
195
+ * @param extensionName -
196
+ * @param version -
197
+ * @param assetType -
198
+ * @param accountToken -
199
+ * @param accountTokenHeader - Header to pass the account token
200
+ */
201
+ getAssetAuthenticated(publisherName, extensionName, version, assetType, accountToken, accountTokenHeader) {
202
+ return __awaiter(this, void 0, void 0, function* () {
203
+ const queryValues = {
204
+ accountToken: accountToken
205
+ };
206
+ return this.beginRequest({
207
+ apiVersion: "7.2-preview.1",
208
+ httpResponseType: "application/octet-stream",
209
+ routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/assets/{*assetType}",
210
+ routeValues: {
211
+ publisherName: publisherName,
212
+ extensionName: extensionName,
213
+ version: version,
214
+ assetType: assetType
215
+ },
216
+ customHeaders: {
217
+ "X-Market-AccountToken": accountTokenHeader,
218
+ },
219
+ queryParams: queryValues
220
+ });
221
+ });
222
+ }
223
+ /**
224
+ * @param publisherName -
225
+ * @param azurePublisherId -
226
+ */
227
+ associateAzurePublisher(publisherName, azurePublisherId) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ const queryValues = {
230
+ azurePublisherId: azurePublisherId
231
+ };
232
+ return this.beginRequest({
233
+ apiVersion: "7.2-preview.1",
234
+ method: "PUT",
235
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/azurepublisher",
236
+ routeValues: {
237
+ publisherName: publisherName
238
+ },
239
+ queryParams: queryValues
240
+ });
241
+ });
242
+ }
243
+ /**
244
+ * @param publisherName -
245
+ */
246
+ queryAssociatedAzurePublisher(publisherName) {
247
+ return __awaiter(this, void 0, void 0, function* () {
248
+ return this.beginRequest({
249
+ apiVersion: "7.2-preview.1",
250
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/azurepublisher",
251
+ routeValues: {
252
+ publisherName: publisherName
253
+ }
254
+ });
255
+ });
256
+ }
257
+ /**
258
+ * @param languages -
259
+ */
260
+ getCategories(languages) {
261
+ return __awaiter(this, void 0, void 0, function* () {
262
+ const queryValues = {
263
+ languages: languages
264
+ };
265
+ return this.beginRequest({
266
+ apiVersion: "7.2-preview.1",
267
+ routeTemplate: "_apis/public/gallery/categories",
268
+ queryParams: queryValues
269
+ });
270
+ });
271
+ }
272
+ /**
273
+ * @param categoryName -
274
+ * @param languages -
275
+ * @param product -
276
+ */
277
+ getCategoryDetails(categoryName, languages, product) {
278
+ return __awaiter(this, void 0, void 0, function* () {
279
+ const queryValues = {
280
+ languages: languages,
281
+ product: product
282
+ };
283
+ return this.beginRequest({
284
+ apiVersion: "7.2-preview.1",
285
+ routeTemplate: "_apis/public/gallery/categories/{categoryName}",
286
+ routeValues: {
287
+ categoryName: categoryName
288
+ },
289
+ queryParams: queryValues
290
+ });
291
+ });
292
+ }
293
+ /**
294
+ * @param product -
295
+ * @param categoryId -
296
+ * @param lcid -
297
+ * @param source -
298
+ * @param productVersion -
299
+ * @param skus -
300
+ * @param subSkus -
301
+ * @param productArchitecture -
302
+ */
303
+ getCategoryTree(product, categoryId, lcid, source, productVersion, skus, subSkus, productArchitecture) {
304
+ return __awaiter(this, void 0, void 0, function* () {
305
+ const queryValues = {
306
+ lcid: lcid,
307
+ source: source,
308
+ productVersion: productVersion,
309
+ skus: skus,
310
+ subSkus: subSkus,
311
+ productArchitecture: productArchitecture
312
+ };
313
+ return this.beginRequest({
314
+ apiVersion: "7.2-preview.1",
315
+ routeTemplate: "_apis/public/gallery/{product}/categories/{categoryId}",
316
+ routeValues: {
317
+ product: product,
318
+ categoryId: categoryId
319
+ },
320
+ queryParams: queryValues
321
+ });
322
+ });
323
+ }
324
+ /**
325
+ * @param product -
326
+ * @param lcid -
327
+ * @param source -
328
+ * @param productVersion -
329
+ * @param skus -
330
+ * @param subSkus -
331
+ */
332
+ getRootCategories(product, lcid, source, productVersion, skus, subSkus) {
333
+ return __awaiter(this, void 0, void 0, function* () {
334
+ const queryValues = {
335
+ lcid: lcid,
336
+ source: source,
337
+ productVersion: productVersion,
338
+ skus: skus,
339
+ subSkus: subSkus
340
+ };
341
+ return this.beginRequest({
342
+ apiVersion: "7.2-preview.1",
343
+ routeTemplate: "_apis/public/gallery/{product}/categories/root",
344
+ routeValues: {
345
+ product: product
346
+ },
347
+ queryParams: queryValues
348
+ });
349
+ });
350
+ }
351
+ /**
352
+ * @param publisherName -
353
+ * @param extensionName -
354
+ * @param version -
355
+ */
356
+ getCertificate(publisherName, extensionName, version) {
357
+ return __awaiter(this, void 0, void 0, function* () {
358
+ return this.beginRequest({
359
+ apiVersion: "7.2-preview.1",
360
+ httpResponseType: "application/octet-stream",
361
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/certificates/{version}",
362
+ routeValues: {
363
+ publisherName: publisherName,
364
+ extensionName: extensionName,
365
+ version: version
366
+ }
367
+ });
368
+ });
369
+ }
370
+ /**
371
+ * @param customerSupportRequest -
372
+ */
373
+ createSupportRequest(customerSupportRequest) {
374
+ return __awaiter(this, void 0, void 0, function* () {
375
+ return this.beginRequest({
376
+ apiVersion: "7.2-preview.1",
377
+ method: "POST",
378
+ routeTemplate: "_apis/public/support",
379
+ body: customerSupportRequest
380
+ });
381
+ });
382
+ }
383
+ /**
384
+ * @param publisherName -
385
+ * @param extensionName -
386
+ */
387
+ createDraftForEditExtension(publisherName, extensionName) {
388
+ return __awaiter(this, void 0, void 0, function* () {
389
+ return this.beginRequest({
390
+ apiVersion: "7.2-preview.1",
391
+ method: "POST",
392
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",
393
+ routeValues: {
394
+ publisherName: publisherName,
395
+ extensionName: extensionName
396
+ }
397
+ });
398
+ });
399
+ }
400
+ /**
401
+ * @param draftPatch -
402
+ * @param publisherName -
403
+ * @param extensionName -
404
+ * @param draftId -
405
+ */
406
+ performEditExtensionDraftOperation(draftPatch, publisherName, extensionName, draftId) {
407
+ return __awaiter(this, void 0, void 0, function* () {
408
+ return this.beginRequest({
409
+ apiVersion: "7.2-preview.1",
410
+ method: "PATCH",
411
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",
412
+ routeValues: {
413
+ publisherName: publisherName,
414
+ extensionName: extensionName,
415
+ draftId: draftId
416
+ },
417
+ body: draftPatch
418
+ });
419
+ });
420
+ }
421
+ /**
422
+ * @param content - Content to upload
423
+ * @param publisherName -
424
+ * @param extensionName -
425
+ * @param draftId -
426
+ * @param fileName - Header to pass the filename of the uploaded data
427
+ */
428
+ updatePayloadInDraftForEditExtension(content, publisherName, extensionName, draftId, fileName) {
429
+ return __awaiter(this, void 0, void 0, function* () {
430
+ return this.beginRequest({
431
+ apiVersion: "7.2-preview.1",
432
+ method: "PUT",
433
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}",
434
+ routeValues: {
435
+ publisherName: publisherName,
436
+ extensionName: extensionName,
437
+ draftId: draftId
438
+ },
439
+ customHeaders: {
440
+ "Content-Type": "application/octet-stream",
441
+ "X-Market-UploadFileName": fileName,
442
+ },
443
+ body: content,
444
+ isRawData: true
445
+ });
446
+ });
447
+ }
448
+ /**
449
+ * @param content - Content to upload
450
+ * @param publisherName -
451
+ * @param extensionName -
452
+ * @param draftId -
453
+ * @param assetType -
454
+ */
455
+ addAssetForEditExtensionDraft(content, publisherName, extensionName, draftId, assetType) {
456
+ return __awaiter(this, void 0, void 0, function* () {
457
+ return this.beginRequest({
458
+ apiVersion: "7.2-preview.1",
459
+ method: "PUT",
460
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/drafts/{draftId}/assets/{*assetType}",
461
+ routeValues: {
462
+ publisherName: publisherName,
463
+ extensionName: extensionName,
464
+ draftId: draftId,
465
+ assetType: assetType
466
+ },
467
+ customHeaders: {
468
+ "Content-Type": "application/octet-stream",
469
+ },
470
+ body: content,
471
+ isRawData: true
472
+ });
473
+ });
474
+ }
475
+ /**
476
+ * @param content - Content to upload
477
+ * @param publisherName -
478
+ * @param product - Header to pass the product type of the payload file
479
+ * @param fileName - Header to pass the filename of the uploaded data
480
+ */
481
+ createDraftForNewExtension(content, publisherName, product, fileName) {
482
+ return __awaiter(this, void 0, void 0, function* () {
483
+ return this.beginRequest({
484
+ apiVersion: "7.2-preview.1",
485
+ method: "POST",
486
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}",
487
+ routeValues: {
488
+ publisherName: publisherName
489
+ },
490
+ customHeaders: {
491
+ "Content-Type": "application/octet-stream",
492
+ "X-Market-UploadFileProduct": product,
493
+ "X-Market-UploadFileName": fileName,
494
+ },
495
+ body: content,
496
+ isRawData: true
497
+ });
498
+ });
499
+ }
500
+ /**
501
+ * @param draftPatch -
502
+ * @param publisherName -
503
+ * @param draftId -
504
+ */
505
+ performNewExtensionDraftOperation(draftPatch, publisherName, draftId) {
506
+ return __awaiter(this, void 0, void 0, function* () {
507
+ return this.beginRequest({
508
+ apiVersion: "7.2-preview.1",
509
+ method: "PATCH",
510
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}",
511
+ routeValues: {
512
+ publisherName: publisherName,
513
+ draftId: draftId
514
+ },
515
+ body: draftPatch
516
+ });
517
+ });
518
+ }
519
+ /**
520
+ * @param content - Content to upload
521
+ * @param publisherName -
522
+ * @param draftId -
523
+ * @param fileName - Header to pass the filename of the uploaded data
524
+ */
525
+ updatePayloadInDraftForNewExtension(content, publisherName, draftId, fileName) {
526
+ return __awaiter(this, void 0, void 0, function* () {
527
+ return this.beginRequest({
528
+ apiVersion: "7.2-preview.1",
529
+ method: "PUT",
530
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}",
531
+ routeValues: {
532
+ publisherName: publisherName,
533
+ draftId: draftId
534
+ },
535
+ customHeaders: {
536
+ "Content-Type": "application/octet-stream",
537
+ "X-Market-UploadFileName": fileName,
538
+ },
539
+ body: content,
540
+ isRawData: true
541
+ });
542
+ });
543
+ }
544
+ /**
545
+ * @param content - Content to upload
546
+ * @param publisherName -
547
+ * @param draftId -
548
+ * @param assetType -
549
+ */
550
+ addAssetForNewExtensionDraft(content, publisherName, draftId, assetType) {
551
+ return __awaiter(this, void 0, void 0, function* () {
552
+ return this.beginRequest({
553
+ apiVersion: "7.2-preview.1",
554
+ method: "PUT",
555
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",
556
+ routeValues: {
557
+ publisherName: publisherName,
558
+ draftId: draftId,
559
+ assetType: assetType
560
+ },
561
+ customHeaders: {
562
+ "Content-Type": "application/octet-stream",
563
+ },
564
+ body: content,
565
+ isRawData: true
566
+ });
567
+ });
568
+ }
569
+ /**
570
+ * @param publisherName -
571
+ * @param draftId -
572
+ * @param assetType -
573
+ * @param extensionName -
574
+ */
575
+ getAssetFromEditExtensionDraft(publisherName, draftId, assetType, extensionName) {
576
+ return __awaiter(this, void 0, void 0, function* () {
577
+ const queryValues = {
578
+ extensionName: extensionName
579
+ };
580
+ return this.beginRequest({
581
+ apiVersion: "7.2-preview.1",
582
+ httpResponseType: "application/octet-stream",
583
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",
584
+ routeValues: {
585
+ publisherName: publisherName,
586
+ draftId: draftId,
587
+ assetType: assetType
588
+ },
589
+ queryParams: queryValues
590
+ });
591
+ });
592
+ }
593
+ /**
594
+ * @param publisherName -
595
+ * @param draftId -
596
+ * @param assetType -
597
+ */
598
+ getAssetFromNewExtensionDraft(publisherName, draftId, assetType) {
599
+ return __awaiter(this, void 0, void 0, function* () {
600
+ return this.beginRequest({
601
+ apiVersion: "7.2-preview.1",
602
+ httpResponseType: "application/octet-stream",
603
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/drafts/{draftId}/assets/{*assetType}",
604
+ routeValues: {
605
+ publisherName: publisherName,
606
+ draftId: draftId,
607
+ assetType: assetType
608
+ }
609
+ });
610
+ });
611
+ }
612
+ /**
613
+ * Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence.
614
+ *
615
+ * @param publisherName - Name of the publisher
616
+ * @param extensionName - Name of the extension
617
+ * @param count - Count of events to fetch, applies to each event type.
618
+ * @param afterDate - Fetch events that occurred on or after this date
619
+ * @param include - Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events
620
+ * @param includeProperty - Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events
621
+ */
622
+ getExtensionEvents(publisherName, extensionName, count, afterDate, include, includeProperty) {
623
+ return __awaiter(this, void 0, void 0, function* () {
624
+ const queryValues = {
625
+ count: count,
626
+ afterDate: afterDate,
627
+ include: include,
628
+ includeProperty: includeProperty
629
+ };
630
+ return this.beginRequest({
631
+ apiVersion: "7.2-preview.1",
632
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/events",
633
+ routeValues: {
634
+ publisherName: publisherName,
635
+ extensionName: extensionName
636
+ },
637
+ queryParams: queryValues
638
+ });
639
+ });
640
+ }
641
+ /**
642
+ * API endpoint to publish extension install/uninstall events. This is meant to be invoked by EMS only for sending us data related to install/uninstall of an extension.
643
+ *
644
+ * @param extensionEvents -
645
+ */
646
+ publishExtensionEvents(extensionEvents) {
647
+ return __awaiter(this, void 0, void 0, function* () {
648
+ return this.beginRequest({
649
+ apiVersion: "7.2-preview.1",
650
+ method: "POST",
651
+ routeTemplate: "_apis/gallery/events",
652
+ body: extensionEvents
653
+ });
654
+ });
655
+ }
656
+ /**
657
+ * @param extensionQuery -
658
+ * @param accountToken -
659
+ * @param accountTokenHeader - Header to pass the account token
660
+ */
661
+ queryExtensions(extensionQuery, accountToken, accountTokenHeader) {
662
+ return __awaiter(this, void 0, void 0, function* () {
663
+ const queryValues = {
664
+ accountToken: accountToken
665
+ };
666
+ return this.beginRequest({
667
+ apiVersion: "7.2-preview.1",
668
+ method: "POST",
669
+ routeTemplate: "_apis/public/gallery/extensionquery",
670
+ customHeaders: {
671
+ "X-Market-AccountToken": accountTokenHeader,
672
+ },
673
+ queryParams: queryValues,
674
+ body: extensionQuery
675
+ });
676
+ });
677
+ }
678
+ /**
679
+ * @param content - Content to upload
680
+ * @param extensionType -
681
+ * @param reCaptchaToken -
682
+ */
683
+ createExtension(content, extensionType, reCaptchaToken) {
684
+ return __awaiter(this, void 0, void 0, function* () {
685
+ const queryValues = {
686
+ extensionType: extensionType,
687
+ reCaptchaToken: reCaptchaToken
688
+ };
689
+ return this.beginRequest({
690
+ apiVersion: "7.2-preview.2",
691
+ method: "POST",
692
+ routeTemplate: "_apis/gallery/extensions/{extensionId}",
693
+ customHeaders: {
694
+ "Content-Type": "application/octet-stream",
695
+ },
696
+ queryParams: queryValues,
697
+ body: content,
698
+ isRawData: true
699
+ });
700
+ });
701
+ }
702
+ /**
703
+ * @param extensionId -
704
+ * @param version -
705
+ */
706
+ deleteExtensionById(extensionId, version) {
707
+ return __awaiter(this, void 0, void 0, function* () {
708
+ const queryValues = {
709
+ version: version
710
+ };
711
+ return this.beginRequest({
712
+ apiVersion: "7.2-preview.2",
713
+ method: "DELETE",
714
+ routeTemplate: "_apis/gallery/extensions/{extensionId}",
715
+ routeValues: {
716
+ extensionId: extensionId
717
+ },
718
+ queryParams: queryValues
719
+ });
720
+ });
721
+ }
722
+ /**
723
+ * @param extensionId -
724
+ * @param version -
725
+ * @param flags -
726
+ */
727
+ getExtensionById(extensionId, version, flags) {
728
+ return __awaiter(this, void 0, void 0, function* () {
729
+ const queryValues = {
730
+ version: version,
731
+ flags: flags
732
+ };
733
+ return this.beginRequest({
734
+ apiVersion: "7.2-preview.2",
735
+ routeTemplate: "_apis/gallery/extensions/{extensionId}",
736
+ routeValues: {
737
+ extensionId: extensionId
738
+ },
739
+ queryParams: queryValues
740
+ });
741
+ });
742
+ }
743
+ /**
744
+ * @param extensionId -
745
+ * @param reCaptchaToken -
746
+ */
747
+ updateExtensionById(extensionId, reCaptchaToken) {
748
+ return __awaiter(this, void 0, void 0, function* () {
749
+ const queryValues = {
750
+ reCaptchaToken: reCaptchaToken
751
+ };
752
+ return this.beginRequest({
753
+ apiVersion: "7.2-preview.2",
754
+ method: "PUT",
755
+ routeTemplate: "_apis/gallery/extensions/{extensionId}",
756
+ routeValues: {
757
+ extensionId: extensionId
758
+ },
759
+ queryParams: queryValues
760
+ });
761
+ });
762
+ }
763
+ /**
764
+ * @param content - Content to upload
765
+ * @param publisherName -
766
+ * @param extensionType -
767
+ * @param reCaptchaToken -
768
+ */
769
+ createExtensionWithPublisher(content, publisherName, extensionType, reCaptchaToken) {
770
+ return __awaiter(this, void 0, void 0, function* () {
771
+ const queryValues = {
772
+ extensionType: extensionType,
773
+ reCaptchaToken: reCaptchaToken
774
+ };
775
+ return this.beginRequest({
776
+ apiVersion: "7.2-preview.2",
777
+ method: "POST",
778
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
779
+ routeValues: {
780
+ publisherName: publisherName
781
+ },
782
+ customHeaders: {
783
+ "Content-Type": "application/octet-stream",
784
+ },
785
+ queryParams: queryValues,
786
+ body: content,
787
+ isRawData: true
788
+ });
789
+ });
790
+ }
791
+ /**
792
+ * @param publisherName -
793
+ * @param extensionName -
794
+ * @param version -
795
+ */
796
+ deleteExtension(publisherName, extensionName, version) {
797
+ return __awaiter(this, void 0, void 0, function* () {
798
+ const queryValues = {
799
+ version: version
800
+ };
801
+ return this.beginRequest({
802
+ apiVersion: "7.2-preview.2",
803
+ method: "DELETE",
804
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
805
+ routeValues: {
806
+ publisherName: publisherName,
807
+ extensionName: extensionName
808
+ },
809
+ queryParams: queryValues
810
+ });
811
+ });
812
+ }
813
+ /**
814
+ * @param publisherName -
815
+ * @param extensionName -
816
+ * @param version -
817
+ * @param flags -
818
+ * @param accountToken -
819
+ * @param accountTokenHeader - Header to pass the account token
820
+ */
821
+ getExtension(publisherName, extensionName, version, flags, accountToken, accountTokenHeader) {
822
+ return __awaiter(this, void 0, void 0, function* () {
823
+ const queryValues = {
824
+ version: version,
825
+ flags: flags,
826
+ accountToken: accountToken
827
+ };
828
+ return this.beginRequest({
829
+ apiVersion: "7.2-preview.2",
830
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
831
+ routeValues: {
832
+ publisherName: publisherName,
833
+ extensionName: extensionName
834
+ },
835
+ customHeaders: {
836
+ "X-Market-AccountToken": accountTokenHeader,
837
+ },
838
+ queryParams: queryValues
839
+ });
840
+ });
841
+ }
842
+ /**
843
+ * REST endpoint to update an extension.
844
+ *
845
+ * @param content - Content to upload
846
+ * @param publisherName - Name of the publisher
847
+ * @param extensionName - Name of the extension
848
+ * @param extensionType -
849
+ * @param reCaptchaToken -
850
+ * @param bypassScopeCheck - This parameter decides if the scope change check needs to be invoked or not
851
+ */
852
+ updateExtension(content, publisherName, extensionName, extensionType, reCaptchaToken, bypassScopeCheck) {
853
+ return __awaiter(this, void 0, void 0, function* () {
854
+ const queryValues = {
855
+ extensionType: extensionType,
856
+ reCaptchaToken: reCaptchaToken,
857
+ bypassScopeCheck: bypassScopeCheck
858
+ };
859
+ return this.beginRequest({
860
+ apiVersion: "7.2-preview.2",
861
+ method: "PUT",
862
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
863
+ routeValues: {
864
+ publisherName: publisherName,
865
+ extensionName: extensionName
866
+ },
867
+ customHeaders: {
868
+ "Content-Type": "application/octet-stream",
869
+ },
870
+ queryParams: queryValues,
871
+ body: content,
872
+ isRawData: true
873
+ });
874
+ });
875
+ }
876
+ /**
877
+ * @param publisherName -
878
+ * @param extensionName -
879
+ * @param flags -
880
+ */
881
+ updateExtensionProperties(publisherName, extensionName, flags) {
882
+ return __awaiter(this, void 0, void 0, function* () {
883
+ const queryValues = {
884
+ flags: flags
885
+ };
886
+ return this.beginRequest({
887
+ apiVersion: "7.2-preview.2",
888
+ method: "PATCH",
889
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}",
890
+ routeValues: {
891
+ publisherName: publisherName,
892
+ extensionName: extensionName
893
+ },
894
+ queryParams: queryValues
895
+ });
896
+ });
897
+ }
898
+ /**
899
+ * @param publisherName -
900
+ * @param extensionName -
901
+ * @param hostType -
902
+ * @param hostName -
903
+ */
904
+ shareExtensionWithHost(publisherName, extensionName, hostType, hostName) {
905
+ return __awaiter(this, void 0, void 0, function* () {
906
+ return this.beginRequest({
907
+ apiVersion: "7.2-preview.1",
908
+ method: "POST",
909
+ routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/extensionshare/{hostType}/{hostName}",
910
+ routeValues: {
911
+ publisherName: publisherName,
912
+ extensionName: extensionName,
913
+ hostType: hostType,
914
+ hostName: hostName
915
+ }
916
+ });
917
+ });
918
+ }
919
+ /**
920
+ * @param publisherName -
921
+ * @param extensionName -
922
+ * @param hostType -
923
+ * @param hostName -
924
+ */
925
+ unshareExtensionWithHost(publisherName, extensionName, hostType, hostName) {
926
+ return __awaiter(this, void 0, void 0, function* () {
927
+ return this.beginRequest({
928
+ apiVersion: "7.2-preview.1",
929
+ method: "DELETE",
930
+ routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/extensionshare/{hostType}/{hostName}",
931
+ routeValues: {
932
+ publisherName: publisherName,
933
+ extensionName: extensionName,
934
+ hostType: hostType,
935
+ hostName: hostName
936
+ }
937
+ });
938
+ });
939
+ }
940
+ /**
941
+ * Rest end point to validate if an Azure publisher owns an extension for 3rd party commerce scenario. Azure only supports POST operations and the above signature is not typical of the REST operations. http://sharepoint/sites/AzureUX/_layouts/15/WopiFrame2.aspx?sourcedoc=\{A793D31E-6DC6-4174-8FA3-DE3F82B51642\}&file=Data%20Market%20Partner%20integration%20with%20Marketplace%20service.docx&action=default
942
+ *
943
+ * @param azureRestApiRequestModel - All the parameters are sent in the request body
944
+ */
945
+ extensionValidator(azureRestApiRequestModel) {
946
+ return __awaiter(this, void 0, void 0, function* () {
947
+ return this.beginRequest({
948
+ apiVersion: "7.2-preview.1",
949
+ method: "POST",
950
+ routeTemplate: "_apis/gallery/extensionValidator",
951
+ body: azureRestApiRequestModel
952
+ });
953
+ });
954
+ }
955
+ /**
956
+ * Send Notification
957
+ *
958
+ * @param notificationData - Denoting the data needed to send notification
959
+ */
960
+ sendNotifications(notificationData) {
961
+ return __awaiter(this, void 0, void 0, function* () {
962
+ return this.beginRequest({
963
+ apiVersion: "7.2-preview.1",
964
+ method: "POST",
965
+ routeTemplate: "_apis/gallery/notifications",
966
+ body: notificationData
967
+ });
968
+ });
969
+ }
970
+ /**
971
+ * This endpoint gets hit when you download a VSTS extension from the Web UI
972
+ *
973
+ * @param publisherName -
974
+ * @param extensionName -
975
+ * @param version -
976
+ * @param accountToken -
977
+ * @param acceptDefault -
978
+ * @param accountTokenHeader - Header to pass the account token
979
+ */
980
+ getPackage(publisherName, extensionName, version, accountToken, acceptDefault, accountTokenHeader) {
981
+ return __awaiter(this, void 0, void 0, function* () {
982
+ const queryValues = {
983
+ accountToken: accountToken,
984
+ acceptDefault: acceptDefault
985
+ };
986
+ return this.beginRequest({
987
+ apiVersion: "7.2-preview.1",
988
+ httpResponseType: "application/octet-stream",
989
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/package",
990
+ routeValues: {
991
+ publisherName: publisherName,
992
+ extensionName: extensionName,
993
+ version: version
994
+ },
995
+ customHeaders: {
996
+ "X-Market-AccountToken": accountTokenHeader,
997
+ },
998
+ queryParams: queryValues
999
+ });
1000
+ });
1001
+ }
1002
+ /**
1003
+ * @param publisherName -
1004
+ * @param extensionName -
1005
+ * @param version -
1006
+ * @param assetType -
1007
+ * @param assetToken -
1008
+ * @param accountToken -
1009
+ * @param acceptDefault -
1010
+ * @param accountTokenHeader - Header to pass the account token
1011
+ */
1012
+ getAssetWithToken(publisherName, extensionName, version, assetType, assetToken, accountToken, acceptDefault, accountTokenHeader) {
1013
+ return __awaiter(this, void 0, void 0, function* () {
1014
+ const queryValues = {
1015
+ accountToken: accountToken,
1016
+ acceptDefault: acceptDefault
1017
+ };
1018
+ return this.beginRequest({
1019
+ apiVersion: "7.2-preview.1",
1020
+ httpResponseType: "application/octet-stream",
1021
+ routeTemplate: "_apis/public/gallery/publisher/{publisherName}/extension/{extensionName}/{version}/privateasset/{assetToken}/{*assetType}",
1022
+ routeValues: {
1023
+ publisherName: publisherName,
1024
+ extensionName: extensionName,
1025
+ version: version,
1026
+ assetType: assetType,
1027
+ assetToken: assetToken
1028
+ },
1029
+ customHeaders: {
1030
+ "X-Market-AccountToken": accountTokenHeader,
1031
+ },
1032
+ queryParams: queryValues
1033
+ });
1034
+ });
1035
+ }
1036
+ /**
1037
+ * Delete publisher asset like logo
1038
+ *
1039
+ * @param publisherName - Internal name of the publisher
1040
+ * @param assetType - Type of asset. Default value is 'logo'.
1041
+ */
1042
+ deletePublisherAsset(publisherName, assetType) {
1043
+ return __awaiter(this, void 0, void 0, function* () {
1044
+ const queryValues = {
1045
+ assetType: assetType
1046
+ };
1047
+ return this.beginRequest({
1048
+ apiVersion: "7.2-preview.1",
1049
+ method: "DELETE",
1050
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/publisherasset",
1051
+ routeValues: {
1052
+ publisherName: publisherName
1053
+ },
1054
+ queryParams: queryValues
1055
+ });
1056
+ });
1057
+ }
1058
+ /**
1059
+ * Get publisher asset like logo as a stream
1060
+ *
1061
+ * @param publisherName - Internal name of the publisher
1062
+ * @param assetType - Type of asset. Default value is 'logo'.
1063
+ */
1064
+ getPublisherAsset(publisherName, assetType) {
1065
+ return __awaiter(this, void 0, void 0, function* () {
1066
+ const queryValues = {
1067
+ assetType: assetType
1068
+ };
1069
+ return this.beginRequest({
1070
+ apiVersion: "7.2-preview.1",
1071
+ httpResponseType: "application/octet-stream",
1072
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/publisherasset",
1073
+ routeValues: {
1074
+ publisherName: publisherName
1075
+ },
1076
+ queryParams: queryValues
1077
+ });
1078
+ });
1079
+ }
1080
+ /**
1081
+ * Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values.
1082
+ *
1083
+ * @param content - Content to upload
1084
+ * @param publisherName - Internal name of the publisher
1085
+ * @param assetType - Type of asset. Default value is 'logo'.
1086
+ * @param fileName - Header to pass the filename of the uploaded data
1087
+ */
1088
+ updatePublisherAsset(content, publisherName, assetType, fileName) {
1089
+ return __awaiter(this, void 0, void 0, function* () {
1090
+ const queryValues = {
1091
+ assetType: assetType
1092
+ };
1093
+ return this.beginRequest({
1094
+ apiVersion: "7.2-preview.1",
1095
+ method: "PUT",
1096
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/publisherasset",
1097
+ routeValues: {
1098
+ publisherName: publisherName
1099
+ },
1100
+ customHeaders: {
1101
+ "Content-Type": "application/octet-stream",
1102
+ "X-Market-UploadFileName": fileName,
1103
+ },
1104
+ queryParams: queryValues,
1105
+ body: content,
1106
+ isRawData: true
1107
+ });
1108
+ });
1109
+ }
1110
+ /**
1111
+ * @param publisherName -
1112
+ */
1113
+ fetchDomainToken(publisherName) {
1114
+ return __awaiter(this, void 0, void 0, function* () {
1115
+ return this.beginRequest({
1116
+ apiVersion: "7.2-preview.1",
1117
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/verify/token",
1118
+ routeValues: {
1119
+ publisherName: publisherName
1120
+ }
1121
+ });
1122
+ });
1123
+ }
1124
+ /**
1125
+ * @param publisherName -
1126
+ */
1127
+ verifyDomainToken(publisherName) {
1128
+ return __awaiter(this, void 0, void 0, function* () {
1129
+ return this.beginRequest({
1130
+ apiVersion: "7.2-preview.1",
1131
+ method: "PUT",
1132
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/verify/token",
1133
+ routeValues: {
1134
+ publisherName: publisherName
1135
+ }
1136
+ });
1137
+ });
1138
+ }
1139
+ /**
1140
+ * @param publisherQuery -
1141
+ */
1142
+ queryPublishers(publisherQuery) {
1143
+ return __awaiter(this, void 0, void 0, function* () {
1144
+ return this.beginRequest({
1145
+ apiVersion: "7.2-preview.1",
1146
+ method: "POST",
1147
+ routeTemplate: "_apis/public/gallery/publisherquery",
1148
+ body: publisherQuery
1149
+ });
1150
+ });
1151
+ }
1152
+ /**
1153
+ * @param publisher -
1154
+ */
1155
+ createPublisher(publisher) {
1156
+ return __awaiter(this, void 0, void 0, function* () {
1157
+ return this.beginRequest({
1158
+ apiVersion: "7.2-preview.1",
1159
+ method: "POST",
1160
+ routeTemplate: "_apis/gallery/publishers/{publisherName}",
1161
+ body: publisher
1162
+ });
1163
+ });
1164
+ }
1165
+ /**
1166
+ * @param publisherName -
1167
+ */
1168
+ deletePublisher(publisherName) {
1169
+ return __awaiter(this, void 0, void 0, function* () {
1170
+ return this.beginRequest({
1171
+ apiVersion: "7.2-preview.1",
1172
+ method: "DELETE",
1173
+ routeTemplate: "_apis/gallery/publishers/{publisherName}",
1174
+ routeValues: {
1175
+ publisherName: publisherName
1176
+ }
1177
+ });
1178
+ });
1179
+ }
1180
+ /**
1181
+ * @param publisherName -
1182
+ * @param flags -
1183
+ */
1184
+ getPublisher(publisherName, flags) {
1185
+ return __awaiter(this, void 0, void 0, function* () {
1186
+ const queryValues = {
1187
+ flags: flags
1188
+ };
1189
+ return this.beginRequest({
1190
+ apiVersion: "7.2-preview.1",
1191
+ routeTemplate: "_apis/gallery/publishers/{publisherName}",
1192
+ routeValues: {
1193
+ publisherName: publisherName
1194
+ },
1195
+ queryParams: queryValues
1196
+ });
1197
+ });
1198
+ }
1199
+ /**
1200
+ * @param publisher -
1201
+ * @param publisherName -
1202
+ */
1203
+ updatePublisher(publisher, publisherName) {
1204
+ return __awaiter(this, void 0, void 0, function* () {
1205
+ return this.beginRequest({
1206
+ apiVersion: "7.2-preview.1",
1207
+ method: "PUT",
1208
+ routeTemplate: "_apis/gallery/publishers/{publisherName}",
1209
+ routeValues: {
1210
+ publisherName: publisherName
1211
+ },
1212
+ body: publisher
1213
+ });
1214
+ });
1215
+ }
1216
+ /**
1217
+ * Endpoint to add/modify publisher membership. Currently Supports only addition/modification of 1 user at a time Works only for adding members of same tenant.
1218
+ *
1219
+ * @param roleAssignments - List of user identifiers(email address) and role to be added. Currently only one entry is supported.
1220
+ * @param publisherName - The name/id of publisher to which users have to be added
1221
+ * @param limitToCallerIdentityDomain - Should cross tenant addtions be allowed or not.
1222
+ */
1223
+ updatePublisherMembers(roleAssignments, publisherName, limitToCallerIdentityDomain) {
1224
+ return __awaiter(this, void 0, void 0, function* () {
1225
+ const queryValues = {
1226
+ limitToCallerIdentityDomain: limitToCallerIdentityDomain
1227
+ };
1228
+ return this.beginRequest({
1229
+ apiVersion: "7.2-preview.1",
1230
+ method: "POST",
1231
+ routeTemplate: "_apis/gallery/publishers/{publisherName}",
1232
+ routeValues: {
1233
+ publisherName: publisherName
1234
+ },
1235
+ queryParams: queryValues,
1236
+ body: roleAssignments
1237
+ });
1238
+ });
1239
+ }
1240
+ /**
1241
+ * @param content - Content to upload
1242
+ * @param publisherName -
1243
+ * @param extensionName -
1244
+ * @param extensionType -
1245
+ * @param reCaptchaToken -
1246
+ * @param bypassScopeCheck -
1247
+ */
1248
+ publishExtensionWithPublisherSignature(content, publisherName, extensionName, extensionType, reCaptchaToken, bypassScopeCheck) {
1249
+ return __awaiter(this, void 0, void 0, function* () {
1250
+ const queryValues = {
1251
+ extensionType: extensionType,
1252
+ reCaptchaToken: reCaptchaToken,
1253
+ bypassScopeCheck: bypassScopeCheck
1254
+ };
1255
+ return this.beginRequest({
1256
+ apiVersion: "7.2-preview.1",
1257
+ method: "PUT",
1258
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/publishersignedextension/{extensionName}",
1259
+ routeValues: {
1260
+ publisherName: publisherName,
1261
+ extensionName: extensionName
1262
+ },
1263
+ customHeaders: {
1264
+ "Content-Type": "multipart/related",
1265
+ },
1266
+ queryParams: queryValues,
1267
+ body: content,
1268
+ isRawData: true
1269
+ });
1270
+ });
1271
+ }
1272
+ /**
1273
+ * @param publisherName -
1274
+ */
1275
+ getPublisherWithoutToken(publisherName) {
1276
+ return __awaiter(this, void 0, void 0, function* () {
1277
+ return this.beginRequest({
1278
+ apiVersion: "7.2-preview.1",
1279
+ routeTemplate: "_apis/public/gallery/publisherWithoutToken/{publisherName}",
1280
+ routeValues: {
1281
+ publisherName: publisherName
1282
+ }
1283
+ });
1284
+ });
1285
+ }
1286
+ /**
1287
+ * Returns a list of questions with their responses associated with an extension.
1288
+ *
1289
+ * @param publisherName - Name of the publisher who published the extension.
1290
+ * @param extensionName - Name of the extension.
1291
+ * @param count - Number of questions to retrieve (defaults to 10).
1292
+ * @param page - Page number from which set of questions are to be retrieved.
1293
+ * @param afterDate - If provided, results questions are returned which were posted after this date
1294
+ */
1295
+ getQuestions(publisherName, extensionName, count, page, afterDate) {
1296
+ return __awaiter(this, void 0, void 0, function* () {
1297
+ const queryValues = {
1298
+ count: count,
1299
+ page: page,
1300
+ afterDate: afterDate
1301
+ };
1302
+ return this.beginRequest({
1303
+ apiVersion: "7.2-preview.1",
1304
+ routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/qna",
1305
+ routeValues: {
1306
+ publisherName: publisherName,
1307
+ extensionName: extensionName
1308
+ },
1309
+ queryParams: queryValues
1310
+ });
1311
+ });
1312
+ }
1313
+ /**
1314
+ * Flags a concern with an existing question for an extension.
1315
+ *
1316
+ * @param concern - User reported concern with a question for the extension.
1317
+ * @param pubName - Name of the publisher who published the extension.
1318
+ * @param extName - Name of the extension.
1319
+ * @param questionId - Identifier of the question to be updated for the extension.
1320
+ */
1321
+ reportQuestion(concern, pubName, extName, questionId) {
1322
+ return __awaiter(this, void 0, void 0, function* () {
1323
+ return this.beginRequest({
1324
+ apiVersion: "7.2-preview.1",
1325
+ method: "POST",
1326
+ routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/qna/{questionId}/concern",
1327
+ routeValues: {
1328
+ pubName: pubName,
1329
+ extName: extName,
1330
+ questionId: questionId
1331
+ },
1332
+ body: concern
1333
+ });
1334
+ });
1335
+ }
1336
+ /**
1337
+ * Creates a new question for an extension.
1338
+ *
1339
+ * @param question - Question to be created for the extension.
1340
+ * @param publisherName - Name of the publisher who published the extension.
1341
+ * @param extensionName - Name of the extension.
1342
+ */
1343
+ createQuestion(question, publisherName, extensionName) {
1344
+ return __awaiter(this, void 0, void 0, function* () {
1345
+ return this.beginRequest({
1346
+ apiVersion: "7.2-preview.1",
1347
+ method: "POST",
1348
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",
1349
+ routeValues: {
1350
+ publisherName: publisherName,
1351
+ extensionName: extensionName
1352
+ },
1353
+ body: question
1354
+ });
1355
+ });
1356
+ }
1357
+ /**
1358
+ * Deletes an existing question and all its associated responses for an extension. (soft delete)
1359
+ *
1360
+ * @param publisherName - Name of the publisher who published the extension.
1361
+ * @param extensionName - Name of the extension.
1362
+ * @param questionId - Identifier of the question to be deleted for the extension.
1363
+ */
1364
+ deleteQuestion(publisherName, extensionName, questionId) {
1365
+ return __awaiter(this, void 0, void 0, function* () {
1366
+ return this.beginRequest({
1367
+ apiVersion: "7.2-preview.1",
1368
+ method: "DELETE",
1369
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",
1370
+ routeValues: {
1371
+ publisherName: publisherName,
1372
+ extensionName: extensionName,
1373
+ questionId: questionId
1374
+ }
1375
+ });
1376
+ });
1377
+ }
1378
+ /**
1379
+ * Updates an existing question for an extension.
1380
+ *
1381
+ * @param question - Updated question to be set for the extension.
1382
+ * @param publisherName - Name of the publisher who published the extension.
1383
+ * @param extensionName - Name of the extension.
1384
+ * @param questionId - Identifier of the question to be updated for the extension.
1385
+ */
1386
+ updateQuestion(question, publisherName, extensionName, questionId) {
1387
+ return __awaiter(this, void 0, void 0, function* () {
1388
+ return this.beginRequest({
1389
+ apiVersion: "7.2-preview.1",
1390
+ method: "PATCH",
1391
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}",
1392
+ routeValues: {
1393
+ publisherName: publisherName,
1394
+ extensionName: extensionName,
1395
+ questionId: questionId
1396
+ },
1397
+ body: question
1398
+ });
1399
+ });
1400
+ }
1401
+ /**
1402
+ * Creates a new response for a given question for an extension.
1403
+ *
1404
+ * @param response - Response to be created for the extension.
1405
+ * @param publisherName - Name of the publisher who published the extension.
1406
+ * @param extensionName - Name of the extension.
1407
+ * @param questionId - Identifier of the question for which response is to be created for the extension.
1408
+ */
1409
+ createResponse(response, publisherName, extensionName, questionId) {
1410
+ return __awaiter(this, void 0, void 0, function* () {
1411
+ return this.beginRequest({
1412
+ apiVersion: "7.2-preview.1",
1413
+ method: "POST",
1414
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",
1415
+ routeValues: {
1416
+ publisherName: publisherName,
1417
+ extensionName: extensionName,
1418
+ questionId: questionId
1419
+ },
1420
+ body: response
1421
+ });
1422
+ });
1423
+ }
1424
+ /**
1425
+ * Deletes a response for an extension. (soft delete)
1426
+ *
1427
+ * @param publisherName - Name of the publisher who published the extension.
1428
+ * @param extensionName - Name of the extension.
1429
+ * @param questionId - Identifies the question whose response is to be deleted.
1430
+ * @param responseId - Identifies the response to be deleted.
1431
+ */
1432
+ deleteResponse(publisherName, extensionName, questionId, responseId) {
1433
+ return __awaiter(this, void 0, void 0, function* () {
1434
+ return this.beginRequest({
1435
+ apiVersion: "7.2-preview.1",
1436
+ method: "DELETE",
1437
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",
1438
+ routeValues: {
1439
+ publisherName: publisherName,
1440
+ extensionName: extensionName,
1441
+ questionId: questionId,
1442
+ responseId: responseId
1443
+ }
1444
+ });
1445
+ });
1446
+ }
1447
+ /**
1448
+ * Updates an existing response for a given question for an extension.
1449
+ *
1450
+ * @param response - Updated response to be set for the extension.
1451
+ * @param publisherName - Name of the publisher who published the extension.
1452
+ * @param extensionName - Name of the extension.
1453
+ * @param questionId - Identifier of the question for which response is to be updated for the extension.
1454
+ * @param responseId - Identifier of the response which has to be updated.
1455
+ */
1456
+ updateResponse(response, publisherName, extensionName, questionId, responseId) {
1457
+ return __awaiter(this, void 0, void 0, function* () {
1458
+ return this.beginRequest({
1459
+ apiVersion: "7.2-preview.1",
1460
+ method: "PATCH",
1461
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/qna/{questionId}/responses/{responseId}",
1462
+ routeValues: {
1463
+ publisherName: publisherName,
1464
+ extensionName: extensionName,
1465
+ questionId: questionId,
1466
+ responseId: responseId
1467
+ },
1468
+ body: response
1469
+ });
1470
+ });
1471
+ }
1472
+ /**
1473
+ * Returns extension reports
1474
+ *
1475
+ * @param publisherName - Name of the publisher who published the extension
1476
+ * @param extensionName - Name of the extension
1477
+ * @param days - Last n days report. If afterDate and days are specified, days will take priority
1478
+ * @param count - Number of events to be returned
1479
+ * @param afterDate - Use if you want to fetch events newer than the specified date
1480
+ */
1481
+ getExtensionReports(publisherName, extensionName, days, count, afterDate) {
1482
+ return __awaiter(this, void 0, void 0, function* () {
1483
+ const queryValues = {
1484
+ days: days,
1485
+ count: count,
1486
+ afterDate: afterDate
1487
+ };
1488
+ return this.beginRequest({
1489
+ apiVersion: "7.2-preview.1",
1490
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/reports",
1491
+ routeValues: {
1492
+ publisherName: publisherName,
1493
+ extensionName: extensionName
1494
+ },
1495
+ queryParams: queryValues
1496
+ });
1497
+ });
1498
+ }
1499
+ /**
1500
+ * Returns a list of reviews associated with an extension
1501
+ *
1502
+ * @param publisherName - Name of the publisher who published the extension
1503
+ * @param extensionName - Name of the extension
1504
+ * @param count - Number of reviews to retrieve (defaults to 5)
1505
+ * @param filterOptions - FilterOptions to filter out empty reviews etcetera, defaults to none
1506
+ * @param beforeDate - Use if you want to fetch reviews older than the specified date, defaults to null
1507
+ * @param afterDate - Use if you want to fetch reviews newer than the specified date, defaults to null
1508
+ */
1509
+ getReviews(publisherName, extensionName, count, filterOptions, beforeDate, afterDate) {
1510
+ return __awaiter(this, void 0, void 0, function* () {
1511
+ const queryValues = {
1512
+ count: count,
1513
+ filterOptions: filterOptions,
1514
+ beforeDate: beforeDate,
1515
+ afterDate: afterDate
1516
+ };
1517
+ return this.beginRequest({
1518
+ apiVersion: "7.2-preview.1",
1519
+ routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/reviews",
1520
+ routeValues: {
1521
+ publisherName: publisherName,
1522
+ extensionName: extensionName
1523
+ },
1524
+ queryParams: queryValues
1525
+ });
1526
+ });
1527
+ }
1528
+ /**
1529
+ * Returns a summary of the reviews
1530
+ *
1531
+ * @param pubName - Name of the publisher who published the extension
1532
+ * @param extName - Name of the extension
1533
+ * @param beforeDate - Use if you want to fetch summary of reviews older than the specified date, defaults to null
1534
+ * @param afterDate - Use if you want to fetch summary of reviews newer than the specified date, defaults to null
1535
+ */
1536
+ getReviewsSummary(pubName, extName, beforeDate, afterDate) {
1537
+ return __awaiter(this, void 0, void 0, function* () {
1538
+ const queryValues = {
1539
+ beforeDate: beforeDate,
1540
+ afterDate: afterDate
1541
+ };
1542
+ return this.beginRequest({
1543
+ apiVersion: "7.2-preview.1",
1544
+ routeTemplate: "_apis/public/gallery/publishers/{pubName}/extensions/{extName}/reviews/summary",
1545
+ routeValues: {
1546
+ pubName: pubName,
1547
+ extName: extName
1548
+ },
1549
+ queryParams: queryValues
1550
+ });
1551
+ });
1552
+ }
1553
+ /**
1554
+ * Creates a new review for an extension
1555
+ *
1556
+ * @param review - Review to be created for the extension
1557
+ * @param pubName - Name of the publisher who published the extension
1558
+ * @param extName - Name of the extension
1559
+ */
1560
+ createReview(review, pubName, extName) {
1561
+ return __awaiter(this, void 0, void 0, function* () {
1562
+ return this.beginRequest({
1563
+ apiVersion: "7.2-preview.1",
1564
+ method: "POST",
1565
+ routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",
1566
+ routeValues: {
1567
+ pubName: pubName,
1568
+ extName: extName
1569
+ },
1570
+ body: review
1571
+ });
1572
+ });
1573
+ }
1574
+ /**
1575
+ * Deletes a review
1576
+ *
1577
+ * @param pubName - Name of the publisher who published the extension
1578
+ * @param extName - Name of the extension
1579
+ * @param reviewId - Id of the review which needs to be updated
1580
+ */
1581
+ deleteReview(pubName, extName, reviewId) {
1582
+ return __awaiter(this, void 0, void 0, function* () {
1583
+ return this.beginRequest({
1584
+ apiVersion: "7.2-preview.1",
1585
+ method: "DELETE",
1586
+ routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",
1587
+ routeValues: {
1588
+ pubName: pubName,
1589
+ extName: extName,
1590
+ reviewId: reviewId
1591
+ }
1592
+ });
1593
+ });
1594
+ }
1595
+ /**
1596
+ * Updates or Flags a review
1597
+ *
1598
+ * @param reviewPatch - ReviewPatch object which contains the changes to be applied to the review
1599
+ * @param pubName - Name of the publisher who published the extension
1600
+ * @param extName - Name of the extension
1601
+ * @param reviewId - Id of the review which needs to be updated
1602
+ */
1603
+ updateReview(reviewPatch, pubName, extName, reviewId) {
1604
+ return __awaiter(this, void 0, void 0, function* () {
1605
+ return this.beginRequest({
1606
+ apiVersion: "7.2-preview.1",
1607
+ method: "PATCH",
1608
+ routeTemplate: "_apis/gallery/publishers/{pubName}/extensions/{extName}/reviews/{reviewId}",
1609
+ routeValues: {
1610
+ pubName: pubName,
1611
+ extName: extName,
1612
+ reviewId: reviewId
1613
+ },
1614
+ body: reviewPatch
1615
+ });
1616
+ });
1617
+ }
1618
+ /**
1619
+ * @param category -
1620
+ */
1621
+ createCategory(category) {
1622
+ return __awaiter(this, void 0, void 0, function* () {
1623
+ return this.beginRequest({
1624
+ apiVersion: "7.2-preview.1",
1625
+ method: "POST",
1626
+ routeTemplate: "_apis/gallery/categories",
1627
+ body: category
1628
+ });
1629
+ });
1630
+ }
1631
+ /**
1632
+ * Get all setting entries for the given user/all-users scope
1633
+ *
1634
+ * @param userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
1635
+ * @param key - Optional key under which to filter all the entries
1636
+ */
1637
+ getGalleryUserSettings(userScope, key) {
1638
+ return __awaiter(this, void 0, void 0, function* () {
1639
+ return this.beginRequest({
1640
+ apiVersion: "7.2-preview.1",
1641
+ routeTemplate: "_apis/gallery/settings/{userScope}/{*key}",
1642
+ routeValues: {
1643
+ userScope: userScope,
1644
+ key: key
1645
+ }
1646
+ });
1647
+ });
1648
+ }
1649
+ /**
1650
+ * Set all setting entries for the given user/all-users scope
1651
+ *
1652
+ * @param entries - A key-value pair of all settings that need to be set
1653
+ * @param userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.
1654
+ */
1655
+ setGalleryUserSettings(entries, userScope) {
1656
+ return __awaiter(this, void 0, void 0, function* () {
1657
+ return this.beginRequest({
1658
+ apiVersion: "7.2-preview.1",
1659
+ method: "PATCH",
1660
+ routeTemplate: "_apis/gallery/settings/{userScope}/{*key}",
1661
+ routeValues: {
1662
+ userScope: userScope
1663
+ },
1664
+ body: entries
1665
+ });
1666
+ });
1667
+ }
1668
+ /**
1669
+ * @param keyType -
1670
+ * @param expireCurrentSeconds -
1671
+ */
1672
+ generateKey(keyType, expireCurrentSeconds) {
1673
+ return __awaiter(this, void 0, void 0, function* () {
1674
+ const queryValues = {
1675
+ expireCurrentSeconds: expireCurrentSeconds
1676
+ };
1677
+ return this.beginRequest({
1678
+ apiVersion: "7.2-preview.1",
1679
+ method: "POST",
1680
+ routeTemplate: "_apis/gallery/signingkey/{keyType}",
1681
+ routeValues: {
1682
+ keyType: keyType
1683
+ },
1684
+ queryParams: queryValues
1685
+ });
1686
+ });
1687
+ }
1688
+ /**
1689
+ * @param keyType -
1690
+ */
1691
+ getSigningKey(keyType) {
1692
+ return __awaiter(this, void 0, void 0, function* () {
1693
+ return this.beginRequest({
1694
+ apiVersion: "7.2-preview.1",
1695
+ routeTemplate: "_apis/gallery/signingkey/{keyType}",
1696
+ routeValues: {
1697
+ keyType: keyType
1698
+ }
1699
+ });
1700
+ });
1701
+ }
1702
+ /**
1703
+ * @param extensionStatisticsUpdate -
1704
+ * @param publisherName -
1705
+ * @param extensionName -
1706
+ */
1707
+ updateExtensionStatistics(extensionStatisticsUpdate, publisherName, extensionName) {
1708
+ return __awaiter(this, void 0, void 0, function* () {
1709
+ return this.beginRequest({
1710
+ apiVersion: "7.2-preview.1",
1711
+ method: "PATCH",
1712
+ routeTemplate: "_apis/gallery/publisher/{publisherName}/extension/{extensionName}/statistics",
1713
+ routeValues: {
1714
+ publisherName: publisherName,
1715
+ extensionName: extensionName
1716
+ },
1717
+ body: extensionStatisticsUpdate
1718
+ });
1719
+ });
1720
+ }
1721
+ /**
1722
+ * @param publisherName -
1723
+ * @param extensionName -
1724
+ * @param days -
1725
+ * @param aggregate -
1726
+ * @param afterDate -
1727
+ */
1728
+ getExtensionDailyStats(publisherName, extensionName, days, aggregate, afterDate) {
1729
+ return __awaiter(this, void 0, void 0, function* () {
1730
+ const queryValues = {
1731
+ days: days,
1732
+ aggregate: aggregate,
1733
+ afterDate: afterDate
1734
+ };
1735
+ return this.beginRequest({
1736
+ apiVersion: "7.2-preview.1",
1737
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/stats",
1738
+ routeValues: {
1739
+ publisherName: publisherName,
1740
+ extensionName: extensionName
1741
+ },
1742
+ queryParams: queryValues
1743
+ });
1744
+ });
1745
+ }
1746
+ /**
1747
+ * This route/location id only supports HTTP POST anonymously, so that the page view daily stat can be incremented from Marketplace client. Trying to call GET on this route should result in an exception. Without this explicit implementation, calling GET on this public route invokes the above GET implementation GetExtensionDailyStats.
1748
+ *
1749
+ * @param publisherName - Name of the publisher
1750
+ * @param extensionName - Name of the extension
1751
+ * @param version - Version of the extension
1752
+ */
1753
+ getExtensionDailyStatsAnonymous(publisherName, extensionName, version) {
1754
+ return __awaiter(this, void 0, void 0, function* () {
1755
+ return this.beginRequest({
1756
+ apiVersion: "7.2-preview.1",
1757
+ routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/stats",
1758
+ routeValues: {
1759
+ publisherName: publisherName,
1760
+ extensionName: extensionName,
1761
+ version: version
1762
+ }
1763
+ });
1764
+ });
1765
+ }
1766
+ /**
1767
+ * Increments a daily statistic associated with the extension
1768
+ *
1769
+ * @param publisherName - Name of the publisher
1770
+ * @param extensionName - Name of the extension
1771
+ * @param version - Version of the extension
1772
+ * @param statType - Type of stat to increment
1773
+ * @param targetPlatform -
1774
+ */
1775
+ incrementExtensionDailyStat(publisherName, extensionName, version, statType, targetPlatform) {
1776
+ return __awaiter(this, void 0, void 0, function* () {
1777
+ const queryValues = {
1778
+ statType: statType,
1779
+ targetPlatform: targetPlatform
1780
+ };
1781
+ return this.beginRequest({
1782
+ apiVersion: "7.2-preview.1",
1783
+ method: "POST",
1784
+ routeTemplate: "_apis/public/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/stats",
1785
+ routeValues: {
1786
+ publisherName: publisherName,
1787
+ extensionName: extensionName,
1788
+ version: version
1789
+ },
1790
+ queryParams: queryValues
1791
+ });
1792
+ });
1793
+ }
1794
+ /**
1795
+ * @param publisherName -
1796
+ * @param extensionName -
1797
+ * @param version -
1798
+ * @param targetPlatform -
1799
+ */
1800
+ getVerificationLog(publisherName, extensionName, version, targetPlatform) {
1801
+ return __awaiter(this, void 0, void 0, function* () {
1802
+ const queryValues = {
1803
+ targetPlatform: targetPlatform
1804
+ };
1805
+ return this.beginRequest({
1806
+ apiVersion: "7.2-preview.1",
1807
+ httpResponseType: "application/octet-stream",
1808
+ routeTemplate: "_apis/gallery/publishers/{publisherName}/extensions/{extensionName}/{version}/verificationlog",
1809
+ routeValues: {
1810
+ publisherName: publisherName,
1811
+ extensionName: extensionName,
1812
+ version: version
1813
+ },
1814
+ queryParams: queryValues
1815
+ });
1816
+ });
1817
+ }
1818
+ /**
1819
+ * Endpoint to get the latest version(s) of a VS Code extension.
1820
+ *
1821
+ * @param publisherName - The name of the publisher of the requested VS Code extension.
1822
+ * @param extensionName - The extension name.
1823
+ */
1824
+ getVSCodeExtensionLatestVersion(publisherName, extensionName) {
1825
+ return __awaiter(this, void 0, void 0, function* () {
1826
+ return this.beginRequest({
1827
+ apiVersion: "7.2-preview.1",
1828
+ routeTemplate: "_apis/public/gallery/vscode/{publisherName}/{extensionName}/latest",
1829
+ routeValues: {
1830
+ publisherName: publisherName,
1831
+ extensionName: extensionName
1832
+ }
1833
+ });
1834
+ });
1835
+ }
1836
+ /**
1837
+ * @param itemName -
1838
+ * @param version -
1839
+ * @param statType -
1840
+ */
1841
+ updateVSCodeWebExtensionStatistics(itemName, version, statType) {
1842
+ return __awaiter(this, void 0, void 0, function* () {
1843
+ return this.beginRequest({
1844
+ apiVersion: "7.2-preview.1",
1845
+ method: "POST",
1846
+ routeTemplate: "_apis/public/gallery/itemName/{itemName}/version/{version}/statType/{statType}/vscodewebextension",
1847
+ routeValues: {
1848
+ itemName: itemName,
1849
+ version: version,
1850
+ statType: statType
1851
+ }
1852
+ });
1853
+ });
1854
+ }
1855
+ /**
1856
+ * Query a single VS extension by its VSIX ID, with optional filtering by architecture, version range, and SKU.
1857
+ *
1858
+ * @param vsixId - The VSIX ID of the extension to query.
1859
+ * @param arch - Architecture filter (e.g., "amd64", "arm64", "x86").
1860
+ * @param versionRange - Installation target version range formatted as "\{min\}-\{max\}". Either bound may be omitted (e.g., "17.0-" or "-18.4").
1861
+ * @param sku - VS SKU filter (e.g., "VisualStudio"). Defaults to broad match.
1862
+ * @param flags - Bitwise response flags controlling the shape of the response data.
1863
+ */
1864
+ queryExtensionByVsixId(vsixId, arch, versionRange, sku, flags) {
1865
+ return __awaiter(this, void 0, void 0, function* () {
1866
+ const queryValues = {
1867
+ arch: arch,
1868
+ versionRange: versionRange,
1869
+ sku: sku,
1870
+ flags: flags
1871
+ };
1872
+ return this.beginRequest({
1873
+ apiVersion: "7.2-preview.1",
1874
+ routeTemplate: "_apis/public/gallery/vs/extensions/vsixId/{vsixId}",
1875
+ routeValues: {
1876
+ vsixId: vsixId
1877
+ },
1878
+ queryParams: queryValues
1879
+ });
1880
+ });
1881
+ }
1882
+ }
1883
+ exports.GalleryRestClient = GalleryRestClient;
1884
+ GalleryRestClient.RESOURCE_AREA_ID = "69d21c00-f135-441b-b5ce-3626378e0819";