ts-openapi-codegen 2.0.0-beta.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (370) hide show
  1. package/README.md +88 -18
  2. package/README.rus.md +88 -21
  3. package/dist/cli/checkAndUpdateConfig/checkConfig.d.ts +2 -1
  4. package/dist/cli/checkAndUpdateConfig/checkConfig.d.ts.map +1 -1
  5. package/dist/cli/checkAndUpdateConfig/checkConfig.js +14 -6
  6. package/dist/cli/checkAndUpdateConfig/updateConfig.d.ts +2 -1
  7. package/dist/cli/checkAndUpdateConfig/updateConfig.d.ts.map +1 -1
  8. package/dist/cli/checkAndUpdateConfig/updateConfig.js +13 -5
  9. package/dist/cli/checkAndUpdateConfig/utils/validateAndMigrateConfigData.d.ts.map +1 -1
  10. package/dist/cli/checkAndUpdateConfig/utils/validateAndMigrateConfigData.js +5 -0
  11. package/dist/cli/generateOpenApiClient/generateOpenApiClient.d.ts.map +1 -1
  12. package/dist/cli/generateOpenApiClient/generateOpenApiClient.js +24 -13
  13. package/dist/cli/index.js +10 -8
  14. package/dist/cli/initOpenApiConfig/init.d.ts.map +1 -1
  15. package/dist/cli/initOpenApiConfig/init.js +5 -13
  16. package/dist/cli/initOpenApiConfig/initConfig.js +3 -3
  17. package/dist/cli/previewChanges/previewChanges.d.ts.map +1 -1
  18. package/dist/cli/previewChanges/previewChanges.js +119 -28
  19. package/dist/cli/previewChanges/utils/updateOutputPaths.d.ts.map +1 -1
  20. package/dist/cli/previewChanges/utils/updateOutputPaths.js +6 -0
  21. package/dist/cli/schemas/base.d.ts +6 -1
  22. package/dist/cli/schemas/base.d.ts.map +1 -1
  23. package/dist/cli/schemas/base.js +10 -6
  24. package/dist/cli/schemas/checkConfig.d.ts +1 -1
  25. package/dist/cli/schemas/generate.d.ts +1 -25
  26. package/dist/cli/schemas/generate.d.ts.map +1 -1
  27. package/dist/cli/schemas/generate.js +21 -32
  28. package/dist/cli/schemas/index.d.ts +2 -1
  29. package/dist/cli/schemas/index.d.ts.map +1 -1
  30. package/dist/cli/schemas/index.js +1 -0
  31. package/dist/cli/schemas/init.d.ts +5 -5
  32. package/dist/cli/schemas/init.d.ts.map +1 -1
  33. package/dist/cli/schemas/init.js +4 -5
  34. package/dist/cli/schemas/previewChanges.d.ts +9 -0
  35. package/dist/cli/schemas/previewChanges.d.ts.map +1 -0
  36. package/dist/cli/schemas/previewChanges.js +11 -0
  37. package/dist/cli/schemas/updateConfig.d.ts +1 -1
  38. package/dist/common/Consts.d.ts +2 -0
  39. package/dist/common/Consts.d.ts.map +1 -1
  40. package/dist/common/Consts.js +8 -2
  41. package/dist/common/LoggerMessages.d.ts +1 -0
  42. package/dist/common/LoggerMessages.d.ts.map +1 -1
  43. package/dist/common/LoggerMessages.js +2 -1
  44. package/dist/common/TRawOptions.d.ts +1 -1
  45. package/dist/common/TRawOptions.d.ts.map +1 -1
  46. package/dist/common/Validation/formatZodError.d.ts +10 -0
  47. package/dist/common/Validation/formatZodError.d.ts.map +1 -0
  48. package/dist/{cli/validation/errorFormatter.js → common/Validation/formatZodError.js} +14 -13
  49. package/dist/common/Validation/index.d.ts +3 -0
  50. package/dist/common/Validation/index.d.ts.map +1 -0
  51. package/dist/{cli/validation → common/Validation}/index.js +2 -2
  52. package/dist/{cli/validation/validateCLIOptions.d.ts → common/Validation/validateZodOptions.d.ts} +4 -4
  53. package/dist/common/Validation/validateZodOptions.d.ts.map +1 -0
  54. package/dist/{cli/validation/validateCLIOptions.js → common/Validation/validateZodOptions.js} +7 -10
  55. package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.d.ts +1 -1
  56. package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.d.ts.map +1 -1
  57. package/dist/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.js +14 -4
  58. package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.d.ts +6 -1
  59. package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.d.ts.map +1 -1
  60. package/dist/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.js +8 -14
  61. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.d.ts +28 -0
  62. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.d.ts.map +1 -0
  63. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.js +25 -0
  64. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.d.ts +36 -6
  65. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.d.ts.map +1 -1
  66. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.js +33 -37
  67. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts +37 -6
  68. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.d.ts.map +1 -1
  69. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV2.js +30 -37
  70. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.d.ts +40 -0
  71. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.d.ts.map +1 -0
  72. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV3.js +36 -0
  73. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV4.d.ts +42 -0
  74. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV4.d.ts.map +1 -0
  75. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV4.js +38 -0
  76. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.d.ts +192 -0
  77. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.d.ts.map +1 -0
  78. package/dist/common/VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas.js +27 -0
  79. package/dist/common/VersionedSchema/CommonSchemas.d.ts +61 -30
  80. package/dist/common/VersionedSchema/CommonSchemas.d.ts.map +1 -1
  81. package/dist/common/VersionedSchema/CommonSchemas.js +56 -73
  82. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts +25 -5
  83. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.d.ts.map +1 -1
  84. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV1.js +34 -17
  85. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts +25 -5
  86. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.d.ts.map +1 -1
  87. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV2.js +28 -19
  88. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts +25 -1
  89. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.d.ts.map +1 -1
  90. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV3.js +29 -2
  91. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts +25 -5
  92. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.d.ts.map +1 -1
  93. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV4.js +30 -14
  94. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts +23 -5
  95. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.d.ts.map +1 -1
  96. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsSchemaV5.js +33 -18
  97. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.d.ts +3 -2
  98. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.d.ts.map +1 -1
  99. package/dist/common/VersionedSchema/MultiOptionsVersioned/MultiOptionsVersionedSchemas.js +18 -11
  100. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts +22 -5
  101. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.d.ts.map +1 -1
  102. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV1.js +30 -12
  103. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts +22 -5
  104. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.d.ts.map +1 -1
  105. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV2.js +27 -13
  106. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts +22 -1
  107. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.d.ts.map +1 -1
  108. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV3.js +28 -2
  109. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts +22 -5
  110. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.d.ts.map +1 -1
  111. package/dist/common/VersionedSchema/OptionsVersioned/OptionsSchemaV4.js +31 -12
  112. package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.d.ts +3 -2
  113. package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.d.ts.map +1 -1
  114. package/dist/common/VersionedSchema/OptionsVersioned/OptionsVersionedSchemas.js +15 -9
  115. package/dist/common/VersionedSchema/Types.d.ts +5 -5
  116. package/dist/common/VersionedSchema/Types.d.ts.map +1 -1
  117. package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.d.ts +16 -0
  118. package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.d.ts.map +1 -0
  119. package/dist/common/VersionedSchema/Utils/__mocks__/compatibilityCases.js +104 -0
  120. package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.d.ts +2 -0
  121. package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.d.ts.map +1 -0
  122. package/dist/common/VersionedSchema/Utils/__tests__/allUtils.test.js +185 -0
  123. package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.d.ts +2 -0
  124. package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.d.ts.map +1 -0
  125. package/dist/common/VersionedSchema/Utils/__tests__/compareShapes.test.js +40 -0
  126. package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.d.ts +2 -0
  127. package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.d.ts.map +1 -0
  128. package/dist/common/VersionedSchema/Utils/__tests__/migrateDataToLatestSchemaVersion.test.js +93 -0
  129. package/dist/common/VersionedSchema/Utils/buildVersionedSchema.d.ts +12 -0
  130. package/dist/common/VersionedSchema/Utils/buildVersionedSchema.d.ts.map +1 -0
  131. package/dist/common/VersionedSchema/Utils/buildVersionedSchema.js +13 -0
  132. package/dist/common/VersionedSchema/Utils/compareShapes.d.ts +16 -0
  133. package/dist/common/VersionedSchema/Utils/compareShapes.d.ts.map +1 -0
  134. package/dist/common/VersionedSchema/Utils/compareShapes.js +30 -0
  135. package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.d.ts +6 -1
  136. package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.d.ts.map +1 -1
  137. package/dist/common/VersionedSchema/Utils/determineBestMatchingSchemaVersion.js +70 -25
  138. package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.d.ts +2 -2
  139. package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.d.ts.map +1 -1
  140. package/dist/common/VersionedSchema/Utils/getCurrentErrorMessage.js +15 -7
  141. package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.d.ts +3 -3
  142. package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.d.ts.map +1 -1
  143. package/dist/common/VersionedSchema/Utils/getUniqueKeysFromSchemas.js +17 -4
  144. package/dist/common/VersionedSchema/Utils/getUniqueObjectKeys.d.ts.map +1 -1
  145. package/dist/common/VersionedSchema/Utils/getUniqueObjectKeys.js +19 -2
  146. package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts +12 -1
  147. package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.d.ts.map +1 -1
  148. package/dist/common/VersionedSchema/Utils/migrateDataToLatestSchemaVersion.js +41 -22
  149. package/dist/common/VersionedSchema/refinements/dependentOptionsRefinement.d.ts +4 -0
  150. package/dist/common/VersionedSchema/refinements/dependentOptionsRefinement.d.ts.map +1 -0
  151. package/dist/common/VersionedSchema/refinements/dependentOptionsRefinement.js +43 -0
  152. package/dist/common/VersionedSchema/refinements/singleOrMultiRefinement.d.ts +4 -0
  153. package/dist/common/VersionedSchema/refinements/singleOrMultiRefinement.d.ts.map +1 -0
  154. package/dist/common/VersionedSchema/refinements/singleOrMultiRefinement.js +21 -0
  155. package/dist/common/utils/__tests__/convertArrayToObject.test.js +64 -169
  156. package/dist/common/utils/convertArrayToObject.d.ts.map +1 -1
  157. package/dist/common/utils/convertArrayToObject.js +51 -14
  158. package/dist/core/Context.d.ts +6 -5
  159. package/dist/core/Context.d.ts.map +1 -1
  160. package/dist/core/Context.js +69 -26
  161. package/dist/core/OpenApiClient.d.ts.map +1 -1
  162. package/dist/core/OpenApiClient.js +24 -9
  163. package/dist/core/WriteClient.d.ts +8 -1
  164. package/dist/core/WriteClient.d.ts.map +1 -1
  165. package/dist/core/WriteClient.js +48 -7
  166. package/dist/core/__tests__/WriteClient.test.js +2 -0
  167. package/dist/core/api/v2/Parser.d.ts +1 -1
  168. package/dist/core/api/v2/Parser.d.ts.map +1 -1
  169. package/dist/core/api/v2/Parser.js +2 -2
  170. package/dist/core/api/v2/parser/getModel.d.ts.map +1 -1
  171. package/dist/core/api/v2/parser/getModel.js +2 -5
  172. package/dist/core/api/v2/parser/getModelProperties.d.ts.map +1 -1
  173. package/dist/core/api/v2/parser/getModelProperties.js +1 -3
  174. package/dist/core/api/v2/parser/getModels.d.ts.map +1 -1
  175. package/dist/core/api/v2/parser/getModels.js +1 -2
  176. package/dist/core/api/v2/parser/getOperationParameter.d.ts.map +1 -1
  177. package/dist/core/api/v2/parser/getOperationParameter.js +2 -5
  178. package/dist/core/api/v2/parser/getOperationParameters.js +1 -1
  179. package/dist/core/api/v2/parser/getOperationResponse.d.ts.map +1 -1
  180. package/dist/core/api/v2/parser/getOperationResponse.js +1 -3
  181. package/dist/core/api/v2/parser/getOperationResponses.js +1 -1
  182. package/dist/core/api/v2/parser/getServices.d.ts.map +1 -1
  183. package/dist/core/api/v2/parser/getServices.js +4 -3
  184. package/dist/core/api/v2/parser/getType.d.ts.map +1 -1
  185. package/dist/core/api/v2/parser/getType.js +4 -3
  186. package/dist/core/api/v3/Parser.d.ts +1 -1
  187. package/dist/core/api/v3/Parser.d.ts.map +1 -1
  188. package/dist/core/api/v3/Parser.js +2 -2
  189. package/dist/core/api/v3/parser/getModel.d.ts.map +1 -1
  190. package/dist/core/api/v3/parser/getModel.js +2 -5
  191. package/dist/core/api/v3/parser/getModelProperties.d.ts.map +1 -1
  192. package/dist/core/api/v3/parser/getModelProperties.js +1 -3
  193. package/dist/core/api/v3/parser/getModels.d.ts.map +1 -1
  194. package/dist/core/api/v3/parser/getModels.js +1 -2
  195. package/dist/core/api/v3/parser/getOperation.js +1 -1
  196. package/dist/core/api/v3/parser/getOperationParameter.d.ts.map +1 -1
  197. package/dist/core/api/v3/parser/getOperationParameter.js +2 -5
  198. package/dist/core/api/v3/parser/getOperationParameters.js +1 -1
  199. package/dist/core/api/v3/parser/getOperationRequestBody.d.ts.map +1 -1
  200. package/dist/core/api/v3/parser/getOperationRequestBody.js +1 -3
  201. package/dist/core/api/v3/parser/getOperationResponse.d.ts.map +1 -1
  202. package/dist/core/api/v3/parser/getOperationResponse.js +1 -3
  203. package/dist/core/api/v3/parser/getOperationResponses.js +1 -1
  204. package/dist/core/api/v3/parser/getServices.d.ts.map +1 -1
  205. package/dist/core/api/v3/parser/getServices.js +4 -3
  206. package/dist/core/api/v3/parser/getType.d.ts.map +1 -1
  207. package/dist/core/api/v3/parser/getType.js +4 -3
  208. package/dist/core/index.d.ts.map +1 -1
  209. package/dist/core/index.js +2 -0
  210. package/dist/core/types/base/Templates.model.d.ts +1 -1
  211. package/dist/core/types/base/Templates.model.d.ts.map +1 -1
  212. package/dist/core/types/enums/EmptySchemaStrategy.enum.d.ts +6 -0
  213. package/dist/core/types/enums/EmptySchemaStrategy.enum.d.ts.map +1 -0
  214. package/dist/core/types/enums/EmptySchemaStrategy.enum.js +9 -0
  215. package/dist/core/utils/__tests__/getRelativeModelPath.test.js +9 -3
  216. package/dist/core/utils/__tests__/isSubdirectory.test.js +2 -2
  217. package/dist/core/utils/__tests__/modelHelpers.test.d.ts +2 -0
  218. package/dist/core/utils/__tests__/modelHelpers.test.d.ts.map +1 -0
  219. package/dist/core/utils/__tests__/modelHelpers.test.js +151 -0
  220. package/dist/core/utils/__tests__/postProcessModelImports.test.d.ts +2 -0
  221. package/dist/core/utils/__tests__/postProcessModelImports.test.d.ts.map +1 -0
  222. package/dist/core/utils/__tests__/postProcessModelImports.test.js +67 -0
  223. package/dist/core/utils/__tests__/postProcessServiceImports.test.d.ts +2 -0
  224. package/dist/core/utils/__tests__/postProcessServiceImports.test.d.ts.map +1 -0
  225. package/dist/core/utils/__tests__/postProcessServiceImports.test.js +26 -0
  226. package/dist/core/utils/__tests__/resolveRefPath.test.d.ts +2 -0
  227. package/dist/core/utils/__tests__/resolveRefPath.test.d.ts.map +1 -0
  228. package/dist/core/utils/__tests__/resolveRefPath.test.js +22 -0
  229. package/dist/core/utils/__tests__/serviceHelpers.test.d.ts +2 -0
  230. package/dist/core/utils/__tests__/serviceHelpers.test.d.ts.map +1 -0
  231. package/dist/core/utils/__tests__/serviceHelpers.test.js +121 -0
  232. package/dist/core/utils/__tests__/writeClientExecutor.test.d.ts +2 -0
  233. package/dist/core/utils/__tests__/writeClientExecutor.test.d.ts.map +1 -0
  234. package/dist/core/utils/__tests__/writeClientExecutor.test.js +20 -0
  235. package/dist/core/utils/__tests__/writeClientSchemas.test.js +2 -0
  236. package/dist/core/utils/getOpenApiSpec.d.ts.map +1 -1
  237. package/dist/core/utils/getOpenApiSpec.js +14 -1
  238. package/dist/core/utils/modelHelpers.d.ts.map +1 -1
  239. package/dist/core/utils/modelHelpers.js +37 -3
  240. package/dist/core/utils/postProcessModelImports.d.ts.map +1 -1
  241. package/dist/core/utils/postProcessModelImports.js +14 -1
  242. package/dist/core/utils/postProcessServiceImports.d.ts.map +1 -1
  243. package/dist/core/utils/postProcessServiceImports.js +1 -2
  244. package/dist/core/utils/precompileTemplates.js +1 -0
  245. package/dist/core/utils/registerHandlebarHelpers.d.ts.map +1 -1
  246. package/dist/core/utils/registerHandlebarHelpers.js +25 -0
  247. package/dist/core/utils/registerHandlebarTemplates.d.ts.map +1 -1
  248. package/dist/core/utils/registerHandlebarTemplates.js +42 -41
  249. package/dist/core/utils/resolveRefPath.d.ts.map +1 -1
  250. package/dist/core/utils/resolveRefPath.js +1 -4
  251. package/dist/core/utils/serviceHelpers.d.ts.map +1 -1
  252. package/dist/core/utils/serviceHelpers.js +32 -6
  253. package/dist/core/utils/validateRawOptions.d.ts +3 -0
  254. package/dist/core/utils/validateRawOptions.d.ts.map +1 -0
  255. package/dist/core/utils/validateRawOptions.js +15 -0
  256. package/dist/core/utils/writeClientExecutor.d.ts +4 -1
  257. package/dist/core/utils/writeClientExecutor.d.ts.map +1 -1
  258. package/dist/core/utils/writeClientExecutor.js +17 -2
  259. package/dist/core/utils/writeClientSchemas.d.ts +4 -1
  260. package/dist/core/utils/writeClientSchemas.d.ts.map +1 -1
  261. package/dist/core/utils/writeClientSchemas.js +11 -2
  262. package/dist/templatesCompiled/client/core/ApiError.js +1 -1
  263. package/dist/templatesCompiled/client/core/ApiResult.js +1 -1
  264. package/dist/templatesCompiled/client/core/axios/request.js +3 -3
  265. package/dist/templatesCompiled/client/core/executor/createExecutorAdapter.d.ts +2 -0
  266. package/dist/templatesCompiled/client/core/executor/createExecutorAdapter.d.ts.map +1 -1
  267. package/dist/templatesCompiled/client/core/executor/createExecutorAdapter.js +13 -8
  268. package/dist/templatesCompiled/client/core/executor/requestExecutor.js +1 -1
  269. package/dist/templatesCompiled/client/core/fetch/request.js +3 -3
  270. package/dist/templatesCompiled/client/core/functions/catchErrors.js +1 -1
  271. package/dist/templatesCompiled/client/core/interceptors/withInterceptors.js +1 -1
  272. package/dist/templatesCompiled/client/core/node/request.js +3 -3
  273. package/dist/templatesCompiled/client/core/xhr/request.js +3 -3
  274. package/dist/templatesCompiled/client/exportClient.d.ts +4 -0
  275. package/dist/templatesCompiled/client/exportClient.d.ts.map +1 -1
  276. package/dist/templatesCompiled/client/exportClient.js +51 -13
  277. package/dist/templatesCompiled/client/exportSchema.d.ts +5 -1
  278. package/dist/templatesCompiled/client/exportSchema.d.ts.map +1 -1
  279. package/dist/templatesCompiled/client/exportSchema.js +37 -7
  280. package/dist/templatesCompiled/client/exportService.d.ts +2 -0
  281. package/dist/templatesCompiled/client/exportService.d.ts.map +1 -1
  282. package/dist/templatesCompiled/client/exportService.js +71 -31
  283. package/dist/templatesCompiled/client/indexFull.d.ts +1 -0
  284. package/dist/templatesCompiled/client/indexFull.d.ts.map +1 -1
  285. package/dist/templatesCompiled/client/indexFull.js +4 -1
  286. package/dist/templatesCompiled/client/indexSimple.d.ts +1 -0
  287. package/dist/templatesCompiled/client/indexSimple.d.ts.map +1 -1
  288. package/dist/templatesCompiled/client/indexSimple.js +4 -1
  289. package/dist/templatesCompiled/client/joi/exportSchema.js +5 -5
  290. package/dist/templatesCompiled/client/joi/partials/joiSchema.js +7 -7
  291. package/dist/templatesCompiled/client/joi/partials/joiSchemaComposition.js +4 -4
  292. package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.d.ts +5 -3
  293. package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.d.ts.map +1 -1
  294. package/dist/templatesCompiled/client/joi/partials/joiSchemaInterface.js +39 -12
  295. package/dist/templatesCompiled/client/jsonschema/exportSchema.js +5 -5
  296. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchema.js +7 -7
  297. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaArray.js +5 -5
  298. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaComposition.js +2 -2
  299. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaDictionary.js +5 -5
  300. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.d.ts +3 -1
  301. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.d.ts.map +1 -1
  302. package/dist/templatesCompiled/client/jsonschema/partials/jsonschemaSchemaInterface.js +45 -15
  303. package/dist/templatesCompiled/client/partials/exportComposition.d.ts +2 -0
  304. package/dist/templatesCompiled/client/partials/exportComposition.d.ts.map +1 -1
  305. package/dist/templatesCompiled/client/partials/exportComposition.js +17 -9
  306. package/dist/templatesCompiled/client/yup/exportSchema.js +3 -3
  307. package/dist/templatesCompiled/client/yup/partials/yupSchema.js +7 -7
  308. package/dist/templatesCompiled/client/yup/partials/yupSchemaComposition.js +4 -4
  309. package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.d.ts +5 -3
  310. package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.d.ts.map +1 -1
  311. package/dist/templatesCompiled/client/yup/partials/yupSchemaInterface.js +39 -12
  312. package/dist/templatesCompiled/client/zod/exportSchema.js +3 -3
  313. package/dist/templatesCompiled/client/zod/partials/zodSchema.js +7 -7
  314. package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.d.ts +5 -6
  315. package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.d.ts.map +1 -1
  316. package/dist/templatesCompiled/client/zod/partials/zodSchemaArray.js +14 -28
  317. package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.d.ts +3 -0
  318. package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.d.ts.map +1 -1
  319. package/dist/templatesCompiled/client/zod/partials/zodSchemaComposition.js +32 -8
  320. package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.d.ts +3 -4
  321. package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.d.ts.map +1 -1
  322. package/dist/templatesCompiled/client/zod/partials/zodSchemaDictionary.js +9 -23
  323. package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.d.ts +4 -2
  324. package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.d.ts.map +1 -1
  325. package/dist/templatesCompiled/client/zod/partials/zodSchemaInterface.js +18 -7
  326. package/package.json +2 -2
  327. package/dist/cli/validation/errorFormatter.d.ts +0 -6
  328. package/dist/cli/validation/errorFormatter.d.ts.map +0 -1
  329. package/dist/cli/validation/index.d.ts +0 -3
  330. package/dist/cli/validation/index.d.ts.map +0 -1
  331. package/dist/cli/validation/validateCLIOptions.d.ts.map +0 -1
  332. package/dist/common/VersionedSchema/Utils/getErrorFieldsFromValidation.d.ts +0 -6
  333. package/dist/common/VersionedSchema/Utils/getErrorFieldsFromValidation.d.ts.map +0 -1
  334. package/dist/common/VersionedSchema/Utils/getErrorFieldsFromValidation.js +0 -7
  335. package/dist/common/VersionedSchema/Utils/joiHandlers.d.ts +0 -6
  336. package/dist/common/VersionedSchema/Utils/joiHandlers.d.ts.map +0 -1
  337. package/dist/common/VersionedSchema/Utils/joiHandlers.js +0 -59
  338. package/dist/common/VersionedSchema/Utils/mergeObjectSchemas.d.ts +0 -3
  339. package/dist/common/VersionedSchema/Utils/mergeObjectSchemas.d.ts.map +0 -1
  340. package/dist/common/VersionedSchema/Utils/mergeObjectSchemas.js +0 -12
  341. package/dist/common/VersionedSchema/Utils/traverseObjectStructure.d.ts +0 -3
  342. package/dist/common/VersionedSchema/Utils/traverseObjectStructure.d.ts.map +0 -1
  343. package/dist/common/VersionedSchema/Utils/traverseObjectStructure.js +0 -31
  344. package/dist/common/defaultOptions.d.ts +0 -3
  345. package/dist/common/defaultOptions.d.ts.map +0 -1
  346. package/dist/common/defaultOptions.js +0 -28
  347. package/dist/common/schemas/configSchemas.d.ts +0 -91
  348. package/dist/common/schemas/configSchemas.d.ts.map +0 -1
  349. package/dist/common/schemas/configSchemas.js +0 -131
  350. package/dist/common/utils/__tests__/__mock__/mockJoiSchema.d.ts +0 -19
  351. package/dist/common/utils/__tests__/__mock__/mockJoiSchema.d.ts.map +0 -1
  352. package/dist/common/utils/__tests__/__mock__/mockJoiSchema.js +0 -14
  353. package/dist/common/utils/__tests__/determineBestMatchingSchemaVersion.test.d.ts +0 -2
  354. package/dist/common/utils/__tests__/determineBestMatchingSchemaVersion.test.d.ts.map +0 -1
  355. package/dist/common/utils/__tests__/determineBestMatchingSchemaVersion.test.js +0 -38
  356. package/dist/common/utils/__tests__/getUniqueKeysFromSchemas.test.d.ts +0 -2
  357. package/dist/common/utils/__tests__/getUniqueKeysFromSchemas.test.d.ts.map +0 -1
  358. package/dist/common/utils/__tests__/getUniqueKeysFromSchemas.test.js +0 -20
  359. package/dist/common/utils/__tests__/mergeObjectSchemas.test.d.ts +0 -2
  360. package/dist/common/utils/__tests__/mergeObjectSchemas.test.d.ts.map +0 -1
  361. package/dist/common/utils/__tests__/mergeObjectSchemas.test.js +0 -35
  362. package/dist/common/utils/__tests__/migrationForMultiOptions.test.d.ts +0 -2
  363. package/dist/common/utils/__tests__/migrationForMultiOptions.test.d.ts.map +0 -1
  364. package/dist/common/utils/__tests__/migrationForMultiOptions.test.js +0 -112
  365. package/dist/common/utils/__tests__/migrationForOptions.test.d.ts +0 -2
  366. package/dist/common/utils/__tests__/migrationForOptions.test.d.ts.map +0 -1
  367. package/dist/common/utils/__tests__/migrationForOptions.test.js +0 -56
  368. package/dist/core/utils/advancedDeduplicatePath.d.ts +0 -5
  369. package/dist/core/utils/advancedDeduplicatePath.d.ts.map +0 -1
  370. package/dist/core/utils/advancedDeduplicatePath.js +0 -29
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.initOptionsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const Consts_1 = require("../../common/Consts");
6
5
  const base_1 = require("./base");
7
6
  exports.initOptionsSchema = base_1.baseCLIOptionsSchema.extend({
8
- specsDir: zod_1.z.string().min(1).optional().default(Consts_1.DEFAULT_SPECS_DIR),
9
- request: zod_1.z.string().min(1).optional().default(Consts_1.DEFAULT_CUSTOM_REQUEST_PATH),
10
- useCancelableRequest: zod_1.z.boolean().optional().default(false),
11
- useInteractiveMode: zod_1.z.boolean().optional().default(false),
7
+ specsDir: base_1.emptyStringToUndefined,
8
+ request: base_1.emptyStringToUndefined,
9
+ useCancelableRequest: zod_1.z.boolean().optional(),
10
+ useInteractiveMode: zod_1.z.boolean().optional(),
12
11
  });
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const previewChangesSchema: z.ZodObject<{
3
+ generatedDir: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
4
+ previewDir: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
5
+ diffDir: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
6
+ openapiConfig: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
7
+ }, z.core.$strip>;
8
+ export type TPreviewChangesOptions = z.infer<typeof previewChangesSchema>;
9
+ //# sourceMappingURL=previewChanges.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"previewChanges.d.ts","sourceRoot":"","sources":["../../../src/cli/schemas/previewChanges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.previewChangesSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const base_1 = require("./base");
6
+ exports.previewChangesSchema = zod_1.z.object({
7
+ ...base_1.baseCLIOptionsSchema.shape,
8
+ generatedDir: base_1.emptyStringToUndefined,
9
+ previewDir: base_1.emptyStringToUndefined,
10
+ diffDir: base_1.emptyStringToUndefined,
11
+ });
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const updateConfigOptionsSchema: z.ZodObject<{
3
- openapiConfig: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3
+ openapiConfig: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
4
4
  }, z.core.$strip>;
5
5
  export type UpdateConfigOptions = z.infer<typeof updateConfigOptionsSchema>;
6
6
  //# sourceMappingURL=updateConfig.d.ts.map
@@ -6,4 +6,6 @@ export declare const APP_LOGGER: Logger;
6
6
  export declare const DEFAULT_SPECS_DIR = "openapi/";
7
7
  export declare const DEFAULT_CUSTOM_REQUEST_PATH = "./src/custom/request.ts";
8
8
  export declare const DEFAULT_OUTPUT_API_DIR = "./generated";
9
+ export declare const DEFAULT_PREVIEW_CHANGES_DIR = "./.ts-openapi-codegen-preview-changes";
10
+ export declare const DEFAULT_DIFF_CHANGES_DIR = "./.ts-openapi-codegen-diff-changes";
9
11
  //# sourceMappingURL=Consts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Consts.d.ts","sourceRoot":"","sources":["../../src/common/Consts.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,eAAO,MAAM,+BAA+B,wBAAwB,CAAC;AAErE,eAAO,MAAM,6BAA6B,EAAE,kBAqB3C,CAAC;AAEF,eAAO,MAAM,UAAU,QAIrB,CAAC;AAEH,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,eAAO,MAAM,2BAA2B,4BAA4B,CAAA;AAEpE,eAAO,MAAM,sBAAsB,gBAAgB,CAAC"}
1
+ {"version":3,"file":"Consts.d.ts","sourceRoot":"","sources":["../../src/common/Consts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,eAAO,MAAM,+BAA+B,wBAAwB,CAAC;AAErE,eAAO,MAAM,6BAA6B,EAAE,kBAwB3C,CAAC;AAEF,eAAO,MAAM,UAAU,QAIrB,CAAC;AAEH,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,eAAO,MAAM,2BAA2B,4BAA4B,CAAA;AAEpE,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AAEpD,eAAO,MAAM,2BAA2B,0CAA0C,CAAC;AAEnF,eAAO,MAAM,wBAAwB,uCAAuC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_OUTPUT_API_DIR = exports.DEFAULT_CUSTOM_REQUEST_PATH = exports.DEFAULT_SPECS_DIR = exports.APP_LOGGER = exports.COMMON_DEFAULT_OPTIONS_VALUES = exports.DEFAULT_OPENAPI_CONFIG_FILENAME = void 0;
3
+ exports.DEFAULT_DIFF_CHANGES_DIR = exports.DEFAULT_PREVIEW_CHANGES_DIR = exports.DEFAULT_OUTPUT_API_DIR = exports.DEFAULT_CUSTOM_REQUEST_PATH = exports.DEFAULT_SPECS_DIR = exports.APP_LOGGER = exports.COMMON_DEFAULT_OPTIONS_VALUES = exports.DEFAULT_OPENAPI_CONFIG_FILENAME = void 0;
4
+ const EmptySchemaStrategy_enum_1 = require("../core/types/enums/EmptySchemaStrategy.enum");
4
5
  const HttpClient_enum_1 = require("../core/types/enums/HttpClient.enum");
5
6
  const ValidationLibrary_enum_1 = require("../core/types/enums/ValidationLibrary.enum");
6
7
  const Enums_1 = require("./Enums");
@@ -16,8 +17,10 @@ exports.COMMON_DEFAULT_OPTIONS_VALUES = {
16
17
  httpClient: HttpClient_enum_1.HttpClient.FETCH,
17
18
  useOptions: false,
18
19
  useUnionTypes: false,
20
+ includeSchemasFiles: false,
19
21
  excludeCoreServiceFiles: false,
20
22
  request: '',
23
+ customExecutorPath: '',
21
24
  interfacePrefix: 'I',
22
25
  enumPrefix: 'E',
23
26
  typePrefix: 'T',
@@ -26,7 +29,8 @@ exports.COMMON_DEFAULT_OPTIONS_VALUES = {
26
29
  logTarget: Enums_1.ELogOutput.CONSOLE,
27
30
  sortByRequired: false,
28
31
  useSeparatedIndexes: false,
29
- validationLibrary: ValidationLibrary_enum_1.ValidationLibrary.NONE
32
+ validationLibrary: ValidationLibrary_enum_1.ValidationLibrary.NONE,
33
+ emptySchemaStrategy: EmptySchemaStrategy_enum_1.EmptySchemaStrategy.KEEP,
30
34
  };
31
35
  exports.APP_LOGGER = new Logger_1.Logger({
32
36
  level: Enums_1.ELogLevel.INFO,
@@ -36,3 +40,5 @@ exports.APP_LOGGER = new Logger_1.Logger({
36
40
  exports.DEFAULT_SPECS_DIR = 'openapi/';
37
41
  exports.DEFAULT_CUSTOM_REQUEST_PATH = './src/custom/request.ts';
38
42
  exports.DEFAULT_OUTPUT_API_DIR = './generated';
43
+ exports.DEFAULT_PREVIEW_CHANGES_DIR = './.ts-openapi-codegen-preview-changes';
44
+ exports.DEFAULT_DIFF_CHANGES_DIR = './.ts-openapi-codegen-diff-changes';
@@ -54,6 +54,7 @@ export declare const LOGGER_MESSAGES: {
54
54
  readonly FILE_UPDATED: (configPath: string) => string;
55
55
  readonly ACTION_SKIPPED: "Action skipped.";
56
56
  readonly UNKNOWN_ACTION: (action: string) => string;
57
+ readonly ARRAY_DEPRECATED: "Using an array of configurations is deprecated and support will be removed in future versions. Please switch to using an object with named configurations.";
57
58
  };
58
59
  readonly ERROR: {
59
60
  readonly PREFIX: "Error:";
@@ -1 +1 @@
1
- {"version":3,"file":"LoggerMessages.d.ts","sourceRoot":"","sources":["../../src/common/LoggerMessages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,eAAe;;kCAGH,MAAM;;oDAEY,MAAM;2CACf,MAAM,YAAY,MAAM;;;;;;;;;;;;;8CAoBrB,MAAM;gDACJ,MAAM;;;4CAKV,MAAM;8CACJ,MAAM;uDACG,MAAM;;;6CAKhB,MAAM;+CACJ,MAAM;wDACG,MAAM;gDAGd,MAAM;qDACD,MAAM;kDACT,MAAM;oDACJ,MAAM;;;+CAKX,MAAM,kBAAkB,MAAM;;;;;;+CAW9B,MAAM;;;kDAKH,MAAM;iDACP,MAAM;;;4CAGX,MAAM;;0CAER,MAAM;;;;oCAMZ,MAAM;;;CAKvB,CAAC"}
1
+ {"version":3,"file":"LoggerMessages.d.ts","sourceRoot":"","sources":["../../src/common/LoggerMessages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,eAAe;;kCAGH,MAAM;;oDAEY,MAAM;2CACf,MAAM,YAAY,MAAM;;;;;;;;;;;;;8CAoBrB,MAAM;gDACJ,MAAM;;;4CAKV,MAAM;8CACJ,MAAM;uDACG,MAAM;;;6CAKhB,MAAM;+CACJ,MAAM;wDACG,MAAM;gDAGd,MAAM;qDACD,MAAM;kDACT,MAAM;oDACJ,MAAM;;;+CAKX,MAAM,kBAAkB,MAAM;;;;;;+CAW9B,MAAM;;;kDAKH,MAAM;iDACP,MAAM;;;4CAGX,MAAM;;0CAER,MAAM;;;;;oCAOZ,MAAM;;;CAKvB,CAAC"}
@@ -10,7 +10,7 @@ exports.LOGGER_MESSAGES = {
10
10
  GENERATION: {
11
11
  STARTED: (count) => `Generation has begun. Total number of specification files: ${count}`,
12
12
  FINISHED: 'Generation has been finished',
13
- FINISHED_WITH_DURATION: (duration) => `Generation completed in ${duration} ms`,
13
+ FINISHED_WITH_DURATION: (duration) => `Generation completed in ${duration} sec`,
14
14
  DURATION_FOR_FILE: (file, duration) => `Duration for "${file}": ${duration} sec`,
15
15
  NO_OPTIONS: 'No options provided for generation',
16
16
  },
@@ -71,6 +71,7 @@ exports.LOGGER_MESSAGES = {
71
71
  FILE_UPDATED: (configPath) => `Configuration file "${configPath}" has been updated`,
72
72
  ACTION_SKIPPED: 'Action skipped.',
73
73
  UNKNOWN_ACTION: (action) => `Unknown action: ${action}`,
74
+ ARRAY_DEPRECATED: 'Using an array of configurations is deprecated and support will be removed in future versions. Please switch to using an object with named configurations.',
74
75
  },
75
76
  // ========== Error Messages ==========
76
77
  ERROR: {
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { flatOptionsSchema, rawOptionsSchema } from "./schemas/configSchemas";
2
+ import { flatOptionsSchema, rawOptionsSchema } from './VersionedSchema/AllVersionedSchemas/UnifiedVersionedSchemas';
3
3
  export type TRawOptions = z.infer<typeof rawOptionsSchema>;
4
4
  export type TFlatOptions = z.infer<typeof flatOptionsSchema>;
5
5
  export type TStrictFlatOptions = {
@@ -1 +1 @@
1
- {"version":3,"file":"TRawOptions.d.ts","sourceRoot":"","sources":["../../src/common/TRawOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE9E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG;KAC5B,CAAC,IAAI,MAAM,YAAY,CAAC,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CAC5D,CAAC"}
1
+ {"version":3,"file":"TRawOptions.d.ts","sourceRoot":"","sources":["../../src/common/TRawOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAC,gBAAgB,EAAE,MAAM,+DAA+D,CAAC;AAEnH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG;KAC5B,CAAC,IAAI,MAAM,YAAY,CAAC,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CAC5D,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { ZodError } from 'zod';
2
+ /**
3
+ * Форматирует Zod ошибку в читаемое сообщение для CLI
4
+ */
5
+ export declare function formatZodError(error: ZodError): string[];
6
+ /**
7
+ * Форматирует путь к полю в читаемый формат
8
+ */
9
+ export declare function formatZodPath(path: (string | number | symbol)[]): string;
10
+ //# sourceMappingURL=formatZodError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatZodError.d.ts","sourceRoot":"","sources":["../../../src/common/Validation/formatZodError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE/B;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,EAAE,CAYxD;AAkFD;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,CA2BxE"}
@@ -1,24 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatZodErrorForCLI = formatZodErrorForCLI;
3
+ exports.formatZodError = formatZodError;
4
+ exports.formatZodPath = formatZodPath;
4
5
  /**
5
6
  * Форматирует Zod ошибку в читаемое сообщение для CLI
6
7
  */
7
- function formatZodErrorForCLI(error) {
8
+ function formatZodError(error) {
8
9
  if (!error || error.issues.length === 0) {
9
- return 'Validation error occurred';
10
+ return [];
10
11
  }
11
12
  const messages = [];
12
13
  for (const issue of error.issues) {
13
- messages.push(formatIssue(issue));
14
+ messages.push(formatZodIssue(issue));
14
15
  }
15
- return messages.join('\n');
16
+ return messages;
16
17
  }
17
18
  /**
18
19
  * Форматирует отдельную Zod issue в читаемое сообщение
19
20
  */
20
- function formatIssue(issue) {
21
- const path = formatPath(issue.path);
21
+ function formatZodIssue(issue) {
22
+ const path = formatZodPath(issue.path);
22
23
  const message = issue.message;
23
24
  // Если issue имеет кастомное сообщение, используем его
24
25
  if (issue.code === 'custom') {
@@ -27,7 +28,7 @@ function formatIssue(issue) {
27
28
  // Форматируем стандартные ошибки с использованием type guards
28
29
  if (issue.code === 'invalid_type') {
29
30
  if ('received' in issue && issue.received === 'undefined') {
30
- const fieldName = formatPath(issue.path).replace(/^--/, '');
31
+ const fieldName = formatZodPath(issue.path).replace(/^--/, '');
31
32
  return `${path}: "${fieldName}" is required`;
32
33
  }
33
34
  if ('expected' in issue && 'received' in issue) {
@@ -35,7 +36,7 @@ function formatIssue(issue) {
35
36
  }
36
37
  }
37
38
  if (issue.code === 'invalid_format' && 'format' in issue) {
38
- const fieldName = formatPath(issue.path).replace(/^--/, '');
39
+ const fieldName = formatZodPath(issue.path).replace(/^--/, '');
39
40
  const format = issue.format;
40
41
  if (format === 'email') {
41
42
  return `${path}: "${fieldName}" must be a valid email`;
@@ -46,7 +47,7 @@ function formatIssue(issue) {
46
47
  return `${path}: "${fieldName}" has invalid format: ${format}`;
47
48
  }
48
49
  if (issue.code === 'too_small' && 'minimum' in issue && 'type' in issue) {
49
- const fieldName = formatPath(issue.path).replace(/^--/, '');
50
+ const fieldName = formatZodPath(issue.path).replace(/^--/, '');
50
51
  const type = issue.type;
51
52
  const minimum = issue.minimum;
52
53
  if (type === 'string') {
@@ -60,7 +61,7 @@ function formatIssue(issue) {
60
61
  }
61
62
  }
62
63
  if (issue.code === 'too_big' && 'maximum' in issue && 'type' in issue) {
63
- const fieldName = formatPath(issue.path).replace(/^--/, '');
64
+ const fieldName = formatZodPath(issue.path).replace(/^--/, '');
64
65
  const type = issue.type;
65
66
  const maximum = issue.maximum;
66
67
  if (type === 'string') {
@@ -74,7 +75,7 @@ function formatIssue(issue) {
74
75
  }
75
76
  }
76
77
  if (issue.code === 'invalid_value') {
77
- const fieldName = formatPath(issue.path).replace(/^--/, '');
78
+ const fieldName = formatZodPath(issue.path).replace(/^--/, '');
78
79
  return `${path}: "${fieldName}" has invalid value`;
79
80
  }
80
81
  if (issue.code === 'unrecognized_keys' && 'keys' in issue) {
@@ -86,7 +87,7 @@ function formatIssue(issue) {
86
87
  /**
87
88
  * Форматирует путь к полю в читаемый формат
88
89
  */
89
- function formatPath(path) {
90
+ function formatZodPath(path) {
90
91
  if (path.length === 0) {
91
92
  return 'root';
92
93
  }
@@ -0,0 +1,3 @@
1
+ export * from './formatZodError';
2
+ export * from './validateZodOptions';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/Validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC"}
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./errorFormatter"), exports);
18
- __exportStar(require("./validateCLIOptions"), exports);
17
+ __exportStar(require("./formatZodError"), exports);
18
+ __exportStar(require("./validateZodOptions"), exports);
@@ -7,21 +7,21 @@ export type ValidationResult<T> = {
7
7
  data: T;
8
8
  } | {
9
9
  success: false;
10
- error: string;
10
+ errors: string[];
11
11
  };
12
12
  /**
13
13
  * Валидирует данные с помощью Zod схемы и возвращает отформатированный результат
14
14
  */
15
- export declare function validateCLIOptions<T>(schema: ZodSchema<T>, data: unknown): ValidationResult<T>;
15
+ export declare function validateZodOptions<T>(schema: ZodSchema<T>, data: unknown): ValidationResult<T>;
16
16
  /**
17
17
  * Валидирует данные с помощью Zod схемы и возвращает raw результат
18
18
  * (полезно когда нужен доступ к ZodError для дополнительной обработки)
19
19
  */
20
- export declare function validateCLIOptionsRaw<T>(schema: ZodSchema<T>, data: unknown): {
20
+ export declare function validateZodOptionsRaw<T>(schema: ZodSchema<T>, data: unknown): {
21
21
  success: true;
22
22
  data: T;
23
23
  } | {
24
24
  success: false;
25
25
  error: ZodError;
26
26
  };
27
- //# sourceMappingURL=validateCLIOptions.d.ts.map
27
+ //# sourceMappingURL=validateZodOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateZodOptions.d.ts","sourceRoot":"","sources":["../../../src/common/Validation/validateZodOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAI1C;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEpG;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAc9F;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,CAQ9I"}
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateCLIOptions = validateCLIOptions;
4
- exports.validateCLIOptionsRaw = validateCLIOptionsRaw;
3
+ exports.validateZodOptions = validateZodOptions;
4
+ exports.validateZodOptionsRaw = validateZodOptionsRaw;
5
5
  const zod_1 = require("zod");
6
- const errorFormatter_1 = require("./errorFormatter");
6
+ const formatZodError_1 = require("./formatZodError");
7
7
  /**
8
8
  * Валидирует данные с помощью Zod схемы и возвращает отформатированный результат
9
9
  */
10
- function validateCLIOptions(schema, data) {
10
+ function validateZodOptions(schema, data) {
11
11
  try {
12
12
  const result = schema.parse(data);
13
13
  return { success: true, data: result };
@@ -16,20 +16,17 @@ function validateCLIOptions(schema, data) {
16
16
  if (error instanceof zod_1.ZodError) {
17
17
  return {
18
18
  success: false,
19
- error: (0, errorFormatter_1.formatZodErrorForCLI)(error),
19
+ errors: (0, formatZodError_1.formatZodError)(error),
20
20
  };
21
21
  }
22
- return {
23
- success: false,
24
- error: error instanceof Error ? error.message : 'Unknown validation error',
25
- };
22
+ throw new Error(error instanceof Error ? error.message : 'Unknown validation error');
26
23
  }
27
24
  }
28
25
  /**
29
26
  * Валидирует данные с помощью Zod схемы и возвращает raw результат
30
27
  * (полезно когда нужен доступ к ZodError для дополнительной обработки)
31
28
  */
32
- function validateCLIOptionsRaw(schema, data) {
29
+ function validateZodOptionsRaw(schema, data) {
33
30
  const result = schema.safeParse(data);
34
31
  if (result.success) {
35
32
  return { success: true, data: result.data };
@@ -1,7 +1,7 @@
1
1
  import { SchemaMigrationPlan } from '../Types';
2
2
  /**
3
3
  * Unified migration plan that includes all migrations from all schema types.
4
- * Migrates from any old version to the latest UNIFIED_v1 schema.
4
+ * Migrates from any old version to the latest UNIFIED_OPTIONS_v1 schema.
5
5
  * Reuses existing migration plans to avoid code duplication.
6
6
  */
7
7
  export declare const allMigrationPlans: SchemaMigrationPlan<Record<string, any>, Record<string, any>>[];
@@ -1 +1 @@
1
- {"version":3,"file":"AllMigrationPlans.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAgB/C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EA4B5F,CAAC"}
1
+ {"version":3,"file":"AllMigrationPlans.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/AllMigrationPlans.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAiB/C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EA2C5F,CAAC"}
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.allMigrationPlans = void 0;
4
+ const EmptySchemaStrategy_enum_1 = require("../../../core/types/enums/EmptySchemaStrategy.enum");
4
5
  const ValidationLibrary_enum_1 = require("../../../core/types/enums/ValidationLibrary.enum");
6
+ const Enums_1 = require("../../Enums");
5
7
  const MultiOptionsMigrationPlan_1 = require("../MultiOptionsVersioned/MultiOptionsMigrationPlan");
6
8
  const OptionsMigrationPlans_1 = require("../OptionsVersioned/OptionsMigrationPlans");
9
+ const createDefaultFieldsMigration_1 = require("../Utils/createDefaultFieldsMigration");
7
10
  const createFieldTransformationMigration_1 = require("../Utils/createFieldTransformationMigration");
8
11
  const createTrivialMigration_1 = require("../Utils/createTrivialMigration");
9
12
  const getLatestVersionFromMigrationPlans_1 = require("../Utils/getLatestVersionFromMigrationPlans");
@@ -19,19 +22,26 @@ function addVersionPrefixToMigrationPlans(plans, prefix) {
19
22
  }
20
23
  /**
21
24
  * Unified migration plan that includes all migrations from all schema types.
22
- * Migrates from any old version to the latest UNIFIED_v1 schema.
25
+ * Migrates from any old version to the latest UNIFIED_OPTIONS_v1 schema.
23
26
  * Reuses existing migration plans to avoid code duplication.
24
27
  */
25
28
  exports.allMigrationPlans = [
26
29
  // ===== OPTIONS migrations (with prefix) =====
27
30
  ...addVersionPrefixToMigrationPlans(OptionsMigrationPlans_1.optionsMigrationPlans, 'OPTIONS'),
28
31
  // Migration from OPTIONS latest version to UNIFIED v1
29
- (0, createTrivialMigration_1.createTrivialMigration)(`OPTIONS_${(0, getLatestVersionFromMigrationPlans_1.getLatestVersionFromMigrationPlans)(OptionsMigrationPlans_1.optionsMigrationPlans)}`, 'UNIFIED_v1', 'Migrate from OPTIONS to UNIFIED schema'),
32
+ (0, createTrivialMigration_1.createTrivialMigration)(`OPTIONS_${(0, getLatestVersionFromMigrationPlans_1.getLatestVersionFromMigrationPlans)(OptionsMigrationPlans_1.optionsMigrationPlans)}`, 'UNIFIED_OPTIONS_v1', 'Migrate from OPTIONS to UNIFIED schema'),
30
33
  // ===== MULTI_OPTIONS migrations (with prefix) =====
31
34
  ...addVersionPrefixToMigrationPlans(MultiOptionsMigrationPlan_1.multiOptionsMigrationPlan, 'MULTI_OPTIONS'),
32
35
  // Migration from MULTI_OPTIONS latest version to UNIFIED v1
33
- (0, createTrivialMigration_1.createTrivialMigration)(`MULTI_OPTIONS_${(0, getLatestVersionFromMigrationPlans_1.getLatestVersionFromMigrationPlans)(MultiOptionsMigrationPlan_1.multiOptionsMigrationPlan)}`, 'UNIFIED_v1', 'Migrate from MULTI_OPTIONS to UNIFIED schema'),
34
- (0, createFieldTransformationMigration_1.createFieldTransformationMigration)('UNIFIED_v1', 'UNIFIED_v2', ({ includeSchemasFiles, ...otherProps }) => {
36
+ (0, createTrivialMigration_1.createTrivialMigration)(`MULTI_OPTIONS_${(0, getLatestVersionFromMigrationPlans_1.getLatestVersionFromMigrationPlans)(MultiOptionsMigrationPlan_1.multiOptionsMigrationPlan)}`, 'UNIFIED_OPTIONS_v1', 'Migrate from MULTI_OPTIONS to UNIFIED schema'),
37
+ (0, createFieldTransformationMigration_1.createFieldTransformationMigration)('UNIFIED_OPTIONS_v1', 'UNIFIED_OPTIONS_v2', ({ includeSchemasFiles, ...otherProps }) => {
35
38
  return { ...otherProps, validationLibrary: !includeSchemasFiles ? ValidationLibrary_enum_1.ValidationLibrary.NONE : undefined };
36
39
  }, 'Transforms includeSchemasFiles to validationLibrary: if includeSchemasFiles is false, sets validationLibrary to NONE'),
40
+ (0, createDefaultFieldsMigration_1.createDefaultFieldsMigration)('UNIFIED_OPTIONS_v2', 'UNIFIED_OPTIONS_v3', {
41
+ logLevel: Enums_1.ELogLevel.ERROR,
42
+ logTarget: Enums_1.ELogOutput.CONSOLE
43
+ }),
44
+ (0, createDefaultFieldsMigration_1.createDefaultFieldsMigration)('UNIFIED_OPTIONS_v3', 'UNIFIED_OPTIONS_v4', {
45
+ emptySchemaStrategy: EmptySchemaStrategy_enum_1.EmptySchemaStrategy.KEEP
46
+ })
37
47
  ];
@@ -1,8 +1,13 @@
1
+ import { z } from 'zod';
1
2
  import { VersionedSchema } from '../Types';
2
3
  /**
3
4
  * Unified array of all versioned schemas with prefixed versions.
4
5
  * This allows migration from any old schema version to the latest unified schema.
5
6
  * Reuses existing schema arrays to avoid code duplication.
7
+ *
8
+ * ВАЖНО!
9
+ * После обновления allVersionedSchemas необходимо обновить файл compatibilityCases
10
+ * src/common/VersionedSchema/Utils/__mocks__/compatibilityCases.ts
6
11
  */
7
- export declare const allVersionedSchemas: VersionedSchema<Record<string, any>>[];
12
+ export declare const allVersionedSchemas: VersionedSchema<z.ZodTypeAny>[];
8
13
  //# sourceMappingURL=AllVersionedSchemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AllVersionedSchemas.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAiB3C;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,EAkBrE,CAAC"}
1
+ {"version":3,"file":"AllVersionedSchemas.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/AllVersionedSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAgB3C;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,eAAe,CAAC,CAAC,CAAC,UAAU,CAAC,EAS9D,CAAC"}
@@ -4,8 +4,7 @@ exports.allVersionedSchemas = void 0;
4
4
  const Enums_1 = require("../Enums");
5
5
  const MultiOptionsVersionedSchemas_1 = require("../MultiOptionsVersioned/MultiOptionsVersionedSchemas");
6
6
  const OptionsVersionedSchemas_1 = require("../OptionsVersioned/OptionsVersionedSchemas");
7
- const UnifiedOptionsSchemaV1_1 = require("./UnifiedOptionsSchemaV1");
8
- const UnifiedOptionsSchemaV2_1 = require("./UnifiedOptionsSchemaV2");
7
+ const UnifiedVersionedSchemas_1 = require("./UnifiedVersionedSchemas");
9
8
  /**
10
9
  * Adds a prefix to all version strings in a versioned schema array.
11
10
  */
@@ -19,21 +18,16 @@ function addVersionPrefix(schemas, prefix) {
19
18
  * Unified array of all versioned schemas with prefixed versions.
20
19
  * This allows migration from any old schema version to the latest unified schema.
21
20
  * Reuses existing schema arrays to avoid code duplication.
21
+ *
22
+ * ВАЖНО!
23
+ * После обновления allVersionedSchemas необходимо обновить файл compatibilityCases
24
+ * src/common/VersionedSchema/Utils/__mocks__/compatibilityCases.ts
22
25
  */
23
26
  exports.allVersionedSchemas = [
24
27
  // OPTIONS schemas with prefix
25
- ...addVersionPrefix(OptionsVersionedSchemas_1.optionsVersionedSchemas, 'OPTIONS'),
28
+ ...addVersionPrefix(OptionsVersionedSchemas_1.optionsVersionedSchemas, Enums_1.EVersionedSchemaType.OPTIONS),
26
29
  // MULTI_OPTIONS schemas with prefix
27
- ...addVersionPrefix(MultiOptionsVersionedSchemas_1.multiOptionsVersionedSchema, 'MULTI_OPTIONS'),
30
+ ...addVersionPrefix(MultiOptionsVersionedSchemas_1.multiOptionsVersionedSchema, Enums_1.EVersionedSchemaType.MULTI_OPTIONS),
28
31
  // UNIFIED_OPTIONS schemas (latest)
29
- {
30
- version: 'UNIFIED_v1',
31
- schema: UnifiedOptionsSchemaV1_1.unifiedOptionsSchemaV1,
32
- type: Enums_1.EVersionedSchemaType.UNIFIED_OPTIONS,
33
- },
34
- {
35
- version: 'UNIFIED_v2',
36
- schema: UnifiedOptionsSchemaV2_1.unifiedOptionsSchemaV2,
37
- type: Enums_1.EVersionedSchemaType.UNIFIED_OPTIONS,
38
- }
32
+ ...addVersionPrefix(UnifiedVersionedSchemas_1.unifiedVersionedSchemas, Enums_1.EVersionedSchemaType.UNIFIED_OPTIONS)
39
33
  ];
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ import { HttpClient } from '../../../core/types/enums/HttpClient.enum';
3
+ import { ELogLevel, ELogOutput } from '../../Enums';
4
+ export declare const unifiedOptionsShape: z.ZodObject<{
5
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
6
+ input: z.ZodString;
7
+ request: z.ZodOptional<z.ZodString>;
8
+ sortByRequired: z.ZodOptional<z.ZodBoolean>;
9
+ useSeparatedIndexes: z.ZodOptional<z.ZodBoolean>;
10
+ useCancelableRequest: z.ZodOptional<z.ZodBoolean>;
11
+ interfacePrefix: z.ZodOptional<z.ZodString>;
12
+ enumPrefix: z.ZodOptional<z.ZodString>;
13
+ typePrefix: z.ZodOptional<z.ZodString>;
14
+ output: z.ZodString;
15
+ outputCore: z.ZodOptional<z.ZodString>;
16
+ outputServices: z.ZodOptional<z.ZodString>;
17
+ outputModels: z.ZodOptional<z.ZodString>;
18
+ outputSchemas: z.ZodOptional<z.ZodString>;
19
+ }, z.core.$strip>>>;
20
+ input: z.ZodOptional<z.ZodString>;
21
+ output: z.ZodOptional<z.ZodString>;
22
+ httpClient: z.ZodEnum<typeof HttpClient>;
23
+ }, z.core.$strip>;
24
+ export declare const debugSettingsShape: z.ZodObject<{
25
+ logLevel: z.ZodOptional<z.ZodEnum<typeof ELogLevel>>;
26
+ logTarget: z.ZodOptional<z.ZodEnum<typeof ELogOutput>>;
27
+ }, z.core.$strip>;
28
+ //# sourceMappingURL=UnifiedBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnifiedBase.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/UnifiedBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAapD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;iBAK9B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.debugSettingsShape = exports.unifiedOptionsShape = void 0;
4
+ const zod_1 = require("zod");
5
+ const HttpClient_enum_1 = require("../../../core/types/enums/HttpClient.enum");
6
+ const Enums_1 = require("../../Enums");
7
+ const CommonSchemas_1 = require("../CommonSchemas");
8
+ const unifiedItemSchema = zod_1.z
9
+ .object({
10
+ ...CommonSchemas_1.outputPathsSchema.shape,
11
+ ...CommonSchemas_1.additionalParametersSchemaV2.shape,
12
+ ...CommonSchemas_1.experimentalParametersSchemaV2.shape,
13
+ input: zod_1.z.string().min(1),
14
+ request: zod_1.z.string().optional(),
15
+ });
16
+ exports.unifiedOptionsShape = zod_1.z.object({
17
+ items: zod_1.z.array(unifiedItemSchema).min(1).optional(),
18
+ input: zod_1.z.string().optional(),
19
+ output: zod_1.z.string().optional(),
20
+ httpClient: zod_1.z.enum(HttpClient_enum_1.HttpClient),
21
+ });
22
+ exports.debugSettingsShape = zod_1.z.object({
23
+ logLevel: zod_1.z.enum(Enums_1.ELogLevel).optional(),
24
+ logTarget: zod_1.z.enum(Enums_1.ELogOutput).optional(),
25
+ });
@@ -1,7 +1,37 @@
1
- import Joi from 'joi';
2
- /**
3
- * Unified options schema that supports both single and multi-item configurations.
4
- * Use either 'items' array for multiple specs OR 'input'/'output' for single spec.
5
- */
6
- export declare const unifiedOptionsSchemaV1: Joi.ObjectSchema<any>;
1
+ import { z } from 'zod';
2
+ export declare const unifiedOptionsSchemaV1: z.ZodObject<{
3
+ sortByRequired: z.ZodOptional<z.ZodBoolean>;
4
+ useSeparatedIndexes: z.ZodOptional<z.ZodBoolean>;
5
+ useCancelableRequest: z.ZodOptional<z.ZodBoolean>;
6
+ request: z.ZodOptional<z.ZodString>;
7
+ interfacePrefix: z.ZodOptional<z.ZodString>;
8
+ enumPrefix: z.ZodOptional<z.ZodString>;
9
+ typePrefix: z.ZodOptional<z.ZodString>;
10
+ excludeCoreServiceFiles: z.ZodOptional<z.ZodBoolean>;
11
+ includeSchemasFiles: z.ZodOptional<z.ZodBoolean>;
12
+ useOptions: z.ZodOptional<z.ZodBoolean>;
13
+ useUnionTypes: z.ZodOptional<z.ZodBoolean>;
14
+ outputCore: z.ZodOptional<z.ZodString>;
15
+ outputServices: z.ZodOptional<z.ZodString>;
16
+ outputModels: z.ZodOptional<z.ZodString>;
17
+ outputSchemas: z.ZodOptional<z.ZodString>;
18
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
19
+ input: z.ZodString;
20
+ request: z.ZodOptional<z.ZodString>;
21
+ sortByRequired: z.ZodOptional<z.ZodBoolean>;
22
+ useSeparatedIndexes: z.ZodOptional<z.ZodBoolean>;
23
+ useCancelableRequest: z.ZodOptional<z.ZodBoolean>;
24
+ interfacePrefix: z.ZodOptional<z.ZodString>;
25
+ enumPrefix: z.ZodOptional<z.ZodString>;
26
+ typePrefix: z.ZodOptional<z.ZodString>;
27
+ output: z.ZodString;
28
+ outputCore: z.ZodOptional<z.ZodString>;
29
+ outputServices: z.ZodOptional<z.ZodString>;
30
+ outputModels: z.ZodOptional<z.ZodString>;
31
+ outputSchemas: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strip>>>;
33
+ input: z.ZodOptional<z.ZodString>;
34
+ output: z.ZodOptional<z.ZodString>;
35
+ httpClient: z.ZodEnum<typeof import("../../..").HttpClient>;
36
+ }, z.core.$strip>;
7
37
  //# sourceMappingURL=UnifiedOptionsSchemaV1.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnifiedOptionsSchemaV1.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAgBtB;;;GAGG;AACH,eAAO,MAAM,sBAAsB,uBA4BZ,CAAC"}
1
+ {"version":3,"file":"UnifiedOptionsSchemaV1.d.ts","sourceRoot":"","sources":["../../../../src/common/VersionedSchema/AllVersionedSchemas/UnifiedOptionsSchemaV1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAOtB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMjC,CAAC"}