@azure/arm-sqlvirtualmachine 5.0.0-beta.8 → 5.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 (513) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +30 -24
  3. package/dist/browser/api/availabilityGroupListeners/index.d.ts +3 -0
  4. package/dist/browser/api/availabilityGroupListeners/index.js +4 -0
  5. package/dist/browser/api/availabilityGroupListeners/index.js.map +1 -0
  6. package/dist/browser/api/availabilityGroupListeners/operations.d.ts +23 -0
  7. package/dist/browser/api/availabilityGroupListeners/operations.js +140 -0
  8. package/dist/browser/api/availabilityGroupListeners/operations.js.map +1 -0
  9. package/dist/browser/api/availabilityGroupListeners/options.d.ts +20 -0
  10. package/dist/browser/api/availabilityGroupListeners/options.js +4 -0
  11. package/dist/browser/api/availabilityGroupListeners/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/sqlVirtualMachineGroups/index.d.ts +3 -0
  25. package/dist/browser/api/sqlVirtualMachineGroups/index.js +4 -0
  26. package/dist/browser/api/sqlVirtualMachineGroups/index.js.map +1 -0
  27. package/dist/browser/api/sqlVirtualMachineGroups/operations.d.ts +31 -0
  28. package/dist/browser/api/sqlVirtualMachineGroups/operations.js +199 -0
  29. package/dist/browser/api/sqlVirtualMachineGroups/operations.js.map +1 -0
  30. package/dist/browser/api/sqlVirtualMachineGroups/options.d.ts +26 -0
  31. package/dist/browser/api/sqlVirtualMachineGroups/options.js +4 -0
  32. package/dist/browser/api/sqlVirtualMachineGroups/options.js.map +1 -0
  33. package/dist/browser/api/sqlVirtualMachineManagementContext.d.ts +22 -0
  34. package/dist/browser/api/sqlVirtualMachineManagementContext.js +26 -0
  35. package/dist/browser/api/sqlVirtualMachineManagementContext.js.map +1 -0
  36. package/dist/browser/api/sqlVirtualMachineTroubleshoot/index.d.ts +3 -0
  37. package/dist/browser/api/sqlVirtualMachineTroubleshoot/index.js +4 -0
  38. package/dist/browser/api/sqlVirtualMachineTroubleshoot/index.js.map +1 -0
  39. package/dist/browser/api/sqlVirtualMachineTroubleshoot/operations.d.ts +10 -0
  40. package/dist/browser/api/sqlVirtualMachineTroubleshoot/operations.js +44 -0
  41. package/dist/browser/api/sqlVirtualMachineTroubleshoot/operations.js.map +1 -0
  42. package/dist/browser/api/sqlVirtualMachineTroubleshoot/options.d.ts +7 -0
  43. package/dist/browser/api/sqlVirtualMachineTroubleshoot/options.js +4 -0
  44. package/dist/browser/api/sqlVirtualMachineTroubleshoot/options.js.map +1 -0
  45. package/dist/browser/api/sqlVirtualMachines/index.d.ts +3 -0
  46. package/dist/browser/api/sqlVirtualMachines/index.js +4 -0
  47. package/dist/browser/api/sqlVirtualMachines/index.js.map +1 -0
  48. package/dist/browser/api/sqlVirtualMachines/operations.d.ts +47 -0
  49. package/dist/browser/api/sqlVirtualMachines/operations.js +329 -0
  50. package/dist/browser/api/sqlVirtualMachines/operations.js.map +1 -0
  51. package/dist/browser/api/sqlVirtualMachines/options.d.ts +46 -0
  52. package/dist/browser/api/sqlVirtualMachines/options.js +4 -0
  53. package/dist/browser/api/sqlVirtualMachines/options.js.map +1 -0
  54. package/dist/browser/classic/availabilityGroupListeners/index.d.ts +27 -0
  55. package/dist/browser/classic/availabilityGroupListeners/index.js +34 -0
  56. package/dist/browser/classic/availabilityGroupListeners/index.js.map +1 -0
  57. package/dist/browser/classic/index.d.ts +6 -0
  58. package/dist/browser/classic/index.js +4 -0
  59. package/dist/browser/classic/index.js.map +1 -0
  60. package/dist/browser/classic/operations/index.d.ts +11 -0
  61. package/dist/browser/classic/operations/index.js +14 -0
  62. package/dist/browser/classic/operations/index.js.map +1 -0
  63. package/dist/browser/classic/sqlVirtualMachineGroups/index.d.ts +35 -0
  64. package/dist/browser/classic/sqlVirtualMachineGroups/index.js +44 -0
  65. package/dist/browser/classic/sqlVirtualMachineGroups/index.js.map +1 -0
  66. package/dist/browser/classic/sqlVirtualMachineTroubleshoot/index.d.ts +16 -0
  67. package/dist/browser/classic/sqlVirtualMachineTroubleshoot/index.js +23 -0
  68. package/dist/browser/classic/sqlVirtualMachineTroubleshoot/index.js.map +1 -0
  69. package/dist/browser/classic/sqlVirtualMachines/index.d.ts +55 -0
  70. package/dist/browser/classic/sqlVirtualMachines/index.js +72 -0
  71. package/dist/browser/classic/sqlVirtualMachines/index.js.map +1 -0
  72. package/dist/browser/index.d.ts +21 -0
  73. package/dist/browser/index.js +9 -0
  74. package/dist/browser/index.js.map +1 -0
  75. package/dist/browser/logger.d.ts +2 -0
  76. package/dist/browser/logger.js +5 -0
  77. package/dist/browser/logger.js.map +1 -0
  78. package/dist/browser/models/index.d.ts +3 -0
  79. package/dist/browser/models/index.js +4 -0
  80. package/dist/browser/models/index.js.map +1 -0
  81. package/{dist-esm/src/models/index.d.ts → dist/browser/models/models.d.ts} +881 -924
  82. package/dist/browser/models/models.js +1363 -0
  83. package/dist/browser/models/models.js.map +1 -0
  84. package/dist/browser/package.json +3 -0
  85. package/dist/browser/restorePollerHelpers.d.ts +21 -0
  86. package/dist/browser/restorePollerHelpers.js +120 -0
  87. package/dist/browser/restorePollerHelpers.js.map +1 -0
  88. package/dist/browser/sqlVirtualMachineManagementClient.d.ts +27 -0
  89. package/dist/browser/sqlVirtualMachineManagementClient.js +49 -0
  90. package/dist/browser/sqlVirtualMachineManagementClient.js.map +1 -0
  91. package/dist/browser/static-helpers/cloudSettingHelpers.d.ts +22 -0
  92. package/dist/browser/static-helpers/cloudSettingHelpers.js +38 -0
  93. package/dist/browser/static-helpers/cloudSettingHelpers.js.map +1 -0
  94. package/dist/browser/static-helpers/pagingHelpers.d.ts +74 -0
  95. package/dist/browser/static-helpers/pagingHelpers.js +143 -0
  96. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
  97. package/dist/browser/static-helpers/pollingHelpers.d.ts +34 -0
  98. package/dist/browser/static-helpers/pollingHelpers.js +95 -0
  99. package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
  100. package/dist/browser/static-helpers/serialization/check-prop-undefined.d.ts +8 -0
  101. package/dist/browser/static-helpers/serialization/check-prop-undefined.js +17 -0
  102. package/dist/browser/static-helpers/serialization/check-prop-undefined.js.map +1 -0
  103. package/dist/browser/static-helpers/simplePollerHelpers.d.ts +73 -0
  104. package/dist/browser/static-helpers/simplePollerHelpers.js +44 -0
  105. package/dist/browser/static-helpers/simplePollerHelpers.js.map +1 -0
  106. package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
  107. package/dist/browser/static-helpers/urlTemplate.js +200 -0
  108. package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
  109. package/dist/commonjs/api/availabilityGroupListeners/index.d.ts +3 -0
  110. package/dist/commonjs/api/availabilityGroupListeners/index.js +34 -0
  111. package/dist/commonjs/api/availabilityGroupListeners/index.js.map +7 -0
  112. package/dist/commonjs/api/availabilityGroupListeners/operations.d.ts +23 -0
  113. package/dist/commonjs/api/availabilityGroupListeners/operations.js +223 -0
  114. package/dist/commonjs/api/availabilityGroupListeners/operations.js.map +7 -0
  115. package/dist/commonjs/api/availabilityGroupListeners/options.d.ts +20 -0
  116. package/dist/commonjs/api/availabilityGroupListeners/options.js +16 -0
  117. package/dist/commonjs/api/availabilityGroupListeners/options.js.map +7 -0
  118. package/dist/commonjs/api/index.d.ts +3 -0
  119. package/dist/commonjs/api/index.js +28 -0
  120. package/dist/commonjs/api/index.js.map +7 -0
  121. package/dist/commonjs/api/operations/index.d.ts +3 -0
  122. package/dist/commonjs/api/operations/index.js +28 -0
  123. package/dist/commonjs/api/operations/index.js.map +7 -0
  124. package/dist/commonjs/api/operations/operations.d.ts +10 -0
  125. package/dist/commonjs/api/operations/operations.js +70 -0
  126. package/dist/commonjs/api/operations/operations.js.map +7 -0
  127. package/dist/commonjs/api/operations/options.d.ts +5 -0
  128. package/dist/commonjs/api/operations/options.js +16 -0
  129. package/dist/commonjs/api/operations/options.js.map +7 -0
  130. package/dist/commonjs/api/sqlVirtualMachineGroups/index.d.ts +3 -0
  131. package/dist/commonjs/api/sqlVirtualMachineGroups/index.js +38 -0
  132. package/dist/commonjs/api/sqlVirtualMachineGroups/index.js.map +7 -0
  133. package/dist/commonjs/api/sqlVirtualMachineGroups/operations.d.ts +31 -0
  134. package/dist/commonjs/api/sqlVirtualMachineGroups/operations.js +293 -0
  135. package/dist/commonjs/api/sqlVirtualMachineGroups/operations.js.map +7 -0
  136. package/dist/commonjs/api/sqlVirtualMachineGroups/options.d.ts +26 -0
  137. package/dist/commonjs/api/sqlVirtualMachineGroups/options.js +16 -0
  138. package/dist/commonjs/api/sqlVirtualMachineGroups/options.js.map +7 -0
  139. package/dist/commonjs/api/sqlVirtualMachineManagementContext.d.ts +22 -0
  140. package/dist/commonjs/api/sqlVirtualMachineManagementContext.js +47 -0
  141. package/dist/commonjs/api/sqlVirtualMachineManagementContext.js.map +7 -0
  142. package/dist/commonjs/api/sqlVirtualMachineTroubleshoot/index.d.ts +3 -0
  143. package/dist/commonjs/api/sqlVirtualMachineTroubleshoot/index.js +28 -0
  144. package/dist/commonjs/api/sqlVirtualMachineTroubleshoot/index.js.map +7 -0
  145. package/dist/commonjs/api/sqlVirtualMachineTroubleshoot/operations.d.ts +10 -0
  146. package/dist/commonjs/api/sqlVirtualMachineTroubleshoot/operations.js +75 -0
  147. package/dist/commonjs/api/sqlVirtualMachineTroubleshoot/operations.js.map +7 -0
  148. package/dist/commonjs/api/sqlVirtualMachineTroubleshoot/options.d.ts +7 -0
  149. package/dist/commonjs/api/sqlVirtualMachineTroubleshoot/options.js +16 -0
  150. package/dist/commonjs/api/sqlVirtualMachineTroubleshoot/options.js.map +7 -0
  151. package/dist/commonjs/api/sqlVirtualMachines/index.d.ts +3 -0
  152. package/dist/commonjs/api/sqlVirtualMachines/index.js +46 -0
  153. package/dist/commonjs/api/sqlVirtualMachines/index.js.map +7 -0
  154. package/dist/commonjs/api/sqlVirtualMachines/operations.d.ts +47 -0
  155. package/dist/commonjs/api/sqlVirtualMachines/operations.js +465 -0
  156. package/dist/commonjs/api/sqlVirtualMachines/operations.js.map +7 -0
  157. package/dist/commonjs/api/sqlVirtualMachines/options.d.ts +46 -0
  158. package/dist/commonjs/api/sqlVirtualMachines/options.js +16 -0
  159. package/dist/commonjs/api/sqlVirtualMachines/options.js.map +7 -0
  160. package/dist/commonjs/classic/availabilityGroupListeners/index.d.ts +27 -0
  161. package/dist/commonjs/classic/availabilityGroupListeners/index.js +103 -0
  162. package/dist/commonjs/classic/availabilityGroupListeners/index.js.map +7 -0
  163. package/dist/commonjs/classic/index.d.ts +6 -0
  164. package/dist/commonjs/classic/index.js +16 -0
  165. package/dist/commonjs/classic/index.js.map +7 -0
  166. package/dist/commonjs/classic/operations/index.d.ts +11 -0
  167. package/dist/commonjs/classic/operations/index.js +38 -0
  168. package/dist/commonjs/classic/operations/index.js.map +7 -0
  169. package/dist/commonjs/classic/sqlVirtualMachineGroups/index.d.ts +35 -0
  170. package/dist/commonjs/classic/sqlVirtualMachineGroups/index.js +92 -0
  171. package/dist/commonjs/classic/sqlVirtualMachineGroups/index.js.map +7 -0
  172. package/dist/commonjs/classic/sqlVirtualMachineTroubleshoot/index.d.ts +16 -0
  173. package/dist/commonjs/classic/sqlVirtualMachineTroubleshoot/index.js +59 -0
  174. package/dist/commonjs/classic/sqlVirtualMachineTroubleshoot/index.js.map +7 -0
  175. package/dist/commonjs/classic/sqlVirtualMachines/index.d.ts +55 -0
  176. package/dist/commonjs/classic/sqlVirtualMachines/index.js +120 -0
  177. package/dist/commonjs/classic/sqlVirtualMachines/index.js.map +7 -0
  178. package/dist/commonjs/index.d.ts +21 -0
  179. package/dist/commonjs/index.js +96 -0
  180. package/dist/commonjs/index.js.map +7 -0
  181. package/dist/commonjs/logger.d.ts +2 -0
  182. package/dist/commonjs/logger.js +29 -0
  183. package/dist/commonjs/logger.js.map +7 -0
  184. package/dist/commonjs/models/index.d.ts +3 -0
  185. package/dist/commonjs/models/index.js +82 -0
  186. package/dist/commonjs/models/index.js.map +7 -0
  187. package/dist/commonjs/models/models.d.ts +1249 -0
  188. package/dist/commonjs/models/models.js +1367 -0
  189. package/dist/commonjs/models/models.js.map +7 -0
  190. package/dist/commonjs/package.json +3 -0
  191. package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
  192. package/dist/commonjs/restorePollerHelpers.js +133 -0
  193. package/dist/commonjs/restorePollerHelpers.js.map +7 -0
  194. package/dist/commonjs/sqlVirtualMachineManagementClient.d.ts +27 -0
  195. package/dist/commonjs/sqlVirtualMachineManagementClient.js +70 -0
  196. package/dist/commonjs/sqlVirtualMachineManagementClient.js.map +7 -0
  197. package/dist/commonjs/static-helpers/cloudSettingHelpers.d.ts +22 -0
  198. package/dist/commonjs/static-helpers/cloudSettingHelpers.js +52 -0
  199. package/dist/commonjs/static-helpers/cloudSettingHelpers.js.map +7 -0
  200. package/dist/commonjs/static-helpers/pagingHelpers.d.ts +74 -0
  201. package/dist/commonjs/static-helpers/pagingHelpers.js +143 -0
  202. package/dist/commonjs/static-helpers/pagingHelpers.js.map +7 -0
  203. package/dist/commonjs/static-helpers/pollingHelpers.d.ts +34 -0
  204. package/dist/commonjs/static-helpers/pollingHelpers.js +101 -0
  205. package/dist/commonjs/static-helpers/pollingHelpers.js.map +7 -0
  206. package/dist/commonjs/static-helpers/serialization/check-prop-undefined.d.ts +8 -0
  207. package/dist/commonjs/static-helpers/serialization/check-prop-undefined.js +35 -0
  208. package/dist/commonjs/static-helpers/serialization/check-prop-undefined.js.map +7 -0
  209. package/dist/commonjs/static-helpers/simplePollerHelpers.d.ts +73 -0
  210. package/dist/commonjs/static-helpers/simplePollerHelpers.js +67 -0
  211. package/dist/commonjs/static-helpers/simplePollerHelpers.js.map +7 -0
  212. package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
  213. package/dist/commonjs/static-helpers/urlTemplate.js +197 -0
  214. package/dist/commonjs/static-helpers/urlTemplate.js.map +7 -0
  215. package/{types → dist/commonjs}/tsdoc-metadata.json +11 -11
  216. package/dist/esm/api/availabilityGroupListeners/index.d.ts +3 -0
  217. package/dist/esm/api/availabilityGroupListeners/index.js +4 -0
  218. package/dist/esm/api/availabilityGroupListeners/index.js.map +1 -0
  219. package/dist/esm/api/availabilityGroupListeners/operations.d.ts +23 -0
  220. package/dist/esm/api/availabilityGroupListeners/operations.js +140 -0
  221. package/dist/esm/api/availabilityGroupListeners/operations.js.map +1 -0
  222. package/dist/esm/api/availabilityGroupListeners/options.d.ts +20 -0
  223. package/dist/esm/api/availabilityGroupListeners/options.js +4 -0
  224. package/dist/esm/api/availabilityGroupListeners/options.js.map +1 -0
  225. package/dist/esm/api/index.d.ts +3 -0
  226. package/dist/esm/api/index.js +4 -0
  227. package/dist/esm/api/index.js.map +1 -0
  228. package/dist/esm/api/operations/index.d.ts +3 -0
  229. package/dist/esm/api/operations/index.js +4 -0
  230. package/dist/esm/api/operations/index.js.map +1 -0
  231. package/dist/esm/api/operations/operations.d.ts +10 -0
  232. package/dist/esm/api/operations/operations.js +33 -0
  233. package/dist/esm/api/operations/operations.js.map +1 -0
  234. package/dist/esm/api/operations/options.d.ts +5 -0
  235. package/dist/esm/api/operations/options.js +4 -0
  236. package/dist/esm/api/operations/options.js.map +1 -0
  237. package/dist/esm/api/sqlVirtualMachineGroups/index.d.ts +3 -0
  238. package/dist/esm/api/sqlVirtualMachineGroups/index.js +4 -0
  239. package/dist/esm/api/sqlVirtualMachineGroups/index.js.map +1 -0
  240. package/dist/esm/api/sqlVirtualMachineGroups/operations.d.ts +31 -0
  241. package/dist/esm/api/sqlVirtualMachineGroups/operations.js +199 -0
  242. package/dist/esm/api/sqlVirtualMachineGroups/operations.js.map +1 -0
  243. package/dist/esm/api/sqlVirtualMachineGroups/options.d.ts +26 -0
  244. package/dist/esm/api/sqlVirtualMachineGroups/options.js +4 -0
  245. package/dist/esm/api/sqlVirtualMachineGroups/options.js.map +1 -0
  246. package/dist/esm/api/sqlVirtualMachineManagementContext.d.ts +22 -0
  247. package/dist/esm/api/sqlVirtualMachineManagementContext.js +26 -0
  248. package/dist/esm/api/sqlVirtualMachineManagementContext.js.map +1 -0
  249. package/dist/esm/api/sqlVirtualMachineTroubleshoot/index.d.ts +3 -0
  250. package/dist/esm/api/sqlVirtualMachineTroubleshoot/index.js +4 -0
  251. package/dist/esm/api/sqlVirtualMachineTroubleshoot/index.js.map +1 -0
  252. package/dist/esm/api/sqlVirtualMachineTroubleshoot/operations.d.ts +10 -0
  253. package/dist/esm/api/sqlVirtualMachineTroubleshoot/operations.js +44 -0
  254. package/dist/esm/api/sqlVirtualMachineTroubleshoot/operations.js.map +1 -0
  255. package/dist/esm/api/sqlVirtualMachineTroubleshoot/options.d.ts +7 -0
  256. package/dist/esm/api/sqlVirtualMachineTroubleshoot/options.js +4 -0
  257. package/dist/esm/api/sqlVirtualMachineTroubleshoot/options.js.map +1 -0
  258. package/dist/esm/api/sqlVirtualMachines/index.d.ts +3 -0
  259. package/dist/esm/api/sqlVirtualMachines/index.js +4 -0
  260. package/dist/esm/api/sqlVirtualMachines/index.js.map +1 -0
  261. package/dist/esm/api/sqlVirtualMachines/operations.d.ts +47 -0
  262. package/dist/esm/api/sqlVirtualMachines/operations.js +329 -0
  263. package/dist/esm/api/sqlVirtualMachines/operations.js.map +1 -0
  264. package/dist/esm/api/sqlVirtualMachines/options.d.ts +46 -0
  265. package/dist/esm/api/sqlVirtualMachines/options.js +4 -0
  266. package/dist/esm/api/sqlVirtualMachines/options.js.map +1 -0
  267. package/dist/esm/classic/availabilityGroupListeners/index.d.ts +27 -0
  268. package/dist/esm/classic/availabilityGroupListeners/index.js +34 -0
  269. package/dist/esm/classic/availabilityGroupListeners/index.js.map +1 -0
  270. package/dist/esm/classic/index.d.ts +6 -0
  271. package/dist/esm/classic/index.js +4 -0
  272. package/dist/esm/classic/index.js.map +1 -0
  273. package/dist/esm/classic/operations/index.d.ts +11 -0
  274. package/dist/esm/classic/operations/index.js +14 -0
  275. package/dist/esm/classic/operations/index.js.map +1 -0
  276. package/dist/esm/classic/sqlVirtualMachineGroups/index.d.ts +35 -0
  277. package/dist/esm/classic/sqlVirtualMachineGroups/index.js +44 -0
  278. package/dist/esm/classic/sqlVirtualMachineGroups/index.js.map +1 -0
  279. package/dist/esm/classic/sqlVirtualMachineTroubleshoot/index.d.ts +16 -0
  280. package/dist/esm/classic/sqlVirtualMachineTroubleshoot/index.js +23 -0
  281. package/dist/esm/classic/sqlVirtualMachineTroubleshoot/index.js.map +1 -0
  282. package/dist/esm/classic/sqlVirtualMachines/index.d.ts +55 -0
  283. package/dist/esm/classic/sqlVirtualMachines/index.js +72 -0
  284. package/dist/esm/classic/sqlVirtualMachines/index.js.map +1 -0
  285. package/dist/esm/index.d.ts +21 -0
  286. package/dist/esm/index.js +9 -0
  287. package/dist/esm/index.js.map +1 -0
  288. package/dist/esm/logger.d.ts +2 -0
  289. package/dist/esm/logger.js +5 -0
  290. package/dist/esm/logger.js.map +1 -0
  291. package/dist/esm/models/index.d.ts +3 -0
  292. package/dist/esm/models/index.js +4 -0
  293. package/dist/esm/models/index.js.map +1 -0
  294. package/dist/esm/models/models.d.ts +1249 -0
  295. package/dist/esm/models/models.js +1363 -0
  296. package/dist/esm/models/models.js.map +1 -0
  297. package/dist/esm/package.json +3 -0
  298. package/dist/esm/restorePollerHelpers.d.ts +21 -0
  299. package/dist/esm/restorePollerHelpers.js +120 -0
  300. package/dist/esm/restorePollerHelpers.js.map +1 -0
  301. package/dist/esm/sqlVirtualMachineManagementClient.d.ts +27 -0
  302. package/dist/esm/sqlVirtualMachineManagementClient.js +49 -0
  303. package/dist/esm/sqlVirtualMachineManagementClient.js.map +1 -0
  304. package/dist/esm/static-helpers/cloudSettingHelpers.d.ts +22 -0
  305. package/dist/esm/static-helpers/cloudSettingHelpers.js +38 -0
  306. package/dist/esm/static-helpers/cloudSettingHelpers.js.map +1 -0
  307. package/dist/esm/static-helpers/pagingHelpers.d.ts +74 -0
  308. package/dist/esm/static-helpers/pagingHelpers.js +143 -0
  309. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
  310. package/dist/esm/static-helpers/pollingHelpers.d.ts +34 -0
  311. package/dist/esm/static-helpers/pollingHelpers.js +95 -0
  312. package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
  313. package/dist/esm/static-helpers/serialization/check-prop-undefined.d.ts +8 -0
  314. package/dist/esm/static-helpers/serialization/check-prop-undefined.js +17 -0
  315. package/dist/esm/static-helpers/serialization/check-prop-undefined.js.map +1 -0
  316. package/dist/esm/static-helpers/simplePollerHelpers.d.ts +73 -0
  317. package/dist/esm/static-helpers/simplePollerHelpers.js +44 -0
  318. package/dist/esm/static-helpers/simplePollerHelpers.js.map +1 -0
  319. package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
  320. package/dist/esm/static-helpers/urlTemplate.js +200 -0
  321. package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
  322. package/package.json +193 -91
  323. package/CHANGELOG.md +0 -11
  324. package/dist/index.js +0 -4367
  325. package/dist/index.js.map +0 -1
  326. package/dist/index.min.js +0 -1
  327. package/dist/index.min.js.map +0 -1
  328. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts +0 -2
  329. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts.map +0 -1
  330. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js +0 -98
  331. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js.map +0 -1
  332. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts +0 -2
  333. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts.map +0 -1
  334. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js +0 -40
  335. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js.map +0 -1
  336. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts +0 -2
  337. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts.map +0 -1
  338. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js +0 -40
  339. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js.map +0 -1
  340. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts +0 -2
  341. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts.map +0 -1
  342. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js +0 -60
  343. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js.map +0 -1
  344. package/dist-esm/samples-dev/operationsListSample.d.ts +0 -2
  345. package/dist-esm/samples-dev/operationsListSample.d.ts.map +0 -1
  346. package/dist-esm/samples-dev/operationsListSample.js +0 -58
  347. package/dist-esm/samples-dev/operationsListSample.js.map +0 -1
  348. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts +0 -2
  349. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts.map +0 -1
  350. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js +0 -55
  351. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js.map +0 -1
  352. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts +0 -2
  353. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts.map +0 -1
  354. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js +0 -39
  355. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js.map +0 -1
  356. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts +0 -2
  357. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts.map +0 -1
  358. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js +0 -39
  359. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js.map +0 -1
  360. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts +0 -2
  361. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts.map +0 -1
  362. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js +0 -59
  363. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js.map +0 -1
  364. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts +0 -2
  365. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts.map +0 -1
  366. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js +0 -58
  367. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js.map +0 -1
  368. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts +0 -2
  369. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts.map +0 -1
  370. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js +0 -40
  371. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js.map +0 -1
  372. package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.d.ts +0 -2
  373. package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.d.ts.map +0 -1
  374. package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.js +0 -45
  375. package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.js.map +0 -1
  376. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts +0 -2
  377. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts.map +0 -1
  378. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js +0 -290
  379. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js.map +0 -1
  380. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts +0 -2
  381. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts.map +0 -1
  382. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js +0 -39
  383. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js.map +0 -1
  384. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts +0 -2
  385. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts.map +0 -1
  386. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js +0 -39
  387. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js.map +0 -1
  388. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts +0 -2
  389. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts.map +0 -1
  390. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js +0 -59
  391. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js.map +0 -1
  392. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts +0 -2
  393. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts.map +0 -1
  394. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js +0 -60
  395. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js.map +0 -1
  396. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts +0 -2
  397. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts.map +0 -1
  398. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js +0 -58
  399. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js.map +0 -1
  400. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts +0 -2
  401. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts.map +0 -1
  402. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js +0 -39
  403. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js.map +0 -1
  404. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts +0 -2
  405. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts.map +0 -1
  406. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js +0 -39
  407. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js.map +0 -1
  408. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts +0 -2
  409. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts.map +0 -1
  410. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js +0 -40
  411. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js.map +0 -1
  412. package/dist-esm/src/index.d.ts +0 -6
  413. package/dist-esm/src/index.d.ts.map +0 -1
  414. package/dist-esm/src/index.js +0 -13
  415. package/dist-esm/src/index.js.map +0 -1
  416. package/dist-esm/src/lroImpl.d.ts +0 -11
  417. package/dist-esm/src/lroImpl.d.ts.map +0 -1
  418. package/dist-esm/src/lroImpl.js +0 -21
  419. package/dist-esm/src/lroImpl.js.map +0 -1
  420. package/dist-esm/src/models/index.d.ts.map +0 -1
  421. package/dist-esm/src/models/index.js +0 -226
  422. package/dist-esm/src/models/index.js.map +0 -1
  423. package/dist-esm/src/models/mappers.d.ts +0 -53
  424. package/dist-esm/src/models/mappers.d.ts.map +0 -1
  425. package/dist-esm/src/models/mappers.js +0 -1705
  426. package/dist-esm/src/models/mappers.js.map +0 -1
  427. package/dist-esm/src/models/parameters.d.ts +0 -19
  428. package/dist-esm/src/models/parameters.d.ts.map +0 -1
  429. package/dist-esm/src/models/parameters.js +0 -152
  430. package/dist-esm/src/models/parameters.js.map +0 -1
  431. package/dist-esm/src/operations/availabilityGroupListeners.d.ts +0 -89
  432. package/dist-esm/src/operations/availabilityGroupListeners.d.ts.map +0 -1
  433. package/dist-esm/src/operations/availabilityGroupListeners.js +0 -387
  434. package/dist-esm/src/operations/availabilityGroupListeners.js.map +0 -1
  435. package/dist-esm/src/operations/index.d.ts +0 -6
  436. package/dist-esm/src/operations/index.d.ts.map +0 -1
  437. package/dist-esm/src/operations/index.js +0 -13
  438. package/dist-esm/src/operations/index.js.map +0 -1
  439. package/dist-esm/src/operations/operations.d.ts +0 -32
  440. package/dist-esm/src/operations/operations.d.ts.map +0 -1
  441. package/dist-esm/src/operations/operations.js +0 -138
  442. package/dist-esm/src/operations/operations.js.map +0 -1
  443. package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts +0 -117
  444. package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts.map +0 -1
  445. package/dist-esm/src/operations/sqlVirtualMachineGroups.js +0 -576
  446. package/dist-esm/src/operations/sqlVirtualMachineGroups.js.map +0 -1
  447. package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.d.ts +0 -32
  448. package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.d.ts.map +0 -1
  449. package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.js +0 -118
  450. package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.js.map +0 -1
  451. package/dist-esm/src/operations/sqlVirtualMachines.d.ts +0 -176
  452. package/dist-esm/src/operations/sqlVirtualMachines.d.ts.map +0 -1
  453. package/dist-esm/src/operations/sqlVirtualMachines.js +0 -858
  454. package/dist-esm/src/operations/sqlVirtualMachines.js.map +0 -1
  455. package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.d.ts +0 -62
  456. package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.d.ts.map +0 -1
  457. package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.js +0 -9
  458. package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.js.map +0 -1
  459. package/dist-esm/src/operationsInterfaces/index.d.ts +0 -6
  460. package/dist-esm/src/operationsInterfaces/index.d.ts.map +0 -1
  461. package/dist-esm/src/operationsInterfaces/index.js +0 -13
  462. package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
  463. package/dist-esm/src/operationsInterfaces/operations.d.ts +0 -11
  464. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +0 -1
  465. package/dist-esm/src/operationsInterfaces/operations.js +0 -9
  466. package/dist-esm/src/operationsInterfaces/operations.js.map +0 -1
  467. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.d.ts +0 -79
  468. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.d.ts.map +0 -1
  469. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.js +0 -9
  470. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.js.map +0 -1
  471. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.d.ts +0 -24
  472. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.d.ts.map +0 -1
  473. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.js +0 -9
  474. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.js.map +0 -1
  475. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts +0 -119
  476. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts.map +0 -1
  477. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.js +0 -9
  478. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.js.map +0 -1
  479. package/dist-esm/src/pagingHelper.d.ts +0 -13
  480. package/dist-esm/src/pagingHelper.d.ts.map +0 -1
  481. package/dist-esm/src/pagingHelper.js +0 -32
  482. package/dist-esm/src/pagingHelper.js.map +0 -1
  483. package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts +0 -24
  484. package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts.map +0 -1
  485. package/dist-esm/src/sqlVirtualMachineManagementClient.js +0 -104
  486. package/dist-esm/src/sqlVirtualMachineManagementClient.js.map +0 -1
  487. package/dist-esm/test/sqlvirtualmachine_operations_test.spec.d.ts +0 -4
  488. package/dist-esm/test/sqlvirtualmachine_operations_test.spec.d.ts.map +0 -1
  489. package/dist-esm/test/sqlvirtualmachine_operations_test.spec.js +0 -78
  490. package/dist-esm/test/sqlvirtualmachine_operations_test.spec.js.map +0 -1
  491. package/review/arm-sqlvirtualmachine.api.md +0 -949
  492. package/rollup.config.js +0 -122
  493. package/src/index.ts +0 -13
  494. package/src/lroImpl.ts +0 -42
  495. package/src/models/index.ts +0 -1470
  496. package/src/models/mappers.ts +0 -1805
  497. package/src/models/parameters.ts +0 -183
  498. package/src/operations/availabilityGroupListeners.ts +0 -527
  499. package/src/operations/index.ts +0 -13
  500. package/src/operations/operations.ts +0 -149
  501. package/src/operations/sqlVirtualMachineGroups.ts +0 -737
  502. package/src/operations/sqlVirtualMachineTroubleshoot.ts +0 -172
  503. package/src/operations/sqlVirtualMachines.ts +0 -1115
  504. package/src/operationsInterfaces/availabilityGroupListeners.ts +0 -115
  505. package/src/operationsInterfaces/index.ts +0 -13
  506. package/src/operationsInterfaces/operations.ts +0 -22
  507. package/src/operationsInterfaces/sqlVirtualMachineGroups.ts +0 -147
  508. package/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.ts +0 -51
  509. package/src/operationsInterfaces/sqlVirtualMachines.ts +0 -210
  510. package/src/pagingHelper.ts +0 -39
  511. package/src/sqlVirtualMachineManagementClient.ts +0 -162
  512. package/tsconfig.json +0 -33
  513. package/types/arm-sqlvirtualmachine.d.ts +0 -1761
@@ -0,0 +1,70 @@
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 sqlVirtualMachineManagementClient_exports = {};
19
+ __export(sqlVirtualMachineManagementClient_exports, {
20
+ SqlVirtualMachineManagementClient: () => SqlVirtualMachineManagementClient
21
+ });
22
+ module.exports = __toCommonJS(sqlVirtualMachineManagementClient_exports);
23
+ var import_api = require("./api/index.js");
24
+ var import_availabilityGroupListeners = require("./classic/availabilityGroupListeners/index.js");
25
+ var import_operations = require("./classic/operations/index.js");
26
+ var import_sqlVirtualMachineGroups = require("./classic/sqlVirtualMachineGroups/index.js");
27
+ var import_sqlVirtualMachineTroubleshoot = require("./classic/sqlVirtualMachineTroubleshoot/index.js");
28
+ var import_sqlVirtualMachines = require("./classic/sqlVirtualMachines/index.js");
29
+ class SqlVirtualMachineManagementClient {
30
+ _client;
31
+ /** The pipeline used by this client to make requests */
32
+ pipeline;
33
+ /** The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. */
34
+ constructor(credential, subscriptionIdOrOptions, options) {
35
+ let subscriptionId;
36
+ if (typeof subscriptionIdOrOptions === "string") {
37
+ subscriptionId = subscriptionIdOrOptions;
38
+ } else if (typeof subscriptionIdOrOptions === "object") {
39
+ options = subscriptionIdOrOptions;
40
+ }
41
+ options = options ?? {};
42
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
43
+ const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-client` : `azsdk-js-client`;
44
+ this._client = (0, import_api.createSqlVirtualMachineManagement)(credential, subscriptionId ?? "", {
45
+ ...options,
46
+ userAgentOptions: { userAgentPrefix }
47
+ });
48
+ this.pipeline = this._client.pipeline;
49
+ this.sqlVirtualMachineTroubleshoot = (0, import_sqlVirtualMachineTroubleshoot._getSqlVirtualMachineTroubleshootOperations)(this._client);
50
+ this.sqlVirtualMachineGroups = (0, import_sqlVirtualMachineGroups._getSqlVirtualMachineGroupsOperations)(this._client);
51
+ this.sqlVirtualMachines = (0, import_sqlVirtualMachines._getSqlVirtualMachinesOperations)(this._client);
52
+ this.availabilityGroupListeners = (0, import_availabilityGroupListeners._getAvailabilityGroupListenersOperations)(this._client);
53
+ this.operations = (0, import_operations._getOperationsOperations)(this._client);
54
+ }
55
+ /** The operation groups for sqlVirtualMachineTroubleshoot */
56
+ sqlVirtualMachineTroubleshoot;
57
+ /** The operation groups for sqlVirtualMachineGroups */
58
+ sqlVirtualMachineGroups;
59
+ /** The operation groups for sqlVirtualMachines */
60
+ sqlVirtualMachines;
61
+ /** The operation groups for availabilityGroupListeners */
62
+ availabilityGroupListeners;
63
+ /** The operation groups for operations */
64
+ operations;
65
+ }
66
+ // Annotate the CommonJS export names for ESM import in node:
67
+ 0 && (module.exports = {
68
+ SqlVirtualMachineManagementClient
69
+ });
70
+ //# sourceMappingURL=sqlVirtualMachineManagementClient.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/sqlVirtualMachineManagementClient.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n SqlVirtualMachineManagementContext,\n SqlVirtualMachineManagementClientOptionalParams,\n} from \"./api/index.js\";\nimport { createSqlVirtualMachineManagement } from \"./api/index.js\";\nimport type { AvailabilityGroupListenersOperations } from \"./classic/availabilityGroupListeners/index.js\";\nimport { _getAvailabilityGroupListenersOperations } from \"./classic/availabilityGroupListeners/index.js\";\nimport type { OperationsOperations } from \"./classic/operations/index.js\";\nimport { _getOperationsOperations } from \"./classic/operations/index.js\";\nimport type { SqlVirtualMachineGroupsOperations } from \"./classic/sqlVirtualMachineGroups/index.js\";\nimport { _getSqlVirtualMachineGroupsOperations } from \"./classic/sqlVirtualMachineGroups/index.js\";\nimport type { SqlVirtualMachineTroubleshootOperations } from \"./classic/sqlVirtualMachineTroubleshoot/index.js\";\nimport { _getSqlVirtualMachineTroubleshootOperations } from \"./classic/sqlVirtualMachineTroubleshoot/index.js\";\nimport type { SqlVirtualMachinesOperations } from \"./classic/sqlVirtualMachines/index.js\";\nimport { _getSqlVirtualMachinesOperations } from \"./classic/sqlVirtualMachines/index.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { Pipeline } from \"@azure/core-rest-pipeline\";\n\nexport type { SqlVirtualMachineManagementClientOptionalParams } from \"./api/sqlVirtualMachineManagementContext.js\";\n\nexport class SqlVirtualMachineManagementClient {\n private _client: SqlVirtualMachineManagementContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(\n credential: TokenCredential,\n options?: SqlVirtualMachineManagementClientOptionalParams,\n );\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options?: SqlVirtualMachineManagementClientOptionalParams,\n );\n /** The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. */\n constructor(\n credential: TokenCredential,\n subscriptionIdOrOptions?: string | SqlVirtualMachineManagementClientOptionalParams,\n options?: SqlVirtualMachineManagementClientOptionalParams,\n ) {\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n options = options ?? {};\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createSqlVirtualMachineManagement(credential, subscriptionId ?? \"\", {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.sqlVirtualMachineTroubleshoot = _getSqlVirtualMachineTroubleshootOperations(this._client);\n this.sqlVirtualMachineGroups = _getSqlVirtualMachineGroupsOperations(this._client);\n this.sqlVirtualMachines = _getSqlVirtualMachinesOperations(this._client);\n this.availabilityGroupListeners = _getAvailabilityGroupListenersOperations(this._client);\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** The operation groups for sqlVirtualMachineTroubleshoot */\n public readonly sqlVirtualMachineTroubleshoot: SqlVirtualMachineTroubleshootOperations;\n /** The operation groups for sqlVirtualMachineGroups */\n public readonly sqlVirtualMachineGroups: SqlVirtualMachineGroupsOperations;\n /** The operation groups for sqlVirtualMachines */\n public readonly sqlVirtualMachines: SqlVirtualMachinesOperations;\n /** The operation groups for availabilityGroupListeners */\n public readonly availabilityGroupListeners: AvailabilityGroupListenersOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,iBAAkD;AAElD,wCAAyD;AAEzD,wBAAyC;AAEzC,qCAAsD;AAEtD,2CAA4D;AAE5D,gCAAiD;AAM1C,MAAM,kCAAkC;AAAA,EACrC;AAAA;AAAA,EAEQ;AAAA;AAAA,EAYhB,YACE,YACA,yBACA,SACA;AACA,QAAI;AAEJ,QAAI,OAAO,4BAA4B,UAAU;AAC/C,uBAAiB;AAAA,IACnB,WAAW,OAAO,4BAA4B,UAAU;AACtD,gBAAU;AAAA,IACZ;AAEA,cAAU,WAAW,CAAC;AACtB,UAAM,oBAAoB,SAAS,kBAAkB;AACrD,UAAM,kBAAkB,oBACpB,GAAG,iBAAiB,qBACpB;AACJ,SAAK,cAAU,8CAAkC,YAAY,kBAAkB,IAAI;AAAA,MACjF,GAAG;AAAA,MACH,kBAAkB,EAAE,gBAAgB;AAAA,IACtC,CAAC;AACD,SAAK,WAAW,KAAK,QAAQ;AAC7B,SAAK,oCAAgC,kFAA4C,KAAK,OAAO;AAC7F,SAAK,8BAA0B,sEAAsC,KAAK,OAAO;AACjF,SAAK,yBAAqB,4DAAiC,KAAK,OAAO;AACvE,SAAK,iCAA6B,4EAAyC,KAAK,OAAO;AACvF,SAAK,iBAAa,4CAAyB,KAAK,OAAO;AAAA,EACzD;AAAA;AAAA,EAGgB;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAClB;",
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
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/static-helpers/pagingHelpers.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } 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 nextLinkMethod?: \"GET\" | \"POST\";\n apiVersion?: 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 nextLinkMethod = options.nextLinkMethod ?? \"GET\";\n const apiVersion = options.apiVersion;\n const pagedResult: PagedResult<TElement, TPage, TPageSettings> = {\n getPage: async (pageLink?: string) => {\n let result;\n if (pageLink === undefined) {\n result = await getInitialResponse();\n } else {\n const resolvedPageLink = apiVersion ? addApiVersionToUrl(pageLink, apiVersion) : pageLink;\n result =\n nextLinkMethod === \"POST\"\n ? await client.pathUnchecked(resolvedPageLink).post()\n : await client.pathUnchecked(resolvedPageLink).get();\n }\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\n/**\n * Adds the api-version query parameter on a URL if it's not present.\n * @param url - the URL to modify\n * @param apiVersion - the API version to set\n * @returns - the URL with the api-version query parameter set\n */\nfunction addApiVersionToUrl(url: string, apiVersion: string): string {\n // The base URL is only used for parsing and won't appear in the returned URL\n const urlObj = new URL(url, \"https://microsoft.com\");\n if (!urlObj.searchParams.get(\"api-version\")) {\n // Append one if there is no apiVersion\n return `${url}${urlObj.search ? \"&\" : \"?\"}api-version=${apiVersion}`;\n }\n return url;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,yBAAgC;AAChC,gCAA0B;AAoFnB,SAAS,wBAMd,QACA,oBACA,qBACA,kBACA,UAA0C,CAAC,GACiB;AAC5D,QAAM,WAAW,QAAQ,YAAY;AACrC,QAAM,eAAe,QAAQ,gBAAgB;AAC7C,QAAM,iBAAiB,QAAQ,kBAAkB;AACjD,QAAM,aAAa,QAAQ;AAC3B,QAAM,cAA2D;AAAA,IAC/D,SAAS,OAAO,aAAsB;AACpC,UAAI;AACJ,UAAI,aAAa,QAAW;AAC1B,iBAAS,MAAM,mBAAmB;AAAA,MACpC,OAAO;AACL,cAAM,mBAAmB,aAAa,mBAAmB,UAAU,UAAU,IAAI;AACjF,iBACE,mBAAmB,SACf,MAAM,OAAO,cAAc,gBAAgB,EAAE,KAAK,IAClD,MAAM,OAAO,cAAc,gBAAgB,EAAE,IAAI;AAAA,MACzD;AACA,yBAAmB,QAAQ,gBAAgB;AAC3C,YAAM,UAAU,MAAM,oBAAoB,MAAmB;AAC7D,YAAM,WAAW,YAAY,SAAS,YAAY;AAClD,YAAM,SAAS,YAAsB,SAAS,QAAQ;AACtD,aAAO;AAAA,QACL,MAAM;AAAA,QACN,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,IACA,QAAQ,CAAC,aAA6B;AACpC,YAAM,EAAE,kBAAkB,IAAI,YAAY,CAAC;AAC3C,aAAO,qBAAqB,aAAa;AAAA,QACvC,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF;AACA,SAAO,sBAAsB,WAAW;AAC1C;AAUA,SAAS,sBAKP,aAC4D;AAC5D,QAAM,OAAO,qBAAqD,WAAW;AAC7E,SAAO;AAAA,IACL,OAAO;AACL,aAAO,KAAK,KAAK;AAAA,IACnB;AAAA,IACA,CAAC,OAAO,aAAa,IAAI;AACvB,aAAO;AAAA,IACT;AAAA,IACA,QACE,aAAa,WACZ,CAAC,aAA6B;AAC7B,YAAM,EAAE,kBAAkB,IAAI,YAAY,CAAC;AAC3C,aAAO,qBAAqB,aAAa;AAAA,QACvC,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACJ;AACF;AAEA,gBAAgB,qBACd,aACiC;AACjC,QAAM,QAAQ,qBAAqB,WAAW;AAC9C,mBAAiB,QAAQ,OAAO;AAC9B,WAAO;AAAA,EACT;AACF;AAEA,gBAAgB,qBACd,aACA,UAEI,CAAC,GACoD;AACzD,QAAM,EAAE,SAAS,IAAI;AACrB,MAAI,WAAW,MAAM,YAAY,QAAQ,YAAY,YAAY,aAAa;AAC9E,MAAI,CAAC,UAAU;AACb;AAAA,EACF;AACA,MAAI,SAAS,SAAS;AACtB,SAAO,oBAAoB,SAAS;AACpC,QAAM;AACN,SAAO,SAAS,cAAc;AAC5B,eAAW,MAAM,YAAY,QAAQ,SAAS,YAAY;AAC1D,QAAI,CAAC,UAAU;AACb;AAAA,IACF;AACA,aAAS,SAAS;AAClB,WAAO,oBAAoB,SAAS;AACpC,UAAM;AAAA,EACR;AACF;AAKA,SAAS,YAAY,MAAe,cAA2C;AAC7E,MAAI,CAAC,cAAc;AACjB,WAAO;AAAA,EACT;AAEA,QAAM,WAAY,KAAiC,YAAY;AAE/D,MAAI,OAAO,aAAa,YAAY,OAAO,aAAa,eAAe,aAAa,MAAM;AACxF,UAAM,IAAI;AAAA,MACR,iBAAiB,YAAY,oDAAoD,OAAO,QAAQ;AAAA,IAClG;AAAA,EACF;AAEA,MAAI,aAAa,MAAM;AACrB,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAKA,SAAS,YAAyB,MAAe,UAAuB;AACtE,QAAM,QAAS,KAAiC,QAAQ;AACxD,MAAI,CAAC,MAAM,QAAQ,KAAK,GAAG;AACzB,UAAM,IAAI;AAAA,MACR;AAAA,qDAAkF,QAAQ;AAAA,IAC5F;AAAA,EACF;AAEA,SAAO,SAAS,CAAC;AACnB;AAKA,SAAS,mBAAmB,UAAiC,kBAAkC;AAC7F,MAAI,CAAC,iBAAiB,SAAS,SAAS,MAAM,GAAG;AAC/C,cAAM;AAAA,MACJ,gDAAgD,SAAS,MAAM;AAAA,MAC/D;AAAA,IACF;AAAA,EACF;AACF;AAQA,SAAS,mBAAmB,KAAa,YAA4B;AAEnE,QAAM,SAAS,IAAI,IAAI,KAAK,uBAAuB;AACnD,MAAI,CAAC,OAAO,aAAa,IAAI,aAAa,GAAG;AAE3C,WAAO,GAAG,GAAG,GAAG,OAAO,SAAS,MAAM,GAAG,eAAe,UAAU;AAAA,EACpE;AACA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,34 @@
1
+ import type { OperationState, PollerLike, ResourceLocationConfig } from "@azure/core-lro";
2
+ import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
3
+ import type { 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
+ * The api-version of the LRO
30
+ */
31
+ apiVersion?: string;
32
+ }
33
+ 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>;
34
+ //# sourceMappingURL=pollingHelpers.d.ts.map
@@ -0,0 +1,101 @@
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 pollingHelpers_exports = {};
19
+ __export(pollingHelpers_exports, {
20
+ getLongRunningPoller: () => getLongRunningPoller
21
+ });
22
+ module.exports = __toCommonJS(pollingHelpers_exports);
23
+ var import_core_lro = require("@azure/core-lro");
24
+ var import_core_client = require("@azure-rest/core-client");
25
+ function getLongRunningPoller(client, processResponseBody, expectedStatuses, options) {
26
+ const { restoreFrom, getInitialResponse, apiVersion } = options;
27
+ if (!restoreFrom && !getInitialResponse) {
28
+ throw new Error("Either restoreFrom or getInitialResponse must be specified");
29
+ }
30
+ let initialResponse = void 0;
31
+ const pollAbortController = new AbortController();
32
+ const poller = {
33
+ sendInitialRequest: async () => {
34
+ if (!getInitialResponse) {
35
+ throw new Error("getInitialResponse is required when initializing a new poller");
36
+ }
37
+ initialResponse = await getInitialResponse();
38
+ return getLroResponse(initialResponse, expectedStatuses);
39
+ },
40
+ sendPollRequest: async (path, pollOptions) => {
41
+ function abortListener() {
42
+ pollAbortController.abort();
43
+ }
44
+ const abortSignal = pollAbortController.signal;
45
+ if (options.abortSignal?.aborted) {
46
+ pollAbortController.abort();
47
+ } else if (pollOptions?.abortSignal?.aborted) {
48
+ pollAbortController.abort();
49
+ } else if (!abortSignal.aborted) {
50
+ options.abortSignal?.addEventListener("abort", abortListener, {
51
+ once: true
52
+ });
53
+ pollOptions?.abortSignal?.addEventListener("abort", abortListener, {
54
+ once: true
55
+ });
56
+ }
57
+ let response;
58
+ try {
59
+ const pollingPath = apiVersion ? addApiVersionToUrl(path, apiVersion) : path;
60
+ response = await client.pathUnchecked(pollingPath).get({ abortSignal });
61
+ } finally {
62
+ options.abortSignal?.removeEventListener("abort", abortListener);
63
+ pollOptions?.abortSignal?.removeEventListener("abort", abortListener);
64
+ }
65
+ return getLroResponse(response, expectedStatuses);
66
+ }
67
+ };
68
+ return (0, import_core_lro.createHttpPoller)(poller, {
69
+ intervalInMs: options?.updateIntervalInMs,
70
+ resourceLocationConfig: options?.resourceLocationConfig,
71
+ restoreFrom: options?.restoreFrom,
72
+ processResult: (result) => {
73
+ return processResponseBody(result);
74
+ }
75
+ });
76
+ }
77
+ function getLroResponse(response, expectedStatuses) {
78
+ if (!expectedStatuses.includes(response.status)) {
79
+ throw (0, import_core_client.createRestError)(response);
80
+ }
81
+ return {
82
+ flatResponse: response,
83
+ rawResponse: {
84
+ ...response,
85
+ statusCode: Number.parseInt(response.status),
86
+ body: response.body
87
+ }
88
+ };
89
+ }
90
+ function addApiVersionToUrl(url, apiVersion) {
91
+ const urlObj = new URL(url, "https://microsoft.com");
92
+ if (!urlObj.searchParams.get("api-version")) {
93
+ return `${url}${urlObj.search ? "&" : "?"}api-version=${apiVersion}`;
94
+ }
95
+ return url;
96
+ }
97
+ // Annotate the CommonJS export names for ESM import in node:
98
+ 0 && (module.exports = {
99
+ getLongRunningPoller
100
+ });
101
+ //# sourceMappingURL=pollingHelpers.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/static-helpers/pollingHelpers.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n OperationResponse,\n OperationState,\n PollerLike,\n ResourceLocationConfig,\n RunningOperation,\n} from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\n\nexport interface GetLongRunningPollerOptions<TResponse> {\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 /**\n * The potential location of the result of the LRO if specified by the LRO extension in the swagger.\n */\n resourceLocationConfig?: ResourceLocationConfig;\n /**\n * The original url of the LRO\n * Should not be null when restoreFrom is set\n */\n initialRequestUrl?: string;\n /**\n * A serialized poller which can be used to resume an existing paused Long-Running-Operation.\n */\n restoreFrom?: string;\n /**\n * The function to get the initial response\n */\n getInitialResponse?: () => PromiseLike<TResponse>;\n /**\n * The api-version of the LRO\n */\n apiVersion?: string;\n}\nexport function getLongRunningPoller<TResponse extends PathUncheckedResponse, TResult = void>(\n client: Client,\n processResponseBody: (result: TResponse) => Promise<TResult>,\n expectedStatuses: string[],\n options: GetLongRunningPollerOptions<TResponse>,\n): PollerLike<OperationState<TResult>, TResult> {\n const { restoreFrom, getInitialResponse, apiVersion } = options;\n if (!restoreFrom && !getInitialResponse) {\n throw new Error(\"Either restoreFrom or getInitialResponse must be specified\");\n }\n let initialResponse: TResponse | undefined = undefined;\n const pollAbortController = new AbortController();\n const poller: RunningOperation<TResponse> = {\n sendInitialRequest: async () => {\n if (!getInitialResponse) {\n throw new Error(\"getInitialResponse is required when initializing a new poller\");\n }\n initialResponse = await getInitialResponse();\n return getLroResponse(initialResponse, expectedStatuses);\n },\n sendPollRequest: async (\n path: string,\n pollOptions?: {\n abortSignal?: AbortSignalLike;\n },\n ) => {\n // The poll request would both listen to the user provided abort signal and the poller's own abort signal\n function abortListener(): void {\n pollAbortController.abort();\n }\n const abortSignal = pollAbortController.signal;\n if (options.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (pollOptions?.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (!abortSignal.aborted) {\n options.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n pollOptions?.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n const pollingPath = apiVersion ? addApiVersionToUrl(path, apiVersion) : path;\n response = await client.pathUnchecked(pollingPath).get({ abortSignal });\n } finally {\n options.abortSignal?.removeEventListener(\"abort\", abortListener);\n pollOptions?.abortSignal?.removeEventListener(\"abort\", abortListener);\n }\n\n return getLroResponse(response as TResponse, expectedStatuses);\n },\n };\n return createHttpPoller(poller, {\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: options?.resourceLocationConfig,\n restoreFrom: options?.restoreFrom,\n processResult: (result: unknown) => {\n return processResponseBody(result as TResponse);\n },\n });\n}\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @param deserializeFn - deserialize function to convert Rest response to modular output\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResponse extends PathUncheckedResponse>(\n response: TResponse,\n expectedStatuses: string[],\n): OperationResponse<TResponse> {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(response);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n\n/**\n * Adds the api-version query parameter on a URL if it's not present.\n * @param url - the URL to modify\n * @param apiVersion - the API version to set\n * @returns - the URL with the api-version query parameter set\n */\nfunction addApiVersionToUrl(url: string, apiVersion: string): string {\n // The base URL is only used for parsing and won't appear in the returned URL\n const urlObj = new URL(url, \"https://microsoft.com\");\n if (!urlObj.searchParams.get(\"api-version\")) {\n // Append one if there is no apiVersion\n return `${url}${urlObj.search ? \"&\" : \"?\"}api-version=${apiVersion}`;\n }\n return url;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,sBAAiC;AAGjC,yBAAgC;AAgCzB,SAAS,qBACd,QACA,qBACA,kBACA,SAC8C;AAC9C,QAAM,EAAE,aAAa,oBAAoB,WAAW,IAAI;AACxD,MAAI,CAAC,eAAe,CAAC,oBAAoB;AACvC,UAAM,IAAI,MAAM,4DAA4D;AAAA,EAC9E;AACA,MAAI,kBAAyC;AAC7C,QAAM,sBAAsB,IAAI,gBAAgB;AAChD,QAAM,SAAsC;AAAA,IAC1C,oBAAoB,YAAY;AAC9B,UAAI,CAAC,oBAAoB;AACvB,cAAM,IAAI,MAAM,+DAA+D;AAAA,MACjF;AACA,wBAAkB,MAAM,mBAAmB;AAC3C,aAAO,eAAe,iBAAiB,gBAAgB;AAAA,IACzD;AAAA,IACA,iBAAiB,OACf,MACA,gBAGG;AAEH,eAAS,gBAAsB;AAC7B,4BAAoB,MAAM;AAAA,MAC5B;AACA,YAAM,cAAc,oBAAoB;AACxC,UAAI,QAAQ,aAAa,SAAS;AAChC,4BAAoB,MAAM;AAAA,MAC5B,WAAW,aAAa,aAAa,SAAS;AAC5C,4BAAoB,MAAM;AAAA,MAC5B,WAAW,CAAC,YAAY,SAAS;AAC/B,gBAAQ,aAAa,iBAAiB,SAAS,eAAe;AAAA,UAC5D,MAAM;AAAA,QACR,CAAC;AACD,qBAAa,aAAa,iBAAiB,SAAS,eAAe;AAAA,UACjE,MAAM;AAAA,QACR,CAAC;AAAA,MACH;AACA,UAAI;AACJ,UAAI;AACF,cAAM,cAAc,aAAa,mBAAmB,MAAM,UAAU,IAAI;AACxE,mBAAW,MAAM,OAAO,cAAc,WAAW,EAAE,IAAI,EAAE,YAAY,CAAC;AAAA,MACxE,UAAE;AACA,gBAAQ,aAAa,oBAAoB,SAAS,aAAa;AAC/D,qBAAa,aAAa,oBAAoB,SAAS,aAAa;AAAA,MACtE;AAEA,aAAO,eAAe,UAAuB,gBAAgB;AAAA,IAC/D;AAAA,EACF;AACA,aAAO,kCAAiB,QAAQ;AAAA,IAC9B,cAAc,SAAS;AAAA,IACvB,wBAAwB,SAAS;AAAA,IACjC,aAAa,SAAS;AAAA,IACtB,eAAe,CAAC,WAAoB;AAClC,aAAO,oBAAoB,MAAmB;AAAA,IAChD;AAAA,EACF,CAAC;AACH;AAOA,SAAS,eACP,UACA,kBAC8B;AAC9B,MAAI,CAAC,iBAAiB,SAAS,SAAS,MAAM,GAAG;AAC/C,cAAM,oCAAgB,QAAQ;AAAA,EAChC;AAEA,SAAO;AAAA,IACL,cAAc;AAAA,IACd,aAAa;AAAA,MACX,GAAG;AAAA,MACH,YAAY,OAAO,SAAS,SAAS,MAAM;AAAA,MAC3C,MAAM,SAAS;AAAA,IACjB;AAAA,EACF;AACF;AAQA,SAAS,mBAAmB,KAAa,YAA4B;AAEnE,QAAM,SAAS,IAAI,IAAI,KAAK,uBAAuB;AACnD,MAAI,CAAC,OAAO,aAAa,IAAI,aAAa,GAAG;AAE3C,WAAO,GAAG,GAAG,GAAG,OAAO,SAAS,MAAM,GAAG,eAAe,UAAU;AAAA,EACpE;AACA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Returns true if all specified properties of the item are undefined.
3
+ * @param item The object to check.
4
+ * @param properties The list of property names to check on the item.
5
+ * @returns True if all specified properties are undefined, otherwise false.
6
+ */
7
+ export declare function areAllPropsUndefined(item: Record<string, any>, properties: string[]): boolean;
8
+ //# sourceMappingURL=check-prop-undefined.d.ts.map
@@ -0,0 +1,35 @@
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 check_prop_undefined_exports = {};
19
+ __export(check_prop_undefined_exports, {
20
+ areAllPropsUndefined: () => areAllPropsUndefined
21
+ });
22
+ module.exports = __toCommonJS(check_prop_undefined_exports);
23
+ function areAllPropsUndefined(item, properties) {
24
+ for (const property of properties) {
25
+ if (item[property] !== void 0) {
26
+ return false;
27
+ }
28
+ }
29
+ return true;
30
+ }
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ areAllPropsUndefined
34
+ });
35
+ //# sourceMappingURL=check-prop-undefined.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/static-helpers/serialization/check-prop-undefined.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Returns true if all specified properties of the item are undefined.\n * @param item The object to check.\n * @param properties The list of property names to check on the item.\n * @returns True if all specified properties are undefined, otherwise false.\n */\nexport function areAllPropsUndefined(item: Record<string, any>, properties: string[]): boolean {\n for (const property of properties) {\n if (item[property] !== undefined) {\n return false;\n }\n }\n return true;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,SAAS,qBAAqB,MAA2B,YAA+B;AAC7F,aAAW,YAAY,YAAY;AACjC,QAAI,KAAK,QAAQ,MAAM,QAAW;AAChC,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;",
6
+ "names": []
7
+ }