ts-openapi-codegen 1.0.0-beta.6 → 1.0.0-beta.8

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 (671) hide show
  1. package/README.md +43 -58
  2. package/dist/cli/chekOpenApiConfig/chekOpenApiConfig.d.ts +1 -1
  3. package/dist/cli/chekOpenApiConfig/chekOpenApiConfig.d.ts.map +1 -1
  4. package/dist/cli/chekOpenApiConfig/chekOpenApiConfig.js +9 -4
  5. package/dist/cli/generate/runGenerateOpenApi.d.ts.map +1 -1
  6. package/dist/cli/generate/runGenerateOpenApi.js +8 -7
  7. package/dist/cli/index.js +30 -15
  8. package/dist/cli/initOpenApiConfig/Enums.d.ts +5 -0
  9. package/dist/cli/initOpenApiConfig/Enums.d.ts.map +1 -0
  10. package/dist/cli/initOpenApiConfig/Enums.js +8 -0
  11. package/dist/cli/initOpenApiConfig/Types.d.ts +6 -0
  12. package/dist/cli/initOpenApiConfig/Types.d.ts.map +1 -0
  13. package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.d.ts +3 -0
  14. package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.d.ts.map +1 -0
  15. package/dist/cli/initOpenApiConfig/runInitOpenapiConfig.js +77 -0
  16. package/dist/cli/utils.d.ts +0 -17
  17. package/dist/cli/utils.d.ts.map +1 -1
  18. package/dist/cli/utils.js +0 -20
  19. package/dist/common/Consts.d.ts +2 -0
  20. package/dist/common/Consts.d.ts.map +1 -0
  21. package/dist/common/Consts.js +4 -0
  22. package/dist/common/Enums.d.ts.map +1 -1
  23. package/dist/common/Options.d.ts +4 -6
  24. package/dist/common/Options.d.ts.map +1 -1
  25. package/dist/common/Utils.d.ts +1 -1
  26. package/dist/common/Utils.d.ts.map +1 -1
  27. package/dist/common/Utils.js +11 -12
  28. package/dist/common/VersionedSchema/CommonSchemas.d.ts +12 -0
  29. package/dist/common/VersionedSchema/CommonSchemas.d.ts.map +1 -1
  30. package/dist/common/VersionedSchema/CommonSchemas.js +27 -1
  31. package/dist/common/VersionedSchema/{MultiOptionsMigrationPlan.d.ts → MultiOptionsVersioned/MultiOptionsMigrationPlan.d.ts} +1 -1
  32. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsMigrationPlan.d.ts.map +1 -0
  33. package/dist/common/VersionedSchema/{MultiOptionsMigrationPlan.js → MultiOptionsVersioned/MultiOptionsMigrationPlan.js} +18 -7
  34. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts +6 -0
  35. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts.map +1 -0
  36. package/dist/common/VersionedSchema/{MultiOptionsSchemaV1.js → MultiOptionsVersioned/MultiOptionsSchemaV1.js} +4 -4
  37. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts +6 -0
  38. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts.map +1 -0
  39. package/dist/common/VersionedSchema/{MultiOptionsSchemaV2.js → MultiOptionsVersioned/MultiOptionsSchemaV2.js} +4 -4
  40. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts +5 -0
  41. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts.map +1 -0
  42. package/dist/common/VersionedSchema/{MultiOptionsSchemaV3.js → MultiOptionsVersioned/MultiOptionsSchemaV3.js} +3 -3
  43. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts +6 -0
  44. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts.map +1 -0
  45. package/dist/common/VersionedSchema/{MultiOptionsSchemaV4.js → MultiOptionsVersioned/MultiOptionsSchemaV4.js} +4 -4
  46. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts +6 -0
  47. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts.map +1 -0
  48. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.js +22 -0
  49. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.d.ts +3 -0
  50. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.d.ts.map +1 -0
  51. package/dist/common/VersionedSchema/{MultiOptionsVersionedSchemas.js → MultiOptionsVersioned/MultiOptionsVersionedSchemas.js} +10 -5
  52. package/dist/common/VersionedSchema/{OptionsMigrationPlans.d.ts → OptionsVersioned/OptionsMigrationPlans.d.ts} +1 -1
  53. package/dist/common/VersionedSchema/OptionsVersioned/OptionsMigrationPlans.d.ts.map +1 -0
  54. package/dist/common/VersionedSchema/OptionsVersioned/OptionsMigrationPlans.js +23 -0
  55. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts +6 -0
  56. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts.map +1 -0
  57. package/dist/common/VersionedSchema/{OptionsSchemaV1.js → OptionsVersioned/OptionsSchemaV1.js} +4 -4
  58. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts +6 -0
  59. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts.map +1 -0
  60. package/dist/common/VersionedSchema/{OptionsSchemaV2.js → OptionsVersioned/OptionsSchemaV2.js} +4 -4
  61. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts +5 -0
  62. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts.map +1 -0
  63. package/dist/common/VersionedSchema/{OptionsSchemaV3.js → OptionsVersioned/OptionsSchemaV3.js} +3 -3
  64. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts +6 -0
  65. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts.map +1 -0
  66. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.js +17 -0
  67. package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.d.ts +3 -0
  68. package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.d.ts.map +1 -0
  69. package/dist/common/VersionedSchema/{OptionsVersionedSchemas.js → OptionsVersioned/OptionsVersionedSchemas.js} +9 -4
  70. package/dist/common/VersionedSchema/Types.d.ts +0 -4
  71. package/dist/common/VersionedSchema/Types.d.ts.map +1 -1
  72. package/dist/common/__tests__/convertArrayToObject.test.js +62 -59
  73. package/dist/common/__tests__/mergeObjectSchemas.test.js +1 -1
  74. package/dist/common/__tests__/migrationForMultiOptions.test.js +9 -5
  75. package/dist/common/__tests__/migrationForOptions.test.js +17 -8
  76. package/dist/common/defaultOptions.d.ts.map +1 -1
  77. package/dist/common/defaultOptions.js +5 -7
  78. package/dist/core/Context.d.ts +15 -7
  79. package/dist/core/Context.d.ts.map +1 -1
  80. package/dist/core/Context.js +3 -0
  81. package/dist/core/WriteClient.d.ts +43 -45
  82. package/dist/core/WriteClient.d.ts.map +1 -1
  83. package/dist/core/WriteClient.js +156 -81
  84. package/dist/core/__tests__/WriteClient.test.js +12 -8
  85. package/dist/core/api/v2/parser/__tests__/getType.test.js +7 -25
  86. package/dist/core/api/v2/parser/getModel.d.ts.map +1 -1
  87. package/dist/core/api/v2/parser/getModel.js +5 -2
  88. package/dist/core/api/v2/parser/getModelProperties.d.ts.map +1 -1
  89. package/dist/core/api/v2/parser/getModelProperties.js +3 -1
  90. package/dist/core/api/v2/parser/getModels.d.ts.map +1 -1
  91. package/dist/core/api/v2/parser/getModels.js +3 -29
  92. package/dist/core/api/v2/parser/getOperation.d.ts +1 -1
  93. package/dist/core/api/v2/parser/getOperation.d.ts.map +1 -1
  94. package/dist/core/api/v2/parser/getOperation.js +3 -3
  95. package/dist/core/api/v2/parser/getOperationParameter.d.ts +1 -1
  96. package/dist/core/api/v2/parser/getOperationParameter.d.ts.map +1 -1
  97. package/dist/core/api/v2/parser/getOperationParameter.js +4 -2
  98. package/dist/core/api/v2/parser/getOperationParameters.d.ts +1 -1
  99. package/dist/core/api/v2/parser/getOperationParameters.d.ts.map +1 -1
  100. package/dist/core/api/v2/parser/getOperationParameters.js +2 -2
  101. package/dist/core/api/v2/parser/getOperationResponse.d.ts.map +1 -1
  102. package/dist/core/api/v2/parser/getOperationResponse.js +3 -1
  103. package/dist/core/api/v2/parser/getOperationResponses.d.ts +1 -1
  104. package/dist/core/api/v2/parser/getOperationResponses.d.ts.map +1 -1
  105. package/dist/core/api/v2/parser/getOperationResponses.js +2 -2
  106. package/dist/core/api/v2/parser/getServiceName.d.ts +3 -0
  107. package/dist/core/api/v2/parser/getServiceName.d.ts.map +1 -0
  108. package/dist/core/api/v2/parser/getServiceName.js +8 -0
  109. package/dist/core/api/v2/parser/getServices.d.ts.map +1 -1
  110. package/dist/core/api/v2/parser/getServices.js +21 -32
  111. package/dist/core/api/v2/parser/getType.d.ts.map +1 -1
  112. package/dist/core/api/v2/parser/getType.js +13 -9
  113. package/dist/core/api/v3/parser/__tests__/getType.test.js +6 -24
  114. package/dist/core/api/v3/parser/getModel.d.ts.map +1 -1
  115. package/dist/core/api/v3/parser/getModel.js +5 -2
  116. package/dist/core/api/v3/parser/getModelProperties.d.ts.map +1 -1
  117. package/dist/core/api/v3/parser/getModelProperties.js +3 -1
  118. package/dist/core/api/v3/parser/getModels.d.ts.map +1 -1
  119. package/dist/core/api/v3/parser/getModels.js +3 -29
  120. package/dist/core/api/v3/parser/getOperation.d.ts +1 -1
  121. package/dist/core/api/v3/parser/getOperation.d.ts.map +1 -1
  122. package/dist/core/api/v3/parser/getOperation.js +4 -4
  123. package/dist/core/api/v3/parser/getOperationParameter.d.ts +1 -1
  124. package/dist/core/api/v3/parser/getOperationParameter.d.ts.map +1 -1
  125. package/dist/core/api/v3/parser/getOperationParameter.js +6 -3
  126. package/dist/core/api/v3/parser/getOperationParameters.d.ts +1 -1
  127. package/dist/core/api/v3/parser/getOperationParameters.d.ts.map +1 -1
  128. package/dist/core/api/v3/parser/getOperationParameters.js +2 -2
  129. package/dist/core/api/v3/parser/getOperationRequestBody.d.ts.map +1 -1
  130. package/dist/core/api/v3/parser/getOperationRequestBody.js +3 -1
  131. package/dist/core/api/v3/parser/getOperationResponse.d.ts.map +1 -1
  132. package/dist/core/api/v3/parser/getOperationResponse.js +3 -1
  133. package/dist/core/api/v3/parser/getOperationResponses.d.ts +1 -1
  134. package/dist/core/api/v3/parser/getOperationResponses.d.ts.map +1 -1
  135. package/dist/core/api/v3/parser/getOperationResponses.js +2 -2
  136. package/dist/core/api/v3/parser/getServiceName.d.ts +3 -0
  137. package/dist/core/api/v3/parser/getServiceName.d.ts.map +1 -0
  138. package/dist/core/api/v3/parser/getServiceName.js +8 -0
  139. package/dist/core/api/v3/parser/getServices.d.ts.map +1 -1
  140. package/dist/core/api/v3/parser/getServices.js +18 -84
  141. package/dist/core/api/v3/parser/getType.d.ts.map +1 -1
  142. package/dist/core/api/v3/parser/getType.js +22 -10
  143. package/dist/core/api/v3/types/OpenApiPath.model.d.ts +2 -1
  144. package/dist/core/api/v3/types/OpenApiPath.model.d.ts.map +1 -1
  145. package/dist/core/index.d.ts +1 -1
  146. package/dist/core/index.d.ts.map +1 -1
  147. package/dist/core/index.js +19 -20
  148. package/dist/core/types/base/ClientArtifacts.model.d.ts +12 -0
  149. package/dist/core/types/base/ClientArtifacts.model.d.ts.map +1 -0
  150. package/dist/core/types/base/ExportedModel.model.d.ts +17 -0
  151. package/dist/core/types/base/ExportedModel.model.d.ts.map +1 -0
  152. package/dist/core/types/base/ExportedModel.model.js +2 -0
  153. package/dist/core/types/base/ExportedService.model.d.ts +9 -0
  154. package/dist/core/types/base/ExportedService.model.d.ts.map +1 -0
  155. package/dist/core/types/base/ExportedService.model.js +2 -0
  156. package/dist/core/types/base/OutputPaths.model.d.ts +15 -0
  157. package/dist/core/types/base/OutputPaths.model.d.ts.map +1 -0
  158. package/dist/core/types/base/OutputPaths.model.js +2 -0
  159. package/dist/core/types/base/PrefixArtifacts.model.d.ts +6 -0
  160. package/dist/core/types/base/PrefixArtifacts.model.d.ts.map +1 -0
  161. package/dist/core/types/base/PrefixArtifacts.model.js +2 -0
  162. package/dist/core/types/base/PropertyGroup.model.d.ts +4 -0
  163. package/dist/core/types/base/PropertyGroup.model.d.ts.map +1 -0
  164. package/dist/core/types/base/PropertyGroup.model.js +2 -0
  165. package/dist/core/types/base/RefWithtype.model.d.ts +11 -0
  166. package/dist/core/types/base/RefWithtype.model.d.ts.map +1 -0
  167. package/dist/core/types/base/RefWithtype.model.js +2 -0
  168. package/dist/core/types/base/Root.model.d.ts +5 -0
  169. package/dist/core/types/base/Root.model.d.ts.map +1 -0
  170. package/dist/core/types/base/Root.model.js +2 -0
  171. package/dist/core/types/base/SimpleClientArtifacts.model.d.ts +10 -0
  172. package/dist/core/types/base/SimpleClientArtifacts.model.d.ts.map +1 -0
  173. package/dist/core/types/base/SimpleClientArtifacts.model.js +2 -0
  174. package/dist/core/types/enums/HttpClient.enum.d.ts +7 -0
  175. package/dist/core/types/enums/HttpClient.enum.d.ts.map +1 -0
  176. package/dist/core/types/{Enums.js → enums/HttpClient.enum.js} +1 -9
  177. package/dist/core/types/enums/TypeRef.enum.d.ts +8 -0
  178. package/dist/core/types/enums/TypeRef.enum.d.ts.map +1 -0
  179. package/dist/core/types/enums/TypeRef.enum.js +11 -0
  180. package/dist/core/utils/__tests__/getAbsolutePath.test.js +1 -1
  181. package/dist/core/utils/__tests__/getGatheringRefs.test.js +3 -6
  182. package/dist/core/utils/__tests__/getRefFromSchema.test.js +1 -1
  183. package/dist/core/utils/__tests__/pathHelpers.test.js +4 -4
  184. package/dist/core/utils/__tests__/refResolver.test.d.ts +2 -0
  185. package/dist/core/utils/__tests__/refResolver.test.d.ts.map +1 -0
  186. package/dist/core/utils/__tests__/refResolver.test.js +55 -0
  187. package/dist/core/utils/__tests__/registerHandlebarHelpers.test.js +2 -2
  188. package/dist/core/utils/__tests__/registerHandlebarTemplates.test.js +7 -3
  189. package/dist/core/utils/__tests__/resolveRefToImportPath.test.d.ts +2 -0
  190. package/dist/core/utils/__tests__/resolveRefToImportPath.test.d.ts.map +1 -0
  191. package/dist/core/utils/__tests__/resolveRefToImportPath.test.js +67 -0
  192. package/dist/core/utils/__tests__/sortByRequiredExtended.test.js +24 -24
  193. package/dist/core/utils/__tests__/sortByRequiredSimple.test.js +13 -13
  194. package/dist/core/utils/__tests__/writeClientCore.test.js +14 -6
  195. package/dist/core/utils/__tests__/writeClientFullIndex.test.d.ts +2 -0
  196. package/dist/core/utils/__tests__/writeClientFullIndex.test.d.ts.map +1 -0
  197. package/dist/core/utils/__tests__/{writeClientIndex.test.js → writeClientFullIndex.test.js} +15 -7
  198. package/dist/core/utils/__tests__/writeClientModels.test.js +15 -7
  199. package/dist/core/utils/__tests__/writeClientSchemas.test.js +15 -7
  200. package/dist/core/utils/__tests__/writeClientServices.test.js +15 -7
  201. package/dist/core/utils/advancedDeduplicatePath.d.ts +5 -0
  202. package/dist/core/utils/advancedDeduplicatePath.d.ts.map +1 -0
  203. package/dist/core/utils/advancedDeduplicatePath.js +29 -0
  204. package/dist/core/utils/appendUniqueLinesToFile.d.ts +2 -0
  205. package/dist/core/utils/appendUniqueLinesToFile.d.ts.map +1 -0
  206. package/dist/core/utils/appendUniqueLinesToFile.js +24 -0
  207. package/dist/core/utils/createNormalizedRef.d.ts +7 -0
  208. package/dist/core/utils/createNormalizedRef.d.ts.map +1 -0
  209. package/dist/core/utils/createNormalizedRef.js +24 -0
  210. package/dist/core/utils/findCommonParent.d.ts +7 -0
  211. package/dist/core/utils/findCommonParent.d.ts.map +1 -0
  212. package/dist/core/utils/findCommonParent.js +20 -0
  213. package/dist/core/utils/getAbsolutePath.d.ts.map +1 -1
  214. package/dist/core/utils/getAbsolutePath.js +16 -5
  215. package/dist/core/utils/getGatheringRefs.d.ts +2 -2
  216. package/dist/core/utils/getGatheringRefs.d.ts.map +1 -1
  217. package/dist/core/utils/getGatheringRefs.js +26 -17
  218. package/dist/core/utils/getMappedType.d.ts +0 -1
  219. package/dist/core/utils/getMappedType.d.ts.map +1 -1
  220. package/dist/core/utils/getMappedType.js +3 -4
  221. package/dist/core/utils/getOpenApiSpec.d.ts.map +1 -1
  222. package/dist/core/utils/getOpenApiSpec.js +9 -32
  223. package/dist/core/utils/getOutputPaths.d.ts +2 -2
  224. package/dist/core/utils/getOutputPaths.d.ts.map +1 -1
  225. package/dist/core/utils/getPropertyGroupExtended.d.ts +2 -2
  226. package/dist/core/utils/getPropertyGroupExtended.d.ts.map +1 -1
  227. package/dist/core/utils/getPropertyGroupSimple.d.ts +2 -2
  228. package/dist/core/utils/getPropertyGroupSimple.d.ts.map +1 -1
  229. package/dist/core/utils/getRefFromSchema.js +2 -2
  230. package/dist/core/utils/getRelativeModelImportPath.js +1 -1
  231. package/dist/core/utils/getRelativeModelPath.d.ts.map +1 -1
  232. package/dist/core/utils/getRelativeModelPath.js +5 -0
  233. package/dist/core/utils/isDirectory.d.ts +2 -0
  234. package/dist/core/utils/isDirectory.d.ts.map +1 -0
  235. package/dist/core/utils/isDirectory.js +13 -0
  236. package/dist/core/utils/isFileName.d.ts +7 -0
  237. package/dist/core/utils/isFileName.d.ts.map +1 -0
  238. package/dist/core/utils/isFileName.js +30 -0
  239. package/dist/core/utils/mapPathToTargetDirSafe.d.ts +10 -0
  240. package/dist/core/utils/mapPathToTargetDirSafe.d.ts.map +1 -0
  241. package/dist/core/utils/mapPathToTargetDirSafe.js +49 -0
  242. package/dist/core/utils/modelHelpers.d.ts +28 -0
  243. package/dist/core/utils/modelHelpers.d.ts.map +1 -0
  244. package/dist/core/utils/modelHelpers.js +73 -0
  245. package/dist/core/utils/normalizeAllRefs.d.ts +6 -0
  246. package/dist/core/utils/normalizeAllRefs.d.ts.map +1 -0
  247. package/dist/core/utils/normalizeAllRefs.js +35 -0
  248. package/dist/core/utils/normalizePath.d.ts +5 -0
  249. package/dist/core/utils/normalizePath.d.ts.map +1 -0
  250. package/dist/core/utils/normalizePath.js +19 -0
  251. package/dist/core/utils/normalizeRef.d.ts +5 -0
  252. package/dist/core/utils/normalizeRef.d.ts.map +1 -0
  253. package/dist/core/utils/normalizeRef.js +17 -0
  254. package/dist/core/utils/parseRef.d.ts +18 -0
  255. package/dist/core/utils/parseRef.d.ts.map +1 -0
  256. package/dist/core/utils/parseRef.js +64 -0
  257. package/dist/core/utils/pathHelpers.d.ts +1 -0
  258. package/dist/core/utils/pathHelpers.d.ts.map +1 -1
  259. package/dist/core/utils/pathHelpers.js +23 -3
  260. package/dist/core/utils/prepareAlias.d.ts +2 -6
  261. package/dist/core/utils/prepareAlias.d.ts.map +1 -1
  262. package/dist/core/utils/prepareAlias.js +0 -4
  263. package/dist/core/utils/prepareOptions.d.ts.map +1 -1
  264. package/dist/core/utils/prepareOptions.js +5 -7
  265. package/dist/core/utils/registerHandlebarHelpers.d.ts +1 -1
  266. package/dist/core/utils/registerHandlebarHelpers.d.ts.map +1 -1
  267. package/dist/core/utils/registerHandlebarTemplates.d.ts +9 -2
  268. package/dist/core/utils/registerHandlebarTemplates.d.ts.map +1 -1
  269. package/dist/core/utils/registerHandlebarTemplates.js +90 -78
  270. package/dist/core/utils/resolveRefPath.d.ts +7 -0
  271. package/dist/core/utils/resolveRefPath.d.ts.map +1 -0
  272. package/dist/core/utils/resolveRefPath.js +34 -0
  273. package/dist/core/utils/resolveRefToImportPath.d.ts +7 -0
  274. package/dist/core/utils/resolveRefToImportPath.d.ts.map +1 -0
  275. package/dist/core/utils/resolveRefToImportPath.js +45 -0
  276. package/dist/core/utils/serviceHelpers.d.ts +41 -0
  277. package/dist/core/utils/serviceHelpers.d.ts.map +1 -0
  278. package/dist/core/utils/serviceHelpers.js +115 -0
  279. package/dist/core/utils/sortModelByName.d.ts +2 -2
  280. package/dist/core/utils/sortModelByName.d.ts.map +1 -1
  281. package/dist/core/utils/writeClientCore.d.ts +4 -2
  282. package/dist/core/utils/writeClientCore.d.ts.map +1 -1
  283. package/dist/core/utils/writeClientCore.js +4 -1
  284. package/dist/core/utils/writeClientCoreIndex.d.ts +11 -0
  285. package/dist/core/utils/writeClientCoreIndex.d.ts.map +1 -0
  286. package/dist/core/utils/writeClientCoreIndex.js +16 -0
  287. package/dist/core/utils/writeClientFullIndex.d.ts +9 -0
  288. package/dist/core/utils/writeClientFullIndex.d.ts.map +1 -0
  289. package/dist/core/utils/writeClientFullIndex.js +22 -0
  290. package/dist/core/utils/writeClientModels.d.ts +3 -2
  291. package/dist/core/utils/writeClientModels.d.ts.map +1 -1
  292. package/dist/core/utils/writeClientModels.js +5 -0
  293. package/dist/core/utils/writeClientModelsIndex.d.ts +12 -0
  294. package/dist/core/utils/writeClientModelsIndex.d.ts.map +1 -0
  295. package/dist/core/utils/writeClientModelsIndex.js +16 -0
  296. package/dist/core/utils/writeClientSchemas.d.ts +3 -2
  297. package/dist/core/utils/writeClientSchemas.d.ts.map +1 -1
  298. package/dist/core/utils/writeClientSchemas.js +5 -0
  299. package/dist/core/utils/writeClientSchemasIndex.d.ts +12 -0
  300. package/dist/core/utils/writeClientSchemasIndex.d.ts.map +1 -0
  301. package/dist/core/utils/writeClientSchemasIndex.js +16 -0
  302. package/dist/core/utils/writeClientServices.d.ts +5 -4
  303. package/dist/core/utils/writeClientServices.d.ts.map +1 -1
  304. package/dist/core/utils/writeClientServices.js +4 -0
  305. package/dist/core/utils/writeClientServicesIndex.d.ts +12 -0
  306. package/dist/core/utils/writeClientServicesIndex.d.ts.map +1 -0
  307. package/dist/core/utils/writeClientServicesIndex.js +16 -0
  308. package/dist/core/utils/writeClientSimpleIndex.d.ts +9 -0
  309. package/dist/core/utils/writeClientSimpleIndex.d.ts.map +1 -0
  310. package/dist/core/utils/writeClientSimpleIndex.js +22 -0
  311. package/dist/templatesCompiled/cli/openApiConfig.d.ts +9 -0
  312. package/dist/templatesCompiled/cli/openApiConfig.d.ts.map +1 -0
  313. package/dist/templatesCompiled/cli/openApiConfig.js +21 -0
  314. package/dist/templatesCompiled/client/core/ApiError.d.ts.map +1 -0
  315. package/dist/templatesCompiled/client/core/ApiRequestOptions.d.ts.map +1 -0
  316. package/dist/templatesCompiled/client/core/ApiResult.d.ts.map +1 -0
  317. package/dist/templatesCompiled/client/core/CancelablePromise.d.ts.map +1 -0
  318. package/dist/templatesCompiled/client/core/HttpStatusCode.d.ts.map +1 -0
  319. package/dist/templatesCompiled/client/core/OpenAPI.d.ts.map +1 -0
  320. package/dist/templatesCompiled/client/core/axios/getHeaders.d.ts.map +1 -0
  321. package/dist/templatesCompiled/client/core/axios/getRequestBody.d.ts.map +1 -0
  322. package/dist/templatesCompiled/client/core/axios/getResponseBody.d.ts.map +1 -0
  323. package/dist/templatesCompiled/client/core/axios/getResponseHeader.d.ts.map +1 -0
  324. package/dist/templatesCompiled/client/core/axios/request.d.ts.map +1 -0
  325. package/dist/templatesCompiled/client/core/axios/sendRequest.d.ts.map +1 -0
  326. package/dist/templatesCompiled/client/core/fetch/getHeaders.d.ts.map +1 -0
  327. package/dist/templatesCompiled/client/core/fetch/getRequestBody.d.ts.map +1 -0
  328. package/dist/templatesCompiled/client/core/fetch/getResponseBody.d.ts.map +1 -0
  329. package/dist/templatesCompiled/client/core/fetch/getResponseHeader.d.ts.map +1 -0
  330. package/dist/templatesCompiled/client/core/fetch/request.d.ts.map +1 -0
  331. package/dist/templatesCompiled/client/core/fetch/sendRequest.d.ts.map +1 -0
  332. package/dist/templatesCompiled/client/core/functions/catchErrors.d.ts.map +1 -0
  333. package/dist/templatesCompiled/client/core/functions/getFormData.d.ts.map +1 -0
  334. package/dist/templatesCompiled/client/core/functions/getQueryString.d.ts.map +1 -0
  335. package/dist/templatesCompiled/client/core/functions/getUrl.d.ts.map +1 -0
  336. package/dist/templatesCompiled/client/core/functions/isBinary.d.ts.map +1 -0
  337. package/dist/templatesCompiled/client/core/functions/isBlob.d.ts.map +1 -0
  338. package/dist/templatesCompiled/client/core/functions/isDefined.d.ts.map +1 -0
  339. package/dist/templatesCompiled/client/core/functions/isString.d.ts.map +1 -0
  340. package/dist/templatesCompiled/client/core/functions/isStringWithValue.d.ts.map +1 -0
  341. package/dist/templatesCompiled/client/core/functions/isSuccess.d.ts.map +1 -0
  342. package/dist/templatesCompiled/client/core/functions/resolve.d.ts.map +1 -0
  343. package/dist/templatesCompiled/client/core/node/getHeaders.d.ts.map +1 -0
  344. package/dist/templatesCompiled/client/core/node/getRequestBody.d.ts.map +1 -0
  345. package/dist/templatesCompiled/client/core/node/getResponseBody.d.ts.map +1 -0
  346. package/dist/templatesCompiled/client/core/node/getResponseHeader.d.ts.map +1 -0
  347. package/dist/templatesCompiled/client/core/node/request.d.ts.map +1 -0
  348. package/dist/templatesCompiled/client/core/node/sendRequest.d.ts.map +1 -0
  349. package/dist/templatesCompiled/client/core/request.d.ts.map +1 -0
  350. package/dist/templatesCompiled/client/core/xhr/getHeaders.d.ts.map +1 -0
  351. package/dist/templatesCompiled/client/core/xhr/getRequestBody.d.ts.map +1 -0
  352. package/dist/templatesCompiled/client/core/xhr/getResponseBody.d.ts.map +1 -0
  353. package/dist/templatesCompiled/client/core/xhr/getResponseHeader.d.ts.map +1 -0
  354. package/dist/templatesCompiled/client/core/xhr/request.d.ts.map +1 -0
  355. package/dist/templatesCompiled/client/core/xhr/sendRequest.d.ts.map +1 -0
  356. package/dist/templatesCompiled/client/exportModel.d.ts.map +1 -0
  357. package/dist/templatesCompiled/{exportModel.js → client/exportModel.js} +2 -2
  358. package/dist/templatesCompiled/client/exportSchema.d.ts.map +1 -0
  359. package/dist/templatesCompiled/client/exportService.d.ts.map +1 -0
  360. package/dist/templatesCompiled/client/indexCore.d.ts +9 -0
  361. package/dist/templatesCompiled/client/indexCore.d.ts.map +1 -0
  362. package/dist/templatesCompiled/client/indexCore.js +22 -0
  363. package/dist/templatesCompiled/{index.d.ts → client/indexFull.d.ts} +1 -1
  364. package/dist/templatesCompiled/client/indexFull.d.ts.map +1 -0
  365. package/dist/templatesCompiled/client/indexModels.d.ts +15 -0
  366. package/dist/templatesCompiled/client/indexModels.d.ts.map +1 -0
  367. package/dist/templatesCompiled/client/indexModels.js +82 -0
  368. package/dist/templatesCompiled/client/indexServices.d.ts +10 -0
  369. package/dist/templatesCompiled/client/indexServices.d.ts.map +1 -0
  370. package/dist/templatesCompiled/client/indexServices.js +35 -0
  371. package/dist/templatesCompiled/client/indexShemas.d.ts +11 -0
  372. package/dist/templatesCompiled/client/indexShemas.d.ts.map +1 -0
  373. package/dist/templatesCompiled/client/indexShemas.js +47 -0
  374. package/dist/templatesCompiled/client/indexSimple.d.ts +21 -0
  375. package/dist/templatesCompiled/client/indexSimple.d.ts.map +1 -0
  376. package/dist/templatesCompiled/client/indexSimple.js +121 -0
  377. package/dist/templatesCompiled/client/partials/base.d.ts.map +1 -0
  378. package/dist/templatesCompiled/client/partials/exportComposition.d.ts.map +1 -0
  379. package/dist/templatesCompiled/client/partials/exportEnum.d.ts.map +1 -0
  380. package/dist/templatesCompiled/client/partials/exportInterface.d.ts.map +1 -0
  381. package/dist/templatesCompiled/client/partials/exportType.d.ts.map +1 -0
  382. package/dist/templatesCompiled/client/partials/header.d.ts.map +1 -0
  383. package/dist/templatesCompiled/client/partials/isNullable.d.ts.map +1 -0
  384. package/dist/templatesCompiled/client/partials/isReadOnly.d.ts.map +1 -0
  385. package/dist/templatesCompiled/client/partials/isRequired.d.ts.map +1 -0
  386. package/dist/templatesCompiled/client/partials/isRequiredDefinition.d.ts.map +1 -0
  387. package/dist/templatesCompiled/client/partials/parameterValues.d.ts.map +1 -0
  388. package/dist/templatesCompiled/client/partials/parameters.d.ts.map +1 -0
  389. package/dist/templatesCompiled/client/partials/parametersDefinition.d.ts.map +1 -0
  390. package/dist/templatesCompiled/client/partials/result.d.ts.map +1 -0
  391. package/dist/templatesCompiled/client/partials/schema.d.ts.map +1 -0
  392. package/dist/templatesCompiled/client/partials/schemaArray.d.ts.map +1 -0
  393. package/dist/templatesCompiled/client/partials/schemaComposition.d.ts.map +1 -0
  394. package/dist/templatesCompiled/client/partials/schemaDictionary.d.ts.map +1 -0
  395. package/dist/templatesCompiled/client/partials/schemaEnum.d.ts.map +1 -0
  396. package/dist/templatesCompiled/client/partials/schemaGeneric.d.ts.map +1 -0
  397. package/dist/templatesCompiled/client/partials/schemaInterface.d.ts.map +1 -0
  398. package/dist/templatesCompiled/client/partials/serviceOption.d.ts.map +1 -0
  399. package/dist/templatesCompiled/client/partials/type.d.ts.map +1 -0
  400. package/dist/templatesCompiled/client/partials/typeArray.d.ts.map +1 -0
  401. package/dist/templatesCompiled/client/partials/typeDictionary.d.ts.map +1 -0
  402. package/dist/templatesCompiled/client/partials/typeEnum.d.ts.map +1 -0
  403. package/dist/templatesCompiled/client/partials/typeGeneric.d.ts.map +1 -0
  404. package/dist/templatesCompiled/client/partials/typeInterface.d.ts.map +1 -0
  405. package/dist/templatesCompiled/client/partials/typeIntersection.d.ts.map +1 -0
  406. package/dist/templatesCompiled/client/partials/typeReference.d.ts.map +1 -0
  407. package/dist/templatesCompiled/client/partials/typeUnion.d.ts.map +1 -0
  408. package/package.json +7 -4
  409. package/dist/common/VersionedSchema/MultiOptionsMigrationPlan.d.ts.map +0 -1
  410. package/dist/common/VersionedSchema/MultiOptionsSchemaV1.d.ts +0 -6
  411. package/dist/common/VersionedSchema/MultiOptionsSchemaV1.d.ts.map +0 -1
  412. package/dist/common/VersionedSchema/MultiOptionsSchemaV2.d.ts +0 -6
  413. package/dist/common/VersionedSchema/MultiOptionsSchemaV2.d.ts.map +0 -1
  414. package/dist/common/VersionedSchema/MultiOptionsSchemaV3.d.ts +0 -5
  415. package/dist/common/VersionedSchema/MultiOptionsSchemaV3.d.ts.map +0 -1
  416. package/dist/common/VersionedSchema/MultiOptionsSchemaV4.d.ts +0 -6
  417. package/dist/common/VersionedSchema/MultiOptionsSchemaV4.d.ts.map +0 -1
  418. package/dist/common/VersionedSchema/MultiOptionsVersionedSchemas.d.ts +0 -3
  419. package/dist/common/VersionedSchema/MultiOptionsVersionedSchemas.d.ts.map +0 -1
  420. package/dist/common/VersionedSchema/OptionsMigrationPlans.d.ts.map +0 -1
  421. package/dist/common/VersionedSchema/OptionsMigrationPlans.js +0 -15
  422. package/dist/common/VersionedSchema/OptionsSchemaV1.d.ts +0 -6
  423. package/dist/common/VersionedSchema/OptionsSchemaV1.d.ts.map +0 -1
  424. package/dist/common/VersionedSchema/OptionsSchemaV2.d.ts +0 -6
  425. package/dist/common/VersionedSchema/OptionsSchemaV2.d.ts.map +0 -1
  426. package/dist/common/VersionedSchema/OptionsSchemaV3.d.ts +0 -5
  427. package/dist/common/VersionedSchema/OptionsSchemaV3.d.ts.map +0 -1
  428. package/dist/common/VersionedSchema/OptionsVersionedSchemas.d.ts +0 -3
  429. package/dist/common/VersionedSchema/OptionsVersionedSchemas.d.ts.map +0 -1
  430. package/dist/core/types/Enums.d.ts +0 -14
  431. package/dist/core/types/Enums.d.ts.map +0 -1
  432. package/dist/core/types/Models.d.ts +0 -37
  433. package/dist/core/types/Models.d.ts.map +0 -1
  434. package/dist/core/types/shared/ConverterData.model.d.ts +0 -7
  435. package/dist/core/types/shared/ConverterData.model.d.ts.map +0 -1
  436. package/dist/core/utils/__tests__/writeClientIndex.test.d.ts +0 -2
  437. package/dist/core/utils/__tests__/writeClientIndex.test.d.ts.map +0 -1
  438. package/dist/core/utils/writeClientIndex.d.ts +0 -59
  439. package/dist/core/utils/writeClientIndex.d.ts.map +0 -1
  440. package/dist/core/utils/writeClientIndex.js +0 -27
  441. package/dist/templatesCompiled/core/ApiError.d.ts.map +0 -1
  442. package/dist/templatesCompiled/core/ApiRequestOptions.d.ts.map +0 -1
  443. package/dist/templatesCompiled/core/ApiResult.d.ts.map +0 -1
  444. package/dist/templatesCompiled/core/CancelablePromise.d.ts.map +0 -1
  445. package/dist/templatesCompiled/core/HttpStatusCode.d.ts.map +0 -1
  446. package/dist/templatesCompiled/core/OpenAPI.d.ts.map +0 -1
  447. package/dist/templatesCompiled/core/axios/getHeaders.d.ts.map +0 -1
  448. package/dist/templatesCompiled/core/axios/getRequestBody.d.ts.map +0 -1
  449. package/dist/templatesCompiled/core/axios/getResponseBody.d.ts.map +0 -1
  450. package/dist/templatesCompiled/core/axios/getResponseHeader.d.ts.map +0 -1
  451. package/dist/templatesCompiled/core/axios/request.d.ts.map +0 -1
  452. package/dist/templatesCompiled/core/axios/sendRequest.d.ts.map +0 -1
  453. package/dist/templatesCompiled/core/fetch/getHeaders.d.ts.map +0 -1
  454. package/dist/templatesCompiled/core/fetch/getRequestBody.d.ts.map +0 -1
  455. package/dist/templatesCompiled/core/fetch/getResponseBody.d.ts.map +0 -1
  456. package/dist/templatesCompiled/core/fetch/getResponseHeader.d.ts.map +0 -1
  457. package/dist/templatesCompiled/core/fetch/request.d.ts.map +0 -1
  458. package/dist/templatesCompiled/core/fetch/sendRequest.d.ts.map +0 -1
  459. package/dist/templatesCompiled/core/functions/catchErrors.d.ts.map +0 -1
  460. package/dist/templatesCompiled/core/functions/getFormData.d.ts.map +0 -1
  461. package/dist/templatesCompiled/core/functions/getQueryString.d.ts.map +0 -1
  462. package/dist/templatesCompiled/core/functions/getUrl.d.ts.map +0 -1
  463. package/dist/templatesCompiled/core/functions/isBinary.d.ts.map +0 -1
  464. package/dist/templatesCompiled/core/functions/isBlob.d.ts.map +0 -1
  465. package/dist/templatesCompiled/core/functions/isDefined.d.ts.map +0 -1
  466. package/dist/templatesCompiled/core/functions/isString.d.ts.map +0 -1
  467. package/dist/templatesCompiled/core/functions/isStringWithValue.d.ts.map +0 -1
  468. package/dist/templatesCompiled/core/functions/isSuccess.d.ts.map +0 -1
  469. package/dist/templatesCompiled/core/functions/resolve.d.ts.map +0 -1
  470. package/dist/templatesCompiled/core/node/getHeaders.d.ts.map +0 -1
  471. package/dist/templatesCompiled/core/node/getRequestBody.d.ts.map +0 -1
  472. package/dist/templatesCompiled/core/node/getResponseBody.d.ts.map +0 -1
  473. package/dist/templatesCompiled/core/node/getResponseHeader.d.ts.map +0 -1
  474. package/dist/templatesCompiled/core/node/request.d.ts.map +0 -1
  475. package/dist/templatesCompiled/core/node/sendRequest.d.ts.map +0 -1
  476. package/dist/templatesCompiled/core/request.d.ts.map +0 -1
  477. package/dist/templatesCompiled/core/xhr/getHeaders.d.ts.map +0 -1
  478. package/dist/templatesCompiled/core/xhr/getRequestBody.d.ts.map +0 -1
  479. package/dist/templatesCompiled/core/xhr/getResponseBody.d.ts.map +0 -1
  480. package/dist/templatesCompiled/core/xhr/getResponseHeader.d.ts.map +0 -1
  481. package/dist/templatesCompiled/core/xhr/request.d.ts.map +0 -1
  482. package/dist/templatesCompiled/core/xhr/sendRequest.d.ts.map +0 -1
  483. package/dist/templatesCompiled/exportModel.d.ts.map +0 -1
  484. package/dist/templatesCompiled/exportSchema.d.ts.map +0 -1
  485. package/dist/templatesCompiled/exportService.d.ts.map +0 -1
  486. package/dist/templatesCompiled/index.d.ts.map +0 -1
  487. package/dist/templatesCompiled/partials/base.d.ts.map +0 -1
  488. package/dist/templatesCompiled/partials/exportComposition.d.ts.map +0 -1
  489. package/dist/templatesCompiled/partials/exportEnum.d.ts.map +0 -1
  490. package/dist/templatesCompiled/partials/exportInterface.d.ts.map +0 -1
  491. package/dist/templatesCompiled/partials/exportType.d.ts.map +0 -1
  492. package/dist/templatesCompiled/partials/header.d.ts.map +0 -1
  493. package/dist/templatesCompiled/partials/isNullable.d.ts.map +0 -1
  494. package/dist/templatesCompiled/partials/isReadOnly.d.ts.map +0 -1
  495. package/dist/templatesCompiled/partials/isRequired.d.ts.map +0 -1
  496. package/dist/templatesCompiled/partials/isRequiredDefinition.d.ts.map +0 -1
  497. package/dist/templatesCompiled/partials/parameterValues.d.ts.map +0 -1
  498. package/dist/templatesCompiled/partials/parameters.d.ts.map +0 -1
  499. package/dist/templatesCompiled/partials/parametersDefinition.d.ts.map +0 -1
  500. package/dist/templatesCompiled/partials/result.d.ts.map +0 -1
  501. package/dist/templatesCompiled/partials/schema.d.ts.map +0 -1
  502. package/dist/templatesCompiled/partials/schemaArray.d.ts.map +0 -1
  503. package/dist/templatesCompiled/partials/schemaComposition.d.ts.map +0 -1
  504. package/dist/templatesCompiled/partials/schemaDictionary.d.ts.map +0 -1
  505. package/dist/templatesCompiled/partials/schemaEnum.d.ts.map +0 -1
  506. package/dist/templatesCompiled/partials/schemaGeneric.d.ts.map +0 -1
  507. package/dist/templatesCompiled/partials/schemaInterface.d.ts.map +0 -1
  508. package/dist/templatesCompiled/partials/serviceOption.d.ts.map +0 -1
  509. package/dist/templatesCompiled/partials/type.d.ts.map +0 -1
  510. package/dist/templatesCompiled/partials/typeArray.d.ts.map +0 -1
  511. package/dist/templatesCompiled/partials/typeDictionary.d.ts.map +0 -1
  512. package/dist/templatesCompiled/partials/typeEnum.d.ts.map +0 -1
  513. package/dist/templatesCompiled/partials/typeGeneric.d.ts.map +0 -1
  514. package/dist/templatesCompiled/partials/typeInterface.d.ts.map +0 -1
  515. package/dist/templatesCompiled/partials/typeIntersection.d.ts.map +0 -1
  516. package/dist/templatesCompiled/partials/typeReference.d.ts.map +0 -1
  517. package/dist/templatesCompiled/partials/typeUnion.d.ts.map +0 -1
  518. /package/dist/{core/types/Models.js → cli/initOpenApiConfig/Types.js} +0 -0
  519. /package/dist/core/types/{shared/ConverterData.model.js → base/ClientArtifacts.model.js} +0 -0
  520. /package/dist/templatesCompiled/{core → client/core}/ApiError.d.ts +0 -0
  521. /package/dist/templatesCompiled/{core → client/core}/ApiError.js +0 -0
  522. /package/dist/templatesCompiled/{core → client/core}/ApiRequestOptions.d.ts +0 -0
  523. /package/dist/templatesCompiled/{core → client/core}/ApiRequestOptions.js +0 -0
  524. /package/dist/templatesCompiled/{core → client/core}/ApiResult.d.ts +0 -0
  525. /package/dist/templatesCompiled/{core → client/core}/ApiResult.js +0 -0
  526. /package/dist/templatesCompiled/{core → client/core}/CancelablePromise.d.ts +0 -0
  527. /package/dist/templatesCompiled/{core → client/core}/CancelablePromise.js +0 -0
  528. /package/dist/templatesCompiled/{core → client/core}/HttpStatusCode.d.ts +0 -0
  529. /package/dist/templatesCompiled/{core → client/core}/HttpStatusCode.js +0 -0
  530. /package/dist/templatesCompiled/{core → client/core}/OpenAPI.d.ts +0 -0
  531. /package/dist/templatesCompiled/{core → client/core}/OpenAPI.js +0 -0
  532. /package/dist/templatesCompiled/{core → client/core}/axios/getHeaders.d.ts +0 -0
  533. /package/dist/templatesCompiled/{core → client/core}/axios/getHeaders.js +0 -0
  534. /package/dist/templatesCompiled/{core → client/core}/axios/getRequestBody.d.ts +0 -0
  535. /package/dist/templatesCompiled/{core → client/core}/axios/getRequestBody.js +0 -0
  536. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseBody.d.ts +0 -0
  537. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseBody.js +0 -0
  538. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseHeader.d.ts +0 -0
  539. /package/dist/templatesCompiled/{core → client/core}/axios/getResponseHeader.js +0 -0
  540. /package/dist/templatesCompiled/{core → client/core}/axios/request.d.ts +0 -0
  541. /package/dist/templatesCompiled/{core → client/core}/axios/request.js +0 -0
  542. /package/dist/templatesCompiled/{core → client/core}/axios/sendRequest.d.ts +0 -0
  543. /package/dist/templatesCompiled/{core → client/core}/axios/sendRequest.js +0 -0
  544. /package/dist/templatesCompiled/{core → client/core}/fetch/getHeaders.d.ts +0 -0
  545. /package/dist/templatesCompiled/{core → client/core}/fetch/getHeaders.js +0 -0
  546. /package/dist/templatesCompiled/{core → client/core}/fetch/getRequestBody.d.ts +0 -0
  547. /package/dist/templatesCompiled/{core → client/core}/fetch/getRequestBody.js +0 -0
  548. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseBody.d.ts +0 -0
  549. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseBody.js +0 -0
  550. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseHeader.d.ts +0 -0
  551. /package/dist/templatesCompiled/{core → client/core}/fetch/getResponseHeader.js +0 -0
  552. /package/dist/templatesCompiled/{core → client/core}/fetch/request.d.ts +0 -0
  553. /package/dist/templatesCompiled/{core → client/core}/fetch/request.js +0 -0
  554. /package/dist/templatesCompiled/{core → client/core}/fetch/sendRequest.d.ts +0 -0
  555. /package/dist/templatesCompiled/{core → client/core}/fetch/sendRequest.js +0 -0
  556. /package/dist/templatesCompiled/{core → client/core}/functions/catchErrors.d.ts +0 -0
  557. /package/dist/templatesCompiled/{core → client/core}/functions/catchErrors.js +0 -0
  558. /package/dist/templatesCompiled/{core → client/core}/functions/getFormData.d.ts +0 -0
  559. /package/dist/templatesCompiled/{core → client/core}/functions/getFormData.js +0 -0
  560. /package/dist/templatesCompiled/{core → client/core}/functions/getQueryString.d.ts +0 -0
  561. /package/dist/templatesCompiled/{core → client/core}/functions/getQueryString.js +0 -0
  562. /package/dist/templatesCompiled/{core → client/core}/functions/getUrl.d.ts +0 -0
  563. /package/dist/templatesCompiled/{core → client/core}/functions/getUrl.js +0 -0
  564. /package/dist/templatesCompiled/{core → client/core}/functions/isBinary.d.ts +0 -0
  565. /package/dist/templatesCompiled/{core → client/core}/functions/isBinary.js +0 -0
  566. /package/dist/templatesCompiled/{core → client/core}/functions/isBlob.d.ts +0 -0
  567. /package/dist/templatesCompiled/{core → client/core}/functions/isBlob.js +0 -0
  568. /package/dist/templatesCompiled/{core → client/core}/functions/isDefined.d.ts +0 -0
  569. /package/dist/templatesCompiled/{core → client/core}/functions/isDefined.js +0 -0
  570. /package/dist/templatesCompiled/{core → client/core}/functions/isString.d.ts +0 -0
  571. /package/dist/templatesCompiled/{core → client/core}/functions/isString.js +0 -0
  572. /package/dist/templatesCompiled/{core → client/core}/functions/isStringWithValue.d.ts +0 -0
  573. /package/dist/templatesCompiled/{core → client/core}/functions/isStringWithValue.js +0 -0
  574. /package/dist/templatesCompiled/{core → client/core}/functions/isSuccess.d.ts +0 -0
  575. /package/dist/templatesCompiled/{core → client/core}/functions/isSuccess.js +0 -0
  576. /package/dist/templatesCompiled/{core → client/core}/functions/resolve.d.ts +0 -0
  577. /package/dist/templatesCompiled/{core → client/core}/functions/resolve.js +0 -0
  578. /package/dist/templatesCompiled/{core → client/core}/node/getHeaders.d.ts +0 -0
  579. /package/dist/templatesCompiled/{core → client/core}/node/getHeaders.js +0 -0
  580. /package/dist/templatesCompiled/{core → client/core}/node/getRequestBody.d.ts +0 -0
  581. /package/dist/templatesCompiled/{core → client/core}/node/getRequestBody.js +0 -0
  582. /package/dist/templatesCompiled/{core → client/core}/node/getResponseBody.d.ts +0 -0
  583. /package/dist/templatesCompiled/{core → client/core}/node/getResponseBody.js +0 -0
  584. /package/dist/templatesCompiled/{core → client/core}/node/getResponseHeader.d.ts +0 -0
  585. /package/dist/templatesCompiled/{core → client/core}/node/getResponseHeader.js +0 -0
  586. /package/dist/templatesCompiled/{core → client/core}/node/request.d.ts +0 -0
  587. /package/dist/templatesCompiled/{core → client/core}/node/request.js +0 -0
  588. /package/dist/templatesCompiled/{core → client/core}/node/sendRequest.d.ts +0 -0
  589. /package/dist/templatesCompiled/{core → client/core}/node/sendRequest.js +0 -0
  590. /package/dist/templatesCompiled/{core → client/core}/request.d.ts +0 -0
  591. /package/dist/templatesCompiled/{core → client/core}/request.js +0 -0
  592. /package/dist/templatesCompiled/{core → client/core}/xhr/getHeaders.d.ts +0 -0
  593. /package/dist/templatesCompiled/{core → client/core}/xhr/getHeaders.js +0 -0
  594. /package/dist/templatesCompiled/{core → client/core}/xhr/getRequestBody.d.ts +0 -0
  595. /package/dist/templatesCompiled/{core → client/core}/xhr/getRequestBody.js +0 -0
  596. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseBody.d.ts +0 -0
  597. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseBody.js +0 -0
  598. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseHeader.d.ts +0 -0
  599. /package/dist/templatesCompiled/{core → client/core}/xhr/getResponseHeader.js +0 -0
  600. /package/dist/templatesCompiled/{core → client/core}/xhr/request.d.ts +0 -0
  601. /package/dist/templatesCompiled/{core → client/core}/xhr/request.js +0 -0
  602. /package/dist/templatesCompiled/{core → client/core}/xhr/sendRequest.d.ts +0 -0
  603. /package/dist/templatesCompiled/{core → client/core}/xhr/sendRequest.js +0 -0
  604. /package/dist/templatesCompiled/{exportModel.d.ts → client/exportModel.d.ts} +0 -0
  605. /package/dist/templatesCompiled/{exportSchema.d.ts → client/exportSchema.d.ts} +0 -0
  606. /package/dist/templatesCompiled/{exportSchema.js → client/exportSchema.js} +0 -0
  607. /package/dist/templatesCompiled/{exportService.d.ts → client/exportService.d.ts} +0 -0
  608. /package/dist/templatesCompiled/{exportService.js → client/exportService.js} +0 -0
  609. /package/dist/templatesCompiled/{index.js → client/indexFull.js} +0 -0
  610. /package/dist/templatesCompiled/{partials → client/partials}/base.d.ts +0 -0
  611. /package/dist/templatesCompiled/{partials → client/partials}/base.js +0 -0
  612. /package/dist/templatesCompiled/{partials → client/partials}/exportComposition.d.ts +0 -0
  613. /package/dist/templatesCompiled/{partials → client/partials}/exportComposition.js +0 -0
  614. /package/dist/templatesCompiled/{partials → client/partials}/exportEnum.d.ts +0 -0
  615. /package/dist/templatesCompiled/{partials → client/partials}/exportEnum.js +0 -0
  616. /package/dist/templatesCompiled/{partials → client/partials}/exportInterface.d.ts +0 -0
  617. /package/dist/templatesCompiled/{partials → client/partials}/exportInterface.js +0 -0
  618. /package/dist/templatesCompiled/{partials → client/partials}/exportType.d.ts +0 -0
  619. /package/dist/templatesCompiled/{partials → client/partials}/exportType.js +0 -0
  620. /package/dist/templatesCompiled/{partials → client/partials}/header.d.ts +0 -0
  621. /package/dist/templatesCompiled/{partials → client/partials}/header.js +0 -0
  622. /package/dist/templatesCompiled/{partials → client/partials}/isNullable.d.ts +0 -0
  623. /package/dist/templatesCompiled/{partials → client/partials}/isNullable.js +0 -0
  624. /package/dist/templatesCompiled/{partials → client/partials}/isReadOnly.d.ts +0 -0
  625. /package/dist/templatesCompiled/{partials → client/partials}/isReadOnly.js +0 -0
  626. /package/dist/templatesCompiled/{partials → client/partials}/isRequired.d.ts +0 -0
  627. /package/dist/templatesCompiled/{partials → client/partials}/isRequired.js +0 -0
  628. /package/dist/templatesCompiled/{partials → client/partials}/isRequiredDefinition.d.ts +0 -0
  629. /package/dist/templatesCompiled/{partials → client/partials}/isRequiredDefinition.js +0 -0
  630. /package/dist/templatesCompiled/{partials → client/partials}/parameterValues.d.ts +0 -0
  631. /package/dist/templatesCompiled/{partials → client/partials}/parameterValues.js +0 -0
  632. /package/dist/templatesCompiled/{partials → client/partials}/parameters.d.ts +0 -0
  633. /package/dist/templatesCompiled/{partials → client/partials}/parameters.js +0 -0
  634. /package/dist/templatesCompiled/{partials → client/partials}/parametersDefinition.d.ts +0 -0
  635. /package/dist/templatesCompiled/{partials → client/partials}/parametersDefinition.js +0 -0
  636. /package/dist/templatesCompiled/{partials → client/partials}/result.d.ts +0 -0
  637. /package/dist/templatesCompiled/{partials → client/partials}/result.js +0 -0
  638. /package/dist/templatesCompiled/{partials → client/partials}/schema.d.ts +0 -0
  639. /package/dist/templatesCompiled/{partials → client/partials}/schema.js +0 -0
  640. /package/dist/templatesCompiled/{partials → client/partials}/schemaArray.d.ts +0 -0
  641. /package/dist/templatesCompiled/{partials → client/partials}/schemaArray.js +0 -0
  642. /package/dist/templatesCompiled/{partials → client/partials}/schemaComposition.d.ts +0 -0
  643. /package/dist/templatesCompiled/{partials → client/partials}/schemaComposition.js +0 -0
  644. /package/dist/templatesCompiled/{partials → client/partials}/schemaDictionary.d.ts +0 -0
  645. /package/dist/templatesCompiled/{partials → client/partials}/schemaDictionary.js +0 -0
  646. /package/dist/templatesCompiled/{partials → client/partials}/schemaEnum.d.ts +0 -0
  647. /package/dist/templatesCompiled/{partials → client/partials}/schemaEnum.js +0 -0
  648. /package/dist/templatesCompiled/{partials → client/partials}/schemaGeneric.d.ts +0 -0
  649. /package/dist/templatesCompiled/{partials → client/partials}/schemaGeneric.js +0 -0
  650. /package/dist/templatesCompiled/{partials → client/partials}/schemaInterface.d.ts +0 -0
  651. /package/dist/templatesCompiled/{partials → client/partials}/schemaInterface.js +0 -0
  652. /package/dist/templatesCompiled/{partials → client/partials}/serviceOption.d.ts +0 -0
  653. /package/dist/templatesCompiled/{partials → client/partials}/serviceOption.js +0 -0
  654. /package/dist/templatesCompiled/{partials → client/partials}/type.d.ts +0 -0
  655. /package/dist/templatesCompiled/{partials → client/partials}/type.js +0 -0
  656. /package/dist/templatesCompiled/{partials → client/partials}/typeArray.d.ts +0 -0
  657. /package/dist/templatesCompiled/{partials → client/partials}/typeArray.js +0 -0
  658. /package/dist/templatesCompiled/{partials → client/partials}/typeDictionary.d.ts +0 -0
  659. /package/dist/templatesCompiled/{partials → client/partials}/typeDictionary.js +0 -0
  660. /package/dist/templatesCompiled/{partials → client/partials}/typeEnum.d.ts +0 -0
  661. /package/dist/templatesCompiled/{partials → client/partials}/typeEnum.js +0 -0
  662. /package/dist/templatesCompiled/{partials → client/partials}/typeGeneric.d.ts +0 -0
  663. /package/dist/templatesCompiled/{partials → client/partials}/typeGeneric.js +0 -0
  664. /package/dist/templatesCompiled/{partials → client/partials}/typeInterface.d.ts +0 -0
  665. /package/dist/templatesCompiled/{partials → client/partials}/typeInterface.js +0 -0
  666. /package/dist/templatesCompiled/{partials → client/partials}/typeIntersection.d.ts +0 -0
  667. /package/dist/templatesCompiled/{partials → client/partials}/typeIntersection.js +0 -0
  668. /package/dist/templatesCompiled/{partials → client/partials}/typeReference.d.ts +0 -0
  669. /package/dist/templatesCompiled/{partials → client/partials}/typeReference.js +0 -0
  670. /package/dist/templatesCompiled/{partials → client/partials}/typeUnion.d.ts +0 -0
  671. /package/dist/templatesCompiled/{partials → client/partials}/typeUnion.js +0 -0
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isFileName = isFileName;
4
+ /**
5
+ * Checks if the string is just a file name (with an extension)
6
+ * @param str - the line to check
7
+ * @returns true, if this is the file name
8
+ */
9
+ function isFileName(str) {
10
+ if (typeof str !== 'string' || !str)
11
+ return false;
12
+ // 1. Does not contain path separators
13
+ if (str.includes('/') || str.includes('\\'))
14
+ return false;
15
+ // 2. Does not start with ./, ../, \
16
+ if (/^\.\.?[\\/\\]/.test(str))
17
+ return false;
18
+ if (str.startsWith('/'))
19
+ return false;
20
+ // 3. Contains at least one dot and does not end with a dot.
21
+ const parts = str.split('.');
22
+ if (parts.length < 2)
23
+ return false;
24
+ if (parts[parts.length - 1] === '')
25
+ return false; // ends with .
26
+ // 4. The file name is not empty
27
+ if (parts[0] === '')
28
+ return false;
29
+ return true;
30
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Safely muppit the path from SourceDir → targetDir
3
+ * Works even if the file is outside SourceDir, but in a common parent
4
+ * @param filePath
5
+ * @param sourceDir
6
+ * @param targetDir
7
+ * @returns
8
+ */
9
+ export declare function mapPathToTargetDirSafe(filePath: string, sourceDir: string, targetDir: string): string;
10
+ //# sourceMappingURL=mapPathToTargetDirSafe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapPathToTargetDirSafe.d.ts","sourceRoot":"","sources":["../../../src/core/utils/mapPathToTargetDirSafe.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA0CrG"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mapPathToTargetDirSafe = mapPathToTargetDirSafe;
4
+ const path_1 = require("path");
5
+ const findCommonParent_1 = require("./findCommonParent");
6
+ const getRelativeModelPath_1 = require("./getRelativeModelPath");
7
+ const pathHelpers_1 = require("./pathHelpers");
8
+ /**
9
+ * Safely muppit the path from SourceDir → targetDir
10
+ * Works even if the file is outside SourceDir, but in a common parent
11
+ * @param filePath
12
+ * @param sourceDir
13
+ * @param targetDir
14
+ * @returns
15
+ */
16
+ function mapPathToTargetDirSafe(filePath, sourceDir, targetDir) {
17
+ const pathSep = '/';
18
+ const absFile = (0, pathHelpers_1.resolve)(filePath);
19
+ const absSource = (0, pathHelpers_1.resolve)(sourceDir);
20
+ const absTarget = (0, pathHelpers_1.resolve)(targetDir);
21
+ const sourceWithSep = absSource.endsWith(pathSep) ? absSource : absSource + pathSep;
22
+ // 1. The file inside SourceDir → mapim as usual
23
+ if (absFile.startsWith(sourceWithSep)) {
24
+ const rel = (0, path_1.relative)(absSource, absFile);
25
+ return (0, pathHelpers_1.resolve)(absTarget, rel);
26
+ }
27
+ // 2. The file is outside SourceDir, but in a common parent
28
+ const commonParent = (0, findCommonParent_1.findCommonParent)(absSource, absFile);
29
+ if (commonParent) {
30
+ // Path from commonParent → file
31
+ const fileRelToCommon = (0, path_1.relative)(commonParent, absFile);
32
+ // Path from targetDir → commonParent
33
+ const targetToCommon = (0, path_1.relative)(absTarget, commonParent);
34
+ if (targetToCommon.includes('..')) {
35
+ // targetDir is higher than commonParent → we can't map
36
+ if (filePath) {
37
+ const relativePath = (0, path_1.relative)(absSource, absFile);
38
+ return (0, getRelativeModelPath_1.getRelativeModelPath)(targetDir, relativePath);
39
+ }
40
+ return filePath;
41
+ }
42
+ // Collecting: targetDir → commonParent → file
43
+ const pathFromTargetToCommon = (0, path_1.relative)(absTarget, commonParent);
44
+ const pathFromCommonToFile = fileRelToCommon;
45
+ return (0, pathHelpers_1.resolve)(absTarget, pathFromTargetToCommon, pathFromCommonToFile);
46
+ }
47
+ // 3. There is no common parent → return as is
48
+ return filePath;
49
+ }
@@ -0,0 +1,28 @@
1
+ import type { Model } from '../types/shared/Model.model';
2
+ /**
3
+ * Assigns alias to models with the same name.
4
+ * Modifies objects of in-place models and returns an array.
5
+ *
6
+ * Example: if there are two models with name="Pet", the following will be assigned:
7
+ * - first: alias="Pet$1"
8
+ * - second: alias="Pet$2"
9
+ *
10
+ * @param models - an array of models sorted by name
11
+ * @returns the same array of models (modified)
12
+ */
13
+ export declare function setDuplicateModelAliases(models: Model[]): Model[];
14
+ /**
15
+ * Adjusts the imports fields of the models to relative paths and correct aliases,
16
+ * based on the outputModelsDir directory.
17
+ *
18
+ * Logic:
19
+ * - searches for the target model by name + path;
20
+ * - if found, calculates the relative path between files and substitutes;
21
+ * - updates alias (if it is set for the target model) and path in the import object.
22
+ *
23
+ * @param models - array of models
24
+ * @param outputModelsDir - the directory where the models are generated (this.context.output.outputModels)
25
+ * @returns the same array of models (modified)
26
+ */
27
+ export declare function resolveModelImports(models: Model[], outputModelsDir: string): Model[];
28
+ //# sourceMappingURL=modelHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modelHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/utils/modelHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAkBjE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,GAAG,KAAK,EAAE,CAyBrF"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setDuplicateModelAliases = setDuplicateModelAliases;
4
+ exports.resolveModelImports = resolveModelImports;
5
+ const path_1 = require("path");
6
+ /**
7
+ * Assigns alias to models with the same name.
8
+ * Modifies objects of in-place models and returns an array.
9
+ *
10
+ * Example: if there are two models with name="Pet", the following will be assigned:
11
+ * - first: alias="Pet$1"
12
+ * - second: alias="Pet$2"
13
+ *
14
+ * @param models - an array of models sorted by name
15
+ * @returns the same array of models (modified)
16
+ */
17
+ function setDuplicateModelAliases(models) {
18
+ let previous;
19
+ let index = 1;
20
+ models.forEach(model => {
21
+ if (previous && previous.name === model.name) {
22
+ if (index === 1) {
23
+ previous.alias = `${model.name}$${index}`;
24
+ index++;
25
+ }
26
+ model.alias = `${model.name}$${index}`;
27
+ index++;
28
+ }
29
+ else {
30
+ model.alias = '';
31
+ index = 1;
32
+ }
33
+ previous = model;
34
+ });
35
+ return models;
36
+ }
37
+ /**
38
+ * Adjusts the imports fields of the models to relative paths and correct aliases,
39
+ * based on the outputModelsDir directory.
40
+ *
41
+ * Logic:
42
+ * - searches for the target model by name + path;
43
+ * - if found, calculates the relative path between files and substitutes;
44
+ * - updates alias (if it is set for the target model) and path in the import object.
45
+ *
46
+ * @param models - array of models
47
+ * @param outputModelsDir - the directory where the models are generated (this.context.output.outputModels)
48
+ * @returns the same array of models (modified)
49
+ */
50
+ function resolveModelImports(models, outputModelsDir) {
51
+ models.forEach(model => {
52
+ model.imports = model.imports.map(imprt => {
53
+ const importModel = models.find(value => {
54
+ const normalizedPath = !value.path.startsWith('./') ? `./${value.path}` : value.path;
55
+ return normalizedPath === imprt.path && value.name === imprt.name;
56
+ });
57
+ const importAlias = importModel?.alias ?? imprt.alias;
58
+ let importPath = imprt.path;
59
+ if (importModel) {
60
+ const fromDir = (0, path_1.dirname)((0, path_1.resolve)(outputModelsDir, model.path));
61
+ const toDir = (0, path_1.dirname)((0, path_1.resolve)(outputModelsDir, importModel.path));
62
+ const file = (0, path_1.basename)(importModel.name);
63
+ const relativePath = (0, path_1.relative)(fromDir, toDir);
64
+ importPath = relativePath === '' ? `./${file}` : `${relativePath.replace(/\\/g, '/')}/${file}`;
65
+ }
66
+ return Object.assign(imprt, {
67
+ alias: importAlias,
68
+ path: importPath,
69
+ });
70
+ });
71
+ });
72
+ return models;
73
+ }
@@ -0,0 +1,6 @@
1
+ import type { Context } from '../Context';
2
+ /**
3
+ * Deep traversal and normalization of all $ref in an object
4
+ */
5
+ export declare function normalizeAllRefs<T extends Record<string, any>>(obj: T, context: Context, parentFilePath: string): T;
6
+ //# sourceMappingURL=normalizeAllRefs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeAllRefs.d.ts","sourceRoot":"","sources":["../../../src/core/utils/normalizeAllRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG1C;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1D,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,MAAM,GACvB,CAAC,CA6BH"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeAllRefs = normalizeAllRefs;
4
+ const normalizeRef_1 = require("./normalizeRef");
5
+ /**
6
+ * Deep traversal and normalization of all $ref in an object
7
+ */
8
+ function normalizeAllRefs(obj, context, parentFilePath) {
9
+ if (!obj || typeof obj !== 'object' || Array.isArray(obj)) {
10
+ return obj;
11
+ }
12
+ // If this object is a $ref holder
13
+ if (obj.$ref && typeof obj.$ref === 'string') {
14
+ const normalizedRef = (0, normalizeRef_1.normalizeRef)(obj.$ref, parentFilePath);
15
+ return {
16
+ ...obj,
17
+ $ref: normalizedRef
18
+ };
19
+ }
20
+ const result = Array.isArray(obj) ? [] : { ...obj };
21
+ for (const [key, value] of Object.entries(obj)) {
22
+ if (value && typeof value === 'object') {
23
+ // For nested objects, use the same parent file path
24
+ // The normalization will handle the $ref resolution correctly
25
+ result[key] = normalizeAllRefs(value, context, parentFilePath);
26
+ }
27
+ else if (Array.isArray(value)) {
28
+ result[key] = value.map((item) => (item && typeof item === 'object' ? normalizeAllRefs(item, context, parentFilePath) : item));
29
+ }
30
+ else {
31
+ result[key] = value;
32
+ }
33
+ }
34
+ return result;
35
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Normalize path to prevent duplication issues
3
+ */
4
+ export declare function normalizePath(path: string): string;
5
+ //# sourceMappingURL=normalizePath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizePath.d.ts","sourceRoot":"","sources":["../../../src/core/utils/normalizePath.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAelD"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizePath = normalizePath;
4
+ /**
5
+ * Normalize path to prevent duplication issues
6
+ */
7
+ function normalizePath(path) {
8
+ // If path is empty (e.g. local fragment with no parent file), preserve emptiness
9
+ if (!path) {
10
+ return '';
11
+ }
12
+ // Remove any duplicate slashes
13
+ let normalized = path.replace(/\/+/g, '/');
14
+ // Ensure it starts with / for absolute paths
15
+ if (!normalized.startsWith('./') && !normalized.startsWith('/') && !normalized.startsWith('http')) {
16
+ normalized = `/${normalized}`;
17
+ }
18
+ return normalized;
19
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Normalize a single $ref (returns normalized resolved path + fragment when present).
3
+ */
4
+ export declare function normalizeRef(ref: string, parentFilePath: string): string;
5
+ //# sourceMappingURL=normalizeRef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeRef.d.ts","sourceRoot":"","sources":["../../../src/core/utils/normalizeRef.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAQxE"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeRef = normalizeRef;
4
+ const createNormalizedRef_1 = require("./createNormalizedRef");
5
+ const normalizePath_1 = require("./normalizePath");
6
+ const parseRef_1 = require("./parseRef");
7
+ const resolveRefPath_1 = require("./resolveRefPath");
8
+ /**
9
+ * Normalize a single $ref (returns normalized resolved path + fragment when present).
10
+ */
11
+ function normalizeRef(ref, parentFilePath) {
12
+ const parsedRef = (0, parseRef_1.parseRef)(ref);
13
+ const resolvedPath = (0, resolveRefPath_1.resolveRefPath)(parsedRef, parentFilePath);
14
+ // Normalize the path to prevent duplication issues
15
+ const normalizedPath = (0, normalizePath_1.normalizePath)(resolvedPath);
16
+ return (0, createNormalizedRef_1.createNormalizedRef)(parsedRef, normalizedPath);
17
+ }
@@ -0,0 +1,18 @@
1
+ export declare enum RefType {
2
+ LOCAL_FRAGMENT = "local_fragment",
3
+ EXTERNAL_FILE = "external_file",
4
+ EXTERNAL_FILE_FRAGMENT = "external_file_fragment",
5
+ HTTP_URL = "http_url",
6
+ ABSOLUTE_PATH = "absolute_path"
7
+ }
8
+ export interface ParsedRef {
9
+ type: RefType;
10
+ filePath?: string;
11
+ fragment?: string;
12
+ originalRef: string;
13
+ }
14
+ /**
15
+ * Parse a $ref string to determine its type and components
16
+ */
17
+ export declare function parseRef(ref: string): ParsedRef;
18
+ //# sourceMappingURL=parseRef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseRef.d.ts","sourceRoot":"","sources":["../../../src/core/utils/parseRef.ts"],"names":[],"mappings":"AAEA,oBAAY,OAAO;IACf,cAAc,mBAAmB;IACjC,aAAa,kBAAkB;IAC/B,sBAAsB,2BAA2B;IACjD,QAAQ,aAAa;IACrB,aAAa,kBAAkB;CAClC;AAED,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAiD/C"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RefType = void 0;
7
+ exports.parseRef = parseRef;
8
+ const path_1 = __importDefault(require("path"));
9
+ var RefType;
10
+ (function (RefType) {
11
+ RefType["LOCAL_FRAGMENT"] = "local_fragment";
12
+ RefType["EXTERNAL_FILE"] = "external_file";
13
+ RefType["EXTERNAL_FILE_FRAGMENT"] = "external_file_fragment";
14
+ RefType["HTTP_URL"] = "http_url";
15
+ RefType["ABSOLUTE_PATH"] = "absolute_path";
16
+ })(RefType || (exports.RefType = RefType = {}));
17
+ /**
18
+ * Parse a $ref string to determine its type and components
19
+ */
20
+ function parseRef(ref) {
21
+ if (!ref || typeof ref !== 'string') {
22
+ return { type: RefType.LOCAL_FRAGMENT, originalRef: ref };
23
+ }
24
+ // HTTP URLs
25
+ if (ref.startsWith('http://') || ref.startsWith('https://')) {
26
+ return {
27
+ type: RefType.HTTP_URL,
28
+ originalRef: ref
29
+ };
30
+ }
31
+ // Absolute paths (POSIX/Windows handled by path.isAbsolute)
32
+ if (path_1.default.isAbsolute(ref)) {
33
+ const [filePath, fragment] = ref.split('#');
34
+ return {
35
+ type: RefType.ABSOLUTE_PATH,
36
+ filePath,
37
+ fragment: fragment ? `#${fragment}` : undefined,
38
+ originalRef: ref
39
+ };
40
+ }
41
+ // Local fragment
42
+ if (ref.startsWith('#/')) {
43
+ return {
44
+ type: RefType.LOCAL_FRAGMENT,
45
+ fragment: ref,
46
+ originalRef: ref
47
+ };
48
+ }
49
+ // External file references (may include fragment)
50
+ const [filePath, fragment] = ref.split('#');
51
+ if (fragment) {
52
+ return {
53
+ type: RefType.EXTERNAL_FILE_FRAGMENT,
54
+ filePath,
55
+ fragment: `#${fragment}`,
56
+ originalRef: ref
57
+ };
58
+ }
59
+ return {
60
+ type: RefType.EXTERNAL_FILE,
61
+ filePath,
62
+ originalRef: ref
63
+ };
64
+ }
@@ -3,4 +3,5 @@ export declare function join(...paths: string[]): string;
3
3
  export declare function relative(from: string, to: string): string;
4
4
  export declare function resolve(...pathSegments: string[]): string;
5
5
  export declare function normalize(p: string): string;
6
+ export declare function joinToDir(parentFilePath: string, fileName: string): string;
6
7
  //# sourceMappingURL=pathHelpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pathHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/utils/pathHelpers.ts"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED,wBAAgB,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAE/C;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED,wBAAgB,OAAO,CAAC,GAAG,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAEzD;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3C"}
1
+ {"version":3,"file":"pathHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/utils/pathHelpers.ts"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED,wBAAgB,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAE/C;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAyBzD;AAED,wBAAgB,OAAO,CAAC,GAAG,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAEzD;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE3C;AAED,wBAAgB,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE1E"}
@@ -8,6 +8,7 @@ exports.join = join;
8
8
  exports.relative = relative;
9
9
  exports.resolve = resolve;
10
10
  exports.normalize = normalize;
11
+ exports.joinToDir = joinToDir;
11
12
  const path_1 = __importDefault(require("path"));
12
13
  const Consts_1 = require("../types/Consts");
13
14
  function dirName(p) {
@@ -17,9 +18,25 @@ function join(...paths) {
17
18
  return path_1.default.join(...paths).replace(Consts_1.SEARCH_REGEXP, '/');
18
19
  }
19
20
  function relative(from, to) {
20
- const value = `./${path_1.default.relative(from, to)}`;
21
- const hasSlash = value.length > 0 && value.endsWith('/');
22
- return `${value.replace(Consts_1.SEARCH_REGEXP, '/')}`.concat(hasSlash ? '' : '/');
21
+ // Defensive defaults
22
+ const fromSafe = from || '.';
23
+ const toSafe = to || '.';
24
+ // Get native relative and convert to POSIX separators
25
+ const relativePath = path_1.default.relative(fromSafe, toSafe).replace(Consts_1.SEARCH_REGEXP, '/');
26
+ // If empty -> same path
27
+ if (!relativePath || relativePath === '') {
28
+ return './';
29
+ }
30
+ // If result is absolute (starts with '/'), return normalized absolute
31
+ if (relativePath.startsWith('/')) {
32
+ return relativePath;
33
+ }
34
+ // If it already starts with '.' (./ or ../) return as-is
35
+ if (relativePath.startsWith('.')) {
36
+ return relativePath;
37
+ }
38
+ // Otherwise make explicit relative path (./something)
39
+ return `./${relativePath}`;
23
40
  }
24
41
  function resolve(...pathSegments) {
25
42
  return path_1.default.resolve(...pathSegments).replace(Consts_1.SEARCH_REGEXP, '/');
@@ -27,3 +44,6 @@ function resolve(...pathSegments) {
27
44
  function normalize(p) {
28
45
  return path_1.default.normalize(p).replace(Consts_1.SEARCH_REGEXP, '/');
29
46
  }
47
+ function joinToDir(parentFilePath, fileName) {
48
+ return resolve(dirName(parentFilePath), fileName);
49
+ }
@@ -1,7 +1,3 @@
1
- import { IModel } from "./writeClientIndex";
2
- /**
3
- * Function for creating aliases for names
4
- * @param models Array of models
5
- */
6
- export declare function prepareAlias(models: IModel[]): void;
1
+ import { ExportedModel } from "../types/base/ExportedModel.model";
2
+ export declare function prepareAlias(models: ExportedModel[]): void;
7
3
  //# sourceMappingURL=prepareAlias.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prepareAlias.d.ts","sourceRoot":"","sources":["../../../src/core/utils/prepareAlias.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,QAe5C"}
1
+ {"version":3,"file":"prepareAlias.d.ts","sourceRoot":"","sources":["../../../src/core/utils/prepareAlias.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,QAenD"}
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.prepareAlias = prepareAlias;
4
- /**
5
- * Function for creating aliases for names
6
- * @param models Array of models
7
- */
8
4
  function prepareAlias(models) {
9
5
  let modelPrevious = undefined;
10
6
  let index = 1;
@@ -1 +1 @@
1
- {"version":3,"file":"prepareOptions.d.ts","sourceRoot":"","sources":["../../../src/core/utils/prepareOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAI/C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAsB1D"}
1
+ {"version":3,"file":"prepareOptions.d.ts","sourceRoot":"","sources":["../../../src/core/utils/prepareOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAI/C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAoB1D"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.prepareOptions = prepareOptions;
4
- const Enums_1 = require("../types/Enums");
4
+ const HttpClient_enum_1 = require("../types/enums/HttpClient.enum");
5
5
  const isBoolean_1 = require("./isBoolean");
6
6
  /**
7
7
  * Preparation the configuration
@@ -16,18 +16,16 @@ function prepareOptions(options) {
16
16
  outputServices: options?.outputServices ? options.outputServices : '',
17
17
  outputModels: options?.outputModels ? options.outputModels : '',
18
18
  outputSchemas: options?.outputSchemas ? options.outputSchemas : '',
19
- httpClient: options?.httpClient ? options.httpClient : Enums_1.HttpClient.FETCH,
19
+ httpClient: options?.httpClient ? options.httpClient : HttpClient_enum_1.HttpClient.FETCH,
20
20
  useOptions: (0, isBoolean_1.isBoolean)(options?.useOptions),
21
21
  useUnionTypes: (0, isBoolean_1.isBoolean)(options?.useUnionTypes),
22
- exportCore: (0, isBoolean_1.isBoolean)(options?.exportCore, true),
23
- exportServices: (0, isBoolean_1.isBoolean)(options?.exportServices, true),
24
- exportModels: (0, isBoolean_1.isBoolean)(options?.exportModels, true),
25
- exportSchemas: (0, isBoolean_1.isBoolean)(options?.exportSchemas),
26
- clean: (0, isBoolean_1.isBoolean)(options?.clean, true),
22
+ excludeCoreServiceFiles: (0, isBoolean_1.isBoolean)(options?.excludeCoreServiceFiles, false),
23
+ includeSchemasFiles: (0, isBoolean_1.isBoolean)(options?.includeSchemasFiles, false),
27
24
  request: options?.request ? options.request : '',
28
25
  interfacePrefix: options?.interfacePrefix ? options.interfacePrefix : 'I',
29
26
  enumPrefix: options?.enumPrefix ? options.enumPrefix : 'E',
30
27
  typePrefix: options?.typePrefix ? options.typePrefix : 'T',
31
28
  useCancelableRequest: (0, isBoolean_1.isBoolean)(options?.useCancelableRequest),
29
+ useSeparatedIndexes: (0, isBoolean_1.isBoolean)(options?.useSeparatedIndexes),
32
30
  };
33
31
  }
@@ -1,4 +1,4 @@
1
- import { HttpClient } from '../types/Enums';
1
+ import { HttpClient } from '../types/enums/HttpClient.enum';
2
2
  export declare function registerHandlebarHelpers(root: {
3
3
  httpClient: HttpClient;
4
4
  useOptions: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"registerHandlebarHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/utils/registerHandlebarHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAK5C,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAgD5H"}
1
+ {"version":3,"file":"registerHandlebarHelpers.d.ts","sourceRoot":"","sources":["../../../src/core/utils/registerHandlebarHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAK5D,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAgD5H"}
@@ -1,7 +1,14 @@
1
1
  import * as Handlebars from 'handlebars/runtime';
2
- import { HttpClient } from '../types/Enums';
2
+ import { HttpClient } from '../types/enums/HttpClient.enum';
3
3
  export interface Templates {
4
- index: Handlebars.TemplateDelegate;
4
+ indexes: {
5
+ full: Handlebars.TemplateDelegate;
6
+ simple: Handlebars.TemplateDelegate;
7
+ core: Handlebars.TemplateDelegate;
8
+ models: Handlebars.TemplateDelegate;
9
+ schemas: Handlebars.TemplateDelegate;
10
+ services: Handlebars.TemplateDelegate;
11
+ };
5
12
  exports: {
6
13
  model: Handlebars.TemplateDelegate;
7
14
  schema: Handlebars.TemplateDelegate;
@@ -1 +1 @@
1
- {"version":3,"file":"registerHandlebarTemplates.d.ts","sourceRoot":"","sources":["../../../src/core/utils/registerHandlebarTemplates.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAkFjD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,SAAS;IACtB,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC;IACnC,OAAO,EAAE;QACL,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACnC,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACpC,OAAO,EAAE,UAAU,CAAC,gBAAgB,CAAC;KACxC,CAAC;IACF,IAAI,EAAE;QACF,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACtC,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACtC,iBAAiB,EAAE,UAAU,CAAC,gBAAgB,CAAC;QAC/C,SAAS,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACvC,OAAO,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACrC,iBAAiB,EAAE,UAAU,CAAC,gBAAgB,CAAC;QAC/C,cAAc,EAAE,UAAU,CAAC,gBAAgB,CAAC;KAC/C,CAAC;CACL;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAqGnI"}
1
+ {"version":3,"file":"registerHandlebarTemplates.d.ts","sourceRoot":"","sources":["../../../src/core/utils/registerHandlebarTemplates.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAuFjD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE;QACL,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;QAClC,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACpC,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;QAClC,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACpC,OAAO,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACrC,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC;KACzC,CAAA;IACD,OAAO,EAAE;QACL,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACnC,MAAM,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACpC,OAAO,EAAE,UAAU,CAAC,gBAAgB,CAAC;KACxC,CAAC;IACF,IAAI,EAAE;QACF,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACtC,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACtC,iBAAiB,EAAE,UAAU,CAAC,gBAAgB,CAAC;QAC/C,SAAS,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACvC,OAAO,EAAE,UAAU,CAAC,gBAAgB,CAAC;QACrC,iBAAiB,EAAE,UAAU,CAAC,gBAAgB,CAAC;QAC/C,cAAc,EAAE,UAAU,CAAC,gBAAgB,CAAC;KAC/C,CAAC;CACL;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CA4GnI"}