@azure/arm-impactreporting 1.0.0-beta.1

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 (363) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +115 -0
  4. package/dist/browser/api/connectors/index.d.ts +26 -0
  5. package/dist/browser/api/connectors/index.d.ts.map +1 -0
  6. package/dist/browser/api/connectors/index.js +110 -0
  7. package/dist/browser/api/connectors/index.js.map +1 -0
  8. package/dist/browser/api/impactCategories/index.d.ts +13 -0
  9. package/dist/browser/api/impactCategories/index.d.ts.map +1 -0
  10. package/dist/browser/api/impactCategories/index.js +53 -0
  11. package/dist/browser/api/impactCategories/index.js.map +1 -0
  12. package/dist/browser/api/impactContext.d.ts +17 -0
  13. package/dist/browser/api/impactContext.d.ts.map +1 -0
  14. package/dist/browser/api/impactContext.js +34 -0
  15. package/dist/browser/api/impactContext.js.map +1 -0
  16. package/dist/browser/api/index.d.ts +8 -0
  17. package/dist/browser/api/index.d.ts.map +1 -0
  18. package/dist/browser/api/index.js +9 -0
  19. package/dist/browser/api/index.js.map +1 -0
  20. package/dist/browser/api/insights/index.d.ts +21 -0
  21. package/dist/browser/api/insights/index.d.ts.map +1 -0
  22. package/dist/browser/api/insights/index.js +85 -0
  23. package/dist/browser/api/insights/index.js.map +1 -0
  24. package/dist/browser/api/operations/index.d.ts +9 -0
  25. package/dist/browser/api/operations/index.d.ts.map +1 -0
  26. package/dist/browser/api/operations/index.js +23 -0
  27. package/dist/browser/api/operations/index.js.map +1 -0
  28. package/dist/browser/api/options.d.ts +56 -0
  29. package/dist/browser/api/options.d.ts.map +1 -0
  30. package/dist/browser/api/options.js +4 -0
  31. package/dist/browser/api/options.js.map +1 -0
  32. package/dist/browser/api/workloadImpacts/index.d.ts +22 -0
  33. package/dist/browser/api/workloadImpacts/index.d.ts.map +1 -0
  34. package/dist/browser/api/workloadImpacts/index.js +94 -0
  35. package/dist/browser/api/workloadImpacts/index.js.map +1 -0
  36. package/dist/browser/classic/connectors/index.d.ts +20 -0
  37. package/dist/browser/classic/connectors/index.d.ts.map +1 -0
  38. package/dist/browser/classic/connectors/index.js +16 -0
  39. package/dist/browser/classic/connectors/index.js.map +1 -0
  40. package/dist/browser/classic/impactCategories/index.d.ts +13 -0
  41. package/dist/browser/classic/impactCategories/index.d.ts.map +1 -0
  42. package/dist/browser/classic/impactCategories/index.js +13 -0
  43. package/dist/browser/classic/impactCategories/index.js.map +1 -0
  44. package/dist/browser/classic/index.d.ts +6 -0
  45. package/dist/browser/classic/index.d.ts.map +1 -0
  46. package/dist/browser/classic/index.js +4 -0
  47. package/dist/browser/classic/index.js.map +1 -0
  48. package/dist/browser/classic/insights/index.d.ts +17 -0
  49. package/dist/browser/classic/insights/index.d.ts.map +1 -0
  50. package/dist/browser/classic/insights/index.js +15 -0
  51. package/dist/browser/classic/insights/index.js.map +1 -0
  52. package/dist/browser/classic/operations/index.d.ts +11 -0
  53. package/dist/browser/classic/operations/index.d.ts.map +1 -0
  54. package/dist/browser/classic/operations/index.js +12 -0
  55. package/dist/browser/classic/operations/index.js.map +1 -0
  56. package/dist/browser/classic/workloadImpacts/index.d.ts +18 -0
  57. package/dist/browser/classic/workloadImpacts/index.d.ts.map +1 -0
  58. package/dist/browser/classic/workloadImpacts/index.js +15 -0
  59. package/dist/browser/classic/workloadImpacts/index.js.map +1 -0
  60. package/dist/browser/impactClient.d.ts +26 -0
  61. package/dist/browser/impactClient.d.ts.map +1 -0
  62. package/dist/browser/impactClient.js +25 -0
  63. package/dist/browser/impactClient.js.map +1 -0
  64. package/dist/browser/index.d.ts +8 -0
  65. package/dist/browser/index.d.ts.map +1 -0
  66. package/dist/browser/index.js +6 -0
  67. package/dist/browser/index.js.map +1 -0
  68. package/dist/browser/logger.d.ts +2 -0
  69. package/dist/browser/logger.d.ts.map +1 -0
  70. package/dist/browser/logger.js +5 -0
  71. package/dist/browser/logger.js.map +1 -0
  72. package/dist/browser/models/index.d.ts +2 -0
  73. package/dist/browser/models/index.d.ts.map +1 -0
  74. package/dist/browser/models/index.js +4 -0
  75. package/dist/browser/models/index.js.map +1 -0
  76. package/dist/browser/models/models.d.ts +641 -0
  77. package/dist/browser/models/models.d.ts.map +1 -0
  78. package/dist/browser/models/models.js +660 -0
  79. package/dist/browser/models/models.js.map +1 -0
  80. package/dist/browser/package.json +3 -0
  81. package/dist/browser/restorePollerHelpers.d.ts +21 -0
  82. package/dist/browser/restorePollerHelpers.d.ts.map +1 -0
  83. package/dist/browser/restorePollerHelpers.js +98 -0
  84. package/dist/browser/restorePollerHelpers.js.map +1 -0
  85. package/dist/browser/static-helpers/pagingHelpers.d.ts +72 -0
  86. package/dist/browser/static-helpers/pagingHelpers.d.ts.map +1 -0
  87. package/dist/browser/static-helpers/pagingHelpers.js +137 -0
  88. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
  89. package/dist/browser/static-helpers/pollingHelpers.d.ts +30 -0
  90. package/dist/browser/static-helpers/pollingHelpers.d.ts.map +1 -0
  91. package/dist/browser/static-helpers/pollingHelpers.js +76 -0
  92. package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
  93. package/dist/commonjs/api/connectors/index.d.ts +26 -0
  94. package/dist/commonjs/api/connectors/index.d.ts.map +1 -0
  95. package/dist/commonjs/api/connectors/index.js +127 -0
  96. package/dist/commonjs/api/connectors/index.js.map +1 -0
  97. package/dist/commonjs/api/impactCategories/index.d.ts +13 -0
  98. package/dist/commonjs/api/impactCategories/index.d.ts.map +1 -0
  99. package/dist/commonjs/api/impactCategories/index.js +61 -0
  100. package/dist/commonjs/api/impactCategories/index.js.map +1 -0
  101. package/dist/commonjs/api/impactContext.d.ts +17 -0
  102. package/dist/commonjs/api/impactContext.d.ts.map +1 -0
  103. package/dist/commonjs/api/impactContext.js +37 -0
  104. package/dist/commonjs/api/impactContext.js.map +1 -0
  105. package/dist/commonjs/api/index.d.ts +8 -0
  106. package/dist/commonjs/api/index.d.ts.map +1 -0
  107. package/dist/commonjs/api/index.js +29 -0
  108. package/dist/commonjs/api/index.js.map +1 -0
  109. package/dist/commonjs/api/insights/index.d.ts +21 -0
  110. package/dist/commonjs/api/insights/index.d.ts.map +1 -0
  111. package/dist/commonjs/api/insights/index.js +99 -0
  112. package/dist/commonjs/api/insights/index.js.map +1 -0
  113. package/dist/commonjs/api/operations/index.d.ts +9 -0
  114. package/dist/commonjs/api/operations/index.d.ts.map +1 -0
  115. package/dist/commonjs/api/operations/index.js +28 -0
  116. package/dist/commonjs/api/operations/index.js.map +1 -0
  117. package/dist/commonjs/api/options.d.ts +56 -0
  118. package/dist/commonjs/api/options.d.ts.map +1 -0
  119. package/dist/commonjs/api/options.js +5 -0
  120. package/dist/commonjs/api/options.js.map +1 -0
  121. package/dist/commonjs/api/workloadImpacts/index.d.ts +22 -0
  122. package/dist/commonjs/api/workloadImpacts/index.d.ts.map +1 -0
  123. package/dist/commonjs/api/workloadImpacts/index.js +108 -0
  124. package/dist/commonjs/api/workloadImpacts/index.js.map +1 -0
  125. package/dist/commonjs/classic/connectors/index.d.ts +20 -0
  126. package/dist/commonjs/classic/connectors/index.d.ts.map +1 -0
  127. package/dist/commonjs/classic/connectors/index.js +19 -0
  128. package/dist/commonjs/classic/connectors/index.js.map +1 -0
  129. package/dist/commonjs/classic/impactCategories/index.d.ts +13 -0
  130. package/dist/commonjs/classic/impactCategories/index.d.ts.map +1 -0
  131. package/dist/commonjs/classic/impactCategories/index.js +16 -0
  132. package/dist/commonjs/classic/impactCategories/index.js.map +1 -0
  133. package/dist/commonjs/classic/index.d.ts +6 -0
  134. package/dist/commonjs/classic/index.d.ts.map +1 -0
  135. package/dist/commonjs/classic/index.js +5 -0
  136. package/dist/commonjs/classic/index.js.map +1 -0
  137. package/dist/commonjs/classic/insights/index.d.ts +17 -0
  138. package/dist/commonjs/classic/insights/index.d.ts.map +1 -0
  139. package/dist/commonjs/classic/insights/index.js +18 -0
  140. package/dist/commonjs/classic/insights/index.js.map +1 -0
  141. package/dist/commonjs/classic/operations/index.d.ts +11 -0
  142. package/dist/commonjs/classic/operations/index.d.ts.map +1 -0
  143. package/dist/commonjs/classic/operations/index.js +15 -0
  144. package/dist/commonjs/classic/operations/index.js.map +1 -0
  145. package/dist/commonjs/classic/workloadImpacts/index.d.ts +18 -0
  146. package/dist/commonjs/classic/workloadImpacts/index.d.ts.map +1 -0
  147. package/dist/commonjs/classic/workloadImpacts/index.js +18 -0
  148. package/dist/commonjs/classic/workloadImpacts/index.js.map +1 -0
  149. package/dist/commonjs/impactClient.d.ts +26 -0
  150. package/dist/commonjs/impactClient.d.ts.map +1 -0
  151. package/dist/commonjs/impactClient.js +29 -0
  152. package/dist/commonjs/impactClient.js.map +1 -0
  153. package/dist/commonjs/index.d.ts +8 -0
  154. package/dist/commonjs/index.d.ts.map +1 -0
  155. package/dist/commonjs/index.js +22 -0
  156. package/dist/commonjs/index.js.map +1 -0
  157. package/dist/commonjs/logger.d.ts +2 -0
  158. package/dist/commonjs/logger.d.ts.map +1 -0
  159. package/dist/commonjs/logger.js +8 -0
  160. package/dist/commonjs/logger.js.map +1 -0
  161. package/dist/commonjs/models/index.d.ts +2 -0
  162. package/dist/commonjs/models/index.d.ts.map +1 -0
  163. package/dist/commonjs/models/index.js +18 -0
  164. package/dist/commonjs/models/index.js.map +1 -0
  165. package/dist/commonjs/models/models.d.ts +641 -0
  166. package/dist/commonjs/models/models.d.ts.map +1 -0
  167. package/dist/commonjs/models/models.js +731 -0
  168. package/dist/commonjs/models/models.js.map +1 -0
  169. package/dist/commonjs/package.json +3 -0
  170. package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
  171. package/dist/commonjs/restorePollerHelpers.d.ts.map +1 -0
  172. package/dist/commonjs/restorePollerHelpers.js +101 -0
  173. package/dist/commonjs/restorePollerHelpers.js.map +1 -0
  174. package/dist/commonjs/static-helpers/pagingHelpers.d.ts +72 -0
  175. package/dist/commonjs/static-helpers/pagingHelpers.d.ts.map +1 -0
  176. package/dist/commonjs/static-helpers/pagingHelpers.js +140 -0
  177. package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -0
  178. package/dist/commonjs/static-helpers/pollingHelpers.d.ts +30 -0
  179. package/dist/commonjs/static-helpers/pollingHelpers.d.ts.map +1 -0
  180. package/dist/commonjs/static-helpers/pollingHelpers.js +79 -0
  181. package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -0
  182. package/dist/commonjs/tsdoc-metadata.json +11 -0
  183. package/dist/esm/api/connectors/index.d.ts +26 -0
  184. package/dist/esm/api/connectors/index.d.ts.map +1 -0
  185. package/dist/esm/api/connectors/index.js +110 -0
  186. package/dist/esm/api/connectors/index.js.map +1 -0
  187. package/dist/esm/api/impactCategories/index.d.ts +13 -0
  188. package/dist/esm/api/impactCategories/index.d.ts.map +1 -0
  189. package/dist/esm/api/impactCategories/index.js +53 -0
  190. package/dist/esm/api/impactCategories/index.js.map +1 -0
  191. package/dist/esm/api/impactContext.d.ts +17 -0
  192. package/dist/esm/api/impactContext.d.ts.map +1 -0
  193. package/dist/esm/api/impactContext.js +34 -0
  194. package/dist/esm/api/impactContext.js.map +1 -0
  195. package/dist/esm/api/index.d.ts +8 -0
  196. package/dist/esm/api/index.d.ts.map +1 -0
  197. package/dist/esm/api/index.js +9 -0
  198. package/dist/esm/api/index.js.map +1 -0
  199. package/dist/esm/api/insights/index.d.ts +21 -0
  200. package/dist/esm/api/insights/index.d.ts.map +1 -0
  201. package/dist/esm/api/insights/index.js +85 -0
  202. package/dist/esm/api/insights/index.js.map +1 -0
  203. package/dist/esm/api/operations/index.d.ts +9 -0
  204. package/dist/esm/api/operations/index.d.ts.map +1 -0
  205. package/dist/esm/api/operations/index.js +23 -0
  206. package/dist/esm/api/operations/index.js.map +1 -0
  207. package/dist/esm/api/options.d.ts +56 -0
  208. package/dist/esm/api/options.d.ts.map +1 -0
  209. package/dist/esm/api/options.js +4 -0
  210. package/dist/esm/api/options.js.map +1 -0
  211. package/dist/esm/api/workloadImpacts/index.d.ts +22 -0
  212. package/dist/esm/api/workloadImpacts/index.d.ts.map +1 -0
  213. package/dist/esm/api/workloadImpacts/index.js +94 -0
  214. package/dist/esm/api/workloadImpacts/index.js.map +1 -0
  215. package/dist/esm/classic/connectors/index.d.ts +20 -0
  216. package/dist/esm/classic/connectors/index.d.ts.map +1 -0
  217. package/dist/esm/classic/connectors/index.js +16 -0
  218. package/dist/esm/classic/connectors/index.js.map +1 -0
  219. package/dist/esm/classic/impactCategories/index.d.ts +13 -0
  220. package/dist/esm/classic/impactCategories/index.d.ts.map +1 -0
  221. package/dist/esm/classic/impactCategories/index.js +13 -0
  222. package/dist/esm/classic/impactCategories/index.js.map +1 -0
  223. package/dist/esm/classic/index.d.ts +6 -0
  224. package/dist/esm/classic/index.d.ts.map +1 -0
  225. package/dist/esm/classic/index.js +4 -0
  226. package/dist/esm/classic/index.js.map +1 -0
  227. package/dist/esm/classic/insights/index.d.ts +17 -0
  228. package/dist/esm/classic/insights/index.d.ts.map +1 -0
  229. package/dist/esm/classic/insights/index.js +15 -0
  230. package/dist/esm/classic/insights/index.js.map +1 -0
  231. package/dist/esm/classic/operations/index.d.ts +11 -0
  232. package/dist/esm/classic/operations/index.d.ts.map +1 -0
  233. package/dist/esm/classic/operations/index.js +12 -0
  234. package/dist/esm/classic/operations/index.js.map +1 -0
  235. package/dist/esm/classic/workloadImpacts/index.d.ts +18 -0
  236. package/dist/esm/classic/workloadImpacts/index.d.ts.map +1 -0
  237. package/dist/esm/classic/workloadImpacts/index.js +15 -0
  238. package/dist/esm/classic/workloadImpacts/index.js.map +1 -0
  239. package/dist/esm/impactClient.d.ts +26 -0
  240. package/dist/esm/impactClient.d.ts.map +1 -0
  241. package/dist/esm/impactClient.js +25 -0
  242. package/dist/esm/impactClient.js.map +1 -0
  243. package/dist/esm/index.d.ts +8 -0
  244. package/dist/esm/index.d.ts.map +1 -0
  245. package/dist/esm/index.js +6 -0
  246. package/dist/esm/index.js.map +1 -0
  247. package/dist/esm/logger.d.ts +2 -0
  248. package/dist/esm/logger.d.ts.map +1 -0
  249. package/dist/esm/logger.js +5 -0
  250. package/dist/esm/logger.js.map +1 -0
  251. package/dist/esm/models/index.d.ts +2 -0
  252. package/dist/esm/models/index.d.ts.map +1 -0
  253. package/dist/esm/models/index.js +4 -0
  254. package/dist/esm/models/index.js.map +1 -0
  255. package/dist/esm/models/models.d.ts +641 -0
  256. package/dist/esm/models/models.d.ts.map +1 -0
  257. package/dist/esm/models/models.js +660 -0
  258. package/dist/esm/models/models.js.map +1 -0
  259. package/dist/esm/package.json +3 -0
  260. package/dist/esm/restorePollerHelpers.d.ts +21 -0
  261. package/dist/esm/restorePollerHelpers.d.ts.map +1 -0
  262. package/dist/esm/restorePollerHelpers.js +98 -0
  263. package/dist/esm/restorePollerHelpers.js.map +1 -0
  264. package/dist/esm/static-helpers/pagingHelpers.d.ts +72 -0
  265. package/dist/esm/static-helpers/pagingHelpers.d.ts.map +1 -0
  266. package/dist/esm/static-helpers/pagingHelpers.js +137 -0
  267. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
  268. package/dist/esm/static-helpers/pollingHelpers.d.ts +30 -0
  269. package/dist/esm/static-helpers/pollingHelpers.d.ts.map +1 -0
  270. package/dist/esm/static-helpers/pollingHelpers.js +76 -0
  271. package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
  272. package/dist/react-native/api/connectors/index.d.ts +26 -0
  273. package/dist/react-native/api/connectors/index.d.ts.map +1 -0
  274. package/dist/react-native/api/connectors/index.js +110 -0
  275. package/dist/react-native/api/connectors/index.js.map +1 -0
  276. package/dist/react-native/api/impactCategories/index.d.ts +13 -0
  277. package/dist/react-native/api/impactCategories/index.d.ts.map +1 -0
  278. package/dist/react-native/api/impactCategories/index.js +53 -0
  279. package/dist/react-native/api/impactCategories/index.js.map +1 -0
  280. package/dist/react-native/api/impactContext.d.ts +17 -0
  281. package/dist/react-native/api/impactContext.d.ts.map +1 -0
  282. package/dist/react-native/api/impactContext.js +34 -0
  283. package/dist/react-native/api/impactContext.js.map +1 -0
  284. package/dist/react-native/api/index.d.ts +8 -0
  285. package/dist/react-native/api/index.d.ts.map +1 -0
  286. package/dist/react-native/api/index.js +9 -0
  287. package/dist/react-native/api/index.js.map +1 -0
  288. package/dist/react-native/api/insights/index.d.ts +21 -0
  289. package/dist/react-native/api/insights/index.d.ts.map +1 -0
  290. package/dist/react-native/api/insights/index.js +85 -0
  291. package/dist/react-native/api/insights/index.js.map +1 -0
  292. package/dist/react-native/api/operations/index.d.ts +9 -0
  293. package/dist/react-native/api/operations/index.d.ts.map +1 -0
  294. package/dist/react-native/api/operations/index.js +23 -0
  295. package/dist/react-native/api/operations/index.js.map +1 -0
  296. package/dist/react-native/api/options.d.ts +56 -0
  297. package/dist/react-native/api/options.d.ts.map +1 -0
  298. package/dist/react-native/api/options.js +4 -0
  299. package/dist/react-native/api/options.js.map +1 -0
  300. package/dist/react-native/api/workloadImpacts/index.d.ts +22 -0
  301. package/dist/react-native/api/workloadImpacts/index.d.ts.map +1 -0
  302. package/dist/react-native/api/workloadImpacts/index.js +94 -0
  303. package/dist/react-native/api/workloadImpacts/index.js.map +1 -0
  304. package/dist/react-native/classic/connectors/index.d.ts +20 -0
  305. package/dist/react-native/classic/connectors/index.d.ts.map +1 -0
  306. package/dist/react-native/classic/connectors/index.js +16 -0
  307. package/dist/react-native/classic/connectors/index.js.map +1 -0
  308. package/dist/react-native/classic/impactCategories/index.d.ts +13 -0
  309. package/dist/react-native/classic/impactCategories/index.d.ts.map +1 -0
  310. package/dist/react-native/classic/impactCategories/index.js +13 -0
  311. package/dist/react-native/classic/impactCategories/index.js.map +1 -0
  312. package/dist/react-native/classic/index.d.ts +6 -0
  313. package/dist/react-native/classic/index.d.ts.map +1 -0
  314. package/dist/react-native/classic/index.js +4 -0
  315. package/dist/react-native/classic/index.js.map +1 -0
  316. package/dist/react-native/classic/insights/index.d.ts +17 -0
  317. package/dist/react-native/classic/insights/index.d.ts.map +1 -0
  318. package/dist/react-native/classic/insights/index.js +15 -0
  319. package/dist/react-native/classic/insights/index.js.map +1 -0
  320. package/dist/react-native/classic/operations/index.d.ts +11 -0
  321. package/dist/react-native/classic/operations/index.d.ts.map +1 -0
  322. package/dist/react-native/classic/operations/index.js +12 -0
  323. package/dist/react-native/classic/operations/index.js.map +1 -0
  324. package/dist/react-native/classic/workloadImpacts/index.d.ts +18 -0
  325. package/dist/react-native/classic/workloadImpacts/index.d.ts.map +1 -0
  326. package/dist/react-native/classic/workloadImpacts/index.js +15 -0
  327. package/dist/react-native/classic/workloadImpacts/index.js.map +1 -0
  328. package/dist/react-native/impactClient.d.ts +26 -0
  329. package/dist/react-native/impactClient.d.ts.map +1 -0
  330. package/dist/react-native/impactClient.js +25 -0
  331. package/dist/react-native/impactClient.js.map +1 -0
  332. package/dist/react-native/index.d.ts +8 -0
  333. package/dist/react-native/index.d.ts.map +1 -0
  334. package/dist/react-native/index.js +6 -0
  335. package/dist/react-native/index.js.map +1 -0
  336. package/dist/react-native/logger.d.ts +2 -0
  337. package/dist/react-native/logger.d.ts.map +1 -0
  338. package/dist/react-native/logger.js +5 -0
  339. package/dist/react-native/logger.js.map +1 -0
  340. package/dist/react-native/models/index.d.ts +2 -0
  341. package/dist/react-native/models/index.d.ts.map +1 -0
  342. package/dist/react-native/models/index.js +4 -0
  343. package/dist/react-native/models/index.js.map +1 -0
  344. package/dist/react-native/models/models.d.ts +641 -0
  345. package/dist/react-native/models/models.d.ts.map +1 -0
  346. package/dist/react-native/models/models.js +660 -0
  347. package/dist/react-native/models/models.js.map +1 -0
  348. package/dist/react-native/package.json +3 -0
  349. package/dist/react-native/restorePollerHelpers.d.ts +21 -0
  350. package/dist/react-native/restorePollerHelpers.d.ts.map +1 -0
  351. package/dist/react-native/restorePollerHelpers.js +98 -0
  352. package/dist/react-native/restorePollerHelpers.js.map +1 -0
  353. package/dist/react-native/static-helpers/pagingHelpers.d.ts +72 -0
  354. package/dist/react-native/static-helpers/pagingHelpers.d.ts.map +1 -0
  355. package/dist/react-native/static-helpers/pagingHelpers.js +137 -0
  356. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -0
  357. package/dist/react-native/static-helpers/pollingHelpers.d.ts +30 -0
  358. package/dist/react-native/static-helpers/pollingHelpers.d.ts.map +1 -0
  359. package/dist/react-native/static-helpers/pollingHelpers.js +76 -0
  360. package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -0
  361. package/package.json +164 -0
  362. package/review/arm-impactreporting-models.api.md +342 -0
  363. package/review/arm-impactreporting.api.md +497 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAQlC,kDAMC;AAED,sDAYC;AAgBD,sEAEC;AAED,0EAQC;AAyCD,0DAEC;AAED,8DASC;AAcD,gDAEC;AAED,oDASC;AAkBD,wDAWC;AAgCD,8DAIC;AAgBD,0DAUC;AAED,oEAIC;AAED,oFAIC;AAUD,0EAKC;AAKD,oFAEC;AAQD,8DAMC;AAQD,kFAEC;AAUD,4EAKC;AAED,4DAIC;AAED,gEAIC;AAQD,8CAMC;AAED,kDAYC;AA0BD,kEAcC;AAED,sEAeC;AAUD,8CAEC;AAED,kDAKC;AAcD,0DAOC;AAED,8DAOC;AAKD,sGAIC;AAED,0GAIC;AAUD,wEAKC;AAED,wDAIC;AAED,4DAIC;AAQD,gEAYC;AAgBD,oFAUC;AAED,8FAMC;AAUD,oFASC;AAUD,sFAKC;AAED,0EAIC;AAQD,4DAMC;AAED,gEAYC;AAwCD,gFA+BC;AAED,oFAoCC;AAED,gEAIC;AAED,oEAIC;AAgBD,sDAUC;AAED,0DAUC;AAUD,oEAEC;AAED,wEAKC;AA8DD,wDAOC;AAED,4DAOC;AA4CD,4DAEC;AAED,gEAIC;AAKD,0HAIC;AAED,8HAIC;AAUD,0EAEC;AAED,8EAKC;AAUD,gDAEC;AAED,oDAKC;AAsED,0EAKC;AAED,8EAKC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CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3F,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC;QACtB,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC;KAC/B,CAAC;AACJ,CAAC;AAcD,SAAgB,4BAA4B,CAAC,IAAS;IACpD,OAAO;QACL,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;QAC1B,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;QAC1B,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC;QAC5B,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC;KACjC,CAAC;AACJ,CAAC;AAED,2IAA2I;AAC3I,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,sDAAsD;IACtD,4BAAa,CAAA;IACb,wDAAwD;IACxD,gCAAiB,CAAA;IACjB,gEAAgE;IAChE,yCAA0B,CAAA;AAC5B,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAaD,gHAAgH;AAChH,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,0CAA0C;IAC1C,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAWD,mBAAmB;AACnB,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,uCAAuC;IACvC,wDAAuC,CAAA;AACzC,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** A connector is a resource that can be used to proactively report impacts against workloads in Azure to Microsoft. */\nexport interface Connector extends ProxyResource {\n /** The resource-specific properties for this resource. */\n properties?: ConnectorProperties;\n}\n\nexport function connectorSerializer(item: Connector): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : connectorPropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function connectorDeserializer(item: any): Connector {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : connectorPropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Details of the Connector. */\nexport interface ConnectorProperties {\n /** Resource provisioning state. */\n readonly provisioningState?: ProvisioningState;\n /** unique id of the connector. */\n readonly connectorId: string;\n /** tenant id of this connector */\n readonly tenantId: string;\n /** connector type */\n connectorType: Platform;\n /** last run time stamp of this connector in UTC time zone */\n readonly lastRunTimeStamp: Date;\n}\n\nexport function connectorPropertiesSerializer(item: ConnectorProperties): any {\n return { connectorType: item[\"connectorType\"] };\n}\n\nexport function connectorPropertiesDeserializer(item: any): ConnectorProperties {\n return {\n provisioningState: item[\"provisioningState\"],\n connectorId: item[\"connectorId\"],\n tenantId: item[\"tenantId\"],\n connectorType: item[\"connectorType\"],\n lastRunTimeStamp: new Date(item[\"lastRunTimeStamp\"]),\n };\n}\n\n/** Provisioning state of the resource. */\nexport enum KnownProvisioningState {\n /** Provisioning Succeeded */\n Succeeded = \"Succeeded\",\n /** Provisioning Failed */\n Failed = \"Failed\",\n /** Provisioning Canceled */\n Canceled = \"Canceled\",\n}\n\n/**\n * Provisioning state of the resource. \\\n * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded**: Provisioning Succeeded \\\n * **Failed**: Provisioning Failed \\\n * **Canceled**: Provisioning Canceled\n */\nexport type ProvisioningState = string;\n\n/** Enum for connector types */\nexport enum KnownPlatform {\n /** Type of Azure Monitor */\n AzureMonitor = \"AzureMonitor\",\n}\n\n/**\n * Enum for connector types \\\n * {@link KnownPlatform} can be used interchangeably with Platform,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **AzureMonitor**: Type of Azure Monitor\n */\nexport type Platform = string;\n\n/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */\nexport interface ProxyResource extends Resource {}\n\nexport function proxyResourceSerializer(item: ProxyResource): any {\n return item;\n}\n\nexport function proxyResourceDeserializer(item: any): ProxyResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface Resource {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemData;\n}\n\nexport function resourceSerializer(item: Resource): any {\n return item;\n}\n\nexport function resourceDeserializer(item: any): Resource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemData {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByType;\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByType;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: Date;\n}\n\nexport function systemDataDeserializer(item: any): SystemData {\n return {\n createdBy: item[\"createdBy\"],\n createdByType: item[\"createdByType\"],\n createdAt: !item[\"createdAt\"] ? item[\"createdAt\"] : new Date(item[\"createdAt\"]),\n lastModifiedBy: item[\"lastModifiedBy\"],\n lastModifiedByType: item[\"lastModifiedByType\"],\n lastModifiedAt: !item[\"lastModifiedAt\"]\n ? item[\"lastModifiedAt\"]\n : new Date(item[\"lastModifiedAt\"]),\n };\n}\n\n/** The kind of entity that created the resource. */\nexport enum KnownCreatedByType {\n /** The entity was created by a user. */\n User = \"User\",\n /** The entity was created by an application. */\n Application = \"Application\",\n /** The entity was created by a managed identity. */\n ManagedIdentity = \"ManagedIdentity\",\n /** The entity was created by a key. */\n Key = \"Key\",\n}\n\n/**\n * The kind of entity that created the resource. \\\n * {@link KnowncreatedByType} can be used interchangeably with createdByType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User**: The entity was created by a user. \\\n * **Application**: The entity was created by an application. \\\n * **ManagedIdentity**: The entity was created by a managed identity. \\\n * **Key**: The entity was created by a key.\n */\nexport type CreatedByType = string;\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */\nexport interface ErrorResponse {\n /** The error object. */\n error?: ErrorDetail;\n}\n\nexport function errorResponseDeserializer(item: any): ErrorResponse {\n return {\n error: !item[\"error\"] ? item[\"error\"] : errorDetailDeserializer(item[\"error\"]),\n };\n}\n\n/** The error detail. */\nexport interface ErrorDetail {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n /** The error target. */\n readonly target?: string;\n /** The error details. */\n readonly details?: ErrorDetail[];\n /** The error additional info. */\n readonly additionalInfo?: ErrorAdditionalInfo[];\n}\n\nexport function errorDetailDeserializer(item: any): ErrorDetail {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n target: item[\"target\"],\n details: !item[\"details\"] ? item[\"details\"] : errorDetailArrayDeserializer(item[\"details\"]),\n additionalInfo: !item[\"additionalInfo\"]\n ? item[\"additionalInfo\"]\n : errorAdditionalInfoArrayDeserializer(item[\"additionalInfo\"]),\n };\n}\n\nexport function errorDetailArrayDeserializer(result: Array<ErrorDetail>): any[] {\n return result.map((item) => {\n return errorDetailDeserializer(item);\n });\n}\n\nexport function errorAdditionalInfoArrayDeserializer(result: Array<ErrorAdditionalInfo>): any[] {\n return result.map((item) => {\n return errorAdditionalInfoDeserializer(item);\n });\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfo {\n /** The additional info type. */\n readonly type?: string;\n /** The additional info. */\n readonly info?: Record<string, any>;\n}\n\nexport function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo {\n return {\n type: item[\"type\"],\n info: !item[\"info\"] ? item[\"info\"] : _errorAdditionalInfoInfoDeserializer(item[\"info\"]),\n };\n}\n\n/** model interface _ErrorAdditionalInfoInfo */\nexport interface _ErrorAdditionalInfoInfo {}\n\nexport function _errorAdditionalInfoInfoDeserializer(item: any): _ErrorAdditionalInfoInfo {\n return item;\n}\n\n/** The type used for update operations of the Connector. */\nexport interface ConnectorUpdate {\n /** The resource-specific properties for this resource. */\n properties?: ConnectorUpdateProperties;\n}\n\nexport function connectorUpdateSerializer(item: ConnectorUpdate): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : connectorUpdatePropertiesSerializer(item[\"properties\"]),\n };\n}\n\n/** The updatable properties of the Connector. */\nexport interface ConnectorUpdateProperties {\n /** connector type */\n connectorType?: Platform;\n}\n\nexport function connectorUpdatePropertiesSerializer(item: ConnectorUpdateProperties): any {\n return { connectorType: item[\"connectorType\"] };\n}\n\n/** The response of a Connector list operation. */\nexport interface _ConnectorListResult {\n /** The Connector items on this page */\n value: Connector[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _connectorListResultDeserializer(item: any): _ConnectorListResult {\n return {\n value: connectorArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function connectorArraySerializer(result: Array<Connector>): any[] {\n return result.map((item) => {\n return connectorSerializer(item);\n });\n}\n\nexport function connectorArrayDeserializer(result: Array<Connector>): any[] {\n return result.map((item) => {\n return connectorDeserializer(item);\n });\n}\n\n/** Insight resource */\nexport interface Insight extends ProxyResource {\n /** The resource-specific properties for this resource. */\n properties?: InsightProperties;\n}\n\nexport function insightSerializer(item: Insight): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : insightPropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function insightDeserializer(item: any): Insight {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : insightPropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Impact category properties. */\nexport interface InsightProperties {\n /** Resource provisioning state. */\n readonly provisioningState?: ProvisioningState;\n /** category of the insight. */\n category: string;\n /** status of the insight. example resolved, repaired, other. */\n status?: string;\n /** Identifier of the event that has been correlated with this insight. This can be used to aggregate insights for the same event. */\n eventId?: string;\n /** Identifier that can be used to group similar insights. */\n groupId?: string;\n /** Contains title & description for the insight */\n content: Content;\n /** Time of the event, which has been correlated the impact. */\n eventTime?: Date;\n /** unique id of the insight. */\n insightUniqueId: string;\n /** details of of the impact for which insight has been generated. */\n impact: ImpactDetails;\n /** additional details of the insight. */\n additionalDetails?: Record<string, any>;\n}\n\nexport function insightPropertiesSerializer(item: InsightProperties): any {\n return {\n category: item[\"category\"],\n status: item[\"status\"],\n eventId: item[\"eventId\"],\n groupId: item[\"groupId\"],\n content: contentSerializer(item[\"content\"]),\n eventTime: !item[\"eventTime\"] ? item[\"eventTime\"] : item[\"eventTime\"].toISOString(),\n insightUniqueId: item[\"insightUniqueId\"],\n impact: impactDetailsSerializer(item[\"impact\"]),\n additionalDetails: !item[\"additionalDetails\"]\n ? item[\"additionalDetails\"]\n : _insightPropertiesAdditionalDetailsSerializer(item[\"additionalDetails\"]),\n };\n}\n\nexport function insightPropertiesDeserializer(item: any): InsightProperties {\n return {\n provisioningState: item[\"provisioningState\"],\n category: item[\"category\"],\n status: item[\"status\"],\n eventId: item[\"eventId\"],\n groupId: item[\"groupId\"],\n content: contentDeserializer(item[\"content\"]),\n eventTime: !item[\"eventTime\"] ? item[\"eventTime\"] : new Date(item[\"eventTime\"]),\n insightUniqueId: item[\"insightUniqueId\"],\n impact: impactDetailsDeserializer(item[\"impact\"]),\n additionalDetails: !item[\"additionalDetails\"]\n ? item[\"additionalDetails\"]\n : _insightPropertiesAdditionalDetailsDeserializer(item[\"additionalDetails\"]),\n };\n}\n\n/** Article details of the insight like title, description etc */\nexport interface Content {\n /** Title of the insight */\n title: string;\n /** Description of the insight */\n description: string;\n}\n\nexport function contentSerializer(item: Content): any {\n return { title: item[\"title\"], description: item[\"description\"] };\n}\n\nexport function contentDeserializer(item: any): Content {\n return {\n title: item[\"title\"],\n description: item[\"description\"],\n };\n}\n\n/** details of of the impact for which insight has been generated. */\nexport interface ImpactDetails {\n /** List of impacted Azure resources. */\n impactedResourceId: string;\n /** Time at which impact was started according to reported impact. */\n startTime: Date;\n /** Time at which impact was ended according to reported impact. */\n endTime?: Date;\n /** Azure Id of the impact. */\n impactId: string;\n}\n\nexport function impactDetailsSerializer(item: ImpactDetails): any {\n return {\n impactedResourceId: item[\"impactedResourceId\"],\n startTime: item[\"startTime\"].toISOString(),\n endTime: !item[\"endTime\"] ? item[\"endTime\"] : item[\"endTime\"].toISOString(),\n impactId: item[\"impactId\"],\n };\n}\n\nexport function impactDetailsDeserializer(item: any): ImpactDetails {\n return {\n impactedResourceId: item[\"impactedResourceId\"],\n startTime: new Date(item[\"startTime\"]),\n endTime: !item[\"endTime\"] ? item[\"endTime\"] : new Date(item[\"endTime\"]),\n impactId: item[\"impactId\"],\n };\n}\n\n/** model interface _InsightPropertiesAdditionalDetails */\nexport interface _InsightPropertiesAdditionalDetails {}\n\nexport function _insightPropertiesAdditionalDetailsSerializer(\n item: _InsightPropertiesAdditionalDetails,\n): any {\n return item;\n}\n\nexport function _insightPropertiesAdditionalDetailsDeserializer(\n item: any,\n): _InsightPropertiesAdditionalDetails {\n return item;\n}\n\n/** The response of a Insight list operation. */\nexport interface _InsightListResult {\n /** The Insight items on this page */\n value: Insight[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _insightListResultDeserializer(item: any): _InsightListResult {\n return {\n value: insightArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function insightArraySerializer(result: Array<Insight>): any[] {\n return result.map((item) => {\n return insightSerializer(item);\n });\n}\n\nexport function insightArrayDeserializer(result: Array<Insight>): any[] {\n return result.map((item) => {\n return insightDeserializer(item);\n });\n}\n\n/** ImpactCategory resource */\nexport interface ImpactCategory extends ProxyResource {\n /** The resource-specific properties for this resource. */\n properties?: ImpactCategoryProperties;\n}\n\nexport function impactCategoryDeserializer(item: any): ImpactCategory {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : impactCategoryPropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Impact category properties. */\nexport interface ImpactCategoryProperties {\n /** Resource provisioning state. */\n readonly provisioningState?: ProvisioningState;\n /** Unique ID of the category */\n categoryId: string;\n /** Unique ID of the parent category */\n parentCategoryId?: string;\n /** Description of the category */\n description?: string;\n /** The workloadImpact properties which are required when reporting with the impact category */\n requiredImpactProperties?: RequiredImpactProperties[];\n}\n\nexport function impactCategoryPropertiesDeserializer(item: any): ImpactCategoryProperties {\n return {\n provisioningState: item[\"provisioningState\"],\n categoryId: item[\"categoryId\"],\n parentCategoryId: item[\"parentCategoryId\"],\n description: item[\"description\"],\n requiredImpactProperties: !item[\"requiredImpactProperties\"]\n ? item[\"requiredImpactProperties\"]\n : requiredImpactPropertiesArrayDeserializer(item[\"requiredImpactProperties\"]),\n };\n}\n\nexport function requiredImpactPropertiesArrayDeserializer(\n result: Array<RequiredImpactProperties>,\n): any[] {\n return result.map((item) => {\n return requiredImpactPropertiesDeserializer(item);\n });\n}\n\n/** Required impact properties */\nexport interface RequiredImpactProperties {\n /** Name of the property */\n name: string;\n /** Allowed values values for the property */\n allowedValues?: string[];\n}\n\nexport function requiredImpactPropertiesDeserializer(item: any): RequiredImpactProperties {\n return {\n name: item[\"name\"],\n allowedValues: !item[\"allowedValues\"]\n ? item[\"allowedValues\"]\n : item[\"allowedValues\"].map((p: any) => {\n return p;\n }),\n };\n}\n\n/** The response of a ImpactCategory list operation. */\nexport interface _ImpactCategoryListResult {\n /** The ImpactCategory items on this page */\n value: ImpactCategory[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _impactCategoryListResultDeserializer(item: any): _ImpactCategoryListResult {\n return {\n value: impactCategoryArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function impactCategoryArrayDeserializer(result: Array<ImpactCategory>): any[] {\n return result.map((item) => {\n return impactCategoryDeserializer(item);\n });\n}\n\n/** Workload Impact properties */\nexport interface WorkloadImpact extends ProxyResource {\n /** The resource-specific properties for this resource. */\n properties?: WorkloadImpactProperties;\n}\n\nexport function workloadImpactSerializer(item: WorkloadImpact): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : workloadImpactPropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function workloadImpactDeserializer(item: any): WorkloadImpact {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : workloadImpactPropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Workload impact properties */\nexport interface WorkloadImpactProperties {\n /** Resource provisioning state. */\n readonly provisioningState?: ProvisioningState;\n /** Time at which impact was observed */\n startDateTime: Date;\n /** Time at which impact has ended */\n endDateTime?: Date;\n /** Azure resource id of the impacted resource */\n impactedResourceId: string;\n /** Unique ID of the impact (UUID) */\n readonly impactUniqueId?: string;\n /** Time at which impact is reported */\n readonly reportedTimeUtc?: Date;\n /** Category of the impact, details can found from /impactCategories API */\n impactCategory: string;\n /** A detailed description of the impact */\n impactDescription?: string;\n /** The ARM correlation ids, this is important field for control plane related impacts */\n armCorrelationIds?: string[];\n /** Details about performance issue. Applicable for performance impacts. */\n performance?: Performance[];\n /** Details about connectivity issue. Applicable when root resource causing the issue is not identified. For example, when a VM is impacted due to a network issue, the impacted resource is identified as the VM, but the root cause is the network. In such cases, the connectivity field will have the details about the network issue */\n connectivity?: Connectivity;\n /** Additional fields related to impact, applicable fields per resource type are list under /impactCategories API */\n additionalProperties?: Record<string, any>;\n /** ARM error code and error message associated with the impact */\n errorDetails?: ErrorDetailProperties;\n /** Information about the impacted workload */\n workload?: Workload;\n /** Use this field to group impacts */\n impactGroupId?: string;\n /** Degree of confidence on the impact being a platform issue */\n confidenceLevel?: ConfidenceLevel;\n /** Client incident details ex: incidentId , incident source */\n clientIncidentDetails?: ClientIncidentDetails;\n}\n\nexport function workloadImpactPropertiesSerializer(item: WorkloadImpactProperties): any {\n return {\n startDateTime: item[\"startDateTime\"].toISOString(),\n endDateTime: !item[\"endDateTime\"] ? item[\"endDateTime\"] : item[\"endDateTime\"].toISOString(),\n impactedResourceId: item[\"impactedResourceId\"],\n impactCategory: item[\"impactCategory\"],\n impactDescription: item[\"impactDescription\"],\n armCorrelationIds: !item[\"armCorrelationIds\"]\n ? item[\"armCorrelationIds\"]\n : item[\"armCorrelationIds\"].map((p: any) => {\n return p;\n }),\n performance: !item[\"performance\"]\n ? item[\"performance\"]\n : performanceArraySerializer(item[\"performance\"]),\n connectivity: !item[\"connectivity\"]\n ? item[\"connectivity\"]\n : connectivitySerializer(item[\"connectivity\"]),\n additionalProperties: !item[\"additionalProperties\"]\n ? item[\"additionalProperties\"]\n : _workloadImpactPropertiesAdditionalPropertiesSerializer(item[\"additionalProperties\"]),\n errorDetails: !item[\"errorDetails\"]\n ? item[\"errorDetails\"]\n : errorDetailPropertiesSerializer(item[\"errorDetails\"]),\n workload: !item[\"workload\"] ? item[\"workload\"] : workloadSerializer(item[\"workload\"]),\n impactGroupId: item[\"impactGroupId\"],\n confidenceLevel: item[\"confidenceLevel\"],\n clientIncidentDetails: !item[\"clientIncidentDetails\"]\n ? item[\"clientIncidentDetails\"]\n : clientIncidentDetailsSerializer(item[\"clientIncidentDetails\"]),\n };\n}\n\nexport function workloadImpactPropertiesDeserializer(item: any): WorkloadImpactProperties {\n return {\n provisioningState: item[\"provisioningState\"],\n startDateTime: new Date(item[\"startDateTime\"]),\n endDateTime: !item[\"endDateTime\"] ? item[\"endDateTime\"] : new Date(item[\"endDateTime\"]),\n impactedResourceId: item[\"impactedResourceId\"],\n impactUniqueId: item[\"impactUniqueId\"],\n reportedTimeUtc: !item[\"reportedTimeUtc\"]\n ? item[\"reportedTimeUtc\"]\n : new Date(item[\"reportedTimeUtc\"]),\n impactCategory: item[\"impactCategory\"],\n impactDescription: item[\"impactDescription\"],\n armCorrelationIds: !item[\"armCorrelationIds\"]\n ? item[\"armCorrelationIds\"]\n : item[\"armCorrelationIds\"].map((p: any) => {\n return p;\n }),\n performance: !item[\"performance\"]\n ? item[\"performance\"]\n : performanceArrayDeserializer(item[\"performance\"]),\n connectivity: !item[\"connectivity\"]\n ? item[\"connectivity\"]\n : connectivityDeserializer(item[\"connectivity\"]),\n additionalProperties: !item[\"additionalProperties\"]\n ? item[\"additionalProperties\"]\n : _workloadImpactPropertiesAdditionalPropertiesDeserializer(item[\"additionalProperties\"]),\n errorDetails: !item[\"errorDetails\"]\n ? item[\"errorDetails\"]\n : errorDetailPropertiesDeserializer(item[\"errorDetails\"]),\n workload: !item[\"workload\"] ? item[\"workload\"] : workloadDeserializer(item[\"workload\"]),\n impactGroupId: item[\"impactGroupId\"],\n confidenceLevel: item[\"confidenceLevel\"],\n clientIncidentDetails: !item[\"clientIncidentDetails\"]\n ? item[\"clientIncidentDetails\"]\n : clientIncidentDetailsDeserializer(item[\"clientIncidentDetails\"]),\n };\n}\n\nexport function performanceArraySerializer(result: Array<Performance>): any[] {\n return result.map((item) => {\n return performanceSerializer(item);\n });\n}\n\nexport function performanceArrayDeserializer(result: Array<Performance>): any[] {\n return result.map((item) => {\n return performanceDeserializer(item);\n });\n}\n\n/** Details about impacted performance metrics. Applicable for performance related impact */\nexport interface Performance {\n /** Name of the Metric examples: Disk, IOPs, CPU, GPU, Memory, details can be found from /impactCategories API */\n metricName?: string;\n /** Threshold value for the metric */\n expected?: number;\n /** Observed value for the metric */\n actual?: number;\n /** Max and Min Threshold values for the metric */\n expectedValueRange?: ExpectedValueRange;\n /** Unit of the metric ex: Bytes, Percentage, Count, Seconds, Milliseconds, Bytes/Second, Count/Second, etc.., Other */\n unit?: MetricUnit;\n}\n\nexport function performanceSerializer(item: Performance): any {\n return {\n metricName: item[\"metricName\"],\n expected: item[\"expected\"],\n actual: item[\"actual\"],\n expectedValueRange: !item[\"expectedValueRange\"]\n ? item[\"expectedValueRange\"]\n : expectedValueRangeSerializer(item[\"expectedValueRange\"]),\n unit: item[\"unit\"],\n };\n}\n\nexport function performanceDeserializer(item: any): Performance {\n return {\n metricName: item[\"metricName\"],\n expected: item[\"expected\"],\n actual: item[\"actual\"],\n expectedValueRange: !item[\"expectedValueRange\"]\n ? item[\"expectedValueRange\"]\n : expectedValueRangeDeserializer(item[\"expectedValueRange\"]),\n unit: item[\"unit\"],\n };\n}\n\n/** Max and Min Threshold values for the metric */\nexport interface ExpectedValueRange {\n /** Min threshold value for the metric */\n min: number;\n /** Max threshold value for the metric */\n max: number;\n}\n\nexport function expectedValueRangeSerializer(item: ExpectedValueRange): any {\n return { min: item[\"min\"], max: item[\"max\"] };\n}\n\nexport function expectedValueRangeDeserializer(item: any): ExpectedValueRange {\n return {\n min: item[\"min\"],\n max: item[\"max\"],\n };\n}\n\n/** List of unit of the metric. */\nexport enum KnownMetricUnit {\n /** When measurement is in ByteSeconds */\n ByteSeconds = \"ByteSeconds\",\n /** When measurement is in Bytes */\n Bytes = \"Bytes\",\n /** When measurement is in BytesPerSecond */\n BytesPerSecond = \"BytesPerSecond\",\n /** When measurement is in Cores */\n Cores = \"Cores\",\n /** When measurement is in Count */\n Count = \"Count\",\n /** When measurement is in CountPerSecond */\n CountPerSecond = \"CountPerSecond\",\n /** When measurement is in MilliCores */\n MilliCores = \"MilliCores\",\n /** When measurement is in MilliSeconds */\n MilliSeconds = \"MilliSeconds\",\n /** When measurement is in NanoCores */\n NanoCores = \"NanoCores\",\n /** When measurement is in Percent */\n Percent = \"Percent\",\n /** When measurement is in Seconds */\n Seconds = \"Seconds\",\n /** When measurement is in Other than listed */\n Other = \"Other\",\n}\n\n/**\n * List of unit of the metric. \\\n * {@link KnownMetricUnit} can be used interchangeably with MetricUnit,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **ByteSeconds**: When measurement is in ByteSeconds \\\n * **Bytes**: When measurement is in Bytes \\\n * **BytesPerSecond**: When measurement is in BytesPerSecond \\\n * **Cores**: When measurement is in Cores \\\n * **Count**: When measurement is in Count \\\n * **CountPerSecond**: When measurement is in CountPerSecond \\\n * **MilliCores**: When measurement is in MilliCores \\\n * **MilliSeconds**: When measurement is in MilliSeconds \\\n * **NanoCores**: When measurement is in NanoCores \\\n * **Percent**: When measurement is in Percent \\\n * **Seconds**: When measurement is in Seconds \\\n * **Other**: When measurement is in Other than listed\n */\nexport type MetricUnit = string;\n\n/** Details about connectivity issue. Applicable when root resource causing the issue is not identified. For example, when a VM is impacted due to a network issue, the impacted resource could be VM or the network. In such cases, the connectivity field will have the details about both VM and network. */\nexport interface Connectivity {\n /** Protocol used for the connection */\n protocol?: Protocol;\n /** Port number for the connection */\n port?: number;\n /** Source from which the connection was attempted */\n source?: SourceOrTarget;\n /** target which connection was attempted */\n target?: SourceOrTarget;\n}\n\nexport function connectivitySerializer(item: Connectivity): any {\n return {\n protocol: item[\"protocol\"],\n port: item[\"port\"],\n source: !item[\"source\"] ? item[\"source\"] : sourceOrTargetSerializer(item[\"source\"]),\n target: !item[\"target\"] ? item[\"target\"] : sourceOrTargetSerializer(item[\"target\"]),\n };\n}\n\nexport function connectivityDeserializer(item: any): Connectivity {\n return {\n protocol: item[\"protocol\"],\n port: item[\"port\"],\n source: !item[\"source\"] ? item[\"source\"] : sourceOrTargetDeserializer(item[\"source\"]),\n target: !item[\"target\"] ? item[\"target\"] : sourceOrTargetDeserializer(item[\"target\"]),\n };\n}\n\n/** List of protocols */\nexport enum KnownProtocol {\n /** When communication protocol is TCP */\n TCP = \"TCP\",\n /** When communication protocol is UDP */\n UDP = \"UDP\",\n /** When communication protocol is HTTP */\n Http = \"HTTP\",\n /** When communication protocol is HTTPS */\n Https = \"HTTPS\",\n /** When communication protocol is RDP */\n RDP = \"RDP\",\n /** When communication protocol is FTP */\n FTP = \"FTP\",\n /** When communication protocol is SSH */\n SSH = \"SSH\",\n /** When communication protocol is Other */\n Other = \"Other\",\n}\n\n/**\n * List of protocols \\\n * {@link KnownProtocol} can be used interchangeably with Protocol,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **TCP**: When communication protocol is TCP \\\n * **UDP**: When communication protocol is UDP \\\n * **Http**: When communication protocol is HTTP \\\n * **Https**: When communication protocol is HTTPS \\\n * **RDP**: When communication protocol is RDP \\\n * **FTP**: When communication protocol is FTP \\\n * **SSH**: When communication protocol is SSH \\\n * **Other**: When communication protocol is Other\n */\nexport type Protocol = string;\n\n/** Resource details */\nexport interface SourceOrTarget {\n /** Azure resource id, example /subscription/{subscription}/resourceGroup/{rg}/Microsoft.compute/virtualMachine/{vmName} */\n azureResourceId?: string;\n}\n\nexport function sourceOrTargetSerializer(item: SourceOrTarget): any {\n return { azureResourceId: item[\"azureResourceId\"] };\n}\n\nexport function sourceOrTargetDeserializer(item: any): SourceOrTarget {\n return {\n azureResourceId: item[\"azureResourceId\"],\n };\n}\n\n/** model interface _WorkloadImpactPropertiesAdditionalProperties */\nexport interface _WorkloadImpactPropertiesAdditionalProperties {}\n\nexport function _workloadImpactPropertiesAdditionalPropertiesSerializer(\n item: _WorkloadImpactPropertiesAdditionalProperties,\n): any {\n return item;\n}\n\nexport function _workloadImpactPropertiesAdditionalPropertiesDeserializer(\n item: any,\n): _WorkloadImpactPropertiesAdditionalProperties {\n return item;\n}\n\n/** ARM error code and error message associated with the impact */\nexport interface ErrorDetailProperties {\n /** ARM Error code associated with the impact. */\n errorCode?: string;\n /** ARM Error Message associated with the impact */\n errorMessage?: string;\n}\n\nexport function errorDetailPropertiesSerializer(item: ErrorDetailProperties): any {\n return { errorCode: item[\"errorCode\"], errorMessage: item[\"errorMessage\"] };\n}\n\nexport function errorDetailPropertiesDeserializer(item: any): ErrorDetailProperties {\n return {\n errorCode: item[\"errorCode\"],\n errorMessage: item[\"errorMessage\"],\n };\n}\n\n/** Information about the impacted workload */\nexport interface Workload {\n /** the scenario for the workload */\n context?: string;\n /** Tool used to interact with Azure. SDK, AzPortal, etc.., Other */\n toolset?: Toolset;\n}\n\nexport function workloadSerializer(item: Workload): any {\n return { context: item[\"context\"], toolset: item[\"toolset\"] };\n}\n\nexport function workloadDeserializer(item: any): Workload {\n return {\n context: item[\"context\"],\n toolset: item[\"toolset\"],\n };\n}\n\n/** List of azure interfaces. */\nexport enum KnownToolset {\n /** If communication toolset is Terraform */\n Terraform = \"Terraform\",\n /** If communication toolset is Puppet */\n Puppet = \"Puppet\",\n /** If communication toolset is Chef */\n Chef = \"Chef\",\n /** If communication toolset is SDK */\n SDK = \"SDK\",\n /** If communication toolset is Ansible */\n Ansible = \"Ansible\",\n /** If communication toolset is ARM */\n ARM = \"ARM\",\n /** If communication toolset is Portal */\n Portal = \"Portal\",\n /** If communication toolset is Shell */\n Shell = \"Shell\",\n /** If communication toolset is Other */\n Other = \"Other\",\n}\n\n/**\n * List of azure interfaces. \\\n * {@link KnownToolset} can be used interchangeably with Toolset,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Terraform**: If communication toolset is Terraform \\\n * **Puppet**: If communication toolset is Puppet \\\n * **Chef**: If communication toolset is Chef \\\n * **SDK**: If communication toolset is SDK \\\n * **Ansible**: If communication toolset is Ansible \\\n * **ARM**: If communication toolset is ARM \\\n * **Portal**: If communication toolset is Portal \\\n * **Shell**: If communication toolset is Shell \\\n * **Other**: If communication toolset is Other\n */\nexport type Toolset = string;\n\n/** Degree of confidence on the impact being a platform issue. */\nexport enum KnownConfidenceLevel {\n /** Low confidence on azure being the source of impact */\n Low = \"Low\",\n /** Medium confidence on azure being the source of impact */\n Medium = \"Medium\",\n /** High confidence on azure being the source of impact */\n High = \"High\",\n}\n\n/**\n * Degree of confidence on the impact being a platform issue. \\\n * {@link KnownConfidenceLevel} can be used interchangeably with ConfidenceLevel,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Low**: Low confidence on azure being the source of impact \\\n * **Medium**: Medium confidence on azure being the source of impact \\\n * **High**: High confidence on azure being the source of impact\n */\nexport type ConfidenceLevel = string;\n\n/** Client incident details ex: incidentId , incident source */\nexport interface ClientIncidentDetails {\n /** Client incident id. ex : id of the incident created to investigate and address the impact if any. */\n clientIncidentId?: string;\n /** Client incident source. ex : source system name where the incident is created */\n clientIncidentSource?: IncidentSource;\n}\n\nexport function clientIncidentDetailsSerializer(item: ClientIncidentDetails): any {\n return {\n clientIncidentId: item[\"clientIncidentId\"],\n clientIncidentSource: item[\"clientIncidentSource\"],\n };\n}\n\nexport function clientIncidentDetailsDeserializer(item: any): ClientIncidentDetails {\n return {\n clientIncidentId: item[\"clientIncidentId\"],\n clientIncidentSource: item[\"clientIncidentSource\"],\n };\n}\n\n/** List of incident interfaces. */\nexport enum KnownIncidentSource {\n /** When source of Incident is AzureDevops */\n AzureDevops = \"AzureDevops\",\n /** When source of Incident is Microsoft ICM */\n ICM = \"ICM\",\n /** When source of Incident is Jira */\n Jira = \"Jira\",\n /** When source of Incident is ServiceNow */\n ServiceNow = \"ServiceNow\",\n /** When source of Incident is Other */\n Other = \"Other\",\n}\n\n/**\n * List of incident interfaces. \\\n * {@link KnownIncidentSource} can be used interchangeably with IncidentSource,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **AzureDevops**: When source of Incident is AzureDevops \\\n * **ICM**: When source of Incident is Microsoft ICM \\\n * **Jira**: When source of Incident is Jira \\\n * **ServiceNow**: When source of Incident is ServiceNow \\\n * **Other**: When source of Incident is Other\n */\nexport type IncidentSource = string;\n\n/** The response of a WorkloadImpact list operation. */\nexport interface _WorkloadImpactListResult {\n /** The WorkloadImpact items on this page */\n value: WorkloadImpact[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _workloadImpactListResultDeserializer(item: any): _WorkloadImpactListResult {\n return {\n value: workloadImpactArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function workloadImpactArraySerializer(result: Array<WorkloadImpact>): any[] {\n return result.map((item) => {\n return workloadImpactSerializer(item);\n });\n}\n\nexport function workloadImpactArrayDeserializer(result: Array<WorkloadImpact>): any[] {\n return result.map((item) => {\n return workloadImpactDeserializer(item);\n });\n}\n\n/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */\nexport interface _OperationListResult {\n /** The Operation items on this page */\n value: Operation[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _operationListResultDeserializer(item: any): _OperationListResult {\n return {\n value: operationArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function operationArrayDeserializer(result: Array<Operation>): any[] {\n return result.map((item) => {\n return operationDeserializer(item);\n });\n}\n\n/** Details of a REST API operation, returned from the Resource Provider Operations API */\nexport interface Operation {\n /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\" */\n readonly name?: string;\n /** Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations. */\n readonly isDataAction?: boolean;\n /** Localized display information for this particular operation. */\n display?: OperationDisplay;\n /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\n readonly origin?: Origin;\n /** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\n readonly actionType?: ActionType;\n}\n\nexport function operationDeserializer(item: any): Operation {\n return {\n name: item[\"name\"],\n isDataAction: item[\"isDataAction\"],\n display: !item[\"display\"] ? item[\"display\"] : operationDisplayDeserializer(item[\"display\"]),\n origin: item[\"origin\"],\n actionType: item[\"actionType\"],\n };\n}\n\n/** Localized display information for and operation. */\nexport interface OperationDisplay {\n /** The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\". */\n readonly provider?: string;\n /** The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\". */\n readonly resource?: string;\n /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\". */\n readonly operation?: string;\n /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */\n readonly description?: string;\n}\n\nexport function operationDisplayDeserializer(item: any): OperationDisplay {\n return {\n provider: item[\"provider\"],\n resource: item[\"resource\"],\n operation: item[\"operation\"],\n description: item[\"description\"],\n };\n}\n\n/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\nexport enum KnownOrigin {\n /** Indicates the operation is initiated by a user. */\n User = \"user\",\n /** Indicates the operation is initiated by a system. */\n System = \"system\",\n /** Indicates the operation is initiated by a user or system. */\n UserSystem = \"user,system\",\n}\n\n/**\n * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" \\\n * {@link KnownOrigin} can be used interchangeably with Origin,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User**: Indicates the operation is initiated by a user. \\\n * **System**: Indicates the operation is initiated by a system. \\\n * **UserSystem**: Indicates the operation is initiated by a user or system.\n */\nexport type Origin = string;\n\n/** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\nexport enum KnownActionType {\n /** Actions are for internal-only APIs. */\n Internal = \"Internal\",\n}\n\n/**\n * Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \\\n * {@link KnownActionType} can be used interchangeably with ActionType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Internal**: Actions are for internal-only APIs.\n */\nexport type ActionType = string;\n\n/** API Versions */\nexport enum KnownVersions {\n /** May 01, 2024 Preview API Version */\n V20240501Preview = \"2024-05-01-preview\",\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,21 @@
1
+ import { ImpactClient } from "./impactClient.js";
2
+ import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client";
3
+ import { AbortSignalLike } from "@azure/abort-controller";
4
+ import { PollerLike, OperationState } from "@azure/core-lro";
5
+ export interface RestorePollerOptions<TResult, TResponse extends PathUncheckedResponse = PathUncheckedResponse> extends OperationOptions {
6
+ /** Delay to wait until next poll, in milliseconds. */
7
+ updateIntervalInMs?: number;
8
+ /**
9
+ * The signal which can be used to abort requests.
10
+ */
11
+ abortSignal?: AbortSignalLike;
12
+ /** Deserialization function for raw response body */
13
+ processResponseBody?: (result: TResponse) => Promise<TResult>;
14
+ }
15
+ /**
16
+ * Creates a poller from the serialized state of another poller. This can be
17
+ * useful when you want to create pollers on a different host or a poller
18
+ * needs to be constructed after the original one is not in scope.
19
+ */
20
+ export declare function restorePoller<TResponse extends PathUncheckedResponse, TResult>(client: ImpactClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>, options?: RestorePollerOptions<TResult>): PollerLike<OperationState<TResult>, TResult>;
21
+ //# sourceMappingURL=restorePollerHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restorePollerHelpers.d.ts","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIjD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,cAAc,EAGf,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,oBAAoB,CACnC,OAAO,EACP,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,gBAAgB;IACxB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,SAAS,qBAAqB,EAAE,OAAO,EAC5E,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EACjF,OAAO,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,GACtC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CA+B9C"}
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.restorePoller = restorePoller;
6
+ const index_js_1 = require("./api/connectors/index.js");
7
+ const index_js_2 = require("./api/workloadImpacts/index.js");
8
+ const pollingHelpers_js_1 = require("./static-helpers/pollingHelpers.js");
9
+ const core_lro_1 = require("@azure/core-lro");
10
+ /**
11
+ * Creates a poller from the serialized state of another poller. This can be
12
+ * useful when you want to create pollers on a different host or a poller
13
+ * needs to be constructed after the original one is not in scope.
14
+ */
15
+ function restorePoller(client, serializedState, sourceOperation, options) {
16
+ var _a, _b, _c;
17
+ const pollerConfig = (0, core_lro_1.deserializeState)(serializedState).config;
18
+ const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
19
+ if (!initialRequestUrl || !requestMethod) {
20
+ throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}`);
21
+ }
22
+ const resourceLocationConfig = metadata === null || metadata === void 0 ? void 0 : metadata["resourceLocationConfig"];
23
+ const { deserializer, expectedStatuses = [] } = (_a = getDeserializationHelper(initialRequestUrl, requestMethod)) !== null && _a !== void 0 ? _a : {};
24
+ const deserializeHelper = (_b = options === null || options === void 0 ? void 0 : options.processResponseBody) !== null && _b !== void 0 ? _b : deserializer;
25
+ if (!deserializeHelper) {
26
+ throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}.`);
27
+ }
28
+ return (0, pollingHelpers_js_1.getLongRunningPoller)((_c = client["_client"]) !== null && _c !== void 0 ? _c : client, deserializeHelper, expectedStatuses, {
29
+ updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
30
+ abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
31
+ resourceLocationConfig,
32
+ restoreFrom: serializedState,
33
+ initialRequestUrl,
34
+ });
35
+ }
36
+ const deserializeMap = {
37
+ "PUT /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName}": {
38
+ deserializer: index_js_1._connectorsCreateOrUpdateDeserialize,
39
+ expectedStatuses: ["200", "201"],
40
+ },
41
+ "PUT /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}": {
42
+ deserializer: index_js_2._workloadImpactsCreateDeserialize,
43
+ expectedStatuses: ["200", "201"],
44
+ },
45
+ };
46
+ function getDeserializationHelper(urlStr, method) {
47
+ var _a, _b, _c, _d;
48
+ const path = new URL(urlStr).pathname;
49
+ const pathParts = path.split("/");
50
+ // Traverse list to match the longest candidate
51
+ // matchedLen: the length of candidate path
52
+ // matchedValue: the matched status code array
53
+ let matchedLen = -1, matchedValue;
54
+ // Iterate the responseMap to find a match
55
+ for (const [key, value] of Object.entries(deserializeMap)) {
56
+ // Extracting the path from the map key which is in format
57
+ // GET /path/foo
58
+ if (!key.startsWith(method)) {
59
+ continue;
60
+ }
61
+ const candidatePath = getPathFromMapKey(key);
62
+ // Get each part of the url path
63
+ const candidateParts = candidatePath.split("/");
64
+ // track if we have found a match to return the values found.
65
+ let found = true;
66
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
67
+ if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
68
+ const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
69
+ // If the current part of the candidate is a "template" part
70
+ // Try to use the suffix of pattern to match the path
71
+ // {guid} ==> $
72
+ // {guid}:export ==> :export$
73
+ const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
74
+ if (!isMatched) {
75
+ found = false;
76
+ break;
77
+ }
78
+ continue;
79
+ }
80
+ // If the candidate part is not a template and
81
+ // the parts don't match mark the candidate as not found
82
+ // to move on with the next candidate path.
83
+ if (candidateParts[i] !== pathParts[j]) {
84
+ found = false;
85
+ break;
86
+ }
87
+ }
88
+ // We finished evaluating the current candidate parts
89
+ // Update the matched value if and only if we found the longer pattern
90
+ if (found && candidatePath.length > matchedLen) {
91
+ matchedLen = candidatePath.length;
92
+ matchedValue = value;
93
+ }
94
+ }
95
+ return matchedValue;
96
+ }
97
+ function getPathFromMapKey(mapKey) {
98
+ const pathStart = mapKey.indexOf("/");
99
+ return mapKey.slice(pathStart);
100
+ }
101
+ //# sourceMappingURL=restorePollerHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAkClC,sCAoCC;AAnED,wDAAiF;AACjF,6DAAmF;AACnF,0EAA0E;AAG1E,8CAKyB;AAgBzB;;;;GAIG;AACH,SAAgB,aAAa,CAC3B,MAAoB,EACpB,eAAuB,EACvB,eAAiF,EACjF,OAAuC;;IAEvC,MAAM,YAAY,GAAG,IAAA,2BAAgB,EAAC,eAAe,CAAC,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IACpE,IAAI,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,6BAA6B,eAAe,wBAAwB,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,IAAI,EAAE,CAC5F,CAAC;IACJ,CAAC;IACD,MAAM,sBAAsB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,wBAAwB,CAErD,CAAC;IACd,MAAM,EAAE,YAAY,EAAE,gBAAgB,GAAG,EAAE,EAAE,GAC3C,MAAA,wBAAwB,CAAC,iBAAiB,EAAE,aAAa,CAAC,mCAAI,EAAE,CAAC;IACnE,MAAM,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,mBAAmB,mCAAI,YAAY,CAAC;IACvE,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,0FAA0F,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,IAAI,GAAG,CACnH,CAAC;IACJ,CAAC;IACD,OAAO,IAAA,wCAAoB,EACzB,MAAC,MAAc,CAAC,SAAS,CAAC,mCAAI,MAAM,EACpC,iBAA4D,EAC5D,gBAAgB,EACh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AAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ImpactClient } from \"./impactClient.js\";\nimport { _connectorsCreateOrUpdateDeserialize } from \"./api/connectors/index.js\";\nimport { _workloadImpactsCreateDeserialize } from \"./api/workloadImpacts/index.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: ImpactClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"PUT /subscriptions/{subscriptionId}/providers/Microsoft.Impact/connectors/{connectorName}\": {\n deserializer: _connectorsCreateOrUpdateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"PUT /subscriptions/{subscriptionId}/providers/Microsoft.Impact/workloadImpacts/{workloadImpactName}\":\n {\n deserializer: _workloadImpactsCreateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,72 @@
1
+ import { Client, PathUncheckedResponse } from "@azure-rest/core-client";
2
+ /**
3
+ * Options for the byPage method
4
+ */
5
+ export interface PageSettings {
6
+ /**
7
+ * A reference to a specific page to start iterating from.
8
+ */
9
+ continuationToken?: string;
10
+ }
11
+ /**
12
+ * An interface that describes a page of results.
13
+ */
14
+ export type ContinuablePage<TElement, TPage = TElement[]> = TPage & {
15
+ /**
16
+ * The token that keeps track of where to continue the iterator
17
+ */
18
+ continuationToken?: string;
19
+ };
20
+ /**
21
+ * An interface that allows async iterable iteration both to completion and by page.
22
+ */
23
+ export interface PagedAsyncIterableIterator<TElement, TPage = TElement[], TPageSettings extends PageSettings = PageSettings> {
24
+ /**
25
+ * The next method, part of the iteration protocol
26
+ */
27
+ next(): Promise<IteratorResult<TElement>>;
28
+ /**
29
+ * The connection to the async iterator, part of the iteration protocol
30
+ */
31
+ [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
32
+ /**
33
+ * Return an AsyncIterableIterator that works a page at a time
34
+ */
35
+ byPage: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;
36
+ }
37
+ /**
38
+ * An interface that describes how to communicate with the service.
39
+ */
40
+ export interface PagedResult<TElement, TPage = TElement[], TPageSettings extends PageSettings = PageSettings> {
41
+ /**
42
+ * Link to the first page of results.
43
+ */
44
+ firstPageLink?: string;
45
+ /**
46
+ * A method that returns a page of results.
47
+ */
48
+ getPage: (pageLink?: string) => Promise<{
49
+ page: TPage;
50
+ nextPageLink?: string;
51
+ } | undefined>;
52
+ /**
53
+ * a function to implement the `byPage` method on the paged async iterator.
54
+ */
55
+ byPage?: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;
56
+ /**
57
+ * A function to extract elements from a page.
58
+ */
59
+ toElements?: (page: TPage) => TElement[];
60
+ }
61
+ /**
62
+ * Options for the paging helper
63
+ */
64
+ export interface BuildPagedAsyncIteratorOptions {
65
+ itemName?: string;
66
+ nextLinkName?: string;
67
+ }
68
+ /**
69
+ * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator
70
+ */
71
+ export declare function buildPagedAsyncIterator<TElement, TPage = TElement[], TPageSettings extends PageSettings = PageSettings, TResponse extends PathUncheckedResponse = PathUncheckedResponse>(client: Client, getInitialResponse: () => PromiseLike<TResponse>, processResponseBody: (result: TResponse) => PromiseLike<unknown>, expectedStatuses: string[], options?: BuildPagedAsyncIteratorOptions): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
72
+ //# sourceMappingURL=pagingHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagingHelpers.d.ts","sourceRoot":"","sources":["../../../src/static-helpers/pagingHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAmB,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGzF;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH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AEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EACR,KAAK,GAAG,QAAQ,EAAE,EAClB,aAAa,SAAS,YAAY,GAAG,YAAY,EACjD,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,EAE/D,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,MAAM,WAAW,CAAC,SAAS,CAAC,EAChD,mBAAmB,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,WAAW,CAAC,OAAO,CAAC,EAChE,gBAAgB,EAAE,MAAM,EAAE,EAC1B,OAAO,GAAE,8BAAmC,GAC3C,0BAA0B,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,CA0B5D"}
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.buildPagedAsyncIterator = buildPagedAsyncIterator;
6
+ const tslib_1 = require("tslib");
7
+ const core_client_1 = require("@azure-rest/core-client");
8
+ const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
9
+ /**
10
+ * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator
11
+ */
12
+ function buildPagedAsyncIterator(client, getInitialResponse, processResponseBody, expectedStatuses, options = {}) {
13
+ var _a, _b;
14
+ const itemName = (_a = options.itemName) !== null && _a !== void 0 ? _a : "value";
15
+ const nextLinkName = (_b = options.nextLinkName) !== null && _b !== void 0 ? _b : "nextLink";
16
+ const pagedResult = {
17
+ getPage: async (pageLink) => {
18
+ const result = pageLink === undefined
19
+ ? await getInitialResponse()
20
+ : await client.pathUnchecked(pageLink).get();
21
+ checkPagingRequest(result, expectedStatuses);
22
+ const results = await processResponseBody(result);
23
+ const nextLink = getNextLink(results, nextLinkName);
24
+ const values = getElements(results, itemName);
25
+ return {
26
+ page: values,
27
+ nextPageLink: nextLink,
28
+ };
29
+ },
30
+ byPage: (settings) => {
31
+ const { continuationToken } = settings !== null && settings !== void 0 ? settings : {};
32
+ return getPageAsyncIterator(pagedResult, {
33
+ pageLink: continuationToken,
34
+ });
35
+ },
36
+ };
37
+ return getPagedAsyncIterator(pagedResult);
38
+ }
39
+ /**
40
+ * returns an async iterator that iterates over results. It also has a `byPage`
41
+ * method that returns pages of items at once.
42
+ *
43
+ * @param pagedResult - an object that specifies how to get pages.
44
+ * @returns a paged async iterator that iterates over results.
45
+ */
46
+ function getPagedAsyncIterator(pagedResult) {
47
+ var _a;
48
+ const iter = getItemAsyncIterator(pagedResult);
49
+ return {
50
+ next() {
51
+ return iter.next();
52
+ },
53
+ [Symbol.asyncIterator]() {
54
+ return this;
55
+ },
56
+ byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {
57
+ const { continuationToken } = settings !== null && settings !== void 0 ? settings : {};
58
+ return getPageAsyncIterator(pagedResult, {
59
+ pageLink: continuationToken,
60
+ });
61
+ }),
62
+ };
63
+ }
64
+ function getItemAsyncIterator(pagedResult) {
65
+ return tslib_1.__asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {
66
+ var _a, e_1, _b, _c;
67
+ const pages = getPageAsyncIterator(pagedResult);
68
+ try {
69
+ for (var _d = true, pages_1 = tslib_1.__asyncValues(pages), pages_1_1; pages_1_1 = yield tslib_1.__await(pages_1.next()), _a = pages_1_1.done, !_a; _d = true) {
70
+ _c = pages_1_1.value;
71
+ _d = false;
72
+ const page = _c;
73
+ yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
74
+ }
75
+ }
76
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
77
+ finally {
78
+ try {
79
+ if (!_d && !_a && (_b = pages_1.return)) yield tslib_1.__await(_b.call(pages_1));
80
+ }
81
+ finally { if (e_1) throw e_1.error; }
82
+ }
83
+ });
84
+ }
85
+ function getPageAsyncIterator(pagedResult_1) {
86
+ return tslib_1.__asyncGenerator(this, arguments, function* getPageAsyncIterator_1(pagedResult, options = {}) {
87
+ const { pageLink } = options;
88
+ let response = yield tslib_1.__await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink));
89
+ if (!response) {
90
+ return yield tslib_1.__await(void 0);
91
+ }
92
+ let result = response.page;
93
+ result.continuationToken = response.nextPageLink;
94
+ yield yield tslib_1.__await(result);
95
+ while (response.nextPageLink) {
96
+ response = yield tslib_1.__await(pagedResult.getPage(response.nextPageLink));
97
+ if (!response) {
98
+ return yield tslib_1.__await(void 0);
99
+ }
100
+ result = response.page;
101
+ result.continuationToken = response.nextPageLink;
102
+ yield yield tslib_1.__await(result);
103
+ }
104
+ });
105
+ }
106
+ /**
107
+ * Gets for the value of nextLink in the body
108
+ */
109
+ function getNextLink(body, nextLinkName) {
110
+ if (!nextLinkName) {
111
+ return undefined;
112
+ }
113
+ const nextLink = body[nextLinkName];
114
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) {
115
+ throw new core_rest_pipeline_1.RestError(`Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`);
116
+ }
117
+ if (nextLink === null) {
118
+ return undefined;
119
+ }
120
+ return nextLink;
121
+ }
122
+ /**
123
+ * Gets the elements of the current request in the body.
124
+ */
125
+ function getElements(body, itemName) {
126
+ const value = body[itemName];
127
+ if (!Array.isArray(value)) {
128
+ throw new core_rest_pipeline_1.RestError(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
129
+ }
130
+ return value !== null && value !== void 0 ? value : [];
131
+ }
132
+ /**
133
+ * Checks if a request failed
134
+ */
135
+ function checkPagingRequest(response, expectedStatuses) {
136
+ if (!expectedStatuses.includes(response.status)) {
137
+ throw (0, core_client_1.createRestError)(`Pagination failed with unexpected statusCode ${response.status}`, response);
138
+ }
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KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,8BAAS,CACjB,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B,EAAE,gBAA0B;IACrF,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,MAAM,IAAA,6BAAe,EACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\n/**\n * Options for the byPage method\n */\nexport interface PageSettings {\n /**\n * A reference to a specific page to start iterating from.\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that describes a page of results.\n */\nexport type ContinuablePage<TElement, TPage = TElement[]> = TPage & {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n};\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\nexport interface PagedResult<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * Link to the first page of results.\n */\n firstPageLink?: string;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => TElement[];\n}\n\n/**\n * Options for the paging helper\n */\nexport interface BuildPagedAsyncIteratorOptions {\n itemName?: string;\n nextLinkName?: string;\n}\n\n/**\n * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator\n */\nexport function buildPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n>(\n client: Client,\n getInitialResponse: () => PromiseLike<TResponse>,\n processResponseBody: (result: TResponse) => PromiseLike<unknown>,\n expectedStatuses: string[],\n options: BuildPagedAsyncIteratorOptions = {},\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const itemName = options.itemName ?? \"value\";\n const nextLinkName = options.nextLinkName ?? \"nextLink\";\n const pagedResult: PagedResult<TElement, TPage, TPageSettings> = {\n getPage: async (pageLink?: string) => {\n const result =\n pageLink === undefined\n ? await getInitialResponse()\n : await client.pathUnchecked(pageLink).get();\n checkPagingRequest(result, expectedStatuses);\n const results = await processResponseBody(result as TResponse);\n const nextLink = getNextLink(results, nextLinkName);\n const values = getElements<TElement>(results, itemName) as TPage;\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n byPage: (settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n },\n };\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\n\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n ((settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n }),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n for await (const page of pages) {\n yield* page as unknown as TElement[];\n }\n}\n\nasync function* getPageAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n options: {\n pageLink?: string;\n } = {},\n): AsyncIterableIterator<ContinuablePage<TElement, TPage>> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n let result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n }\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\" && nextLink !== null) {\n throw new RestError(\n `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`,\n );\n }\n\n if (nextLink === null) {\n return undefined;\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n if (!Array.isArray(value)) {\n throw new RestError(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
@@ -0,0 +1,30 @@
1
+ import { PollerLike, OperationState, ResourceLocationConfig } from "@azure/core-lro";
2
+ import { Client, PathUncheckedResponse } from "@azure-rest/core-client";
3
+ import { AbortSignalLike } from "@azure/abort-controller";
4
+ export interface GetLongRunningPollerOptions<TResponse> {
5
+ /** Delay to wait until next poll, in milliseconds. */
6
+ updateIntervalInMs?: number;
7
+ /**
8
+ * The signal which can be used to abort requests.
9
+ */
10
+ abortSignal?: AbortSignalLike;
11
+ /**
12
+ * The potential location of the result of the LRO if specified by the LRO extension in the swagger.
13
+ */
14
+ resourceLocationConfig?: ResourceLocationConfig;
15
+ /**
16
+ * The original url of the LRO
17
+ * Should not be null when restoreFrom is set
18
+ */
19
+ initialRequestUrl?: string;
20
+ /**
21
+ * A serialized poller which can be used to resume an existing paused Long-Running-Operation.
22
+ */
23
+ restoreFrom?: string;
24
+ /**
25
+ * The function to get the initial response
26
+ */
27
+ getInitialResponse?: () => PromiseLike<TResponse>;
28
+ }
29
+ export declare function getLongRunningPoller<TResponse extends PathUncheckedResponse, TResult = void>(client: Client, processResponseBody: (result: TResponse) => Promise<TResult>, expectedStatuses: string[], options: GetLongRunningPollerOptions<TResponse>): PollerLike<OperationState<TResult>, TResult>;
30
+ //# sourceMappingURL=pollingHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pollingHelpers.d.ts","sourceRoot":"","sources":["../../../src/static-helpers/pollingHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EACV,cAAc,EACd,sBAAsB,EAIvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAmB,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,2BAA2B,CAAC,SAAS;IACpD,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;OAEG;IACH,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,WAAW,CAAC,SAAS,CAAC,CAAC;CACnD;AACD,wBAAgB,oBAAoB,CAAC,SAAS,SAAS,qBAAqB,EAAE,OAAO,GAAG,IAAI,EAC1F,MAAM,EAAE,MAAM,EACd,mBAAmB,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,EAC5D,gBAAgB,EAAE,MAAM,EAAE,EAC1B,OAAO,EAAE,2BAA2B,CAAC,SAAS,CAAC,GAC9C,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAyD9C"}