@azure/arm-qumulo 2.0.2-alpha.20260310.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +12 -11
  3. package/dist/browser/api/fileSystems/index.d.ts +3 -0
  4. package/dist/browser/api/fileSystems/index.js +4 -0
  5. package/dist/browser/api/fileSystems/index.js.map +1 -0
  6. package/dist/browser/api/fileSystems/operations.d.ts +31 -0
  7. package/dist/browser/api/fileSystems/operations.js +194 -0
  8. package/dist/browser/api/fileSystems/operations.js.map +1 -0
  9. package/dist/browser/api/fileSystems/options.d.ts +24 -0
  10. package/dist/browser/api/fileSystems/options.js +4 -0
  11. package/dist/browser/api/fileSystems/options.js.map +1 -0
  12. package/dist/browser/api/index.d.ts +3 -0
  13. package/dist/browser/api/index.js +4 -0
  14. package/dist/browser/api/index.js.map +1 -0
  15. package/dist/browser/api/operations/index.d.ts +3 -0
  16. package/dist/browser/api/operations/index.js +4 -0
  17. package/dist/browser/api/operations/index.js.map +1 -0
  18. package/dist/browser/api/operations/operations.d.ts +10 -0
  19. package/dist/browser/api/operations/operations.js +33 -0
  20. package/dist/browser/api/operations/operations.js.map +1 -0
  21. package/dist/browser/api/operations/options.d.ts +5 -0
  22. package/dist/browser/api/operations/options.js +4 -0
  23. package/dist/browser/api/operations/options.js.map +1 -0
  24. package/dist/browser/api/qumuloStorageContext.d.ts +20 -0
  25. package/dist/browser/api/qumuloStorageContext.js +25 -0
  26. package/dist/browser/api/qumuloStorageContext.js.map +1 -0
  27. package/dist/browser/classic/fileSystems/index.d.ts +31 -0
  28. package/dist/browser/classic/fileSystems/index.js +36 -0
  29. package/dist/browser/classic/fileSystems/index.js.map +1 -0
  30. package/dist/browser/classic/index.d.ts +3 -0
  31. package/dist/browser/classic/index.js +4 -0
  32. package/dist/browser/classic/index.js.map +1 -0
  33. package/dist/browser/classic/operations/index.d.ts +11 -0
  34. package/dist/browser/classic/operations/index.js +14 -0
  35. package/dist/browser/classic/operations/index.js.map +1 -0
  36. package/dist/browser/index.d.ts +16 -3
  37. package/dist/browser/index.js +7 -11
  38. package/dist/browser/index.js.map +1 -1
  39. package/dist/browser/logger.d.ts +2 -0
  40. package/dist/browser/logger.js +5 -0
  41. package/dist/browser/logger.js.map +1 -0
  42. package/dist/browser/models/index.d.ts +2 -478
  43. package/dist/browser/models/index.js +3 -79
  44. package/dist/browser/models/index.js.map +1 -1
  45. package/dist/browser/models/models.d.ts +392 -0
  46. package/dist/browser/models/models.js +413 -0
  47. package/dist/browser/models/models.js.map +1 -0
  48. package/dist/browser/qumuloStorage.d.ts +15 -19
  49. package/dist/browser/qumuloStorage.js +23 -103
  50. package/dist/browser/qumuloStorage.js.map +1 -1
  51. package/dist/browser/restorePollerHelpers.d.ts +21 -0
  52. package/dist/browser/restorePollerHelpers.js +95 -0
  53. package/dist/browser/restorePollerHelpers.js.map +1 -0
  54. package/dist/browser/static-helpers/cloudSettingHelpers.d.ts +22 -0
  55. package/dist/browser/static-helpers/cloudSettingHelpers.js +38 -0
  56. package/dist/browser/static-helpers/cloudSettingHelpers.js.map +1 -0
  57. package/dist/browser/static-helpers/pagingHelpers.d.ts +74 -0
  58. package/dist/browser/static-helpers/pagingHelpers.js +143 -0
  59. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
  60. package/dist/browser/static-helpers/pollingHelpers.d.ts +34 -0
  61. package/dist/browser/static-helpers/pollingHelpers.js +95 -0
  62. package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
  63. package/dist/browser/static-helpers/serialization/check-prop-undefined.d.ts +8 -0
  64. package/dist/browser/static-helpers/serialization/check-prop-undefined.js +17 -0
  65. package/dist/browser/static-helpers/serialization/check-prop-undefined.js.map +1 -0
  66. package/dist/browser/static-helpers/simplePollerHelpers.d.ts +73 -0
  67. package/dist/browser/static-helpers/simplePollerHelpers.js +44 -0
  68. package/dist/browser/static-helpers/simplePollerHelpers.js.map +1 -0
  69. package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
  70. package/dist/browser/static-helpers/urlTemplate.js +200 -0
  71. package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
  72. package/dist/commonjs/api/fileSystems/index.d.ts +3 -0
  73. package/dist/commonjs/api/fileSystems/index.js +38 -0
  74. package/dist/commonjs/api/fileSystems/index.js.map +7 -0
  75. package/dist/commonjs/api/fileSystems/operations.d.ts +31 -0
  76. package/dist/commonjs/api/fileSystems/operations.js +282 -0
  77. package/dist/commonjs/api/fileSystems/operations.js.map +7 -0
  78. package/dist/commonjs/api/fileSystems/options.d.ts +24 -0
  79. package/dist/commonjs/{operationsInterfaces/operations.js → api/fileSystems/options.js} +3 -2
  80. package/dist/commonjs/api/fileSystems/options.js.map +7 -0
  81. package/dist/commonjs/api/index.d.ts +3 -0
  82. package/dist/commonjs/{operationsInterfaces → api}/index.js +12 -7
  83. package/dist/commonjs/api/index.js.map +7 -0
  84. package/dist/commonjs/api/operations/index.d.ts +3 -0
  85. package/dist/commonjs/{operations → api/operations}/index.js +10 -5
  86. package/dist/commonjs/api/operations/index.js.map +7 -0
  87. package/dist/commonjs/api/operations/operations.d.ts +10 -0
  88. package/dist/commonjs/api/operations/operations.js +70 -0
  89. package/dist/commonjs/api/operations/operations.js.map +7 -0
  90. package/dist/commonjs/api/operations/options.d.ts +5 -0
  91. package/dist/commonjs/api/operations/options.js +16 -0
  92. package/dist/commonjs/api/operations/options.js.map +7 -0
  93. package/dist/commonjs/api/qumuloStorageContext.d.ts +20 -0
  94. package/dist/commonjs/api/qumuloStorageContext.js +47 -0
  95. package/dist/commonjs/api/qumuloStorageContext.js.map +7 -0
  96. package/dist/commonjs/classic/fileSystems/index.d.ts +31 -0
  97. package/dist/commonjs/classic/fileSystems/index.js +60 -0
  98. package/dist/commonjs/classic/fileSystems/index.js.map +7 -0
  99. package/dist/commonjs/classic/index.d.ts +3 -0
  100. package/dist/commonjs/{operationsInterfaces/fileSystems.js → classic/index.js} +3 -2
  101. package/dist/commonjs/classic/index.js.map +7 -0
  102. package/dist/commonjs/classic/operations/index.d.ts +11 -0
  103. package/dist/commonjs/{lroImpl.js → classic/operations/index.js} +14 -19
  104. package/dist/commonjs/classic/operations/index.js.map +7 -0
  105. package/dist/commonjs/index.d.ts +16 -3
  106. package/dist/commonjs/index.js +27 -8
  107. package/dist/commonjs/index.js.map +3 -3
  108. package/dist/commonjs/logger.d.ts +2 -0
  109. package/dist/commonjs/logger.js +29 -0
  110. package/dist/commonjs/logger.js.map +7 -0
  111. package/dist/commonjs/models/index.d.ts +2 -478
  112. package/dist/commonjs/models/index.js +11 -49
  113. package/dist/commonjs/models/index.js.map +4 -4
  114. package/dist/commonjs/models/models.d.ts +392 -0
  115. package/dist/commonjs/models/models.js +436 -0
  116. package/dist/commonjs/models/models.js.map +7 -0
  117. package/dist/commonjs/qumuloStorage.d.ts +15 -19
  118. package/dist/commonjs/qumuloStorage.js +20 -99
  119. package/dist/commonjs/qumuloStorage.js.map +3 -3
  120. package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
  121. package/dist/commonjs/restorePollerHelpers.js +108 -0
  122. package/dist/commonjs/restorePollerHelpers.js.map +7 -0
  123. package/dist/commonjs/static-helpers/cloudSettingHelpers.d.ts +22 -0
  124. package/dist/commonjs/static-helpers/cloudSettingHelpers.js +52 -0
  125. package/dist/commonjs/static-helpers/cloudSettingHelpers.js.map +7 -0
  126. package/dist/commonjs/static-helpers/pagingHelpers.d.ts +74 -0
  127. package/dist/commonjs/static-helpers/pagingHelpers.js +143 -0
  128. package/dist/commonjs/static-helpers/pagingHelpers.js.map +7 -0
  129. package/dist/commonjs/static-helpers/pollingHelpers.d.ts +34 -0
  130. package/dist/commonjs/static-helpers/pollingHelpers.js +101 -0
  131. package/dist/commonjs/static-helpers/pollingHelpers.js.map +7 -0
  132. package/dist/commonjs/static-helpers/serialization/check-prop-undefined.d.ts +8 -0
  133. package/dist/commonjs/{pagingHelper.js → static-helpers/serialization/check-prop-undefined.js} +12 -20
  134. package/dist/commonjs/static-helpers/serialization/check-prop-undefined.js.map +7 -0
  135. package/dist/commonjs/static-helpers/simplePollerHelpers.d.ts +73 -0
  136. package/dist/commonjs/static-helpers/simplePollerHelpers.js +67 -0
  137. package/dist/commonjs/static-helpers/simplePollerHelpers.js.map +7 -0
  138. package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
  139. package/dist/commonjs/static-helpers/urlTemplate.js +197 -0
  140. package/dist/commonjs/static-helpers/urlTemplate.js.map +7 -0
  141. package/dist/commonjs/tsdoc-metadata.json +1 -1
  142. package/dist/esm/api/fileSystems/index.d.ts +3 -0
  143. package/dist/esm/api/fileSystems/index.js +4 -0
  144. package/dist/esm/api/fileSystems/index.js.map +1 -0
  145. package/dist/esm/api/fileSystems/operations.d.ts +31 -0
  146. package/dist/esm/api/fileSystems/operations.js +194 -0
  147. package/dist/esm/api/fileSystems/operations.js.map +1 -0
  148. package/dist/esm/api/fileSystems/options.d.ts +24 -0
  149. package/dist/esm/api/fileSystems/options.js +4 -0
  150. package/dist/esm/api/fileSystems/options.js.map +1 -0
  151. package/dist/esm/api/index.d.ts +3 -0
  152. package/dist/esm/api/index.js +4 -0
  153. package/dist/esm/api/index.js.map +1 -0
  154. package/dist/esm/api/operations/index.d.ts +3 -0
  155. package/dist/esm/api/operations/index.js +4 -0
  156. package/dist/esm/api/operations/index.js.map +1 -0
  157. package/dist/esm/api/operations/operations.d.ts +10 -0
  158. package/dist/esm/api/operations/operations.js +33 -0
  159. package/dist/esm/api/operations/operations.js.map +1 -0
  160. package/dist/esm/api/operations/options.d.ts +5 -0
  161. package/dist/esm/api/operations/options.js +4 -0
  162. package/dist/esm/api/operations/options.js.map +1 -0
  163. package/dist/esm/api/qumuloStorageContext.d.ts +20 -0
  164. package/dist/esm/api/qumuloStorageContext.js +25 -0
  165. package/dist/esm/api/qumuloStorageContext.js.map +1 -0
  166. package/dist/esm/classic/fileSystems/index.d.ts +31 -0
  167. package/dist/esm/classic/fileSystems/index.js +36 -0
  168. package/dist/esm/classic/fileSystems/index.js.map +1 -0
  169. package/dist/esm/classic/index.d.ts +3 -0
  170. package/dist/esm/classic/index.js +4 -0
  171. package/dist/esm/classic/index.js.map +1 -0
  172. package/dist/esm/classic/operations/index.d.ts +11 -0
  173. package/dist/esm/classic/operations/index.js +14 -0
  174. package/dist/esm/classic/operations/index.js.map +1 -0
  175. package/dist/esm/index.d.ts +16 -3
  176. package/dist/esm/index.js +9 -8
  177. package/dist/esm/index.js.map +1 -7
  178. package/dist/esm/logger.d.ts +2 -0
  179. package/dist/esm/logger.js +5 -0
  180. package/dist/esm/logger.js.map +1 -0
  181. package/dist/esm/models/index.d.ts +2 -478
  182. package/dist/esm/models/index.js +4 -50
  183. package/dist/esm/models/index.js.map +1 -7
  184. package/dist/esm/models/models.d.ts +392 -0
  185. package/dist/esm/models/models.js +413 -0
  186. package/dist/esm/models/models.js.map +1 -0
  187. package/dist/esm/qumuloStorage.d.ts +15 -19
  188. package/dist/esm/qumuloStorage.js +26 -94
  189. package/dist/esm/qumuloStorage.js.map +1 -7
  190. package/dist/esm/restorePollerHelpers.d.ts +21 -0
  191. package/dist/esm/restorePollerHelpers.js +95 -0
  192. package/dist/esm/restorePollerHelpers.js.map +1 -0
  193. package/dist/esm/static-helpers/cloudSettingHelpers.d.ts +22 -0
  194. package/dist/esm/static-helpers/cloudSettingHelpers.js +38 -0
  195. package/dist/esm/static-helpers/cloudSettingHelpers.js.map +1 -0
  196. package/dist/esm/static-helpers/pagingHelpers.d.ts +74 -0
  197. package/dist/esm/static-helpers/pagingHelpers.js +143 -0
  198. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
  199. package/dist/esm/static-helpers/pollingHelpers.d.ts +34 -0
  200. package/dist/esm/static-helpers/pollingHelpers.js +95 -0
  201. package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
  202. package/dist/esm/static-helpers/serialization/check-prop-undefined.d.ts +8 -0
  203. package/dist/esm/static-helpers/serialization/check-prop-undefined.js +17 -0
  204. package/dist/esm/static-helpers/serialization/check-prop-undefined.js.map +1 -0
  205. package/dist/esm/static-helpers/simplePollerHelpers.d.ts +73 -0
  206. package/dist/esm/static-helpers/simplePollerHelpers.js +44 -0
  207. package/dist/esm/static-helpers/simplePollerHelpers.js.map +1 -0
  208. package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
  209. package/dist/esm/static-helpers/urlTemplate.js +200 -0
  210. package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
  211. package/package.json +147 -81
  212. package/CHANGELOG.md +0 -40
  213. package/dist/browser/index.d.ts.map +0 -1
  214. package/dist/browser/lroImpl.d.ts +0 -11
  215. package/dist/browser/lroImpl.d.ts.map +0 -1
  216. package/dist/browser/lroImpl.js +0 -18
  217. package/dist/browser/lroImpl.js.map +0 -1
  218. package/dist/browser/models/index.d.ts.map +0 -1
  219. package/dist/browser/models/mappers.d.ts +0 -21
  220. package/dist/browser/models/mappers.d.ts.map +0 -1
  221. package/dist/browser/models/mappers.js +0 -641
  222. package/dist/browser/models/mappers.js.map +0 -1
  223. package/dist/browser/models/parameters.d.ts +0 -12
  224. package/dist/browser/models/parameters.d.ts.map +0 -1
  225. package/dist/browser/models/parameters.js +0 -112
  226. package/dist/browser/models/parameters.js.map +0 -1
  227. package/dist/browser/operations/fileSystems.d.ts +0 -99
  228. package/dist/browser/operations/fileSystems.d.ts.map +0 -1
  229. package/dist/browser/operations/fileSystems.js +0 -465
  230. package/dist/browser/operations/fileSystems.js.map +0 -1
  231. package/dist/browser/operations/index.d.ts +0 -3
  232. package/dist/browser/operations/index.d.ts.map +0 -1
  233. package/dist/browser/operations/index.js +0 -10
  234. package/dist/browser/operations/index.js.map +0 -1
  235. package/dist/browser/operations/operations.d.ts +0 -32
  236. package/dist/browser/operations/operations.d.ts.map +0 -1
  237. package/dist/browser/operations/operations.js +0 -116
  238. package/dist/browser/operations/operations.js.map +0 -1
  239. package/dist/browser/operationsInterfaces/fileSystems.d.ts +0 -63
  240. package/dist/browser/operationsInterfaces/fileSystems.d.ts.map +0 -1
  241. package/dist/browser/operationsInterfaces/fileSystems.js +0 -9
  242. package/dist/browser/operationsInterfaces/fileSystems.js.map +0 -1
  243. package/dist/browser/operationsInterfaces/index.d.ts +0 -3
  244. package/dist/browser/operationsInterfaces/index.d.ts.map +0 -1
  245. package/dist/browser/operationsInterfaces/index.js +0 -10
  246. package/dist/browser/operationsInterfaces/index.js.map +0 -1
  247. package/dist/browser/operationsInterfaces/operations.d.ts +0 -11
  248. package/dist/browser/operationsInterfaces/operations.d.ts.map +0 -1
  249. package/dist/browser/operationsInterfaces/operations.js +0 -9
  250. package/dist/browser/operationsInterfaces/operations.js.map +0 -1
  251. package/dist/browser/pagingHelper.d.ts +0 -13
  252. package/dist/browser/pagingHelper.d.ts.map +0 -1
  253. package/dist/browser/pagingHelper.js +0 -30
  254. package/dist/browser/pagingHelper.js.map +0 -1
  255. package/dist/browser/qumuloStorage.d.ts.map +0 -1
  256. package/dist/commonjs/index.d.ts.map +0 -1
  257. package/dist/commonjs/lroImpl.d.ts +0 -11
  258. package/dist/commonjs/lroImpl.d.ts.map +0 -1
  259. package/dist/commonjs/lroImpl.js.map +0 -7
  260. package/dist/commonjs/models/index.d.ts.map +0 -1
  261. package/dist/commonjs/models/mappers.d.ts +0 -21
  262. package/dist/commonjs/models/mappers.d.ts.map +0 -1
  263. package/dist/commonjs/models/mappers.js +0 -695
  264. package/dist/commonjs/models/mappers.js.map +0 -7
  265. package/dist/commonjs/models/parameters.d.ts +0 -12
  266. package/dist/commonjs/models/parameters.d.ts.map +0 -1
  267. package/dist/commonjs/models/parameters.js +0 -148
  268. package/dist/commonjs/models/parameters.js.map +0 -7
  269. package/dist/commonjs/operations/fileSystems.d.ts +0 -99
  270. package/dist/commonjs/operations/fileSystems.d.ts.map +0 -1
  271. package/dist/commonjs/operations/fileSystems.js +0 -532
  272. package/dist/commonjs/operations/fileSystems.js.map +0 -7
  273. package/dist/commonjs/operations/index.d.ts +0 -3
  274. package/dist/commonjs/operations/index.d.ts.map +0 -1
  275. package/dist/commonjs/operations/index.js.map +0 -7
  276. package/dist/commonjs/operations/operations.d.ts +0 -32
  277. package/dist/commonjs/operations/operations.d.ts.map +0 -1
  278. package/dist/commonjs/operations/operations.js +0 -148
  279. package/dist/commonjs/operations/operations.js.map +0 -7
  280. package/dist/commonjs/operationsInterfaces/fileSystems.d.ts +0 -63
  281. package/dist/commonjs/operationsInterfaces/fileSystems.d.ts.map +0 -1
  282. package/dist/commonjs/operationsInterfaces/fileSystems.js.map +0 -7
  283. package/dist/commonjs/operationsInterfaces/index.d.ts +0 -3
  284. package/dist/commonjs/operationsInterfaces/index.d.ts.map +0 -1
  285. package/dist/commonjs/operationsInterfaces/index.js.map +0 -7
  286. package/dist/commonjs/operationsInterfaces/operations.d.ts +0 -11
  287. package/dist/commonjs/operationsInterfaces/operations.d.ts.map +0 -1
  288. package/dist/commonjs/operationsInterfaces/operations.js.map +0 -7
  289. package/dist/commonjs/pagingHelper.d.ts +0 -13
  290. package/dist/commonjs/pagingHelper.d.ts.map +0 -1
  291. package/dist/commonjs/pagingHelper.js.map +0 -7
  292. package/dist/commonjs/qumuloStorage.d.ts.map +0 -1
  293. package/dist/esm/index.d.ts.map +0 -1
  294. package/dist/esm/lroImpl.d.ts +0 -11
  295. package/dist/esm/lroImpl.d.ts.map +0 -1
  296. package/dist/esm/lroImpl.js +0 -20
  297. package/dist/esm/lroImpl.js.map +0 -7
  298. package/dist/esm/models/index.d.ts.map +0 -1
  299. package/dist/esm/models/mappers.d.ts +0 -21
  300. package/dist/esm/models/mappers.d.ts.map +0 -1
  301. package/dist/esm/models/mappers.js +0 -654
  302. package/dist/esm/models/mappers.js.map +0 -7
  303. package/dist/esm/models/parameters.d.ts +0 -12
  304. package/dist/esm/models/parameters.d.ts.map +0 -1
  305. package/dist/esm/models/parameters.js +0 -119
  306. package/dist/esm/models/parameters.js.map +0 -7
  307. package/dist/esm/operations/fileSystems.d.ts +0 -99
  308. package/dist/esm/operations/fileSystems.d.ts.map +0 -1
  309. package/dist/esm/operations/fileSystems.js +0 -501
  310. package/dist/esm/operations/fileSystems.js.map +0 -7
  311. package/dist/esm/operations/index.d.ts +0 -3
  312. package/dist/esm/operations/index.d.ts.map +0 -1
  313. package/dist/esm/operations/index.js +0 -2
  314. package/dist/esm/operations/index.js.map +0 -7
  315. package/dist/esm/operations/operations.d.ts +0 -32
  316. package/dist/esm/operations/operations.d.ts.map +0 -1
  317. package/dist/esm/operations/operations.js +0 -115
  318. package/dist/esm/operations/operations.js.map +0 -7
  319. package/dist/esm/operationsInterfaces/fileSystems.d.ts +0 -63
  320. package/dist/esm/operationsInterfaces/fileSystems.d.ts.map +0 -1
  321. package/dist/esm/operationsInterfaces/fileSystems.js +0 -0
  322. package/dist/esm/operationsInterfaces/fileSystems.js.map +0 -7
  323. package/dist/esm/operationsInterfaces/index.d.ts +0 -3
  324. package/dist/esm/operationsInterfaces/index.d.ts.map +0 -1
  325. package/dist/esm/operationsInterfaces/index.js +0 -2
  326. package/dist/esm/operationsInterfaces/index.js.map +0 -7
  327. package/dist/esm/operationsInterfaces/operations.d.ts +0 -11
  328. package/dist/esm/operationsInterfaces/operations.d.ts.map +0 -1
  329. package/dist/esm/operationsInterfaces/operations.js +0 -0
  330. package/dist/esm/operationsInterfaces/operations.js.map +0 -7
  331. package/dist/esm/pagingHelper.d.ts +0 -13
  332. package/dist/esm/pagingHelper.d.ts.map +0 -1
  333. package/dist/esm/pagingHelper.js +0 -19
  334. package/dist/esm/pagingHelper.js.map +0 -7
  335. package/dist/esm/qumuloStorage.d.ts.map +0 -1
  336. package/dist/react-native/index.d.ts +0 -5
  337. package/dist/react-native/index.d.ts.map +0 -1
  338. package/dist/react-native/index.js +0 -13
  339. package/dist/react-native/index.js.map +0 -1
  340. package/dist/react-native/lroImpl.d.ts +0 -11
  341. package/dist/react-native/lroImpl.d.ts.map +0 -1
  342. package/dist/react-native/lroImpl.js +0 -18
  343. package/dist/react-native/lroImpl.js.map +0 -1
  344. package/dist/react-native/models/index.d.ts +0 -479
  345. package/dist/react-native/models/index.d.ts.map +0 -1
  346. package/dist/react-native/models/index.js +0 -80
  347. package/dist/react-native/models/index.js.map +0 -1
  348. package/dist/react-native/models/mappers.d.ts +0 -21
  349. package/dist/react-native/models/mappers.d.ts.map +0 -1
  350. package/dist/react-native/models/mappers.js +0 -641
  351. package/dist/react-native/models/mappers.js.map +0 -1
  352. package/dist/react-native/models/parameters.d.ts +0 -12
  353. package/dist/react-native/models/parameters.d.ts.map +0 -1
  354. package/dist/react-native/models/parameters.js +0 -112
  355. package/dist/react-native/models/parameters.js.map +0 -1
  356. package/dist/react-native/operations/fileSystems.d.ts +0 -99
  357. package/dist/react-native/operations/fileSystems.d.ts.map +0 -1
  358. package/dist/react-native/operations/fileSystems.js +0 -465
  359. package/dist/react-native/operations/fileSystems.js.map +0 -1
  360. package/dist/react-native/operations/index.d.ts +0 -3
  361. package/dist/react-native/operations/index.d.ts.map +0 -1
  362. package/dist/react-native/operations/index.js +0 -10
  363. package/dist/react-native/operations/index.js.map +0 -1
  364. package/dist/react-native/operations/operations.d.ts +0 -32
  365. package/dist/react-native/operations/operations.d.ts.map +0 -1
  366. package/dist/react-native/operations/operations.js +0 -116
  367. package/dist/react-native/operations/operations.js.map +0 -1
  368. package/dist/react-native/operationsInterfaces/fileSystems.d.ts +0 -63
  369. package/dist/react-native/operationsInterfaces/fileSystems.d.ts.map +0 -1
  370. package/dist/react-native/operationsInterfaces/fileSystems.js +0 -9
  371. package/dist/react-native/operationsInterfaces/fileSystems.js.map +0 -1
  372. package/dist/react-native/operationsInterfaces/index.d.ts +0 -3
  373. package/dist/react-native/operationsInterfaces/index.d.ts.map +0 -1
  374. package/dist/react-native/operationsInterfaces/index.js +0 -10
  375. package/dist/react-native/operationsInterfaces/index.js.map +0 -1
  376. package/dist/react-native/operationsInterfaces/operations.d.ts +0 -11
  377. package/dist/react-native/operationsInterfaces/operations.d.ts.map +0 -1
  378. package/dist/react-native/operationsInterfaces/operations.js +0 -9
  379. package/dist/react-native/operationsInterfaces/operations.js.map +0 -1
  380. package/dist/react-native/package.json +0 -3
  381. package/dist/react-native/pagingHelper.d.ts +0 -13
  382. package/dist/react-native/pagingHelper.d.ts.map +0 -1
  383. package/dist/react-native/pagingHelper.js +0 -30
  384. package/dist/react-native/pagingHelper.js.map +0 -1
  385. package/dist/react-native/qumuloStorage.d.ts +0 -21
  386. package/dist/react-native/qumuloStorage.d.ts.map +0 -1
  387. package/dist/react-native/qumuloStorage.js +0 -108
  388. package/dist/react-native/qumuloStorage.js.map +0 -1
  389. package/review/arm-qumulo-node.api.md +0 -346
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,114 +14,37 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
  var qumuloStorage_exports = {};
29
19
  __export(qumuloStorage_exports, {
30
20
  QumuloStorage: () => QumuloStorage
31
21
  });
32
22
  module.exports = __toCommonJS(qumuloStorage_exports);
33
- var coreClient = __toESM(require("@azure/core-client"));
34
- var coreRestPipeline = __toESM(require("@azure/core-rest-pipeline"));
35
- var import_operations = require("./operations/index.js");
36
- class QumuloStorage extends coreClient.ServiceClient {
37
- $host;
38
- apiVersion;
39
- subscriptionId;
40
- /**
41
- * Initializes a new instance of the QumuloStorage class.
42
- * @param credentials Subscription credentials which uniquely identify client subscription.
43
- * @param subscriptionId The ID of the target subscription.
44
- * @param options The parameter options
45
- */
46
- constructor(credentials, subscriptionId, options) {
47
- if (credentials === void 0) {
48
- throw new Error("'credentials' cannot be null");
49
- }
50
- if (subscriptionId === void 0) {
51
- throw new Error("'subscriptionId' cannot be null");
52
- }
53
- if (!options) {
54
- options = {};
55
- }
56
- const defaults = {
57
- requestContentType: "application/json; charset=utf-8",
58
- credential: credentials
59
- };
60
- const packageDetails = `azsdk-js-arm-qumulo/2.0.2`;
61
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`;
62
- const optionsWithDefaults = {
63
- ...defaults,
23
+ var import_api = require("./api/index.js");
24
+ var import_fileSystems = require("./classic/fileSystems/index.js");
25
+ var import_operations = require("./classic/operations/index.js");
26
+ class QumuloStorage {
27
+ _client;
28
+ /** The pipeline used by this client to make requests */
29
+ pipeline;
30
+ constructor(credential, subscriptionId, options = {}) {
31
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
32
+ const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-client` : `azsdk-js-client`;
33
+ this._client = (0, import_api.createQumuloStorage)(credential, subscriptionId, {
64
34
  ...options,
65
- userAgentOptions: {
66
- userAgentPrefix
67
- },
68
- endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
69
- };
70
- super(optionsWithDefaults);
71
- let bearerTokenAuthenticationPolicyFound = false;
72
- if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
73
- const pipelinePolicies = options.pipeline.getOrderedPolicies();
74
- bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
75
- (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName
76
- );
77
- }
78
- if (!options || !options.pipeline || options.pipeline.getOrderedPolicies().length == 0 || !bearerTokenAuthenticationPolicyFound) {
79
- this.pipeline.removePolicy({
80
- name: coreRestPipeline.bearerTokenAuthenticationPolicyName
81
- });
82
- this.pipeline.addPolicy(
83
- coreRestPipeline.bearerTokenAuthenticationPolicy({
84
- credential: credentials,
85
- scopes: optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,
86
- challengeCallbacks: {
87
- authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
88
- }
89
- })
90
- );
91
- }
92
- this.subscriptionId = subscriptionId;
93
- this.$host = options.$host || "https://management.azure.com";
94
- this.apiVersion = options.apiVersion || "2024-06-19";
95
- this.operations = new import_operations.OperationsImpl(this);
96
- this.fileSystems = new import_operations.FileSystemsImpl(this);
97
- this.addCustomApiVersionPolicy(options.apiVersion);
35
+ userAgentOptions: { userAgentPrefix }
36
+ });
37
+ this.pipeline = this._client.pipeline;
38
+ this.fileSystems = (0, import_fileSystems._getFileSystemsOperations)(this._client);
39
+ this.operations = (0, import_operations._getOperationsOperations)(this._client);
98
40
  }
99
- /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
100
- addCustomApiVersionPolicy(apiVersion) {
101
- if (!apiVersion) {
102
- return;
103
- }
104
- const apiVersionPolicy = {
105
- name: "CustomApiVersionPolicy",
106
- async sendRequest(request, next) {
107
- const param = request.url.split("?");
108
- if (param.length > 1) {
109
- const newParams = param[1].split("&").map((item) => {
110
- if (item.indexOf("api-version") > -1) {
111
- return "api-version=" + apiVersion;
112
- } else {
113
- return item;
114
- }
115
- });
116
- request.url = param[0] + "?" + newParams.join("&");
117
- }
118
- return next(request);
119
- }
120
- };
121
- this.pipeline.addPolicy(apiVersionPolicy);
122
- }
123
- operations;
41
+ /** The operation groups for fileSystems */
124
42
  fileSystems;
43
+ /** The operation groups for operations */
44
+ operations;
125
45
  }
126
46
  // Annotate the CommonJS export names for ESM import in node:
127
47
  0 && (module.exports = {
128
48
  QumuloStorage
129
49
  });
50
+ //# sourceMappingURL=qumuloStorage.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["/mnt/vss/_work/1/s/sdk/liftrqumulo/arm-qumulo/src/qumuloStorage.ts"],
4
- "sourcesContent": ["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { OperationsImpl, FileSystemsImpl } from \"./operations/index.js\";\nimport { Operations, FileSystems } from \"./operationsInterfaces/index.js\";\nimport { QumuloStorageOptionalParams } from \"./models/index.js\";\n\nexport class QumuloStorage extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the QumuloStorage class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: QumuloStorageOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: QumuloStorageOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-qumulo/2.0.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-06-19\";\n this.operations = new OperationsImpl(this);\n this.fileSystems = new FileSystemsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n operations: Operations;\n fileSystems: FileSystems;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,iBAA4B;AAC5B,uBAAkC;AAOlC,wBAAgD;AAIzC,MAAM,sBAAsB,WAAW,cAAc;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,YACE,aACA,gBACA,SACA;AACA,QAAI,gBAAgB,QAAW;AAC7B,YAAM,IAAI,MAAM,8BAA8B;AAAA,IAChD;AACA,QAAI,mBAAmB,QAAW;AAChC,YAAM,IAAI,MAAM,iCAAiC;AAAA,IACnD;AAGA,QAAI,CAAC,SAAS;AACZ,gBAAU,CAAC;AAAA,IACb;AACA,UAAM,WAAwC;AAAA,MAC5C,oBAAoB;AAAA,MACpB,YAAY;AAAA,IACd;AAEA,UAAM,iBAAiB;AACvB,UAAM,kBACJ,QAAQ,oBAAoB,QAAQ,iBAAiB,kBACjD,GAAG,QAAQ,iBAAiB,eAAe,IAAI,cAAc,KAC7D,GAAG,cAAc;AAEvB,UAAM,sBAAsB;AAAA,MAC1B,GAAG;AAAA,MACH,GAAG;AAAA,MACH,kBAAkB;AAAA,QAChB;AAAA,MACF;AAAA,MACA,UACE,QAAQ,YAAY,QAAQ,WAAW;AAAA,IAC3C;AACA,UAAM,mBAAmB;AAEzB,QAAI,uCAAgD;AACpD,QAAI,SAAS,YAAY,QAAQ,SAAS,mBAAmB,EAAE,SAAS,GAAG;AACzE,YAAM,mBACJ,QAAQ,SAAS,mBAAmB;AACtC,6CAAuC,iBAAiB;AAAA,QACtD,CAAC,mBACC,eAAe,SACf,iBAAiB;AAAA,MACrB;AAAA,IACF;AACA,QACE,CAAC,WACD,CAAC,QAAQ,YACT,QAAQ,SAAS,mBAAmB,EAAE,UAAU,KAChD,CAAC,sCACD;AACA,WAAK,SAAS,aAAa;AAAA,QACzB,MAAM,iBAAiB;AAAA,MACzB,CAAC;AACD,WAAK,SAAS;AAAA,QACZ,iBAAiB,gCAAgC;AAAA,UAC/C,YAAY;AAAA,UACZ,QACE,oBAAoB,oBACpB,GAAG,oBAAoB,QAAQ;AAAA,UACjC,oBAAoB;AAAA,YAClB,6BACE,WAAW;AAAA,UACf;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAEA,SAAK,iBAAiB;AAGtB,SAAK,QAAQ,QAAQ,SAAS;AAC9B,SAAK,aAAa,QAAQ,cAAc;AACxC,SAAK,aAAa,IAAI,iCAAe,IAAI;AACzC,SAAK,cAAc,IAAI,kCAAgB,IAAI;AAC3C,SAAK,0BAA0B,QAAQ,UAAU;AAAA,EACnD;AAAA;AAAA,EAGQ,0BAA0B,YAAqB;AACrD,QAAI,CAAC,YAAY;AACf;AAAA,IACF;AACA,UAAM,mBAAmB;AAAA,MACvB,MAAM;AAAA,MACN,MAAM,YACJ,SACA,MAC2B;AAC3B,cAAM,QAAQ,QAAQ,IAAI,MAAM,GAAG;AACnC,YAAI,MAAM,SAAS,GAAG;AACpB,gBAAM,YAAY,MAAM,CAAC,EAAE,MAAM,GAAG,EAAE,IAAI,CAAC,SAAS;AAClD,gBAAI,KAAK,QAAQ,aAAa,IAAI,IAAI;AACpC,qBAAO,iBAAiB;AAAA,YAC1B,OAAO;AACL,qBAAO;AAAA,YACT;AAAA,UACF,CAAC;AACD,kBAAQ,MAAM,MAAM,CAAC,IAAI,MAAM,UAAU,KAAK,GAAG;AAAA,QACnD;AACA,eAAO,KAAK,OAAO;AAAA,MACrB;AAAA,IACF;AACA,SAAK,SAAS,UAAU,gBAAgB;AAAA,EAC1C;AAAA,EAEA;AAAA,EACA;AACF;",
3
+ "sources": ["../../src/qumuloStorage.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { QumuloStorageContext, QumuloStorageOptionalParams } from \"./api/index.js\";\nimport { createQumuloStorage } from \"./api/index.js\";\nimport type { FileSystemsOperations } from \"./classic/fileSystems/index.js\";\nimport { _getFileSystemsOperations } from \"./classic/fileSystems/index.js\";\nimport type { OperationsOperations } from \"./classic/operations/index.js\";\nimport { _getOperationsOperations } from \"./classic/operations/index.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { Pipeline } from \"@azure/core-rest-pipeline\";\n\nexport type { QumuloStorageOptionalParams } from \"./api/qumuloStorageContext.js\";\n\nexport class QumuloStorage {\n private _client: QumuloStorageContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: QumuloStorageOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createQumuloStorage(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.fileSystems = _getFileSystemsOperations(this._client);\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** The operation groups for fileSystems */\n public readonly fileSystems: FileSystemsOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,iBAAoC;AAEpC,yBAA0C;AAE1C,wBAAyC;AAMlC,MAAM,cAAc;AAAA,EACjB;AAAA;AAAA,EAEQ;AAAA,EAEhB,YACE,YACA,gBACA,UAAuC,CAAC,GACxC;AACA,UAAM,oBAAoB,SAAS,kBAAkB;AACrD,UAAM,kBAAkB,oBACpB,GAAG,iBAAiB,qBACpB;AACJ,SAAK,cAAU,gCAAoB,YAAY,gBAAgB;AAAA,MAC7D,GAAG;AAAA,MACH,kBAAkB,EAAE,gBAAgB;AAAA,IACtC,CAAC;AACD,SAAK,WAAW,KAAK,QAAQ;AAC7B,SAAK,kBAAc,8CAA0B,KAAK,OAAO;AACzD,SAAK,iBAAa,4CAAyB,KAAK,OAAO;AAAA,EACzD;AAAA;AAAA,EAGgB;AAAA;AAAA,EAEA;AAClB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,21 @@
1
+ import type { QumuloStorage } from "./qumuloStorage.js";
2
+ import type { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client";
3
+ import type { AbortSignalLike } from "@azure/abort-controller";
4
+ import type { 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: QumuloStorage, 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,108 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var restorePollerHelpers_exports = {};
19
+ __export(restorePollerHelpers_exports, {
20
+ restorePoller: () => restorePoller
21
+ });
22
+ module.exports = __toCommonJS(restorePollerHelpers_exports);
23
+ var import_operations = require("./api/fileSystems/operations.js");
24
+ var import_pollingHelpers = require("./static-helpers/pollingHelpers.js");
25
+ var import_core_lro = require("@azure/core-lro");
26
+ function restorePoller(client, serializedState, sourceOperation, options) {
27
+ const pollerConfig = (0, import_core_lro.deserializeState)(serializedState).config;
28
+ const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
29
+ if (!initialRequestUrl || !requestMethod) {
30
+ throw new Error(
31
+ `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`
32
+ );
33
+ }
34
+ const resourceLocationConfig = metadata?.["resourceLocationConfig"];
35
+ const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
36
+ const deserializeHelper = options?.processResponseBody ?? deserializer;
37
+ if (!deserializeHelper) {
38
+ throw new Error(
39
+ `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`
40
+ );
41
+ }
42
+ const apiVersion = getApiVersionFromUrl(initialRequestUrl);
43
+ return (0, import_pollingHelpers.getLongRunningPoller)(
44
+ client["_client"] ?? client,
45
+ deserializeHelper,
46
+ expectedStatuses,
47
+ {
48
+ updateIntervalInMs: options?.updateIntervalInMs,
49
+ abortSignal: options?.abortSignal,
50
+ resourceLocationConfig,
51
+ restoreFrom: serializedState,
52
+ initialRequestUrl,
53
+ apiVersion
54
+ }
55
+ );
56
+ }
57
+ const deserializeMap = {
58
+ "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}": { deserializer: import_operations._$deleteDeserialize, expectedStatuses: ["202", "204", "200"] },
59
+ "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}": { deserializer: import_operations._createOrUpdateDeserialize, expectedStatuses: ["200", "201", "202"] }
60
+ };
61
+ function getDeserializationHelper(urlStr, method) {
62
+ const path = new URL(urlStr).pathname;
63
+ const pathParts = path.split("/");
64
+ let matchedLen = -1, matchedValue;
65
+ for (const [key, value] of Object.entries(deserializeMap)) {
66
+ if (!key.startsWith(method)) {
67
+ continue;
68
+ }
69
+ const candidatePath = getPathFromMapKey(key);
70
+ const candidateParts = candidatePath.split("/");
71
+ let found = true;
72
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
73
+ if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
74
+ const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
75
+ const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(
76
+ pathParts[j] || ""
77
+ );
78
+ if (!isMatched) {
79
+ found = false;
80
+ break;
81
+ }
82
+ continue;
83
+ }
84
+ if (candidateParts[i] !== pathParts[j]) {
85
+ found = false;
86
+ break;
87
+ }
88
+ }
89
+ if (found && candidatePath.length > matchedLen) {
90
+ matchedLen = candidatePath.length;
91
+ matchedValue = value;
92
+ }
93
+ }
94
+ return matchedValue;
95
+ }
96
+ function getPathFromMapKey(mapKey) {
97
+ const pathStart = mapKey.indexOf("/");
98
+ return mapKey.slice(pathStart);
99
+ }
100
+ function getApiVersionFromUrl(urlStr) {
101
+ const url = new URL(urlStr);
102
+ return url.searchParams.get("api-version") ?? void 0;
103
+ }
104
+ // Annotate the CommonJS export names for ESM import in node:
105
+ 0 && (module.exports = {
106
+ restorePoller
107
+ });
108
+ //# sourceMappingURL=restorePollerHelpers.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/restorePollerHelpers.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { QumuloStorage } from \"./qumuloStorage.js\";\nimport { _$deleteDeserialize, _createOrUpdateDeserialize } from \"./api/fileSystems/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } 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: QumuloStorage,\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 const apiVersion = getApiVersionFromUrl(initialRequestUrl);\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 apiVersion,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: (result: PathUncheckedResponse) => Promise<any>;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"202\", \"204\", \"200\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}\":\n { deserializer: _createOrUpdateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\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\nfunction getApiVersionFromUrl(urlStr: string): string | undefined {\n const url = new URL(urlStr);\n return url.searchParams.get(\"api-version\") ?? undefined;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAAgE;AAChE,4BAAqC;AAIrC,sBAAiC;AAqB1B,SAAS,cACd,QACA,iBACA,iBACA,SAC8C;AAC9C,QAAM,mBAAe,kCAAiB,eAAe,EAAE;AACvD,QAAM,EAAE,mBAAmB,eAAe,SAAS,IAAI;AACvD,MAAI,CAAC,qBAAqB,CAAC,eAAe;AACxC,UAAM,IAAI;AAAA,MACR,6BAA6B,eAAe,wBAAwB,iBAAiB,IAAI;AAAA,IAC3F;AAAA,EACF;AACA,QAAM,yBAAyB,WAAW,wBAAwB;AAGlE,QAAM,EAAE,cAAc,mBAAmB,CAAC,EAAE,IAC1C,yBAAyB,mBAAmB,aAAa,KAAK,CAAC;AACjE,QAAM,oBAAoB,SAAS,uBAAuB;AAC1D,MAAI,CAAC,mBAAmB;AACtB,UAAM,IAAI;AAAA,MACR,0FAA0F,iBAAiB,IAAI;AAAA,IACjH;AAAA,EACF;AACA,QAAM,aAAa,qBAAqB,iBAAiB;AACzD,aAAO;AAAA,IACJ,OAAe,SAAS,KAAK;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,MACE,oBAAoB,SAAS;AAAA,MAC7B,aAAa,SAAS;AAAA,MACtB;AAAA,MACA,aAAa;AAAA,MACb;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAOA,MAAM,iBAAwD;AAAA,EAC5D,mIACE,EAAE,cAAc,uCAAqB,kBAAkB,CAAC,OAAO,OAAO,KAAK,EAAE;AAAA,EAC/E,gIACE,EAAE,cAAc,8CAA4B,kBAAkB,CAAC,OAAO,OAAO,KAAK,EAAE;AACxF;AAEA,SAAS,yBACP,QACA,QACmC;AACnC,QAAM,OAAO,IAAI,IAAI,MAAM,EAAE;AAC7B,QAAM,YAAY,KAAK,MAAM,GAAG;AAKhC,MAAI,aAAa,IACf;AAGF,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,cAAc,GAAG;AAGzD,QAAI,CAAC,IAAI,WAAW,MAAM,GAAG;AAC3B;AAAA,IACF;AACA,UAAM,gBAAgB,kBAAkB,GAAG;AAE3C,UAAM,iBAAiB,cAAc,MAAM,GAAG;AAG9C,QAAI,QAAQ;AACZ,aAAS,IAAI,eAAe,SAAS,GAAG,IAAI,UAAU,SAAS,GAAG,KAAK,KAAK,KAAK,GAAG,KAAK,KAAK;AAC5F,UAAI,eAAe,CAAC,GAAG,WAAW,GAAG,KAAK,eAAe,CAAC,GAAG,QAAQ,GAAG,MAAM,IAAI;AAChF,cAAM,QAAQ,eAAe,CAAC,EAAG,QAAQ,GAAG,IAAI,GAC9C,MAAM,eAAe,CAAC,GAAG;AAK3B,cAAM,YAAY,IAAI,OAAO,GAAG,eAAe,CAAC,GAAG,MAAM,OAAO,GAAG,CAAC,EAAE,EAAE;AAAA,UACtE,UAAU,CAAC,KAAK;AAAA,QAClB;AAEA,YAAI,CAAC,WAAW;AACd,kBAAQ;AACR;AAAA,QACF;AACA;AAAA,MACF;AAKA,UAAI,eAAe,CAAC,MAAM,UAAU,CAAC,GAAG;AACtC,gBAAQ;AACR;AAAA,MACF;AAAA,IACF;AAIA,QAAI,SAAS,cAAc,SAAS,YAAY;AAC9C,mBAAa,cAAc;AAC3B,qBAAe;AAAA,IACjB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,SAAS,kBAAkB,QAAwB;AACjD,QAAM,YAAY,OAAO,QAAQ,GAAG;AACpC,SAAO,OAAO,MAAM,SAAS;AAC/B;AAEA,SAAS,qBAAqB,QAAoC;AAChE,QAAM,MAAM,IAAI,IAAI,MAAM;AAC1B,SAAO,IAAI,aAAa,IAAI,aAAa,KAAK;AAChD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * An enum to describe Azure Cloud environments.
3
+ * @enum {string}
4
+ */
5
+ export declare enum AzureClouds {
6
+ /** Azure public cloud, which is the default cloud for Azure SDKs. */
7
+ AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD",
8
+ /** Azure China cloud */
9
+ AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD",
10
+ /** Azure US government cloud */
11
+ AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT"
12
+ }
13
+ /** The supported values for cloud setting as a string literal type */
14
+ export type AzureSupportedClouds = `${AzureClouds}`;
15
+ /**
16
+ * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.
17
+ * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.
18
+ * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.
19
+ * @throws {Error} Throws an error if an unknown cloud setting is provided.
20
+ */
21
+ export declare function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined;
22
+ //# sourceMappingURL=cloudSettingHelpers.d.ts.map
@@ -0,0 +1,52 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var cloudSettingHelpers_exports = {};
19
+ __export(cloudSettingHelpers_exports, {
20
+ AzureClouds: () => AzureClouds,
21
+ getArmEndpoint: () => getArmEndpoint
22
+ });
23
+ module.exports = __toCommonJS(cloudSettingHelpers_exports);
24
+ var AzureClouds = /* @__PURE__ */ ((AzureClouds2) => {
25
+ AzureClouds2["AZURE_PUBLIC_CLOUD"] = "AZURE_PUBLIC_CLOUD";
26
+ AzureClouds2["AZURE_CHINA_CLOUD"] = "AZURE_CHINA_CLOUD";
27
+ AzureClouds2["AZURE_US_GOVERNMENT"] = "AZURE_US_GOVERNMENT";
28
+ return AzureClouds2;
29
+ })(AzureClouds || {});
30
+ function getArmEndpoint(cloudSetting) {
31
+ if (cloudSetting === void 0) {
32
+ return void 0;
33
+ }
34
+ const cloudEndpoints = {
35
+ AZURE_CHINA_CLOUD: "https://management.chinacloudapi.cn/",
36
+ AZURE_US_GOVERNMENT: "https://management.usgovcloudapi.net/",
37
+ AZURE_PUBLIC_CLOUD: "https://management.azure.com/"
38
+ };
39
+ if (cloudSetting in cloudEndpoints) {
40
+ return cloudEndpoints[cloudSetting];
41
+ } else {
42
+ throw new Error(
43
+ `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`
44
+ );
45
+ }
46
+ }
47
+ // Annotate the CommonJS export names for ESM import in node:
48
+ 0 && (module.exports = {
49
+ AzureClouds,
50
+ getArmEndpoint
51
+ });
52
+ //# sourceMappingURL=cloudSettingHelpers.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/static-helpers/cloudSettingHelpers.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * An enum to describe Azure Cloud environments.\n * @enum {string}\n */\nexport enum AzureClouds {\n /** Azure public cloud, which is the default cloud for Azure SDKs. */\n AZURE_PUBLIC_CLOUD = \"AZURE_PUBLIC_CLOUD\",\n /** Azure China cloud */\n AZURE_CHINA_CLOUD = \"AZURE_CHINA_CLOUD\",\n /** Azure US government cloud */\n AZURE_US_GOVERNMENT = \"AZURE_US_GOVERNMENT\",\n}\n\n/** The supported values for cloud setting as a string literal type */\nexport type AzureSupportedClouds = `${AzureClouds}`;\n\n/**\n * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.\n * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.\n * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.\n * @throws {Error} Throws an error if an unknown cloud setting is provided.\n */\nexport function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined {\n if (cloudSetting === undefined) {\n return undefined;\n }\n const cloudEndpoints: Record<keyof typeof AzureClouds, string> = {\n AZURE_CHINA_CLOUD: \"https://management.chinacloudapi.cn/\",\n AZURE_US_GOVERNMENT: \"https://management.usgovcloudapi.net/\",\n AZURE_PUBLIC_CLOUD: \"https://management.azure.com/\",\n };\n if (cloudSetting in cloudEndpoints) {\n return cloudEndpoints[cloudSetting];\n } else {\n throw new Error(\n `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`,\n );\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,IAAK,cAAL,kBAAKA,iBAAL;AAEL,EAAAA,aAAA,wBAAqB;AAErB,EAAAA,aAAA,uBAAoB;AAEpB,EAAAA,aAAA,yBAAsB;AANZ,SAAAA;AAAA,GAAA;AAkBL,SAAS,eAAe,cAAyD;AACtF,MAAI,iBAAiB,QAAW;AAC9B,WAAO;AAAA,EACT;AACA,QAAM,iBAA2D;AAAA,IAC/D,mBAAmB;AAAA,IACnB,qBAAqB;AAAA,IACrB,oBAAoB;AAAA,EACtB;AACA,MAAI,gBAAgB,gBAAgB;AAClC,WAAO,eAAe,YAAY;AAAA,EACpC,OAAO;AACL,UAAM,IAAI;AAAA,MACR,0BAA0B,YAAY;AAAA,IACxC;AAAA,EACF;AACF;",
6
+ "names": ["AzureClouds"]
7
+ }
@@ -0,0 +1,74 @@
1
+ import type { 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
+ nextLinkMethod?: "GET" | "POST";
68
+ apiVersion?: string;
69
+ }
70
+ /**
71
+ * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator
72
+ */
73
+ 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>;
74
+ //# sourceMappingURL=pagingHelpers.d.ts.map
@@ -0,0 +1,143 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var pagingHelpers_exports = {};
19
+ __export(pagingHelpers_exports, {
20
+ buildPagedAsyncIterator: () => buildPagedAsyncIterator
21
+ });
22
+ module.exports = __toCommonJS(pagingHelpers_exports);
23
+ var import_core_client = require("@azure-rest/core-client");
24
+ var import_core_rest_pipeline = require("@azure/core-rest-pipeline");
25
+ function buildPagedAsyncIterator(client, getInitialResponse, processResponseBody, expectedStatuses, options = {}) {
26
+ const itemName = options.itemName ?? "value";
27
+ const nextLinkName = options.nextLinkName ?? "nextLink";
28
+ const nextLinkMethod = options.nextLinkMethod ?? "GET";
29
+ const apiVersion = options.apiVersion;
30
+ const pagedResult = {
31
+ getPage: async (pageLink) => {
32
+ let result;
33
+ if (pageLink === void 0) {
34
+ result = await getInitialResponse();
35
+ } else {
36
+ const resolvedPageLink = apiVersion ? addApiVersionToUrl(pageLink, apiVersion) : pageLink;
37
+ result = nextLinkMethod === "POST" ? await client.pathUnchecked(resolvedPageLink).post() : await client.pathUnchecked(resolvedPageLink).get();
38
+ }
39
+ checkPagingRequest(result, expectedStatuses);
40
+ const results = await processResponseBody(result);
41
+ const nextLink = getNextLink(results, nextLinkName);
42
+ const values = getElements(results, itemName);
43
+ return {
44
+ page: values,
45
+ nextPageLink: nextLink
46
+ };
47
+ },
48
+ byPage: (settings) => {
49
+ const { continuationToken } = settings ?? {};
50
+ return getPageAsyncIterator(pagedResult, {
51
+ pageLink: continuationToken
52
+ });
53
+ }
54
+ };
55
+ return getPagedAsyncIterator(pagedResult);
56
+ }
57
+ function getPagedAsyncIterator(pagedResult) {
58
+ const iter = getItemAsyncIterator(pagedResult);
59
+ return {
60
+ next() {
61
+ return iter.next();
62
+ },
63
+ [Symbol.asyncIterator]() {
64
+ return this;
65
+ },
66
+ byPage: pagedResult?.byPage ?? ((settings) => {
67
+ const { continuationToken } = settings ?? {};
68
+ return getPageAsyncIterator(pagedResult, {
69
+ pageLink: continuationToken
70
+ });
71
+ })
72
+ };
73
+ }
74
+ async function* getItemAsyncIterator(pagedResult) {
75
+ const pages = getPageAsyncIterator(pagedResult);
76
+ for await (const page of pages) {
77
+ yield* page;
78
+ }
79
+ }
80
+ async function* getPageAsyncIterator(pagedResult, options = {}) {
81
+ const { pageLink } = options;
82
+ let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);
83
+ if (!response) {
84
+ return;
85
+ }
86
+ let result = response.page;
87
+ result.continuationToken = response.nextPageLink;
88
+ yield result;
89
+ while (response.nextPageLink) {
90
+ response = await pagedResult.getPage(response.nextPageLink);
91
+ if (!response) {
92
+ return;
93
+ }
94
+ result = response.page;
95
+ result.continuationToken = response.nextPageLink;
96
+ yield result;
97
+ }
98
+ }
99
+ function getNextLink(body, nextLinkName) {
100
+ if (!nextLinkName) {
101
+ return void 0;
102
+ }
103
+ const nextLink = body[nextLinkName];
104
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) {
105
+ throw new import_core_rest_pipeline.RestError(
106
+ `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`
107
+ );
108
+ }
109
+ if (nextLink === null) {
110
+ return void 0;
111
+ }
112
+ return nextLink;
113
+ }
114
+ function getElements(body, itemName) {
115
+ const value = body[itemName];
116
+ if (!Array.isArray(value)) {
117
+ throw new import_core_rest_pipeline.RestError(
118
+ `Couldn't paginate response
119
+ Body doesn't contain an array property with name: ${itemName}`
120
+ );
121
+ }
122
+ return value ?? [];
123
+ }
124
+ function checkPagingRequest(response, expectedStatuses) {
125
+ if (!expectedStatuses.includes(response.status)) {
126
+ throw (0, import_core_client.createRestError)(
127
+ `Pagination failed with unexpected statusCode ${response.status}`,
128
+ response
129
+ );
130
+ }
131
+ }
132
+ function addApiVersionToUrl(url, apiVersion) {
133
+ const urlObj = new URL(url, "https://microsoft.com");
134
+ if (!urlObj.searchParams.get("api-version")) {
135
+ return `${url}${urlObj.search ? "&" : "?"}api-version=${apiVersion}`;
136
+ }
137
+ return url;
138
+ }
139
+ // Annotate the CommonJS export names for ESM import in node:
140
+ 0 && (module.exports = {
141
+ buildPagedAsyncIterator
142
+ });
143
+ //# sourceMappingURL=pagingHelpers.js.map