vona-module-a-swagger 5.0.2

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 (458) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +2 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/lib/common/index.d.ts +2 -0
  7. package/dist/lib/common/index.d.ts.map +1 -0
  8. package/dist/lib/common/index.js +2 -0
  9. package/dist/lib/common/index.js.map +1 -0
  10. package/dist/lib/common/type.interface.d.ts +4 -0
  11. package/dist/lib/common/type.interface.d.ts.map +1 -0
  12. package/dist/lib/common/type.interface.js +2 -0
  13. package/dist/lib/common/type.interface.js.map +1 -0
  14. package/dist/lib/constants.d.ts +22 -0
  15. package/dist/lib/constants.d.ts.map +1 -0
  16. package/dist/lib/constants.js +22 -0
  17. package/dist/lib/constants.js.map +1 -0
  18. package/dist/lib/decorators/api-basic.decorator.d.ts +2 -0
  19. package/dist/lib/decorators/api-basic.decorator.d.ts.map +1 -0
  20. package/dist/lib/decorators/api-basic.decorator.js +5 -0
  21. package/dist/lib/decorators/api-basic.decorator.js.map +1 -0
  22. package/dist/lib/decorators/api-bearer.decorator.d.ts +2 -0
  23. package/dist/lib/decorators/api-bearer.decorator.d.ts.map +1 -0
  24. package/dist/lib/decorators/api-bearer.decorator.js +5 -0
  25. package/dist/lib/decorators/api-bearer.decorator.js.map +1 -0
  26. package/dist/lib/decorators/api-body.decorator.d.ts +17 -0
  27. package/dist/lib/decorators/api-body.decorator.d.ts.map +1 -0
  28. package/dist/lib/decorators/api-body.decorator.js +24 -0
  29. package/dist/lib/decorators/api-body.decorator.js.map +1 -0
  30. package/dist/lib/decorators/api-callbacks.decorator.d.ts +3 -0
  31. package/dist/lib/decorators/api-callbacks.decorator.d.ts.map +1 -0
  32. package/dist/lib/decorators/api-callbacks.decorator.js +6 -0
  33. package/dist/lib/decorators/api-callbacks.decorator.js.map +1 -0
  34. package/dist/lib/decorators/api-consumes.decorator.d.ts +2 -0
  35. package/dist/lib/decorators/api-consumes.decorator.d.ts.map +1 -0
  36. package/dist/lib/decorators/api-consumes.decorator.js +6 -0
  37. package/dist/lib/decorators/api-consumes.decorator.js.map +1 -0
  38. package/dist/lib/decorators/api-cookie.decorator.d.ts +2 -0
  39. package/dist/lib/decorators/api-cookie.decorator.d.ts.map +1 -0
  40. package/dist/lib/decorators/api-cookie.decorator.js +5 -0
  41. package/dist/lib/decorators/api-cookie.decorator.js.map +1 -0
  42. package/dist/lib/decorators/api-default-getter.decorator.d.ts +25 -0
  43. package/dist/lib/decorators/api-default-getter.decorator.d.ts.map +1 -0
  44. package/dist/lib/decorators/api-default-getter.decorator.js +32 -0
  45. package/dist/lib/decorators/api-default-getter.decorator.js.map +1 -0
  46. package/dist/lib/decorators/api-exclude-controller.decorator.d.ts +2 -0
  47. package/dist/lib/decorators/api-exclude-controller.decorator.d.ts.map +1 -0
  48. package/dist/lib/decorators/api-exclude-controller.decorator.js +6 -0
  49. package/dist/lib/decorators/api-exclude-controller.decorator.js.map +1 -0
  50. package/dist/lib/decorators/api-exclude-endpoint.decorator.d.ts +2 -0
  51. package/dist/lib/decorators/api-exclude-endpoint.decorator.d.ts.map +1 -0
  52. package/dist/lib/decorators/api-exclude-endpoint.decorator.js +8 -0
  53. package/dist/lib/decorators/api-exclude-endpoint.decorator.js.map +1 -0
  54. package/dist/lib/decorators/api-extension.decorator.d.ts +2 -0
  55. package/dist/lib/decorators/api-extension.decorator.d.ts.map +1 -0
  56. package/dist/lib/decorators/api-extension.decorator.js +13 -0
  57. package/dist/lib/decorators/api-extension.decorator.js.map +1 -0
  58. package/dist/lib/decorators/api-extra-models.decorator.d.ts +2 -0
  59. package/dist/lib/decorators/api-extra-models.decorator.d.ts.map +1 -0
  60. package/dist/lib/decorators/api-extra-models.decorator.js +14 -0
  61. package/dist/lib/decorators/api-extra-models.decorator.js.map +1 -0
  62. package/dist/lib/decorators/api-header.decorator.d.ts +8 -0
  63. package/dist/lib/decorators/api-header.decorator.d.ts.map +1 -0
  64. package/dist/lib/decorators/api-header.decorator.js +40 -0
  65. package/dist/lib/decorators/api-header.decorator.js.map +1 -0
  66. package/dist/lib/decorators/api-hide-property.decorator.d.ts +2 -0
  67. package/dist/lib/decorators/api-hide-property.decorator.d.ts.map +1 -0
  68. package/dist/lib/decorators/api-hide-property.decorator.js +5 -0
  69. package/dist/lib/decorators/api-hide-property.decorator.js.map +1 -0
  70. package/dist/lib/decorators/api-link.decorator.d.ts +48 -0
  71. package/dist/lib/decorators/api-link.decorator.d.ts.map +1 -0
  72. package/dist/lib/decorators/api-link.decorator.js +50 -0
  73. package/dist/lib/decorators/api-link.decorator.js.map +1 -0
  74. package/dist/lib/decorators/api-oauth2.decorator.d.ts +2 -0
  75. package/dist/lib/decorators/api-oauth2.decorator.d.ts.map +1 -0
  76. package/dist/lib/decorators/api-oauth2.decorator.js +5 -0
  77. package/dist/lib/decorators/api-oauth2.decorator.js.map +1 -0
  78. package/dist/lib/decorators/api-operation.decorator.d.ts +6 -0
  79. package/dist/lib/decorators/api-operation.decorator.d.ts.map +1 -0
  80. package/dist/lib/decorators/api-operation.decorator.js +13 -0
  81. package/dist/lib/decorators/api-operation.decorator.js.map +1 -0
  82. package/dist/lib/decorators/api-param.decorator.d.ts +23 -0
  83. package/dist/lib/decorators/api-param.decorator.d.ts.map +1 -0
  84. package/dist/lib/decorators/api-param.decorator.js +19 -0
  85. package/dist/lib/decorators/api-param.decorator.js.map +1 -0
  86. package/dist/lib/decorators/api-produces.decorator.d.ts +2 -0
  87. package/dist/lib/decorators/api-produces.decorator.d.ts.map +1 -0
  88. package/dist/lib/decorators/api-produces.decorator.js +6 -0
  89. package/dist/lib/decorators/api-produces.decorator.js.map +1 -0
  90. package/dist/lib/decorators/api-property.decorator.d.ts +25 -0
  91. package/dist/lib/decorators/api-property.decorator.d.ts.map +1 -0
  92. package/dist/lib/decorators/api-property.decorator.js +53 -0
  93. package/dist/lib/decorators/api-property.decorator.js.map +1 -0
  94. package/dist/lib/decorators/api-query.decorator.d.ts +25 -0
  95. package/dist/lib/decorators/api-query.decorator.d.ts.map +1 -0
  96. package/dist/lib/decorators/api-query.decorator.js +28 -0
  97. package/dist/lib/decorators/api-query.decorator.js.map +1 -0
  98. package/dist/lib/decorators/api-response.decorator.d.ts +40 -0
  99. package/dist/lib/decorators/api-response.decorator.d.ts.map +1 -0
  100. package/dist/lib/decorators/api-response.decorator.js +63 -0
  101. package/dist/lib/decorators/api-response.decorator.js.map +1 -0
  102. package/dist/lib/decorators/api-schema.decorator.d.ts +9 -0
  103. package/dist/lib/decorators/api-schema.decorator.d.ts.map +1 -0
  104. package/dist/lib/decorators/api-schema.decorator.js +6 -0
  105. package/dist/lib/decorators/api-schema.decorator.js.map +1 -0
  106. package/dist/lib/decorators/api-security.decorator.d.ts +3 -0
  107. package/dist/lib/decorators/api-security.decorator.d.ts.map +1 -0
  108. package/dist/lib/decorators/api-security.decorator.js +23 -0
  109. package/dist/lib/decorators/api-security.decorator.js.map +1 -0
  110. package/dist/lib/decorators/api-use-tags.decorator.d.ts +2 -0
  111. package/dist/lib/decorators/api-use-tags.decorator.d.ts.map +1 -0
  112. package/dist/lib/decorators/api-use-tags.decorator.js +6 -0
  113. package/dist/lib/decorators/api-use-tags.decorator.js.map +1 -0
  114. package/dist/lib/decorators/helpers.d.ts +9 -0
  115. package/dist/lib/decorators/helpers.d.ts.map +1 -0
  116. package/dist/lib/decorators/helpers.js +120 -0
  117. package/dist/lib/decorators/helpers.js.map +1 -0
  118. package/dist/lib/decorators/index.d.ts +25 -0
  119. package/dist/lib/decorators/index.d.ts.map +1 -0
  120. package/dist/lib/decorators/index.js +25 -0
  121. package/dist/lib/decorators/index.js.map +1 -0
  122. package/dist/lib/document-builder.d.ts +28 -0
  123. package/dist/lib/document-builder.d.ts.map +1 -0
  124. package/dist/lib/document-builder.js +167 -0
  125. package/dist/lib/document-builder.js.map +1 -0
  126. package/dist/lib/explorers/api-callbacks.explorer.d.ts +3 -0
  127. package/dist/lib/explorers/api-callbacks.explorer.d.ts.map +1 -0
  128. package/dist/lib/explorers/api-callbacks.explorer.js +35 -0
  129. package/dist/lib/explorers/api-callbacks.explorer.js.map +1 -0
  130. package/dist/lib/explorers/api-consumes.explorer.d.ts +6 -0
  131. package/dist/lib/explorers/api-consumes.explorer.d.ts.map +1 -0
  132. package/dist/lib/explorers/api-consumes.explorer.js +7 -0
  133. package/dist/lib/explorers/api-consumes.explorer.js.map +1 -0
  134. package/dist/lib/explorers/api-exclude-controller.explorer.d.ts +3 -0
  135. package/dist/lib/explorers/api-exclude-controller.explorer.d.ts.map +1 -0
  136. package/dist/lib/explorers/api-exclude-controller.explorer.js +3 -0
  137. package/dist/lib/explorers/api-exclude-controller.explorer.js.map +1 -0
  138. package/dist/lib/explorers/api-exclude-endpoint.explorer.d.ts +3 -0
  139. package/dist/lib/explorers/api-exclude-endpoint.explorer.d.ts.map +1 -0
  140. package/dist/lib/explorers/api-exclude-endpoint.explorer.js +3 -0
  141. package/dist/lib/explorers/api-exclude-endpoint.explorer.js.map +1 -0
  142. package/dist/lib/explorers/api-extra-models.explorer.d.ts +4 -0
  143. package/dist/lib/explorers/api-extra-models.explorer.d.ts.map +1 -0
  144. package/dist/lib/explorers/api-extra-models.explorer.js +7 -0
  145. package/dist/lib/explorers/api-extra-models.explorer.js.map +1 -0
  146. package/dist/lib/explorers/api-headers.explorer.d.ts +8 -0
  147. package/dist/lib/explorers/api-headers.explorer.d.ts.map +1 -0
  148. package/dist/lib/explorers/api-headers.explorer.js +6 -0
  149. package/dist/lib/explorers/api-headers.explorer.js.map +1 -0
  150. package/dist/lib/explorers/api-operation.explorer.d.ts +3 -0
  151. package/dist/lib/explorers/api-operation.explorer.d.ts.map +1 -0
  152. package/dist/lib/explorers/api-operation.explorer.js +38 -0
  153. package/dist/lib/explorers/api-operation.explorer.js.map +1 -0
  154. package/dist/lib/explorers/api-parameters.explorer.d.ts +6 -0
  155. package/dist/lib/explorers/api-parameters.explorer.d.ts.map +1 -0
  156. package/dist/lib/explorers/api-parameters.explorer.js +44 -0
  157. package/dist/lib/explorers/api-parameters.explorer.js.map +1 -0
  158. package/dist/lib/explorers/api-produces.explorer.d.ts +6 -0
  159. package/dist/lib/explorers/api-produces.explorer.d.ts.map +1 -0
  160. package/dist/lib/explorers/api-produces.explorer.js +7 -0
  161. package/dist/lib/explorers/api-produces.explorer.js.map +1 -0
  162. package/dist/lib/explorers/api-response.explorer.d.ts +8 -0
  163. package/dist/lib/explorers/api-response.explorer.d.ts.map +1 -0
  164. package/dist/lib/explorers/api-response.explorer.js +77 -0
  165. package/dist/lib/explorers/api-response.explorer.js.map +1 -0
  166. package/dist/lib/explorers/api-security.explorer.d.ts +6 -0
  167. package/dist/lib/explorers/api-security.explorer.d.ts.map +1 -0
  168. package/dist/lib/explorers/api-security.explorer.js +9 -0
  169. package/dist/lib/explorers/api-security.explorer.js.map +1 -0
  170. package/dist/lib/explorers/api-use-tags.explorer.d.ts +6 -0
  171. package/dist/lib/explorers/api-use-tags.explorer.d.ts.map +1 -0
  172. package/dist/lib/explorers/api-use-tags.explorer.js +17 -0
  173. package/dist/lib/explorers/api-use-tags.explorer.js.map +1 -0
  174. package/dist/lib/extra/swagger-shim.d.ts +97 -0
  175. package/dist/lib/extra/swagger-shim.d.ts.map +1 -0
  176. package/dist/lib/extra/swagger-shim.js +265 -0
  177. package/dist/lib/extra/swagger-shim.js.map +1 -0
  178. package/dist/lib/fixtures/document.base.d.ts +3 -0
  179. package/dist/lib/fixtures/document.base.d.ts.map +1 -0
  180. package/dist/lib/fixtures/document.base.js +13 -0
  181. package/dist/lib/fixtures/document.base.js.map +1 -0
  182. package/dist/lib/index.d.ts +8 -0
  183. package/dist/lib/index.d.ts.map +1 -0
  184. package/dist/lib/index.js +8 -0
  185. package/dist/lib/index.js.map +1 -0
  186. package/dist/lib/interfaces/callback-object.interface.d.ts +13 -0
  187. package/dist/lib/interfaces/callback-object.interface.d.ts.map +1 -0
  188. package/dist/lib/interfaces/callback-object.interface.js +2 -0
  189. package/dist/lib/interfaces/callback-object.interface.js.map +1 -0
  190. package/dist/lib/interfaces/denormalized-doc-resolvers.interface.d.ts +8 -0
  191. package/dist/lib/interfaces/denormalized-doc-resolvers.interface.d.ts.map +1 -0
  192. package/dist/lib/interfaces/denormalized-doc-resolvers.interface.js +2 -0
  193. package/dist/lib/interfaces/denormalized-doc-resolvers.interface.js.map +1 -0
  194. package/dist/lib/interfaces/denormalized-doc.interface.d.ts +9 -0
  195. package/dist/lib/interfaces/denormalized-doc.interface.d.ts.map +1 -0
  196. package/dist/lib/interfaces/denormalized-doc.interface.js +2 -0
  197. package/dist/lib/interfaces/denormalized-doc.interface.js.map +1 -0
  198. package/dist/lib/interfaces/enum-schema-attributes.interface.d.ts +3 -0
  199. package/dist/lib/interfaces/enum-schema-attributes.interface.d.ts.map +1 -0
  200. package/dist/lib/interfaces/enum-schema-attributes.interface.js +2 -0
  201. package/dist/lib/interfaces/enum-schema-attributes.interface.js.map +1 -0
  202. package/dist/lib/interfaces/index.d.ts +4 -0
  203. package/dist/lib/interfaces/index.d.ts.map +1 -0
  204. package/dist/lib/interfaces/index.js +3 -0
  205. package/dist/lib/interfaces/index.js.map +1 -0
  206. package/dist/lib/interfaces/module-route.interface.d.ts +3 -0
  207. package/dist/lib/interfaces/module-route.interface.d.ts.map +1 -0
  208. package/dist/lib/interfaces/module-route.interface.js +2 -0
  209. package/dist/lib/interfaces/module-route.interface.js.map +1 -0
  210. package/dist/lib/interfaces/open-api-spec.interface.d.ts +241 -0
  211. package/dist/lib/interfaces/open-api-spec.interface.d.ts.map +1 -0
  212. package/dist/lib/interfaces/open-api-spec.interface.js +6 -0
  213. package/dist/lib/interfaces/open-api-spec.interface.js.map +1 -0
  214. package/dist/lib/interfaces/schema-object-metadata.interface.d.ts +24 -0
  215. package/dist/lib/interfaces/schema-object-metadata.interface.d.ts.map +1 -0
  216. package/dist/lib/interfaces/schema-object-metadata.interface.js +2 -0
  217. package/dist/lib/interfaces/schema-object-metadata.interface.js.map +1 -0
  218. package/dist/lib/interfaces/swagger-custom-options.interface.d.ts +85 -0
  219. package/dist/lib/interfaces/swagger-custom-options.interface.d.ts.map +1 -0
  220. package/dist/lib/interfaces/swagger-custom-options.interface.js +2 -0
  221. package/dist/lib/interfaces/swagger-custom-options.interface.js.map +1 -0
  222. package/dist/lib/interfaces/swagger-document-options.interface.d.ts +36 -0
  223. package/dist/lib/interfaces/swagger-document-options.interface.d.ts.map +1 -0
  224. package/dist/lib/interfaces/swagger-document-options.interface.js +2 -0
  225. package/dist/lib/interfaces/swagger-document-options.interface.js.map +1 -0
  226. package/dist/lib/interfaces/swagger-ui-init-options.interface.d.ts +8 -0
  227. package/dist/lib/interfaces/swagger-ui-init-options.interface.d.ts.map +1 -0
  228. package/dist/lib/interfaces/swagger-ui-init-options.interface.js +2 -0
  229. package/dist/lib/interfaces/swagger-ui-init-options.interface.js.map +1 -0
  230. package/dist/lib/interfaces/swagger-ui-options.interface.d.ts +21 -0
  231. package/dist/lib/interfaces/swagger-ui-options.interface.d.ts.map +1 -0
  232. package/dist/lib/interfaces/swagger-ui-options.interface.js +2 -0
  233. package/dist/lib/interfaces/swagger-ui-options.interface.js.map +1 -0
  234. package/dist/lib/plugin/compiler-plugin.d.ts +3 -0
  235. package/dist/lib/plugin/compiler-plugin.d.ts.map +1 -0
  236. package/dist/lib/plugin/compiler-plugin.js +27 -0
  237. package/dist/lib/plugin/compiler-plugin.js.map +1 -0
  238. package/dist/lib/plugin/index.d.ts +3 -0
  239. package/dist/lib/plugin/index.d.ts.map +1 -0
  240. package/dist/lib/plugin/index.js +3 -0
  241. package/dist/lib/plugin/index.js.map +1 -0
  242. package/dist/lib/plugin/merge-options.d.ts +15 -0
  243. package/dist/lib/plugin/merge-options.d.ts.map +1 -0
  244. package/dist/lib/plugin/merge-options.js +35 -0
  245. package/dist/lib/plugin/merge-options.js.map +1 -0
  246. package/dist/lib/plugin/metadata-loader.d.ts +8 -0
  247. package/dist/lib/plugin/metadata-loader.d.ts.map +1 -0
  248. package/dist/lib/plugin/metadata-loader.js +41 -0
  249. package/dist/lib/plugin/metadata-loader.js.map +1 -0
  250. package/dist/lib/plugin/plugin-constants.d.ts +4 -0
  251. package/dist/lib/plugin/plugin-constants.d.ts.map +1 -0
  252. package/dist/lib/plugin/plugin-constants.js +4 -0
  253. package/dist/lib/plugin/plugin-constants.js.map +1 -0
  254. package/dist/lib/plugin/plugin-debug-logger.d.ts +6 -0
  255. package/dist/lib/plugin/plugin-debug-logger.d.ts.map +1 -0
  256. package/dist/lib/plugin/plugin-debug-logger.js +5 -0
  257. package/dist/lib/plugin/plugin-debug-logger.js.map +1 -0
  258. package/dist/lib/plugin/utils/ast-utils.d.ts +31 -0
  259. package/dist/lib/plugin/utils/ast-utils.d.ts.map +1 -0
  260. package/dist/lib/plugin/utils/ast-utils.js +242 -0
  261. package/dist/lib/plugin/utils/ast-utils.js.map +1 -0
  262. package/dist/lib/plugin/utils/external-imports.util.d.ts +4 -0
  263. package/dist/lib/plugin/utils/external-imports.util.d.ts.map +1 -0
  264. package/dist/lib/plugin/utils/external-imports.util.js +31 -0
  265. package/dist/lib/plugin/utils/external-imports.util.js.map +1 -0
  266. package/dist/lib/plugin/utils/is-filename-matched.util.d.ts +2 -0
  267. package/dist/lib/plugin/utils/is-filename-matched.util.d.ts.map +1 -0
  268. package/dist/lib/plugin/utils/is-filename-matched.util.js +2 -0
  269. package/dist/lib/plugin/utils/is-filename-matched.util.js.map +1 -0
  270. package/dist/lib/plugin/utils/plugin-utils.d.ts +58 -0
  271. package/dist/lib/plugin/utils/plugin-utils.d.ts.map +1 -0
  272. package/dist/lib/plugin/utils/plugin-utils.js +282 -0
  273. package/dist/lib/plugin/utils/plugin-utils.js.map +1 -0
  274. package/dist/lib/plugin/utils/type-reference-to-identifier.util.d.ts +8 -0
  275. package/dist/lib/plugin/utils/type-reference-to-identifier.util.d.ts.map +1 -0
  276. package/dist/lib/plugin/utils/type-reference-to-identifier.util.js +50 -0
  277. package/dist/lib/plugin/utils/type-reference-to-identifier.util.js.map +1 -0
  278. package/dist/lib/plugin/visitors/abstract.visitor.d.ts +5 -0
  279. package/dist/lib/plugin/visitors/abstract.visitor.d.ts.map +1 -0
  280. package/dist/lib/plugin/visitors/abstract.visitor.js +20 -0
  281. package/dist/lib/plugin/visitors/abstract.visitor.js.map +1 -0
  282. package/dist/lib/plugin/visitors/controller-class.visitor.d.ts +21 -0
  283. package/dist/lib/plugin/visitors/controller-class.visitor.d.ts.map +1 -0
  284. package/dist/lib/plugin/visitors/controller-class.visitor.js +266 -0
  285. package/dist/lib/plugin/visitors/controller-class.visitor.js.map +1 -0
  286. package/dist/lib/plugin/visitors/model-class.visitor.d.ts +40 -0
  287. package/dist/lib/plugin/visitors/model-class.visitor.d.ts.map +1 -0
  288. package/dist/lib/plugin/visitors/model-class.visitor.js +445 -0
  289. package/dist/lib/plugin/visitors/model-class.visitor.js.map +1 -0
  290. package/dist/lib/plugin/visitors/readonly.visitor.d.ts +22 -0
  291. package/dist/lib/plugin/visitors/readonly.visitor.d.ts.map +1 -0
  292. package/dist/lib/plugin/visitors/readonly.visitor.js +60 -0
  293. package/dist/lib/plugin/visitors/readonly.visitor.js.map +1 -0
  294. package/dist/lib/services/constants.d.ts +2 -0
  295. package/dist/lib/services/constants.d.ts.map +1 -0
  296. package/dist/lib/services/constants.js +2 -0
  297. package/dist/lib/services/constants.js.map +1 -0
  298. package/dist/lib/services/decorators-properties.d.ts +27 -0
  299. package/dist/lib/services/decorators-properties.d.ts.map +1 -0
  300. package/dist/lib/services/decorators-properties.js +147 -0
  301. package/dist/lib/services/decorators-properties.js.map +1 -0
  302. package/dist/lib/services/mimetype-content-wrapper.d.ts +5 -0
  303. package/dist/lib/services/mimetype-content-wrapper.d.ts.map +1 -0
  304. package/dist/lib/services/mimetype-content-wrapper.js +8 -0
  305. package/dist/lib/services/mimetype-content-wrapper.js.map +1 -0
  306. package/dist/lib/services/model-properties-accessor.d.ts +7 -0
  307. package/dist/lib/services/model-properties-accessor.d.ts.map +1 -0
  308. package/dist/lib/services/model-properties-accessor.js +33 -0
  309. package/dist/lib/services/model-properties-accessor.js.map +1 -0
  310. package/dist/lib/services/parameter-metadata-accessor.d.ts +22 -0
  311. package/dist/lib/services/parameter-metadata-accessor.d.ts.map +1 -0
  312. package/dist/lib/services/parameter-metadata-accessor.js +38 -0
  313. package/dist/lib/services/parameter-metadata-accessor.js.map +1 -0
  314. package/dist/lib/services/parameters-metadata-mapper.d.ts +10 -0
  315. package/dist/lib/services/parameters-metadata-mapper.d.ts.map +1 -0
  316. package/dist/lib/services/parameters-metadata-mapper.js +45 -0
  317. package/dist/lib/services/parameters-metadata-mapper.js.map +1 -0
  318. package/dist/lib/services/response-object-factory.d.ts +15 -0
  319. package/dist/lib/services/response-object-factory.d.ts.map +1 -0
  320. package/dist/lib/services/response-object-factory.js +123 -0
  321. package/dist/lib/services/response-object-factory.js.map +1 -0
  322. package/dist/lib/services/response-object-mapper.d.ts +8 -0
  323. package/dist/lib/services/response-object-mapper.d.ts.map +1 -0
  324. package/dist/lib/services/response-object-mapper.js +55 -0
  325. package/dist/lib/services/response-object-mapper.js.map +1 -0
  326. package/dist/lib/services/schema-object-factory.d.ts +160 -0
  327. package/dist/lib/services/schema-object-factory.d.ts.map +1 -0
  328. package/dist/lib/services/schema-object-factory.js +484 -0
  329. package/dist/lib/services/schema-object-factory.js.map +1 -0
  330. package/dist/lib/services/swagger-types-mapper.d.ts +19 -0
  331. package/dist/lib/services/swagger-types-mapper.d.ts.map +1 -0
  332. package/dist/lib/services/swagger-types-mapper.js +132 -0
  333. package/dist/lib/services/swagger-types-mapper.js.map +1 -0
  334. package/dist/lib/storages/global-parameters.storage.d.ts +9 -0
  335. package/dist/lib/storages/global-parameters.storage.d.ts.map +1 -0
  336. package/dist/lib/storages/global-parameters.storage.js +23 -0
  337. package/dist/lib/storages/global-parameters.storage.js.map +1 -0
  338. package/dist/lib/swagger-transformer.d.ts +8 -0
  339. package/dist/lib/swagger-transformer.d.ts.map +1 -0
  340. package/dist/lib/swagger-transformer.js +36 -0
  341. package/dist/lib/swagger-transformer.js.map +1 -0
  342. package/dist/lib/swagger-ui/constants.d.ts +4 -0
  343. package/dist/lib/swagger-ui/constants.d.ts.map +1 -0
  344. package/dist/lib/swagger-ui/constants.js +130 -0
  345. package/dist/lib/swagger-ui/constants.js.map +1 -0
  346. package/dist/lib/swagger-ui/helpers.d.ts +6 -0
  347. package/dist/lib/swagger-ui/helpers.d.ts.map +1 -0
  348. package/dist/lib/swagger-ui/helpers.js +17 -0
  349. package/dist/lib/swagger-ui/helpers.js.map +1 -0
  350. package/dist/lib/swagger-ui/index.d.ts +2 -0
  351. package/dist/lib/swagger-ui/index.d.ts.map +1 -0
  352. package/dist/lib/swagger-ui/index.js +2 -0
  353. package/dist/lib/swagger-ui/index.js.map +1 -0
  354. package/dist/lib/swagger-ui/swagger-ui.d.ts +14 -0
  355. package/dist/lib/swagger-ui/swagger-ui.d.ts.map +1 -0
  356. package/dist/lib/swagger-ui/swagger-ui.js +64 -0
  357. package/dist/lib/swagger-ui/swagger-ui.js.map +1 -0
  358. package/dist/lib/type-helpers/index.d.ts +5 -0
  359. package/dist/lib/type-helpers/index.d.ts.map +1 -0
  360. package/dist/lib/type-helpers/index.js +5 -0
  361. package/dist/lib/type-helpers/index.js.map +1 -0
  362. package/dist/lib/type-helpers/intersection-type.helper.d.ts +9 -0
  363. package/dist/lib/type-helpers/intersection-type.helper.d.ts.map +1 -0
  364. package/dist/lib/type-helpers/intersection-type.helper.js +40 -0
  365. package/dist/lib/type-helpers/intersection-type.helper.js.map +1 -0
  366. package/dist/lib/type-helpers/mapped-types.utils.d.ts +3 -0
  367. package/dist/lib/type-helpers/mapped-types.utils.d.ts.map +1 -0
  368. package/dist/lib/type-helpers/mapped-types.utils.js +33 -0
  369. package/dist/lib/type-helpers/mapped-types.utils.js.map +1 -0
  370. package/dist/lib/type-helpers/omit-type.helper.d.ts +3 -0
  371. package/dist/lib/type-helpers/omit-type.helper.d.ts.map +1 -0
  372. package/dist/lib/type-helpers/omit-type.helper.js +38 -0
  373. package/dist/lib/type-helpers/omit-type.helper.js.map +1 -0
  374. package/dist/lib/type-helpers/partial-type.helper.d.ts +14 -0
  375. package/dist/lib/type-helpers/partial-type.helper.d.ts.map +1 -0
  376. package/dist/lib/type-helpers/partial-type.helper.js +52 -0
  377. package/dist/lib/type-helpers/partial-type.helper.js.map +1 -0
  378. package/dist/lib/type-helpers/pick-type.helper.d.ts +3 -0
  379. package/dist/lib/type-helpers/pick-type.helper.d.ts.map +1 -0
  380. package/dist/lib/type-helpers/pick-type.helper.js +38 -0
  381. package/dist/lib/type-helpers/pick-type.helper.js.map +1 -0
  382. package/dist/lib/types/swagger-enum.type.d.ts +2 -0
  383. package/dist/lib/types/swagger-enum.type.d.ts.map +1 -0
  384. package/dist/lib/types/swagger-enum.type.js +2 -0
  385. package/dist/lib/types/swagger-enum.type.js.map +1 -0
  386. package/dist/lib/utils/assign-two-levels-deep.d.ts +16 -0
  387. package/dist/lib/utils/assign-two-levels-deep.d.ts.map +1 -0
  388. package/dist/lib/utils/assign-two-levels-deep.js +24 -0
  389. package/dist/lib/utils/assign-two-levels-deep.js.map +1 -0
  390. package/dist/lib/utils/enum.utils.d.ts +10 -0
  391. package/dist/lib/utils/enum.utils.d.ts.map +1 -0
  392. package/dist/lib/utils/enum.utils.js +68 -0
  393. package/dist/lib/utils/enum.utils.js.map +1 -0
  394. package/dist/lib/utils/extend-metadata.util.d.ts +3 -0
  395. package/dist/lib/utils/extend-metadata.util.d.ts.map +1 -0
  396. package/dist/lib/utils/extend-metadata.util.js +9 -0
  397. package/dist/lib/utils/extend-metadata.util.js.map +1 -0
  398. package/dist/lib/utils/get-global-prefix.d.ts +3 -0
  399. package/dist/lib/utils/get-global-prefix.d.ts.map +1 -0
  400. package/dist/lib/utils/get-global-prefix.js +5 -0
  401. package/dist/lib/utils/get-global-prefix.js.map +1 -0
  402. package/dist/lib/utils/get-schema-path.util.d.ts +5 -0
  403. package/dist/lib/utils/get-schema-path.util.d.ts.map +1 -0
  404. package/dist/lib/utils/get-schema-path.util.js +22 -0
  405. package/dist/lib/utils/get-schema-path.util.js.map +1 -0
  406. package/dist/lib/utils/index.d.ts +2 -0
  407. package/dist/lib/utils/index.d.ts.map +1 -0
  408. package/dist/lib/utils/index.js +2 -0
  409. package/dist/lib/utils/index.js.map +1 -0
  410. package/dist/lib/utils/is-body-parameter.util.d.ts +3 -0
  411. package/dist/lib/utils/is-body-parameter.util.d.ts.map +1 -0
  412. package/dist/lib/utils/is-body-parameter.util.js +4 -0
  413. package/dist/lib/utils/is-body-parameter.util.js.map +1 -0
  414. package/dist/lib/utils/is-built-in-type.util.d.ts +3 -0
  415. package/dist/lib/utils/is-built-in-type.util.d.ts.map +1 -0
  416. package/dist/lib/utils/is-built-in-type.util.js +6 -0
  417. package/dist/lib/utils/is-built-in-type.util.js.map +1 -0
  418. package/dist/lib/utils/is-date-ctor.util.d.ts +3 -0
  419. package/dist/lib/utils/is-date-ctor.util.d.ts.map +1 -0
  420. package/dist/lib/utils/is-date-ctor.util.js +4 -0
  421. package/dist/lib/utils/is-date-ctor.util.js.map +1 -0
  422. package/dist/lib/utils/merge-and-uniq.util.d.ts +2 -0
  423. package/dist/lib/utils/merge-and-uniq.util.d.ts.map +1 -0
  424. package/dist/lib/utils/merge-and-uniq.util.js +5 -0
  425. package/dist/lib/utils/merge-and-uniq.util.js.map +1 -0
  426. package/dist/lib/utils/normalize-rel-path.d.ts +2 -0
  427. package/dist/lib/utils/normalize-rel-path.d.ts.map +1 -0
  428. package/dist/lib/utils/normalize-rel-path.js +6 -0
  429. package/dist/lib/utils/normalize-rel-path.js.map +1 -0
  430. package/dist/lib/utils/remove-undefined-keys.d.ts +6 -0
  431. package/dist/lib/utils/remove-undefined-keys.d.ts.map +1 -0
  432. package/dist/lib/utils/remove-undefined-keys.js +9 -0
  433. package/dist/lib/utils/remove-undefined-keys.js.map +1 -0
  434. package/dist/lib/utils/resolve-path.util.d.ts +2 -0
  435. package/dist/lib/utils/resolve-path.util.d.ts.map +1 -0
  436. package/dist/lib/utils/resolve-path.util.js +5 -0
  437. package/dist/lib/utils/resolve-path.util.js.map +1 -0
  438. package/dist/lib/utils/reverse-object-keys.util.d.ts +2 -0
  439. package/dist/lib/utils/reverse-object-keys.util.d.ts.map +1 -0
  440. package/dist/lib/utils/reverse-object-keys.util.js +9 -0
  441. package/dist/lib/utils/reverse-object-keys.util.js.map +1 -0
  442. package/dist/lib/utils/sort-object-lexicographically.d.ts +6 -0
  443. package/dist/lib/utils/sort-object-lexicographically.d.ts.map +1 -0
  444. package/dist/lib/utils/sort-object-lexicographically.js +9 -0
  445. package/dist/lib/utils/sort-object-lexicographically.js.map +1 -0
  446. package/dist/lib/utils/strip-last-slash.util.d.ts +2 -0
  447. package/dist/lib/utils/strip-last-slash.util.d.ts.map +1 -0
  448. package/dist/lib/utils/strip-last-slash.util.js +4 -0
  449. package/dist/lib/utils/strip-last-slash.util.js.map +1 -0
  450. package/dist/lib/utils/validate-global-prefix.util.d.ts +2 -0
  451. package/dist/lib/utils/validate-global-prefix.util.d.ts.map +1 -0
  452. package/dist/lib/utils/validate-global-prefix.util.js +4 -0
  453. package/dist/lib/utils/validate-global-prefix.util.js.map +1 -0
  454. package/dist/lib/utils/validate-path.util.d.ts +2 -0
  455. package/dist/lib/utils/validate-path.util.d.ts.map +1 -0
  456. package/dist/lib/utils/validate-path.util.js +4 -0
  457. package/dist/lib/utils/validate-path.util.js.map +1 -0
  458. package/package.json +40 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016-present Vona
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ export * from './lib/index.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './lib/index.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/common/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface Type<T = any> extends Function {
2
+ new (...args: any[]): T;
3
+ }
4
+ //# sourceMappingURL=type.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.interface.d.ts","sourceRoot":"","sources":["../../../src/lib/common/type.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,QAAQ;IAC7C,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=type.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.interface.js","sourceRoot":"","sources":["../../../src/lib/common/type.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ export declare const DECORATORS_PREFIX = "swagger";
2
+ export declare const DECORATORS: {
3
+ API_OPERATION: string;
4
+ API_RESPONSE: string;
5
+ API_PRODUCES: string;
6
+ API_CONSUMES: string;
7
+ API_TAGS: string;
8
+ API_CALLBACKS: string;
9
+ API_PARAMETERS: string;
10
+ API_HEADERS: string;
11
+ API_MODEL_PROPERTIES: string;
12
+ API_MODEL_PROPERTIES_ARRAY: string;
13
+ API_SECURITY: string;
14
+ API_EXCLUDE_ENDPOINT: string;
15
+ API_EXCLUDE_CONTROLLER: string;
16
+ API_EXTRA_MODELS: string;
17
+ API_EXTENSION: string;
18
+ API_SCHEMA: string;
19
+ API_DEFAULT_GETTER: string;
20
+ API_LINK: string;
21
+ };
22
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;CAmBtB,CAAC"}
@@ -0,0 +1,22 @@
1
+ export const DECORATORS_PREFIX = 'swagger';
2
+ export const DECORATORS = {
3
+ API_OPERATION: `${DECORATORS_PREFIX}/apiOperation`,
4
+ API_RESPONSE: `${DECORATORS_PREFIX}/apiResponse`,
5
+ API_PRODUCES: `${DECORATORS_PREFIX}/apiProduces`,
6
+ API_CONSUMES: `${DECORATORS_PREFIX}/apiConsumes`,
7
+ API_TAGS: `${DECORATORS_PREFIX}/apiUseTags`,
8
+ API_CALLBACKS: `${DECORATORS_PREFIX}/apiCallbacks`,
9
+ API_PARAMETERS: `${DECORATORS_PREFIX}/apiParameters`,
10
+ API_HEADERS: `${DECORATORS_PREFIX}/apiHeaders`,
11
+ API_MODEL_PROPERTIES: `${DECORATORS_PREFIX}/apiModelProperties`,
12
+ API_MODEL_PROPERTIES_ARRAY: `${DECORATORS_PREFIX}/apiModelPropertiesArray`,
13
+ API_SECURITY: `${DECORATORS_PREFIX}/apiSecurity`,
14
+ API_EXCLUDE_ENDPOINT: `${DECORATORS_PREFIX}/apiExcludeEndpoint`,
15
+ API_EXCLUDE_CONTROLLER: `${DECORATORS_PREFIX}/apiExcludeController`,
16
+ API_EXTRA_MODELS: `${DECORATORS_PREFIX}/apiExtraModels`,
17
+ API_EXTENSION: `${DECORATORS_PREFIX}/apiExtension`,
18
+ API_SCHEMA: `${DECORATORS_PREFIX}/apiSchema`,
19
+ API_DEFAULT_GETTER: `${DECORATORS_PREFIX}/apiDefaultGetter`,
20
+ API_LINK: `${DECORATORS_PREFIX}/apiLink`,
21
+ };
22
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAC;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,aAAa,EAAE,GAAG,iBAAiB,eAAe;IAClD,YAAY,EAAE,GAAG,iBAAiB,cAAc;IAChD,YAAY,EAAE,GAAG,iBAAiB,cAAc;IAChD,YAAY,EAAE,GAAG,iBAAiB,cAAc;IAChD,QAAQ,EAAE,GAAG,iBAAiB,aAAa;IAC3C,aAAa,EAAE,GAAG,iBAAiB,eAAe;IAClD,cAAc,EAAE,GAAG,iBAAiB,gBAAgB;IACpD,WAAW,EAAE,GAAG,iBAAiB,aAAa;IAC9C,oBAAoB,EAAE,GAAG,iBAAiB,qBAAqB;IAC/D,0BAA0B,EAAE,GAAG,iBAAiB,0BAA0B;IAC1E,YAAY,EAAE,GAAG,iBAAiB,cAAc;IAChD,oBAAoB,EAAE,GAAG,iBAAiB,qBAAqB;IAC/D,sBAAsB,EAAE,GAAG,iBAAiB,uBAAuB;IACnE,gBAAgB,EAAE,GAAG,iBAAiB,iBAAiB;IACvD,aAAa,EAAE,GAAG,iBAAiB,eAAe;IAClD,UAAU,EAAE,GAAG,iBAAiB,YAAY;IAC5C,kBAAkB,EAAE,GAAG,iBAAiB,mBAAmB;IAC3D,QAAQ,EAAE,GAAG,iBAAiB,UAAU;CACzC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function ApiBasicAuth(name?: string): ClassDecorator & MethodDecorator;
2
+ //# sourceMappingURL=api-basic.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-basic.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-basic.decorator.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,IAAI,SAAU,oCAE1C"}
@@ -0,0 +1,5 @@
1
+ import { ApiSecurity } from './api-security.decorator.js';
2
+ export function ApiBasicAuth(name = 'basic') {
3
+ return ApiSecurity(name);
4
+ }
5
+ //# sourceMappingURL=api-basic.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-basic.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-basic.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,UAAU,YAAY,CAAC,IAAI,GAAG,OAAO;IACzC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function ApiBearerAuth(name?: string): ClassDecorator & MethodDecorator;
2
+ //# sourceMappingURL=api-bearer.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-bearer.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-bearer.decorator.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,IAAI,SAAW,oCAE5C"}
@@ -0,0 +1,5 @@
1
+ import { ApiSecurity } from './api-security.decorator.js';
2
+ export function ApiBearerAuth(name = 'bearer') {
3
+ return ApiSecurity(name);
4
+ }
5
+ //# sourceMappingURL=api-bearer.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-bearer.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-bearer.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,UAAU,aAAa,CAAC,IAAI,GAAG,QAAQ;IAC3C,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Type } from 'vona';
2
+ import { ExamplesObject, ReferenceObject, RequestBodyObject, SchemaObject } from '../interfaces/open-api-spec.interface.js';
3
+ import { SwaggerEnumType } from '../types/swagger-enum.type.js';
4
+ type RequestBodyOptions = Omit<RequestBodyObject, 'content'>;
5
+ interface ApiBodyMetadata extends RequestBodyOptions {
6
+ type?: Type<unknown> | Function | [Function] | string;
7
+ isArray?: boolean;
8
+ enum?: SwaggerEnumType;
9
+ }
10
+ interface ApiBodySchemaHost extends RequestBodyOptions {
11
+ schema: SchemaObject | ReferenceObject;
12
+ examples?: ExamplesObject;
13
+ }
14
+ export type ApiBodyOptions = ApiBodyMetadata | ApiBodySchemaHost;
15
+ export declare function ApiBody(options: ApiBodyOptions): MethodDecorator;
16
+ export {};
17
+ //# sourceMappingURL=api-body.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-body.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-body.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,YAAY,EACb,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAIhE,KAAK,kBAAkB,GAAG,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;AAE7D,UAAU,eAAgB,SAAQ,kBAAkB;IAClD,IAAI,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,GAAG,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,UAAU,iBAAkB,SAAQ,kBAAkB;IACpD,MAAM,EAAE,YAAY,GAAG,eAAe,CAAC;IACvC,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAOjE,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,eAAe,CAehE"}
@@ -0,0 +1,24 @@
1
+ import { omit } from 'lodash';
2
+ import { addEnumArraySchema, addEnumSchema, isEnumArray, isEnumDefined } from '../utils/enum.utils.js';
3
+ import { createParamDecorator, getTypeIsArrayTuple } from './helpers.js';
4
+ const defaultBodyMetadata = {
5
+ type: String,
6
+ required: true,
7
+ };
8
+ export function ApiBody(options) {
9
+ const [type, isArray] = getTypeIsArrayTuple(options.type, options.isArray);
10
+ const param = {
11
+ in: 'body',
12
+ ...omit(options, 'enum'),
13
+ type,
14
+ isArray,
15
+ };
16
+ if (isEnumArray(options)) {
17
+ addEnumArraySchema(param, options);
18
+ }
19
+ else if (isEnumDefined(options)) {
20
+ addEnumSchema(param, options);
21
+ }
22
+ return createParamDecorator(param, defaultBodyMetadata);
23
+ }
24
+ //# sourceMappingURL=api-body.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-body.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-body.decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAQ9B,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvG,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAiBzE,MAAM,mBAAmB,GAAoB;IAC3C,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,UAAU,OAAO,CAAC,OAAuB;IAC7C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,mBAAmB,CAAE,OAA2B,CAAC,IAAI,EAAG,OAA2B,CAAC,OAAO,CAAC,CAAC;IACrH,MAAM,KAAK,GAA0C;QACnD,EAAE,EAAE,MAAM;QACV,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;QACxB,IAAI;QACJ,OAAO;KACR,CAAC;IAEF,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;SAAM,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { CallBackObject } from '../interfaces/callback-object.interface.js';
2
+ export declare function ApiCallbacks(...callbackObject: Array<CallBackObject<any>>): MethodDecorator & ClassDecorator;
3
+ //# sourceMappingURL=api-callbacks.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-callbacks.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-callbacks.decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5E,wBAAgB,YAAY,CAAC,GAAG,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,oCAEzE"}
@@ -0,0 +1,6 @@
1
+ import { DECORATORS } from '../constants.js';
2
+ import { createMixedDecorator } from './helpers.js';
3
+ export function ApiCallbacks(...callbackObject) {
4
+ return createMixedDecorator(DECORATORS.API_CALLBACKS, callbackObject);
5
+ }
6
+ //# sourceMappingURL=api-callbacks.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-callbacks.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-callbacks.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,UAAU,YAAY,CAAC,GAAG,cAA0C;IACxE,OAAO,oBAAoB,CAAC,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AACxE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function ApiConsumes(...mimeTypes: string[]): MethodDecorator & ClassDecorator;
2
+ //# sourceMappingURL=api-consumes.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-consumes.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-consumes.decorator.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,GAAG,SAAS,EAAE,MAAM,EAAE,oCAEjD"}
@@ -0,0 +1,6 @@
1
+ import { DECORATORS } from '../constants.js';
2
+ import { createMixedDecorator } from './helpers.js';
3
+ export function ApiConsumes(...mimeTypes) {
4
+ return createMixedDecorator(DECORATORS.API_CONSUMES, mimeTypes);
5
+ }
6
+ //# sourceMappingURL=api-consumes.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-consumes.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-consumes.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,UAAU,WAAW,CAAC,GAAG,SAAmB;IAChD,OAAO,oBAAoB,CAAC,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function ApiCookieAuth(name?: string): ClassDecorator & MethodDecorator;
2
+ //# sourceMappingURL=api-cookie.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-cookie.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-cookie.decorator.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,IAAI,SAAW,oCAE5C"}
@@ -0,0 +1,5 @@
1
+ import { ApiSecurity } from './api-security.decorator.js';
2
+ export function ApiCookieAuth(name = 'cookie') {
3
+ return ApiSecurity(name);
4
+ }
5
+ //# sourceMappingURL=api-cookie.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-cookie.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-cookie.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,UAAU,aAAa,CAAC,IAAI,GAAG,QAAQ;IAC3C,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { Type } from 'vona';
2
+ /**
3
+ * Set the default getter for the given type to the decorated method
4
+ *
5
+ * This is to be used in conjunction with `ApiProperty({link: () => Type})` to generate link objects
6
+ * in the swagger schema
7
+ *
8
+ * ```typescript
9
+ * @Controller('users')
10
+ * class UserController {
11
+ * @Get(':userId')
12
+ * @ApiDefaultGetter(UserGet, 'userId')
13
+ * getUser(@Param('userId') userId: string) {
14
+ * // ...
15
+ * }
16
+ * }
17
+ * ```
18
+ *
19
+ * @param type The type for which the decorated function is the default getter
20
+ * @param parameter Name of the parameter in the route of the getter which corresponds to the id of the type
21
+ *
22
+ * @see [Swagger link objects](https://swagger.io/docs/specification/links/)
23
+ */
24
+ export declare function ApiDefaultGetter(type: Type<unknown> | Function, parameter: string): MethodDecorator;
25
+ //# sourceMappingURL=api-default-getter.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-default-getter.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-default-getter.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,eAAe,CAYnG"}
@@ -0,0 +1,32 @@
1
+ import { DECORATORS } from '../constants.js';
2
+ /**
3
+ * Set the default getter for the given type to the decorated method
4
+ *
5
+ * This is to be used in conjunction with `ApiProperty({link: () => Type})` to generate link objects
6
+ * in the swagger schema
7
+ *
8
+ * ```typescript
9
+ * @Controller('users')
10
+ * class UserController {
11
+ * @Get(':userId')
12
+ * @ApiDefaultGetter(UserGet, 'userId')
13
+ * getUser(@Param('userId') userId: string) {
14
+ * // ...
15
+ * }
16
+ * }
17
+ * ```
18
+ *
19
+ * @param type The type for which the decorated function is the default getter
20
+ * @param parameter Name of the parameter in the route of the getter which corresponds to the id of the type
21
+ *
22
+ * @see [Swagger link objects](https://swagger.io/docs/specification/links/)
23
+ */
24
+ export function ApiDefaultGetter(type, parameter) {
25
+ return (prototype, _key, descriptor) => {
26
+ if (type.prototype) {
27
+ Reflect.defineMetadata(DECORATORS.API_DEFAULT_GETTER, { getter: descriptor.value, parameter, prototype }, type.prototype);
28
+ }
29
+ return descriptor;
30
+ };
31
+ }
32
+ //# sourceMappingURL=api-default-getter.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-default-getter.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-default-getter.decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAA8B,EAAE,SAAiB;IAChF,OAAO,CAAC,SAAiB,EAAE,IAAqB,EAAE,UAA8B,EAAE,EAAE;QAClF,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,OAAO,CAAC,cAAc,CACpB,UAAU,CAAC,kBAAkB,EAC7B,EAAE,MAAM,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,EAClD,IAAI,CAAC,SAAS,CACf,CAAC;QACJ,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function ApiExcludeController(disable?: boolean): ClassDecorator;
2
+ //# sourceMappingURL=api-exclude-controller.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-exclude-controller.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-exclude-controller.decorator.ts"],"names":[],"mappings":"AAGA,wBAAgB,oBAAoB,CAAC,OAAO,UAAO,GAAG,cAAc,CAEnE"}
@@ -0,0 +1,6 @@
1
+ import { DECORATORS } from '../constants.js';
2
+ import { createClassDecorator } from './helpers.js';
3
+ export function ApiExcludeController(disable = true) {
4
+ return createClassDecorator(DECORATORS.API_EXCLUDE_CONTROLLER, [disable]);
5
+ }
6
+ //# sourceMappingURL=api-exclude-controller.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-exclude-controller.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-exclude-controller.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,UAAU,oBAAoB,CAAC,OAAO,GAAG,IAAI;IACjD,OAAO,oBAAoB,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAC5E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function ApiExcludeEndpoint(disable?: boolean): MethodDecorator;
2
+ //# sourceMappingURL=api-exclude-endpoint.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-exclude-endpoint.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-exclude-endpoint.decorator.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAC,OAAO,UAAO,GAAG,eAAe,CAIlE"}
@@ -0,0 +1,8 @@
1
+ import { DECORATORS } from '../constants.js';
2
+ import { createMethodDecorator } from './helpers.js';
3
+ export function ApiExcludeEndpoint(disable = true) {
4
+ return createMethodDecorator(DECORATORS.API_EXCLUDE_ENDPOINT, {
5
+ disable,
6
+ });
7
+ }
8
+ //# sourceMappingURL=api-exclude-endpoint.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-exclude-endpoint.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-exclude-endpoint.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,UAAU,kBAAkB,CAAC,OAAO,GAAG,IAAI;IAC/C,OAAO,qBAAqB,CAAC,UAAU,CAAC,oBAAoB,EAAE;QAC5D,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function ApiExtension(extensionKey: string, extensionProperties: any): MethodDecorator & ClassDecorator;
2
+ //# sourceMappingURL=api-extension.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-extension.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-extension.decorator.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,mBAAmB,EAAE,GAAG,oCAU1E"}
@@ -0,0 +1,13 @@
1
+ import { DECORATORS } from '../constants.js';
2
+ import { createMixedDecorator } from './helpers.js';
3
+ import { clone } from 'lodash';
4
+ export function ApiExtension(extensionKey, extensionProperties) {
5
+ if (!extensionKey.startsWith('x-')) {
6
+ throw new Error('Extension key is not prefixed. Please ensure you prefix it with `x-`.');
7
+ }
8
+ const extensionObject = {
9
+ [extensionKey]: clone(extensionProperties),
10
+ };
11
+ return createMixedDecorator(DECORATORS.API_EXTENSION, extensionObject);
12
+ }
13
+ //# sourceMappingURL=api-extension.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-extension.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-extension.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,MAAM,UAAU,YAAY,CAAC,YAAoB,EAAE,mBAAwB;IACzE,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;IAED,MAAM,eAAe,GAAG;QACtB,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC;KAC3C,CAAC;IAEF,OAAO,oBAAoB,CAAC,UAAU,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;AACzE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function ApiExtraModels(...models: Function[]): (target: object, _key?: string | symbol, descriptor?: TypedPropertyDescriptor<any>) => any;
2
+ //# sourceMappingURL=api-extra-models.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-extra-models.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-extra-models.decorator.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,GAAG,MAAM,EAAE,QAAQ,EAAE,YAClC,MAAM,SAAS,MAAM,GAAG,MAAM,eAAe,wBAAwB,GAAG,CAAC,KAAG,GAAG,CAWhG"}
@@ -0,0 +1,14 @@
1
+ import { DECORATORS } from '../constants.js';
2
+ export function ApiExtraModels(...models) {
3
+ return (target, _key, descriptor) => {
4
+ if (descriptor) {
5
+ const extraModels = Reflect.getMetadata(DECORATORS.API_EXTRA_MODELS, descriptor.value) || [];
6
+ Reflect.defineMetadata(DECORATORS.API_EXTRA_MODELS, [...extraModels, ...models], descriptor.value);
7
+ return descriptor;
8
+ }
9
+ const extraModels = Reflect.getMetadata(DECORATORS.API_EXTRA_MODELS, target) || [];
10
+ Reflect.defineMetadata(DECORATORS.API_EXTRA_MODELS, [...extraModels, ...models], target);
11
+ return target;
12
+ };
13
+ }
14
+ //# sourceMappingURL=api-extra-models.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-extra-models.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-extra-models.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,UAAU,cAAc,CAAC,GAAG,MAAkB;IAClD,OAAO,CAAC,MAAc,EAAE,IAAsB,EAAE,UAAyC,EAAO,EAAE;QAChG,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,gBAAgB,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAC7F,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,GAAG,WAAW,EAAE,GAAG,MAAM,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;YACnG,OAAO,UAAU,CAAC;QACpB,CAAC;QAED,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QACnF,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,GAAG,WAAW,EAAE,GAAG,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;QACzF,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ParameterObject } from '../interfaces/open-api-spec.interface.js';
2
+ import { SwaggerEnumType } from '../types/swagger-enum.type.js';
3
+ export interface ApiHeaderOptions extends Omit<ParameterObject, 'in'> {
4
+ enum?: SwaggerEnumType;
5
+ }
6
+ export declare function ApiHeader(options: ApiHeaderOptions): MethodDecorator & ClassDecorator;
7
+ export declare const ApiHeaders: (headers: ApiHeaderOptions[]) => MethodDecorator & ClassDecorator;
8
+ //# sourceMappingURL=api-header.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-header.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-header.decorator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAIhE,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC;IACnE,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAMD,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,GAAG,cAAc,CA+BrF;AAED,eAAO,MAAM,UAAU,YAAa,gBAAgB,EAAE,KAAG,eAAe,GAAG,cAI1E,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { isNil, isUndefined, negate, pickBy } from 'lodash';
2
+ import { DECORATORS } from '../constants.js';
3
+ import { getEnumType, getEnumValues } from '../utils/enum.utils.js';
4
+ import { createClassDecorator, createParamDecorator } from './helpers.js';
5
+ const defaultHeaderOptions = {
6
+ name: '',
7
+ };
8
+ export function ApiHeader(options) {
9
+ const param = pickBy({
10
+ name: isNil(options.name) ? defaultHeaderOptions.name : options.name,
11
+ in: 'header',
12
+ description: options.description,
13
+ required: options.required,
14
+ examples: options.examples,
15
+ schema: {
16
+ type: 'string',
17
+ ...(options.schema || {}),
18
+ },
19
+ }, negate(isUndefined));
20
+ if (options.enum) {
21
+ const enumValues = getEnumValues(options.enum);
22
+ param.schema = {
23
+ ...param.schema,
24
+ enum: enumValues,
25
+ type: getEnumType(enumValues),
26
+ };
27
+ }
28
+ return (target, key, descriptor) => {
29
+ if (descriptor) {
30
+ return createParamDecorator(param, defaultHeaderOptions)(target, key, descriptor);
31
+ }
32
+ return createClassDecorator(DECORATORS.API_HEADERS, [param])(target);
33
+ };
34
+ }
35
+ export const ApiHeaders = (headers) => {
36
+ return (target, key, descriptor) => {
37
+ headers.forEach(options => ApiHeader(options)(target, key, descriptor));
38
+ };
39
+ };
40
+ //# sourceMappingURL=api-header.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-header.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-header.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAM1E,MAAM,oBAAoB,GAA8B;IACtD,IAAI,EAAE,EAAE;CACT,CAAC;AAEF,MAAM,UAAU,SAAS,CAAC,OAAyB;IACjD,MAAM,KAAK,GAAG,MAAM,CAClB;QACE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI;QACpE,EAAE,EAAE,QAAQ;QACZ,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;SAC1B;KACF,EACD,MAAM,CAAC,WAAW,CAAC,CACpB,CAAC;IAEF,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/C,KAAK,CAAC,MAAM,GAAG;YACb,GAAG,KAAK,CAAC,MAAM;YACf,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC;SAC9B,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,MAAyB,EAAE,GAAqB,EAAE,UAAyC,EAAO,EAAE;QAC1G,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAC,MAAM,EAAE,GAAI,EAAE,UAAU,CAAC,CAAC;QACrF,CAAC;QACD,OAAO,oBAAoB,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,MAAkB,CAAC,CAAC;IACnF,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAA2B,EAAoC,EAAE;IAC1F,OAAO,CAAC,MAAyB,EAAE,GAAqB,EAAE,UAAyC,EAAO,EAAE;QAC1G,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,GAAI,EAAE,UAAW,CAAC,CAAC,CAAC;IAC5E,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function ApiHideProperty(): PropertyDecorator;
2
+ //# sourceMappingURL=api-hide-property.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-hide-property.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-hide-property.decorator.ts"],"names":[],"mappings":"AACA,wBAAgB,eAAe,IAAI,iBAAiB,CAEnD"}
@@ -0,0 +1,5 @@
1
+ /* eslint-disable @typescript-eslint/no-empty-function */
2
+ export function ApiHideProperty() {
3
+ return (_target, _propertyKey) => { };
4
+ }
5
+ //# sourceMappingURL=api-hide-property.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-hide-property.decorator.js","sourceRoot":"","sources":["../../../src/lib/decorators/api-hide-property.decorator.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,OAA4B,EAAE,YAA6B,EAAE,EAAE,GAAE,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { Type } from 'vona';
2
+ export interface ApiLinkOptions {
3
+ from: Type<unknown> | Function;
4
+ /**
5
+ * Field in the type `from` which is used as a parameter in the decorated route
6
+ *
7
+ * @default 'id'
8
+ */
9
+ fromField?: string;
10
+ /**
11
+ * Name of the parameter in the decorated route
12
+ */
13
+ routeParam: string;
14
+ }
15
+ /**
16
+ * Defines this route as a link between two types
17
+ *
18
+ * Typically used when the link between the types is not present in the `from` type,
19
+ * eg with the following
20
+ *
21
+ * ```typescript
22
+ * class User {
23
+ * @ApiProperty()
24
+ * id: string
25
+ *
26
+ * // no field documentIds: string[]
27
+ * }
28
+ *
29
+ * class Document {
30
+ * @ApiProperty()
31
+ * id: string
32
+ * }
33
+ *
34
+ * @Controller()
35
+ * class UserController {
36
+ * @Get(':userId/documents')
37
+ * @ApiLink({from: User, fromField: 'id', routeParam: 'userId'})
38
+ * getDocuments(@Param('userId') userId: string)): Promise<Documents[]>
39
+ * }
40
+ * ```
41
+ *
42
+ * @param type The type for which the decorated function is the default getter
43
+ * @param parameter Name of the parameter in the route of the getter which corresponds to the id of the type
44
+ *
45
+ * @see [Swagger link objects](https://swagger.io/docs/specification/links/)
46
+ */
47
+ export declare function ApiLink({ from, fromField, routeParam }: ApiLinkOptions): MethodDecorator;
48
+ //# sourceMappingURL=api-link.decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-link.decorator.d.ts","sourceRoot":"","sources":["../../../src/lib/decorators/api-link.decorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAG5B,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,SAAgB,EAAE,UAAU,EAAE,EAAE,cAAc,GAAG,eAAe,CAkB/F"}