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

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 (1025) hide show
  1. package/README.md +96 -24
  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.map +1 -1
  7. package/dist/src/framework/hooks/binder.js +6 -7
  8. package/dist/src/framework/hooks/binder.js.map +1 -1
  9. package/dist/src/framework/hooks/sdk-types.d.ts +26 -0
  10. package/dist/src/framework/hooks/sdk-types.d.ts.map +1 -0
  11. package/dist/src/framework/hooks/sdk-types.js +157 -0
  12. package/dist/src/framework/hooks/sdk-types.js.map +1 -0
  13. package/dist/src/framework/hooks/use-dependencies.d.ts +4 -0
  14. package/dist/src/framework/hooks/use-dependencies.d.ts.map +1 -0
  15. package/dist/src/framework/hooks/use-dependencies.js +13 -0
  16. package/dist/src/framework/hooks/use-dependencies.js.map +1 -0
  17. package/dist/src/framework/load-static-helpers.d.ts.map +1 -1
  18. package/dist/src/framework/load-static-helpers.js +7 -8
  19. package/dist/src/framework/load-static-helpers.js.map +1 -1
  20. package/dist/src/index.d.ts.map +1 -1
  21. package/dist/src/index.js +40 -40
  22. package/dist/src/index.js.map +1 -1
  23. package/dist/src/lib.js +30 -31
  24. package/dist/src/lib.js.map +1 -1
  25. package/dist/src/meta-tree.d.ts +7 -0
  26. package/dist/src/meta-tree.d.ts.map +1 -0
  27. package/dist/src/meta-tree.js +2 -0
  28. package/dist/src/meta-tree.js.map +1 -0
  29. package/dist/src/modular/build-classical-client.d.ts +6 -0
  30. package/dist/src/modular/build-classical-client.d.ts.map +1 -0
  31. package/dist/src/modular/build-classical-client.js +345 -0
  32. package/dist/src/modular/build-classical-client.js.map +1 -0
  33. package/dist/src/modular/build-classical-operation-groups.d.ts +6 -0
  34. package/dist/src/modular/build-classical-operation-groups.d.ts.map +1 -0
  35. package/dist/src/modular/build-classical-operation-groups.js +48 -0
  36. package/dist/src/modular/build-classical-operation-groups.js.map +1 -0
  37. package/dist/src/modular/build-client-context.d.ts +13 -0
  38. package/dist/src/modular/build-client-context.d.ts.map +1 -0
  39. package/dist/src/modular/build-client-context.js +246 -0
  40. package/dist/src/modular/build-client-context.js.map +1 -0
  41. package/dist/src/modular/build-modular-options.d.ts +6 -0
  42. package/dist/src/modular/build-modular-options.d.ts.map +1 -0
  43. package/dist/src/modular/build-modular-options.js +14 -0
  44. package/dist/src/modular/build-modular-options.js.map +1 -0
  45. package/dist/src/modular/build-operations.d.ts +21 -0
  46. package/dist/src/modular/build-operations.d.ts.map +1 -0
  47. package/dist/src/modular/build-operations.js +172 -0
  48. package/dist/src/modular/build-operations.js.map +1 -0
  49. package/dist/src/modular/build-project-files.d.ts +4 -0
  50. package/dist/src/modular/build-project-files.d.ts.map +1 -0
  51. package/dist/src/modular/build-project-files.js +91 -0
  52. package/dist/src/modular/build-project-files.js.map +1 -0
  53. package/dist/src/modular/build-restore-poller.d.ts +5 -0
  54. package/dist/src/modular/build-restore-poller.d.ts.map +1 -0
  55. package/dist/src/modular/build-restore-poller.js +216 -0
  56. package/dist/src/modular/build-restore-poller.js.map +1 -0
  57. package/dist/src/modular/build-root-index.d.ts +13 -0
  58. package/dist/src/modular/build-root-index.d.ts.map +1 -0
  59. package/dist/src/modular/build-root-index.js +278 -0
  60. package/dist/src/modular/build-root-index.js.map +1 -0
  61. package/dist/src/modular/build-subpath-index.d.ts +16 -0
  62. package/dist/src/modular/build-subpath-index.d.ts.map +1 -0
  63. package/dist/src/modular/build-subpath-index.js +119 -0
  64. package/dist/src/modular/build-subpath-index.js.map +1 -0
  65. package/dist/src/modular/emit-logger-file.d.ts +3 -0
  66. package/dist/src/modular/emit-logger-file.d.ts.map +1 -0
  67. package/dist/src/modular/emit-logger-file.js +18 -0
  68. package/dist/src/modular/emit-logger-file.js.map +1 -0
  69. package/dist/src/modular/emit-models-options.d.ts +5 -0
  70. package/dist/src/modular/emit-models-options.d.ts.map +1 -0
  71. package/dist/src/modular/emit-models-options.js +35 -0
  72. package/dist/src/modular/emit-models-options.js.map +1 -0
  73. package/dist/src/modular/emit-models.d.ts +23 -0
  74. package/dist/src/modular/emit-models.d.ts.map +1 -0
  75. package/dist/src/modular/emit-models.js +849 -0
  76. package/dist/src/modular/emit-models.js.map +1 -0
  77. package/dist/src/modular/emit-samples.d.ts +7 -0
  78. package/dist/src/modular/emit-samples.d.ts.map +1 -0
  79. package/dist/src/modular/emit-samples.js +499 -0
  80. package/dist/src/modular/emit-samples.js.map +1 -0
  81. package/dist/src/modular/emit-tests.d.ts +7 -0
  82. package/dist/src/modular/emit-tests.d.ts.map +1 -0
  83. package/dist/src/modular/emit-tests.js +155 -0
  84. package/dist/src/modular/emit-tests.js.map +1 -0
  85. package/dist/src/modular/helpers/classical-operation-helpers.d.ts +7 -0
  86. package/dist/src/modular/helpers/classical-operation-helpers.d.ts.map +1 -0
  87. package/dist/src/modular/helpers/classical-operation-helpers.js +258 -0
  88. package/dist/src/modular/helpers/classical-operation-helpers.js.map +1 -0
  89. package/dist/src/modular/helpers/client-helpers.d.ts +34 -0
  90. package/dist/src/modular/helpers/client-helpers.d.ts.map +1 -0
  91. package/dist/src/modular/helpers/client-helpers.js +259 -0
  92. package/dist/src/modular/helpers/client-helpers.js.map +1 -0
  93. package/dist/src/modular/helpers/client-option-helpers.d.ts +43 -0
  94. package/dist/src/modular/helpers/client-option-helpers.d.ts.map +1 -0
  95. package/dist/src/modular/helpers/client-option-helpers.js +103 -0
  96. package/dist/src/modular/helpers/client-option-helpers.js.map +1 -0
  97. package/dist/src/modular/helpers/docs-helpers.d.ts +3 -0
  98. package/dist/src/modular/helpers/docs-helpers.d.ts.map +1 -0
  99. package/dist/src/modular/helpers/docs-helpers.js +10 -0
  100. package/dist/src/modular/helpers/docs-helpers.js.map +1 -0
  101. package/dist/src/modular/helpers/example-value-helpers.d.ts +83 -0
  102. package/dist/src/modular/helpers/example-value-helpers.d.ts.map +1 -0
  103. package/dist/src/modular/helpers/example-value-helpers.js +639 -0
  104. package/dist/src/modular/helpers/example-value-helpers.js.map +1 -0
  105. package/dist/src/modular/helpers/naming-helpers.d.ts +22 -0
  106. package/dist/src/modular/helpers/naming-helpers.d.ts.map +1 -0
  107. package/dist/src/modular/helpers/naming-helpers.js +59 -0
  108. package/dist/src/modular/helpers/naming-helpers.js.map +1 -0
  109. package/dist/src/modular/helpers/operation-helpers.d.ts +105 -0
  110. package/dist/src/modular/helpers/operation-helpers.d.ts.map +1 -0
  111. package/dist/src/modular/helpers/operation-helpers.js +2328 -0
  112. package/dist/src/modular/helpers/operation-helpers.js.map +1 -0
  113. package/dist/src/modular/helpers/type-helpers.d.ts +22 -0
  114. package/dist/src/modular/helpers/type-helpers.d.ts.map +1 -0
  115. package/dist/src/modular/helpers/type-helpers.js +94 -0
  116. package/dist/src/modular/helpers/type-helpers.js.map +1 -0
  117. package/dist/src/modular/serialization/build-deserializer-function.d.ts +7 -0
  118. package/dist/src/modular/serialization/build-deserializer-function.d.ts.map +1 -0
  119. package/dist/src/modular/serialization/build-deserializer-function.js +401 -0
  120. package/dist/src/modular/serialization/build-deserializer-function.js.map +1 -0
  121. package/dist/src/modular/serialization/build-serializer-function.d.ts +7 -0
  122. package/dist/src/modular/serialization/build-serializer-function.d.ts.map +1 -0
  123. package/dist/src/modular/serialization/build-serializer-function.js +442 -0
  124. package/dist/src/modular/serialization/build-serializer-function.js.map +1 -0
  125. package/dist/src/modular/serialization/build-xml-serializer-function.d.ts +44 -0
  126. package/dist/src/modular/serialization/build-xml-serializer-function.d.ts.map +1 -0
  127. package/dist/src/modular/serialization/build-xml-serializer-function.js +729 -0
  128. package/dist/src/modular/serialization/build-xml-serializer-function.js.map +1 -0
  129. package/dist/src/modular/serialization/serialize-utils.d.ts +37 -0
  130. package/dist/src/modular/serialization/serialize-utils.d.ts.map +1 -0
  131. package/dist/src/modular/serialization/serialize-utils.js +145 -0
  132. package/dist/src/modular/serialization/serialize-utils.js.map +1 -0
  133. package/dist/src/modular/type-expressions/get-credential-expression.js +1 -1
  134. package/dist/src/modular/type-expressions/get-credential-expression.js.map +1 -1
  135. package/dist/src/modular/type-expressions/get-model-expression.js +1 -1
  136. package/dist/src/modular/type-expressions/get-model-expression.js.map +1 -1
  137. package/dist/src/rlc-common/build-client-definitions.d.ts +6 -0
  138. package/dist/src/rlc-common/build-client-definitions.d.ts.map +1 -0
  139. package/dist/src/rlc-common/build-client-definitions.js +157 -0
  140. package/dist/src/rlc-common/build-client-definitions.js.map +1 -0
  141. package/dist/src/rlc-common/build-client.d.ts +9 -0
  142. package/dist/src/rlc-common/build-client.d.ts.map +1 -0
  143. package/dist/src/rlc-common/build-client.js +391 -0
  144. package/dist/src/rlc-common/build-client.js.map +1 -0
  145. package/dist/src/rlc-common/build-index-file.d.ts +6 -0
  146. package/dist/src/rlc-common/build-index-file.d.ts.map +1 -0
  147. package/dist/src/rlc-common/build-index-file.js +241 -0
  148. package/dist/src/rlc-common/build-index-file.js.map +1 -0
  149. package/dist/src/rlc-common/build-is-unexpected-helper.d.ts +6 -0
  150. package/dist/src/rlc-common/build-is-unexpected-helper.d.ts.map +1 -0
  151. package/dist/src/rlc-common/build-is-unexpected-helper.js +223 -0
  152. package/dist/src/rlc-common/build-is-unexpected-helper.js.map +1 -0
  153. package/dist/src/rlc-common/build-logger.d.ts +6 -0
  154. package/dist/src/rlc-common/build-logger.d.ts.map +1 -0
  155. package/dist/src/rlc-common/build-logger.js +31 -0
  156. package/dist/src/rlc-common/build-logger.js.map +1 -0
  157. package/dist/src/rlc-common/build-method-shortcuts.d.ts +5 -0
  158. package/dist/src/rlc-common/build-method-shortcuts.d.ts.map +1 -0
  159. package/dist/src/rlc-common/build-method-shortcuts.js +54 -0
  160. package/dist/src/rlc-common/build-method-shortcuts.js.map +1 -0
  161. package/dist/src/rlc-common/build-object-types.d.ts +29 -0
  162. package/dist/src/rlc-common/build-object-types.d.ts.map +1 -0
  163. package/dist/src/rlc-common/build-object-types.js +412 -0
  164. package/dist/src/rlc-common/build-object-types.js.map +1 -0
  165. package/dist/src/rlc-common/build-paginate-helper.d.ts +6 -0
  166. package/dist/src/rlc-common/build-paginate-helper.d.ts.map +1 -0
  167. package/dist/src/rlc-common/build-paginate-helper.js +27 -0
  168. package/dist/src/rlc-common/build-paginate-helper.js.map +1 -0
  169. package/dist/src/rlc-common/build-parameter-types.d.ts +14 -0
  170. package/dist/src/rlc-common/build-parameter-types.d.ts.map +1 -0
  171. package/dist/src/rlc-common/build-parameter-types.js +391 -0
  172. package/dist/src/rlc-common/build-parameter-types.js.map +1 -0
  173. package/dist/src/rlc-common/build-polling-helper.d.ts +6 -0
  174. package/dist/src/rlc-common/build-polling-helper.d.ts.map +1 -0
  175. package/dist/src/rlc-common/build-polling-helper.js +61 -0
  176. package/dist/src/rlc-common/build-polling-helper.js.map +1 -0
  177. package/dist/src/rlc-common/build-response-types.d.ts +6 -0
  178. package/dist/src/rlc-common/build-response-types.d.ts.map +1 -0
  179. package/dist/src/rlc-common/build-response-types.js +143 -0
  180. package/dist/src/rlc-common/build-response-types.js.map +1 -0
  181. package/dist/src/rlc-common/build-samples.d.ts +3 -0
  182. package/dist/src/rlc-common/build-samples.d.ts.map +1 -0
  183. package/dist/src/rlc-common/build-samples.js +30 -0
  184. package/dist/src/rlc-common/build-samples.js.map +1 -0
  185. package/dist/src/rlc-common/build-schema-type.d.ts +20 -0
  186. package/dist/src/rlc-common/build-schema-type.d.ts.map +1 -0
  187. package/dist/src/rlc-common/build-schema-type.js +71 -0
  188. package/dist/src/rlc-common/build-schema-type.js.map +1 -0
  189. package/dist/src/rlc-common/build-serialize-helper.d.ts +6 -0
  190. package/dist/src/rlc-common/build-serialize-helper.d.ts.map +1 -0
  191. package/dist/src/rlc-common/build-serialize-helper.js +36 -0
  192. package/dist/src/rlc-common/build-serialize-helper.js.map +1 -0
  193. package/dist/src/rlc-common/build-top-level-index-file.d.ts +6 -0
  194. package/dist/src/rlc-common/build-top-level-index-file.d.ts.map +1 -0
  195. package/dist/src/rlc-common/build-top-level-index-file.js +48 -0
  196. package/dist/src/rlc-common/build-top-level-index-file.js.map +1 -0
  197. package/dist/src/rlc-common/helpers/api-version-util.d.ts +17 -0
  198. package/dist/src/rlc-common/helpers/api-version-util.d.ts.map +1 -0
  199. package/dist/src/rlc-common/helpers/api-version-util.js +43 -0
  200. package/dist/src/rlc-common/helpers/api-version-util.js.map +1 -0
  201. package/dist/src/rlc-common/helpers/imports-util.d.ts +18 -0
  202. package/dist/src/rlc-common/helpers/imports-util.d.ts.map +1 -0
  203. package/dist/src/rlc-common/helpers/imports-util.js +164 -0
  204. package/dist/src/rlc-common/helpers/imports-util.js.map +1 -0
  205. package/dist/src/rlc-common/helpers/name-constructors.d.ts +42 -0
  206. package/dist/src/rlc-common/helpers/name-constructors.d.ts.map +1 -0
  207. package/dist/src/rlc-common/helpers/name-constructors.js +61 -0
  208. package/dist/src/rlc-common/helpers/name-constructors.js.map +1 -0
  209. package/dist/src/rlc-common/helpers/name-utils.d.ts +37 -0
  210. package/dist/src/rlc-common/helpers/name-utils.d.ts.map +1 -0
  211. package/dist/src/rlc-common/helpers/name-utils.js +240 -0
  212. package/dist/src/rlc-common/helpers/name-utils.js.map +1 -0
  213. package/dist/src/rlc-common/helpers/operation-helpers.d.ts +16 -0
  214. package/dist/src/rlc-common/helpers/operation-helpers.d.ts.map +1 -0
  215. package/dist/src/rlc-common/helpers/operation-helpers.js +104 -0
  216. package/dist/src/rlc-common/helpers/operation-helpers.js.map +1 -0
  217. package/dist/src/rlc-common/helpers/package-util.d.ts +7 -0
  218. package/dist/src/rlc-common/helpers/package-util.d.ts.map +1 -0
  219. package/dist/src/rlc-common/helpers/package-util.js +10 -0
  220. package/dist/src/rlc-common/helpers/package-util.js.map +1 -0
  221. package/dist/src/rlc-common/helpers/path-utils.d.ts +2 -0
  222. package/dist/src/rlc-common/helpers/path-utils.d.ts.map +1 -0
  223. package/dist/src/rlc-common/helpers/path-utils.js +9 -0
  224. package/dist/src/rlc-common/helpers/path-utils.js.map +1 -0
  225. package/dist/src/rlc-common/helpers/schema-helpers.d.ts +10 -0
  226. package/dist/src/rlc-common/helpers/schema-helpers.d.ts.map +1 -0
  227. package/dist/src/rlc-common/helpers/schema-helpers.js +37 -0
  228. package/dist/src/rlc-common/helpers/schema-helpers.js.map +1 -0
  229. package/dist/src/rlc-common/helpers/shortcut-methods.d.ts +4 -0
  230. package/dist/src/rlc-common/helpers/shortcut-methods.d.ts.map +1 -0
  231. package/dist/src/rlc-common/helpers/shortcut-methods.js +49 -0
  232. package/dist/src/rlc-common/helpers/shortcut-methods.js.map +1 -0
  233. package/dist/src/rlc-common/helpers/type-util.d.ts +32 -0
  234. package/dist/src/rlc-common/helpers/type-util.d.ts.map +1 -0
  235. package/dist/src/rlc-common/helpers/type-util.js +162 -0
  236. package/dist/src/rlc-common/helpers/type-util.js.map +1 -0
  237. package/dist/src/rlc-common/helpers/value-generation-util.d.ts +12 -0
  238. package/dist/src/rlc-common/helpers/value-generation-util.d.ts.map +1 -0
  239. package/dist/src/rlc-common/helpers/value-generation-util.js +161 -0
  240. package/dist/src/rlc-common/helpers/value-generation-util.js.map +1 -0
  241. package/dist/src/rlc-common/index.d.ts +39 -39
  242. package/dist/src/rlc-common/index.d.ts.map +1 -1
  243. package/dist/src/rlc-common/index.js +39 -39
  244. package/dist/src/rlc-common/index.js.map +1 -1
  245. package/dist/src/rlc-common/metadata/build-api-extractor-config.d.ts +6 -0
  246. package/dist/src/rlc-common/metadata/build-api-extractor-config.d.ts.map +1 -0
  247. package/dist/src/rlc-common/metadata/build-api-extractor-config.js +55 -0
  248. package/dist/src/rlc-common/metadata/build-api-extractor-config.js.map +1 -0
  249. package/dist/src/rlc-common/metadata/build-changelog-file.d.ts +6 -0
  250. package/dist/src/rlc-common/metadata/build-changelog-file.d.ts.map +1 -0
  251. package/dist/src/rlc-common/metadata/build-changelog-file.js +25 -0
  252. package/dist/src/rlc-common/metadata/build-changelog-file.js.map +1 -0
  253. package/dist/src/rlc-common/metadata/build-es-lint-config.d.ts +6 -0
  254. package/dist/src/rlc-common/metadata/build-es-lint-config.d.ts.map +1 -0
  255. package/dist/src/rlc-common/metadata/build-es-lint-config.js +79 -0
  256. package/dist/src/rlc-common/metadata/build-es-lint-config.js.map +1 -0
  257. package/dist/src/rlc-common/metadata/build-license-file.d.ts +5 -0
  258. package/dist/src/rlc-common/metadata/build-license-file.d.ts.map +1 -0
  259. package/dist/src/rlc-common/metadata/build-license-file.js +32 -0
  260. package/dist/src/rlc-common/metadata/build-license-file.js.map +1 -0
  261. package/dist/src/rlc-common/metadata/build-package-file.d.ts +25 -0
  262. package/dist/src/rlc-common/metadata/build-package-file.d.ts.map +1 -0
  263. package/dist/src/rlc-common/metadata/build-package-file.js +197 -0
  264. package/dist/src/rlc-common/metadata/build-package-file.js.map +1 -0
  265. package/dist/src/rlc-common/metadata/build-readme-file.d.ts +11 -0
  266. package/dist/src/rlc-common/metadata/build-readme-file.d.ts.map +1 -0
  267. package/dist/src/rlc-common/metadata/build-readme-file.js +418 -0
  268. package/dist/src/rlc-common/metadata/build-readme-file.js.map +1 -0
  269. package/dist/src/rlc-common/metadata/build-rollup-config.d.ts +6 -0
  270. package/dist/src/rlc-common/metadata/build-rollup-config.d.ts.map +1 -0
  271. package/dist/src/rlc-common/metadata/build-rollup-config.js +140 -0
  272. package/dist/src/rlc-common/metadata/build-rollup-config.js.map +1 -0
  273. package/dist/src/rlc-common/metadata/build-sample-env-file.d.ts +6 -0
  274. package/dist/src/rlc-common/metadata/build-sample-env-file.d.ts.map +1 -0
  275. package/dist/src/rlc-common/metadata/build-sample-env-file.js +15 -0
  276. package/dist/src/rlc-common/metadata/build-sample-env-file.js.map +1 -0
  277. package/dist/src/rlc-common/metadata/build-test-config.d.ts +16 -0
  278. package/dist/src/rlc-common/metadata/build-test-config.d.ts.map +1 -0
  279. package/dist/src/rlc-common/metadata/build-test-config.js +54 -0
  280. package/dist/src/rlc-common/metadata/build-test-config.js.map +1 -0
  281. package/dist/src/rlc-common/metadata/build-ts-config.d.ts +61 -0
  282. package/dist/src/rlc-common/metadata/build-ts-config.d.ts.map +1 -0
  283. package/dist/src/rlc-common/metadata/build-ts-config.js +170 -0
  284. package/dist/src/rlc-common/metadata/build-ts-config.js.map +1 -0
  285. package/dist/src/rlc-common/metadata/build-vitest-config.d.ts +6 -0
  286. package/dist/src/rlc-common/metadata/build-vitest-config.d.ts.map +1 -0
  287. package/dist/src/rlc-common/metadata/build-vitest-config.js +26 -0
  288. package/dist/src/rlc-common/metadata/build-vitest-config.js.map +1 -0
  289. package/dist/src/rlc-common/metadata/build-warp-config.d.ts +20 -0
  290. package/dist/src/rlc-common/metadata/build-warp-config.d.ts.map +1 -0
  291. package/dist/src/rlc-common/metadata/build-warp-config.js +76 -0
  292. package/dist/src/rlc-common/metadata/build-warp-config.js.map +1 -0
  293. package/dist/src/rlc-common/metadata/package-json/azure-package-common.d.ts +51 -0
  294. package/dist/src/rlc-common/metadata/package-json/azure-package-common.d.ts.map +1 -0
  295. package/dist/src/rlc-common/metadata/package-json/azure-package-common.js +121 -0
  296. package/dist/src/rlc-common/metadata/package-json/azure-package-common.js.map +1 -0
  297. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts +242 -0
  298. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts.map +1 -0
  299. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js +171 -0
  300. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js.map +1 -0
  301. package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.d.ts +8 -0
  302. package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.d.ts.map +1 -0
  303. package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.js +101 -0
  304. package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.js.map +1 -0
  305. package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.d.ts +57 -0
  306. package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.d.ts.map +1 -0
  307. package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.js +53 -0
  308. package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.js.map +1 -0
  309. package/dist/src/rlc-common/metadata/package-json/package-common.d.ts +64 -0
  310. package/dist/src/rlc-common/metadata/package-json/package-common.d.ts.map +1 -0
  311. package/dist/src/rlc-common/metadata/package-json/package-common.js +180 -0
  312. package/dist/src/rlc-common/metadata/package-json/package-common.js.map +1 -0
  313. package/dist/src/rlc-common/static/paginate-content.d.ts +2 -0
  314. package/dist/src/rlc-common/static/paginate-content.d.ts.map +1 -0
  315. package/dist/src/rlc-common/static/paginate-content.js +345 -0
  316. package/dist/src/rlc-common/static/paginate-content.js.map +1 -0
  317. package/dist/src/rlc-common/static/polling-content.d.ts +2 -0
  318. package/dist/src/rlc-common/static/polling-content.d.ts.map +1 -0
  319. package/dist/src/rlc-common/static/polling-content.js +225 -0
  320. package/dist/src/rlc-common/static/polling-content.js.map +1 -0
  321. package/dist/src/rlc-common/static/sample-template.d.ts +2 -0
  322. package/dist/src/rlc-common/static/sample-template.d.ts.map +1 -0
  323. package/dist/src/rlc-common/static/sample-template.js +56 -0
  324. package/dist/src/rlc-common/static/sample-template.js.map +1 -0
  325. package/dist/src/rlc-common/static/serialize-helper.d.ts +6 -0
  326. package/dist/src/rlc-common/static/serialize-helper.d.ts.map +1 -0
  327. package/dist/src/rlc-common/static/serialize-helper.js +31 -0
  328. package/dist/src/rlc-common/static/serialize-helper.js.map +1 -0
  329. package/dist/src/rlc-common/test/build-karma-config.d.ts +6 -0
  330. package/dist/src/rlc-common/test/build-karma-config.d.ts.map +1 -0
  331. package/dist/src/rlc-common/test/build-karma-config.js +11 -0
  332. package/dist/src/rlc-common/test/build-karma-config.js.map +1 -0
  333. package/dist/src/rlc-common/test/build-recorded-client.d.ts +6 -0
  334. package/dist/src/rlc-common/test/build-recorded-client.d.ts.map +1 -0
  335. package/dist/src/rlc-common/test/build-recorded-client.js +17 -0
  336. package/dist/src/rlc-common/test/build-recorded-client.js.map +1 -0
  337. package/dist/src/rlc-common/test/build-sample-test.d.ts +6 -0
  338. package/dist/src/rlc-common/test/build-sample-test.d.ts.map +1 -0
  339. package/dist/src/rlc-common/test/build-sample-test.js +14 -0
  340. package/dist/src/rlc-common/test/build-sample-test.js.map +1 -0
  341. package/dist/src/rlc-common/test/build-snippets.d.ts +6 -0
  342. package/dist/src/rlc-common/test/build-snippets.d.ts.map +1 -0
  343. package/dist/src/rlc-common/test/build-snippets.js +26 -0
  344. package/dist/src/rlc-common/test/build-snippets.js.map +1 -0
  345. package/dist/src/rlc-common/transform-sample-groups.d.ts +9 -0
  346. package/dist/src/rlc-common/transform-sample-groups.d.ts.map +1 -0
  347. package/dist/src/rlc-common/transform-sample-groups.js +313 -0
  348. package/dist/src/rlc-common/transform-sample-groups.js.map +1 -0
  349. package/dist/src/transform/transform-api-version-info.d.ts +6 -0
  350. package/dist/src/transform/transform-api-version-info.d.ts.map +1 -0
  351. package/dist/src/transform/transform-api-version-info.js +78 -0
  352. package/dist/src/transform/transform-api-version-info.js.map +1 -0
  353. package/dist/src/transform/transform-helper-function-details.d.ts +5 -0
  354. package/dist/src/transform/transform-helper-function-details.d.ts.map +1 -0
  355. package/dist/src/transform/transform-helper-function-details.js +74 -0
  356. package/dist/src/transform/transform-helper-function-details.js.map +1 -0
  357. package/dist/src/transform/transform-parameters.d.ts +14 -0
  358. package/dist/src/transform/transform-parameters.d.ts.map +1 -0
  359. package/dist/src/transform/transform-parameters.js +201 -0
  360. package/dist/src/transform/transform-parameters.js.map +1 -0
  361. package/dist/src/transform/transform-paths.d.ts +5 -0
  362. package/dist/src/transform/transform-paths.d.ts.map +1 -0
  363. package/dist/src/transform/transform-paths.js +102 -0
  364. package/dist/src/transform/transform-paths.js.map +1 -0
  365. package/dist/src/transform/transform-responses.d.ts +5 -0
  366. package/dist/src/transform/transform-responses.d.ts.map +1 -0
  367. package/dist/src/transform/transform-responses.js +171 -0
  368. package/dist/src/transform/transform-responses.js.map +1 -0
  369. package/dist/src/transform/transform-schemas.d.ts +4 -0
  370. package/dist/src/transform/transform-schemas.d.ts.map +1 -0
  371. package/dist/src/transform/transform-schemas.js +191 -0
  372. package/dist/src/transform/transform-schemas.js.map +1 -0
  373. package/dist/src/transform/transform-telemetry-info.d.ts +4 -0
  374. package/dist/src/transform/transform-telemetry-info.d.ts.map +1 -0
  375. package/dist/src/transform/transform-telemetry-info.js +22 -0
  376. package/dist/src/transform/transform-telemetry-info.js.map +1 -0
  377. package/dist/src/transform/transform.d.ts.map +1 -1
  378. package/dist/src/transform/transform.js +12 -13
  379. package/dist/src/transform/transform.js.map +1 -1
  380. package/dist/src/transform/transfrom-rlc-options.d.ts +14 -0
  381. package/dist/src/transform/transfrom-rlc-options.d.ts.map +1 -0
  382. package/dist/src/transform/transfrom-rlc-options.js +369 -0
  383. package/dist/src/transform/transfrom-rlc-options.js.map +1 -0
  384. package/dist/src/utils/client-utils.d.ts +10 -0
  385. package/dist/src/utils/client-utils.d.ts.map +1 -0
  386. package/dist/src/utils/client-utils.js +124 -0
  387. package/dist/src/utils/client-utils.js.map +1 -0
  388. package/dist/src/utils/credential-utils.d.ts +15 -0
  389. package/dist/src/utils/credential-utils.d.ts.map +1 -0
  390. package/dist/src/utils/credential-utils.js +68 -0
  391. package/dist/src/utils/credential-utils.js.map +1 -0
  392. package/dist/src/utils/cross-language-def.d.ts +6 -0
  393. package/dist/src/utils/cross-language-def.d.ts.map +1 -0
  394. package/dist/src/utils/cross-language-def.js +59 -0
  395. package/dist/src/utils/cross-language-def.js.map +1 -0
  396. package/dist/src/utils/emit-util.d.ts +5 -0
  397. package/dist/src/utils/emit-util.d.ts.map +1 -0
  398. package/dist/src/utils/emit-util.js +70 -0
  399. package/dist/src/utils/emit-util.js.map +1 -0
  400. package/dist/src/utils/file-system-utils.d.ts +5 -0
  401. package/dist/src/utils/file-system-utils.d.ts.map +1 -0
  402. package/dist/src/utils/file-system-utils.js +58 -0
  403. package/dist/src/utils/file-system-utils.js.map +1 -0
  404. package/dist/src/utils/import-helper.d.ts +10 -0
  405. package/dist/src/utils/import-helper.d.ts.map +1 -0
  406. package/dist/src/utils/import-helper.js +51 -0
  407. package/dist/src/utils/import-helper.js.map +1 -0
  408. package/dist/src/utils/interfaces.d.ts +1 -1
  409. package/dist/src/utils/interfaces.d.ts.map +1 -1
  410. package/dist/src/utils/media-types.d.ts +28 -0
  411. package/dist/src/utils/media-types.d.ts.map +1 -0
  412. package/dist/src/utils/media-types.js +124 -0
  413. package/dist/src/utils/media-types.js.map +1 -0
  414. package/dist/src/utils/model-utils.d.ts +60 -0
  415. package/dist/src/utils/model-utils.d.ts.map +1 -0
  416. package/dist/src/utils/model-utils.js +1480 -0
  417. package/dist/src/utils/model-utils.js.map +1 -0
  418. package/dist/src/utils/namespace-utils.d.ts +6 -0
  419. package/dist/src/utils/namespace-utils.d.ts.map +1 -0
  420. package/dist/src/utils/namespace-utils.js +69 -0
  421. package/dist/src/utils/namespace-utils.js.map +1 -0
  422. package/dist/src/utils/operation-util.d.ts +97 -0
  423. package/dist/src/utils/operation-util.d.ts.map +1 -0
  424. package/dist/src/utils/operation-util.js +547 -0
  425. package/dist/src/utils/operation-util.js.map +1 -0
  426. package/dist/src/utils/parameter-utils.d.ts +9 -0
  427. package/dist/src/utils/parameter-utils.d.ts.map +1 -0
  428. package/dist/src/utils/parameter-utils.js +147 -0
  429. package/dist/src/utils/parameter-utils.js.map +1 -0
  430. package/dist/src/utils/resolve-project-root.d.ts.map +1 -1
  431. package/dist/src/utils/resolve-project-root.js +1 -3
  432. package/dist/src/utils/resolve-project-root.js.map +1 -1
  433. package/dist/tsconfig.tsbuildinfo +1 -1
  434. package/package.json +28 -32
  435. package/src/context-manager.ts +101 -0
  436. package/src/framework/hooks/binder.ts +6 -7
  437. package/src/framework/hooks/sdk-types.ts +218 -0
  438. package/src/framework/hooks/use-dependencies.ts +16 -0
  439. package/src/framework/load-static-helpers.ts +7 -8
  440. package/src/index.ts +46 -41
  441. package/src/lib.ts +31 -31
  442. package/src/modular/build-classical-client.ts +434 -0
  443. package/src/modular/build-classical-operation-groups.ts +69 -0
  444. package/src/modular/build-client-context.ts +325 -0
  445. package/src/modular/build-operations.ts +248 -0
  446. package/src/modular/build-project-files.ts +118 -0
  447. package/src/modular/build-restore-poller.ts +242 -0
  448. package/src/modular/build-root-index.ts +406 -0
  449. package/src/modular/build-subpath-index.ts +152 -0
  450. package/src/modular/emit-logger-file.ts +23 -0
  451. package/src/modular/emit-models-options.ts +56 -0
  452. package/src/modular/emit-models.ts +1080 -0
  453. package/src/modular/emit-samples.ts +674 -0
  454. package/src/modular/emit-tests.ts +198 -0
  455. package/src/modular/helpers/classical-operation-helpers.ts +375 -0
  456. package/src/modular/helpers/client-helpers.ts +362 -0
  457. package/src/modular/helpers/example-value-helpers.ts +851 -0
  458. package/src/modular/helpers/naming-helpers.ts +84 -0
  459. package/src/modular/helpers/operation-helpers.ts +3035 -0
  460. package/src/modular/helpers/type-helpers.ts +134 -0
  461. package/src/modular/serialization/build-deserializer-function.ts +564 -0
  462. package/src/modular/serialization/build-serializer-function.ts +614 -0
  463. package/src/modular/serialization/build-xml-serializer-function.ts +951 -0
  464. package/src/modular/serialization/serialize-utils.ts +217 -0
  465. package/src/modular/type-expressions/get-credential-expression.ts +1 -1
  466. package/src/modular/type-expressions/get-model-expression.ts +1 -1
  467. package/src/rlc-common/build-client-definitions.ts +235 -0
  468. package/src/rlc-common/build-client.ts +490 -0
  469. package/src/rlc-common/build-index-file.ts +344 -0
  470. package/src/rlc-common/build-is-unexpected-helper.ts +248 -0
  471. package/src/rlc-common/build-logger.ts +43 -0
  472. package/src/rlc-common/build-method-shortcuts.ts +71 -0
  473. package/src/rlc-common/build-object-types.ts +603 -0
  474. package/src/rlc-common/build-paginate-helper.ts +31 -0
  475. package/src/rlc-common/build-parameter-types.ts +554 -0
  476. package/src/rlc-common/build-polling-helper.ts +83 -0
  477. package/src/rlc-common/build-response-types.ts +180 -0
  478. package/src/rlc-common/build-samples.ts +32 -0
  479. package/src/rlc-common/build-schema-type.ts +89 -0
  480. package/src/rlc-common/build-serialize-helper.ts +49 -0
  481. package/src/rlc-common/build-top-level-index-file.ts +58 -0
  482. package/src/rlc-common/helpers/name-constructors.ts +110 -0
  483. package/src/rlc-common/helpers/operation-helpers.ts +138 -0
  484. package/src/rlc-common/helpers/path-utils.ts +8 -0
  485. package/src/rlc-common/helpers/shortcut-methods.ts +58 -0
  486. package/src/rlc-common/helpers/value-generation-util.ts +234 -0
  487. package/src/rlc-common/index.ts +39 -39
  488. package/src/rlc-common/metadata/build-package-file.ts +242 -0
  489. package/src/rlc-common/metadata/build-readme-file.ts +515 -0
  490. package/src/rlc-common/metadata/build-rollup-config.ts +147 -0
  491. package/src/rlc-common/metadata/package-json/azure-package-common.ts +152 -0
  492. package/src/rlc-common/metadata/package-json/build-azure-monorepo-package.ts +199 -0
  493. package/src/rlc-common/metadata/package-json/build-azure-standalone-package.ts +123 -0
  494. package/src/rlc-common/metadata/package-json/build-flavorless-package.ts +68 -0
  495. package/src/rlc-common/test/build-snippets.ts +29 -0
  496. package/src/rlc-common/transform-sample-groups.ts +407 -0
  497. package/src/transform/transform-api-version-info.ts +103 -0
  498. package/src/transform/transform-helper-function-details.ts +88 -0
  499. package/src/transform/transform-parameters.ts +321 -0
  500. package/src/transform/transform-paths.ts +157 -0
  501. package/src/transform/transform-responses.ts +237 -0
  502. package/src/transform/transform-schemas.ts +212 -0
  503. package/src/transform/transform-telemetry-info.ts +33 -0
  504. package/src/transform/transform.ts +12 -13
  505. package/src/transform/transfrom-rlc-options.ts +461 -0
  506. package/src/utils/cross-language-def.ts +66 -0
  507. package/src/utils/emit-util.ts +91 -0
  508. package/src/utils/file-system-utils.ts +68 -0
  509. package/src/utils/import-helper.ts +59 -0
  510. package/src/utils/interfaces.ts +1 -1
  511. package/src/utils/model-utils.ts +1727 -0
  512. package/src/utils/operation-util.ts +763 -0
  513. package/src/utils/parameter-utils.ts +192 -0
  514. package/src/utils/resolve-project-root.ts +1 -3
  515. package/static/static-helpers/serialization/serializers.ts +1 -0
  516. package/dist/src/contextManager.d.ts +0 -75
  517. package/dist/src/contextManager.d.ts.map +0 -1
  518. package/dist/src/contextManager.js +0 -59
  519. package/dist/src/contextManager.js.map +0 -1
  520. package/dist/src/framework/hooks/sdkTypes.d.ts +0 -26
  521. package/dist/src/framework/hooks/sdkTypes.d.ts.map +0 -1
  522. package/dist/src/framework/hooks/sdkTypes.js +0 -157
  523. package/dist/src/framework/hooks/sdkTypes.js.map +0 -1
  524. package/dist/src/framework/hooks/useDependencies.d.ts +0 -4
  525. package/dist/src/framework/hooks/useDependencies.d.ts.map +0 -1
  526. package/dist/src/framework/hooks/useDependencies.js +0 -13
  527. package/dist/src/framework/hooks/useDependencies.js.map +0 -1
  528. package/dist/src/metaTree.d.ts +0 -7
  529. package/dist/src/metaTree.d.ts.map +0 -1
  530. package/dist/src/metaTree.js +0 -2
  531. package/dist/src/metaTree.js.map +0 -1
  532. package/dist/src/modular/buildClassicalClient.d.ts +0 -6
  533. package/dist/src/modular/buildClassicalClient.d.ts.map +0 -1
  534. package/dist/src/modular/buildClassicalClient.js +0 -345
  535. package/dist/src/modular/buildClassicalClient.js.map +0 -1
  536. package/dist/src/modular/buildClassicalOperationGroups.d.ts +0 -6
  537. package/dist/src/modular/buildClassicalOperationGroups.d.ts.map +0 -1
  538. package/dist/src/modular/buildClassicalOperationGroups.js +0 -48
  539. package/dist/src/modular/buildClassicalOperationGroups.js.map +0 -1
  540. package/dist/src/modular/buildClientContext.d.ts +0 -13
  541. package/dist/src/modular/buildClientContext.d.ts.map +0 -1
  542. package/dist/src/modular/buildClientContext.js +0 -246
  543. package/dist/src/modular/buildClientContext.js.map +0 -1
  544. package/dist/src/modular/buildModularOptions.d.ts +0 -6
  545. package/dist/src/modular/buildModularOptions.d.ts.map +0 -1
  546. package/dist/src/modular/buildModularOptions.js +0 -14
  547. package/dist/src/modular/buildModularOptions.js.map +0 -1
  548. package/dist/src/modular/buildOperations.d.ts +0 -21
  549. package/dist/src/modular/buildOperations.d.ts.map +0 -1
  550. package/dist/src/modular/buildOperations.js +0 -172
  551. package/dist/src/modular/buildOperations.js.map +0 -1
  552. package/dist/src/modular/buildProjectFiles.d.ts +0 -4
  553. package/dist/src/modular/buildProjectFiles.d.ts.map +0 -1
  554. package/dist/src/modular/buildProjectFiles.js +0 -91
  555. package/dist/src/modular/buildProjectFiles.js.map +0 -1
  556. package/dist/src/modular/buildRestorePoller.d.ts +0 -5
  557. package/dist/src/modular/buildRestorePoller.d.ts.map +0 -1
  558. package/dist/src/modular/buildRestorePoller.js +0 -216
  559. package/dist/src/modular/buildRestorePoller.js.map +0 -1
  560. package/dist/src/modular/buildRootIndex.d.ts +0 -13
  561. package/dist/src/modular/buildRootIndex.d.ts.map +0 -1
  562. package/dist/src/modular/buildRootIndex.js +0 -279
  563. package/dist/src/modular/buildRootIndex.js.map +0 -1
  564. package/dist/src/modular/buildSubpathIndex.d.ts +0 -16
  565. package/dist/src/modular/buildSubpathIndex.d.ts.map +0 -1
  566. package/dist/src/modular/buildSubpathIndex.js +0 -119
  567. package/dist/src/modular/buildSubpathIndex.js.map +0 -1
  568. package/dist/src/modular/emitLoggerFile.d.ts +0 -3
  569. package/dist/src/modular/emitLoggerFile.d.ts.map +0 -1
  570. package/dist/src/modular/emitLoggerFile.js +0 -18
  571. package/dist/src/modular/emitLoggerFile.js.map +0 -1
  572. package/dist/src/modular/emitModels.d.ts +0 -23
  573. package/dist/src/modular/emitModels.d.ts.map +0 -1
  574. package/dist/src/modular/emitModels.js +0 -850
  575. package/dist/src/modular/emitModels.js.map +0 -1
  576. package/dist/src/modular/emitModelsOptions.d.ts +0 -5
  577. package/dist/src/modular/emitModelsOptions.d.ts.map +0 -1
  578. package/dist/src/modular/emitModelsOptions.js +0 -35
  579. package/dist/src/modular/emitModelsOptions.js.map +0 -1
  580. package/dist/src/modular/emitSamples.d.ts +0 -7
  581. package/dist/src/modular/emitSamples.d.ts.map +0 -1
  582. package/dist/src/modular/emitSamples.js +0 -500
  583. package/dist/src/modular/emitSamples.js.map +0 -1
  584. package/dist/src/modular/emitTests.d.ts +0 -7
  585. package/dist/src/modular/emitTests.d.ts.map +0 -1
  586. package/dist/src/modular/emitTests.js +0 -155
  587. package/dist/src/modular/emitTests.js.map +0 -1
  588. package/dist/src/modular/helpers/classicalOperationHelpers.d.ts +0 -7
  589. package/dist/src/modular/helpers/classicalOperationHelpers.d.ts.map +0 -1
  590. package/dist/src/modular/helpers/classicalOperationHelpers.js +0 -258
  591. package/dist/src/modular/helpers/classicalOperationHelpers.js.map +0 -1
  592. package/dist/src/modular/helpers/clientHelpers.d.ts +0 -34
  593. package/dist/src/modular/helpers/clientHelpers.d.ts.map +0 -1
  594. package/dist/src/modular/helpers/clientHelpers.js +0 -259
  595. package/dist/src/modular/helpers/clientHelpers.js.map +0 -1
  596. package/dist/src/modular/helpers/clientOptionHelpers.d.ts +0 -43
  597. package/dist/src/modular/helpers/clientOptionHelpers.d.ts.map +0 -1
  598. package/dist/src/modular/helpers/clientOptionHelpers.js +0 -103
  599. package/dist/src/modular/helpers/clientOptionHelpers.js.map +0 -1
  600. package/dist/src/modular/helpers/docsHelpers.d.ts +0 -3
  601. package/dist/src/modular/helpers/docsHelpers.d.ts.map +0 -1
  602. package/dist/src/modular/helpers/docsHelpers.js +0 -10
  603. package/dist/src/modular/helpers/docsHelpers.js.map +0 -1
  604. package/dist/src/modular/helpers/exampleValueHelpers.d.ts +0 -83
  605. package/dist/src/modular/helpers/exampleValueHelpers.d.ts.map +0 -1
  606. package/dist/src/modular/helpers/exampleValueHelpers.js +0 -639
  607. package/dist/src/modular/helpers/exampleValueHelpers.js.map +0 -1
  608. package/dist/src/modular/helpers/namingHelpers.d.ts +0 -22
  609. package/dist/src/modular/helpers/namingHelpers.d.ts.map +0 -1
  610. package/dist/src/modular/helpers/namingHelpers.js +0 -59
  611. package/dist/src/modular/helpers/namingHelpers.js.map +0 -1
  612. package/dist/src/modular/helpers/operationHelpers.d.ts +0 -105
  613. package/dist/src/modular/helpers/operationHelpers.d.ts.map +0 -1
  614. package/dist/src/modular/helpers/operationHelpers.js +0 -2328
  615. package/dist/src/modular/helpers/operationHelpers.js.map +0 -1
  616. package/dist/src/modular/helpers/typeHelpers.d.ts +0 -22
  617. package/dist/src/modular/helpers/typeHelpers.d.ts.map +0 -1
  618. package/dist/src/modular/helpers/typeHelpers.js +0 -94
  619. package/dist/src/modular/helpers/typeHelpers.js.map +0 -1
  620. package/dist/src/modular/serialization/buildDeserializerFunction.d.ts +0 -7
  621. package/dist/src/modular/serialization/buildDeserializerFunction.d.ts.map +0 -1
  622. package/dist/src/modular/serialization/buildDeserializerFunction.js +0 -401
  623. package/dist/src/modular/serialization/buildDeserializerFunction.js.map +0 -1
  624. package/dist/src/modular/serialization/buildSerializerFunction.d.ts +0 -7
  625. package/dist/src/modular/serialization/buildSerializerFunction.d.ts.map +0 -1
  626. package/dist/src/modular/serialization/buildSerializerFunction.js +0 -444
  627. package/dist/src/modular/serialization/buildSerializerFunction.js.map +0 -1
  628. package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts +0 -44
  629. package/dist/src/modular/serialization/buildXmlSerializerFunction.d.ts.map +0 -1
  630. package/dist/src/modular/serialization/buildXmlSerializerFunction.js +0 -729
  631. package/dist/src/modular/serialization/buildXmlSerializerFunction.js.map +0 -1
  632. package/dist/src/modular/serialization/serializeUtils.d.ts +0 -37
  633. package/dist/src/modular/serialization/serializeUtils.d.ts.map +0 -1
  634. package/dist/src/modular/serialization/serializeUtils.js +0 -145
  635. package/dist/src/modular/serialization/serializeUtils.js.map +0 -1
  636. package/dist/src/rlc-common/buildClient.d.ts +0 -9
  637. package/dist/src/rlc-common/buildClient.d.ts.map +0 -1
  638. package/dist/src/rlc-common/buildClient.js +0 -391
  639. package/dist/src/rlc-common/buildClient.js.map +0 -1
  640. package/dist/src/rlc-common/buildClientDefinitions.d.ts +0 -6
  641. package/dist/src/rlc-common/buildClientDefinitions.d.ts.map +0 -1
  642. package/dist/src/rlc-common/buildClientDefinitions.js +0 -157
  643. package/dist/src/rlc-common/buildClientDefinitions.js.map +0 -1
  644. package/dist/src/rlc-common/buildIndexFile.d.ts +0 -6
  645. package/dist/src/rlc-common/buildIndexFile.d.ts.map +0 -1
  646. package/dist/src/rlc-common/buildIndexFile.js +0 -241
  647. package/dist/src/rlc-common/buildIndexFile.js.map +0 -1
  648. package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts +0 -6
  649. package/dist/src/rlc-common/buildIsUnexpectedHelper.d.ts.map +0 -1
  650. package/dist/src/rlc-common/buildIsUnexpectedHelper.js +0 -223
  651. package/dist/src/rlc-common/buildIsUnexpectedHelper.js.map +0 -1
  652. package/dist/src/rlc-common/buildLogger.d.ts +0 -6
  653. package/dist/src/rlc-common/buildLogger.d.ts.map +0 -1
  654. package/dist/src/rlc-common/buildLogger.js +0 -31
  655. package/dist/src/rlc-common/buildLogger.js.map +0 -1
  656. package/dist/src/rlc-common/buildMethodShortcuts.d.ts +0 -5
  657. package/dist/src/rlc-common/buildMethodShortcuts.d.ts.map +0 -1
  658. package/dist/src/rlc-common/buildMethodShortcuts.js +0 -54
  659. package/dist/src/rlc-common/buildMethodShortcuts.js.map +0 -1
  660. package/dist/src/rlc-common/buildObjectTypes.d.ts +0 -29
  661. package/dist/src/rlc-common/buildObjectTypes.d.ts.map +0 -1
  662. package/dist/src/rlc-common/buildObjectTypes.js +0 -412
  663. package/dist/src/rlc-common/buildObjectTypes.js.map +0 -1
  664. package/dist/src/rlc-common/buildPaginateHelper.d.ts +0 -6
  665. package/dist/src/rlc-common/buildPaginateHelper.d.ts.map +0 -1
  666. package/dist/src/rlc-common/buildPaginateHelper.js +0 -27
  667. package/dist/src/rlc-common/buildPaginateHelper.js.map +0 -1
  668. package/dist/src/rlc-common/buildParameterTypes.d.ts +0 -14
  669. package/dist/src/rlc-common/buildParameterTypes.d.ts.map +0 -1
  670. package/dist/src/rlc-common/buildParameterTypes.js +0 -391
  671. package/dist/src/rlc-common/buildParameterTypes.js.map +0 -1
  672. package/dist/src/rlc-common/buildPollingHelper.d.ts +0 -6
  673. package/dist/src/rlc-common/buildPollingHelper.d.ts.map +0 -1
  674. package/dist/src/rlc-common/buildPollingHelper.js +0 -61
  675. package/dist/src/rlc-common/buildPollingHelper.js.map +0 -1
  676. package/dist/src/rlc-common/buildResponseTypes.d.ts +0 -6
  677. package/dist/src/rlc-common/buildResponseTypes.d.ts.map +0 -1
  678. package/dist/src/rlc-common/buildResponseTypes.js +0 -143
  679. package/dist/src/rlc-common/buildResponseTypes.js.map +0 -1
  680. package/dist/src/rlc-common/buildSamples.d.ts +0 -3
  681. package/dist/src/rlc-common/buildSamples.d.ts.map +0 -1
  682. package/dist/src/rlc-common/buildSamples.js +0 -30
  683. package/dist/src/rlc-common/buildSamples.js.map +0 -1
  684. package/dist/src/rlc-common/buildSchemaType.d.ts +0 -20
  685. package/dist/src/rlc-common/buildSchemaType.d.ts.map +0 -1
  686. package/dist/src/rlc-common/buildSchemaType.js +0 -71
  687. package/dist/src/rlc-common/buildSchemaType.js.map +0 -1
  688. package/dist/src/rlc-common/buildSerializeHelper.d.ts +0 -6
  689. package/dist/src/rlc-common/buildSerializeHelper.d.ts.map +0 -1
  690. package/dist/src/rlc-common/buildSerializeHelper.js +0 -36
  691. package/dist/src/rlc-common/buildSerializeHelper.js.map +0 -1
  692. package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts +0 -6
  693. package/dist/src/rlc-common/buildTopLevelIndexFile.d.ts.map +0 -1
  694. package/dist/src/rlc-common/buildTopLevelIndexFile.js +0 -48
  695. package/dist/src/rlc-common/buildTopLevelIndexFile.js.map +0 -1
  696. package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts +0 -17
  697. package/dist/src/rlc-common/helpers/apiVersionUtil.d.ts.map +0 -1
  698. package/dist/src/rlc-common/helpers/apiVersionUtil.js +0 -43
  699. package/dist/src/rlc-common/helpers/apiVersionUtil.js.map +0 -1
  700. package/dist/src/rlc-common/helpers/importsUtil.d.ts +0 -18
  701. package/dist/src/rlc-common/helpers/importsUtil.d.ts.map +0 -1
  702. package/dist/src/rlc-common/helpers/importsUtil.js +0 -164
  703. package/dist/src/rlc-common/helpers/importsUtil.js.map +0 -1
  704. package/dist/src/rlc-common/helpers/nameConstructors.d.ts +0 -42
  705. package/dist/src/rlc-common/helpers/nameConstructors.d.ts.map +0 -1
  706. package/dist/src/rlc-common/helpers/nameConstructors.js +0 -61
  707. package/dist/src/rlc-common/helpers/nameConstructors.js.map +0 -1
  708. package/dist/src/rlc-common/helpers/nameUtils.d.ts +0 -37
  709. package/dist/src/rlc-common/helpers/nameUtils.d.ts.map +0 -1
  710. package/dist/src/rlc-common/helpers/nameUtils.js +0 -240
  711. package/dist/src/rlc-common/helpers/nameUtils.js.map +0 -1
  712. package/dist/src/rlc-common/helpers/operationHelpers.d.ts +0 -16
  713. package/dist/src/rlc-common/helpers/operationHelpers.d.ts.map +0 -1
  714. package/dist/src/rlc-common/helpers/operationHelpers.js +0 -104
  715. package/dist/src/rlc-common/helpers/operationHelpers.js.map +0 -1
  716. package/dist/src/rlc-common/helpers/packageUtil.d.ts +0 -7
  717. package/dist/src/rlc-common/helpers/packageUtil.d.ts.map +0 -1
  718. package/dist/src/rlc-common/helpers/packageUtil.js +0 -10
  719. package/dist/src/rlc-common/helpers/packageUtil.js.map +0 -1
  720. package/dist/src/rlc-common/helpers/pathUtils.d.ts +0 -2
  721. package/dist/src/rlc-common/helpers/pathUtils.d.ts.map +0 -1
  722. package/dist/src/rlc-common/helpers/pathUtils.js +0 -10
  723. package/dist/src/rlc-common/helpers/pathUtils.js.map +0 -1
  724. package/dist/src/rlc-common/helpers/schemaHelpers.d.ts +0 -10
  725. package/dist/src/rlc-common/helpers/schemaHelpers.d.ts.map +0 -1
  726. package/dist/src/rlc-common/helpers/schemaHelpers.js +0 -37
  727. package/dist/src/rlc-common/helpers/schemaHelpers.js.map +0 -1
  728. package/dist/src/rlc-common/helpers/shortcutMethods.d.ts +0 -4
  729. package/dist/src/rlc-common/helpers/shortcutMethods.d.ts.map +0 -1
  730. package/dist/src/rlc-common/helpers/shortcutMethods.js +0 -49
  731. package/dist/src/rlc-common/helpers/shortcutMethods.js.map +0 -1
  732. package/dist/src/rlc-common/helpers/typeUtil.d.ts +0 -32
  733. package/dist/src/rlc-common/helpers/typeUtil.d.ts.map +0 -1
  734. package/dist/src/rlc-common/helpers/typeUtil.js +0 -162
  735. package/dist/src/rlc-common/helpers/typeUtil.js.map +0 -1
  736. package/dist/src/rlc-common/helpers/valueGenerationUtil.d.ts +0 -12
  737. package/dist/src/rlc-common/helpers/valueGenerationUtil.d.ts.map +0 -1
  738. package/dist/src/rlc-common/helpers/valueGenerationUtil.js +0 -161
  739. package/dist/src/rlc-common/helpers/valueGenerationUtil.js.map +0 -1
  740. package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts +0 -6
  741. package/dist/src/rlc-common/metadata/buildApiExtractorConfig.d.ts.map +0 -1
  742. package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js +0 -55
  743. package/dist/src/rlc-common/metadata/buildApiExtractorConfig.js.map +0 -1
  744. package/dist/src/rlc-common/metadata/buildChangelogFile.d.ts +0 -6
  745. package/dist/src/rlc-common/metadata/buildChangelogFile.d.ts.map +0 -1
  746. package/dist/src/rlc-common/metadata/buildChangelogFile.js +0 -25
  747. package/dist/src/rlc-common/metadata/buildChangelogFile.js.map +0 -1
  748. package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts +0 -6
  749. package/dist/src/rlc-common/metadata/buildESLintConfig.d.ts.map +0 -1
  750. package/dist/src/rlc-common/metadata/buildESLintConfig.js +0 -79
  751. package/dist/src/rlc-common/metadata/buildESLintConfig.js.map +0 -1
  752. package/dist/src/rlc-common/metadata/buildLicenseFile.d.ts +0 -5
  753. package/dist/src/rlc-common/metadata/buildLicenseFile.d.ts.map +0 -1
  754. package/dist/src/rlc-common/metadata/buildLicenseFile.js +0 -32
  755. package/dist/src/rlc-common/metadata/buildLicenseFile.js.map +0 -1
  756. package/dist/src/rlc-common/metadata/buildPackageFile.d.ts +0 -25
  757. package/dist/src/rlc-common/metadata/buildPackageFile.d.ts.map +0 -1
  758. package/dist/src/rlc-common/metadata/buildPackageFile.js +0 -197
  759. package/dist/src/rlc-common/metadata/buildPackageFile.js.map +0 -1
  760. package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts +0 -11
  761. package/dist/src/rlc-common/metadata/buildReadmeFile.d.ts.map +0 -1
  762. package/dist/src/rlc-common/metadata/buildReadmeFile.js +0 -418
  763. package/dist/src/rlc-common/metadata/buildReadmeFile.js.map +0 -1
  764. package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts +0 -6
  765. package/dist/src/rlc-common/metadata/buildRollupConfig.d.ts.map +0 -1
  766. package/dist/src/rlc-common/metadata/buildRollupConfig.js +0 -140
  767. package/dist/src/rlc-common/metadata/buildRollupConfig.js.map +0 -1
  768. package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts +0 -6
  769. package/dist/src/rlc-common/metadata/buildSampleEnvFile.d.ts.map +0 -1
  770. package/dist/src/rlc-common/metadata/buildSampleEnvFile.js +0 -15
  771. package/dist/src/rlc-common/metadata/buildSampleEnvFile.js.map +0 -1
  772. package/dist/src/rlc-common/metadata/buildTestConfig.d.ts +0 -16
  773. package/dist/src/rlc-common/metadata/buildTestConfig.d.ts.map +0 -1
  774. package/dist/src/rlc-common/metadata/buildTestConfig.js +0 -54
  775. package/dist/src/rlc-common/metadata/buildTestConfig.js.map +0 -1
  776. package/dist/src/rlc-common/metadata/buildTsConfig.d.ts +0 -61
  777. package/dist/src/rlc-common/metadata/buildTsConfig.d.ts.map +0 -1
  778. package/dist/src/rlc-common/metadata/buildTsConfig.js +0 -170
  779. package/dist/src/rlc-common/metadata/buildTsConfig.js.map +0 -1
  780. package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts +0 -6
  781. package/dist/src/rlc-common/metadata/buildVitestConfig.d.ts.map +0 -1
  782. package/dist/src/rlc-common/metadata/buildVitestConfig.js +0 -26
  783. package/dist/src/rlc-common/metadata/buildVitestConfig.js.map +0 -1
  784. package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts +0 -20
  785. package/dist/src/rlc-common/metadata/buildWarpConfig.d.ts.map +0 -1
  786. package/dist/src/rlc-common/metadata/buildWarpConfig.js +0 -76
  787. package/dist/src/rlc-common/metadata/buildWarpConfig.js.map +0 -1
  788. package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts +0 -51
  789. package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.d.ts.map +0 -1
  790. package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js +0 -121
  791. package/dist/src/rlc-common/metadata/packageJson/azurePackageCommon.js.map +0 -1
  792. package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts +0 -242
  793. package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.d.ts.map +0 -1
  794. package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js +0 -171
  795. package/dist/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.js.map +0 -1
  796. package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts +0 -8
  797. package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.d.ts.map +0 -1
  798. package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js +0 -101
  799. package/dist/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.js.map +0 -1
  800. package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.d.ts +0 -57
  801. package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.d.ts.map +0 -1
  802. package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js +0 -53
  803. package/dist/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.js.map +0 -1
  804. package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts +0 -64
  805. package/dist/src/rlc-common/metadata/packageJson/packageCommon.d.ts.map +0 -1
  806. package/dist/src/rlc-common/metadata/packageJson/packageCommon.js +0 -180
  807. package/dist/src/rlc-common/metadata/packageJson/packageCommon.js.map +0 -1
  808. package/dist/src/rlc-common/static/paginateContent.d.ts +0 -2
  809. package/dist/src/rlc-common/static/paginateContent.d.ts.map +0 -1
  810. package/dist/src/rlc-common/static/paginateContent.js +0 -345
  811. package/dist/src/rlc-common/static/paginateContent.js.map +0 -1
  812. package/dist/src/rlc-common/static/pollingContent.d.ts +0 -2
  813. package/dist/src/rlc-common/static/pollingContent.d.ts.map +0 -1
  814. package/dist/src/rlc-common/static/pollingContent.js +0 -225
  815. package/dist/src/rlc-common/static/pollingContent.js.map +0 -1
  816. package/dist/src/rlc-common/static/sampleTemplate.d.ts +0 -2
  817. package/dist/src/rlc-common/static/sampleTemplate.d.ts.map +0 -1
  818. package/dist/src/rlc-common/static/sampleTemplate.js +0 -56
  819. package/dist/src/rlc-common/static/sampleTemplate.js.map +0 -1
  820. package/dist/src/rlc-common/static/serializeHelper.d.ts +0 -6
  821. package/dist/src/rlc-common/static/serializeHelper.d.ts.map +0 -1
  822. package/dist/src/rlc-common/static/serializeHelper.js +0 -31
  823. package/dist/src/rlc-common/static/serializeHelper.js.map +0 -1
  824. package/dist/src/rlc-common/test/buildKarmaConfig.d.ts +0 -6
  825. package/dist/src/rlc-common/test/buildKarmaConfig.d.ts.map +0 -1
  826. package/dist/src/rlc-common/test/buildKarmaConfig.js +0 -11
  827. package/dist/src/rlc-common/test/buildKarmaConfig.js.map +0 -1
  828. package/dist/src/rlc-common/test/buildRecordedClient.d.ts +0 -6
  829. package/dist/src/rlc-common/test/buildRecordedClient.d.ts.map +0 -1
  830. package/dist/src/rlc-common/test/buildRecordedClient.js +0 -17
  831. package/dist/src/rlc-common/test/buildRecordedClient.js.map +0 -1
  832. package/dist/src/rlc-common/test/buildSampleTest.d.ts +0 -6
  833. package/dist/src/rlc-common/test/buildSampleTest.d.ts.map +0 -1
  834. package/dist/src/rlc-common/test/buildSampleTest.js +0 -14
  835. package/dist/src/rlc-common/test/buildSampleTest.js.map +0 -1
  836. package/dist/src/rlc-common/test/buildSnippets.d.ts +0 -6
  837. package/dist/src/rlc-common/test/buildSnippets.d.ts.map +0 -1
  838. package/dist/src/rlc-common/test/buildSnippets.js +0 -26
  839. package/dist/src/rlc-common/test/buildSnippets.js.map +0 -1
  840. package/dist/src/rlc-common/transformSampleGroups.d.ts +0 -9
  841. package/dist/src/rlc-common/transformSampleGroups.d.ts.map +0 -1
  842. package/dist/src/rlc-common/transformSampleGroups.js +0 -313
  843. package/dist/src/rlc-common/transformSampleGroups.js.map +0 -1
  844. package/dist/src/transform/transformApiVersionInfo.d.ts +0 -6
  845. package/dist/src/transform/transformApiVersionInfo.d.ts.map +0 -1
  846. package/dist/src/transform/transformApiVersionInfo.js +0 -78
  847. package/dist/src/transform/transformApiVersionInfo.js.map +0 -1
  848. package/dist/src/transform/transformHelperFunctionDetails.d.ts +0 -5
  849. package/dist/src/transform/transformHelperFunctionDetails.d.ts.map +0 -1
  850. package/dist/src/transform/transformHelperFunctionDetails.js +0 -74
  851. package/dist/src/transform/transformHelperFunctionDetails.js.map +0 -1
  852. package/dist/src/transform/transformParameters.d.ts +0 -14
  853. package/dist/src/transform/transformParameters.d.ts.map +0 -1
  854. package/dist/src/transform/transformParameters.js +0 -201
  855. package/dist/src/transform/transformParameters.js.map +0 -1
  856. package/dist/src/transform/transformPaths.d.ts +0 -5
  857. package/dist/src/transform/transformPaths.d.ts.map +0 -1
  858. package/dist/src/transform/transformPaths.js +0 -102
  859. package/dist/src/transform/transformPaths.js.map +0 -1
  860. package/dist/src/transform/transformResponses.d.ts +0 -5
  861. package/dist/src/transform/transformResponses.d.ts.map +0 -1
  862. package/dist/src/transform/transformResponses.js +0 -171
  863. package/dist/src/transform/transformResponses.js.map +0 -1
  864. package/dist/src/transform/transformSchemas.d.ts +0 -4
  865. package/dist/src/transform/transformSchemas.d.ts.map +0 -1
  866. package/dist/src/transform/transformSchemas.js +0 -191
  867. package/dist/src/transform/transformSchemas.js.map +0 -1
  868. package/dist/src/transform/transformTelemetryInfo.d.ts +0 -4
  869. package/dist/src/transform/transformTelemetryInfo.d.ts.map +0 -1
  870. package/dist/src/transform/transformTelemetryInfo.js +0 -22
  871. package/dist/src/transform/transformTelemetryInfo.js.map +0 -1
  872. package/dist/src/transform/transfromRLCOptions.d.ts +0 -14
  873. package/dist/src/transform/transfromRLCOptions.d.ts.map +0 -1
  874. package/dist/src/transform/transfromRLCOptions.js +0 -369
  875. package/dist/src/transform/transfromRLCOptions.js.map +0 -1
  876. package/dist/src/utils/clientUtils.d.ts +0 -10
  877. package/dist/src/utils/clientUtils.d.ts.map +0 -1
  878. package/dist/src/utils/clientUtils.js +0 -124
  879. package/dist/src/utils/clientUtils.js.map +0 -1
  880. package/dist/src/utils/credentialUtils.d.ts +0 -15
  881. package/dist/src/utils/credentialUtils.d.ts.map +0 -1
  882. package/dist/src/utils/credentialUtils.js +0 -68
  883. package/dist/src/utils/credentialUtils.js.map +0 -1
  884. package/dist/src/utils/crossLanguageDef.d.ts +0 -6
  885. package/dist/src/utils/crossLanguageDef.d.ts.map +0 -1
  886. package/dist/src/utils/crossLanguageDef.js +0 -59
  887. package/dist/src/utils/crossLanguageDef.js.map +0 -1
  888. package/dist/src/utils/dirname.d.ts +0 -9
  889. package/dist/src/utils/dirname.d.ts.map +0 -1
  890. package/dist/src/utils/dirname.js +0 -12
  891. package/dist/src/utils/dirname.js.map +0 -1
  892. package/dist/src/utils/emitUtil.d.ts +0 -5
  893. package/dist/src/utils/emitUtil.d.ts.map +0 -1
  894. package/dist/src/utils/emitUtil.js +0 -71
  895. package/dist/src/utils/emitUtil.js.map +0 -1
  896. package/dist/src/utils/fileSystemUtils.d.ts +0 -5
  897. package/dist/src/utils/fileSystemUtils.d.ts.map +0 -1
  898. package/dist/src/utils/fileSystemUtils.js +0 -59
  899. package/dist/src/utils/fileSystemUtils.js.map +0 -1
  900. package/dist/src/utils/importHelper.d.ts +0 -10
  901. package/dist/src/utils/importHelper.d.ts.map +0 -1
  902. package/dist/src/utils/importHelper.js +0 -51
  903. package/dist/src/utils/importHelper.js.map +0 -1
  904. package/dist/src/utils/mediaTypes.d.ts +0 -28
  905. package/dist/src/utils/mediaTypes.d.ts.map +0 -1
  906. package/dist/src/utils/mediaTypes.js +0 -124
  907. package/dist/src/utils/mediaTypes.js.map +0 -1
  908. package/dist/src/utils/modelUtils.d.ts +0 -60
  909. package/dist/src/utils/modelUtils.d.ts.map +0 -1
  910. package/dist/src/utils/modelUtils.js +0 -1488
  911. package/dist/src/utils/modelUtils.js.map +0 -1
  912. package/dist/src/utils/namespaceUtils.d.ts +0 -6
  913. package/dist/src/utils/namespaceUtils.d.ts.map +0 -1
  914. package/dist/src/utils/namespaceUtils.js +0 -69
  915. package/dist/src/utils/namespaceUtils.js.map +0 -1
  916. package/dist/src/utils/operationUtil.d.ts +0 -97
  917. package/dist/src/utils/operationUtil.d.ts.map +0 -1
  918. package/dist/src/utils/operationUtil.js +0 -547
  919. package/dist/src/utils/operationUtil.js.map +0 -1
  920. package/dist/src/utils/parameterUtils.d.ts +0 -9
  921. package/dist/src/utils/parameterUtils.d.ts.map +0 -1
  922. package/dist/src/utils/parameterUtils.js +0 -147
  923. package/dist/src/utils/parameterUtils.js.map +0 -1
  924. package/src/contextManager.ts +0 -101
  925. package/src/framework/hooks/sdkTypes.ts +0 -218
  926. package/src/framework/hooks/useDependencies.ts +0 -16
  927. package/src/modular/buildClassicalClient.ts +0 -434
  928. package/src/modular/buildClassicalOperationGroups.ts +0 -69
  929. package/src/modular/buildClientContext.ts +0 -325
  930. package/src/modular/buildOperations.ts +0 -248
  931. package/src/modular/buildProjectFiles.ts +0 -111
  932. package/src/modular/buildRestorePoller.ts +0 -242
  933. package/src/modular/buildRootIndex.ts +0 -407
  934. package/src/modular/buildSubpathIndex.ts +0 -152
  935. package/src/modular/emitLoggerFile.ts +0 -23
  936. package/src/modular/emitModels.ts +0 -1081
  937. package/src/modular/emitModelsOptions.ts +0 -56
  938. package/src/modular/emitSamples.ts +0 -675
  939. package/src/modular/emitTests.ts +0 -194
  940. package/src/modular/helpers/classicalOperationHelpers.ts +0 -375
  941. package/src/modular/helpers/clientHelpers.ts +0 -362
  942. package/src/modular/helpers/exampleValueHelpers.ts +0 -851
  943. package/src/modular/helpers/namingHelpers.ts +0 -84
  944. package/src/modular/helpers/operationHelpers.ts +0 -3035
  945. package/src/modular/helpers/typeHelpers.ts +0 -131
  946. package/src/modular/serialization/buildDeserializerFunction.ts +0 -564
  947. package/src/modular/serialization/buildSerializerFunction.ts +0 -616
  948. package/src/modular/serialization/buildXmlSerializerFunction.ts +0 -951
  949. package/src/modular/serialization/serializeUtils.ts +0 -217
  950. package/src/rlc-common/buildClient.ts +0 -490
  951. package/src/rlc-common/buildClientDefinitions.ts +0 -235
  952. package/src/rlc-common/buildIndexFile.ts +0 -344
  953. package/src/rlc-common/buildIsUnexpectedHelper.ts +0 -248
  954. package/src/rlc-common/buildLogger.ts +0 -43
  955. package/src/rlc-common/buildMethodShortcuts.ts +0 -71
  956. package/src/rlc-common/buildObjectTypes.ts +0 -603
  957. package/src/rlc-common/buildPaginateHelper.ts +0 -31
  958. package/src/rlc-common/buildParameterTypes.ts +0 -554
  959. package/src/rlc-common/buildPollingHelper.ts +0 -83
  960. package/src/rlc-common/buildResponseTypes.ts +0 -180
  961. package/src/rlc-common/buildSamples.ts +0 -32
  962. package/src/rlc-common/buildSchemaType.ts +0 -89
  963. package/src/rlc-common/buildSerializeHelper.ts +0 -49
  964. package/src/rlc-common/buildTopLevelIndexFile.ts +0 -58
  965. package/src/rlc-common/helpers/nameConstructors.ts +0 -110
  966. package/src/rlc-common/helpers/operationHelpers.ts +0 -138
  967. package/src/rlc-common/helpers/pathUtils.ts +0 -10
  968. package/src/rlc-common/helpers/shortcutMethods.ts +0 -58
  969. package/src/rlc-common/helpers/valueGenerationUtil.ts +0 -234
  970. package/src/rlc-common/metadata/buildPackageFile.ts +0 -242
  971. package/src/rlc-common/metadata/buildReadmeFile.ts +0 -515
  972. package/src/rlc-common/metadata/buildRollupConfig.ts +0 -147
  973. package/src/rlc-common/metadata/packageJson/azurePackageCommon.ts +0 -152
  974. package/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.ts +0 -199
  975. package/src/rlc-common/metadata/packageJson/buildAzureStandalonePackage.ts +0 -123
  976. package/src/rlc-common/metadata/packageJson/buildFlavorlessPackage.ts +0 -68
  977. package/src/rlc-common/test/buildSnippets.ts +0 -29
  978. package/src/rlc-common/transformSampleGroups.ts +0 -407
  979. package/src/transform/transformApiVersionInfo.ts +0 -103
  980. package/src/transform/transformHelperFunctionDetails.ts +0 -88
  981. package/src/transform/transformParameters.ts +0 -321
  982. package/src/transform/transformPaths.ts +0 -157
  983. package/src/transform/transformResponses.ts +0 -237
  984. package/src/transform/transformSchemas.ts +0 -212
  985. package/src/transform/transformTelemetryInfo.ts +0 -33
  986. package/src/transform/transfromRLCOptions.ts +0 -461
  987. package/src/utils/crossLanguageDef.ts +0 -66
  988. package/src/utils/dirname.ts +0 -12
  989. package/src/utils/emitUtil.ts +0 -92
  990. package/src/utils/fileSystemUtils.ts +0 -69
  991. package/src/utils/importHelper.ts +0 -59
  992. package/src/utils/modelUtils.ts +0 -1737
  993. package/src/utils/operationUtil.ts +0 -763
  994. package/src/utils/parameterUtils.ts +0 -192
  995. /package/src/{metaTree.ts → meta-tree.ts} +0 -0
  996. /package/src/modular/{buildModularOptions.ts → build-modular-options.ts} +0 -0
  997. /package/src/modular/helpers/{clientOptionHelpers.ts → client-option-helpers.ts} +0 -0
  998. /package/src/modular/helpers/{docsHelpers.ts → docs-helpers.ts} +0 -0
  999. /package/src/rlc-common/helpers/{apiVersionUtil.ts → api-version-util.ts} +0 -0
  1000. /package/src/rlc-common/helpers/{importsUtil.ts → imports-util.ts} +0 -0
  1001. /package/src/rlc-common/helpers/{nameUtils.ts → name-utils.ts} +0 -0
  1002. /package/src/rlc-common/helpers/{packageUtil.ts → package-util.ts} +0 -0
  1003. /package/src/rlc-common/helpers/{schemaHelpers.ts → schema-helpers.ts} +0 -0
  1004. /package/src/rlc-common/helpers/{typeUtil.ts → type-util.ts} +0 -0
  1005. /package/src/rlc-common/metadata/{buildApiExtractorConfig.ts → build-api-extractor-config.ts} +0 -0
  1006. /package/src/rlc-common/metadata/{buildChangelogFile.ts → build-changelog-file.ts} +0 -0
  1007. /package/src/rlc-common/metadata/{buildESLintConfig.ts → build-es-lint-config.ts} +0 -0
  1008. /package/src/rlc-common/metadata/{buildLicenseFile.ts → build-license-file.ts} +0 -0
  1009. /package/src/rlc-common/metadata/{buildSampleEnvFile.ts → build-sample-env-file.ts} +0 -0
  1010. /package/src/rlc-common/metadata/{buildTestConfig.ts → build-test-config.ts} +0 -0
  1011. /package/src/rlc-common/metadata/{buildTsConfig.ts → build-ts-config.ts} +0 -0
  1012. /package/src/rlc-common/metadata/{buildVitestConfig.ts → build-vitest-config.ts} +0 -0
  1013. /package/src/rlc-common/metadata/{buildWarpConfig.ts → build-warp-config.ts} +0 -0
  1014. /package/src/rlc-common/metadata/{packageJson/packageCommon.ts → package-json/package-common.ts} +0 -0
  1015. /package/src/rlc-common/static/{paginateContent.ts → paginate-content.ts} +0 -0
  1016. /package/src/rlc-common/static/{pollingContent.ts → polling-content.ts} +0 -0
  1017. /package/src/rlc-common/static/{sampleTemplate.ts → sample-template.ts} +0 -0
  1018. /package/src/rlc-common/static/{serializeHelper.ts → serialize-helper.ts} +0 -0
  1019. /package/src/rlc-common/test/{buildKarmaConfig.ts → build-karma-config.ts} +0 -0
  1020. /package/src/rlc-common/test/{buildRecordedClient.ts → build-recorded-client.ts} +0 -0
  1021. /package/src/rlc-common/test/{buildSampleTest.ts → build-sample-test.ts} +0 -0
  1022. /package/src/utils/{clientUtils.ts → client-utils.ts} +0 -0
  1023. /package/src/utils/{credentialUtils.ts → credential-utils.ts} +0 -0
  1024. /package/src/utils/{mediaTypes.ts → media-types.ts} +0 -0
  1025. /package/src/utils/{namespaceUtils.ts → namespace-utils.ts} +0 -0
@@ -0,0 +1,1080 @@
1
+ import {
2
+ isPagedResultModel,
3
+ isReadOnly,
4
+ listAllServiceNamespaces,
5
+ SdkArrayType,
6
+ SdkClientType,
7
+ SdkDictionaryType,
8
+ SdkEnumType,
9
+ SdkEnumValueType,
10
+ SdkHttpOperation,
11
+ SdkMethod,
12
+ SdkModelPropertyType,
13
+ SdkModelType,
14
+ SdkNullableType,
15
+ SdkServiceMethod,
16
+ SdkServiceOperation,
17
+ SdkType,
18
+ SdkUnionType,
19
+ UsageFlags,
20
+ } from "@azure-tools/typespec-client-generator-core";
21
+ import {
22
+ EnumDeclarationStructure,
23
+ EnumMemberStructure,
24
+ InterfaceDeclarationStructure,
25
+ OptionalKind,
26
+ PropertySignatureStructure,
27
+ SourceFile,
28
+ StructureKind,
29
+ TypeAliasDeclarationStructure,
30
+ } from "ts-morph";
31
+ import { fixLeadingNumber, NameType, normalizeName } from "../rlc-common/index.js";
32
+ // import { isKey } from "@typespec/compiler";
33
+ import {
34
+ getExternalModel,
35
+ getModelExpression,
36
+ getMultipartFileTypeExpression,
37
+ } from "./type-expressions/get-model-expression.js";
38
+
39
+ import { getNamespaceFullName, joinPaths, NoTarget } from "@typespec/compiler";
40
+ import { isMetadata, isOrExtendsHttpFile, Visibility } from "@typespec/http";
41
+ import { useContext } from "../context-manager.js";
42
+ import { addDeclaration } from "../framework/declaration.js";
43
+ import {
44
+ emitQueue,
45
+ flattenPropertyModelMap,
46
+ getAllOperationsFromClient,
47
+ pagedModelsUsedInNonPagingOps,
48
+ } from "../framework/hooks/sdk-types.js";
49
+ import { refkey } from "../framework/refkey.js";
50
+ import { reportDiagnostic } from "../lib.js";
51
+ import { getClientHierarchyMap } from "../utils/client-utils.js";
52
+ import { SdkContext } from "../utils/interfaces.js";
53
+ import { isAzureCoreErrorType } from "../utils/model-utils.js";
54
+ import { getMethodHierarchiesMap } from "../utils/operation-util.js";
55
+ import { getHeaderClientOptions } from "./helpers/client-option-helpers.js";
56
+ import {
57
+ buildNonModelResponseTypeDeclaration,
58
+ checkWrapNonModelReturn,
59
+ getAllAncestors,
60
+ getAllProperties,
61
+ } from "./helpers/operation-helpers.js";
62
+ import { getDirectSubtypes } from "./helpers/type-helpers.js";
63
+ import {
64
+ buildModelDeserializer,
65
+ buildPropertyDeserializer,
66
+ } from "./serialization/build-deserializer-function.js";
67
+ import {
68
+ buildModelSerializer,
69
+ buildPropertySerializer,
70
+ } from "./serialization/build-serializer-function.js";
71
+ import {
72
+ buildXmlModelDeserializer,
73
+ buildXmlModelSerializer,
74
+ buildXmlObjectModelDeserializer,
75
+ buildXmlObjectModelSerializer,
76
+ hasXmlSerialization,
77
+ } from "./serialization/build-xml-serializer-function.js";
78
+ import {
79
+ getAllDiscriminatedValues,
80
+ getPropertyWithOverrides,
81
+ isDiscriminatedUnion,
82
+ } from "./serialization/serialize-utils.js";
83
+ import { isExtensibleEnum } from "./type-expressions/get-enum-expression.js";
84
+ import {
85
+ getTypeExpression,
86
+ normalizeModelPropertyName,
87
+ } from "./type-expressions/get-type-expression.js";
88
+
89
+ type InterfaceStructure = OptionalKind<InterfaceDeclarationStructure> & {
90
+ extends?: string[];
91
+ kind: StructureKind.Interface;
92
+ };
93
+
94
+ function isGenerableType(
95
+ type: SdkType,
96
+ ): type is
97
+ | SdkModelType
98
+ | SdkEnumType
99
+ | SdkUnionType
100
+ | SdkDictionaryType
101
+ | SdkArrayType
102
+ | SdkNullableType {
103
+ return (
104
+ type.kind === "model" ||
105
+ type.kind === "enum" ||
106
+ type.kind === "union" ||
107
+ type.kind === "dict" ||
108
+ type.kind === "array" ||
109
+ (type.kind === "nullable" &&
110
+ isGenerableType(type.type) &&
111
+ Boolean(type.name) &&
112
+ !type.isGeneratedName)
113
+ );
114
+ }
115
+ export function emitTypes(context: SdkContext, { sourceRoot }: { sourceRoot: string }) {
116
+ const outputProject = useContext("outputProject");
117
+
118
+ let sourceFile;
119
+
120
+ for (const type of emitQueue) {
121
+ if (!isGenerableType(type)) {
122
+ continue;
123
+ }
124
+
125
+ const namespaces = getModelNamespaces(context, type);
126
+ const filepath = getModelsPath(sourceRoot, namespaces);
127
+ sourceFile = outputProject.getSourceFile(filepath);
128
+ if (!sourceFile) {
129
+ sourceFile = outputProject.createSourceFile(filepath);
130
+ sourceFile.addStatements(`/**
131
+ * This file contains only generated model types and their (de)serializers.
132
+ * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.
133
+ */
134
+ /* eslint-disable @typescript-eslint/naming-convention */
135
+ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */`);
136
+ }
137
+ emitType(context, type, sourceFile);
138
+ }
139
+
140
+ // Emit serialization/deserialization functions for flattened properties
141
+ for (const [property, _] of flattenPropertyModelMap) {
142
+ const namespaces = getModelNamespaces(context, property.type);
143
+ const filepath = getModelsPath(sourceRoot, namespaces);
144
+ sourceFile = outputProject.getSourceFile(filepath);
145
+ addSerializationFunctions(context, property, sourceFile!);
146
+ }
147
+
148
+ const modelFiles = outputProject.getSourceFiles(sourceRoot + "/models/**/*.ts");
149
+ const result = [];
150
+ for (const modelFile of modelFiles) {
151
+ if (
152
+ modelFile.getInterfaces().length === 0 &&
153
+ modelFile.getTypeAliases().length === 0 &&
154
+ modelFile.getEnums().length === 0
155
+ ) {
156
+ outputProject.removeSourceFile(modelFile);
157
+ continue;
158
+ }
159
+ result.push(modelFile);
160
+ }
161
+
162
+ return result;
163
+ }
164
+
165
+ /**
166
+ * Emits the XxxResponse wrapper type aliases for non-model return operations
167
+ * into the models.ts file, so they are exported publicly as part of the models API surface.
168
+ * This must be called after emitTypes() and before buildSubpathIndexFile("models").
169
+ */
170
+ export function emitNonModelResponseTypes(
171
+ context: SdkContext,
172
+ { sourceRoot }: { sourceRoot: string },
173
+ ) {
174
+ const outputProject = useContext("outputProject");
175
+ const clientMap = getClientHierarchyMap(context);
176
+
177
+ const filepath = getModelsPath(sourceRoot);
178
+ let modelsFile = outputProject.getSourceFile(filepath);
179
+
180
+ for (const subClient of clientMap) {
181
+ const methodHierarchies = getMethodHierarchiesMap(context, subClient[1]);
182
+ for (const [prefixKey, operations] of methodHierarchies) {
183
+ const prefixes = prefixKey.split("/");
184
+ for (const op of operations) {
185
+ const { shouldWrap, isBinary } = checkWrapNonModelReturn(context, op);
186
+ if (!shouldWrap) {
187
+ continue;
188
+ }
189
+ if (!modelsFile) {
190
+ modelsFile = outputProject.createSourceFile(filepath);
191
+ }
192
+ const method: [string[], typeof op] = [prefixes, op];
193
+ const typeAlias = buildNonModelResponseTypeDeclaration(context, method, isBinary);
194
+ addDeclaration(modelsFile, typeAlias, refkey(op, "response"));
195
+ }
196
+ }
197
+ }
198
+ }
199
+
200
+ function emitType(context: SdkContext, type: SdkType, sourceFile: SourceFile) {
201
+ if (type.kind === "model") {
202
+ if (isAzureCoreErrorType(context.program, type.__raw)) {
203
+ return;
204
+ }
205
+ if (isOrExtendsHttpFile(context.program, type.__raw!)) {
206
+ return;
207
+ }
208
+ if (
209
+ !type.usage ||
210
+ (type.usage !== undefined &&
211
+ (type.usage & UsageFlags.Output) !== UsageFlags.Output &&
212
+ (type.usage & UsageFlags.Input) !== UsageFlags.Input &&
213
+ (type.usage & UsageFlags.Exception) !== UsageFlags.Exception)
214
+ ) {
215
+ return;
216
+ }
217
+ if (!type.name && type.isGeneratedName) {
218
+ // TODO: https://github.com/Azure/typespec-azure/issues/1713 and https://github.com/microsoft/typespec/issues/4815
219
+ // throw new Error(`Generation of anonymous types`);
220
+ return;
221
+ }
222
+ const modelInterface = buildModelInterface(context, type);
223
+ if (type.discriminatorProperty) {
224
+ modelInterface.properties
225
+ ?.filter((p) => {
226
+ return p.name === normalizeModelPropertyName(context, type.discriminatorProperty!);
227
+ })
228
+ .map((p) => {
229
+ p.docs?.push(
230
+ `The discriminator possible values: ${Object.keys(type.discriminatedSubtypes ?? {}).join(", ")}`,
231
+ );
232
+ return p;
233
+ });
234
+ }
235
+ addDeclaration(sourceFile, modelInterface, type);
236
+ const modelPolymorphicType = buildModelPolymorphicType(context, type);
237
+ if (modelPolymorphicType) {
238
+ addSerializationFunctions(context, type, sourceFile, true);
239
+ addDeclaration(sourceFile, modelPolymorphicType, refkey(type, "polymorphicType"));
240
+ }
241
+ addSerializationFunctions(context, type, sourceFile);
242
+ } else if (type.kind === "enum") {
243
+ if (!type.usage) {
244
+ return;
245
+ }
246
+ const apiVersionEnumOnly = type.usage === UsageFlags.ApiVersionEnum;
247
+ // Skip known api version enums for multi-service scenarios as users are not allowed to set api versions
248
+ if (apiVersionEnumOnly && context.rlcOptions?.isMultiService) {
249
+ return;
250
+ }
251
+ const inputUsage = (type.usage & UsageFlags.Input) === UsageFlags.Input;
252
+ const outputUsage = (type.usage & UsageFlags.Output) === UsageFlags.Output;
253
+ const exceptionUsage = (type.usage & UsageFlags.Exception) === UsageFlags.Exception;
254
+ if (!(inputUsage || outputUsage || apiVersionEnumOnly || exceptionUsage)) {
255
+ return;
256
+ }
257
+ const [enumType, knownValuesEnum] = buildEnumTypes(
258
+ context,
259
+ type,
260
+ isExtensibleEnum(context, type),
261
+ );
262
+ if (enumType.name.startsWith("_")) {
263
+ // skip enum generation for internal enums
264
+ return;
265
+ }
266
+ if (apiVersionEnumOnly) {
267
+ // generate known values enum only for api version enums
268
+ addDeclaration(sourceFile, knownValuesEnum, refkey(knownValuesEnum.name, "knownValues"));
269
+ } else {
270
+ if (isExtensibleEnum(context, type)) {
271
+ addDeclaration(sourceFile, knownValuesEnum, refkey(type, "knownValues"));
272
+ }
273
+ addDeclaration(sourceFile, enumType, type);
274
+ }
275
+ } else if (type.kind === "union") {
276
+ const unionType = buildUnionType(context, type);
277
+ addDeclaration(sourceFile, unionType, type);
278
+ addSerializationFunctions(context, type, sourceFile);
279
+ } else if (type.kind === "dict") {
280
+ addDeclaration(sourceFile, normalizeModelName(context, type), type);
281
+ addSerializationFunctions(context, type, sourceFile);
282
+ } else if (type.kind === "array") {
283
+ addDeclaration(sourceFile, normalizeModelName(context, type), type);
284
+ addSerializationFunctions(context, type, sourceFile);
285
+ } else if (type.kind === "nullable") {
286
+ const nullableType = buildNullableType(context, type);
287
+ addDeclaration(sourceFile, nullableType, type);
288
+ }
289
+ }
290
+
291
+ export function getApiVersionEnum(context: SdkContext) {
292
+ // Skip api version enum for multi-service scenarios since each service may have different versions
293
+ if (context.rlcOptions?.isMultiService) {
294
+ return;
295
+ }
296
+ const apiVersionEnum = context.sdkPackage.enums.find(
297
+ (e) => e.usage === UsageFlags.ApiVersionEnum,
298
+ );
299
+ if (!apiVersionEnum) {
300
+ return;
301
+ }
302
+ return apiVersionEnum;
303
+ }
304
+
305
+ export function getModelsPath(sourceRoot: string, modelNamespace: string[] = []): string {
306
+ return joinPaths(
307
+ ...[
308
+ sourceRoot,
309
+ "models",
310
+ ...modelNamespace.map((n) => normalizeName(n, NameType.File)),
311
+ `models.ts`,
312
+ ],
313
+ );
314
+ }
315
+
316
+ export function getModelNamespaces(context: SdkContext, model: SdkType): string[] {
317
+ if (model.kind === "model" || model.kind === "enum" || model.kind === "union") {
318
+ if (
319
+ (model.namespace ?? "").startsWith("Azure.ResourceManager") ||
320
+ (model.namespace ?? "").startsWith("Azure.Core") ||
321
+ (model.crossLanguageDefinitionId ?? "").startsWith("TypeSpec.Rest.Resource") ||
322
+ (model.crossLanguageDefinitionId ?? "") === "TypeSpec.Http.File" // filter out the TypeSpec.Http.File model similar like what java does here https://github.com/microsoft/typespec/blob/main/packages/http-client-java/emitter/src/code-model-builder.ts#L2589
323
+ ) {
324
+ return [];
325
+ }
326
+ const segments = model.namespace.split(".");
327
+ // Keep full namespace segments if multiple services are present because there isn't a root namespace to trim
328
+ if (context.rlcOptions?.isMultiService) {
329
+ return segments;
330
+ }
331
+
332
+ const allServiceNamespaces = context.allServiceNamespaces ?? listAllServiceNamespaces(context);
333
+ const deepestNamespace = getNamespaceFullName(allServiceNamespaces[0]!);
334
+ const rootNamespace = deepestNamespace.split(".") ?? [];
335
+ if (segments.length > rootNamespace.length) {
336
+ while (segments[0] === rootNamespace[0]) {
337
+ segments.shift();
338
+ rootNamespace.shift();
339
+ }
340
+ return segments;
341
+ }
342
+ return [];
343
+ } else if (model.kind === "array" || model.kind === "dict") {
344
+ return getModelNamespaces(context, model.valueType);
345
+ } else if (model.kind === "nullable") {
346
+ return getModelNamespaces(context, model.type);
347
+ }
348
+ return [];
349
+ }
350
+
351
+ /**
352
+ * Checks if a model type appears as a nested property (directly or as an array element)
353
+ * inside any other XML model in the emit queue. XmlObject serializers/deserializers
354
+ * are only needed for models that are nested inside other models.
355
+ */
356
+ function isNestedInXmlModel(targetModel: SdkModelType): boolean {
357
+ for (const type of emitQueue) {
358
+ if (type.kind !== "model" || type === targetModel) {
359
+ continue;
360
+ }
361
+ if (!hasXmlSerialization(type)) {
362
+ continue;
363
+ }
364
+ // Check properties of this model and all ancestors
365
+ for (const property of getModelAndAncestorProperties(type)) {
366
+ const propType = property.type;
367
+ if (propType.kind === "model" && propType === targetModel) {
368
+ return true;
369
+ }
370
+ if (
371
+ propType.kind === "array" &&
372
+ propType.valueType.kind === "model" &&
373
+ propType.valueType === targetModel
374
+ ) {
375
+ return true;
376
+ }
377
+ }
378
+ }
379
+ return false;
380
+ }
381
+
382
+ /**
383
+ * Gets all properties from a model and its ancestors (base models).
384
+ */
385
+ function getModelAndAncestorProperties(type: SdkModelType): SdkModelPropertyType[] {
386
+ const properties: SdkModelPropertyType[] = [];
387
+ let current: SdkModelType | undefined = type;
388
+ while (current) {
389
+ for (const prop of current.properties) {
390
+ if (prop.kind === "property") {
391
+ properties.push(prop);
392
+ }
393
+ }
394
+ current = current.baseModel;
395
+ }
396
+ return properties;
397
+ }
398
+
399
+ function addSerializationFunctions(
400
+ context: SdkContext,
401
+ typeOrProperty: SdkType | SdkModelPropertyType,
402
+ sourceFile: SourceFile,
403
+ skipDiscriminatedUnionSuffix = false,
404
+ ) {
405
+ const options = {
406
+ nameOnly: false,
407
+ skipDiscriminatedUnionSuffix,
408
+ };
409
+
410
+ // Add JSON serializers
411
+ const serializationFunction =
412
+ typeOrProperty.kind === "property"
413
+ ? buildPropertySerializer(context, typeOrProperty, options)
414
+ : buildModelSerializer(context, typeOrProperty, options);
415
+
416
+ const serializerRefKey = refkey(typeOrProperty, "serializer");
417
+ const deserializerRefKey = refkey(typeOrProperty, "deserializer");
418
+ if (
419
+ serializationFunction &&
420
+ typeof serializationFunction !== "string" &&
421
+ serializationFunction.name
422
+ ) {
423
+ addDeclaration(sourceFile, serializationFunction, serializerRefKey);
424
+ }
425
+ const deserializationFunction =
426
+ typeOrProperty.kind === "property"
427
+ ? buildPropertyDeserializer(context, typeOrProperty, options)
428
+ : buildModelDeserializer(context, typeOrProperty, options);
429
+ if (
430
+ deserializationFunction &&
431
+ typeof deserializationFunction !== "string" &&
432
+ deserializationFunction.name
433
+ ) {
434
+ addDeclaration(sourceFile, deserializationFunction, deserializerRefKey);
435
+ }
436
+
437
+ // Add XML serializers if the type has XML serialization options
438
+ if (typeOrProperty.kind === "model" && hasXmlSerialization(typeOrProperty)) {
439
+ const xmlSerializerRefKey = refkey(typeOrProperty, "xmlSerializer");
440
+ const xmlDeserializerRefKey = refkey(typeOrProperty, "xmlDeserializer");
441
+
442
+ const xmlSerializationFunction = buildXmlModelSerializer(context, typeOrProperty, options);
443
+ if (
444
+ xmlSerializationFunction &&
445
+ typeof xmlSerializationFunction !== "string" &&
446
+ xmlSerializationFunction.name
447
+ ) {
448
+ addDeclaration(sourceFile, xmlSerializationFunction, xmlSerializerRefKey);
449
+ }
450
+
451
+ const xmlDeserializationFunction = buildXmlModelDeserializer(context, typeOrProperty, options);
452
+ if (
453
+ xmlDeserializationFunction &&
454
+ typeof xmlDeserializationFunction !== "string" &&
455
+ xmlDeserializationFunction.name
456
+ ) {
457
+ addDeclaration(sourceFile, xmlDeserializationFunction, xmlDeserializerRefKey);
458
+ }
459
+
460
+ // Only generate XML object serializer/deserializer for models that are
461
+ // actually nested as properties inside other XML models
462
+ if (isNestedInXmlModel(typeOrProperty)) {
463
+ const xmlObjectSerializerRefKey = refkey(typeOrProperty, "xmlObjectSerializer");
464
+ const xmlObjectDeserializerRefKey = refkey(typeOrProperty, "xmlObjectDeserializer");
465
+
466
+ const xmlObjectSerializationFunction = buildXmlObjectModelSerializer(
467
+ context,
468
+ typeOrProperty,
469
+ options,
470
+ );
471
+ if (
472
+ xmlObjectSerializationFunction &&
473
+ typeof xmlObjectSerializationFunction !== "string" &&
474
+ xmlObjectSerializationFunction.name
475
+ ) {
476
+ addDeclaration(sourceFile, xmlObjectSerializationFunction, xmlObjectSerializerRefKey);
477
+ }
478
+
479
+ const xmlObjectDeserializationFunction = buildXmlObjectModelDeserializer(
480
+ context,
481
+ typeOrProperty,
482
+ options,
483
+ );
484
+ if (
485
+ xmlObjectDeserializationFunction &&
486
+ typeof xmlObjectDeserializationFunction !== "string" &&
487
+ xmlObjectDeserializationFunction.name
488
+ ) {
489
+ addDeclaration(sourceFile, xmlObjectDeserializationFunction, xmlObjectDeserializerRefKey);
490
+ }
491
+ }
492
+ }
493
+ }
494
+
495
+ function buildUnionType(context: SdkContext, type: SdkUnionType): TypeAliasDeclarationStructure {
496
+ const unionDeclaration: TypeAliasDeclarationStructure = {
497
+ kind: StructureKind.TypeAlias,
498
+ name: normalizeModelName(context, type),
499
+ isExported: true,
500
+ type: type.variantTypes.map((v) => getTypeExpression(context, v)).join(" | "),
501
+ };
502
+
503
+ unionDeclaration.docs = [type.doc ?? `Alias for ${unionDeclaration.name}`];
504
+
505
+ return unionDeclaration;
506
+ }
507
+
508
+ function buildNullableType(context: SdkContext, type: SdkNullableType) {
509
+ const nullableDeclaration: TypeAliasDeclarationStructure = {
510
+ kind: StructureKind.TypeAlias,
511
+ name: normalizeModelName(context, type),
512
+ isExported: true,
513
+ type: getTypeExpression(context, type.type) + " | null",
514
+ };
515
+ nullableDeclaration.docs = [type.doc ?? `Alias for ${nullableDeclaration.name}`];
516
+ return nullableDeclaration;
517
+ }
518
+
519
+ export function buildEnumTypes(
520
+ context: SdkContext,
521
+ type: SdkEnumType,
522
+ reportMemberNameDiagnostic = false, // if reportMemberNameDiagnostic is true, it will report diagnostic for enum member name
523
+ ): [TypeAliasDeclarationStructure, EnumDeclarationStructure] {
524
+ const rawMembers = type.values.map((value) =>
525
+ emitEnumMember(context, value, reportMemberNameDiagnostic),
526
+ );
527
+ const enumDeclaration: EnumDeclarationStructure = {
528
+ kind: StructureKind.Enum,
529
+ name: `Known${normalizeModelName(context, type)}`,
530
+ isExported: true,
531
+ members: deduplicateEnumMemberNames(rawMembers),
532
+ };
533
+
534
+ const enumAsUnion: TypeAliasDeclarationStructure = {
535
+ kind: StructureKind.TypeAlias,
536
+ name: normalizeModelName(context, type),
537
+ isExported: true,
538
+ type: !isExtensibleEnum(context, type)
539
+ ? type.values.map((v) => getTypeExpression(context, v)).join(" | ")
540
+ : getTypeExpression(context, type.valueType),
541
+ };
542
+
543
+ const docs = type.doc ? type.doc : "Type of " + enumAsUnion.name;
544
+ enumAsUnion.docs =
545
+ isExtensibleEnum(context, type) && type.doc
546
+ ? [getExtensibleEnumDescription(context, type) ?? docs]
547
+ : [docs];
548
+ enumDeclaration.docs = type.doc
549
+ ? [type.doc]
550
+ : [`Known values of {@link ${type.name}} that the service accepts.`];
551
+
552
+ return [enumAsUnion, enumDeclaration];
553
+ }
554
+
555
+ function getExtensibleEnumDescription(context: SdkContext, model: SdkEnumType): string | undefined {
556
+ if (model.isFixed && model.name && model.values) {
557
+ return;
558
+ }
559
+ const valueDescriptions = model.values
560
+ .map((v) => `**${v.value}**${v.doc ? `: ${v.doc}` : ""}`)
561
+ .join(` \\\n`)
562
+ // Escape the character / to make sure we don't incorrectly announce a comment blocks /** */
563
+ .replace(/^\//g, "\\/")
564
+ .replace(/([^\\])(\/)/g, "$1\\/");
565
+ const enumLink = `{@link Known${normalizeModelName(context, model)}} can be used interchangeably with ${normalizeModelName(context, model)},\n this enum contains the known values that the service supports.`;
566
+
567
+ return [
568
+ `${model.doc} \\`,
569
+ enumLink,
570
+ `### Known values supported by the service`,
571
+ valueDescriptions,
572
+ ].join(" \n");
573
+ }
574
+
575
+ /**
576
+ * Deduplicates enum member names by appending a numeric suffix (_1, _2, ...)
577
+ * to all members that share the same normalized name.
578
+ * This handles cases where different values (e.g. "10" and "1.0") normalize
579
+ * to the same identifier.
580
+ */
581
+ function deduplicateEnumMemberNames(members: EnumMemberStructure[]): EnumMemberStructure[] {
582
+ const nameCount = new Map<string, number>();
583
+ for (const member of members) {
584
+ const name = member.name as string;
585
+ nameCount.set(name, (nameCount.get(name) ?? 0) + 1);
586
+ }
587
+ const nameCurrentIndex = new Map<string, number>();
588
+ return members.map((member) => {
589
+ const name = member.name as string;
590
+ if ((nameCount.get(name) ?? 0) > 1) {
591
+ const index = (nameCurrentIndex.get(name) ?? 0) + 1;
592
+ nameCurrentIndex.set(name, index);
593
+ return { ...member, name: `${name}_${index}` };
594
+ }
595
+ return member;
596
+ });
597
+ }
598
+
599
+ function emitEnumMember(
600
+ context: SdkContext,
601
+ member: SdkEnumValueType,
602
+ reportMemberNameDiagnostic = false, // if reportMemberNameDiagnostic is true, it will report diagnostic for enum member name
603
+ ): EnumMemberStructure {
604
+ const shouldNormalizeName = !member.name.startsWith("$DO_NOT_NORMALIZE$");
605
+ const enumTypeName = normalizeName(member.enumType.name, NameType.Interface, true);
606
+ let normalizedMemberName = context.rlcOptions?.ignoreEnumMemberNameNormalize
607
+ ? fixLeadingNumber(member.name, NameType.EnumMemberName) // need to fix the leading number also for enum member
608
+ : normalizeName(member.name, NameType.EnumMemberName, true);
609
+ // If the member name starts with _ due to a leading digit (not because the original has _),
610
+ // replace the _ prefix with either "V" (for API version enums) or the enum type name.
611
+ if (
612
+ shouldNormalizeName &&
613
+ normalizedMemberName.toLowerCase().startsWith("_") &&
614
+ !member.name.toLowerCase().startsWith("_")
615
+ ) {
616
+ const isApiVersionEnum =
617
+ (member.enumType.usage & UsageFlags.ApiVersionEnum) === UsageFlags.ApiVersionEnum;
618
+ const prefix = isApiVersionEnum ? "V" : enumTypeName;
619
+ normalizedMemberName = prefix + normalizedMemberName.slice(1);
620
+ if (reportMemberNameDiagnostic) {
621
+ reportDiagnostic(context.program, {
622
+ code: "prefix-adding-in-enum-member",
623
+ format: {
624
+ memberName: member.name,
625
+ normalizedName: normalizedMemberName,
626
+ enumTypeName,
627
+ },
628
+ target: NoTarget,
629
+ });
630
+ }
631
+ }
632
+ const memberStructure: EnumMemberStructure = {
633
+ kind: StructureKind.EnumMember,
634
+ name: normalizedMemberName,
635
+ value: member.value,
636
+ };
637
+
638
+ if (member.doc) {
639
+ memberStructure.docs = [member.doc];
640
+ } else {
641
+ // Provide default documentation using the enum value when no explicit doc exists
642
+ memberStructure.docs = [String(member.value)];
643
+ }
644
+
645
+ return memberStructure;
646
+ }
647
+
648
+ function buildModelInterface(
649
+ context: SdkContext,
650
+ type: SdkModelType,
651
+ ): InterfaceDeclarationStructure {
652
+ const flattenPropertySet = new Set<SdkModelPropertyType>();
653
+ // For non-input models (output-only, exception, etc.), filter out metadata
654
+ // properties (@header, @query, @path) since they are deserialized separately.
655
+ // For input models, keep metadata properties — users need to pass them.
656
+ const hasInputUsage = (type.usage & UsageFlags.Input) === UsageFlags.Input;
657
+ const interfaceStructure = {
658
+ kind: StructureKind.Interface,
659
+ name: normalizeModelName(context, type, NameType.Interface, true),
660
+ isExported: true,
661
+ properties: type.properties
662
+ .filter((p) => {
663
+ if (!hasInputUsage && p.__raw && isMetadata(context.program, p.__raw)) {
664
+ return false;
665
+ }
666
+ // Skip required metadata properties with Read-only visibility for ARM as they are not intended to be in the model
667
+ // These properties are not be generated no matter they are in input or output models in most cases in HLC
668
+ // Only skip properties that have exclusively Read visibility to avoid stripping @path properties
669
+ // on parameter bag models that also carry other visibility flags (e.g. Create/Update)
670
+ if (
671
+ context.arm &&
672
+ p.__raw &&
673
+ isMetadata(context.program, p.__raw) &&
674
+ p.visibility?.length === 1 &&
675
+ p.visibility?.includes(Visibility.Read)
676
+ ) {
677
+ return false;
678
+ }
679
+ // filter out the flatten property to be processed later
680
+ if (p.flatten && p.type.kind === "model") {
681
+ flattenPropertySet.add(p);
682
+ return false;
683
+ }
684
+ return true;
685
+ })
686
+ .map((p) => {
687
+ return buildModelProperty(context, p, type);
688
+ }),
689
+ } as InterfaceStructure;
690
+ for (const flatten of flattenPropertySet.keys()) {
691
+ const conflictMap = useContext("sdkTypes").flattenProperties.get(flatten)?.conflictMap;
692
+ const allProperties = getAllProperties(context, flatten.type, getAllAncestors(flatten.type));
693
+ interfaceStructure.properties!.push(
694
+ ...allProperties.map((p) => {
695
+ // when the flattened property is optional, all its child properties should be optional too
696
+ const property = getPropertyWithOverrides(p, {
697
+ allOptional: flatten.optional,
698
+ propertyRenames: conflictMap,
699
+ });
700
+ return buildModelProperty(context, property, type);
701
+ }),
702
+ );
703
+ }
704
+
705
+ // Add properties from @clientOption("header", ...) that don't already exist in the model
706
+ const headerOptions = getHeaderClientOptions(type);
707
+ if (headerOptions.length > 0) {
708
+ const existingNames = new Set(
709
+ interfaceStructure.properties!.map((p: OptionalKind<PropertySignatureStructure>) => p.name),
710
+ );
711
+ for (const opt of headerOptions) {
712
+ if (!existingNames.has(opt.propertyName)) {
713
+ interfaceStructure.properties!.push({
714
+ kind: StructureKind.PropertySignature,
715
+ name: opt.propertyName,
716
+ type: "string",
717
+ hasQuestionToken: true,
718
+ });
719
+ }
720
+ }
721
+ }
722
+
723
+ if (type.baseModel) {
724
+ const parentReference = getModelExpression(context, type.baseModel, {
725
+ skipPolymorphicUnion: true,
726
+ });
727
+ interfaceStructure.extends = [parentReference];
728
+ }
729
+
730
+ if (type.additionalProperties) {
731
+ addExtendedDictInfo(context, type, interfaceStructure);
732
+ }
733
+
734
+ interfaceStructure.docs = [type.doc ?? "model interface " + interfaceStructure.name];
735
+
736
+ return interfaceStructure;
737
+ }
738
+
739
+ function addExtendedDictInfo(
740
+ context: SdkContext,
741
+ model: SdkModelType,
742
+ modelInterface: InterfaceStructure,
743
+ ) {
744
+ const additionalPropertiesType = model.additionalProperties
745
+ ? getTypeExpression(context, model.additionalProperties)
746
+ : undefined;
747
+ if (context.rlcOptions?.compatibilityMode) {
748
+ const ancestors = getAllAncestors(model);
749
+ const properties = getAllProperties(context, model, ancestors);
750
+ let anyType: boolean;
751
+ if (!additionalPropertiesType) {
752
+ // case 1: if additionalProperties is not defined, we should use any type
753
+ anyType = true;
754
+ } else if (properties.length === 0) {
755
+ // case 2: if additionalProperties is defined and model.properties is empty, we should use additionalProperties type
756
+ anyType = false;
757
+ } else {
758
+ // case 3: if additionalProperties is defined and model.properties is not empty, we should check if all properties are compatible with additionalProperties type
759
+ anyType = !properties.every((p) => {
760
+ return additionalPropertiesType?.includes(getTypeExpression(context, p.type));
761
+ });
762
+ }
763
+ if (!modelInterface.extends) {
764
+ modelInterface.extends = [];
765
+ }
766
+ modelInterface.extends.push(`Record<string, ${anyType ? "any" : additionalPropertiesType}>`);
767
+ } else {
768
+ const additionalPropertiesType = model.additionalProperties
769
+ ? getTypeExpression(context, model.additionalProperties)
770
+ : undefined;
771
+ const name = getAdditionalPropertiesName(context, model);
772
+ if (name !== "additionalProperties") {
773
+ // report diagnostic for additionalProperties
774
+ reportDiagnostic(context.program, {
775
+ code: "property-name-conflict",
776
+ format: {
777
+ propertyName: "additionalProperties",
778
+ },
779
+ target: NoTarget,
780
+ });
781
+ }
782
+ if (!modelInterface.properties) {
783
+ modelInterface.properties = [];
784
+ }
785
+ modelInterface.properties.push({
786
+ name,
787
+ docs: ["Additional properties"],
788
+ hasQuestionToken: true,
789
+ isReadonly: false,
790
+ type: `Record<string, ${additionalPropertiesType ?? "any"}>`,
791
+ });
792
+ }
793
+ }
794
+
795
+ export function getAdditionalPropertiesName(context: SdkContext, model: SdkModelType): string {
796
+ const ancestors = getAllAncestors(model);
797
+ const properties = getAllProperties(context, model, ancestors);
798
+ const nameConflict = properties.find((p) => p.name === "additionalProperties");
799
+ return nameConflict ? "additionalPropertiesBag" : "additionalProperties";
800
+ }
801
+
802
+ export function normalizeModelName(
803
+ context: SdkContext,
804
+ type:
805
+ | SdkModelType
806
+ | SdkEnumType
807
+ | SdkUnionType
808
+ | SdkArrayType
809
+ | SdkDictionaryType
810
+ | SdkNullableType,
811
+ nameType: NameType = NameType.Interface,
812
+ skipPolymorphicUnionSuffix = false,
813
+ rawModelName?: boolean,
814
+ ): string {
815
+ if (type.kind === "array") {
816
+ if (rawModelName) {
817
+ return `${normalizeModelName(context, type.valueType as any, nameType, skipPolymorphicUnionSuffix, rawModelName)}Array`;
818
+ }
819
+ return `Array<${normalizeModelName(context, type.valueType as any, nameType)}>`;
820
+ } else if (type.kind === "dict") {
821
+ if (rawModelName) {
822
+ return `${normalizeModelName(context, type.valueType as any, nameType, skipPolymorphicUnionSuffix, rawModelName)}Record`;
823
+ }
824
+ return `Record<string, ${normalizeModelName(context, type.valueType as any, nameType)}>`;
825
+ }
826
+ if (
827
+ type.kind !== "model" &&
828
+ type.kind !== "enum" &&
829
+ type.kind !== "union" &&
830
+ type.kind !== "nullable"
831
+ ) {
832
+ return getTypeExpression(context, type);
833
+ }
834
+
835
+ const segments = getModelNamespaces(context, type);
836
+ let unionSuffix = "";
837
+ if (!skipPolymorphicUnionSuffix) {
838
+ if (type.kind === "model" && isDiscriminatedUnion(type)) {
839
+ unionSuffix = "Union";
840
+ }
841
+ }
842
+ const namespacePrefix = context.rlcOptions?.enableModelNamespace ? segments.join("") : "";
843
+ const internalModelPrefix =
844
+ (isPagedResultModel(context, type) && !pagedModelsUsedInNonPagingOps.has(type)) ||
845
+ type.isGeneratedName
846
+ ? "_"
847
+ : "";
848
+ return `${internalModelPrefix}${normalizeName(namespacePrefix + type.name, nameType, true)}${unionSuffix}`;
849
+ }
850
+
851
+ function buildModelPolymorphicType(context: SdkContext, type: SdkModelType) {
852
+ // Only include direct subtypes in this union
853
+ const directSubtypes = getDirectSubtypes(type);
854
+ if (directSubtypes.length === 0) {
855
+ return undefined;
856
+ }
857
+ const typeDeclaration: TypeAliasDeclarationStructure = {
858
+ kind: StructureKind.TypeAlias,
859
+ name: `${normalizeModelName(context, type, NameType.Interface, true)}Union`,
860
+ isExported: true,
861
+ type: directSubtypes
862
+ .filter((p) => {
863
+ return (
864
+ p.usage !== undefined &&
865
+ ((p.usage & UsageFlags.Output) === UsageFlags.Output ||
866
+ (p.usage & UsageFlags.Input) === UsageFlags.Input)
867
+ );
868
+ })
869
+ .map((t) => getTypeExpression(context, t))
870
+ .join(" | "),
871
+ };
872
+ typeDeclaration.docs = [`Alias for ${typeDeclaration.name}`];
873
+
874
+ typeDeclaration.type += ` | ${getModelExpression(context, type, {
875
+ skipPolymorphicUnion: true,
876
+ })}`;
877
+ return typeDeclaration;
878
+ }
879
+
880
+ function buildModelProperty(
881
+ context: SdkContext,
882
+ property: SdkModelPropertyType,
883
+ model: SdkModelType,
884
+ ): PropertySignatureStructure {
885
+ const normalizedPropName = normalizeModelPropertyName(context, property);
886
+ if (
887
+ !context.rlcOptions?.ignorePropertyNameNormalize &&
888
+ normalizedPropName !== `"${property.name}"`
889
+ ) {
890
+ reportDiagnostic(context.program, {
891
+ code: "property-name-normalized",
892
+ format: {
893
+ propertyName: property.name,
894
+ normalizedName: normalizedPropName,
895
+ },
896
+ target: NoTarget,
897
+ });
898
+ }
899
+
900
+ let typeExpression: string;
901
+ const allDiscriminatorValues = getAllDiscriminatedValues(model, property);
902
+
903
+ // We need refine the discriminator property if
904
+ // 1. it is discriminated union
905
+ // 2. it has other discriminator values except itself
906
+ if (isDiscriminatedUnion(model) && allDiscriminatorValues.length > 1) {
907
+ typeExpression = allDiscriminatorValues.map((value) => `"${value}"`).join(" | ");
908
+ } else if (property.kind === "property" && property.serializationOptions.multipart?.isFilePart) {
909
+ typeExpression = getMultipartFileTypeExpression(context, property);
910
+ } else {
911
+ typeExpression = getTypeExpression(context, property.type, {
912
+ isOptional: property.optional,
913
+ });
914
+ }
915
+
916
+ const propertyStructure: PropertySignatureStructure = {
917
+ kind: StructureKind.PropertySignature,
918
+ name: normalizedPropName,
919
+ type: typeExpression,
920
+ hasQuestionToken: property.optional,
921
+ isReadonly: isReadOnly(property as SdkModelPropertyType),
922
+ };
923
+
924
+ if (property.doc) {
925
+ propertyStructure.docs = [property.doc];
926
+ }
927
+
928
+ return propertyStructure;
929
+ }
930
+
931
+ export function visitPackageTypes(context: SdkContext) {
932
+ const { sdkPackage } = context;
933
+ emitQueue.clear();
934
+ flattenPropertyModelMap.clear();
935
+ pagedModelsUsedInNonPagingOps.clear();
936
+ // Add all models in the package to the emit queue
937
+ for (const model of sdkPackage.models) {
938
+ visitType(context, model);
939
+ }
940
+
941
+ for (const union of sdkPackage.unions) {
942
+ visitType(context, union);
943
+ }
944
+ // Add all enums to the queue
945
+ for (const enumType of sdkPackage.enums) {
946
+ if (!emitQueue.has(enumType)) {
947
+ emitQueue.add(enumType);
948
+ }
949
+ }
950
+
951
+ // Visit the clients to discover all models
952
+ for (const client of sdkPackage.clients) {
953
+ visitClient(context, client);
954
+ }
955
+ }
956
+
957
+ function visitClient(context: SdkContext, client: SdkClientType<SdkServiceOperation>) {
958
+ // TODO: include the client parameters
959
+ // https://github.com/Azure/autorest.typescript/issues/3148
960
+ // Comment this out for now, as client initialization is not used in the generated code
961
+ getAllOperationsFromClient(client).forEach((method) => visitClientMethod(context, method));
962
+ }
963
+
964
+ function visitClientMethod(context: SdkContext, method: SdkMethod<SdkHttpOperation>) {
965
+ switch (method.kind) {
966
+ case "lro":
967
+ case "paging":
968
+ case "lropaging":
969
+ case "basic":
970
+ visitMethod(context, method);
971
+ visitOperation(context, method.operation);
972
+ break;
973
+ default:
974
+ reportDiagnostic(context.program, {
975
+ code: "unknown-sdk-method-kind",
976
+ format: {
977
+ methodKind: (method as any).kind,
978
+ },
979
+ target: NoTarget,
980
+ });
981
+ return; // Skip processing this method but continue with others
982
+ }
983
+ }
984
+
985
+ function visitOperation(context: SdkContext, operation: SdkHttpOperation) {
986
+ // Visit the request
987
+ visitType(context, operation.bodyParam?.type);
988
+ // Visit the response
989
+ operation.exceptions.forEach((exception) => visitType(context, exception.type));
990
+
991
+ operation.parameters.forEach((parameter) => {
992
+ visitType(context, parameter.type);
993
+ });
994
+
995
+ operation.responses.forEach((response) => visitType(context, response.type));
996
+ }
997
+
998
+ function visitMethod(context: SdkContext, method: SdkServiceMethod<SdkHttpOperation>) {
999
+ // Visit the request
1000
+ method.parameters.forEach((parameter) => {
1001
+ visitType(context, parameter.type);
1002
+ });
1003
+ visitType(context, method.response.type);
1004
+ trackPagedModelInNonPagingMethod(context, method);
1005
+ }
1006
+
1007
+ /**
1008
+ * If a non-paging method's direct response type is a paged result model,
1009
+ * mark it so that normalizeModelName keeps it public (no "_" prefix).
1010
+ */
1011
+ function trackPagedModelInNonPagingMethod(
1012
+ context: SdkContext,
1013
+ method: SdkServiceMethod<SdkHttpOperation>,
1014
+ ): void {
1015
+ if (method.kind !== "basic" && method.kind !== "lro") return;
1016
+ const respType = method.response.type;
1017
+ if (respType && isPagedResultModel(context, respType)) {
1018
+ pagedModelsUsedInNonPagingOps.add(respType);
1019
+ }
1020
+ }
1021
+
1022
+ function visitType(context: SdkContext, type: SdkType | undefined) {
1023
+ if (!type) {
1024
+ return;
1025
+ }
1026
+
1027
+ if (emitQueue.has(type)) {
1028
+ return;
1029
+ }
1030
+ emitQueue.add(type);
1031
+ if (type.kind === "model") {
1032
+ const externalModel = getExternalModel(type);
1033
+ if (externalModel) {
1034
+ return;
1035
+ }
1036
+
1037
+ if (type.additionalProperties) {
1038
+ visitType(context, type.additionalProperties);
1039
+ }
1040
+ for (const property of type.properties) {
1041
+ if (!emitQueue.has(property.type)) {
1042
+ visitType(context, property.type);
1043
+ }
1044
+ if (property.flatten && property.type.kind === "model") {
1045
+ flattenPropertyModelMap.set(property, type);
1046
+ }
1047
+ }
1048
+ if (type.discriminatedSubtypes) {
1049
+ for (const subType of Object.values(type.discriminatedSubtypes)) {
1050
+ if (!emitQueue.has(subType)) {
1051
+ visitType(context, subType);
1052
+ }
1053
+ }
1054
+ }
1055
+ }
1056
+ if (type.kind === "array") {
1057
+ if (!emitQueue.has(type.valueType)) {
1058
+ visitType(context, type.valueType);
1059
+ }
1060
+ }
1061
+ if (type.kind === "dict") {
1062
+ if (!emitQueue.has(type.valueType)) {
1063
+ visitType(context, type.valueType);
1064
+ }
1065
+ }
1066
+ if (type.kind === "union") {
1067
+ emitQueue.add(type);
1068
+ for (const value of type.variantTypes) {
1069
+ if (!emitQueue.has(value)) {
1070
+ visitType(context, value);
1071
+ }
1072
+ }
1073
+ }
1074
+ if (type.kind === "nullable") {
1075
+ emitQueue.add(type);
1076
+ if (!emitQueue.has(type.type)) {
1077
+ visitType(context, type.type);
1078
+ }
1079
+ }
1080
+ }