@azure-tools/typespec-ts 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/src/index.d.ts.map +1 -1
  3. package/dist/src/index.js +37 -1
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/modelUtils.d.ts +2 -0
  6. package/dist/src/modelUtils.d.ts.map +1 -1
  7. package/dist/src/modelUtils.js +82 -13
  8. package/dist/src/modelUtils.js.map +1 -1
  9. package/dist/src/modular/buildApiIndex.d.ts.map +1 -1
  10. package/dist/src/modular/buildApiIndex.js +1 -1
  11. package/dist/src/modular/buildApiIndex.js.map +1 -1
  12. package/dist/src/modular/buildClassicalClient.d.ts.map +1 -1
  13. package/dist/src/modular/buildClassicalClient.js +6 -6
  14. package/dist/src/modular/buildClassicalClient.js.map +1 -1
  15. package/dist/src/modular/buildClientContext.d.ts.map +1 -1
  16. package/dist/src/modular/buildClientContext.js +9 -3
  17. package/dist/src/modular/buildClientContext.js.map +1 -1
  18. package/dist/src/modular/buildCodeModel.d.ts.map +1 -1
  19. package/dist/src/modular/buildCodeModel.js +190 -169
  20. package/dist/src/modular/buildCodeModel.js.map +1 -1
  21. package/dist/src/modular/buildOperations.d.ts.map +1 -1
  22. package/dist/src/modular/buildOperations.js +20 -2
  23. package/dist/src/modular/buildOperations.js.map +1 -1
  24. package/dist/src/modular/buildRootIndex.js +2 -2
  25. package/dist/src/modular/buildRootIndex.js.map +1 -1
  26. package/dist/src/modular/buildSharedTypes.d.ts.map +1 -1
  27. package/dist/src/modular/buildSharedTypes.js +8 -10
  28. package/dist/src/modular/buildSharedTypes.js.map +1 -1
  29. package/dist/src/modular/emitModels.d.ts.map +1 -1
  30. package/dist/src/modular/emitModels.js +19 -6
  31. package/dist/src/modular/emitModels.js.map +1 -1
  32. package/dist/src/modular/helpers/clientHelpers.d.ts.map +1 -1
  33. package/dist/src/modular/helpers/clientHelpers.js +2 -11
  34. package/dist/src/modular/helpers/clientHelpers.js.map +1 -1
  35. package/dist/src/modular/helpers/credentialHelpers.js +1 -1
  36. package/dist/src/modular/helpers/credentialHelpers.js.map +1 -1
  37. package/dist/src/modular/helpers/fixmeHelpers.d.ts +2 -0
  38. package/dist/src/modular/helpers/fixmeHelpers.d.ts.map +1 -0
  39. package/dist/src/modular/helpers/fixmeHelpers.js +4 -0
  40. package/dist/src/modular/helpers/fixmeHelpers.js.map +1 -0
  41. package/dist/src/modular/helpers/namingHelpers.d.ts +19 -1
  42. package/dist/src/modular/helpers/namingHelpers.d.ts.map +1 -1
  43. package/dist/src/modular/helpers/namingHelpers.js +99 -0
  44. package/dist/src/modular/helpers/namingHelpers.js.map +1 -1
  45. package/dist/src/modular/helpers/operationHelpers.d.ts +2 -0
  46. package/dist/src/modular/helpers/operationHelpers.d.ts.map +1 -1
  47. package/dist/src/modular/helpers/operationHelpers.js +117 -35
  48. package/dist/src/modular/helpers/operationHelpers.js.map +1 -1
  49. package/dist/src/modular/helpers/parameterHelpers.js +1 -1
  50. package/dist/src/modular/helpers/parameterHelpers.js.map +1 -1
  51. package/dist/src/modular/helpers/typeHelpers.d.ts.map +1 -1
  52. package/dist/src/modular/helpers/typeHelpers.js +31 -12
  53. package/dist/src/modular/helpers/typeHelpers.js.map +1 -1
  54. package/dist/src/modular/modularCodeModel.d.ts +2 -1
  55. package/dist/src/modular/modularCodeModel.d.ts.map +1 -1
  56. package/dist/src/operationUtil.d.ts +1 -1
  57. package/dist/src/operationUtil.d.ts.map +1 -1
  58. package/dist/src/operationUtil.js +21 -3
  59. package/dist/src/operationUtil.js.map +1 -1
  60. package/dist/src/transform/transform.d.ts.map +1 -1
  61. package/dist/src/transform/transform.js +2 -2
  62. package/dist/src/transform/transform.js.map +1 -1
  63. package/dist/src/transform/transformApiVersionInfo.js +9 -0
  64. package/dist/src/transform/transformApiVersionInfo.js.map +1 -1
  65. package/dist/src/transform/transformHelperFunctionDetails.d.ts.map +1 -1
  66. package/dist/src/transform/transformHelperFunctionDetails.js +18 -0
  67. package/dist/src/transform/transformHelperFunctionDetails.js.map +1 -1
  68. package/dist/src/transform/transformParameters.d.ts.map +1 -1
  69. package/dist/src/transform/transformParameters.js +27 -34
  70. package/dist/src/transform/transformParameters.js.map +1 -1
  71. package/dist/src/transform/transformPaths.d.ts.map +1 -1
  72. package/dist/src/transform/transformPaths.js +9 -0
  73. package/dist/src/transform/transformPaths.js.map +1 -1
  74. package/dist/src/transform/transformResponses.d.ts.map +1 -1
  75. package/dist/src/transform/transformResponses.js +10 -1
  76. package/dist/src/transform/transformResponses.js.map +1 -1
  77. package/dist/src/transform/transformSchemas.d.ts.map +1 -1
  78. package/dist/src/transform/transformSchemas.js +9 -0
  79. package/dist/src/transform/transformSchemas.js.map +1 -1
  80. package/dist/tsconfig.tsbuildinfo +1 -1
  81. package/package.json +14 -7
  82. package/src/index.ts +47 -2
  83. package/src/modelUtils.ts +90 -15
  84. package/src/modular/buildApiIndex.ts +3 -1
  85. package/src/modular/buildClassicalClient.ts +8 -6
  86. package/src/modular/buildClientContext.ts +11 -3
  87. package/src/modular/buildCodeModel.ts +221 -196
  88. package/src/modular/buildOperations.ts +23 -1
  89. package/src/modular/buildRootIndex.ts +2 -2
  90. package/src/modular/buildSharedTypes.ts +8 -10
  91. package/src/modular/emitModels.ts +14 -0
  92. package/src/modular/helpers/clientHelpers.ts +3 -13
  93. package/src/modular/helpers/credentialHelpers.ts +1 -1
  94. package/src/modular/helpers/fixmeHelpers.ts +3 -0
  95. package/src/modular/helpers/namingHelpers.ts +121 -1
  96. package/src/modular/helpers/operationHelpers.ts +173 -66
  97. package/src/modular/helpers/parameterHelpers.ts +1 -1
  98. package/src/modular/helpers/typeHelpers.ts +33 -12
  99. package/src/modular/modularCodeModel.ts +3 -1
  100. package/src/operationUtil.ts +24 -3
  101. package/src/transform/transform.ts +4 -1
  102. package/src/transform/transformApiVersionInfo.ts +8 -0
  103. package/src/transform/transformHelperFunctionDetails.ts +16 -0
  104. package/src/transform/transformParameters.ts +42 -40
  105. package/src/transform/transformPaths.ts +8 -0
  106. package/src/transform/transformResponses.ts +9 -1
  107. package/src/transform/transformSchemas.ts +8 -0
  108. package/.eslintrc.json +0 -23
  109. package/.prettierignore +0 -1
  110. package/.prettierrc +0 -7
  111. package/.rush/temp/operation/build/all.log +0 -1
  112. package/.rush/temp/operation/build/state.json +0 -3
  113. package/.rush/temp/package-deps_build.json +0 -442
  114. package/.rush/temp/shrinkwrap-deps.json +0 -490
  115. package/CONTRIBUTING.md +0 -137
  116. package/test/commands/cadl-ranch-list.ts +0 -116
  117. package/test/commands/check-clean-tree.ts +0 -55
  118. package/test/commands/childProcessOnExit.ts +0 -16
  119. package/test/commands/gen-cadl-ranch.ts +0 -25
  120. package/test/commands/run.ts +0 -31
  121. package/test/integration/arrayItemTypes.spec.ts +0 -96
  122. package/test/integration/authApiKey.spec.ts +0 -38
  123. package/test/integration/authOauth2.spec.ts +0 -65
  124. package/test/integration/authUnion.spec.ts +0 -72
  125. package/test/integration/azurecore.spec.ts +0 -170
  126. package/test/integration/collectionFormat.spec.ts +0 -118
  127. package/test/integration/dictionary.spec.ts +0 -106
  128. package/test/integration/extensibleEnums.spec.ts +0 -61
  129. package/test/integration/fixedEnums.spec.ts +0 -52
  130. package/test/integration/generated/arrays/itemTypes/src/arrayItemTypesClient.ts +0 -35
  131. package/test/integration/generated/arrays/itemTypes/src/clientDefinitions.ts +0 -165
  132. package/test/integration/generated/arrays/itemTypes/src/index.ts +0 -13
  133. package/test/integration/generated/arrays/itemTypes/src/logger.ts +0 -5
  134. package/test/integration/generated/arrays/itemTypes/src/models.ts +0 -9
  135. package/test/integration/generated/arrays/itemTypes/src/outputModels.ts +0 -9
  136. package/test/integration/generated/arrays/itemTypes/src/parameters.ts +0 -86
  137. package/test/integration/generated/arrays/itemTypes/src/responses.ts +0 -115
  138. package/test/integration/generated/arrays/itemTypes/tspconfig.yaml +0 -15
  139. package/test/integration/generated/authentication/apiKey/.eslintrc.json +0 -11
  140. package/test/integration/generated/authentication/apiKey/README.md +0 -56
  141. package/test/integration/generated/authentication/apiKey/api-extractor.json +0 -18
  142. package/test/integration/generated/authentication/apiKey/karma.conf.js +0 -133
  143. package/test/integration/generated/authentication/apiKey/package.json +0 -103
  144. package/test/integration/generated/authentication/apiKey/rollup.config.js +0 -118
  145. package/test/integration/generated/authentication/apiKey/src/authApiKeyClient.ts +0 -45
  146. package/test/integration/generated/authentication/apiKey/src/clientDefinitions.ts +0 -33
  147. package/test/integration/generated/authentication/apiKey/src/index.ts +0 -12
  148. package/test/integration/generated/authentication/apiKey/src/logger.ts +0 -5
  149. package/test/integration/generated/authentication/apiKey/src/outputModels.ts +0 -6
  150. package/test/integration/generated/authentication/apiKey/src/parameters.ts +0 -7
  151. package/test/integration/generated/authentication/apiKey/src/responses.ts +0 -21
  152. package/test/integration/generated/authentication/apiKey/test/public/sampleTest.spec.ts +0 -23
  153. package/test/integration/generated/authentication/apiKey/test/public/utils/env.browser.ts +0 -2
  154. package/test/integration/generated/authentication/apiKey/test/public/utils/env.ts +0 -6
  155. package/test/integration/generated/authentication/apiKey/test/public/utils/recordedClient.ts +0 -29
  156. package/test/integration/generated/authentication/apiKey/tsconfig.json +0 -25
  157. package/test/integration/generated/authentication/apiKey/tspconfig.yaml +0 -13
  158. package/test/integration/generated/authentication/oauth2/karma.conf.js +0 -133
  159. package/test/integration/generated/authentication/oauth2/src/authOauth2Client.ts +0 -45
  160. package/test/integration/generated/authentication/oauth2/src/clientDefinitions.ts +0 -33
  161. package/test/integration/generated/authentication/oauth2/src/index.ts +0 -12
  162. package/test/integration/generated/authentication/oauth2/src/logger.ts +0 -5
  163. package/test/integration/generated/authentication/oauth2/src/outputModels.ts +0 -6
  164. package/test/integration/generated/authentication/oauth2/src/parameters.ts +0 -7
  165. package/test/integration/generated/authentication/oauth2/src/responses.ts +0 -21
  166. package/test/integration/generated/authentication/oauth2/test/public/sampleTest.spec.ts +0 -23
  167. package/test/integration/generated/authentication/oauth2/test/public/utils/env.browser.ts +0 -2
  168. package/test/integration/generated/authentication/oauth2/test/public/utils/env.ts +0 -6
  169. package/test/integration/generated/authentication/oauth2/test/public/utils/recordedClient.ts +0 -29
  170. package/test/integration/generated/authentication/oauth2/tspconfig.yaml +0 -15
  171. package/test/integration/generated/authentication/union/karma.conf.js +0 -133
  172. package/test/integration/generated/authentication/union/src/authUnionClient.ts +0 -46
  173. package/test/integration/generated/authentication/union/src/clientDefinitions.ts +0 -27
  174. package/test/integration/generated/authentication/union/src/index.ts +0 -11
  175. package/test/integration/generated/authentication/union/src/logger.ts +0 -5
  176. package/test/integration/generated/authentication/union/src/parameters.ts +0 -7
  177. package/test/integration/generated/authentication/union/src/responses.ts +0 -14
  178. package/test/integration/generated/authentication/union/test/public/sampleTest.spec.ts +0 -23
  179. package/test/integration/generated/authentication/union/test/public/utils/env.browser.ts +0 -2
  180. package/test/integration/generated/authentication/union/test/public/utils/env.ts +0 -6
  181. package/test/integration/generated/authentication/union/test/public/utils/recordedClient.ts +0 -29
  182. package/test/integration/generated/authentication/union/tspconfig.yaml +0 -15
  183. package/test/integration/generated/azure/core/.eslintrc.json +0 -11
  184. package/test/integration/generated/azure/core/README.md +0 -56
  185. package/test/integration/generated/azure/core/api-extractor.json +0 -18
  186. package/test/integration/generated/azure/core/package.json +0 -81
  187. package/test/integration/generated/azure/core/rollup.config.js +0 -118
  188. package/test/integration/generated/azure/core/src/azureCoreClient.ts +0 -35
  189. package/test/integration/generated/azure/core/src/clientDefinitions.ts +0 -108
  190. package/test/integration/generated/azure/core/src/index.ts +0 -16
  191. package/test/integration/generated/azure/core/src/isUnexpected.ts +0 -178
  192. package/test/integration/generated/azure/core/src/logger.ts +0 -5
  193. package/test/integration/generated/azure/core/src/models.ts +0 -18
  194. package/test/integration/generated/azure/core/src/outputModels.ts +0 -38
  195. package/test/integration/generated/azure/core/src/paginateHelper.ts +0 -204
  196. package/test/integration/generated/azure/core/src/parameters.ts +0 -68
  197. package/test/integration/generated/azure/core/src/responses.ts +0 -158
  198. package/test/integration/generated/azure/core/src/serializeHelper.ts +0 -16
  199. package/test/integration/generated/azure/core/tsconfig.json +0 -25
  200. package/test/integration/generated/azure/core/tspconfig.yaml +0 -15
  201. package/test/integration/generated/azure/core-traits/.eslintrc.json +0 -11
  202. package/test/integration/generated/azure/core-traits/README.md +0 -56
  203. package/test/integration/generated/azure/core-traits/api-extractor.json +0 -18
  204. package/test/integration/generated/azure/core-traits/package.json +0 -80
  205. package/test/integration/generated/azure/core-traits/rollup.config.js +0 -118
  206. package/test/integration/generated/azure/core-traits/src/azureCoreTraitsClient.ts +0 -35
  207. package/test/integration/generated/azure/core-traits/src/clientDefinitions.ts +0 -22
  208. package/test/integration/generated/azure/core-traits/src/index.ts +0 -13
  209. package/test/integration/generated/azure/core-traits/src/isUnexpected.ts +0 -97
  210. package/test/integration/generated/azure/core-traits/src/logger.ts +0 -5
  211. package/test/integration/generated/azure/core-traits/src/outputModels.ts +0 -25
  212. package/test/integration/generated/azure/core-traits/src/parameters.ts +0 -26
  213. package/test/integration/generated/azure/core-traits/src/responses.ts +0 -32
  214. package/test/integration/generated/azure/core-traits/tsconfig.json +0 -25
  215. package/test/integration/generated/azure/core-traits/tspconfig.yaml +0 -15
  216. package/test/integration/generated/dictionary/.eslintrc.json +0 -11
  217. package/test/integration/generated/dictionary/README.md +0 -56
  218. package/test/integration/generated/dictionary/api-extractor.json +0 -18
  219. package/test/integration/generated/dictionary/package.json +0 -80
  220. package/test/integration/generated/dictionary/rollup.config.js +0 -118
  221. package/test/integration/generated/dictionary/src/clientDefinitions.ts +0 -180
  222. package/test/integration/generated/dictionary/src/dictClient.ts +0 -33
  223. package/test/integration/generated/dictionary/src/index.ts +0 -13
  224. package/test/integration/generated/dictionary/src/logger.ts +0 -5
  225. package/test/integration/generated/dictionary/src/models.ts +0 -9
  226. package/test/integration/generated/dictionary/src/outputModels.ts +0 -9
  227. package/test/integration/generated/dictionary/src/parameters.ts +0 -94
  228. package/test/integration/generated/dictionary/src/responses.ts +0 -126
  229. package/test/integration/generated/dictionary/tsconfig.json +0 -25
  230. package/test/integration/generated/dictionary/tspconfig.yaml +0 -15
  231. package/test/integration/generated/enums/extensible/.eslintrc.json +0 -11
  232. package/test/integration/generated/enums/extensible/README.md +0 -56
  233. package/test/integration/generated/enums/extensible/api-extractor.json +0 -18
  234. package/test/integration/generated/enums/extensible/package.json +0 -80
  235. package/test/integration/generated/enums/extensible/rollup.config.js +0 -118
  236. package/test/integration/generated/enums/extensible/src/clientDefinitions.ts +0 -45
  237. package/test/integration/generated/enums/extensible/src/index.ts +0 -11
  238. package/test/integration/generated/enums/extensible/src/logger.ts +0 -5
  239. package/test/integration/generated/enums/extensible/src/parameters.ts +0 -23
  240. package/test/integration/generated/enums/extensible/src/responses.ts +0 -26
  241. package/test/integration/generated/enums/extensible/src/typeEnumExtensible.ts +0 -35
  242. package/test/integration/generated/enums/extensible/tsconfig.json +0 -25
  243. package/test/integration/generated/enums/extensible/tspconfig.yaml +0 -14
  244. package/test/integration/generated/enums/fixed/.eslintrc.json +0 -11
  245. package/test/integration/generated/enums/fixed/README.md +0 -56
  246. package/test/integration/generated/enums/fixed/api-extractor.json +0 -18
  247. package/test/integration/generated/enums/fixed/package.json +0 -80
  248. package/test/integration/generated/enums/fixed/rollup.config.js +0 -118
  249. package/test/integration/generated/enums/fixed/src/clientDefinitions.ts +0 -43
  250. package/test/integration/generated/enums/fixed/src/index.ts +0 -11
  251. package/test/integration/generated/enums/fixed/src/logger.ts +0 -5
  252. package/test/integration/generated/enums/fixed/src/parameters.ts +0 -36
  253. package/test/integration/generated/enums/fixed/src/responses.ts +0 -27
  254. package/test/integration/generated/enums/fixed/src/typeEnumFixed.ts +0 -35
  255. package/test/integration/generated/enums/fixed/tsconfig.json +0 -25
  256. package/test/integration/generated/enums/fixed/tspconfig.yaml +0 -14
  257. package/test/integration/generated/hello/.eslintrc.json +0 -11
  258. package/test/integration/generated/hello/README.md +0 -56
  259. package/test/integration/generated/hello/api-extractor.json +0 -18
  260. package/test/integration/generated/hello/package.json +0 -80
  261. package/test/integration/generated/hello/rollup.config.js +0 -118
  262. package/test/integration/generated/hello/src/clientDefinitions.ts +0 -19
  263. package/test/integration/generated/hello/src/hello.ts +0 -29
  264. package/test/integration/generated/hello/src/index.ts +0 -11
  265. package/test/integration/generated/hello/src/parameters.ts +0 -6
  266. package/test/integration/generated/hello/src/responses.ts +0 -10
  267. package/test/integration/generated/hello/tsconfig.json +0 -25
  268. package/test/integration/generated/hello/tspconfig.yaml +0 -14
  269. package/test/integration/generated/internal/src/clientDefinitions.ts +0 -53
  270. package/test/integration/generated/internal/src/index.ts +0 -12
  271. package/test/integration/generated/internal/src/internalClient.ts +0 -35
  272. package/test/integration/generated/internal/src/logger.ts +0 -5
  273. package/test/integration/generated/internal/src/outputModels.ts +0 -17
  274. package/test/integration/generated/internal/src/parameters.ts +0 -45
  275. package/test/integration/generated/internal/src/responses.ts +0 -33
  276. package/test/integration/generated/internal/tspconfig.yaml +0 -14
  277. package/test/integration/generated/lro/lroCore/.eslintrc.json +0 -11
  278. package/test/integration/generated/lro/lroCore/README.md +0 -56
  279. package/test/integration/generated/lro/lroCore/api-extractor.json +0 -18
  280. package/test/integration/generated/lro/lroCore/package.json +0 -82
  281. package/test/integration/generated/lro/lroCore/rollup.config.js +0 -118
  282. package/test/integration/generated/lro/lroCore/src/clientDefinitions.ts +0 -54
  283. package/test/integration/generated/lro/lroCore/src/index.ts +0 -15
  284. package/test/integration/generated/lro/lroCore/src/isUnexpected.ts +0 -135
  285. package/test/integration/generated/lro/lroCore/src/logger.ts +0 -5
  286. package/test/integration/generated/lro/lroCore/src/models.ts +0 -8
  287. package/test/integration/generated/lro/lroCore/src/outputModels.ts +0 -50
  288. package/test/integration/generated/lro/lroCore/src/parameters.ts +0 -25
  289. package/test/integration/generated/lro/lroCore/src/pollingHelper.ts +0 -113
  290. package/test/integration/generated/lro/lroCore/src/responses.ts +0 -109
  291. package/test/integration/generated/lro/lroCore/src/specsAzureCoreLroStandard.ts +0 -35
  292. package/test/integration/generated/lro/lroCore/tsconfig.json +0 -25
  293. package/test/integration/generated/lro/lroCore/tspconfig.yaml +0 -14
  294. package/test/integration/generated/lro/lroRPC/.eslintrc.json +0 -11
  295. package/test/integration/generated/lro/lroRPC/README.md +0 -56
  296. package/test/integration/generated/lro/lroRPC/api-extractor.json +0 -18
  297. package/test/integration/generated/lro/lroRPC/package.json +0 -82
  298. package/test/integration/generated/lro/lroRPC/rollup.config.js +0 -118
  299. package/test/integration/generated/lro/lroRPC/src/clientDefinitions.ts +0 -79
  300. package/test/integration/generated/lro/lroRPC/src/index.ts +0 -15
  301. package/test/integration/generated/lro/lroRPC/src/isUnexpected.ts +0 -153
  302. package/test/integration/generated/lro/lroRPC/src/logger.ts +0 -5
  303. package/test/integration/generated/lro/lroRPC/src/models.ts +0 -8
  304. package/test/integration/generated/lro/lroRPC/src/outputModels.ts +0 -40
  305. package/test/integration/generated/lro/lroRPC/src/parameters.ts +0 -20
  306. package/test/integration/generated/lro/lroRPC/src/pollingHelper.ts +0 -127
  307. package/test/integration/generated/lro/lroRPC/src/responses.ts +0 -124
  308. package/test/integration/generated/lro/lroRPC/src/specsAzureCoreLroRpc.ts +0 -35
  309. package/test/integration/generated/lro/lroRPC/tsconfig.json +0 -25
  310. package/test/integration/generated/lro/lroRPC/tspconfig.yaml +0 -14
  311. package/test/integration/generated/models/inheritance/.eslintrc.json +0 -11
  312. package/test/integration/generated/models/inheritance/README.md +0 -56
  313. package/test/integration/generated/models/inheritance/api-extractor.json +0 -18
  314. package/test/integration/generated/models/inheritance/package.json +0 -80
  315. package/test/integration/generated/models/inheritance/rollup.config.js +0 -118
  316. package/test/integration/generated/models/inheritance/src/clientDefinitions.ts +0 -81
  317. package/test/integration/generated/models/inheritance/src/index.ts +0 -13
  318. package/test/integration/generated/models/inheritance/src/logger.ts +0 -5
  319. package/test/integration/generated/models/inheritance/src/models.ts +0 -52
  320. package/test/integration/generated/models/inheritance/src/outputModels.ts +0 -52
  321. package/test/integration/generated/models/inheritance/src/parameters.ts +0 -35
  322. package/test/integration/generated/models/inheritance/src/responses.ts +0 -56
  323. package/test/integration/generated/models/inheritance/src/typeModelInheritance.ts +0 -35
  324. package/test/integration/generated/models/inheritance/tsconfig.json +0 -25
  325. package/test/integration/generated/models/inheritance/tspconfig.yaml +0 -14
  326. package/test/integration/generated/models/propertyNullable/.eslintrc.json +0 -11
  327. package/test/integration/generated/models/propertyNullable/README.md +0 -56
  328. package/test/integration/generated/models/propertyNullable/api-extractor.json +0 -18
  329. package/test/integration/generated/models/propertyNullable/package.json +0 -80
  330. package/test/integration/generated/models/propertyNullable/rollup.config.js +0 -118
  331. package/test/integration/generated/models/propertyNullable/src/clientDefinitions.ts +0 -227
  332. package/test/integration/generated/models/propertyNullable/src/index.ts +0 -13
  333. package/test/integration/generated/models/propertyNullable/src/logger.ts +0 -5
  334. package/test/integration/generated/models/propertyNullable/src/models.ts +0 -56
  335. package/test/integration/generated/models/propertyNullable/src/outputModels.ts +0 -56
  336. package/test/integration/generated/models/propertyNullable/src/parameters.ts +0 -197
  337. package/test/integration/generated/models/propertyNullable/src/responses.ts +0 -144
  338. package/test/integration/generated/models/propertyNullable/src/typePropertyNullable.ts +0 -35
  339. package/test/integration/generated/models/propertyNullable/tsconfig.json +0 -25
  340. package/test/integration/generated/models/propertyNullable/tspconfig.yaml +0 -14
  341. package/test/integration/generated/models/propertyOptional/.eslintrc.json +0 -11
  342. package/test/integration/generated/models/propertyOptional/README.md +0 -56
  343. package/test/integration/generated/models/propertyOptional/api-extractor.json +0 -18
  344. package/test/integration/generated/models/propertyOptional/package.json +0 -80
  345. package/test/integration/generated/models/propertyOptional/rollup.config.js +0 -118
  346. package/test/integration/generated/models/propertyOptional/src/clientDefinitions.ts +0 -263
  347. package/test/integration/generated/models/propertyOptional/src/index.ts +0 -13
  348. package/test/integration/generated/models/propertyOptional/src/logger.ts +0 -5
  349. package/test/integration/generated/models/propertyOptional/src/models.ts +0 -46
  350. package/test/integration/generated/models/propertyOptional/src/outputModels.ts +0 -46
  351. package/test/integration/generated/models/propertyOptional/src/parameters.ts +0 -125
  352. package/test/integration/generated/models/propertyOptional/src/responses.ts +0 -169
  353. package/test/integration/generated/models/propertyOptional/src/typePropertyOptional.ts +0 -35
  354. package/test/integration/generated/models/propertyOptional/tsconfig.json +0 -25
  355. package/test/integration/generated/models/propertyOptional/tspconfig.yaml +0 -14
  356. package/test/integration/generated/models/propertyTypes/.eslintrc.json +0 -11
  357. package/test/integration/generated/models/propertyTypes/README.md +0 -56
  358. package/test/integration/generated/models/propertyTypes/api-extractor.json +0 -18
  359. package/test/integration/generated/models/propertyTypes/package.json +0 -80
  360. package/test/integration/generated/models/propertyTypes/rollup.config.js +0 -118
  361. package/test/integration/generated/models/propertyTypes/src/clientDefinitions.ts +0 -310
  362. package/test/integration/generated/models/propertyTypes/src/index.ts +0 -13
  363. package/test/integration/generated/models/propertyTypes/src/logger.ts +0 -5
  364. package/test/integration/generated/models/propertyTypes/src/models.ts +0 -123
  365. package/test/integration/generated/models/propertyTypes/src/outputModels.ts +0 -123
  366. package/test/integration/generated/models/propertyTypes/src/parameters.ts +0 -189
  367. package/test/integration/generated/models/propertyTypes/src/responses.ts +0 -234
  368. package/test/integration/generated/models/propertyTypes/src/typePropertyValueTypes.ts +0 -35
  369. package/test/integration/generated/models/propertyTypes/tsconfig.json +0 -25
  370. package/test/integration/generated/models/propertyTypes/tspconfig.yaml +0 -14
  371. package/test/integration/generated/models/usage/.eslintrc.json +0 -11
  372. package/test/integration/generated/models/usage/README.md +0 -56
  373. package/test/integration/generated/models/usage/api-extractor.json +0 -18
  374. package/test/integration/generated/models/usage/package.json +0 -80
  375. package/test/integration/generated/models/usage/rollup.config.js +0 -118
  376. package/test/integration/generated/models/usage/src/clientDefinitions.ts +0 -41
  377. package/test/integration/generated/models/usage/src/index.ts +0 -13
  378. package/test/integration/generated/models/usage/src/logger.ts +0 -5
  379. package/test/integration/generated/models/usage/src/models.ts +0 -12
  380. package/test/integration/generated/models/usage/src/outputModels.ts +0 -12
  381. package/test/integration/generated/models/usage/src/parameters.ts +0 -19
  382. package/test/integration/generated/models/usage/src/responses.ts +0 -22
  383. package/test/integration/generated/models/usage/src/typeModelUsage.ts +0 -35
  384. package/test/integration/generated/models/usage/tsconfig.json +0 -25
  385. package/test/integration/generated/models/usage/tspconfig.yaml +0 -14
  386. package/test/integration/generated/models/visibility/.eslintrc.json +0 -11
  387. package/test/integration/generated/models/visibility/README.md +0 -56
  388. package/test/integration/generated/models/visibility/api-extractor.json +0 -18
  389. package/test/integration/generated/models/visibility/package.json +0 -80
  390. package/test/integration/generated/models/visibility/rollup.config.js +0 -118
  391. package/test/integration/generated/models/visibility/src/clientDefinitions.ts +0 -40
  392. package/test/integration/generated/models/visibility/src/index.ts +0 -13
  393. package/test/integration/generated/models/visibility/src/logger.ts +0 -5
  394. package/test/integration/generated/models/visibility/src/models.ts +0 -14
  395. package/test/integration/generated/models/visibility/src/outputModels.ts +0 -16
  396. package/test/integration/generated/models/visibility/src/parameters.ts +0 -41
  397. package/test/integration/generated/models/visibility/src/responses.ts +0 -36
  398. package/test/integration/generated/models/visibility/src/typeModelVisibility.ts +0 -35
  399. package/test/integration/generated/models/visibility/tsconfig.json +0 -25
  400. package/test/integration/generated/models/visibility/tspconfig.yaml +0 -14
  401. package/test/integration/generated/parameters/collection-format/src/clientDefinitions.ts +0 -63
  402. package/test/integration/generated/parameters/collection-format/src/collectionFormatClient.ts +0 -35
  403. package/test/integration/generated/parameters/collection-format/src/index.ts +0 -12
  404. package/test/integration/generated/parameters/collection-format/src/logger.ts +0 -5
  405. package/test/integration/generated/parameters/collection-format/src/parameters.ts +0 -71
  406. package/test/integration/generated/parameters/collection-format/src/responses.ts +0 -34
  407. package/test/integration/generated/parameters/collection-format/src/serializeHelper.ts +0 -28
  408. package/test/integration/generated/parameters/collection-format/tspconfig.yaml +0 -14
  409. package/test/integration/generated/parameters/spread/src/clientDefinitions.ts +0 -61
  410. package/test/integration/generated/parameters/spread/src/index.ts +0 -12
  411. package/test/integration/generated/parameters/spread/src/logger.ts +0 -5
  412. package/test/integration/generated/parameters/spread/src/models.ts +0 -7
  413. package/test/integration/generated/parameters/spread/src/parameters.ts +0 -61
  414. package/test/integration/generated/parameters/spread/src/parametersSpread.ts +0 -35
  415. package/test/integration/generated/parameters/spread/src/responses.ts +0 -25
  416. package/test/integration/generated/parameters/spread/tspconfig.yaml +0 -12
  417. package/test/integration/generated/projection/src/clientDefinitions.ts +0 -71
  418. package/test/integration/generated/projection/src/index.ts +0 -12
  419. package/test/integration/generated/projection/src/logger.ts +0 -5
  420. package/test/integration/generated/projection/src/models.ts +0 -22
  421. package/test/integration/generated/projection/src/parameters.ts +0 -48
  422. package/test/integration/generated/projection/src/projectionClient.ts +0 -35
  423. package/test/integration/generated/projection/src/responses.ts +0 -34
  424. package/test/integration/generated/projection/tspconfig.yaml +0 -14
  425. package/test/integration/generated/resiliency/srvDriven1/.eslintrc.json +0 -11
  426. package/test/integration/generated/resiliency/srvDriven1/README.md +0 -56
  427. package/test/integration/generated/resiliency/srvDriven1/api-extractor.json +0 -18
  428. package/test/integration/generated/resiliency/srvDriven1/package.json +0 -80
  429. package/test/integration/generated/resiliency/srvDriven1/rollup.config.js +0 -118
  430. package/test/integration/generated/resiliency/srvDriven1/src/clientDefinitions.ts +0 -46
  431. package/test/integration/generated/resiliency/srvDriven1/src/index.ts +0 -11
  432. package/test/integration/generated/resiliency/srvDriven1/src/logger.ts +0 -5
  433. package/test/integration/generated/resiliency/srvDriven1/src/parameters.ts +0 -30
  434. package/test/integration/generated/resiliency/srvDriven1/src/responses.ts +0 -19
  435. package/test/integration/generated/resiliency/srvDriven1/src/serviceDrivenOldClient.ts +0 -43
  436. package/test/integration/generated/resiliency/srvDriven1/tsconfig.json +0 -25
  437. package/test/integration/generated/resiliency/srvDriven1/tspconfig.yaml +0 -15
  438. package/test/integration/generated/resiliency/srvDriven2/.eslintrc.json +0 -11
  439. package/test/integration/generated/resiliency/srvDriven2/README.md +0 -65
  440. package/test/integration/generated/resiliency/srvDriven2/api-extractor.json +0 -18
  441. package/test/integration/generated/resiliency/srvDriven2/package.json +0 -80
  442. package/test/integration/generated/resiliency/srvDriven2/rollup.config.js +0 -118
  443. package/test/integration/generated/resiliency/srvDriven2/src/clientDefinitions.ts +0 -57
  444. package/test/integration/generated/resiliency/srvDriven2/src/index.ts +0 -11
  445. package/test/integration/generated/resiliency/srvDriven2/src/logger.ts +0 -5
  446. package/test/integration/generated/resiliency/srvDriven2/src/parameters.ts +0 -45
  447. package/test/integration/generated/resiliency/srvDriven2/src/responses.ts +0 -24
  448. package/test/integration/generated/resiliency/srvDriven2/src/serviceDrivenNewClient.ts +0 -43
  449. package/test/integration/generated/resiliency/srvDriven2/tsconfig.json +0 -25
  450. package/test/integration/generated/resiliency/srvDriven2/tspconfig.yaml +0 -15
  451. package/test/integration/generated/server/path/multiple/src/clientDefinitions.ts +0 -35
  452. package/test/integration/generated/server/path/multiple/src/index.ts +0 -11
  453. package/test/integration/generated/server/path/multiple/src/logger.ts +0 -5
  454. package/test/integration/generated/server/path/multiple/src/multipleParamInServerPathClient.ts +0 -43
  455. package/test/integration/generated/server/path/multiple/src/parameters.ts +0 -7
  456. package/test/integration/generated/server/path/multiple/src/responses.ts +0 -14
  457. package/test/integration/generated/server/path/multiple/tspconfig.yaml +0 -14
  458. package/test/integration/generated/server/path/single/src/clientDefinitions.ts +0 -19
  459. package/test/integration/generated/server/path/single/src/index.ts +0 -11
  460. package/test/integration/generated/server/path/single/src/logger.ts +0 -5
  461. package/test/integration/generated/server/path/single/src/parameters.ts +0 -6
  462. package/test/integration/generated/server/path/single/src/responses.ts +0 -9
  463. package/test/integration/generated/server/path/single/src/singleParamInServerPathClient.ts +0 -38
  464. package/test/integration/generated/server/path/single/tspconfig.yaml +0 -14
  465. package/test/integration/generated/specialWords/src/clientDefinitions.ts +0 -61
  466. package/test/integration/generated/specialWords/src/index.ts +0 -13
  467. package/test/integration/generated/specialWords/src/logger.ts +0 -5
  468. package/test/integration/generated/specialWords/src/models.ts +0 -17
  469. package/test/integration/generated/specialWords/src/outputModels.ts +0 -17
  470. package/test/integration/generated/specialWords/src/parameters.ts +0 -37
  471. package/test/integration/generated/specialWords/src/responses.ts +0 -31
  472. package/test/integration/generated/specialWords/src/specialWordsClient.ts +0 -35
  473. package/test/integration/generated/specialWords/tspconfig.yaml +0 -14
  474. package/test/integration/generated/unions/src/clientDefinitions.ts +0 -53
  475. package/test/integration/generated/unions/src/index.ts +0 -12
  476. package/test/integration/generated/unions/src/logger.ts +0 -5
  477. package/test/integration/generated/unions/src/models.ts +0 -27
  478. package/test/integration/generated/unions/src/parameters.ts +0 -34
  479. package/test/integration/generated/unions/src/responses.ts +0 -24
  480. package/test/integration/generated/unions/src/unionsClient.ts +0 -35
  481. package/test/integration/generated/unions/tspconfig.yaml +0 -14
  482. package/test/integration/internal.spec.ts +0 -76
  483. package/test/integration/lroCore.spec.ts +0 -89
  484. package/test/integration/modelInheritance.spec.ts +0 -192
  485. package/test/integration/modelPropertyNullable.spec.ts +0 -115
  486. package/test/integration/modelPropertyOptional.spec.ts +0 -362
  487. package/test/integration/modelPropertyType.spec.ts +0 -135
  488. package/test/integration/modelUsage.spec.ts +0 -47
  489. package/test/integration/projection.spec.ts +0 -102
  490. package/test/integration/resiliencyDpgCustomization.spec.ts +0 -147
  491. package/test/integration/server.spec.ts +0 -59
  492. package/test/integration/specialWords.spec.ts +0 -73
  493. package/test/integration/spreadParameters.spec.ts +0 -82
  494. package/test/integration/unions.spec.ts +0 -69
  495. package/test/tsconfig.json +0 -4
  496. package/test/unit/apiVersion.spec.ts +0 -400
  497. package/test/unit/azureCoreOperationsGenerator.spec.ts +0 -71
  498. package/test/unit/clientDefinitionGenerator.spec.ts +0 -73
  499. package/test/unit/clientFactoryGenerator.spec.ts +0 -404
  500. package/test/unit/docsGenerator.spec.ts +0 -201
  501. package/test/unit/modelsGenerator.spec.ts +0 -1529
  502. package/test/unit/parametersGenerator.spec.ts +0 -561
  503. package/test/unit/responsesGenerator.spec.ts +0 -462
  504. package/test/unit/spreadAndAlias.spec.ts +0 -200
  505. package/test/unit/util/emitUtil.ts +0 -166
  506. package/test/unit/util/testUtil.ts +0 -88
  507. package/test/util/customBearerTokenTestingPolicy.ts +0 -78
  508. package/test/util/matrix.ts +0 -48
  509. package/tsconfig.json +0 -36
  510. package/tsconfig.test.json +0 -7
  511. package/typespec-ts.build.log +0 -1
@@ -1,118 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
-
4
- import nodeResolve from "@rollup/plugin-node-resolve";
5
- import cjs from "@rollup/plugin-commonjs";
6
- import sourcemaps from "rollup-plugin-sourcemaps";
7
- import multiEntry from "@rollup/plugin-multi-entry";
8
- import json from "@rollup/plugin-json";
9
-
10
- import nodeBuiltins from "builtin-modules";
11
-
12
- // #region Warning Handler
13
-
14
- /**
15
- * A function that can determine whether a rollup warning should be ignored. If
16
- * the function returns `true`, then the warning will not be displayed.
17
- */
18
-
19
- function ignoreNiseSinonEval(warning) {
20
- return (
21
- warning.code === "EVAL" &&
22
- warning.id &&
23
- (warning.id.includes("node_modules/nise") ||
24
- warning.id.includes("node_modules/sinon")) === true
25
- );
26
- }
27
-
28
- function ignoreChaiCircularDependency(warning) {
29
- return (
30
- warning.code === "CIRCULAR_DEPENDENCY" &&
31
- warning.importer &&
32
- warning.importer.includes("node_modules/chai") === true
33
- );
34
- }
35
-
36
- const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
37
-
38
- /**
39
- * Construct a warning handler for the shared rollup configuration
40
- * that ignores certain warnings that are not relevant to testing.
41
- */
42
- function makeOnWarnForTesting() {
43
- return (warning, warn) => {
44
- // If every inhibitor returns false (i.e. no inhibitors), then show the warning
45
- if (warningInhibitors.every((inhib) => !inhib(warning))) {
46
- warn(warning);
47
- }
48
- };
49
- }
50
-
51
- // #endregion
52
-
53
- function makeBrowserTestConfig() {
54
- const config = {
55
- input: {
56
- include: ["dist-esm/test/**/*.spec.js"],
57
- exclude: ["dist-esm/test/**/node/**"],
58
- },
59
- output: {
60
- file: `dist-test/index.browser.js`,
61
- format: "umd",
62
- sourcemap: true,
63
- },
64
- preserveSymlinks: false,
65
- plugins: [
66
- multiEntry({ exports: false }),
67
- nodeResolve({
68
- mainFields: ["module", "browser"],
69
- }),
70
- cjs(),
71
- json(),
72
- sourcemaps(),
73
- //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
74
- ],
75
- onwarn: makeOnWarnForTesting(),
76
- // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
77
- // rollup started respecting the "sideEffects" field in package.json. Since
78
- // our package.json sets "sideEffects=false", this also applies to test
79
- // code, which causes all tests to be removed by tree-shaking.
80
- treeshake: false,
81
- };
82
-
83
- return config;
84
- }
85
-
86
- const defaultConfigurationOptions = {
87
- disableBrowserBundle: false,
88
- };
89
-
90
- export function makeConfig(pkg, options) {
91
- options = {
92
- ...defaultConfigurationOptions,
93
- ...(options || {}),
94
- };
95
-
96
- const baseConfig = {
97
- // Use the package's module field if it has one
98
- input: pkg["module"] || "dist-esm/src/index.js",
99
- external: [
100
- ...nodeBuiltins,
101
- ...Object.keys(pkg.dependencies),
102
- ...Object.keys(pkg.devDependencies),
103
- ],
104
- output: { file: "dist/index.js", format: "cjs", sourcemap: true },
105
- preserveSymlinks: false,
106
- plugins: [sourcemaps(), nodeResolve()],
107
- };
108
-
109
- const config = [baseConfig];
110
-
111
- if (!options.disableBrowserBundle) {
112
- config.push(makeBrowserTestConfig());
113
- }
114
-
115
- return config;
116
- }
117
-
118
- export default makeConfig(require("./package.json"));
@@ -1,180 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
-
4
- import {
5
- Int32ValueGetParameters,
6
- Int32ValuePutParameters,
7
- Int64ValueGetParameters,
8
- Int64ValuePutParameters,
9
- BooleanValueGetParameters,
10
- BooleanValuePutParameters,
11
- StringValueGetParameters,
12
- StringValuePutParameters,
13
- Float32ValueGetParameters,
14
- Float32ValuePutParameters,
15
- DatetimeValueGetParameters,
16
- DatetimeValuePutParameters,
17
- DurationValueGetParameters,
18
- DurationValuePutParameters,
19
- UnknownValueGetParameters,
20
- UnknownValuePutParameters,
21
- ModelValueGetParameters,
22
- ModelValuePutParameters,
23
- RecursiveModelValueGetParameters,
24
- RecursiveModelValuePutParameters,
25
- NullableFloatValueGetParameters,
26
- NullableFloatValuePutParameters,
27
- } from "./parameters";
28
- import {
29
- Int32ValueGet200Response,
30
- Int32ValuePut204Response,
31
- Int64ValueGet200Response,
32
- Int64ValuePut204Response,
33
- BooleanValueGet200Response,
34
- BooleanValuePut204Response,
35
- StringValueGet200Response,
36
- StringValuePut204Response,
37
- Float32ValueGet200Response,
38
- Float32ValuePut204Response,
39
- DatetimeValueGet200Response,
40
- DatetimeValuePut204Response,
41
- DurationValueGet200Response,
42
- DurationValuePut204Response,
43
- UnknownValueGet200Response,
44
- UnknownValuePut204Response,
45
- ModelValueGet200Response,
46
- ModelValuePut204Response,
47
- RecursiveModelValueGet200Response,
48
- RecursiveModelValuePut204Response,
49
- NullableFloatValueGet200Response,
50
- NullableFloatValuePut204Response,
51
- } from "./responses";
52
- import { Client, StreamableMethod } from "@azure-rest/core-client";
53
-
54
- export interface Int32ValueGet {
55
- get(
56
- options?: Int32ValueGetParameters
57
- ): StreamableMethod<Int32ValueGet200Response>;
58
- put(
59
- options: Int32ValuePutParameters
60
- ): StreamableMethod<Int32ValuePut204Response>;
61
- }
62
-
63
- export interface Int64ValueGet {
64
- get(
65
- options?: Int64ValueGetParameters
66
- ): StreamableMethod<Int64ValueGet200Response>;
67
- put(
68
- options: Int64ValuePutParameters
69
- ): StreamableMethod<Int64ValuePut204Response>;
70
- }
71
-
72
- export interface BooleanValueGet {
73
- get(
74
- options?: BooleanValueGetParameters
75
- ): StreamableMethod<BooleanValueGet200Response>;
76
- put(
77
- options: BooleanValuePutParameters
78
- ): StreamableMethod<BooleanValuePut204Response>;
79
- }
80
-
81
- export interface StringValueGet {
82
- get(
83
- options?: StringValueGetParameters
84
- ): StreamableMethod<StringValueGet200Response>;
85
- put(
86
- options: StringValuePutParameters
87
- ): StreamableMethod<StringValuePut204Response>;
88
- }
89
-
90
- export interface Float32ValueGet {
91
- get(
92
- options?: Float32ValueGetParameters
93
- ): StreamableMethod<Float32ValueGet200Response>;
94
- put(
95
- options: Float32ValuePutParameters
96
- ): StreamableMethod<Float32ValuePut204Response>;
97
- }
98
-
99
- export interface DatetimeValueGet {
100
- get(
101
- options?: DatetimeValueGetParameters
102
- ): StreamableMethod<DatetimeValueGet200Response>;
103
- put(
104
- options: DatetimeValuePutParameters
105
- ): StreamableMethod<DatetimeValuePut204Response>;
106
- }
107
-
108
- export interface DurationValueGet {
109
- get(
110
- options?: DurationValueGetParameters
111
- ): StreamableMethod<DurationValueGet200Response>;
112
- put(
113
- options: DurationValuePutParameters
114
- ): StreamableMethod<DurationValuePut204Response>;
115
- }
116
-
117
- export interface UnknownValueGet {
118
- get(
119
- options?: UnknownValueGetParameters
120
- ): StreamableMethod<UnknownValueGet200Response>;
121
- put(
122
- options: UnknownValuePutParameters
123
- ): StreamableMethod<UnknownValuePut204Response>;
124
- }
125
-
126
- export interface ModelValueGet {
127
- get(
128
- options?: ModelValueGetParameters
129
- ): StreamableMethod<ModelValueGet200Response>;
130
- put(
131
- options: ModelValuePutParameters
132
- ): StreamableMethod<ModelValuePut204Response>;
133
- }
134
-
135
- export interface RecursiveModelValueGet {
136
- get(
137
- options?: RecursiveModelValueGetParameters
138
- ): StreamableMethod<RecursiveModelValueGet200Response>;
139
- put(
140
- options: RecursiveModelValuePutParameters
141
- ): StreamableMethod<RecursiveModelValuePut204Response>;
142
- }
143
-
144
- export interface NullableFloatValueGet {
145
- get(
146
- options?: NullableFloatValueGetParameters
147
- ): StreamableMethod<NullableFloatValueGet200Response>;
148
- put(
149
- options: NullableFloatValuePutParameters
150
- ): StreamableMethod<NullableFloatValuePut204Response>;
151
- }
152
-
153
- export interface Routes {
154
- /** Resource for '/type/dictionary/int32' has methods for the following verbs: get, put */
155
- (path: "/type/dictionary/int32"): Int32ValueGet;
156
- /** Resource for '/type/dictionary/int64' has methods for the following verbs: get, put */
157
- (path: "/type/dictionary/int64"): Int64ValueGet;
158
- /** Resource for '/type/dictionary/boolean' has methods for the following verbs: get, put */
159
- (path: "/type/dictionary/boolean"): BooleanValueGet;
160
- /** Resource for '/type/dictionary/string' has methods for the following verbs: get, put */
161
- (path: "/type/dictionary/string"): StringValueGet;
162
- /** Resource for '/type/dictionary/float32' has methods for the following verbs: get, put */
163
- (path: "/type/dictionary/float32"): Float32ValueGet;
164
- /** Resource for '/type/dictionary/datetime' has methods for the following verbs: get, put */
165
- (path: "/type/dictionary/datetime"): DatetimeValueGet;
166
- /** Resource for '/type/dictionary/duration' has methods for the following verbs: get, put */
167
- (path: "/type/dictionary/duration"): DurationValueGet;
168
- /** Resource for '/type/dictionary/unknown' has methods for the following verbs: get, put */
169
- (path: "/type/dictionary/unknown"): UnknownValueGet;
170
- /** Resource for '/type/dictionary/model' has methods for the following verbs: get, put */
171
- (path: "/type/dictionary/model"): ModelValueGet;
172
- /** Resource for '/type/dictionary/model/recursive' has methods for the following verbs: get, put */
173
- (path: "/type/dictionary/model/recursive"): RecursiveModelValueGet;
174
- /** Resource for '/type/dictionary/nullable-float' has methods for the following verbs: get, put */
175
- (path: "/type/dictionary/nullable-float"): NullableFloatValueGet;
176
- }
177
-
178
- export type DictClient = Client & {
179
- path: Routes;
180
- };
@@ -1,33 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
-
4
- import { getClient, ClientOptions } from "@azure-rest/core-client";
5
- import { logger } from "./logger";
6
- import { DictClient } from "./clientDefinitions";
7
-
8
- /**
9
- * Initialize a new instance of `DictClient`
10
- * @param options - the parameter for all optional parameters
11
- */
12
- export default function createClient(options: ClientOptions = {}): DictClient {
13
- const baseUrl = options.baseUrl ?? `http://localhost:3000`;
14
- options.apiVersion = options.apiVersion ?? "1.0.0";
15
- const userAgentInfo = `azsdk-js-dictionary-rest/1.0.0`;
16
- const userAgentPrefix =
17
- options.userAgentOptions && options.userAgentOptions.userAgentPrefix
18
- ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
19
- : `${userAgentInfo}`;
20
- options = {
21
- ...options,
22
- userAgentOptions: {
23
- userAgentPrefix,
24
- },
25
- loggingOptions: {
26
- logger: options.loggingOptions?.logger ?? logger.info,
27
- },
28
- };
29
-
30
- const client = getClient(baseUrl, options) as DictClient;
31
-
32
- return client;
33
- }
@@ -1,13 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
-
4
- import DictClient from "./dictClient";
5
-
6
- export * from "./dictClient";
7
- export * from "./parameters";
8
- export * from "./responses";
9
- export * from "./clientDefinitions";
10
- export * from "./models";
11
- export * from "./outputModels";
12
-
13
- export default DictClient;
@@ -1,5 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
-
4
- import { createClientLogger } from "@azure/logger";
5
- export const logger = createClientLogger("dictionary");
@@ -1,9 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
-
4
- /** Dictionary inner model */
5
- export interface InnerModel {
6
- /** Required string property */
7
- property: string;
8
- children?: Record<string, InnerModel>;
9
- }
@@ -1,9 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
-
4
- /** Dictionary inner model */
5
- export interface InnerModelOutput {
6
- /** Required string property */
7
- property: string;
8
- children?: Record<string, InnerModelOutput>;
9
- }
@@ -1,94 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
-
4
- import { RequestParameters } from "@azure-rest/core-client";
5
- import { InnerModel } from "./models";
6
-
7
- export type Int32ValueGetParameters = RequestParameters;
8
-
9
- export interface Int32ValuePutBodyParam {
10
- body: Record<string, number>;
11
- }
12
-
13
- export type Int32ValuePutParameters = Int32ValuePutBodyParam &
14
- RequestParameters;
15
- export type Int64ValueGetParameters = RequestParameters;
16
-
17
- export interface Int64ValuePutBodyParam {
18
- body: Record<string, number>;
19
- }
20
-
21
- export type Int64ValuePutParameters = Int64ValuePutBodyParam &
22
- RequestParameters;
23
- export type BooleanValueGetParameters = RequestParameters;
24
-
25
- export interface BooleanValuePutBodyParam {
26
- body: Record<string, boolean>;
27
- }
28
-
29
- export type BooleanValuePutParameters = BooleanValuePutBodyParam &
30
- RequestParameters;
31
- export type StringValueGetParameters = RequestParameters;
32
-
33
- export interface StringValuePutBodyParam {
34
- body: Record<string, string>;
35
- }
36
-
37
- export type StringValuePutParameters = StringValuePutBodyParam &
38
- RequestParameters;
39
- export type Float32ValueGetParameters = RequestParameters;
40
-
41
- export interface Float32ValuePutBodyParam {
42
- body: Record<string, number>;
43
- }
44
-
45
- export type Float32ValuePutParameters = Float32ValuePutBodyParam &
46
- RequestParameters;
47
- export type DatetimeValueGetParameters = RequestParameters;
48
-
49
- export interface DatetimeValuePutBodyParam {
50
- body: Record<string, string>;
51
- }
52
-
53
- export type DatetimeValuePutParameters = DatetimeValuePutBodyParam &
54
- RequestParameters;
55
- export type DurationValueGetParameters = RequestParameters;
56
-
57
- export interface DurationValuePutBodyParam {
58
- body: Record<string, string>;
59
- }
60
-
61
- export type DurationValuePutParameters = DurationValuePutBodyParam &
62
- RequestParameters;
63
- export type UnknownValueGetParameters = RequestParameters;
64
-
65
- export interface UnknownValuePutBodyParam {
66
- body: Record<string, unknown>;
67
- }
68
-
69
- export type UnknownValuePutParameters = UnknownValuePutBodyParam &
70
- RequestParameters;
71
- export type ModelValueGetParameters = RequestParameters;
72
-
73
- export interface ModelValuePutBodyParam {
74
- body: Record<string, InnerModel>;
75
- }
76
-
77
- export type ModelValuePutParameters = ModelValuePutBodyParam &
78
- RequestParameters;
79
- export type RecursiveModelValueGetParameters = RequestParameters;
80
-
81
- export interface RecursiveModelValuePutBodyParam {
82
- body: Record<string, InnerModel>;
83
- }
84
-
85
- export type RecursiveModelValuePutParameters = RecursiveModelValuePutBodyParam &
86
- RequestParameters;
87
- export type NullableFloatValueGetParameters = RequestParameters;
88
-
89
- export interface NullableFloatValuePutBodyParam {
90
- body: Record<string, number | null>;
91
- }
92
-
93
- export type NullableFloatValuePutParameters = NullableFloatValuePutBodyParam &
94
- RequestParameters;
@@ -1,126 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
-
4
- import { HttpResponse } from "@azure-rest/core-client";
5
- import { InnerModelOutput } from "./outputModels";
6
-
7
- /** The request has succeeded. */
8
- export interface Int32ValueGet200Response extends HttpResponse {
9
- status: "200";
10
- body: Record<string, number>;
11
- }
12
-
13
- /** There is no content to send for this request, but the headers may be useful. */
14
- export interface Int32ValuePut204Response extends HttpResponse {
15
- status: "204";
16
- }
17
-
18
- /** The request has succeeded. */
19
- export interface Int64ValueGet200Response extends HttpResponse {
20
- status: "200";
21
- body: Record<string, number>;
22
- }
23
-
24
- /** There is no content to send for this request, but the headers may be useful. */
25
- export interface Int64ValuePut204Response extends HttpResponse {
26
- status: "204";
27
- }
28
-
29
- /** The request has succeeded. */
30
- export interface BooleanValueGet200Response extends HttpResponse {
31
- status: "200";
32
- body: Record<string, boolean>;
33
- }
34
-
35
- /** There is no content to send for this request, but the headers may be useful. */
36
- export interface BooleanValuePut204Response extends HttpResponse {
37
- status: "204";
38
- }
39
-
40
- /** The request has succeeded. */
41
- export interface StringValueGet200Response extends HttpResponse {
42
- status: "200";
43
- body: Record<string, string>;
44
- }
45
-
46
- /** There is no content to send for this request, but the headers may be useful. */
47
- export interface StringValuePut204Response extends HttpResponse {
48
- status: "204";
49
- }
50
-
51
- /** The request has succeeded. */
52
- export interface Float32ValueGet200Response extends HttpResponse {
53
- status: "200";
54
- body: Record<string, number>;
55
- }
56
-
57
- /** There is no content to send for this request, but the headers may be useful. */
58
- export interface Float32ValuePut204Response extends HttpResponse {
59
- status: "204";
60
- }
61
-
62
- /** The request has succeeded. */
63
- export interface DatetimeValueGet200Response extends HttpResponse {
64
- status: "200";
65
- body: Record<string, string>;
66
- }
67
-
68
- /** There is no content to send for this request, but the headers may be useful. */
69
- export interface DatetimeValuePut204Response extends HttpResponse {
70
- status: "204";
71
- }
72
-
73
- /** The request has succeeded. */
74
- export interface DurationValueGet200Response extends HttpResponse {
75
- status: "200";
76
- body: Record<string, string>;
77
- }
78
-
79
- /** There is no content to send for this request, but the headers may be useful. */
80
- export interface DurationValuePut204Response extends HttpResponse {
81
- status: "204";
82
- }
83
-
84
- /** The request has succeeded. */
85
- export interface UnknownValueGet200Response extends HttpResponse {
86
- status: "200";
87
- body: Record<string, any>;
88
- }
89
-
90
- /** There is no content to send for this request, but the headers may be useful. */
91
- export interface UnknownValuePut204Response extends HttpResponse {
92
- status: "204";
93
- }
94
-
95
- /** The request has succeeded. */
96
- export interface ModelValueGet200Response extends HttpResponse {
97
- status: "200";
98
- body: Record<string, InnerModelOutput>;
99
- }
100
-
101
- /** There is no content to send for this request, but the headers may be useful. */
102
- export interface ModelValuePut204Response extends HttpResponse {
103
- status: "204";
104
- }
105
-
106
- /** The request has succeeded. */
107
- export interface RecursiveModelValueGet200Response extends HttpResponse {
108
- status: "200";
109
- body: Record<string, InnerModelOutput>;
110
- }
111
-
112
- /** There is no content to send for this request, but the headers may be useful. */
113
- export interface RecursiveModelValuePut204Response extends HttpResponse {
114
- status: "204";
115
- }
116
-
117
- /** The request has succeeded. */
118
- export interface NullableFloatValueGet200Response extends HttpResponse {
119
- status: "200";
120
- body: Record<string, number | null>;
121
- }
122
-
123
- /** There is no content to send for this request, but the headers may be useful. */
124
- export interface NullableFloatValuePut204Response extends HttpResponse {
125
- status: "204";
126
- }
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2017",
4
- "module": "es6",
5
- "lib": [],
6
- "declaration": true,
7
- "declarationMap": true,
8
- "inlineSources": true,
9
- "sourceMap": true,
10
- "importHelpers": true,
11
- "strict": true,
12
- "alwaysStrict": true,
13
- "noUnusedLocals": true,
14
- "noUnusedParameters": true,
15
- "noImplicitReturns": true,
16
- "noFallthroughCasesInSwitch": true,
17
- "forceConsistentCasingInFileNames": true,
18
- "moduleResolution": "node",
19
- "allowSyntheticDefaultImports": true,
20
- "esModuleInterop": true,
21
- "outDir": "./dist-esm",
22
- "declarationDir": "./types"
23
- },
24
- "include": ["./src/**/*.ts"]
25
- }
@@ -1,15 +0,0 @@
1
- emit:
2
- - "@azure-tools/typespec-ts"
3
- options:
4
- "@azure-tools/typespec-ts":
5
- "emitter-output-dir": "{project-root}"
6
- generateMetadata: true
7
- generateTest: false
8
- addCredentials: false
9
- azureSdkForJs: false
10
- isCadlTest: true
11
- title: DictClient
12
- packageDetails:
13
- name: "@msinternal/dictionary"
14
- description: "Dictionary Test Service"
15
- version: "1.0.0"
@@ -1,11 +0,0 @@
1
- {
2
- "plugins": ["@azure/azure-sdk"],
3
- "extends": ["plugin:@azure/azure-sdk/azure-sdk-base"],
4
- "rules": {
5
- "@azure/azure-sdk/ts-modules-only-named": "warn",
6
- "@azure/azure-sdk/ts-apiextractor-json-types": "warn",
7
- "@azure/azure-sdk/ts-package-json-types": "warn",
8
- "@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
9
- "tsdoc/syntax": "warn"
10
- }
11
- }