@elsikora/nestjs-crud-automator 1.1.2 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/dist/class/api/base-service.class.d.ts +9 -10
  2. package/dist/class/api/base-service.class.js +19 -10
  3. package/dist/class/api/base-service.class.js.map +1 -1
  4. package/dist/class/index.d.ts +1 -0
  5. package/dist/class/index.js +1 -0
  6. package/dist/class/index.js.map +1 -1
  7. package/dist/class/metadata-storage.class.d.ts +8 -0
  8. package/dist/class/metadata-storage.class.js +45 -0
  9. package/dist/class/metadata-storage.class.js.map +1 -0
  10. package/dist/constant/decorator/api/controller.constant.d.ts +3 -0
  11. package/dist/constant/decorator/api/controller.constant.js +8 -0
  12. package/dist/constant/decorator/api/controller.constant.js.map +1 -0
  13. package/dist/constant/decorator/api/function.constant.d.ts +1 -1
  14. package/dist/constant/decorator/api/function.constant.js +2 -2
  15. package/dist/constant/decorator/api/function.constant.js.map +1 -1
  16. package/dist/constant/decorator/api/index.d.ts +2 -0
  17. package/dist/constant/decorator/api/index.js +2 -0
  18. package/dist/constant/decorator/api/index.js.map +1 -1
  19. package/dist/constant/decorator/api/property-describe.constant.d.ts +3 -0
  20. package/dist/constant/decorator/api/property-describe.constant.js +8 -0
  21. package/dist/constant/decorator/api/property-describe.constant.js.map +1 -0
  22. package/dist/constant/factory/dto/get-list-query.constant.d.ts +6 -0
  23. package/dist/constant/factory/dto/get-list-query.constant.js +14 -0
  24. package/dist/constant/factory/dto/get-list-query.constant.js.map +1 -0
  25. package/dist/constant/factory/dto/index.d.ts +1 -0
  26. package/dist/constant/factory/dto/index.js +18 -0
  27. package/dist/constant/factory/dto/index.js.map +1 -0
  28. package/dist/constant/factory/index.d.ts +1 -0
  29. package/dist/constant/factory/index.js +18 -0
  30. package/dist/constant/factory/index.js.map +1 -0
  31. package/dist/constant/index.d.ts +1 -0
  32. package/dist/constant/index.js +1 -0
  33. package/dist/constant/index.js.map +1 -1
  34. package/dist/constant/interface/api/filter.constant.d.ts +2 -2
  35. package/dist/constant/interface/api/filter.constant.js +3 -7
  36. package/dist/constant/interface/api/filter.constant.js.map +1 -1
  37. package/dist/constant/interface/api/index.d.ts +1 -0
  38. package/dist/constant/interface/api/index.js +1 -0
  39. package/dist/constant/interface/api/index.js.map +1 -1
  40. package/dist/constant/interface/api/property/string.constant.d.ts +1 -1
  41. package/dist/constant/interface/api/property/string.constant.js +2 -2
  42. package/dist/constant/interface/api/property/string.constant.js.map +1 -1
  43. package/dist/constant/interface/api/property/wallet.constant.d.ts +1 -1
  44. package/dist/constant/interface/api/property/wallet.constant.js +2 -2
  45. package/dist/constant/interface/api/property/wallet.constant.js.map +1 -1
  46. package/dist/decorator/api/controller.decorator.d.ts +7 -9
  47. package/dist/decorator/api/controller.decorator.js +13 -26
  48. package/dist/decorator/api/controller.decorator.js.map +1 -1
  49. package/dist/decorator/api/function/create/executor-properties.type.d.ts +8 -0
  50. package/dist/decorator/api/function/create/executor-properties.type.js +3 -0
  51. package/dist/decorator/api/function/create/executor-properties.type.js.map +1 -0
  52. package/dist/decorator/api/function/create/index.d.ts +1 -0
  53. package/dist/decorator/api/function/create/index.js +18 -0
  54. package/dist/decorator/api/function/create/index.js.map +1 -0
  55. package/dist/decorator/api/function/create.decorator.d.ts +2 -4
  56. package/dist/decorator/api/function/create.decorator.js +17 -16
  57. package/dist/decorator/api/function/create.decorator.js.map +1 -1
  58. package/dist/decorator/api/function/decorator.d.ts +5 -4
  59. package/dist/decorator/api/function/decorator.js +21 -18
  60. package/dist/decorator/api/function/decorator.js.map +1 -1
  61. package/dist/decorator/api/function/delete.decorator.d.ts +3 -3
  62. package/dist/decorator/api/function/delete.decorator.js +7 -5
  63. package/dist/decorator/api/function/delete.decorator.js.map +1 -1
  64. package/dist/decorator/api/function/get-list.decorator.d.ts +3 -3
  65. package/dist/decorator/api/function/get-list.decorator.js +9 -9
  66. package/dist/decorator/api/function/get-list.decorator.js.map +1 -1
  67. package/dist/decorator/api/function/get.decorator.d.ts +3 -3
  68. package/dist/decorator/api/function/get.decorator.js +6 -7
  69. package/dist/decorator/api/function/get.decorator.js.map +1 -1
  70. package/dist/decorator/api/function/index.d.ts +1 -0
  71. package/dist/decorator/api/function/index.js +1 -0
  72. package/dist/decorator/api/function/index.js.map +1 -1
  73. package/dist/decorator/api/function/update.decorator.d.ts +3 -3
  74. package/dist/decorator/api/function/update.decorator.js +11 -15
  75. package/dist/decorator/api/function/update.decorator.js.map +1 -1
  76. package/dist/decorator/api/method.decorator.js.map +1 -1
  77. package/dist/decorator/api/property/boolean.decorator.js.map +1 -1
  78. package/dist/decorator/api/property/date.decorator.js +1 -1
  79. package/dist/decorator/api/property/date.decorator.js.map +1 -1
  80. package/dist/decorator/api/property/describe.decorator.d.ts +2 -0
  81. package/dist/decorator/api/property/describe.decorator.js +12 -0
  82. package/dist/decorator/api/property/describe.decorator.js.map +1 -0
  83. package/dist/decorator/api/property/index.d.ts +1 -0
  84. package/dist/decorator/api/property/index.js +1 -0
  85. package/dist/decorator/api/property/index.js.map +1 -1
  86. package/dist/decorator/api/property/number.decorator.js +1 -1
  87. package/dist/decorator/api/property/number.decorator.js.map +1 -1
  88. package/dist/decorator/api/property/object.decorator.js.map +1 -1
  89. package/dist/decorator/api/property/string.decorator.js +4 -4
  90. package/dist/decorator/api/property/string.decorator.js.map +1 -1
  91. package/dist/decorator/api/property/uuid.decorator.js.map +1 -1
  92. package/dist/decorator/api/property/wallet.decorator.js +3 -3
  93. package/dist/decorator/api/property/wallet.decorator.js.map +1 -1
  94. package/dist/decorator/api/route/decorator.d.ts +5 -5
  95. package/dist/decorator/api/route/decorator.js +3 -4
  96. package/dist/decorator/api/route/decorator.js.map +1 -1
  97. package/dist/decorator/api/route/get.decorator.d.ts +5 -5
  98. package/dist/decorator/api/route/get.decorator.js +9 -8
  99. package/dist/decorator/api/route/get.decorator.js.map +1 -1
  100. package/dist/decorator/api/service.decorator.d.ts +5 -7
  101. package/dist/decorator/api/service.decorator.js +31 -56
  102. package/dist/decorator/api/service.decorator.js.map +1 -1
  103. package/dist/dto/exception/bad-request.dto.js +1 -1
  104. package/dist/dto/exception/bad-request.dto.js.map +1 -1
  105. package/dist/dto/exception/conflict.dto.js +1 -1
  106. package/dist/dto/exception/conflict.dto.js.map +1 -1
  107. package/dist/dto/exception/forbidden.dto.js +1 -1
  108. package/dist/dto/exception/forbidden.dto.js.map +1 -1
  109. package/dist/dto/exception/internal-server-error.dto.js +1 -1
  110. package/dist/dto/exception/internal-server-error.dto.js.map +1 -1
  111. package/dist/dto/exception/not-found.dto.js +1 -1
  112. package/dist/dto/exception/not-found.dto.js.map +1 -1
  113. package/dist/dto/exception/too-many-requests.dto.js +1 -1
  114. package/dist/dto/exception/too-many-requests.dto.js.map +1 -1
  115. package/dist/dto/exception/unauthorized.dto.js +1 -1
  116. package/dist/dto/exception/unauthorized.dto.js.map +1 -1
  117. package/dist/enum/decorator/api/dto-type.enum.d.ts +6 -0
  118. package/dist/enum/decorator/api/dto-type.enum.js +11 -0
  119. package/dist/enum/decorator/api/dto-type.enum.js.map +1 -0
  120. package/dist/enum/decorator/api/function/type.enum.d.ts +5 -5
  121. package/dist/enum/decorator/api/function/type.enum.js +4 -4
  122. package/dist/enum/decorator/api/function/type.enum.js.map +1 -1
  123. package/dist/enum/decorator/api/index.d.ts +2 -0
  124. package/dist/enum/decorator/api/index.js +2 -0
  125. package/dist/enum/decorator/api/index.js.map +1 -1
  126. package/dist/enum/decorator/api/property/desribe-type.enum.d.ts +8 -0
  127. package/dist/enum/decorator/api/property/desribe-type.enum.js +13 -0
  128. package/dist/enum/decorator/api/property/desribe-type.enum.js.map +1 -0
  129. package/dist/enum/decorator/api/property/index.d.ts +1 -0
  130. package/dist/enum/decorator/api/property/index.js +1 -0
  131. package/dist/enum/decorator/api/property/index.js.map +1 -1
  132. package/dist/enum/decorator/api/{controller/type.enum.d.ts → route-type.enum.d.ts} +4 -6
  133. package/dist/enum/decorator/api/{controller/type.enum.js → route-type.enum.js} +5 -7
  134. package/dist/enum/decorator/api/route-type.enum.js.map +1 -0
  135. package/dist/factory/api/controller.factory.d.ts +28 -1
  136. package/dist/factory/api/controller.factory.js +200 -0
  137. package/dist/factory/api/controller.factory.js.map +1 -1
  138. package/dist/helper/index.d.ts +1 -1
  139. package/dist/helper/index.js +0 -15
  140. package/dist/helper/index.js.map +1 -1
  141. package/dist/interceptor/correlation-id-response-body.interceptor.js.map +1 -1
  142. package/dist/interface/api-base-entity.interface.d.ts +2 -1
  143. package/dist/interface/api-base-entity.interface.js.map +1 -1
  144. package/dist/interface/decorator/api/base-controller.interface.d.ts +2 -5
  145. package/dist/interface/decorator/api/base-controller.interface.js.map +1 -1
  146. package/dist/interface/decorator/api/controller-properties.interface.d.ts +16 -20
  147. package/dist/interface/decorator/api/controller-properties.interface.js +0 -1
  148. package/dist/interface/decorator/api/controller-properties.interface.js.map +1 -1
  149. package/dist/interface/decorator/api/function/create-properties.interface.d.ts +4 -0
  150. package/dist/interface/decorator/api/function/create-properties.interface.js +3 -0
  151. package/dist/interface/decorator/api/function/create-properties.interface.js.map +1 -0
  152. package/dist/interface/decorator/api/method/properties.interface.d.ts +3 -3
  153. package/dist/interface/decorator/api/method/properties.interface.js.map +1 -1
  154. package/dist/interface/decorator/api/property/base-properties.interface.d.ts +1 -1
  155. package/dist/interface/decorator/api/property/base-properties.interface.js.map +1 -1
  156. package/dist/interface/decorator/api/property/date-properties.interface.d.ts +1 -1
  157. package/dist/interface/decorator/api/property/date-properties.interface.js.map +1 -1
  158. package/dist/interface/decorator/api/property/object-properties.interface.d.ts +1 -1
  159. package/dist/interface/decorator/api/property/object-properties.interface.js.map +1 -1
  160. package/dist/interface/decorator/api/property/string-properties.interface.d.ts +1 -1
  161. package/dist/interface/decorator/api/property/string-properties.interface.js.map +1 -1
  162. package/dist/interface/entity/column.interface.d.ts +7 -0
  163. package/dist/interface/entity/column.interface.js +3 -0
  164. package/dist/interface/entity/column.interface.js.map +1 -0
  165. package/dist/interface/entity/index.d.ts +2 -0
  166. package/dist/interface/entity/index.js +19 -0
  167. package/dist/interface/entity/index.js.map +1 -0
  168. package/dist/interface/entity/interface.d.ts +7 -0
  169. package/dist/interface/entity/interface.js +3 -0
  170. package/dist/interface/entity/interface.js.map +1 -0
  171. package/dist/interface/index.d.ts +1 -0
  172. package/dist/interface/index.js +1 -0
  173. package/dist/interface/index.js.map +1 -1
  174. package/dist/interface/utility/get-entity-columns-properties.interface.d.ts +5 -0
  175. package/dist/interface/utility/get-entity-columns-properties.interface.js +3 -0
  176. package/dist/interface/utility/get-entity-columns-properties.interface.js.map +1 -0
  177. package/dist/tsconfig.build.tsbuildinfo +1 -1
  178. package/dist/type/decorator/api/filter/allowed-types.type.d.ts +1 -0
  179. package/dist/type/decorator/api/filter/allowed-types.type.js.map +1 -0
  180. package/dist/type/{api → decorator/api}/filter/extracted-allowed-types.type.d.ts +1 -1
  181. package/dist/type/decorator/api/filter/extracted-allowed-types.type.js.map +1 -0
  182. package/dist/type/decorator/api/filter/field-selector.type.js.map +1 -0
  183. package/dist/type/decorator/api/filter/index.js.map +1 -0
  184. package/dist/type/decorator/api/filter/order-by.type.d.ts +4 -0
  185. package/dist/type/decorator/api/filter/order-by.type.js.map +1 -0
  186. package/dist/type/decorator/api/function/create-properties.type.d.ts +1 -0
  187. package/dist/type/decorator/api/function/create-properties.type.js.map +1 -0
  188. package/dist/type/decorator/api/function/get-list-properties.type.d.ts +23 -0
  189. package/dist/type/decorator/api/function/get-list-properties.type.js.map +1 -0
  190. package/dist/type/decorator/api/function/get-properties.type.d.ts +6 -0
  191. package/dist/type/decorator/api/function/get-properties.type.js.map +1 -0
  192. package/dist/type/decorator/api/function/index.js.map +1 -0
  193. package/dist/type/decorator/api/function/update-properties.type.d.ts +1 -0
  194. package/dist/type/decorator/api/function/update-properties.type.js.map +1 -0
  195. package/dist/type/{api → decorator/api}/index.d.ts +1 -0
  196. package/dist/type/{api → decorator/api}/index.js +1 -0
  197. package/dist/type/decorator/api/index.js.map +1 -0
  198. package/dist/type/decorator/api/property/describe/array/index.d.ts +2 -0
  199. package/dist/type/decorator/api/property/describe/array/index.js +19 -0
  200. package/dist/type/decorator/api/property/describe/array/index.js.map +1 -0
  201. package/dist/type/decorator/api/property/describe/array/optional-properties.type.d.ts +3 -0
  202. package/dist/type/decorator/api/property/describe/array/optional-properties.type.js +3 -0
  203. package/dist/type/decorator/api/property/describe/array/optional-properties.type.js.map +1 -0
  204. package/dist/type/decorator/api/property/describe/array/required-properties.type.d.ts +6 -0
  205. package/dist/type/decorator/api/property/describe/array/required-properties.type.js +3 -0
  206. package/dist/type/decorator/api/property/describe/array/required-properties.type.js.map +1 -0
  207. package/dist/type/decorator/api/property/describe/base-properties.type.d.ts +7 -0
  208. package/dist/type/decorator/api/property/describe/base-properties.type.js +3 -0
  209. package/dist/type/decorator/api/property/describe/base-properties.type.js.map +1 -0
  210. package/dist/type/decorator/api/property/describe/boolean-properties.type.d.ts +7 -0
  211. package/dist/type/decorator/api/property/describe/boolean-properties.type.js +3 -0
  212. package/dist/type/decorator/api/property/describe/boolean-properties.type.js.map +1 -0
  213. package/dist/type/decorator/api/property/describe/date-properties.type.d.ts +7 -0
  214. package/dist/type/decorator/api/property/describe/date-properties.type.js +3 -0
  215. package/dist/type/decorator/api/property/describe/date-properties.type.js.map +1 -0
  216. package/dist/type/decorator/api/property/describe/dto/body-properties.type.d.ts +5 -0
  217. package/dist/type/decorator/api/property/describe/dto/body-properties.type.js +3 -0
  218. package/dist/type/decorator/api/property/describe/dto/body-properties.type.js.map +1 -0
  219. package/dist/type/decorator/api/property/describe/dto/index.d.ts +5 -0
  220. package/dist/type/decorator/api/property/describe/dto/index.js +22 -0
  221. package/dist/type/decorator/api/property/describe/dto/index.js.map +1 -0
  222. package/dist/type/decorator/api/property/describe/dto/properties.type.d.ts +6 -0
  223. package/dist/type/decorator/api/property/describe/dto/properties.type.js +3 -0
  224. package/dist/type/decorator/api/property/describe/dto/properties.type.js.map +1 -0
  225. package/dist/type/decorator/api/property/describe/dto/query/get-list-properties.type.d.ts +3 -0
  226. package/dist/type/decorator/api/property/describe/dto/query/get-list-properties.type.js +3 -0
  227. package/dist/type/decorator/api/property/describe/dto/query/get-list-properties.type.js.map +1 -0
  228. package/dist/type/decorator/api/property/describe/dto/query/index.d.ts +2 -0
  229. package/dist/type/decorator/api/property/describe/dto/query/index.js +19 -0
  230. package/dist/type/decorator/api/property/describe/dto/query/index.js.map +1 -0
  231. package/dist/type/decorator/api/property/describe/dto/query/properties.type.d.ts +6 -0
  232. package/dist/type/decorator/api/property/describe/dto/query/properties.type.js +3 -0
  233. package/dist/type/decorator/api/property/describe/dto/query/properties.type.js.map +1 -0
  234. package/dist/type/decorator/api/property/describe/dto/request-properties.type.d.ts +5 -0
  235. package/dist/type/decorator/api/property/describe/dto/request-properties.type.js +3 -0
  236. package/dist/type/decorator/api/property/describe/dto/request-properties.type.js.map +1 -0
  237. package/dist/type/decorator/api/property/describe/dto/response-properties.type.d.ts +5 -0
  238. package/dist/type/decorator/api/property/describe/dto/response-properties.type.js +3 -0
  239. package/dist/type/decorator/api/property/describe/dto/response-properties.type.js.map +1 -0
  240. package/dist/type/decorator/api/property/describe/example-properties.type.d.ts +7 -0
  241. package/dist/type/decorator/api/property/describe/example-properties.type.js +3 -0
  242. package/dist/type/decorator/api/property/describe/example-properties.type.js.map +1 -0
  243. package/dist/type/decorator/api/property/describe/index.d.ts +12 -0
  244. package/dist/type/decorator/api/property/describe/index.js +29 -0
  245. package/dist/type/decorator/api/property/describe/index.js.map +1 -0
  246. package/dist/type/decorator/api/property/describe/number-properties.type.d.ts +13 -0
  247. package/dist/type/decorator/api/property/describe/number-properties.type.js +3 -0
  248. package/dist/type/decorator/api/property/describe/number-properties.type.js.map +1 -0
  249. package/dist/type/decorator/api/property/describe/object-properties.type.d.ts +8 -0
  250. package/dist/type/decorator/api/property/describe/object-properties.type.js +3 -0
  251. package/dist/type/decorator/api/property/describe/object-properties.type.js.map +1 -0
  252. package/dist/type/decorator/api/property/describe/properties/base-dto-properties.type.d.ts +2 -0
  253. package/dist/type/decorator/api/property/describe/properties/base-dto-properties.type.js +3 -0
  254. package/dist/type/decorator/api/property/describe/properties/base-dto-properties.type.js.map +1 -0
  255. package/dist/type/decorator/api/property/describe/properties/base-properties.type.d.ts +10 -0
  256. package/dist/type/decorator/api/property/describe/properties/base-properties.type.js +3 -0
  257. package/dist/type/decorator/api/property/describe/properties/base-properties.type.js.map +1 -0
  258. package/dist/type/decorator/api/property/describe/properties/index.d.ts +2 -0
  259. package/dist/type/decorator/api/property/describe/properties/index.js +19 -0
  260. package/dist/type/decorator/api/property/describe/properties/index.js.map +1 -0
  261. package/dist/type/decorator/api/property/describe/properties.type.d.ts +7 -0
  262. package/dist/type/decorator/api/property/describe/properties.type.js +3 -0
  263. package/dist/type/decorator/api/property/describe/properties.type.js.map +1 -0
  264. package/dist/type/decorator/api/property/describe/string-properties.type.d.ts +13 -0
  265. package/dist/type/decorator/api/property/describe/string-properties.type.js +3 -0
  266. package/dist/type/decorator/api/property/describe/string-properties.type.js.map +1 -0
  267. package/dist/type/decorator/api/property/describe/uuid-properties.type.d.ts +7 -0
  268. package/dist/type/decorator/api/property/describe/uuid-properties.type.js +3 -0
  269. package/dist/type/decorator/api/property/describe/uuid-properties.type.js.map +1 -0
  270. package/dist/type/decorator/api/property/index.d.ts +1 -0
  271. package/dist/type/decorator/api/property/index.js +18 -0
  272. package/dist/type/decorator/api/property/index.js.map +1 -0
  273. package/dist/type/decorator/index.d.ts +1 -0
  274. package/dist/type/decorator/index.js +18 -0
  275. package/dist/type/decorator/index.js.map +1 -0
  276. package/dist/type/factory/api/controller/index.d.ts +1 -0
  277. package/dist/type/factory/api/controller/index.js +18 -0
  278. package/dist/type/factory/api/controller/index.js.map +1 -0
  279. package/dist/type/factory/api/controller/target-methods.type.d.ts +1 -0
  280. package/dist/type/factory/api/controller/target-methods.type.js +3 -0
  281. package/dist/type/factory/api/controller/target-methods.type.js.map +1 -0
  282. package/dist/type/factory/api/index.d.ts +1 -0
  283. package/dist/type/factory/api/index.js +18 -0
  284. package/dist/type/factory/api/index.js.map +1 -0
  285. package/dist/type/factory/index.d.ts +1 -0
  286. package/dist/type/factory/index.js +18 -0
  287. package/dist/type/factory/index.js.map +1 -0
  288. package/dist/type/index.d.ts +2 -1
  289. package/dist/type/index.js +2 -1
  290. package/dist/type/index.js.map +1 -1
  291. package/dist/utility/api/controller/get-method-name.utility.d.ts +2 -0
  292. package/dist/utility/api/controller/get-method-name.utility.js +9 -0
  293. package/dist/utility/api/controller/get-method-name.utility.js.map +1 -0
  294. package/dist/utility/api/controller/index.d.ts +2 -0
  295. package/dist/utility/api/controller/index.js +19 -0
  296. package/dist/utility/api/controller/index.js.map +1 -0
  297. package/dist/utility/api/controller/write-method.utility.d.ts +3 -0
  298. package/dist/utility/api/controller/write-method.utility.js +13 -0
  299. package/dist/utility/api/controller/write-method.utility.js.map +1 -0
  300. package/dist/utility/api/filter-order-by-from-entity.utility.d.ts +5 -3
  301. package/dist/utility/api/filter-order-by-from-entity.utility.js +22 -15
  302. package/dist/utility/api/filter-order-by-from-entity.utility.js.map +1 -1
  303. package/dist/utility/api/index.d.ts +1 -0
  304. package/dist/utility/api/index.js +1 -0
  305. package/dist/utility/api/index.js.map +1 -1
  306. package/dist/utility/capitalize-string.utility.d.ts +1 -0
  307. package/dist/utility/capitalize-string.utility.js +7 -0
  308. package/dist/utility/capitalize-string.utility.js.map +1 -0
  309. package/dist/utility/dto/analize.utility.d.ts +1 -0
  310. package/dist/utility/dto/analize.utility.js +10 -0
  311. package/dist/utility/dto/analize.utility.js.map +1 -0
  312. package/dist/utility/dto/generate.utility.d.ts +5 -0
  313. package/dist/utility/dto/generate.utility.js +371 -0
  314. package/dist/utility/dto/generate.utility.js.map +1 -0
  315. package/dist/utility/dto/index.d.ts +1 -0
  316. package/dist/utility/dto/index.js +18 -0
  317. package/dist/utility/dto/index.js.map +1 -0
  318. package/dist/utility/error-exception.utility.d.ts +1 -0
  319. package/dist/utility/error-exception.utility.js +7 -0
  320. package/dist/utility/error-exception.utility.js.map +1 -0
  321. package/dist/utility/generate-entity-information.utility.d.ts +2 -0
  322. package/dist/utility/generate-entity-information.utility.js +51 -0
  323. package/dist/utility/generate-entity-information.utility.js.map +1 -0
  324. package/dist/utility/get-entity-columns.utility.d.ts +3 -2
  325. package/dist/utility/get-entity-columns.utility.js +4 -5
  326. package/dist/utility/get-entity-columns.utility.js.map +1 -1
  327. package/dist/utility/index.d.ts +4 -0
  328. package/dist/utility/index.js +4 -0
  329. package/dist/utility/index.js.map +1 -1
  330. package/dist/validator/all-or-none-of-listed-properties.validator.d.ts +5 -0
  331. package/dist/validator/all-or-none-of-listed-properties.validator.js +29 -0
  332. package/dist/validator/all-or-none-of-listed-properties.validator.js.map +1 -0
  333. package/dist/validator/has-at-least-one-and-only-one-of-listed-properties.validator.d.ts +5 -0
  334. package/dist/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js +39 -0
  335. package/dist/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js.map +1 -0
  336. package/dist/validator/has-at-least-one-of-listed-properties.validator.d.ts +5 -0
  337. package/dist/validator/has-at-least-one-of-listed-properties.validator.js +35 -0
  338. package/dist/validator/has-at-least-one-of-listed-properties.validator.js.map +1 -0
  339. package/dist/validator/has-at-least-one-property.validator.d.ts +5 -0
  340. package/dist/validator/has-at-least-one-property.validator.js +23 -0
  341. package/dist/validator/has-at-least-one-property.validator.js.map +1 -0
  342. package/dist/validator/index.d.ts +5 -0
  343. package/dist/validator/index.js +5 -0
  344. package/dist/validator/index.js.map +1 -1
  345. package/dist/validator/only-one-of-listed-properties.validator.d.ts +5 -0
  346. package/dist/validator/only-one-of-listed-properties.validator.js +37 -0
  347. package/dist/validator/only-one-of-listed-properties.validator.js.map +1 -0
  348. package/package.json +5 -3
  349. package/dist/enum/decorator/api/controller/type.enum.js.map +0 -1
  350. package/dist/helper/reflector.helper.d.ts +0 -20
  351. package/dist/helper/reflector.helper.js +0 -77
  352. package/dist/helper/reflector.helper.js.map +0 -1
  353. package/dist/type/api/filter/allowed-types.type.d.ts +0 -1
  354. package/dist/type/api/filter/allowed-types.type.js.map +0 -1
  355. package/dist/type/api/filter/extracted-allowed-types.type.js.map +0 -1
  356. package/dist/type/api/filter/field-selector.type.js.map +0 -1
  357. package/dist/type/api/filter/index.js.map +0 -1
  358. package/dist/type/api/filter/order-by.type.d.ts +0 -5
  359. package/dist/type/api/filter/order-by.type.js.map +0 -1
  360. package/dist/type/api/function/create-properties.type.d.ts +0 -2
  361. package/dist/type/api/function/create-properties.type.js.map +0 -1
  362. package/dist/type/api/function/get-list-properties.type.d.ts +0 -23
  363. package/dist/type/api/function/get-list-properties.type.js.map +0 -1
  364. package/dist/type/api/function/get-properties.type.d.ts +0 -6
  365. package/dist/type/api/function/get-properties.type.js.map +0 -1
  366. package/dist/type/api/function/index.js.map +0 -1
  367. package/dist/type/api/function/update-properties.type.d.ts +0 -2
  368. package/dist/type/api/function/update-properties.type.js.map +0 -1
  369. package/dist/type/api/index.js.map +0 -1
  370. /package/dist/type/{api → decorator/api}/filter/allowed-types.type.js +0 -0
  371. /package/dist/type/{api → decorator/api}/filter/extracted-allowed-types.type.js +0 -0
  372. /package/dist/type/{api → decorator/api}/filter/field-selector.type.d.ts +0 -0
  373. /package/dist/type/{api → decorator/api}/filter/field-selector.type.js +0 -0
  374. /package/dist/type/{api → decorator/api}/filter/index.d.ts +0 -0
  375. /package/dist/type/{api → decorator/api}/filter/index.js +0 -0
  376. /package/dist/type/{api → decorator/api}/filter/order-by.type.js +0 -0
  377. /package/dist/type/{api → decorator/api}/function/create-properties.type.js +0 -0
  378. /package/dist/type/{api → decorator/api}/function/get-list-properties.type.js +0 -0
  379. /package/dist/type/{api → decorator/api}/function/get-properties.type.js +0 -0
  380. /package/dist/type/{api → decorator/api}/function/index.d.ts +0 -0
  381. /package/dist/type/{api → decorator/api}/function/index.js +0 -0
  382. /package/dist/type/{api → decorator/api}/function/update-properties.type.js +0 -0
@@ -1,11 +1,10 @@
1
- import { IApiGetListResponseResult } from "../../interface";
2
- import { BaseEntity, type FindOptionsRelations } from "typeorm";
3
- import { TApiFunctionCreateProperties, TApiFunctionGetListProperties, TApiFunctionUpdateProperties } from "../../type";
4
- import { TApiFunctionGetProperties } from "../../type/api/function/get-properties.type";
5
- export declare class BaseApiService<E extends BaseEntity> {
6
- getList(_properties: TApiFunctionGetListProperties<E>, _relations?: FindOptionsRelations<E>): Promise<IApiGetListResponseResult<E>>;
7
- get(_id: string, _properties?: TApiFunctionGetProperties<E>, _relations?: FindOptionsRelations<E>): Promise<E>;
8
- create(_properties: TApiFunctionCreateProperties<E>): Promise<E>;
9
- update(_id: string, _properties: TApiFunctionUpdateProperties<E>): Promise<E>;
10
- delete(_id: string): Promise<void>;
1
+ import type { IApiGetListResponseResult } from "../../interface";
2
+ import type { TApiFunctionCreateProperties, TApiFunctionGetListProperties, TApiFunctionGetProperties, TApiFunctionUpdateProperties } from "../../type";
3
+ import type { FindOptionsRelations } from "typeorm";
4
+ export declare class BaseApiService<E> {
5
+ create(properties: TApiFunctionCreateProperties<E>): Promise<E>;
6
+ delete(id: string): Promise<void>;
7
+ get(id: string, properties?: TApiFunctionGetProperties<E>, relations?: FindOptionsRelations<E>): Promise<E>;
8
+ getList(properties: TApiFunctionGetListProperties<E>, relations?: FindOptionsRelations<E>): Promise<IApiGetListResponseResult<E>>;
9
+ update(id: string, properties: TApiFunctionUpdateProperties<E>): Promise<E>;
11
10
  }
@@ -2,20 +2,29 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BaseApiService = void 0;
4
4
  class BaseApiService {
5
- getList(_properties, _relations) {
6
- return null;
5
+ create(properties) {
6
+ void properties;
7
+ return Promise.resolve({});
7
8
  }
8
- get(_id, _properties, _relations) {
9
- return null;
9
+ delete(id) {
10
+ void id;
11
+ return Promise.resolve();
10
12
  }
11
- create(_properties) {
12
- return null;
13
+ get(id, properties, relations) {
14
+ void id;
15
+ void properties;
16
+ void relations;
17
+ return Promise.resolve({});
13
18
  }
14
- update(_id, _properties) {
15
- return null;
19
+ getList(properties, relations) {
20
+ void properties;
21
+ void relations;
22
+ return Promise.resolve({ items: [], total: 0 });
16
23
  }
17
- delete(_id) {
18
- return null;
24
+ update(id, properties) {
25
+ void id;
26
+ void properties;
27
+ return Promise.resolve({});
19
28
  }
20
29
  }
21
30
  exports.BaseApiService = BaseApiService;
@@ -1 +1 @@
1
- {"version":3,"file":"base-service.class.js","sourceRoot":"/","sources":["class/api/base-service.class.ts"],"names":[],"mappings":";;;AAKA,MAAa,cAAc;IACvB,OAAO,CAAC,WAA6C,EAAE,UAAoC;QACvF,OAAO,IAAW,CAAC;IACvB,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,WAA0C,EAAE,UAAoC;QAC7F,OAAO,IAAW,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,WAA4C;QAC/C,OAAO,IAAW,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,GAAW,EAAE,WAA4C;QAC5D,OAAO,IAAW,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,GAAW;QACd,OAAO,IAAW,CAAC;IACvB,CAAC;CACJ;AApBD,wCAoBC","sourcesContent":["import { IApiGetListResponseResult } from \"../../interface\";\nimport {BaseEntity, type FindOptionsRelations} from \"typeorm\";\nimport {TApiFunctionCreateProperties, TApiFunctionGetListProperties, TApiFunctionUpdateProperties} from \"../../type\";\nimport {TApiFunctionGetProperties} from \"../../type/api/function/get-properties.type\";\n\nexport class BaseApiService<E extends BaseEntity> {\n getList(_properties: TApiFunctionGetListProperties<E>, _relations?: FindOptionsRelations<E>): Promise<IApiGetListResponseResult<E>> {\n return null as any;\n }\n\n get(_id: string, _properties?: TApiFunctionGetProperties<E>, _relations?: FindOptionsRelations<E>): Promise<E> {\n return null as any;\n }\n\n create(_properties: TApiFunctionCreateProperties<E>): Promise<E> {\n return null as any;\n }\n\n update(_id: string, _properties: TApiFunctionUpdateProperties<E>): Promise<E> {\n return null as any;\n }\n\n delete(_id: string): Promise<void> {\n return null as any;\n }\n}\n"]}
1
+ {"version":3,"file":"base-service.class.js","sourceRoot":"/","sources":["class/api/base-service.class.ts"],"names":[],"mappings":";;;AAIA,MAAa,cAAc;IAC1B,MAAM,CAAC,UAA2C;QACjD,KAAK,UAAU,CAAC;QAEhB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,EAAU;QAChB,KAAK,EAAE,CAAC;QAER,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED,GAAG,CAAC,EAAU,EAAE,UAAyC,EAAE,SAAmC;QAC7F,KAAK,EAAE,CAAC;QACR,KAAK,UAAU,CAAC;QAChB,KAAK,SAAS,CAAC;QAEf,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,CAAC,UAA4C,EAAE,SAAmC;QACxF,KAAK,UAAU,CAAC;QAChB,KAAK,SAAS,CAAC;QAEf,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAA6C,CAAC,CAAC;IAC5F,CAAC;IAED,MAAM,CAAC,EAAU,EAAE,UAA2C;QAC7D,KAAK,EAAE,CAAC;QACR,KAAK,UAAU,CAAC;QAEhB,OAAO,OAAO,CAAC,OAAO,CAAC,EAAO,CAAC,CAAC;IACjC,CAAC;CACD;AAlCD,wCAkCC","sourcesContent":["import type { IApiGetListResponseResult } from \"../../interface\";\nimport type { TApiFunctionCreateProperties, TApiFunctionGetListProperties, TApiFunctionGetProperties, TApiFunctionUpdateProperties } from \"../../type\";\nimport type { FindOptionsRelations } from \"typeorm\";\n\nexport class BaseApiService<E> {\n\tcreate(properties: TApiFunctionCreateProperties<E>): Promise<E> {\n\t\tvoid properties;\n\n\t\treturn Promise.resolve({} as E);\n\t}\n\n\tdelete(id: string): Promise<void> {\n\t\tvoid id;\n\n\t\treturn Promise.resolve();\n\t}\n\n\tget(id: string, properties?: TApiFunctionGetProperties<E>, relations?: FindOptionsRelations<E>): Promise<E> {\n\t\tvoid id;\n\t\tvoid properties;\n\t\tvoid relations;\n\n\t\treturn Promise.resolve({} as E);\n\t}\n\n\tgetList(properties: TApiFunctionGetListProperties<E>, relations?: FindOptionsRelations<E>): Promise<IApiGetListResponseResult<E>> {\n\t\tvoid properties;\n\t\tvoid relations;\n\n\t\treturn Promise.resolve({ items: [], total: 0 } as unknown as IApiGetListResponseResult<E>);\n\t}\n\n\tupdate(id: string, properties: TApiFunctionUpdateProperties<E>): Promise<E> {\n\t\tvoid id;\n\t\tvoid properties;\n\n\t\treturn Promise.resolve({} as E);\n\t}\n}\n"]}
@@ -1 +1,2 @@
1
1
  export * from "./api";
2
+ export * from "./metadata-storage.class";
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./api"), exports);
18
+ __exportStar(require("./metadata-storage.class"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["class/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB","sourcesContent":["export * from \"./api\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["class/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,2DAAyC","sourcesContent":["export * from \"./api\";\nexport * from \"./metadata-storage.class\";\n"]}
@@ -0,0 +1,8 @@
1
+ export declare class MetadataStorage {
2
+ private static instance;
3
+ private readonly STORAGE;
4
+ static getInstance(): MetadataStorage;
5
+ getAllEntitiesMetadata(): Record<string, Record<string, any>>;
6
+ getMetadata(entityName: string, propertyName?: string, key?: string): any;
7
+ setMetadata(entityName: string, propertyName: string, key: string, value: unknown): void;
8
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MetadataStorage = void 0;
4
+ class MetadataStorage {
5
+ static instance;
6
+ STORAGE = new Map();
7
+ static getInstance() {
8
+ if (!MetadataStorage.instance) {
9
+ MetadataStorage.instance = new MetadataStorage();
10
+ }
11
+ return MetadataStorage.instance;
12
+ }
13
+ getAllEntitiesMetadata() {
14
+ const result = {};
15
+ for (const [entityName, entityMetadata] of this.STORAGE.entries()) {
16
+ result[entityName] = Object.fromEntries(entityMetadata);
17
+ }
18
+ return result;
19
+ }
20
+ getMetadata(entityName, propertyName, key) {
21
+ const entityMetadata = this.STORAGE.get(entityName);
22
+ if (!entityMetadata)
23
+ return undefined;
24
+ if (!propertyName)
25
+ return Object.fromEntries(entityMetadata);
26
+ const propertyMetadata = entityMetadata.get(propertyName);
27
+ if (!propertyMetadata)
28
+ return undefined;
29
+ if (!key)
30
+ return propertyMetadata;
31
+ return propertyMetadata[key];
32
+ }
33
+ setMetadata(entityName, propertyName, key, value) {
34
+ if (!this.STORAGE.has(entityName)) {
35
+ this.STORAGE.set(entityName, new Map());
36
+ }
37
+ const entityMetadata = this.STORAGE.get(entityName);
38
+ if (!entityMetadata.has(propertyName)) {
39
+ entityMetadata.set(propertyName, {});
40
+ }
41
+ entityMetadata.get(propertyName)[key] = value;
42
+ }
43
+ }
44
+ exports.MetadataStorage = MetadataStorage;
45
+ //# sourceMappingURL=metadata-storage.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata-storage.class.js","sourceRoot":"/","sources":["class/metadata-storage.class.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAe;IACnB,MAAM,CAAC,QAAQ,CAAkB;IAExB,OAAO,GAAkC,IAAI,GAAG,EAA4B,CAAC;IAEvF,MAAM,CAAC,WAAW;QACxB,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;YAC/B,eAAe,CAAC,QAAQ,GAAG,IAAI,eAAe,EAAE,CAAC;QAClD,CAAC;QAED,OAAO,eAAe,CAAC,QAAQ,CAAC;IACjC,CAAC;IAEM,sBAAsB;QAC5B,MAAM,MAAM,GAAwC,EAAE,CAAC;QAEvD,KAAK,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YACnE,MAAM,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAEM,WAAW,CAAC,UAAkB,EAAE,YAAqB,EAAE,GAAY;QACzE,MAAM,cAAc,GAAiC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAElF,IAAI,CAAC,cAAc;YAAE,OAAO,SAAS,CAAC;QAEtC,IAAI,CAAC,YAAY;YAAE,OAAO,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QAC7D,MAAM,gBAAgB,GAAY,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAEnE,IAAI,CAAC,gBAAgB;YAAE,OAAO,SAAS,CAAC;QAExC,IAAI,CAAC,GAAG;YAAE,OAAO,gBAAgB,CAAC;QAIlC,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAEM,WAAW,CAAC,UAAkB,EAAE,YAAoB,EAAE,GAAW,EAAE,KAAc;QACvF,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QACzC,CAAC;QACD,MAAM,cAAc,GAAqB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC;QAEvE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACvC,cAAc,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QACtC,CAAC;QAED,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC/C,CAAC;CACD;AApDD,0CAoDC","sourcesContent":["export class MetadataStorage {\n\tprivate static instance: MetadataStorage;\n\n\tprivate readonly STORAGE: Map<string, Map<string, any>> = new Map<string, Map<string, any>>();\n\n\tpublic static getInstance(): MetadataStorage {\n\t\tif (!MetadataStorage.instance) {\n\t\t\tMetadataStorage.instance = new MetadataStorage();\n\t\t}\n\n\t\treturn MetadataStorage.instance;\n\t}\n\n\tpublic getAllEntitiesMetadata(): Record<string, Record<string, any>> {\n\t\tconst result: Record<string, Record<string, any>> = {};\n\n\t\tfor (const [entityName, entityMetadata] of this.STORAGE.entries()) {\n\t\t\tresult[entityName] = Object.fromEntries(entityMetadata);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tpublic getMetadata(entityName: string, propertyName?: string, key?: string): any {\n\t\tconst entityMetadata: Map<string, any> | undefined = this.STORAGE.get(entityName);\n\n\t\tif (!entityMetadata) return undefined;\n\n\t\tif (!propertyName) return Object.fromEntries(entityMetadata);\n\t\tconst propertyMetadata: unknown = entityMetadata.get(propertyName);\n\n\t\tif (!propertyMetadata) return undefined;\n\n\t\tif (!key) return propertyMetadata;\n\n\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t// @ts-expect-error\n\t\treturn propertyMetadata[key];\n\t}\n\n\tpublic setMetadata(entityName: string, propertyName: string, key: string, value: unknown): void {\n\t\tif (!this.STORAGE.has(entityName)) {\n\t\t\tthis.STORAGE.set(entityName, new Map());\n\t\t}\n\t\tconst entityMetadata: Map<string, any> = this.STORAGE.get(entityName)!;\n\n\t\tif (!entityMetadata.has(propertyName)) {\n\t\t\tentityMetadata.set(propertyName, {});\n\t\t}\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n\t\tentityMetadata.get(propertyName)[key] = value;\n\t}\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export declare const CONTROLLER_API_DECORATOR_CONSTANT: {
2
+ readonly RESERVED_METHOD_PREFIX: string;
3
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONTROLLER_API_DECORATOR_CONSTANT = void 0;
4
+ const RESERVED_METHOD_PREFIX = "apiController";
5
+ exports.CONTROLLER_API_DECORATOR_CONSTANT = {
6
+ RESERVED_METHOD_PREFIX,
7
+ };
8
+ //# sourceMappingURL=controller.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.constant.js","sourceRoot":"/","sources":["constant/decorator/api/controller.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,sBAAsB,GAAW,eAAe,CAAC;AAE1C,QAAA,iCAAiC,GAE1C;IACH,sBAAsB;CACb,CAAC","sourcesContent":["const RESERVED_METHOD_PREFIX: string = \"apiController\";\n\nexport const CONTROLLER_API_DECORATOR_CONSTANT: {\n\treadonly RESERVED_METHOD_PREFIX: string;\n} = {\n\tRESERVED_METHOD_PREFIX,\n} as const;\n"]}
@@ -1,4 +1,4 @@
1
1
  import { EFilterOrderDirection } from "../../../enum";
2
- export declare const API_FUNCTION_DECORATOR_CONSTANT: {
2
+ export declare const FUNCTION_API_DECORATOR_CONSTANT: {
3
3
  readonly DEFAULT_FILTER_ORDER_BY_DIRECTION: EFilterOrderDirection;
4
4
  };
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.API_FUNCTION_DECORATOR_CONSTANT = void 0;
3
+ exports.FUNCTION_API_DECORATOR_CONSTANT = void 0;
4
4
  const enum_1 = require("../../../enum");
5
5
  const DEFAULT_FILTER_ORDER_BY_DIRECTION = enum_1.EFilterOrderDirection.ASC;
6
- exports.API_FUNCTION_DECORATOR_CONSTANT = {
6
+ exports.FUNCTION_API_DECORATOR_CONSTANT = {
7
7
  DEFAULT_FILTER_ORDER_BY_DIRECTION,
8
8
  };
9
9
  //# sourceMappingURL=function.constant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"function.constant.js","sourceRoot":"/","sources":["constant/decorator/api/function.constant.ts"],"names":[],"mappings":";;;AAAA,wCAAsD;AAEtD,MAAM,iCAAiC,GAA0B,4BAAqB,CAAC,GAAG,CAAC;AAE9E,QAAA,+BAA+B,GAExC;IACH,iCAAiC;CACxB,CAAC","sourcesContent":["import { EFilterOrderDirection } from \"../../../enum\";\n\nconst DEFAULT_FILTER_ORDER_BY_DIRECTION: EFilterOrderDirection = EFilterOrderDirection.ASC;\n\nexport const API_FUNCTION_DECORATOR_CONSTANT: {\n\treadonly DEFAULT_FILTER_ORDER_BY_DIRECTION: EFilterOrderDirection;\n} = {\n\tDEFAULT_FILTER_ORDER_BY_DIRECTION,\n} as const;\n"]}
1
+ {"version":3,"file":"function.constant.js","sourceRoot":"/","sources":["constant/decorator/api/function.constant.ts"],"names":[],"mappings":";;;AAAA,wCAAsD;AAEtD,MAAM,iCAAiC,GAA0B,4BAAqB,CAAC,GAAG,CAAC;AAE9E,QAAA,+BAA+B,GAExC;IACH,iCAAiC;CACxB,CAAC","sourcesContent":["import { EFilterOrderDirection } from \"../../../enum\";\n\nconst DEFAULT_FILTER_ORDER_BY_DIRECTION: EFilterOrderDirection = EFilterOrderDirection.ASC;\n\nexport const FUNCTION_API_DECORATOR_CONSTANT: {\n\treadonly DEFAULT_FILTER_ORDER_BY_DIRECTION: EFilterOrderDirection;\n} = {\n\tDEFAULT_FILTER_ORDER_BY_DIRECTION,\n} as const;\n"]}
@@ -1 +1,3 @@
1
1
  export * from "./function.constant";
2
+ export * from "./controller.constant";
3
+ export * from "./property-describe.constant";
@@ -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./function.constant"), exports);
18
+ __exportStar(require("./controller.constant"), exports);
19
+ __exportStar(require("./property-describe.constant"), exports);
18
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/decorator/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC","sourcesContent":["export * from \"./function.constant\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/decorator/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,wDAAsC;AACtC,+DAA6C","sourcesContent":["export * from \"./function.constant\";\nexport * from \"./controller.constant\";\nexport * from \"./property-describe.constant\";\n"]}
@@ -0,0 +1,3 @@
1
+ export declare const PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT: {
2
+ readonly METADATA_PROPERTY_NAME: string;
3
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT = void 0;
4
+ const METADATA_PROPERTY_NAME = "API_PROPERTY_DESCRIBE";
5
+ exports.PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT = {
6
+ METADATA_PROPERTY_NAME,
7
+ };
8
+ //# sourceMappingURL=property-describe.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"property-describe.constant.js","sourceRoot":"/","sources":["constant/decorator/api/property-describe.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,sBAAsB,GAAW,uBAAuB,CAAC;AAElD,QAAA,wCAAwC,GAEjD;IACH,sBAAsB;CACb,CAAC","sourcesContent":["const METADATA_PROPERTY_NAME: string = \"API_PROPERTY_DESCRIBE\";\n\nexport const PROPERTY_DESCRIBE_DECORATOR_API_CONSTANT: {\n\treadonly METADATA_PROPERTY_NAME: string;\n} = {\n\tMETADATA_PROPERTY_NAME,\n} as const;\n"]}
@@ -0,0 +1,6 @@
1
+ export declare const GET_LIST_QUERY_DTO_FACTORY_CONSTANT: {
2
+ readonly MAXIMUM_LIST_LENGTH: number;
3
+ readonly MAXIMUM_LIST_PAGES_COUNT: number;
4
+ readonly MINIMUM_LIST_LENGTH: number;
5
+ readonly MINIMUM_LIST_PAGES_COUNT: number;
6
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_LIST_QUERY_DTO_FACTORY_CONSTANT = void 0;
4
+ const MINIMUM_LIST_LENGTH = 1;
5
+ const MAXIMUM_LIST_LENGTH = 100;
6
+ const MINIMUM_LIST_PAGES_COUNT = 1;
7
+ const MAXIMUM_LIST_PAGES_COUNT = 100;
8
+ exports.GET_LIST_QUERY_DTO_FACTORY_CONSTANT = {
9
+ MAXIMUM_LIST_LENGTH,
10
+ MAXIMUM_LIST_PAGES_COUNT,
11
+ MINIMUM_LIST_LENGTH,
12
+ MINIMUM_LIST_PAGES_COUNT,
13
+ };
14
+ //# sourceMappingURL=get-list-query.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-list-query.constant.js","sourceRoot":"/","sources":["constant/factory/dto/get-list-query.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,mBAAmB,GAAW,CAAC,CAAC;AACtC,MAAM,mBAAmB,GAAW,GAAG,CAAC;AACxC,MAAM,wBAAwB,GAAW,CAAC,CAAC;AAC3C,MAAM,wBAAwB,GAAW,GAAG,CAAC;AAEhC,QAAA,mCAAmC,GAK5C;IACH,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,wBAAwB;CACf,CAAC","sourcesContent":["const MINIMUM_LIST_LENGTH: number = 1;\nconst MAXIMUM_LIST_LENGTH: number = 100;\nconst MINIMUM_LIST_PAGES_COUNT: number = 1;\nconst MAXIMUM_LIST_PAGES_COUNT: number = 100;\n\nexport const GET_LIST_QUERY_DTO_FACTORY_CONSTANT: {\n\treadonly MAXIMUM_LIST_LENGTH: number;\n\treadonly MAXIMUM_LIST_PAGES_COUNT: number;\n\treadonly MINIMUM_LIST_LENGTH: number;\n\treadonly MINIMUM_LIST_PAGES_COUNT: number;\n} = {\n\tMAXIMUM_LIST_LENGTH,\n\tMAXIMUM_LIST_PAGES_COUNT,\n\tMINIMUM_LIST_LENGTH,\n\tMINIMUM_LIST_PAGES_COUNT,\n} as const;\n"]}
@@ -0,0 +1 @@
1
+ export * from "./get-list-query.constant";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./get-list-query.constant"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/factory/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C","sourcesContent":["export * from \"./get-list-query.constant\";\n"]}
@@ -0,0 +1 @@
1
+ export * from "./dto";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./dto"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/factory/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB","sourcesContent":["export * from \"./dto\";\n"]}
@@ -3,3 +3,4 @@ export * from "./dto";
3
3
  export * from "./interface";
4
4
  export * from "./date.constant";
5
5
  export * from "./number.constant";
6
+ export * from "./factory";
@@ -19,4 +19,5 @@ __exportStar(require("./dto"), exports);
19
19
  __exportStar(require("./interface"), exports);
20
20
  __exportStar(require("./date.constant"), exports);
21
21
  __exportStar(require("./number.constant"), exports);
22
+ __exportStar(require("./factory"), exports);
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wCAAsB;AACtB,8CAA4B;AAC5B,kDAAgC;AAChC,oDAAkC","sourcesContent":["export * from \"./decorator\";\nexport * from \"./dto\";\nexport * from \"./interface\";\nexport * from \"./date.constant\";\nexport * from \"./number.constant\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wCAAsB;AACtB,8CAA4B;AAC5B,kDAAgC;AAChC,oDAAkC;AAClC,4CAA0B","sourcesContent":["export * from \"./decorator\";\nexport * from \"./dto\";\nexport * from \"./interface\";\nexport * from \"./date.constant\";\nexport * from \"./number.constant\";\nexport * from \"./factory\";\n"]}
@@ -1,3 +1,3 @@
1
- export declare const API_FILTER_INTERFACE_CONSTANT: {
2
- readonly ALLOWED_ENTITY_TO_FILTER_COLUMNS: string[];
1
+ export declare const FILTER_API_INTERFACE_CONSTANT: {
2
+ readonly ALLOWED_ENTITY_TO_FILTER_COLUMNS: Array<string>;
3
3
  };
@@ -1,12 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.API_FILTER_INTERFACE_CONSTANT = void 0;
4
- const ALLOWED_ENTITY_TO_FILTER_COLUMNS = [
5
- 'string', 'text', 'varchar', 'char',
6
- 'number', 'int', 'integer', 'tinyint', 'smallint', 'mediumint', 'bigint', 'float', 'double', 'decimal',
7
- 'date', 'datetime', 'timestamp'
8
- ];
9
- exports.API_FILTER_INTERFACE_CONSTANT = {
3
+ exports.FILTER_API_INTERFACE_CONSTANT = void 0;
4
+ const ALLOWED_ENTITY_TO_FILTER_COLUMNS = ["string", "text", "varchar", "char", "number", "int", "integer", "tinyint", "smallint", "mediumint", "bigint", "float", "double", "decimal", "date", "datetime", "timestamp"];
5
+ exports.FILTER_API_INTERFACE_CONSTANT = {
10
6
  ALLOWED_ENTITY_TO_FILTER_COLUMNS,
11
7
  };
12
8
  //# sourceMappingURL=filter.constant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter.constant.js","sourceRoot":"/","sources":["constant/interface/api/filter.constant.ts"],"names":[],"mappings":";;;AACA,MAAM,gCAAgC,GAAa;IAC/C,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IACnC,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS;IACtG,MAAM,EAAE,UAAU,EAAE,WAAW;CAClC,CAAC;AAEW,QAAA,6BAA6B,GAEtC;IACA,gCAAgC;CAC1B,CAAC","sourcesContent":["\nconst ALLOWED_ENTITY_TO_FILTER_COLUMNS: string[] = [\n 'string', 'text', 'varchar', 'char',\n 'number', 'int', 'integer', 'tinyint', 'smallint', 'mediumint', 'bigint', 'float', 'double', 'decimal',\n 'date', 'datetime', 'timestamp'\n];\n\nexport const API_FILTER_INTERFACE_CONSTANT: {\n readonly ALLOWED_ENTITY_TO_FILTER_COLUMNS: string[];\n} = {\n ALLOWED_ENTITY_TO_FILTER_COLUMNS,\n} as const;\n"]}
1
+ {"version":3,"file":"filter.constant.js","sourceRoot":"/","sources":["constant/interface/api/filter.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,gCAAgC,GAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAE1N,QAAA,6BAA6B,GAEtC;IACH,gCAAgC;CACvB,CAAC","sourcesContent":["const ALLOWED_ENTITY_TO_FILTER_COLUMNS: Array<string> = [\"string\", \"text\", \"varchar\", \"char\", \"number\", \"int\", \"integer\", \"tinyint\", \"smallint\", \"mediumint\", \"bigint\", \"float\", \"double\", \"decimal\", \"date\", \"datetime\", \"timestamp\"];\n\nexport const FILTER_API_INTERFACE_CONSTANT: {\n\treadonly ALLOWED_ENTITY_TO_FILTER_COLUMNS: Array<string>;\n} = {\n\tALLOWED_ENTITY_TO_FILTER_COLUMNS,\n} as const;\n"]}
@@ -1 +1,2 @@
1
1
  export * from "./property";
2
+ export * from "./filter.constant";
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./property"), exports);
18
+ __exportStar(require("./filter.constant"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/interface/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B","sourcesContent":["export * from \"./property\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["constant/interface/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,oDAAkC","sourcesContent":["export * from \"./property\";\nexport * from \"./filter.constant\";\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { IsIpVersion } from "class-validator/types/decorator/string/IsIP";
2
- export declare const API_PROPERTY_STRING_INTERFACE_CONSTANT: {
2
+ export declare const STRING_PROPERTY_API_INTERFACE_CONSTANT: {
3
3
  readonly IP_VERSION: IsIpVersion;
4
4
  readonly REGEX_FLAGS_INDEX: number;
5
5
  readonly REGEX_PATTERN_INDEX: number;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.API_PROPERTY_STRING_INTERFACE_CONSTANT = void 0;
3
+ exports.STRING_PROPERTY_API_INTERFACE_CONSTANT = void 0;
4
4
  const REGEX_PATTERN_INDEX = 1;
5
5
  const REGEX_FLAGS_INDEX = 2;
6
6
  const IP_VERSION = 4;
7
- exports.API_PROPERTY_STRING_INTERFACE_CONSTANT = {
7
+ exports.STRING_PROPERTY_API_INTERFACE_CONSTANT = {
8
8
  IP_VERSION,
9
9
  REGEX_FLAGS_INDEX,
10
10
  REGEX_PATTERN_INDEX,
@@ -1 +1 @@
1
- {"version":3,"file":"string.constant.js","sourceRoot":"/","sources":["constant/interface/api/property/string.constant.ts"],"names":[],"mappings":";;;AAEA,MAAM,mBAAmB,GAAW,CAAC,CAAC;AACtC,MAAM,iBAAiB,GAAW,CAAC,CAAC;AACpC,MAAM,UAAU,GAAgB,CAAC,CAAC;AAErB,QAAA,sCAAsC,GAI/C;IACH,UAAU;IACV,iBAAiB;IACjB,mBAAmB;CACV,CAAC","sourcesContent":["import type { IsIpVersion } from \"class-validator/types/decorator/string/IsIP\";\n\nconst REGEX_PATTERN_INDEX: number = 1;\nconst REGEX_FLAGS_INDEX: number = 2;\nconst IP_VERSION: IsIpVersion = 4;\n\nexport const API_PROPERTY_STRING_INTERFACE_CONSTANT: {\n\treadonly IP_VERSION: IsIpVersion;\n\treadonly REGEX_FLAGS_INDEX: number;\n\treadonly REGEX_PATTERN_INDEX: number;\n} = {\n\tIP_VERSION,\n\tREGEX_FLAGS_INDEX,\n\tREGEX_PATTERN_INDEX,\n} as const;\n"]}
1
+ {"version":3,"file":"string.constant.js","sourceRoot":"/","sources":["constant/interface/api/property/string.constant.ts"],"names":[],"mappings":";;;AAEA,MAAM,mBAAmB,GAAW,CAAC,CAAC;AACtC,MAAM,iBAAiB,GAAW,CAAC,CAAC;AACpC,MAAM,UAAU,GAAgB,CAAC,CAAC;AAErB,QAAA,sCAAsC,GAI/C;IACH,UAAU;IACV,iBAAiB;IACjB,mBAAmB;CACV,CAAC","sourcesContent":["import type { IsIpVersion } from \"class-validator/types/decorator/string/IsIP\";\n\nconst REGEX_PATTERN_INDEX: number = 1;\nconst REGEX_FLAGS_INDEX: number = 2;\nconst IP_VERSION: IsIpVersion = 4;\n\nexport const STRING_PROPERTY_API_INTERFACE_CONSTANT: {\n\treadonly IP_VERSION: IsIpVersion;\n\treadonly REGEX_FLAGS_INDEX: number;\n\treadonly REGEX_PATTERN_INDEX: number;\n} = {\n\tIP_VERSION,\n\tREGEX_FLAGS_INDEX,\n\tREGEX_PATTERN_INDEX,\n} as const;\n"]}
@@ -1,4 +1,4 @@
1
- export declare const API_PROPERTY_WALLET_INTERFACE_CONSTANT: {
1
+ export declare const WALLET_PROPERTY_API_INTERFACE_CONSTANT: {
2
2
  readonly EXAMPLE: number;
3
3
  readonly MAXIMUM: number;
4
4
  readonly MINIMUM: number;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.API_PROPERTY_WALLET_INTERFACE_CONSTANT = void 0;
3
+ exports.WALLET_PROPERTY_API_INTERFACE_CONSTANT = void 0;
4
4
  const MINIMUM = 10_000_000_000;
5
5
  const MAXIMUM = 999_999_999_999;
6
6
  const EXAMPLE = 18_143_008_867;
7
- exports.API_PROPERTY_WALLET_INTERFACE_CONSTANT = {
7
+ exports.WALLET_PROPERTY_API_INTERFACE_CONSTANT = {
8
8
  EXAMPLE,
9
9
  MAXIMUM,
10
10
  MINIMUM,
@@ -1 +1 @@
1
- {"version":3,"file":"wallet.constant.js","sourceRoot":"/","sources":["constant/interface/api/property/wallet.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAW,cAAc,CAAC;AACvC,MAAM,OAAO,GAAW,eAAe,CAAC;AACxC,MAAM,OAAO,GAAW,cAAc,CAAC;AAE1B,QAAA,sCAAsC,GAI/C;IACH,OAAO;IACP,OAAO;IACP,OAAO;CACE,CAAC","sourcesContent":["const MINIMUM: number = 10_000_000_000;\nconst MAXIMUM: number = 999_999_999_999;\nconst EXAMPLE: number = 18_143_008_867;\n\nexport const API_PROPERTY_WALLET_INTERFACE_CONSTANT: {\n\treadonly EXAMPLE: number;\n\treadonly MAXIMUM: number;\n\treadonly MINIMUM: number;\n} = {\n\tEXAMPLE,\n\tMAXIMUM,\n\tMINIMUM,\n} as const;\n"]}
1
+ {"version":3,"file":"wallet.constant.js","sourceRoot":"/","sources":["constant/interface/api/property/wallet.constant.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAW,cAAc,CAAC;AACvC,MAAM,OAAO,GAAW,eAAe,CAAC;AACxC,MAAM,OAAO,GAAW,cAAc,CAAC;AAE1B,QAAA,sCAAsC,GAI/C;IACH,OAAO;IACP,OAAO;IACP,OAAO;CACE,CAAC","sourcesContent":["const MINIMUM: number = 10_000_000_000;\nconst MAXIMUM: number = 999_999_999_999;\nconst EXAMPLE: number = 18_143_008_867;\n\nexport const WALLET_PROPERTY_API_INTERFACE_CONSTANT: {\n\treadonly EXAMPLE: number;\n\treadonly MAXIMUM: number;\n\treadonly MINIMUM: number;\n} = {\n\tEXAMPLE,\n\tMAXIMUM,\n\tMINIMUM,\n} as const;\n"]}
@@ -1,10 +1,8 @@
1
- import { BaseEntity } from "typeorm";
2
- interface ApiControllerOptions<E extends BaseEntity> {
3
- entity: new () => E;
4
- dto: {
5
- request: any;
6
- response: any;
7
- };
8
- }
9
- export declare function ApiController<E extends BaseEntity>(options: ApiControllerOptions<E>): (target: any) => void;
1
+ import type { BaseApiService } from "../../class";
2
+ import type { IApiControllerProperties } from "../../interface/decorator/api/controller-properties.interface";
3
+ import type { BaseEntity } from "typeorm";
4
+ type TConstructor = new (...arguments_: Array<any>) => {
5
+ service: BaseApiService<any>;
6
+ };
7
+ export declare const ApiController: <E extends BaseEntity>(options: IApiControllerProperties<E>) => <T extends TConstructor>(target: T) => T;
10
8
  export {};
@@ -1,30 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApiController = ApiController;
4
- const common_1 = require("@nestjs/common");
5
- const swagger_1 = require("@nestjs/swagger");
6
- const method_decorator_1 = require("./method.decorator");
7
- const enum_1 = require("../../enum");
8
- const constants_1 = require("@nestjs/common/constants");
9
- function ApiController(options) {
10
- const { entity } = options;
11
- return (target) => {
12
- (0, common_1.applyDecorators)((0, swagger_1.ApiTags)(entity.name), (0, common_1.Controller)(entity.name.toLowerCase()))(target);
13
- target.prototype.get = function (parameters, body) {
14
- return this.service.get(parameters[entity.name.toLowerCase()], body);
15
- };
16
- (0, common_1.applyDecorators)((0, method_decorator_1.ApiMethod)({
17
- action: enum_1.EApiAction.FETCH,
18
- entity: options.entity,
19
- httpCode: common_1.HttpStatus.OK,
20
- method: common_1.RequestMethod.GET,
21
- path: `:bank`,
22
- responses: { internalServerError: true, notFound: true, unauthorized: true },
23
- responseType: options.dto.response
24
- }))(target.prototype, 'get', Object.getOwnPropertyDescriptor(target.prototype, 'get'));
25
- (0, common_1.Param)()(target.prototype, 'get', 0);
26
- Reflect.defineMetadata(constants_1.PARAMTYPES_METADATA, [options.dto.request], target.prototype, 'get');
27
- Reflect.defineMetadata(constants_1.PATH_METADATA, ":bank", target.prototype, 'get');
3
+ exports.ApiController = void 0;
4
+ const factory_1 = require("../../factory");
5
+ const ApiController = (options) => (target) => {
6
+ const factory = new factory_1.ApiControllerFactory(target, options);
7
+ factory.init();
8
+ const ValidatedController = class extends target {
9
+ constructor(...properties) {
10
+ super(...properties);
11
+ }
28
12
  };
29
- }
13
+ Object.defineProperty(ValidatedController, "name", { value: target.name });
14
+ return ValidatedController;
15
+ };
16
+ exports.ApiController = ApiController;
30
17
  //# sourceMappingURL=controller.decorator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controller.decorator.js","sourceRoot":"/","sources":["decorator/api/controller.decorator.ts"],"names":[],"mappings":";;AAeA,sCAiCC;AAhDD,2CAA6F;AAE7F,6CAAwC;AACxC,yDAA6C;AAC7C,qCAAsC;AACtC,wDAA4E;AAU5E,SAAgB,aAAa,CAAuB,OAAgC;IAChF,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC3B,OAAO,CAAC,MAAW,EAAE,EAAE;QACnB,IAAA,wBAAe,EACX,IAAA,iBAAO,EAAC,MAAM,CAAC,IAAI,CAAC,EACpB,IAAA,mBAAU,EAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CACxC,CAAC,MAAM,CAAC,CAAC;QAEV,MAAM,CAAC,SAAS,CAAC,GAAG,GAAG,UACnB,UAAsC,EACtC,IAAgC;YAEhC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QACzE,CAAC,CAAC;QAEF,IAAA,wBAAe,EACX,IAAA,4BAAS,EAAC;YACN,MAAM,EAAE,iBAAU,CAAC,KAAK;YACxB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,QAAQ,EAAE,mBAAU,CAAC,EAAE;YACvB,MAAM,EAAE,sBAAa,CAAC,GAAG;YACzB,IAAI,EAAE,OAAO;YACb,SAAS,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE;YAC5E,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;SACrC,CAAC,CACL,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,wBAAwB,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;QAIrF,IAAA,cAAK,GAAE,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACpC,OAAO,CAAC,cAAc,CAAC,+BAAmB,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC5F,OAAO,CAAC,cAAc,CAAC,yBAAa,EAAE,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC5E,CAAC,CAAC;AACN,CAAC","sourcesContent":["import {applyDecorators, Controller, HttpStatus, Param, RequestMethod} from \"@nestjs/common\";\nimport {BaseEntity} from \"typeorm\";\nimport {ApiTags} from \"@nestjs/swagger\";\nimport {ApiMethod} from \"./method.decorator\";\nimport {EApiAction} from \"../../enum\";\nimport {PARAMTYPES_METADATA, PATH_METADATA} from \"@nestjs/common/constants\";\n\ninterface ApiControllerOptions<E extends BaseEntity> {\n entity: new () => E;\n dto: {\n request: any;\n response: any;\n };\n}\n\nexport function ApiController<E extends BaseEntity>(options: ApiControllerOptions<E>) {\n const { entity } = options;\n return (target: any) => {\n applyDecorators(\n ApiTags(entity.name),\n Controller(entity.name.toLowerCase()),\n )(target);\n\n target.prototype.get = function (\n parameters: typeof options.dto.request,\n body: typeof options.dto.request\n ): Promise<E> {\n return this.service.get(parameters[entity.name.toLowerCase()], body);\n };\n\n applyDecorators(\n ApiMethod({\n action: EApiAction.FETCH,\n entity: options.entity,\n httpCode: HttpStatus.OK,\n method: RequestMethod.GET,\n path: `:bank`,\n responses: { internalServerError: true, notFound: true, unauthorized: true },\n responseType: options.dto.response\n }),\n )(target.prototype, 'get', Object.getOwnPropertyDescriptor(target.prototype, 'get'));\n\n\n\n Param()(target.prototype, 'get', 0);\n Reflect.defineMetadata(PARAMTYPES_METADATA, [options.dto.request], target.prototype, 'get');\n Reflect.defineMetadata(PATH_METADATA, \":bank\", target.prototype, 'get');\n };\n}\n"]}
1
+ {"version":3,"file":"controller.decorator.js","sourceRoot":"/","sources":["decorator/api/controller.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAqD;AAS9C,MAAM,aAAa,GACzB,CAAuB,OAAoC,EAAE,EAAE,CAC/D,CAAyB,MAAS,EAAK,EAAE;IACxC,MAAM,OAAO,GAA4B,IAAI,8BAAoB,CAAI,MAAM,EAAE,OAAO,CAAC,CAAC;IACtF,OAAO,CAAC,IAAI,EAAE,CAAC;IAEf,MAAM,mBAAmB,GAA2D,KAAM,SAAQ,MAAM;QACvG,YAAY,GAAG,UAAe;YAE7B,KAAK,CAAC,GAAG,UAAU,CAAC,CAAC;QACtB,CAAC;KACD,CAAC;IACF,MAAM,CAAC,cAAc,CAAC,mBAAmB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAE3E,OAAO,mBAAwB,CAAC;AACjC,CAAC,CAAC;AAfU,QAAA,aAAa,iBAevB","sourcesContent":["import { ApiControllerFactory } from \"../../factory\";\n\nimport type { BaseApiService } from \"../../class\";\nimport type { IApiControllerProperties } from \"../../interface/decorator/api/controller-properties.interface\";\n\nimport type { BaseEntity } from \"typeorm\";\n\ntype TConstructor = new (...arguments_: Array<any>) => { service: BaseApiService<any> };\n\nexport const ApiController =\n\t<E extends BaseEntity>(options: IApiControllerProperties<E>) =>\n\t<T extends TConstructor>(target: T): T => {\n\t\tconst factory: ApiControllerFactory<E> = new ApiControllerFactory<E>(target, options);\n\t\tfactory.init();\n\n\t\tconst ValidatedController: { new (...arguments_: Array<any>): {}; prototype: {} } = class extends target {\n\t\t\tconstructor(...properties: any) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t\t\tsuper(...properties);\n\t\t\t}\n\t\t};\n\t\tObject.defineProperty(ValidatedController, \"name\", { value: target.name });\n\n\t\treturn ValidatedController as T;\n\t};\n"]}
@@ -0,0 +1,8 @@
1
+ import type { IApiBaseEntity } from "../../../../interface";
2
+ import type { TApiFunctionCreateProperties } from "../../../../type";
3
+ import type { Repository } from "typeorm";
4
+ export interface IApiFunctionCreateExecutorProperties<E extends IApiBaseEntity> {
5
+ entity: IApiBaseEntity;
6
+ properties: TApiFunctionCreateProperties<E>;
7
+ repository: Repository<E>;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=executor-properties.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor-properties.type.js","sourceRoot":"/","sources":["decorator/api/function/create/executor-properties.type.ts"],"names":[],"mappings":"","sourcesContent":["import type { IApiBaseEntity } from \"../../../../interface\";\n\nimport type { TApiFunctionCreateProperties } from \"../../../../type\";\nimport type { Repository } from \"typeorm\";\n\nexport interface IApiFunctionCreateExecutorProperties<E extends IApiBaseEntity> {\n\tentity: IApiBaseEntity;\n\tproperties: TApiFunctionCreateProperties<E>;\n\trepository: Repository<E>;\n}\n"]}
@@ -0,0 +1 @@
1
+ export * from "./executor-properties.type";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./executor-properties.type"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["decorator/api/function/create/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C","sourcesContent":["export * from \"./executor-properties.type\";\n"]}
@@ -1,4 +1,2 @@
1
- import { BaseEntity } from "typeorm";
2
- export declare function ApiFunctionCreate<E extends BaseEntity>(options: {
3
- model: new () => E;
4
- }): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
1
+ import type { IApiFunctionCreateProperties } from "../../../interface/decorator/api/function/create-properties.interface";
2
+ export declare function ApiFunctionCreate(properties: IApiFunctionCreateProperties): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;