@azure-tools/typespec-ts 0.55.0-dev.1 → 0.55.0-dev.10

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 (940) hide show
  1. package/README.md +68 -105
  2. package/dist/src/context-manager.d.ts +75 -0
  3. package/dist/src/context-manager.d.ts.map +1 -0
  4. package/dist/src/context-manager.js +59 -0
  5. package/dist/src/context-manager.js.map +1 -0
  6. package/dist/src/framework/hooks/binder.d.ts +1 -1
  7. package/dist/src/framework/hooks/binder.d.ts.map +1 -1
  8. package/dist/src/framework/hooks/binder.js +6 -7
  9. package/dist/src/framework/hooks/binder.js.map +1 -1
  10. package/dist/src/framework/hooks/sdk-types.d.ts +26 -0
  11. package/dist/src/framework/hooks/sdk-types.d.ts.map +1 -0
  12. package/dist/src/framework/hooks/sdk-types.js +157 -0
  13. package/dist/src/framework/hooks/sdk-types.js.map +1 -0
  14. package/dist/src/framework/hooks/use-dependencies.d.ts +4 -0
  15. package/dist/src/framework/hooks/use-dependencies.d.ts.map +1 -0
  16. package/dist/src/framework/hooks/use-dependencies.js +13 -0
  17. package/dist/src/framework/hooks/use-dependencies.js.map +1 -0
  18. package/dist/src/framework/load-static-helpers.d.ts +4 -1
  19. package/dist/src/framework/load-static-helpers.d.ts.map +1 -1
  20. package/dist/src/framework/load-static-helpers.js +26 -34
  21. package/dist/src/framework/load-static-helpers.js.map +1 -1
  22. package/dist/src/framework/sample.js +1 -1
  23. package/dist/src/framework/sample.js.map +1 -1
  24. package/dist/src/index.d.ts.map +1 -1
  25. package/dist/src/index.js +126 -192
  26. package/dist/src/index.js.map +1 -1
  27. package/dist/src/lib.d.ts +2 -18
  28. package/dist/src/lib.d.ts.map +1 -1
  29. package/dist/src/lib.js +30 -124
  30. package/dist/src/lib.js.map +1 -1
  31. package/dist/src/meta-tree.d.ts +7 -0
  32. package/dist/src/meta-tree.d.ts.map +1 -0
  33. package/dist/src/meta-tree.js +2 -0
  34. package/dist/src/meta-tree.js.map +1 -0
  35. package/dist/src/modular/build-classical-client.d.ts +6 -0
  36. package/dist/src/modular/build-classical-client.d.ts.map +1 -0
  37. package/dist/src/modular/build-classical-client.js +345 -0
  38. package/dist/src/modular/build-classical-client.js.map +1 -0
  39. package/dist/src/modular/build-classical-operation-groups.d.ts +6 -0
  40. package/dist/src/modular/build-classical-operation-groups.d.ts.map +1 -0
  41. package/dist/src/modular/build-classical-operation-groups.js +48 -0
  42. package/dist/src/modular/build-classical-operation-groups.js.map +1 -0
  43. package/dist/src/modular/build-client-context.d.ts +13 -0
  44. package/dist/src/modular/build-client-context.d.ts.map +1 -0
  45. package/dist/src/modular/build-client-context.js +237 -0
  46. package/dist/src/modular/build-client-context.js.map +1 -0
  47. package/dist/src/modular/build-modular-options.d.ts +6 -0
  48. package/dist/src/modular/build-modular-options.d.ts.map +1 -0
  49. package/dist/src/modular/build-modular-options.js +14 -0
  50. package/dist/src/modular/build-modular-options.js.map +1 -0
  51. package/dist/src/modular/build-operations.d.ts +21 -0
  52. package/dist/src/modular/build-operations.d.ts.map +1 -0
  53. package/dist/src/modular/build-operations.js +172 -0
  54. package/dist/src/modular/build-operations.js.map +1 -0
  55. package/dist/src/modular/build-project-files.d.ts +4 -0
  56. package/dist/src/modular/build-project-files.d.ts.map +1 -0
  57. package/dist/src/modular/build-project-files.js +91 -0
  58. package/dist/src/modular/build-project-files.js.map +1 -0
  59. package/dist/src/modular/build-restore-poller.d.ts +5 -0
  60. package/dist/src/modular/build-restore-poller.d.ts.map +1 -0
  61. package/dist/src/modular/build-restore-poller.js +216 -0
  62. package/dist/src/modular/build-restore-poller.js.map +1 -0
  63. package/dist/src/modular/build-root-index.d.ts +13 -0
  64. package/dist/src/modular/build-root-index.d.ts.map +1 -0
  65. package/dist/src/modular/build-root-index.js +275 -0
  66. package/dist/src/modular/build-root-index.js.map +1 -0
  67. package/dist/src/modular/build-subpath-index.d.ts +16 -0
  68. package/dist/src/modular/build-subpath-index.d.ts.map +1 -0
  69. package/dist/src/modular/build-subpath-index.js +119 -0
  70. package/dist/src/modular/build-subpath-index.js.map +1 -0
  71. package/dist/src/modular/emit-logger-file.d.ts +3 -0
  72. package/dist/src/modular/emit-logger-file.d.ts.map +1 -0
  73. package/dist/src/modular/emit-logger-file.js +15 -0
  74. package/dist/src/modular/emit-logger-file.js.map +1 -0
  75. package/dist/src/modular/emit-models-options.d.ts +5 -0
  76. package/dist/src/modular/emit-models-options.d.ts.map +1 -0
  77. package/dist/src/modular/emit-models-options.js +35 -0
  78. package/dist/src/modular/emit-models-options.js.map +1 -0
  79. package/dist/src/modular/emit-models.d.ts +23 -0
  80. package/dist/src/modular/emit-models.d.ts.map +1 -0
  81. package/dist/src/modular/emit-models.js +849 -0
  82. package/dist/src/modular/emit-models.js.map +1 -0
  83. package/dist/src/modular/emit-samples.d.ts +7 -0
  84. package/dist/src/modular/emit-samples.d.ts.map +1 -0
  85. package/dist/src/modular/emit-samples.js +482 -0
  86. package/dist/src/modular/emit-samples.js.map +1 -0
  87. package/dist/src/modular/emit-tests.d.ts +8 -0
  88. package/dist/src/modular/emit-tests.d.ts.map +1 -0
  89. package/dist/src/modular/emit-tests.js +165 -0
  90. package/dist/src/modular/emit-tests.js.map +1 -0
  91. package/dist/src/modular/helpers/classical-operation-helpers.d.ts +7 -0
  92. package/dist/src/modular/helpers/classical-operation-helpers.d.ts.map +1 -0
  93. package/dist/src/modular/helpers/classical-operation-helpers.js +258 -0
  94. package/dist/src/modular/helpers/classical-operation-helpers.js.map +1 -0
  95. package/dist/src/modular/helpers/client-helpers.d.ts +34 -0
  96. package/dist/src/modular/helpers/client-helpers.d.ts.map +1 -0
  97. package/dist/src/modular/helpers/client-helpers.js +249 -0
  98. package/dist/src/modular/helpers/client-helpers.js.map +1 -0
  99. package/dist/src/modular/helpers/client-option-helpers.d.ts +43 -0
  100. package/dist/src/modular/helpers/client-option-helpers.d.ts.map +1 -0
  101. package/dist/src/modular/helpers/client-option-helpers.js +103 -0
  102. package/dist/src/modular/helpers/client-option-helpers.js.map +1 -0
  103. package/dist/src/modular/helpers/docs-helpers.d.ts +3 -0
  104. package/dist/src/modular/helpers/docs-helpers.d.ts.map +1 -0
  105. package/dist/src/modular/helpers/docs-helpers.js +10 -0
  106. package/dist/src/modular/helpers/docs-helpers.js.map +1 -0
  107. package/dist/src/modular/helpers/example-value-helpers.d.ts +83 -0
  108. package/dist/src/modular/helpers/example-value-helpers.d.ts.map +1 -0
  109. package/dist/src/modular/helpers/example-value-helpers.js +622 -0
  110. package/dist/src/modular/helpers/example-value-helpers.js.map +1 -0
  111. package/dist/src/modular/helpers/naming-helpers.d.ts +22 -0
  112. package/dist/src/modular/helpers/naming-helpers.d.ts.map +1 -0
  113. package/dist/src/modular/helpers/naming-helpers.js +59 -0
  114. package/dist/src/modular/helpers/naming-helpers.js.map +1 -0
  115. package/dist/src/modular/helpers/operation-helpers.d.ts +105 -0
  116. package/dist/src/modular/helpers/operation-helpers.d.ts.map +1 -0
  117. package/dist/src/modular/helpers/operation-helpers.js +2328 -0
  118. package/dist/src/modular/helpers/operation-helpers.js.map +1 -0
  119. package/dist/src/modular/helpers/type-helpers.d.ts +22 -0
  120. package/dist/src/modular/helpers/type-helpers.d.ts.map +1 -0
  121. package/dist/src/modular/helpers/type-helpers.js +94 -0
  122. package/dist/src/modular/helpers/type-helpers.js.map +1 -0
  123. package/dist/src/modular/serialization/build-deserializer-function.d.ts +7 -0
  124. package/dist/src/modular/serialization/build-deserializer-function.d.ts.map +1 -0
  125. package/dist/src/modular/serialization/build-deserializer-function.js +401 -0
  126. package/dist/src/modular/serialization/build-deserializer-function.js.map +1 -0
  127. package/dist/src/modular/serialization/build-serializer-function.d.ts +7 -0
  128. package/dist/src/modular/serialization/build-serializer-function.d.ts.map +1 -0
  129. package/dist/src/modular/serialization/build-serializer-function.js +442 -0
  130. package/dist/src/modular/serialization/build-serializer-function.js.map +1 -0
  131. package/dist/src/modular/serialization/build-xml-serializer-function.d.ts +44 -0
  132. package/dist/src/modular/serialization/build-xml-serializer-function.d.ts.map +1 -0
  133. package/dist/src/modular/serialization/build-xml-serializer-function.js +729 -0
  134. package/dist/src/modular/serialization/build-xml-serializer-function.js.map +1 -0
  135. package/dist/src/modular/serialization/serialize-utils.d.ts +37 -0
  136. package/dist/src/modular/serialization/serialize-utils.d.ts.map +1 -0
  137. package/dist/src/modular/serialization/serialize-utils.js +145 -0
  138. package/dist/src/modular/serialization/serialize-utils.js.map +1 -0
  139. package/dist/src/modular/type-expressions/get-credential-expression.js +1 -1
  140. package/dist/src/modular/type-expressions/get-credential-expression.js.map +1 -1
  141. package/dist/src/modular/type-expressions/get-model-expression.js +1 -1
  142. package/dist/src/modular/type-expressions/get-model-expression.js.map +1 -1
  143. package/dist/src/rlc-common/helpers/api-version-util.d.ts +17 -0
  144. package/dist/src/rlc-common/helpers/api-version-util.d.ts.map +1 -0
  145. package/dist/src/rlc-common/helpers/api-version-util.js +43 -0
  146. package/dist/src/rlc-common/helpers/api-version-util.js.map +1 -0
  147. package/dist/src/rlc-common/helpers/imports-util.d.ts +17 -0
  148. package/dist/src/rlc-common/helpers/imports-util.d.ts.map +1 -0
  149. package/dist/src/rlc-common/helpers/imports-util.js +151 -0
  150. package/dist/src/rlc-common/helpers/imports-util.js.map +1 -0
  151. package/dist/src/rlc-common/helpers/name-constructors.d.ts +33 -0
  152. package/dist/src/rlc-common/helpers/name-constructors.d.ts.map +1 -0
  153. package/dist/src/rlc-common/helpers/name-constructors.js +45 -0
  154. package/dist/src/rlc-common/helpers/name-constructors.js.map +1 -0
  155. package/dist/src/rlc-common/helpers/name-utils.d.ts +37 -0
  156. package/dist/src/rlc-common/helpers/name-utils.d.ts.map +1 -0
  157. package/dist/src/rlc-common/helpers/name-utils.js +240 -0
  158. package/dist/src/rlc-common/helpers/name-utils.js.map +1 -0
  159. package/dist/src/rlc-common/helpers/operation-helpers.d.ts +16 -0
  160. package/dist/src/rlc-common/helpers/operation-helpers.d.ts.map +1 -0
  161. package/dist/src/rlc-common/helpers/operation-helpers.js +104 -0
  162. package/dist/src/rlc-common/helpers/operation-helpers.js.map +1 -0
  163. package/dist/src/rlc-common/helpers/schema-helpers.d.ts +10 -0
  164. package/dist/src/rlc-common/helpers/schema-helpers.d.ts.map +1 -0
  165. package/dist/src/rlc-common/helpers/schema-helpers.js +37 -0
  166. package/dist/src/rlc-common/helpers/schema-helpers.js.map +1 -0
  167. package/dist/src/rlc-common/helpers/type-util.d.ts +32 -0
  168. package/dist/src/rlc-common/helpers/type-util.d.ts.map +1 -0
  169. package/dist/src/rlc-common/helpers/type-util.js +162 -0
  170. package/dist/src/rlc-common/helpers/type-util.js.map +1 -0
  171. package/dist/src/rlc-common/index.d.ts +21 -39
  172. package/dist/src/rlc-common/index.d.ts.map +1 -1
  173. package/dist/src/rlc-common/index.js +21 -39
  174. package/dist/src/rlc-common/index.js.map +1 -1
  175. package/dist/src/rlc-common/interfaces.d.ts +2 -20
  176. package/dist/src/rlc-common/interfaces.d.ts.map +1 -1
  177. package/dist/src/rlc-common/interfaces.js.map +1 -1
  178. package/dist/src/rlc-common/metadata/build-api-extractor-config.d.ts +6 -0
  179. package/dist/src/rlc-common/metadata/build-api-extractor-config.d.ts.map +1 -0
  180. package/dist/src/rlc-common/metadata/build-api-extractor-config.js +18 -0
  181. package/dist/src/rlc-common/metadata/build-api-extractor-config.js.map +1 -0
  182. package/dist/src/rlc-common/metadata/build-changelog-file.d.ts +6 -0
  183. package/dist/src/rlc-common/metadata/build-changelog-file.d.ts.map +1 -0
  184. package/dist/src/rlc-common/metadata/build-changelog-file.js +25 -0
  185. package/dist/src/rlc-common/metadata/build-changelog-file.js.map +1 -0
  186. package/dist/src/rlc-common/metadata/build-es-lint-config.d.ts +6 -0
  187. package/dist/src/rlc-common/metadata/build-es-lint-config.d.ts.map +1 -0
  188. package/dist/src/rlc-common/metadata/build-es-lint-config.js +41 -0
  189. package/dist/src/rlc-common/metadata/build-es-lint-config.js.map +1 -0
  190. package/dist/src/rlc-common/metadata/build-license-file.d.ts +5 -0
  191. package/dist/src/rlc-common/metadata/build-license-file.d.ts.map +1 -0
  192. package/dist/src/rlc-common/metadata/build-license-file.js +32 -0
  193. package/dist/src/rlc-common/metadata/build-license-file.js.map +1 -0
  194. package/dist/src/rlc-common/metadata/build-package-file.d.ts +25 -0
  195. package/dist/src/rlc-common/metadata/build-package-file.d.ts.map +1 -0
  196. package/dist/src/rlc-common/metadata/build-package-file.js +149 -0
  197. package/dist/src/rlc-common/metadata/build-package-file.js.map +1 -0
  198. package/dist/src/rlc-common/metadata/build-readme-file.d.ts +11 -0
  199. package/dist/src/rlc-common/metadata/build-readme-file.d.ts.map +1 -0
  200. package/dist/src/rlc-common/metadata/build-readme-file.js +328 -0
  201. package/dist/src/rlc-common/metadata/build-readme-file.js.map +1 -0
  202. package/dist/src/rlc-common/metadata/build-sample-env-file.d.ts +6 -0
  203. package/dist/src/rlc-common/metadata/build-sample-env-file.d.ts.map +1 -0
  204. package/dist/src/rlc-common/metadata/build-sample-env-file.js +14 -0
  205. package/dist/src/rlc-common/metadata/build-sample-env-file.js.map +1 -0
  206. package/dist/src/rlc-common/metadata/build-test-config.d.ts +16 -0
  207. package/dist/src/rlc-common/metadata/build-test-config.d.ts.map +1 -0
  208. package/dist/src/rlc-common/metadata/build-test-config.js +51 -0
  209. package/dist/src/rlc-common/metadata/build-test-config.js.map +1 -0
  210. package/dist/src/rlc-common/metadata/build-ts-config.d.ts +61 -0
  211. package/dist/src/rlc-common/metadata/build-ts-config.d.ts.map +1 -0
  212. package/dist/src/rlc-common/metadata/build-ts-config.js +129 -0
  213. package/dist/src/rlc-common/metadata/build-ts-config.js.map +1 -0
  214. package/dist/src/rlc-common/metadata/build-vitest-config.d.ts +6 -0
  215. package/dist/src/rlc-common/metadata/build-vitest-config.d.ts.map +1 -0
  216. package/dist/src/rlc-common/metadata/build-vitest-config.js +26 -0
  217. package/dist/src/rlc-common/metadata/build-vitest-config.js.map +1 -0
  218. package/dist/src/rlc-common/metadata/build-warp-config.d.ts +20 -0
  219. package/dist/src/rlc-common/metadata/build-warp-config.d.ts.map +1 -0
  220. package/dist/src/rlc-common/metadata/build-warp-config.js +73 -0
  221. package/dist/src/rlc-common/metadata/build-warp-config.js.map +1 -0
  222. package/dist/src/rlc-common/metadata/package-json/azure-package-common.d.ts +14 -0
  223. package/dist/src/rlc-common/metadata/package-json/azure-package-common.d.ts.map +1 -0
  224. package/dist/src/rlc-common/metadata/package-json/azure-package-common.js +14 -0
  225. package/dist/src/rlc-common/metadata/package-json/azure-package-common.js.map +1 -0
  226. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts +203 -0
  227. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts.map +1 -0
  228. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js +155 -0
  229. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js.map +1 -0
  230. package/dist/src/rlc-common/metadata/package-json/package-common.d.ts +43 -0
  231. package/dist/src/rlc-common/metadata/package-json/package-common.d.ts.map +1 -0
  232. package/dist/src/rlc-common/metadata/package-json/package-common.js +103 -0
  233. package/dist/src/rlc-common/metadata/package-json/package-common.js.map +1 -0
  234. package/dist/src/rlc-common/static/paginate-content.d.ts +2 -0
  235. package/dist/src/rlc-common/static/paginate-content.d.ts.map +1 -0
  236. package/dist/src/rlc-common/static/paginate-content.js +345 -0
  237. package/dist/src/rlc-common/static/paginate-content.js.map +1 -0
  238. package/dist/src/rlc-common/static/polling-content.d.ts +2 -0
  239. package/dist/src/rlc-common/static/polling-content.d.ts.map +1 -0
  240. package/dist/src/rlc-common/static/polling-content.js +225 -0
  241. package/dist/src/rlc-common/static/polling-content.js.map +1 -0
  242. package/dist/src/rlc-common/static/sample-template.d.ts +2 -0
  243. package/dist/src/rlc-common/static/sample-template.d.ts.map +1 -0
  244. package/dist/src/rlc-common/static/sample-template.js +56 -0
  245. package/dist/src/rlc-common/static/sample-template.js.map +1 -0
  246. package/dist/src/rlc-common/static/serialize-helper.d.ts +6 -0
  247. package/dist/src/rlc-common/static/serialize-helper.d.ts.map +1 -0
  248. package/dist/src/rlc-common/static/serialize-helper.js +31 -0
  249. package/dist/src/rlc-common/static/serialize-helper.js.map +1 -0
  250. package/dist/src/rlc-common/test/build-karma-config.d.ts +6 -0
  251. package/dist/src/rlc-common/test/build-karma-config.d.ts.map +1 -0
  252. package/dist/src/rlc-common/test/build-karma-config.js +11 -0
  253. package/dist/src/rlc-common/test/build-karma-config.js.map +1 -0
  254. package/dist/src/rlc-common/test/build-recorded-client.d.ts +6 -0
  255. package/dist/src/rlc-common/test/build-recorded-client.d.ts.map +1 -0
  256. package/dist/src/rlc-common/test/build-recorded-client.js +14 -0
  257. package/dist/src/rlc-common/test/build-recorded-client.js.map +1 -0
  258. package/dist/src/rlc-common/test/build-sample-test.d.ts +6 -0
  259. package/dist/src/rlc-common/test/build-sample-test.d.ts.map +1 -0
  260. package/dist/src/rlc-common/test/build-sample-test.js +11 -0
  261. package/dist/src/rlc-common/test/build-sample-test.js.map +1 -0
  262. package/dist/src/rlc-common/test/build-snippets.d.ts +6 -0
  263. package/dist/src/rlc-common/test/build-snippets.d.ts.map +1 -0
  264. package/dist/src/rlc-common/test/build-snippets.js +22 -0
  265. package/dist/src/rlc-common/test/build-snippets.js.map +1 -0
  266. package/dist/src/rlc-common/test/template.d.ts +3 -3
  267. package/dist/src/rlc-common/test/template.d.ts.map +1 -1
  268. package/dist/src/rlc-common/test/template.js +1 -35
  269. package/dist/src/rlc-common/test/template.js.map +1 -1
  270. package/dist/src/transform/transform-api-version-info.d.ts +6 -0
  271. package/dist/src/transform/transform-api-version-info.d.ts.map +1 -0
  272. package/dist/src/transform/transform-api-version-info.js +78 -0
  273. package/dist/src/transform/transform-api-version-info.js.map +1 -0
  274. package/dist/src/transform/transform-helper-function-details.d.ts +5 -0
  275. package/dist/src/transform/transform-helper-function-details.d.ts.map +1 -0
  276. package/dist/src/transform/transform-helper-function-details.js +66 -0
  277. package/dist/src/transform/transform-helper-function-details.js.map +1 -0
  278. package/dist/src/transform/transform-parameters.d.ts +14 -0
  279. package/dist/src/transform/transform-parameters.d.ts.map +1 -0
  280. package/dist/src/transform/transform-parameters.js +201 -0
  281. package/dist/src/transform/transform-parameters.js.map +1 -0
  282. package/dist/src/transform/transform-paths.d.ts +5 -0
  283. package/dist/src/transform/transform-paths.d.ts.map +1 -0
  284. package/dist/src/transform/transform-paths.js +102 -0
  285. package/dist/src/transform/transform-paths.js.map +1 -0
  286. package/dist/src/transform/transform-responses.d.ts +5 -0
  287. package/dist/src/transform/transform-responses.d.ts.map +1 -0
  288. package/dist/src/transform/transform-responses.js +171 -0
  289. package/dist/src/transform/transform-responses.js.map +1 -0
  290. package/dist/src/transform/transform-schemas.d.ts +4 -0
  291. package/dist/src/transform/transform-schemas.d.ts.map +1 -0
  292. package/dist/src/transform/transform-schemas.js +191 -0
  293. package/dist/src/transform/transform-schemas.js.map +1 -0
  294. package/dist/src/transform/transform-telemetry-info.d.ts +4 -0
  295. package/dist/src/transform/transform-telemetry-info.d.ts.map +1 -0
  296. package/dist/src/transform/transform-telemetry-info.js +22 -0
  297. package/dist/src/transform/transform-telemetry-info.js.map +1 -0
  298. package/dist/src/transform/transform.d.ts.map +1 -1
  299. package/dist/src/transform/transform.js +19 -26
  300. package/dist/src/transform/transform.js.map +1 -1
  301. package/dist/src/transform/transfrom-rlc-options.d.ts +14 -0
  302. package/dist/src/transform/transfrom-rlc-options.d.ts.map +1 -0
  303. package/dist/src/transform/transfrom-rlc-options.js +304 -0
  304. package/dist/src/transform/transfrom-rlc-options.js.map +1 -0
  305. package/dist/src/utils/client-utils.d.ts +10 -0
  306. package/dist/src/utils/client-utils.d.ts.map +1 -0
  307. package/dist/src/utils/client-utils.js +123 -0
  308. package/dist/src/utils/client-utils.js.map +1 -0
  309. package/dist/src/utils/credential-utils.d.ts +15 -0
  310. package/dist/src/utils/credential-utils.d.ts.map +1 -0
  311. package/dist/src/utils/credential-utils.js +68 -0
  312. package/dist/src/utils/credential-utils.js.map +1 -0
  313. package/dist/src/utils/cross-language-def.d.ts +6 -0
  314. package/dist/src/utils/cross-language-def.d.ts.map +1 -0
  315. package/dist/src/utils/cross-language-def.js +59 -0
  316. package/dist/src/utils/cross-language-def.js.map +1 -0
  317. package/dist/src/utils/emit-util.d.ts +4 -0
  318. package/dist/src/utils/emit-util.d.ts.map +1 -0
  319. package/dist/src/utils/emit-util.js +60 -0
  320. package/dist/src/utils/emit-util.js.map +1 -0
  321. package/dist/src/utils/file-system-utils.d.ts +5 -0
  322. package/dist/src/utils/file-system-utils.d.ts.map +1 -0
  323. package/dist/src/utils/file-system-utils.js +57 -0
  324. package/dist/src/utils/file-system-utils.js.map +1 -0
  325. package/dist/src/utils/import-helper.d.ts +10 -0
  326. package/dist/src/utils/import-helper.d.ts.map +1 -0
  327. package/dist/src/utils/import-helper.js +51 -0
  328. package/dist/src/utils/import-helper.js.map +1 -0
  329. package/dist/src/utils/interfaces.d.ts +1 -1
  330. package/dist/src/utils/interfaces.d.ts.map +1 -1
  331. package/dist/src/utils/media-types.d.ts +28 -0
  332. package/dist/src/utils/media-types.d.ts.map +1 -0
  333. package/dist/src/utils/media-types.js +124 -0
  334. package/dist/src/utils/media-types.js.map +1 -0
  335. package/dist/src/utils/model-utils.d.ts +60 -0
  336. package/dist/src/utils/model-utils.d.ts.map +1 -0
  337. package/dist/src/utils/model-utils.js +1473 -0
  338. package/dist/src/utils/model-utils.js.map +1 -0
  339. package/dist/src/utils/namespace-utils.d.ts +6 -0
  340. package/dist/src/utils/namespace-utils.d.ts.map +1 -0
  341. package/dist/src/utils/namespace-utils.js +69 -0
  342. package/dist/src/utils/namespace-utils.js.map +1 -0
  343. package/dist/src/utils/operation-util.d.ts +97 -0
  344. package/dist/src/utils/operation-util.d.ts.map +1 -0
  345. package/dist/src/utils/operation-util.js +547 -0
  346. package/dist/src/utils/operation-util.js.map +1 -0
  347. package/dist/src/utils/parameter-utils.d.ts +9 -0
  348. package/dist/src/utils/parameter-utils.d.ts.map +1 -0
  349. package/dist/src/utils/parameter-utils.js +147 -0
  350. package/dist/src/utils/parameter-utils.js.map +1 -0
  351. package/dist/src/utils/resolve-project-root.d.ts +6 -4
  352. package/dist/src/utils/resolve-project-root.d.ts.map +1 -1
  353. package/dist/src/utils/resolve-project-root.js +11 -18
  354. package/dist/src/utils/resolve-project-root.js.map +1 -1
  355. package/dist/tsconfig.tsbuildinfo +1 -1
  356. package/package.json +45 -64
  357. package/src/context-manager.ts +101 -0
  358. package/src/framework/hooks/binder.ts +7 -8
  359. package/src/framework/hooks/sdk-types.ts +218 -0
  360. package/src/framework/hooks/use-dependencies.ts +16 -0
  361. package/src/framework/load-static-helpers.ts +38 -41
  362. package/src/framework/sample.ts +1 -1
  363. package/src/index.ts +148 -226
  364. package/src/lib.ts +32 -143
  365. package/src/modular/build-classical-client.ts +434 -0
  366. package/src/modular/build-classical-operation-groups.ts +69 -0
  367. package/src/modular/build-client-context.ts +317 -0
  368. package/src/modular/build-operations.ts +248 -0
  369. package/src/modular/build-project-files.ts +118 -0
  370. package/src/modular/build-restore-poller.ts +242 -0
  371. package/src/modular/build-root-index.ts +403 -0
  372. package/src/modular/build-subpath-index.ts +152 -0
  373. package/src/modular/emit-logger-file.ts +20 -0
  374. package/src/modular/emit-models-options.ts +56 -0
  375. package/src/modular/emit-models.ts +1080 -0
  376. package/src/modular/emit-samples.ts +659 -0
  377. package/src/modular/emit-tests.ts +211 -0
  378. package/src/modular/helpers/classical-operation-helpers.ts +375 -0
  379. package/src/modular/helpers/client-helpers.ts +352 -0
  380. package/src/modular/helpers/example-value-helpers.ts +836 -0
  381. package/src/modular/helpers/naming-helpers.ts +84 -0
  382. package/src/modular/helpers/operation-helpers.ts +3035 -0
  383. package/src/modular/helpers/type-helpers.ts +134 -0
  384. package/src/modular/serialization/build-deserializer-function.ts +564 -0
  385. package/src/modular/serialization/build-serializer-function.ts +614 -0
  386. package/src/modular/serialization/build-xml-serializer-function.ts +951 -0
  387. package/src/modular/serialization/serialize-utils.ts +217 -0
  388. package/src/modular/type-expressions/get-credential-expression.ts +1 -1
  389. package/src/modular/type-expressions/get-model-expression.ts +1 -1
  390. package/src/rlc-common/helpers/imports-util.ts +172 -0
  391. package/src/rlc-common/helpers/name-constructors.ts +88 -0
  392. package/src/rlc-common/helpers/operation-helpers.ts +138 -0
  393. package/src/rlc-common/index.ts +21 -39
  394. package/src/rlc-common/interfaces.ts +2 -23
  395. package/src/rlc-common/metadata/build-api-extractor-config.ts +22 -0
  396. package/src/rlc-common/metadata/build-es-lint-config.ts +45 -0
  397. package/src/rlc-common/metadata/build-package-file.ts +180 -0
  398. package/src/rlc-common/metadata/build-readme-file.ts +413 -0
  399. package/src/rlc-common/metadata/build-sample-env-file.ts +18 -0
  400. package/src/rlc-common/metadata/build-test-config.ts +67 -0
  401. package/src/rlc-common/metadata/build-ts-config.ts +177 -0
  402. package/src/rlc-common/metadata/build-warp-config.ts +87 -0
  403. package/src/rlc-common/metadata/package-json/azure-package-common.ts +20 -0
  404. package/src/rlc-common/metadata/package-json/build-azure-monorepo-package.ts +179 -0
  405. package/src/rlc-common/metadata/package-json/package-common.ts +137 -0
  406. package/src/rlc-common/static/polling-content.ts +225 -0
  407. package/src/rlc-common/test/build-recorded-client.ts +15 -0
  408. package/src/rlc-common/test/build-sample-test.ts +12 -0
  409. package/src/rlc-common/test/build-snippets.ts +25 -0
  410. package/src/rlc-common/test/template.ts +1 -35
  411. package/src/transform/transform-api-version-info.ts +103 -0
  412. package/src/transform/transform-helper-function-details.ts +79 -0
  413. package/src/transform/transform-parameters.ts +321 -0
  414. package/src/transform/transform-paths.ts +157 -0
  415. package/src/transform/transform-responses.ts +237 -0
  416. package/src/transform/transform-schemas.ts +212 -0
  417. package/src/transform/transform-telemetry-info.ts +33 -0
  418. package/src/transform/transform.ts +18 -29
  419. package/src/transform/transfrom-rlc-options.ts +363 -0
  420. package/src/utils/client-utils.ts +161 -0
  421. package/src/utils/cross-language-def.ts +66 -0
  422. package/src/utils/emit-util.ts +67 -0
  423. package/src/utils/file-system-utils.ts +68 -0
  424. package/src/utils/import-helper.ts +59 -0
  425. package/src/utils/interfaces.ts +1 -1
  426. package/src/utils/model-utils.ts +1714 -0
  427. package/src/utils/operation-util.ts +763 -0
  428. package/src/utils/parameter-utils.ts +192 -0
  429. package/src/utils/resolve-project-root.ts +11 -24
  430. package/static/static-helpers/serialization/serializers.ts +1 -0
  431. package/dist/src/contextManager.d.ts +0 -75
  432. package/dist/src/contextManager.d.ts.map +0 -1
  433. package/dist/src/contextManager.js +0 -59
  434. package/dist/src/contextManager.js.map +0 -1
  435. package/dist/src/framework/hooks/sdkTypes.d.ts +0 -26
  436. package/dist/src/framework/hooks/sdkTypes.d.ts.map +0 -1
  437. package/dist/src/framework/hooks/sdkTypes.js +0 -157
  438. package/dist/src/framework/hooks/sdkTypes.js.map +0 -1
  439. package/dist/src/framework/hooks/useDependencies.d.ts +0 -4
  440. package/dist/src/framework/hooks/useDependencies.d.ts.map +0 -1
  441. package/dist/src/framework/hooks/useDependencies.js +0 -13
  442. package/dist/src/framework/hooks/useDependencies.js.map +0 -1
  443. package/dist/src/metaTree.d.ts +0 -7
  444. package/dist/src/metaTree.d.ts.map +0 -1
  445. package/dist/src/metaTree.js +0 -2
  446. package/dist/src/metaTree.js.map +0 -1
  447. package/dist/src/modular/buildClassicalClient.d.ts +0 -6
  448. package/dist/src/modular/buildClassicalClient.d.ts.map +0 -1
  449. package/dist/src/modular/buildClassicalClient.js +0 -345
  450. package/dist/src/modular/buildClassicalClient.js.map +0 -1
  451. package/dist/src/modular/buildClassicalOperationGroups.d.ts +0 -6
  452. package/dist/src/modular/buildClassicalOperationGroups.d.ts.map +0 -1
  453. package/dist/src/modular/buildClassicalOperationGroups.js +0 -48
  454. package/dist/src/modular/buildClassicalOperationGroups.js.map +0 -1
  455. package/dist/src/modular/buildClientContext.d.ts +0 -13
  456. package/dist/src/modular/buildClientContext.d.ts.map +0 -1
  457. package/dist/src/modular/buildClientContext.js +0 -246
  458. package/dist/src/modular/buildClientContext.js.map +0 -1
  459. package/dist/src/modular/buildModularOptions.d.ts +0 -6
  460. package/dist/src/modular/buildModularOptions.d.ts.map +0 -1
  461. package/dist/src/modular/buildModularOptions.js +0 -14
  462. package/dist/src/modular/buildModularOptions.js.map +0 -1
  463. package/dist/src/modular/buildOperations.d.ts +0 -21
  464. package/dist/src/modular/buildOperations.d.ts.map +0 -1
  465. package/dist/src/modular/buildOperations.js +0 -172
  466. package/dist/src/modular/buildOperations.js.map +0 -1
  467. package/dist/src/modular/buildProjectFiles.d.ts +0 -4
  468. package/dist/src/modular/buildProjectFiles.d.ts.map +0 -1
  469. package/dist/src/modular/buildProjectFiles.js +0 -91
  470. package/dist/src/modular/buildProjectFiles.js.map +0 -1
  471. package/dist/src/modular/buildRestorePoller.d.ts +0 -5
  472. package/dist/src/modular/buildRestorePoller.d.ts.map +0 -1
  473. package/dist/src/modular/buildRestorePoller.js +0 -216
  474. package/dist/src/modular/buildRestorePoller.js.map +0 -1
  475. package/dist/src/modular/buildRootIndex.d.ts +0 -13
  476. package/dist/src/modular/buildRootIndex.d.ts.map +0 -1
  477. package/dist/src/modular/buildRootIndex.js +0 -279
  478. package/dist/src/modular/buildRootIndex.js.map +0 -1
  479. package/dist/src/modular/buildSubpathIndex.d.ts +0 -16
  480. package/dist/src/modular/buildSubpathIndex.d.ts.map +0 -1
  481. package/dist/src/modular/buildSubpathIndex.js +0 -119
  482. package/dist/src/modular/buildSubpathIndex.js.map +0 -1
  483. package/dist/src/modular/emitLoggerFile.d.ts +0 -3
  484. package/dist/src/modular/emitLoggerFile.d.ts.map +0 -1
  485. package/dist/src/modular/emitLoggerFile.js +0 -18
  486. package/dist/src/modular/emitLoggerFile.js.map +0 -1
  487. package/dist/src/modular/emitModels.d.ts +0 -23
  488. package/dist/src/modular/emitModels.d.ts.map +0 -1
  489. package/dist/src/modular/emitModels.js +0 -850
  490. package/dist/src/modular/emitModels.js.map +0 -1
  491. package/dist/src/modular/emitModelsOptions.d.ts +0 -5
  492. package/dist/src/modular/emitModelsOptions.d.ts.map +0 -1
  493. package/dist/src/modular/emitModelsOptions.js +0 -35
  494. package/dist/src/modular/emitModelsOptions.js.map +0 -1
  495. package/dist/src/modular/emitSamples.d.ts +0 -7
  496. package/dist/src/modular/emitSamples.d.ts.map +0 -1
  497. package/dist/src/modular/emitSamples.js +0 -500
  498. package/dist/src/modular/emitSamples.js.map +0 -1
  499. package/dist/src/modular/emitTests.d.ts +0 -7
  500. package/dist/src/modular/emitTests.d.ts.map +0 -1
  501. package/dist/src/modular/emitTests.js +0 -155
  502. package/dist/src/modular/emitTests.js.map +0 -1
  503. package/dist/src/modular/helpers/classicalOperationHelpers.d.ts +0 -7
  504. package/dist/src/modular/helpers/classicalOperationHelpers.d.ts.map +0 -1
  505. package/dist/src/modular/helpers/classicalOperationHelpers.js +0 -258
  506. package/dist/src/modular/helpers/classicalOperationHelpers.js.map +0 -1
  507. package/dist/src/modular/helpers/clientHelpers.d.ts +0 -34
  508. package/dist/src/modular/helpers/clientHelpers.d.ts.map +0 -1
  509. package/dist/src/modular/helpers/clientHelpers.js +0 -259
  510. package/dist/src/modular/helpers/clientHelpers.js.map +0 -1
  511. package/dist/src/modular/helpers/clientOptionHelpers.d.ts +0 -43
  512. package/dist/src/modular/helpers/clientOptionHelpers.d.ts.map +0 -1
  513. package/dist/src/modular/helpers/clientOptionHelpers.js +0 -103
  514. package/dist/src/modular/helpers/clientOptionHelpers.js.map +0 -1
  515. package/dist/src/modular/helpers/docsHelpers.d.ts +0 -3
  516. package/dist/src/modular/helpers/docsHelpers.d.ts.map +0 -1
  517. package/dist/src/modular/helpers/docsHelpers.js +0 -10
  518. package/dist/src/modular/helpers/docsHelpers.js.map +0 -1
  519. package/dist/src/modular/helpers/exampleValueHelpers.d.ts +0 -83
  520. package/dist/src/modular/helpers/exampleValueHelpers.d.ts.map +0 -1
  521. package/dist/src/modular/helpers/exampleValueHelpers.js +0 -639
  522. package/dist/src/modular/helpers/exampleValueHelpers.js.map +0 -1
  523. package/dist/src/modular/helpers/namingHelpers.d.ts +0 -22
  524. package/dist/src/modular/helpers/namingHelpers.d.ts.map +0 -1
  525. package/dist/src/modular/helpers/namingHelpers.js +0 -59
  526. package/dist/src/modular/helpers/namingHelpers.js.map +0 -1
  527. package/dist/src/modular/helpers/operationHelpers.d.ts +0 -105
  528. package/dist/src/modular/helpers/operationHelpers.d.ts.map +0 -1
  529. package/dist/src/modular/helpers/operationHelpers.js +0 -2328
  530. package/dist/src/modular/helpers/operationHelpers.js.map +0 -1
  531. package/dist/src/modular/helpers/typeHelpers.d.ts +0 -22
  532. package/dist/src/modular/helpers/typeHelpers.d.ts.map +0 -1
  533. package/dist/src/modular/helpers/typeHelpers.js +0 -94
  534. package/dist/src/modular/helpers/typeHelpers.js.map +0 -1
  535. package/dist/src/modular/serialization/buildDeserializerFunction.d.ts +0 -7
  536. package/dist/src/modular/serialization/buildDeserializerFunction.d.ts.map +0 -1
  537. package/dist/src/modular/serialization/buildDeserializerFunction.js +0 -401
  538. package/dist/src/modular/serialization/buildDeserializerFunction.js.map +0 -1
  539. package/dist/src/modular/serialization/buildSerializerFunction.d.ts +0 -7
  540. package/dist/src/modular/serialization/buildSerializerFunction.d.ts.map +0 -1
  541. package/dist/src/modular/serialization/buildSerializerFunction.js +0 -444
  542. package/dist/src/modular/serialization/buildSerializerFunction.js.map +0 -1
  543. package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts +0 -44
  544. package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts.map +0 -1
  545. package/dist/src/modular/serialization/buildXmlSerializerFunction.js +0 -729
  546. package/dist/src/modular/serialization/buildXmlSerializerFunction.js.map +0 -1
  547. package/dist/src/modular/serialization/serializeUtils.d.ts +0 -37
  548. package/dist/src/modular/serialization/serializeUtils.d.ts.map +0 -1
  549. package/dist/src/modular/serialization/serializeUtils.js +0 -145
  550. package/dist/src/modular/serialization/serializeUtils.js.map +0 -1
  551. package/dist/src/rlc-common/buildClient.d.ts +0 -9
  552. package/dist/src/rlc-common/buildClient.d.ts.map +0 -1
  553. package/dist/src/rlc-common/buildClient.js +0 -391
  554. package/dist/src/rlc-common/buildClient.js.map +0 -1
  555. package/dist/src/rlc-common/buildClientDefinitions.d.ts +0 -6
  556. package/dist/src/rlc-common/buildClientDefinitions.d.ts.map +0 -1
  557. package/dist/src/rlc-common/buildClientDefinitions.js +0 -157
  558. package/dist/src/rlc-common/buildClientDefinitions.js.map +0 -1
  559. package/dist/src/rlc-common/buildIndexFile.d.ts +0 -6
  560. package/dist/src/rlc-common/buildIndexFile.d.ts.map +0 -1
  561. package/dist/src/rlc-common/buildIndexFile.js +0 -241
  562. package/dist/src/rlc-common/buildIndexFile.js.map +0 -1
  563. package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts +0 -6
  564. package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts.map +0 -1
  565. package/dist/src/rlc-common/buildIsUnexpectedHelper.js +0 -223
  566. package/dist/src/rlc-common/buildIsUnexpectedHelper.js.map +0 -1
  567. package/dist/src/rlc-common/buildLogger.d.ts +0 -6
  568. package/dist/src/rlc-common/buildLogger.d.ts.map +0 -1
  569. package/dist/src/rlc-common/buildLogger.js +0 -31
  570. package/dist/src/rlc-common/buildLogger.js.map +0 -1
  571. package/dist/src/rlc-common/buildMethodShortcuts.d.ts +0 -5
  572. package/dist/src/rlc-common/buildMethodShortcuts.d.ts.map +0 -1
  573. package/dist/src/rlc-common/buildMethodShortcuts.js +0 -54
  574. package/dist/src/rlc-common/buildMethodShortcuts.js.map +0 -1
  575. package/dist/src/rlc-common/buildObjectTypes.d.ts +0 -29
  576. package/dist/src/rlc-common/buildObjectTypes.d.ts.map +0 -1
  577. package/dist/src/rlc-common/buildObjectTypes.js +0 -412
  578. package/dist/src/rlc-common/buildObjectTypes.js.map +0 -1
  579. package/dist/src/rlc-common/buildPaginateHelper.d.ts +0 -6
  580. package/dist/src/rlc-common/buildPaginateHelper.d.ts.map +0 -1
  581. package/dist/src/rlc-common/buildPaginateHelper.js +0 -27
  582. package/dist/src/rlc-common/buildPaginateHelper.js.map +0 -1
  583. package/dist/src/rlc-common/buildParameterTypes.d.ts +0 -14
  584. package/dist/src/rlc-common/buildParameterTypes.d.ts.map +0 -1
  585. package/dist/src/rlc-common/buildParameterTypes.js +0 -391
  586. package/dist/src/rlc-common/buildParameterTypes.js.map +0 -1
  587. package/dist/src/rlc-common/buildPollingHelper.d.ts +0 -6
  588. package/dist/src/rlc-common/buildPollingHelper.d.ts.map +0 -1
  589. package/dist/src/rlc-common/buildPollingHelper.js +0 -61
  590. package/dist/src/rlc-common/buildPollingHelper.js.map +0 -1
  591. package/dist/src/rlc-common/buildResponseTypes.d.ts +0 -6
  592. package/dist/src/rlc-common/buildResponseTypes.d.ts.map +0 -1
  593. package/dist/src/rlc-common/buildResponseTypes.js +0 -143
  594. package/dist/src/rlc-common/buildResponseTypes.js.map +0 -1
  595. package/dist/src/rlc-common/buildSamples.d.ts +0 -3
  596. package/dist/src/rlc-common/buildSamples.d.ts.map +0 -1
  597. package/dist/src/rlc-common/buildSamples.js +0 -30
  598. package/dist/src/rlc-common/buildSamples.js.map +0 -1
  599. package/dist/src/rlc-common/buildSchemaType.d.ts +0 -20
  600. package/dist/src/rlc-common/buildSchemaType.d.ts.map +0 -1
  601. package/dist/src/rlc-common/buildSchemaType.js +0 -71
  602. package/dist/src/rlc-common/buildSchemaType.js.map +0 -1
  603. package/dist/src/rlc-common/buildSerializeHelper.d.ts +0 -6
  604. package/dist/src/rlc-common/buildSerializeHelper.d.ts.map +0 -1
  605. package/dist/src/rlc-common/buildSerializeHelper.js +0 -36
  606. package/dist/src/rlc-common/buildSerializeHelper.js.map +0 -1
  607. package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts +0 -6
  608. package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts.map +0 -1
  609. package/dist/src/rlc-common/buildTopLevelIndexFile.js +0 -48
  610. package/dist/src/rlc-common/buildTopLevelIndexFile.js.map +0 -1
  611. package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts +0 -17
  612. package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts.map +0 -1
  613. package/dist/src/rlc-common/helpers/apiVersionUtil.js +0 -43
  614. package/dist/src/rlc-common/helpers/apiVersionUtil.js.map +0 -1
  615. package/dist/src/rlc-common/helpers/importsUtil.d.ts +0 -18
  616. package/dist/src/rlc-common/helpers/importsUtil.d.ts.map +0 -1
  617. package/dist/src/rlc-common/helpers/importsUtil.js +0 -164
  618. package/dist/src/rlc-common/helpers/importsUtil.js.map +0 -1
  619. package/dist/src/rlc-common/helpers/nameConstructors.d.ts +0 -42
  620. package/dist/src/rlc-common/helpers/nameConstructors.d.ts.map +0 -1
  621. package/dist/src/rlc-common/helpers/nameConstructors.js +0 -61
  622. package/dist/src/rlc-common/helpers/nameConstructors.js.map +0 -1
  623. package/dist/src/rlc-common/helpers/nameUtils.d.ts +0 -37
  624. package/dist/src/rlc-common/helpers/nameUtils.d.ts.map +0 -1
  625. package/dist/src/rlc-common/helpers/nameUtils.js +0 -240
  626. package/dist/src/rlc-common/helpers/nameUtils.js.map +0 -1
  627. package/dist/src/rlc-common/helpers/operationHelpers.d.ts +0 -16
  628. package/dist/src/rlc-common/helpers/operationHelpers.d.ts.map +0 -1
  629. package/dist/src/rlc-common/helpers/operationHelpers.js +0 -104
  630. package/dist/src/rlc-common/helpers/operationHelpers.js.map +0 -1
  631. package/dist/src/rlc-common/helpers/packageUtil.d.ts +0 -7
  632. package/dist/src/rlc-common/helpers/packageUtil.d.ts.map +0 -1
  633. package/dist/src/rlc-common/helpers/packageUtil.js +0 -10
  634. package/dist/src/rlc-common/helpers/packageUtil.js.map +0 -1
  635. package/dist/src/rlc-common/helpers/pathUtils.d.ts +0 -2
  636. package/dist/src/rlc-common/helpers/pathUtils.d.ts.map +0 -1
  637. package/dist/src/rlc-common/helpers/pathUtils.js +0 -10
  638. package/dist/src/rlc-common/helpers/pathUtils.js.map +0 -1
  639. package/dist/src/rlc-common/helpers/schemaHelpers.d.ts +0 -10
  640. package/dist/src/rlc-common/helpers/schemaHelpers.d.ts.map +0 -1
  641. package/dist/src/rlc-common/helpers/schemaHelpers.js +0 -37
  642. package/dist/src/rlc-common/helpers/schemaHelpers.js.map +0 -1
  643. package/dist/src/rlc-common/helpers/shortcutMethods.d.ts +0 -4
  644. package/dist/src/rlc-common/helpers/shortcutMethods.d.ts.map +0 -1
  645. package/dist/src/rlc-common/helpers/shortcutMethods.js +0 -49
  646. package/dist/src/rlc-common/helpers/shortcutMethods.js.map +0 -1
  647. package/dist/src/rlc-common/helpers/typeUtil.d.ts +0 -32
  648. package/dist/src/rlc-common/helpers/typeUtil.d.ts.map +0 -1
  649. package/dist/src/rlc-common/helpers/typeUtil.js +0 -162
  650. package/dist/src/rlc-common/helpers/typeUtil.js.map +0 -1
  651. package/dist/src/rlc-common/helpers/valueGenerationUtil.d.ts +0 -12
  652. package/dist/src/rlc-common/helpers/valueGenerationUtil.d.ts.map +0 -1
  653. package/dist/src/rlc-common/helpers/valueGenerationUtil.js +0 -161
  654. package/dist/src/rlc-common/helpers/valueGenerationUtil.js.map +0 -1
  655. package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts +0 -6
  656. package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts.map +0 -1
  657. package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js +0 -55
  658. package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js.map +0 -1
  659. package/dist/src/rlc-common/metadata/buildChangelogFile.d.ts +0 -6
  660. package/dist/src/rlc-common/metadata/buildChangelogFile.d.ts.map +0 -1
  661. package/dist/src/rlc-common/metadata/buildChangelogFile.js +0 -25
  662. package/dist/src/rlc-common/metadata/buildChangelogFile.js.map +0 -1
  663. package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts +0 -6
  664. package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts.map +0 -1
  665. package/dist/src/rlc-common/metadata/buildESLintConfig.js +0 -79
  666. package/dist/src/rlc-common/metadata/buildESLintConfig.js.map +0 -1
  667. package/dist/src/rlc-common/metadata/buildLicenseFile.d.ts +0 -5
  668. package/dist/src/rlc-common/metadata/buildLicenseFile.d.ts.map +0 -1
  669. package/dist/src/rlc-common/metadata/buildLicenseFile.js +0 -32
  670. package/dist/src/rlc-common/metadata/buildLicenseFile.js.map +0 -1
  671. package/dist/src/rlc-common/metadata/buildPackageFile.d.ts +0 -25
  672. package/dist/src/rlc-common/metadata/buildPackageFile.d.ts.map +0 -1
  673. package/dist/src/rlc-common/metadata/buildPackageFile.js +0 -197
  674. package/dist/src/rlc-common/metadata/buildPackageFile.js.map +0 -1
  675. package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts +0 -11
  676. package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts.map +0 -1
  677. package/dist/src/rlc-common/metadata/buildReadmeFile.js +0 -418
  678. package/dist/src/rlc-common/metadata/buildReadmeFile.js.map +0 -1
  679. package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts +0 -6
  680. package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts.map +0 -1
  681. package/dist/src/rlc-common/metadata/buildRollupConfig.js +0 -140
  682. package/dist/src/rlc-common/metadata/buildRollupConfig.js.map +0 -1
  683. package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts +0 -6
  684. package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts.map +0 -1
  685. package/dist/src/rlc-common/metadata/buildSampleEnvFile.js +0 -15
  686. package/dist/src/rlc-common/metadata/buildSampleEnvFile.js.map +0 -1
  687. package/dist/src/rlc-common/metadata/buildTestConfig.d.ts +0 -16
  688. package/dist/src/rlc-common/metadata/buildTestConfig.d.ts.map +0 -1
  689. package/dist/src/rlc-common/metadata/buildTestConfig.js +0 -54
  690. package/dist/src/rlc-common/metadata/buildTestConfig.js.map +0 -1
  691. package/dist/src/rlc-common/metadata/buildTsConfig.d.ts +0 -61
  692. package/dist/src/rlc-common/metadata/buildTsConfig.d.ts.map +0 -1
  693. package/dist/src/rlc-common/metadata/buildTsConfig.js +0 -170
  694. package/dist/src/rlc-common/metadata/buildTsConfig.js.map +0 -1
  695. package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts +0 -6
  696. package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts.map +0 -1
  697. package/dist/src/rlc-common/metadata/buildVitestConfig.js +0 -26
  698. package/dist/src/rlc-common/metadata/buildVitestConfig.js.map +0 -1
  699. package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts +0 -20
  700. package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts.map +0 -1
  701. package/dist/src/rlc-common/metadata/buildWarpConfig.js +0 -76
  702. package/dist/src/rlc-common/metadata/buildWarpConfig.js.map +0 -1
  703. package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts +0 -51
  704. package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts.map +0 -1
  705. package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js +0 -121
  706. package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js.map +0 -1
  707. package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts +0 -242
  708. package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts.map +0 -1
  709. package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js +0 -171
  710. package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js.map +0 -1
  711. package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts +0 -8
  712. package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts.map +0 -1
  713. package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js +0 -101
  714. package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js.map +0 -1
  715. package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.d.ts +0 -57
  716. package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.d.ts.map +0 -1
  717. package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js +0 -53
  718. package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js.map +0 -1
  719. package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts +0 -64
  720. package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts.map +0 -1
  721. package/dist/src/rlc-common/metadata/packageJson/packageCommon.js +0 -180
  722. package/dist/src/rlc-common/metadata/packageJson/packageCommon.js.map +0 -1
  723. package/dist/src/rlc-common/static/paginateContent.d.ts +0 -2
  724. package/dist/src/rlc-common/static/paginateContent.d.ts.map +0 -1
  725. package/dist/src/rlc-common/static/paginateContent.js +0 -345
  726. package/dist/src/rlc-common/static/paginateContent.js.map +0 -1
  727. package/dist/src/rlc-common/static/pollingContent.d.ts +0 -2
  728. package/dist/src/rlc-common/static/pollingContent.d.ts.map +0 -1
  729. package/dist/src/rlc-common/static/pollingContent.js +0 -225
  730. package/dist/src/rlc-common/static/pollingContent.js.map +0 -1
  731. package/dist/src/rlc-common/static/sampleTemplate.d.ts +0 -2
  732. package/dist/src/rlc-common/static/sampleTemplate.d.ts.map +0 -1
  733. package/dist/src/rlc-common/static/sampleTemplate.js +0 -56
  734. package/dist/src/rlc-common/static/sampleTemplate.js.map +0 -1
  735. package/dist/src/rlc-common/static/serializeHelper.d.ts +0 -6
  736. package/dist/src/rlc-common/static/serializeHelper.d.ts.map +0 -1
  737. package/dist/src/rlc-common/static/serializeHelper.js +0 -31
  738. package/dist/src/rlc-common/static/serializeHelper.js.map +0 -1
  739. package/dist/src/rlc-common/test/buildKarmaConfig.d.ts +0 -6
  740. package/dist/src/rlc-common/test/buildKarmaConfig.d.ts.map +0 -1
  741. package/dist/src/rlc-common/test/buildKarmaConfig.js +0 -11
  742. package/dist/src/rlc-common/test/buildKarmaConfig.js.map +0 -1
  743. package/dist/src/rlc-common/test/buildRecordedClient.d.ts +0 -6
  744. package/dist/src/rlc-common/test/buildRecordedClient.d.ts.map +0 -1
  745. package/dist/src/rlc-common/test/buildRecordedClient.js +0 -17
  746. package/dist/src/rlc-common/test/buildRecordedClient.js.map +0 -1
  747. package/dist/src/rlc-common/test/buildSampleTest.d.ts +0 -6
  748. package/dist/src/rlc-common/test/buildSampleTest.d.ts.map +0 -1
  749. package/dist/src/rlc-common/test/buildSampleTest.js +0 -14
  750. package/dist/src/rlc-common/test/buildSampleTest.js.map +0 -1
  751. package/dist/src/rlc-common/test/buildSnippets.d.ts +0 -6
  752. package/dist/src/rlc-common/test/buildSnippets.d.ts.map +0 -1
  753. package/dist/src/rlc-common/test/buildSnippets.js +0 -26
  754. package/dist/src/rlc-common/test/buildSnippets.js.map +0 -1
  755. package/dist/src/rlc-common/transformSampleGroups.d.ts +0 -9
  756. package/dist/src/rlc-common/transformSampleGroups.d.ts.map +0 -1
  757. package/dist/src/rlc-common/transformSampleGroups.js +0 -313
  758. package/dist/src/rlc-common/transformSampleGroups.js.map +0 -1
  759. package/dist/src/transform/transformApiVersionInfo.d.ts +0 -6
  760. package/dist/src/transform/transformApiVersionInfo.d.ts.map +0 -1
  761. package/dist/src/transform/transformApiVersionInfo.js +0 -78
  762. package/dist/src/transform/transformApiVersionInfo.js.map +0 -1
  763. package/dist/src/transform/transformHelperFunctionDetails.d.ts +0 -5
  764. package/dist/src/transform/transformHelperFunctionDetails.d.ts.map +0 -1
  765. package/dist/src/transform/transformHelperFunctionDetails.js +0 -74
  766. package/dist/src/transform/transformHelperFunctionDetails.js.map +0 -1
  767. package/dist/src/transform/transformParameters.d.ts +0 -14
  768. package/dist/src/transform/transformParameters.d.ts.map +0 -1
  769. package/dist/src/transform/transformParameters.js +0 -201
  770. package/dist/src/transform/transformParameters.js.map +0 -1
  771. package/dist/src/transform/transformPaths.d.ts +0 -5
  772. package/dist/src/transform/transformPaths.d.ts.map +0 -1
  773. package/dist/src/transform/transformPaths.js +0 -102
  774. package/dist/src/transform/transformPaths.js.map +0 -1
  775. package/dist/src/transform/transformResponses.d.ts +0 -5
  776. package/dist/src/transform/transformResponses.d.ts.map +0 -1
  777. package/dist/src/transform/transformResponses.js +0 -171
  778. package/dist/src/transform/transformResponses.js.map +0 -1
  779. package/dist/src/transform/transformSchemas.d.ts +0 -4
  780. package/dist/src/transform/transformSchemas.d.ts.map +0 -1
  781. package/dist/src/transform/transformSchemas.js +0 -191
  782. package/dist/src/transform/transformSchemas.js.map +0 -1
  783. package/dist/src/transform/transformTelemetryInfo.d.ts +0 -4
  784. package/dist/src/transform/transformTelemetryInfo.d.ts.map +0 -1
  785. package/dist/src/transform/transformTelemetryInfo.js +0 -22
  786. package/dist/src/transform/transformTelemetryInfo.js.map +0 -1
  787. package/dist/src/transform/transfromRLCOptions.d.ts +0 -14
  788. package/dist/src/transform/transfromRLCOptions.d.ts.map +0 -1
  789. package/dist/src/transform/transfromRLCOptions.js +0 -369
  790. package/dist/src/transform/transfromRLCOptions.js.map +0 -1
  791. package/dist/src/utils/clientUtils.d.ts +0 -10
  792. package/dist/src/utils/clientUtils.d.ts.map +0 -1
  793. package/dist/src/utils/clientUtils.js +0 -124
  794. package/dist/src/utils/clientUtils.js.map +0 -1
  795. package/dist/src/utils/credentialUtils.d.ts +0 -15
  796. package/dist/src/utils/credentialUtils.d.ts.map +0 -1
  797. package/dist/src/utils/credentialUtils.js +0 -68
  798. package/dist/src/utils/credentialUtils.js.map +0 -1
  799. package/dist/src/utils/crossLanguageDef.d.ts +0 -6
  800. package/dist/src/utils/crossLanguageDef.d.ts.map +0 -1
  801. package/dist/src/utils/crossLanguageDef.js +0 -59
  802. package/dist/src/utils/crossLanguageDef.js.map +0 -1
  803. package/dist/src/utils/dirname.d.ts +0 -9
  804. package/dist/src/utils/dirname.d.ts.map +0 -1
  805. package/dist/src/utils/dirname.js +0 -12
  806. package/dist/src/utils/dirname.js.map +0 -1
  807. package/dist/src/utils/emitUtil.d.ts +0 -5
  808. package/dist/src/utils/emitUtil.d.ts.map +0 -1
  809. package/dist/src/utils/emitUtil.js +0 -71
  810. package/dist/src/utils/emitUtil.js.map +0 -1
  811. package/dist/src/utils/fileSystemUtils.d.ts +0 -5
  812. package/dist/src/utils/fileSystemUtils.d.ts.map +0 -1
  813. package/dist/src/utils/fileSystemUtils.js +0 -59
  814. package/dist/src/utils/fileSystemUtils.js.map +0 -1
  815. package/dist/src/utils/importHelper.d.ts +0 -10
  816. package/dist/src/utils/importHelper.d.ts.map +0 -1
  817. package/dist/src/utils/importHelper.js +0 -51
  818. package/dist/src/utils/importHelper.js.map +0 -1
  819. package/dist/src/utils/mediaTypes.d.ts +0 -28
  820. package/dist/src/utils/mediaTypes.d.ts.map +0 -1
  821. package/dist/src/utils/mediaTypes.js +0 -124
  822. package/dist/src/utils/mediaTypes.js.map +0 -1
  823. package/dist/src/utils/modelUtils.d.ts +0 -60
  824. package/dist/src/utils/modelUtils.d.ts.map +0 -1
  825. package/dist/src/utils/modelUtils.js +0 -1488
  826. package/dist/src/utils/modelUtils.js.map +0 -1
  827. package/dist/src/utils/namespaceUtils.d.ts +0 -6
  828. package/dist/src/utils/namespaceUtils.d.ts.map +0 -1
  829. package/dist/src/utils/namespaceUtils.js +0 -69
  830. package/dist/src/utils/namespaceUtils.js.map +0 -1
  831. package/dist/src/utils/operationUtil.d.ts +0 -97
  832. package/dist/src/utils/operationUtil.d.ts.map +0 -1
  833. package/dist/src/utils/operationUtil.js +0 -547
  834. package/dist/src/utils/operationUtil.js.map +0 -1
  835. package/dist/src/utils/parameterUtils.d.ts +0 -9
  836. package/dist/src/utils/parameterUtils.d.ts.map +0 -1
  837. package/dist/src/utils/parameterUtils.js +0 -147
  838. package/dist/src/utils/parameterUtils.js.map +0 -1
  839. package/src/contextManager.ts +0 -101
  840. package/src/framework/hooks/sdkTypes.ts +0 -218
  841. package/src/framework/hooks/useDependencies.ts +0 -16
  842. package/src/modular/buildClassicalClient.ts +0 -434
  843. package/src/modular/buildClassicalOperationGroups.ts +0 -69
  844. package/src/modular/buildClientContext.ts +0 -325
  845. package/src/modular/buildOperations.ts +0 -248
  846. package/src/modular/buildProjectFiles.ts +0 -111
  847. package/src/modular/buildRestorePoller.ts +0 -242
  848. package/src/modular/buildRootIndex.ts +0 -407
  849. package/src/modular/buildSubpathIndex.ts +0 -152
  850. package/src/modular/emitLoggerFile.ts +0 -23
  851. package/src/modular/emitModels.ts +0 -1081
  852. package/src/modular/emitModelsOptions.ts +0 -56
  853. package/src/modular/emitSamples.ts +0 -675
  854. package/src/modular/emitTests.ts +0 -194
  855. package/src/modular/helpers/classicalOperationHelpers.ts +0 -375
  856. package/src/modular/helpers/clientHelpers.ts +0 -362
  857. package/src/modular/helpers/exampleValueHelpers.ts +0 -851
  858. package/src/modular/helpers/namingHelpers.ts +0 -84
  859. package/src/modular/helpers/operationHelpers.ts +0 -3035
  860. package/src/modular/helpers/typeHelpers.ts +0 -131
  861. package/src/modular/serialization/buildDeserializerFunction.ts +0 -564
  862. package/src/modular/serialization/buildSerializerFunction.ts +0 -616
  863. package/src/modular/serialization/buildXmlSerializerFunction.ts +0 -951
  864. package/src/modular/serialization/serializeUtils.ts +0 -217
  865. package/src/rlc-common/buildClient.ts +0 -490
  866. package/src/rlc-common/buildClientDefinitions.ts +0 -235
  867. package/src/rlc-common/buildIndexFile.ts +0 -344
  868. package/src/rlc-common/buildIsUnexpectedHelper.ts +0 -248
  869. package/src/rlc-common/buildLogger.ts +0 -43
  870. package/src/rlc-common/buildMethodShortcuts.ts +0 -71
  871. package/src/rlc-common/buildObjectTypes.ts +0 -603
  872. package/src/rlc-common/buildPaginateHelper.ts +0 -31
  873. package/src/rlc-common/buildParameterTypes.ts +0 -554
  874. package/src/rlc-common/buildPollingHelper.ts +0 -83
  875. package/src/rlc-common/buildResponseTypes.ts +0 -180
  876. package/src/rlc-common/buildSamples.ts +0 -32
  877. package/src/rlc-common/buildSchemaType.ts +0 -89
  878. package/src/rlc-common/buildSerializeHelper.ts +0 -49
  879. package/src/rlc-common/buildTopLevelIndexFile.ts +0 -58
  880. package/src/rlc-common/helpers/importsUtil.ts +0 -184
  881. package/src/rlc-common/helpers/nameConstructors.ts +0 -110
  882. package/src/rlc-common/helpers/operationHelpers.ts +0 -138
  883. package/src/rlc-common/helpers/packageUtil.ts +0 -13
  884. package/src/rlc-common/helpers/pathUtils.ts +0 -10
  885. package/src/rlc-common/helpers/shortcutMethods.ts +0 -58
  886. package/src/rlc-common/helpers/valueGenerationUtil.ts +0 -234
  887. package/src/rlc-common/metadata/buildApiExtractorConfig.ts +0 -64
  888. package/src/rlc-common/metadata/buildESLintConfig.ts +0 -84
  889. package/src/rlc-common/metadata/buildPackageFile.ts +0 -242
  890. package/src/rlc-common/metadata/buildReadmeFile.ts +0 -515
  891. package/src/rlc-common/metadata/buildRollupConfig.ts +0 -147
  892. package/src/rlc-common/metadata/buildSampleEnvFile.ts +0 -21
  893. package/src/rlc-common/metadata/buildTestConfig.ts +0 -72
  894. package/src/rlc-common/metadata/buildTsConfig.ts +0 -219
  895. package/src/rlc-common/metadata/buildWarpConfig.ts +0 -91
  896. package/src/rlc-common/metadata/packageJson/azurePackageCommon.ts +0 -152
  897. package/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.ts +0 -199
  898. package/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.ts +0 -123
  899. package/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.ts +0 -68
  900. package/src/rlc-common/metadata/packageJson/packageCommon.ts +0 -235
  901. package/src/rlc-common/static/pollingContent.ts +0 -225
  902. package/src/rlc-common/test/buildRecordedClient.ts +0 -18
  903. package/src/rlc-common/test/buildSampleTest.ts +0 -15
  904. package/src/rlc-common/test/buildSnippets.ts +0 -29
  905. package/src/rlc-common/transformSampleGroups.ts +0 -407
  906. package/src/transform/transformApiVersionInfo.ts +0 -103
  907. package/src/transform/transformHelperFunctionDetails.ts +0 -88
  908. package/src/transform/transformParameters.ts +0 -321
  909. package/src/transform/transformPaths.ts +0 -157
  910. package/src/transform/transformResponses.ts +0 -237
  911. package/src/transform/transformSchemas.ts +0 -212
  912. package/src/transform/transformTelemetryInfo.ts +0 -33
  913. package/src/transform/transfromRLCOptions.ts +0 -461
  914. package/src/utils/clientUtils.ts +0 -162
  915. package/src/utils/crossLanguageDef.ts +0 -66
  916. package/src/utils/dirname.ts +0 -12
  917. package/src/utils/emitUtil.ts +0 -92
  918. package/src/utils/fileSystemUtils.ts +0 -69
  919. package/src/utils/importHelper.ts +0 -59
  920. package/src/utils/modelUtils.ts +0 -1737
  921. package/src/utils/operationUtil.ts +0 -763
  922. package/src/utils/parameterUtils.ts +0 -192
  923. /package/src/{metaTree.ts → meta-tree.ts} +0 -0
  924. /package/src/modular/{buildModularOptions.ts → build-modular-options.ts} +0 -0
  925. /package/src/modular/helpers/{clientOptionHelpers.ts → client-option-helpers.ts} +0 -0
  926. /package/src/modular/helpers/{docsHelpers.ts → docs-helpers.ts} +0 -0
  927. /package/src/rlc-common/helpers/{apiVersionUtil.ts → api-version-util.ts} +0 -0
  928. /package/src/rlc-common/helpers/{nameUtils.ts → name-utils.ts} +0 -0
  929. /package/src/rlc-common/helpers/{schemaHelpers.ts → schema-helpers.ts} +0 -0
  930. /package/src/rlc-common/helpers/{typeUtil.ts → type-util.ts} +0 -0
  931. /package/src/rlc-common/metadata/{buildChangelogFile.ts → build-changelog-file.ts} +0 -0
  932. /package/src/rlc-common/metadata/{buildLicenseFile.ts → build-license-file.ts} +0 -0
  933. /package/src/rlc-common/metadata/{buildVitestConfig.ts → build-vitest-config.ts} +0 -0
  934. /package/src/rlc-common/static/{paginateContent.ts → paginate-content.ts} +0 -0
  935. /package/src/rlc-common/static/{sampleTemplate.ts → sample-template.ts} +0 -0
  936. /package/src/rlc-common/static/{serializeHelper.ts → serialize-helper.ts} +0 -0
  937. /package/src/rlc-common/test/{buildKarmaConfig.ts → build-karma-config.ts} +0 -0
  938. /package/src/utils/{credentialUtils.ts → credential-utils.ts} +0 -0
  939. /package/src/utils/{mediaTypes.ts → media-types.ts} +0 -0
  940. /package/src/utils/{namespaceUtils.ts → namespace-utils.ts} +0 -0
@@ -0,0 +1,345 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export const paginateContent = `
4
+ import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
5
+ import { createRestError } from "@azure-rest/core-client";
6
+
7
+ /**
8
+ * returns an async iterator that iterates over results. It also has a \`byPage\`
9
+ * method that returns pages of items at once.
10
+ *
11
+ * @param pagedResult - an object that specifies how to get pages.
12
+ * @returns a paged async iterator that iterates over results.
13
+ */
14
+ function getPagedAsyncIterator<
15
+ TElement,
16
+ TPage = TElement[],
17
+ TPageSettings = PageSettings,
18
+ TLink = string,
19
+ >(
20
+ pagedResult: PagedResult<TPage, TPageSettings, TLink>,
21
+ ): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {
22
+ const iter = getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(pagedResult);
23
+ return {
24
+ next() {
25
+ return iter.next();
26
+ },
27
+ [Symbol.asyncIterator]() {
28
+ return this;
29
+ },
30
+ byPage:
31
+ pagedResult?.byPage ??
32
+ (((settings?: PageSettings) => {
33
+ const { continuationToken } = settings ?? {};
34
+ return getPageAsyncIterator(pagedResult, {
35
+ pageLink: continuationToken as unknown as TLink | undefined,
36
+ });
37
+ }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator<TPage>),
38
+ };
39
+ }
40
+
41
+ async function* getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(
42
+ pagedResult: PagedResult<TPage, TPageSettings, TLink>,
43
+ ): AsyncIterableIterator<TElement> {
44
+ const pages = getPageAsyncIterator(pagedResult);
45
+ const firstVal = await pages.next();
46
+ // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is
47
+ if (!Array.isArray(firstVal.value)) {
48
+ // can extract elements from this page
49
+ const { toElements } = pagedResult;
50
+ if (toElements) {
51
+ yield* toElements(firstVal.value) as TElement[];
52
+ for await (const page of pages) {
53
+ yield* toElements(page) as TElement[];
54
+ }
55
+ } else {
56
+ yield firstVal.value;
57
+ // \`pages\` is of type \`AsyncIterableIterator<TPage>\` but TPage = TElement in this case
58
+ yield* pages as unknown as AsyncIterableIterator<TElement>;
59
+ }
60
+ } else {
61
+ yield* firstVal.value;
62
+ for await (const page of pages) {
63
+ // pages is of type \`AsyncIterableIterator<TPage>\` so \`page\` is of type \`TPage\`. In this branch,
64
+ // it must be the case that \`TPage = TElement[]\`
65
+ yield* page as unknown as TElement[];
66
+ }
67
+ }
68
+ }
69
+
70
+ async function* getPageAsyncIterator<TPage, TLink, TPageSettings>(
71
+ pagedResult: PagedResult<TPage, TPageSettings, TLink>,
72
+ options: {
73
+ pageLink?: TLink;
74
+ } = {},
75
+ ): AsyncIterableIterator<TPage> {
76
+ const { pageLink } = options;
77
+ let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);
78
+ if (!response) {
79
+ return;
80
+ }
81
+ yield response.page;
82
+ while (response.nextPageLink) {
83
+ response = await pagedResult.getPage(response.nextPageLink);
84
+ if (!response) {
85
+ return;
86
+ }
87
+ yield response.page;
88
+ }
89
+ }
90
+
91
+ /**
92
+ * An interface that tracks the settings for paged iteration
93
+ */
94
+ export interface PageSettings {
95
+ /**
96
+ * The token that keeps track of where to continue the iterator
97
+ */
98
+ continuationToken?: string;
99
+ }
100
+
101
+ /**
102
+ * An interface that allows async iterable iteration both to completion and by page.
103
+ */
104
+ export interface PagedAsyncIterableIterator<
105
+ TElement,
106
+ TPage = TElement[],
107
+ TPageSettings = PageSettings,
108
+ > {
109
+ /**
110
+ * The next method, part of the iteration protocol
111
+ */
112
+ next(): Promise<IteratorResult<TElement>>;
113
+ /**
114
+ * The connection to the async iterator, part of the iteration protocol
115
+ */
116
+ [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
117
+ /**
118
+ * Return an AsyncIterableIterator that works a page at a time
119
+ */
120
+ byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;
121
+ }
122
+
123
+ /**
124
+ * An interface that describes how to communicate with the service.
125
+ */
126
+ interface PagedResult<TPage, TPageSettings = PageSettings, TLink = string> {
127
+ /**
128
+ * Link to the first page of results.
129
+ */
130
+ firstPageLink: TLink;
131
+ /**
132
+ * A method that returns a page of results.
133
+ */
134
+ getPage: (
135
+ pageLink: TLink,
136
+ ) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>;
137
+ /**
138
+ * a function to implement the \`byPage\` method on the paged async iterator.
139
+ */
140
+ byPage?: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;
141
+
142
+ /**
143
+ * A function to extract elements from a page.
144
+ */
145
+ toElements?: (page: TPage) => unknown[];
146
+ }
147
+
148
+ /**
149
+ * Helper type to extract the type of an array
150
+ */
151
+ export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
152
+
153
+ /**
154
+ * The type of a custom function that defines how to get a page and a link to the next one if any.
155
+ */
156
+ export type GetPage<TPage> = (
157
+ pageLink: string,
158
+ ) => Promise<{
159
+ page: TPage;
160
+ nextPageLink?: string;
161
+ }>;
162
+
163
+ /**
164
+ * Options for the paging helper
165
+ */
166
+ export interface PagingOptions<TResponse> {
167
+ /**
168
+ * Custom function to extract pagination details for crating the PagedAsyncIterableIterator
169
+ */
170
+ customGetPage?: GetPage<PaginateReturn<TResponse>[]>
171
+ }
172
+
173
+ /**
174
+ * Helper type to infer the Type of the paged elements from the response type
175
+ * This type is generated based on the swagger information for x-ms-pageable
176
+ * specifically on the itemName property which indicates the property of the response
177
+ * where the page items are found. The default value is \`value\`.
178
+ * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter
179
+ */
180
+ export type PaginateReturn<TResult> = TResult extends {{#each itemNames}}
181
+ {
182
+
183
+ body: { {{this}}?: infer TPage }
184
+
185
+ } {{#if @last }}{{else}} | {{/if}}
186
+ {{/each}}
187
+ ? GetArrayType<TPage>
188
+ : Array<unknown>;
189
+
190
+ /**
191
+ * Helper to paginate results from an initial response that follows the specification of Autorest \`x-ms-pageable\` extension
192
+ * @param client - Client to use for sending the next page requests
193
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
194
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
195
+ * @returns - PagedAsyncIterableIterator to iterate the elements
196
+ */
197
+ export function paginate<TResponse extends PathUncheckedResponse>(
198
+ client: Client,
199
+ initialResponse: TResponse,
200
+ options: PagingOptions<TResponse> = {}
201
+ ): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {
202
+ // Extract element type from initial response
203
+ type TElement = PaginateReturn<TResponse>;
204
+ let firstRun = true;
205
+ {{#if isComplexPaging}}
206
+ // We need to check the response for success before trying to inspect it looking for
207
+ // the properties to use for nextLink and itemName
208
+ checkPagingRequest(initialResponse);
209
+ const { itemName, nextLinkName } = getPaginationProperties(initialResponse);
210
+ {{else}}
211
+ const itemName = {{ quoteWrap itemNames }};
212
+ const nextLinkName = {{quoteWrap nextLinkNames}};
213
+ {{/if}}
214
+ const { customGetPage } = options;
215
+ const pagedResult: PagedResult<TElement[]> = {
216
+ firstPageLink: "",
217
+ getPage:
218
+ typeof customGetPage === "function"
219
+ ? customGetPage
220
+ : async (pageLink: string) => {
221
+ const result = firstRun
222
+ ? initialResponse
223
+ : await client.pathUnchecked(pageLink).get();
224
+ firstRun = false;
225
+ checkPagingRequest(result);
226
+ const nextLink = getNextLink(result.body, nextLinkName);
227
+ const values = getElements<TElement>(result.body, itemName);
228
+ return {
229
+ page: values,
230
+ nextPageLink: nextLink
231
+ };
232
+ }
233
+ };
234
+
235
+ return getPagedAsyncIterator(pagedResult);
236
+ }
237
+
238
+ /**
239
+ * Gets for the value of nextLink in the body
240
+ */
241
+ function getNextLink(body: unknown, nextLinkName?: string): string | undefined {
242
+ if (!nextLinkName) {
243
+ return undefined;
244
+ }
245
+
246
+ const nextLink = (body as Record<string, unknown>)[nextLinkName];
247
+
248
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
249
+ throw new Error(
250
+ \`Body Property \${nextLinkName} should be a string or undefined\`
251
+ );
252
+ }
253
+
254
+ return nextLink;
255
+ }
256
+
257
+ /**
258
+ * Gets the elements of the current request in the body.
259
+ */
260
+ function getElements<T = unknown>(body: unknown, itemName: string): T[] {
261
+ const value = (body as Record<string, unknown>)[itemName] as T[];
262
+
263
+ // value has to be an array according to the x-ms-pageable extension.
264
+ // The fact that this must be an array is used above to calculate the
265
+ // type of elements in the page in PaginateReturn
266
+ if (!Array.isArray(value)) {
267
+ throw new Error(
268
+ \`Couldn't paginate response\\n Body doesn't contain an array property with name: \${itemName}\`
269
+ );
270
+ }
271
+
272
+ return value ?? [];
273
+ }
274
+
275
+ /**
276
+ * Checks if a request failed
277
+ */
278
+ function checkPagingRequest(response: PathUncheckedResponse): void {
279
+ const Http2xxStatusCodes = [
280
+ "200",
281
+ "201",
282
+ "202",
283
+ "203",
284
+ "204",
285
+ "205",
286
+ "206",
287
+ "207",
288
+ "208",
289
+ "226"
290
+ ];
291
+ if (!Http2xxStatusCodes.includes(response.status)) {
292
+ throw createRestError(
293
+ \`Pagination failed with unexpected statusCode \${response.status}\`,
294
+ response
295
+ );
296
+ }
297
+ }
298
+
299
+ {{#if isComplexPaging}}
300
+ /**
301
+ * Extracts the itemName and nextLinkName from the initial response to use them for pagination
302
+ */
303
+ function getPaginationProperties(initialResponse: PathUncheckedResponse) {
304
+ // Build a set with the passed custom nextLinkNames
305
+ const nextLinkNames = new Set([{{ quoteWrap nextLinkNames }}]);
306
+
307
+ // Build a set with the passed custom set of itemNames
308
+ const itemNames = new Set([{{ quoteWrap itemNames }}]);
309
+
310
+ let nextLinkName: string | undefined;
311
+ let itemName: string | undefined;
312
+
313
+ for (const name of nextLinkNames) {
314
+ const nextLink = (initialResponse.body as Record<string, unknown>)[
315
+ name
316
+ ] as string;
317
+ if (nextLink) {
318
+ nextLinkName = name;
319
+ break;
320
+ }
321
+ }
322
+
323
+ for (const name of itemNames) {
324
+ const item = (initialResponse.body as Record<string, unknown>)[
325
+ name
326
+ ] as string;
327
+ if (item) {
328
+ itemName = name;
329
+ break;
330
+ }
331
+ }
332
+
333
+ if (!itemName) {
334
+ throw new Error(
335
+ \`Couldn't paginate response\\n Body doesn't contain an array property with name: \${[
336
+ ...itemNames
337
+ ].join(" OR ")}\`
338
+ );
339
+ }
340
+
341
+ return { itemName, nextLinkName };
342
+ }
343
+ {{/if}}
344
+ `;
345
+ //# sourceMappingURL=paginate-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginate-content.js","sourceRoot":"","sources":["../../../../src/rlc-common/static/paginate-content.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqV9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const pollingContent = "\nimport type { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type {\n CancelOnProgress,\n CreateHttpPollerOptions,\n RunningOperation,\n OperationResponse,\n OperationState,\n} from \"@azure/core-lro\";\n import { createHttpPoller } from \"@azure/core-lro\";\n{{#if clientOverload}}\nimport type {\n {{#each importedResponses}}\n {{this}},\n {{/each}}\n} from \"./responses.js\";\n{{/if}}\n\n/**\n * A simple poller that can be used to poll a long running operation.\n */\nexport interface SimplePollerLike<\n TState extends OperationState<TResult>,\n TResult\n> {\n /**\n * Returns true if the poller has finished polling.\n */\n isDone(): boolean;\n /**\n * Returns the state of the operation.\n */\n getOperationState(): TState;\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult(): TResult | undefined;\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n */\n poll(options?: { abortSignal?: AbortSignalLike }): Promise<TState>;\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n pollUntilDone(pollOptions?: {\n abortSignal?: AbortSignalLike;\n }): Promise<TResult>;\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback: (state: TState) => void): CancelOnProgress;\n\n /**\n * Returns a promise that could be used for serialized version of the poller's operation\n * by invoking the operation's serialize method.\n */\n serialize(): Promise<string>;\n\n /**\n * Wait the poller to be submitted.\n */\n submitted(): Promise<void>;\n\n /**\n * Returns a string representation of the poller's operation. Similar to serialize but returns a string.\n * @deprecated Use serialize() instead.\n */\n toString(): string;\n\n /**\n * Stops the poller from continuing to poll. Please note this will only stop the client-side polling\n * @deprecated Use abortSignal to stop polling instead.\n */\n stopPolling(): void;\n\n /**\n * Returns true if the poller is stopped.\n * @deprecated Use abortSignal status to track this instead.\n */\n isStopped(): boolean;\n}\n\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\n{{#if clientOverload}}\n{{#each overloadMap}}\nexport async function getLongRunningPoller<\n TResult extends {{ this.finalResponses }}\n>(\n client: Client,\n initialResponse: {{ this.initialResponses }},\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\n{{/each}}\n{{/if}}\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {}\n ): Promise<SimplePollerLike<OperationState<TResult>, TResult>> { \n const abortController = new AbortController();\n const poller: RunningOperation<TResult> = {\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (\n path: string,\n pollOptions?: { abortSignal?: AbortSignalLike }\n ) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n function abortListener(): void {\n abortController.abort();\n }\n const inputAbortSignal = pollOptions?.abortSignal;\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, {\n once: true\n });\n }\n let response;\n try {\n response = await client\n .pathUnchecked(path ?? initialResponse.request.url)\n .get({ abortSignal });\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] =\n initialResponse.request.url;\n return lroResponse;\n }\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n const httpPoller = createHttpPoller(poller, options);\n const simplePoller: SimplePollerLike<OperationState<TResult>, TResult> = {\n isDone() {\n return httpPoller.isDone;\n },\n isStopped() {\n return abortController.signal.aborted;\n },\n getOperationState() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\"\n );\n }\n return httpPoller.operationState;\n },\n getResult() {\n return httpPoller.result;\n },\n toString() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\"\n );\n }\n return JSON.stringify({\n state: httpPoller.operationState\n });\n },\n stopPolling() {\n abortController.abort();\n },\n onProgress: httpPoller.onProgress,\n poll: httpPoller.poll,\n pollUntilDone: httpPoller.pollUntilDone,\n serialize: httpPoller.serialize,\n submitted: httpPoller.submitted\n };\n return simplePoller;\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 * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(\n response: TResult\n): OperationResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(\n `Status code of the response is not a number. Value: ${response.status}`\n );\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";
2
+ //# sourceMappingURL=polling-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polling-content.d.ts","sourceRoot":"","sources":["../../../../src/rlc-common/static/polling-content.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,q/OA6N1B,CAAC"}
@@ -0,0 +1,225 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export const pollingContent = `
4
+ import type { Client, HttpResponse } from "@azure-rest/core-client";
5
+ import type { AbortSignalLike } from "@azure/abort-controller";
6
+ import type {
7
+ CancelOnProgress,
8
+ CreateHttpPollerOptions,
9
+ RunningOperation,
10
+ OperationResponse,
11
+ OperationState,
12
+ } from "@azure/core-lro";
13
+ import { createHttpPoller } from "@azure/core-lro";
14
+ {{#if clientOverload}}
15
+ import type {
16
+ {{#each importedResponses}}
17
+ {{this}},
18
+ {{/each}}
19
+ } from "./responses.js";
20
+ {{/if}}
21
+
22
+ /**
23
+ * A simple poller that can be used to poll a long running operation.
24
+ */
25
+ export interface SimplePollerLike<
26
+ TState extends OperationState<TResult>,
27
+ TResult
28
+ > {
29
+ /**
30
+ * Returns true if the poller has finished polling.
31
+ */
32
+ isDone(): boolean;
33
+ /**
34
+ * Returns the state of the operation.
35
+ */
36
+ getOperationState(): TState;
37
+ /**
38
+ * Returns the result value of the operation,
39
+ * regardless of the state of the poller.
40
+ * It can return undefined or an incomplete form of the final TResult value
41
+ * depending on the implementation.
42
+ */
43
+ getResult(): TResult | undefined;
44
+ /**
45
+ * Returns a promise that will resolve once a single polling request finishes.
46
+ * It does this by calling the update method of the Poller's operation.
47
+ */
48
+ poll(options?: { abortSignal?: AbortSignalLike }): Promise<TState>;
49
+ /**
50
+ * Returns a promise that will resolve once the underlying operation is completed.
51
+ */
52
+ pollUntilDone(pollOptions?: {
53
+ abortSignal?: AbortSignalLike;
54
+ }): Promise<TResult>;
55
+ /**
56
+ * Invokes the provided callback after each polling is completed,
57
+ * sending the current state of the poller's operation.
58
+ *
59
+ * It returns a method that can be used to stop receiving updates on the given callback function.
60
+ */
61
+ onProgress(callback: (state: TState) => void): CancelOnProgress;
62
+
63
+ /**
64
+ * Returns a promise that could be used for serialized version of the poller's operation
65
+ * by invoking the operation's serialize method.
66
+ */
67
+ serialize(): Promise<string>;
68
+
69
+ /**
70
+ * Wait the poller to be submitted.
71
+ */
72
+ submitted(): Promise<void>;
73
+
74
+ /**
75
+ * Returns a string representation of the poller's operation. Similar to serialize but returns a string.
76
+ * @deprecated Use serialize() instead.
77
+ */
78
+ toString(): string;
79
+
80
+ /**
81
+ * Stops the poller from continuing to poll. Please note this will only stop the client-side polling
82
+ * @deprecated Use abortSignal to stop polling instead.
83
+ */
84
+ stopPolling(): void;
85
+
86
+ /**
87
+ * Returns true if the poller is stopped.
88
+ * @deprecated Use abortSignal status to track this instead.
89
+ */
90
+ isStopped(): boolean;
91
+ }
92
+
93
+ /**
94
+ * Helper function that builds a Poller object to help polling a long running operation.
95
+ * @param client - Client to use for sending the request to get additional pages.
96
+ * @param initialResponse - The initial response.
97
+ * @param options - Options to set a resume state or custom polling interval.
98
+ * @returns - A poller object to poll for operation state updates and eventually get the final response.
99
+ */
100
+ {{#if clientOverload}}
101
+ {{#each overloadMap}}
102
+ export async function getLongRunningPoller<
103
+ TResult extends {{ this.finalResponses }}
104
+ >(
105
+ client: Client,
106
+ initialResponse: {{ this.initialResponses }},
107
+ options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>
108
+ ): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
109
+ {{/each}}
110
+ {{/if}}
111
+ export async function getLongRunningPoller<TResult extends HttpResponse>(
112
+ client: Client,
113
+ initialResponse: TResult,
114
+ options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {}
115
+ ): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {
116
+ const abortController = new AbortController();
117
+ const poller: RunningOperation<TResult> = {
118
+ sendInitialRequest: async () => {
119
+ // In the case of Rest Clients we are building the LRO poller object from a response that's the reason
120
+ // we are not triggering the initial request here, just extracting the information from the
121
+ // response we were provided.
122
+ return getLroResponse(initialResponse);
123
+ },
124
+ sendPollRequest: async (
125
+ path: string,
126
+ pollOptions?: { abortSignal?: AbortSignalLike }
127
+ ) => {
128
+ // This is the callback that is going to be called to poll the service
129
+ // to get the latest status. We use the client provided and the polling path
130
+ // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
131
+ // depending on the lro pattern that the service implements. If non is provided we default to the initial path.
132
+ function abortListener(): void {
133
+ abortController.abort();
134
+ }
135
+ const inputAbortSignal = pollOptions?.abortSignal;
136
+ const abortSignal = abortController.signal;
137
+ if (inputAbortSignal?.aborted) {
138
+ abortController.abort();
139
+ } else if (!abortSignal.aborted) {
140
+ inputAbortSignal?.addEventListener("abort", abortListener, {
141
+ once: true
142
+ });
143
+ }
144
+ let response;
145
+ try {
146
+ response = await client
147
+ .pathUnchecked(path ?? initialResponse.request.url)
148
+ .get({ abortSignal });
149
+ } finally {
150
+ inputAbortSignal?.removeEventListener("abort", abortListener);
151
+ }
152
+ const lroResponse = getLroResponse(response as TResult);
153
+ lroResponse.rawResponse.headers["x-ms-original-url"] =
154
+ initialResponse.request.url;
155
+ return lroResponse;
156
+ }
157
+ };
158
+
159
+ options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;
160
+ const httpPoller = createHttpPoller(poller, options);
161
+ const simplePoller: SimplePollerLike<OperationState<TResult>, TResult> = {
162
+ isDone() {
163
+ return httpPoller.isDone;
164
+ },
165
+ isStopped() {
166
+ return abortController.signal.aborted;
167
+ },
168
+ getOperationState() {
169
+ if (!httpPoller.operationState) {
170
+ throw new Error(
171
+ "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState()."
172
+ );
173
+ }
174
+ return httpPoller.operationState;
175
+ },
176
+ getResult() {
177
+ return httpPoller.result;
178
+ },
179
+ toString() {
180
+ if (!httpPoller.operationState) {
181
+ throw new Error(
182
+ "Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState()."
183
+ );
184
+ }
185
+ return JSON.stringify({
186
+ state: httpPoller.operationState
187
+ });
188
+ },
189
+ stopPolling() {
190
+ abortController.abort();
191
+ },
192
+ onProgress: httpPoller.onProgress,
193
+ poll: httpPoller.poll,
194
+ pollUntilDone: httpPoller.pollUntilDone,
195
+ serialize: httpPoller.serialize,
196
+ submitted: httpPoller.submitted
197
+ };
198
+ return simplePoller;
199
+ }
200
+
201
+ /**
202
+ * Converts a Rest Client response to a response that the LRO implementation understands
203
+ * @param response - a rest client http response
204
+ * @returns - An LRO response that the LRO implementation understands
205
+ */
206
+ function getLroResponse<TResult extends HttpResponse>(
207
+ response: TResult
208
+ ): OperationResponse<TResult> {
209
+ if (Number.isNaN(response.status)) {
210
+ throw new TypeError(
211
+ \`Status code of the response is not a number. Value: \${response.status}\`
212
+ );
213
+ }
214
+
215
+ return {
216
+ flatResponse: response,
217
+ rawResponse: {
218
+ ...response,
219
+ statusCode: Number.parseInt(response.status),
220
+ body: response.body
221
+ }
222
+ };
223
+ }
224
+ `;
225
+ //# sourceMappingURL=polling-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polling-content.js","sourceRoot":"","sources":["../../../../src/rlc-common/static/polling-content.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6N7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const sampleTemplate = "\n{{#each importedTypes}}\n{{this}}\n{{/each}}\nimport \"dotenv/config\";\n\n{{#each samples}}\n/**\n * This sample demonstrates how to {{this.description}}\n *\n * @summary {{this.description}}\n {{#if this.originalFileLocation}}\n * x-ms-original-file: {{this.originalFileLocation}}\n {{/if}}\n */\nasync function {{name}}(): Promise<void> {\n {{#each this.clientParamAssignments}}\n {{this}}\n {{/each}}\n const client = {{this.defaultFactoryName}}({{this.clientParamNames}});\n {{#each this.pathParamAssignments}}\n {{this}}\n {{/each}}\n {{#each this.methodParamAssignments}}\n {{this}}\n {{/each}}\n {{#if this.isPaging}}\n const initialResponse = await client.path({{this.pathParamNames}}).{{method}}({{methodParamNames}});\n const pageData = paginate(client, initialResponse);\n const result = [];\n for await (const item of pageData) {\n result.push(item);\n }\n {{else if this.isLRO}}\n const initialResponse ={{#unless this.useLegacyLro}} await{{/unless}} client.path({{this.pathParamNames}}).{{method}}({{methodParamNames}});\n const poller = await getLongRunningPoller(client, initialResponse);\n const result = await poller.pollUntilDone();\n {{else}}\n const result = await client.path({{this.pathParamNames}}).{{method}}({{methodParamNames}});\n {{/if}}\n console.log(result);\n}\n\n{{/each}}\n\nasync function main(): Promise<void> {\n{{#each samples}}\n await {{this.name}}();\n{{/each}}\n}\n\nmain().catch(console.error);\n";
2
+ //# sourceMappingURL=sample-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample-template.d.ts","sourceRoot":"","sources":["../../../../src/rlc-common/static/sample-template.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,o8CAoD1B,CAAC"}
@@ -0,0 +1,56 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export const sampleTemplate = `
4
+ {{#each importedTypes}}
5
+ {{this}}
6
+ {{/each}}
7
+ import "dotenv/config";
8
+
9
+ {{#each samples}}
10
+ /**
11
+ * This sample demonstrates how to {{this.description}}
12
+ *
13
+ * @summary {{this.description}}
14
+ {{#if this.originalFileLocation}}
15
+ * x-ms-original-file: {{this.originalFileLocation}}
16
+ {{/if}}
17
+ */
18
+ async function {{name}}(): Promise<void> {
19
+ {{#each this.clientParamAssignments}}
20
+ {{this}}
21
+ {{/each}}
22
+ const client = {{this.defaultFactoryName}}({{this.clientParamNames}});
23
+ {{#each this.pathParamAssignments}}
24
+ {{this}}
25
+ {{/each}}
26
+ {{#each this.methodParamAssignments}}
27
+ {{this}}
28
+ {{/each}}
29
+ {{#if this.isPaging}}
30
+ const initialResponse = await client.path({{this.pathParamNames}}).{{method}}({{methodParamNames}});
31
+ const pageData = paginate(client, initialResponse);
32
+ const result = [];
33
+ for await (const item of pageData) {
34
+ result.push(item);
35
+ }
36
+ {{else if this.isLRO}}
37
+ const initialResponse ={{#unless this.useLegacyLro}} await{{/unless}} client.path({{this.pathParamNames}}).{{method}}({{methodParamNames}});
38
+ const poller = await getLongRunningPoller(client, initialResponse);
39
+ const result = await poller.pollUntilDone();
40
+ {{else}}
41
+ const result = await client.path({{this.pathParamNames}}).{{method}}({{methodParamNames}});
42
+ {{/if}}
43
+ console.log(result);
44
+ }
45
+
46
+ {{/each}}
47
+
48
+ async function main(): Promise<void> {
49
+ {{#each samples}}
50
+ await {{this.name}}();
51
+ {{/each}}
52
+ }
53
+
54
+ main().catch(console.error);
55
+ `;
56
+ //# sourceMappingURL=sample-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample-template.js","sourceRoot":"","sources":["../../../../src/rlc-common/static/sample-template.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoD7B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const buildMultiCollectionContent = "\nexport function buildMultiCollection(\n items: string[],\n parameterName: string\n): string {\n return items\n .map((item, index) => {\n if (index === 0) {\n return item;\n }\n return `${parameterName}=${item}`;\n })\n .join(\"&\");\n}";
2
+ export declare const buildPipeCollectionContent = "\nexport function buildPipeCollection(items: string[] | number[]): string {\n return items.join(\"|\");\n}";
3
+ export declare const buildSsvCollectionContent = "\nexport function buildSsvCollection(items: string[] | number[]): string {\n return items.join(\" \");\n}";
4
+ export declare const buildTsvCollectionContent = "\nexport function buildTsvCollection(items: string[] | number[]): string {\n return items.join(\"\\t\");\n}";
5
+ export declare const buildCsvCollectionContent = "\nexport function buildCsvCollection(items: string[] | number[]): string {\n return items.join(\",\");\n}";
6
+ //# sourceMappingURL=serialize-helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serialize-helper.d.ts","sourceRoot":"","sources":["../../../../src/rlc-common/static/serialize-helper.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,oRAatC,CAAC;AAEH,eAAO,MAAM,0BAA0B,gHAGrC,CAAC;AAEH,eAAO,MAAM,yBAAyB,+GAGpC,CAAC;AAEH,eAAO,MAAM,yBAAyB,iHAGpC,CAAC;AAEH,eAAO,MAAM,yBAAyB,+GAGpC,CAAC"}