@elsikora/nestjs-crud-automator 1.6.4-dev.1 → 1.6.5-dev.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 (538) hide show
  1. package/README.md +381 -266
  2. package/dist/cjs/class/metadata-storage.class.js +2 -3
  3. package/dist/cjs/class/metadata-storage.class.js.map +1 -1
  4. package/dist/cjs/decorator/api/method.decorator.js +56 -56
  5. package/dist/cjs/decorator/api/method.decorator.js.map +1 -1
  6. package/dist/cjs/decorator/api/property/date.decorator.js +2 -2
  7. package/dist/cjs/decorator/api/property/date.decorator.js.map +1 -1
  8. package/dist/cjs/decorator/api/property/string.decorator.js +2 -2
  9. package/dist/cjs/decorator/api/property/string.decorator.js.map +1 -1
  10. package/dist/cjs/factory/api/controller.factory.js +3 -0
  11. package/dist/cjs/factory/api/controller.factory.js.map +1 -1
  12. package/dist/cjs/package.json +8 -0
  13. package/dist/cjs/utility/api/controller/get-list/transform-filter.utility.js +3 -1
  14. package/dist/cjs/utility/api/controller/get-list/transform-filter.utility.js.map +1 -1
  15. package/dist/cjs/utility/api/controller/write-dto-swagger.utility.js +1 -1
  16. package/dist/cjs/utility/api/controller/write-dto-swagger.utility.js.map +1 -1
  17. package/dist/cjs/utility/api/controller/write-method.utility.js +6 -1
  18. package/dist/cjs/utility/api/controller/write-method.utility.js.map +1 -1
  19. package/dist/cjs/utility/camel-case-string.utility.js +1 -1
  20. package/dist/cjs/utility/camel-case-string.utility.js.map +1 -1
  21. package/dist/cjs/utility/dto/generate-exception.utility.js +5 -5
  22. package/dist/cjs/utility/dto/generate-exception.utility.js.map +1 -1
  23. package/dist/cjs/utility/dto/generate-get-list-response.utility.js +5 -0
  24. package/dist/cjs/utility/dto/generate-get-list-response.utility.js.map +1 -1
  25. package/dist/cjs/utility/dto/generate-relation-response.utility.js +1 -0
  26. package/dist/cjs/utility/dto/generate-relation-response.utility.js.map +1 -1
  27. package/dist/cjs/utility/dto/get-get-list-query-base-class.utility.js +4 -0
  28. package/dist/cjs/utility/dto/get-get-list-query-base-class.utility.js.map +1 -1
  29. package/dist/cjs/validator/has-paired-custom-suffixes-fields.validator.js.map +1 -1
  30. package/dist/esm/class/api/index.d.ts +1 -0
  31. package/dist/esm/class/api/service-base.class.d.ts +11 -0
  32. package/dist/esm/class/index.d.ts +3 -0
  33. package/dist/esm/class/metadata-storage.class.d.ts +12 -0
  34. package/dist/esm/class/utility/dto/index.d.ts +2 -0
  35. package/dist/esm/class/utility/dto/property/factory/boolean.class.d.ts +6 -0
  36. package/dist/esm/class/utility/dto/property/factory/date.class.d.ts +6 -0
  37. package/dist/esm/class/utility/dto/property/factory/enum.class.d.ts +6 -0
  38. package/dist/esm/class/utility/dto/property/factory/index.d.ts +6 -0
  39. package/dist/esm/class/utility/dto/property/factory/number.class.d.ts +7 -0
  40. package/dist/esm/class/utility/dto/property/factory/object.class.d.ts +6 -0
  41. package/dist/esm/class/utility/dto/property/factory/relation.class.d.ts +7 -0
  42. package/dist/esm/class/utility/dto/property/factory/string.class.d.ts +6 -0
  43. package/dist/esm/class/utility/dto/property/factory/uuid.class.d.ts +6 -0
  44. package/dist/esm/class/utility/dto/property/index.d.ts +1 -0
  45. package/dist/esm/class/utility/dto/strategy/body.class.d.ts +6 -0
  46. package/dist/esm/class/utility/dto/strategy/index.d.ts +4 -0
  47. package/dist/esm/class/utility/dto/strategy/query.class.d.ts +6 -0
  48. package/dist/esm/class/utility/dto/strategy/request.class.d.ts +6 -0
  49. package/dist/esm/class/utility/dto/strategy/response.class.d.ts +6 -0
  50. package/dist/esm/class/utility/index.d.ts +1 -0
  51. package/dist/esm/constant/date.constant.d.ts +4 -0
  52. package/dist/esm/constant/decorator/api/controller.constant.d.ts +3 -0
  53. package/dist/esm/constant/decorator/api/function.constant.d.ts +4 -0
  54. package/dist/esm/constant/decorator/api/index.d.ts +3 -0
  55. package/dist/esm/constant/decorator/api/property-describe.constant.d.ts +3 -0
  56. package/dist/esm/constant/decorator/index.d.ts +1 -0
  57. package/dist/esm/constant/dto/exception.constant.d.ts +6 -0
  58. package/dist/esm/constant/dto/index.d.ts +3 -0
  59. package/dist/esm/constant/dto/list.constant.d.ts +7 -0
  60. package/dist/esm/constant/dto/transformer-value.constant.d.ts +7 -0
  61. package/dist/esm/constant/factory/dto/get-list-query.constant.d.ts +6 -0
  62. package/dist/esm/constant/factory/dto/index.d.ts +1 -0
  63. package/dist/esm/constant/factory/index.d.ts +1 -0
  64. package/dist/esm/constant/index.d.ts +6 -0
  65. package/dist/esm/constant/interface/api/filter.constant.d.ts +3 -0
  66. package/dist/esm/constant/interface/api/index.d.ts +2 -0
  67. package/dist/esm/constant/interface/api/property/index.d.ts +2 -0
  68. package/dist/esm/constant/interface/api/property/string.constant.d.ts +6 -0
  69. package/dist/esm/constant/interface/api/property/wallet.constant.d.ts +5 -0
  70. package/dist/esm/constant/interface/index.d.ts +1 -0
  71. package/dist/esm/constant/number.constant.d.ts +18 -0
  72. package/dist/esm/constant/utility/dto/constant.d.ts +6 -0
  73. package/dist/esm/constant/utility/dto/generate.constant.d.ts +4 -0
  74. package/dist/esm/decorator/api/controller.decorator.d.ts +3 -0
  75. package/dist/esm/decorator/api/function/create.decorator.d.ts +2 -0
  76. package/dist/esm/decorator/api/function/decorator.d.ts +3 -0
  77. package/dist/esm/decorator/api/function/delete.decorator.d.ts +2 -0
  78. package/dist/esm/decorator/api/function/get-list.decorator.d.ts +2 -0
  79. package/dist/esm/decorator/api/function/get-many.decorator.d.ts +2 -0
  80. package/dist/esm/decorator/api/function/get.decorator.d.ts +2 -0
  81. package/dist/esm/decorator/api/function/index.d.ts +7 -0
  82. package/dist/esm/decorator/api/function/update.decorator.d.ts +2 -0
  83. package/dist/esm/decorator/api/index.d.ts +5 -0
  84. package/dist/esm/decorator/api/method.decorator.d.ts +2 -0
  85. package/dist/esm/decorator/api/property/boolean.decorator.d.ts +2 -0
  86. package/dist/esm/decorator/api/property/date.decorator.d.ts +2 -0
  87. package/dist/esm/decorator/api/property/describe.decorator.d.ts +2 -0
  88. package/dist/esm/decorator/api/property/enum.decorator.d.ts +2 -0
  89. package/dist/esm/decorator/api/property/index.d.ts +7 -0
  90. package/dist/esm/decorator/api/property/number.decorator.d.ts +2 -0
  91. package/dist/esm/decorator/api/property/object.decorator.d.ts +2 -0
  92. package/dist/esm/decorator/api/property/string.decorator.d.ts +2 -0
  93. package/dist/esm/decorator/api/property/uuid.decorator.d.ts +2 -0
  94. package/dist/esm/decorator/api/service.decorator.d.ts +3 -0
  95. package/dist/esm/decorator/index.d.ts +1 -0
  96. package/dist/esm/enum/decorator/api/action.enum.d.ts +30 -0
  97. package/dist/esm/enum/decorator/api/authentication-type.enum.d.ts +6 -0
  98. package/dist/esm/enum/decorator/api/controller/index.d.ts +2 -0
  99. package/dist/esm/enum/decorator/api/controller/load-relations-strategy.enum.d.ts +4 -0
  100. package/dist/esm/enum/decorator/api/controller/request-transformer-type.enum.d.ts +4 -0
  101. package/dist/esm/enum/decorator/api/dto-type.enum.d.ts +6 -0
  102. package/dist/esm/enum/decorator/api/function/index.d.ts +1 -0
  103. package/dist/esm/enum/decorator/api/function/type.enum.d.ts +8 -0
  104. package/dist/esm/enum/decorator/api/index.d.ts +7 -0
  105. package/dist/esm/enum/decorator/api/property/data-type.enum.d.ts +18 -0
  106. package/dist/esm/enum/decorator/api/property/date/identifier.enum.d.ts +14 -0
  107. package/dist/esm/enum/decorator/api/property/date/index.d.ts +2 -0
  108. package/dist/esm/enum/decorator/api/property/date/type.enum.d.ts +5 -0
  109. package/dist/esm/enum/decorator/api/property/desribe-type.enum.d.ts +10 -0
  110. package/dist/esm/enum/decorator/api/property/index.d.ts +5 -0
  111. package/dist/esm/enum/decorator/api/property/number-type.enum.d.ts +4 -0
  112. package/dist/esm/enum/decorator/api/property/string-type.enum.d.ts +11 -0
  113. package/dist/esm/enum/decorator/api/route-type.enum.d.ts +8 -0
  114. package/dist/esm/enum/decorator/index.d.ts +1 -0
  115. package/dist/esm/enum/exception.enum.d.ts +30 -0
  116. package/dist/esm/enum/filter-operation.enum.d.ts +110 -0
  117. package/dist/esm/enum/filter-order-direction.enum.d.ts +4 -0
  118. package/dist/esm/enum/index.d.ts +4 -0
  119. package/dist/esm/enum/utility/error-string-action.enum.d.ts +102 -0
  120. package/dist/esm/enum/utility/index.d.ts +1 -0
  121. package/dist/esm/external/tslib/tslib.es6.js +35 -0
  122. package/dist/esm/external/tslib/tslib.es6.js.map +1 -0
  123. package/dist/esm/factory/api/controller.factory.d.ts +18 -0
  124. package/dist/esm/factory/api/index.d.ts +1 -0
  125. package/dist/esm/factory/index.d.ts +1 -0
  126. package/dist/esm/index.d.ts +10 -0
  127. package/dist/esm/interceptor/correlation-id-response-body.interceptor.d.ts +5 -0
  128. package/dist/esm/interceptor/index.d.ts +1 -0
  129. package/dist/esm/interface/api-authentication-request.interface.d.ts +4 -0
  130. package/dist/esm/interface/api-base-entity.interface.d.ts +4 -0
  131. package/dist/esm/interface/api-dto-validator.interface.d.ts +4 -0
  132. package/dist/esm/interface/api-request-validator.interface.d.ts +7 -0
  133. package/dist/esm/interface/class/dto/index.d.ts +1 -0
  134. package/dist/esm/interface/class/dto/strategy.interface.d.ts +5 -0
  135. package/dist/esm/interface/class/index.d.ts +2 -0
  136. package/dist/esm/interface/class/metadata-entry.interface.d.ts +2 -0
  137. package/dist/esm/interface/decorator/api/controller/base.interface.d.ts +4 -0
  138. package/dist/esm/interface/decorator/api/controller/index.d.ts +3 -0
  139. package/dist/esm/interface/decorator/api/controller/properties/index.d.ts +1 -0
  140. package/dist/esm/interface/decorator/api/controller/properties/route/authentication.interface.d.ts +9 -0
  141. package/dist/esm/interface/decorator/api/controller/properties/route/auto-dto-config.interface.d.ts +4 -0
  142. package/dist/esm/interface/decorator/api/controller/properties/route/base-request.interface.d.ts +8 -0
  143. package/dist/esm/interface/decorator/api/controller/properties/route/base-response.interface.d.ts +7 -0
  144. package/dist/esm/interface/decorator/api/controller/properties/route/base.interface.d.ts +11 -0
  145. package/dist/esm/interface/decorator/api/controller/properties/route/index.d.ts +7 -0
  146. package/dist/esm/interface/decorator/api/controller/properties/route/with-auto-dto.interface.d.ts +7 -0
  147. package/dist/esm/interface/decorator/api/controller/properties/route/with-dto.interface.d.ts +7 -0
  148. package/dist/esm/interface/decorator/api/controller/properties.interface.d.ts +11 -0
  149. package/dist/esm/interface/decorator/api/function/create-executor-properties.interface.d.ts +8 -0
  150. package/dist/esm/interface/decorator/api/function/delete-executor-properties.interface.d.ts +9 -0
  151. package/dist/esm/interface/decorator/api/function/get-executor-properties.interface.d.ts +8 -0
  152. package/dist/esm/interface/decorator/api/function/get-list-executor-properties.interface.d.ts +8 -0
  153. package/dist/esm/interface/decorator/api/function/get-many-executor-properties.interface.d.ts +8 -0
  154. package/dist/esm/interface/decorator/api/function/index.d.ts +7 -0
  155. package/dist/esm/interface/decorator/api/function/properties.interface.d.ts +4 -0
  156. package/dist/esm/interface/decorator/api/function/update-executor-properties.interface.d.ts +10 -0
  157. package/dist/esm/interface/decorator/api/get-list-response-result.interface.d.ts +7 -0
  158. package/dist/esm/interface/decorator/api/index.d.ts +5 -0
  159. package/dist/esm/interface/decorator/api/method/index.d.ts +2 -0
  160. package/dist/esm/interface/decorator/api/method/properties.interface.d.ts +17 -0
  161. package/dist/esm/interface/decorator/api/method/throttler-properties.interface.d.ts +4 -0
  162. package/dist/esm/interface/decorator/api/response-type.interface.d.ts +9 -0
  163. package/dist/esm/interface/decorator/index.d.ts +1 -0
  164. package/dist/esm/interface/dto-generate-factory.interface.d.ts +6 -0
  165. package/dist/esm/interface/entity/column.interface.d.ts +7 -0
  166. package/dist/esm/interface/entity/index.d.ts +2 -0
  167. package/dist/esm/interface/entity/interface.d.ts +7 -0
  168. package/dist/esm/interface/index.d.ts +8 -0
  169. package/dist/esm/interface/utility/api/controller/index.d.ts +1 -0
  170. package/dist/esm/interface/utility/api/controller/primary-column.interface.d.ts +4 -0
  171. package/dist/esm/interface/utility/api/index.d.ts +1 -0
  172. package/dist/esm/interface/utility/error-string-properties.interface.d.ts +5 -0
  173. package/dist/esm/interface/utility/get-entity-columns-properties.interface.d.ts +6 -0
  174. package/dist/esm/interface/utility/index.d.ts +2 -0
  175. package/dist/esm/package.json +8 -0
  176. package/dist/esm/src/class/api/service-base.class.js +23 -0
  177. package/dist/esm/src/class/api/service-base.class.js.map +1 -0
  178. package/dist/esm/src/class/metadata-storage.class.js +47 -0
  179. package/dist/esm/src/class/metadata-storage.class.js.map +1 -0
  180. package/dist/esm/src/class/utility/dto/property/factory/boolean.class.js +15 -0
  181. package/dist/esm/src/class/utility/dto/property/factory/boolean.class.js.map +1 -0
  182. package/dist/esm/src/class/utility/dto/property/factory/date.class.js +15 -0
  183. package/dist/esm/src/class/utility/dto/property/factory/date.class.js.map +1 -0
  184. package/dist/esm/src/class/utility/dto/property/factory/enum.class.js +15 -0
  185. package/dist/esm/src/class/utility/dto/property/factory/enum.class.js.map +1 -0
  186. package/dist/esm/src/class/utility/dto/property/factory/number.class.js +32 -0
  187. package/dist/esm/src/class/utility/dto/property/factory/number.class.js.map +1 -0
  188. package/dist/esm/src/class/utility/dto/property/factory/object.class.js +16 -0
  189. package/dist/esm/src/class/utility/dto/property/factory/object.class.js.map +1 -0
  190. package/dist/esm/src/class/utility/dto/property/factory/relation.class.js +29 -0
  191. package/dist/esm/src/class/utility/dto/property/factory/relation.class.js.map +1 -0
  192. package/dist/esm/src/class/utility/dto/property/factory/string.class.js +15 -0
  193. package/dist/esm/src/class/utility/dto/property/factory/string.class.js.map +1 -0
  194. package/dist/esm/src/class/utility/dto/property/factory/uuid.class.js +11 -0
  195. package/dist/esm/src/class/utility/dto/property/factory/uuid.class.js.map +1 -0
  196. package/dist/esm/src/class/utility/dto/strategy/body.class.js +47 -0
  197. package/dist/esm/src/class/utility/dto/strategy/body.class.js.map +1 -0
  198. package/dist/esm/src/class/utility/dto/strategy/query.class.js +44 -0
  199. package/dist/esm/src/class/utility/dto/strategy/query.class.js.map +1 -0
  200. package/dist/esm/src/class/utility/dto/strategy/request.class.js +47 -0
  201. package/dist/esm/src/class/utility/dto/strategy/request.class.js.map +1 -0
  202. package/dist/esm/src/class/utility/dto/strategy/response.class.js +47 -0
  203. package/dist/esm/src/class/utility/dto/strategy/response.class.js.map +1 -0
  204. package/dist/esm/src/constant/date.constant.js +9 -0
  205. package/dist/esm/src/constant/date.constant.js.map +1 -0
  206. package/dist/esm/src/constant/decorator/api/controller.constant.js +7 -0
  207. package/dist/esm/src/constant/decorator/api/controller.constant.js.map +1 -0
  208. package/dist/esm/src/constant/decorator/api/function.constant.js +24 -0
  209. package/dist/esm/src/constant/decorator/api/function.constant.js.map +1 -0
  210. package/dist/esm/src/constant/decorator/api/property-describe.constant.js +7 -0
  211. package/dist/esm/src/constant/decorator/api/property-describe.constant.js.map +1 -0
  212. package/dist/esm/src/constant/dto/exception.constant.js +13 -0
  213. package/dist/esm/src/constant/dto/exception.constant.js.map +1 -0
  214. package/dist/esm/src/constant/dto/list.constant.js +13 -0
  215. package/dist/esm/src/constant/dto/list.constant.js.map +1 -0
  216. package/dist/esm/src/constant/dto/transformer-value.constant.js +15 -0
  217. package/dist/esm/src/constant/dto/transformer-value.constant.js.map +1 -0
  218. package/dist/esm/src/constant/factory/dto/get-list-query.constant.js +13 -0
  219. package/dist/esm/src/constant/factory/dto/get-list-query.constant.js.map +1 -0
  220. package/dist/esm/src/constant/interface/api/filter.constant.js +7 -0
  221. package/dist/esm/src/constant/interface/api/filter.constant.js.map +1 -0
  222. package/dist/esm/src/constant/interface/api/property/string.constant.js +11 -0
  223. package/dist/esm/src/constant/interface/api/property/string.constant.js.map +1 -0
  224. package/dist/esm/src/constant/interface/api/property/wallet.constant.js +11 -0
  225. package/dist/esm/src/constant/interface/api/property/wallet.constant.js.map +1 -0
  226. package/dist/esm/src/constant/number.constant.js +37 -0
  227. package/dist/esm/src/constant/number.constant.js.map +1 -0
  228. package/dist/esm/src/constant/utility/dto/constant.js +53 -0
  229. package/dist/esm/src/constant/utility/dto/constant.js.map +1 -0
  230. package/dist/esm/src/constant/utility/dto/generate.constant.js +9 -0
  231. package/dist/esm/src/constant/utility/dto/generate.constant.js.map +1 -0
  232. package/dist/esm/src/decorator/api/controller.decorator.js +16 -0
  233. package/dist/esm/src/decorator/api/controller.decorator.js.map +1 -0
  234. package/dist/esm/src/decorator/api/function/create.decorator.js +51 -0
  235. package/dist/esm/src/decorator/api/function/create.decorator.js.map +1 -0
  236. package/dist/esm/src/decorator/api/function/decorator.js +69 -0
  237. package/dist/esm/src/decorator/api/function/decorator.js.map +1 -0
  238. package/dist/esm/src/decorator/api/function/delete.decorator.js +69 -0
  239. package/dist/esm/src/decorator/api/function/delete.decorator.js.map +1 -0
  240. package/dist/esm/src/decorator/api/function/get-list.decorator.js +58 -0
  241. package/dist/esm/src/decorator/api/function/get-list.decorator.js.map +1 -0
  242. package/dist/esm/src/decorator/api/function/get-many.decorator.js +55 -0
  243. package/dist/esm/src/decorator/api/function/get-many.decorator.js.map +1 -0
  244. package/dist/esm/src/decorator/api/function/get.decorator.js +55 -0
  245. package/dist/esm/src/decorator/api/function/get.decorator.js.map +1 -0
  246. package/dist/esm/src/decorator/api/function/update.decorator.js +80 -0
  247. package/dist/esm/src/decorator/api/function/update.decorator.js.map +1 -0
  248. package/dist/esm/src/decorator/api/method.decorator.js +349 -0
  249. package/dist/esm/src/decorator/api/method.decorator.js.map +1 -0
  250. package/dist/esm/src/decorator/api/property/boolean.decorator.js +177 -0
  251. package/dist/esm/src/decorator/api/property/boolean.decorator.js.map +1 -0
  252. package/dist/esm/src/decorator/api/property/date.decorator.js +204 -0
  253. package/dist/esm/src/decorator/api/property/date.decorator.js.map +1 -0
  254. package/dist/esm/src/decorator/api/property/describe.decorator.js +29 -0
  255. package/dist/esm/src/decorator/api/property/describe.decorator.js.map +1 -0
  256. package/dist/esm/src/decorator/api/property/enum.decorator.js +103 -0
  257. package/dist/esm/src/decorator/api/property/enum.decorator.js.map +1 -0
  258. package/dist/esm/src/decorator/api/property/number.decorator.js +213 -0
  259. package/dist/esm/src/decorator/api/property/number.decorator.js.map +1 -0
  260. package/dist/esm/src/decorator/api/property/object.decorator.js +102 -0
  261. package/dist/esm/src/decorator/api/property/object.decorator.js.map +1 -0
  262. package/dist/esm/src/decorator/api/property/string.decorator.js +232 -0
  263. package/dist/esm/src/decorator/api/property/string.decorator.js.map +1 -0
  264. package/dist/esm/src/decorator/api/property/uuid.decorator.js +118 -0
  265. package/dist/esm/src/decorator/api/property/uuid.decorator.js.map +1 -0
  266. package/dist/esm/src/decorator/api/service.decorator.js +161 -0
  267. package/dist/esm/src/decorator/api/service.decorator.js.map +1 -0
  268. package/dist/esm/src/enum/decorator/api/action.enum.js +34 -0
  269. package/dist/esm/src/enum/decorator/api/action.enum.js.map +1 -0
  270. package/dist/esm/src/enum/decorator/api/authentication-type.enum.js +10 -0
  271. package/dist/esm/src/enum/decorator/api/authentication-type.enum.js.map +1 -0
  272. package/dist/esm/src/enum/decorator/api/controller/load-relations-strategy.enum.js +8 -0
  273. package/dist/esm/src/enum/decorator/api/controller/load-relations-strategy.enum.js.map +1 -0
  274. package/dist/esm/src/enum/decorator/api/controller/request-transformer-type.enum.js +8 -0
  275. package/dist/esm/src/enum/decorator/api/controller/request-transformer-type.enum.js.map +1 -0
  276. package/dist/esm/src/enum/decorator/api/dto-type.enum.js +10 -0
  277. package/dist/esm/src/enum/decorator/api/dto-type.enum.js.map +1 -0
  278. package/dist/esm/src/enum/decorator/api/function/type.enum.js +12 -0
  279. package/dist/esm/src/enum/decorator/api/function/type.enum.js.map +1 -0
  280. package/dist/esm/src/enum/decorator/api/property/data-type.enum.js +22 -0
  281. package/dist/esm/src/enum/decorator/api/property/data-type.enum.js.map +1 -0
  282. package/dist/esm/src/enum/decorator/api/property/date/identifier.enum.js +18 -0
  283. package/dist/esm/src/enum/decorator/api/property/date/identifier.enum.js.map +1 -0
  284. package/dist/esm/src/enum/decorator/api/property/date/type.enum.js +11 -0
  285. package/dist/esm/src/enum/decorator/api/property/date/type.enum.js.map +1 -0
  286. package/dist/esm/src/enum/decorator/api/property/desribe-type.enum.js +14 -0
  287. package/dist/esm/src/enum/decorator/api/property/desribe-type.enum.js.map +1 -0
  288. package/dist/esm/src/enum/decorator/api/property/number-type.enum.js +10 -0
  289. package/dist/esm/src/enum/decorator/api/property/number-type.enum.js.map +1 -0
  290. package/dist/esm/src/enum/decorator/api/property/string-type.enum.js +17 -0
  291. package/dist/esm/src/enum/decorator/api/property/string-type.enum.js.map +1 -0
  292. package/dist/esm/src/enum/decorator/api/route-type.enum.js +12 -0
  293. package/dist/esm/src/enum/decorator/api/route-type.enum.js.map +1 -0
  294. package/dist/esm/src/enum/exception.enum.js +34 -0
  295. package/dist/esm/src/enum/exception.enum.js.map +1 -0
  296. package/dist/esm/src/enum/filter-operation.enum.js +123 -0
  297. package/dist/esm/src/enum/filter-operation.enum.js.map +1 -0
  298. package/dist/esm/src/enum/filter-order-direction.enum.js +8 -0
  299. package/dist/esm/src/enum/filter-order-direction.enum.js.map +1 -0
  300. package/dist/esm/src/enum/utility/error-string-action.enum.js +106 -0
  301. package/dist/esm/src/enum/utility/error-string-action.enum.js.map +1 -0
  302. package/dist/esm/src/factory/api/controller.factory.js +216 -0
  303. package/dist/esm/src/factory/api/controller.factory.js.map +1 -0
  304. package/dist/esm/src/index.js +82 -0
  305. package/dist/esm/src/index.js.map +1 -0
  306. package/dist/esm/src/interceptor/correlation-id-response-body.interceptor.js +76 -0
  307. package/dist/esm/src/interceptor/correlation-id-response-body.interceptor.js.map +1 -0
  308. package/dist/esm/src/utility/api/controller/apply-decorators.utility.js +81 -0
  309. package/dist/esm/src/utility/api/controller/apply-decorators.utility.js.map +1 -0
  310. package/dist/esm/src/utility/api/controller/apply-metadata.utility.js +76 -0
  311. package/dist/esm/src/utility/api/controller/apply-metadata.utility.js.map +1 -0
  312. package/dist/esm/src/utility/api/controller/get-list/transform-filter.utility.js +48 -0
  313. package/dist/esm/src/utility/api/controller/get-list/transform-filter.utility.js.map +1 -0
  314. package/dist/esm/src/utility/api/controller/get-list/transform-operation.utility.js +80 -0
  315. package/dist/esm/src/utility/api/controller/get-list/transform-operation.utility.js.map +1 -0
  316. package/dist/esm/src/utility/api/controller/get-method-name.utility.js +9 -0
  317. package/dist/esm/src/utility/api/controller/get-method-name.utility.js.map +1 -0
  318. package/dist/esm/src/utility/api/controller/get-primary-column.utility.js +13 -0
  319. package/dist/esm/src/utility/api/controller/get-primary-column.utility.js.map +1 -0
  320. package/dist/esm/src/utility/api/controller/handle-request-relations.utility.js +70 -0
  321. package/dist/esm/src/utility/api/controller/handle-request-relations.utility.js.map +1 -0
  322. package/dist/esm/src/utility/api/controller/transform-data.utility.js +147 -0
  323. package/dist/esm/src/utility/api/controller/transform-data.utility.js.map +1 -0
  324. package/dist/esm/src/utility/api/controller/validate-request.utility.js +16 -0
  325. package/dist/esm/src/utility/api/controller/validate-request.utility.js.map +1 -0
  326. package/dist/esm/src/utility/api/controller/write-dto-swagger.utility.js +77 -0
  327. package/dist/esm/src/utility/api/controller/write-dto-swagger.utility.js.map +1 -0
  328. package/dist/esm/src/utility/api/controller/write-method.utility.js +18 -0
  329. package/dist/esm/src/utility/api/controller/write-method.utility.js.map +1 -0
  330. package/dist/esm/src/utility/api/filter-order-by-from-entity.utility.js +46 -0
  331. package/dist/esm/src/utility/api/filter-order-by-from-entity.utility.js.map +1 -0
  332. package/dist/esm/src/utility/camel-case-string.utility.js +29 -0
  333. package/dist/esm/src/utility/camel-case-string.utility.js.map +1 -0
  334. package/dist/esm/src/utility/capitalize-string.utility.js +6 -0
  335. package/dist/esm/src/utility/capitalize-string.utility.js.map +1 -0
  336. package/dist/esm/src/utility/dto/analize.utility.js +25 -0
  337. package/dist/esm/src/utility/dto/analize.utility.js.map +1 -0
  338. package/dist/esm/src/utility/dto/build-decorator.utility.js +49 -0
  339. package/dist/esm/src/utility/dto/build-decorator.utility.js.map +1 -0
  340. package/dist/esm/src/utility/dto/generate-decorator.utility.js +13 -0
  341. package/dist/esm/src/utility/dto/generate-decorator.utility.js.map +1 -0
  342. package/dist/esm/src/utility/dto/generate-exception.utility.js +96 -0
  343. package/dist/esm/src/utility/dto/generate-exception.utility.js.map +1 -0
  344. package/dist/esm/src/utility/dto/generate-filter-decorator.utility.js +50 -0
  345. package/dist/esm/src/utility/dto/generate-filter-decorator.utility.js.map +1 -0
  346. package/dist/esm/src/utility/dto/generate-get-list-response.utility.js +102 -0
  347. package/dist/esm/src/utility/dto/generate-get-list-response.utility.js.map +1 -0
  348. package/dist/esm/src/utility/dto/generate-relation-response.utility.js +19 -0
  349. package/dist/esm/src/utility/dto/generate-relation-response.utility.js.map +1 -0
  350. package/dist/esm/src/utility/dto/generate.utility.js +131 -0
  351. package/dist/esm/src/utility/dto/generate.utility.js.map +1 -0
  352. package/dist/esm/src/utility/dto/get-decorator-config.utility.js +18 -0
  353. package/dist/esm/src/utility/dto/get-decorator-config.utility.js.map +1 -0
  354. package/dist/esm/src/utility/dto/get-get-list-query-base-class.utility.js +95 -0
  355. package/dist/esm/src/utility/dto/get-get-list-query-base-class.utility.js.map +1 -0
  356. package/dist/esm/src/utility/dto/handle-date-property.utility.js +33 -0
  357. package/dist/esm/src/utility/dto/handle-date-property.utility.js.map +1 -0
  358. package/dist/esm/src/utility/dto/is-property-exposed-for-guard.utility.js +13 -0
  359. package/dist/esm/src/utility/dto/is-property-exposed-for-guard.utility.js.map +1 -0
  360. package/dist/esm/src/utility/dto/is-property-should-be-marked.utility.js +44 -0
  361. package/dist/esm/src/utility/dto/is-property-should-be-marked.utility.js.map +1 -0
  362. package/dist/esm/src/utility/dto/is-should-be-generated.utility.js +39 -0
  363. package/dist/esm/src/utility/dto/is-should-be-generated.utility.js.map +1 -0
  364. package/dist/esm/src/utility/dto/validate-property-config.utility.js +4 -0
  365. package/dist/esm/src/utility/dto/validate-property-config.utility.js.map +1 -0
  366. package/dist/esm/src/utility/error-exception.utility.js +6 -0
  367. package/dist/esm/src/utility/error-exception.utility.js.map +1 -0
  368. package/dist/esm/src/utility/error-string.utility.js +6 -0
  369. package/dist/esm/src/utility/error-string.utility.js.map +1 -0
  370. package/dist/esm/src/utility/generate-entity-information.utility.js +76 -0
  371. package/dist/esm/src/utility/generate-entity-information.utility.js.map +1 -0
  372. package/dist/esm/src/utility/get-entity-columns.utility.js +20 -0
  373. package/dist/esm/src/utility/get-entity-columns.utility.js.map +1 -0
  374. package/dist/esm/src/utility/is-error-of-type.utility.js +66 -0
  375. package/dist/esm/src/utility/is-error-of-type.utility.js.map +1 -0
  376. package/dist/esm/src/validator/all-or-none-of-listed-properties.validator.js +23 -0
  377. package/dist/esm/src/validator/all-or-none-of-listed-properties.validator.js.map +1 -0
  378. package/dist/esm/src/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js +33 -0
  379. package/dist/esm/src/validator/has-at-least-one-and-only-one-of-listed-properties.validator.js.map +1 -0
  380. package/dist/esm/src/validator/has-at-least-one-of-listed-properties.validator.js +29 -0
  381. package/dist/esm/src/validator/has-at-least-one-of-listed-properties.validator.js.map +1 -0
  382. package/dist/esm/src/validator/has-at-least-one-property.validator.js +17 -0
  383. package/dist/esm/src/validator/has-at-least-one-property.validator.js.map +1 -0
  384. package/dist/esm/src/validator/has-paired-custom-suffixes-fields.validator.js +214 -0
  385. package/dist/esm/src/validator/has-paired-custom-suffixes-fields.validator.js.map +1 -0
  386. package/dist/esm/src/validator/is-regular-expression.validator.js +25 -0
  387. package/dist/esm/src/validator/is-regular-expression.validator.js.map +1 -0
  388. package/dist/esm/src/validator/only-one-of-listed-properties.validator.js +28 -0
  389. package/dist/esm/src/validator/only-one-of-listed-properties.validator.js.map +1 -0
  390. package/dist/esm/type/api-request-transformer.type.d.ts +15 -0
  391. package/dist/esm/type/class/api-exception.type.d.ts +2 -0
  392. package/dist/esm/type/class/controller/index.d.ts +1 -0
  393. package/dist/esm/type/class/controller/method.type.d.ts +5 -0
  394. package/dist/esm/type/class/index.d.ts +3 -0
  395. package/dist/esm/type/class/metadata.type.d.ts +2 -0
  396. package/dist/esm/type/decorator/api/controller/constructor.type.d.ts +4 -0
  397. package/dist/esm/type/decorator/api/controller/get-list-query.type.d.ts +8 -0
  398. package/dist/esm/type/decorator/api/controller/index.d.ts +5 -0
  399. package/dist/esm/type/decorator/api/controller/properties/index.d.ts +1 -0
  400. package/dist/esm/type/decorator/api/controller/properties/route/base-request-relations.type.d.ts +18 -0
  401. package/dist/esm/type/decorator/api/controller/properties/route/base-request-transformers.type.d.ts +10 -0
  402. package/dist/esm/type/decorator/api/controller/properties/route/base-response-transformers.type.d.ts +10 -0
  403. package/dist/esm/type/decorator/api/controller/properties/route/index.d.ts +3 -0
  404. package/dist/esm/type/decorator/api/controller/properties-route.type.d.ts +3 -0
  405. package/dist/esm/type/decorator/api/controller/transformer-config.type.d.ts +8 -0
  406. package/dist/esm/type/decorator/api/filter/allowed-types.type.d.ts +1 -0
  407. package/dist/esm/type/decorator/api/filter/extracted-allowed-types.type.d.ts +2 -0
  408. package/dist/esm/type/decorator/api/filter/field-selector.type.d.ts +3 -0
  409. package/dist/esm/type/decorator/api/filter/index.d.ts +4 -0
  410. package/dist/esm/type/decorator/api/filter/order-by.type.d.ts +4 -0
  411. package/dist/esm/type/decorator/api/function/create-properties.type.d.ts +2 -0
  412. package/dist/esm/type/decorator/api/function/delete-criteria.type.d.ts +2 -0
  413. package/dist/esm/type/decorator/api/function/get-list-properties-where.type.d.ts +7 -0
  414. package/dist/esm/type/decorator/api/function/get-list-properties.type.d.ts +2 -0
  415. package/dist/esm/type/decorator/api/function/get-many.properties.d.ts +2 -0
  416. package/dist/esm/type/decorator/api/function/get-properties.type.d.ts +2 -0
  417. package/dist/esm/type/decorator/api/function/index.d.ts +9 -0
  418. package/dist/esm/type/decorator/api/function/properties.type.d.ts +7 -0
  419. package/dist/esm/type/decorator/api/function/update-criteria.type.d.ts +2 -0
  420. package/dist/esm/type/decorator/api/function/update-properties.type.d.ts +2 -0
  421. package/dist/esm/type/decorator/api/index.d.ts +5 -0
  422. package/dist/esm/type/decorator/api/property/base/array/index.d.ts +2 -0
  423. package/dist/esm/type/decorator/api/property/base/array/optional-properties.type.d.ts +3 -0
  424. package/dist/esm/type/decorator/api/property/base/array/required-properties.type.d.ts +6 -0
  425. package/dist/esm/type/decorator/api/property/base/index.d.ts +4 -0
  426. package/dist/esm/type/decorator/api/property/base/properties.type.d.ts +9 -0
  427. package/dist/esm/type/decorator/api/property/base/request-properties.type.d.ts +4 -0
  428. package/dist/esm/type/decorator/api/property/base/response-properties.type.d.ts +4 -0
  429. package/dist/esm/type/decorator/api/property/date-properties.type.d.ts +6 -0
  430. package/dist/esm/type/decorator/api/property/describe/array/index.d.ts +2 -0
  431. package/dist/esm/type/decorator/api/property/describe/array/optional-properties.type.d.ts +3 -0
  432. package/dist/esm/type/decorator/api/property/describe/array/required-properties.type.d.ts +6 -0
  433. package/dist/esm/type/decorator/api/property/describe/base-properties.type.d.ts +5 -0
  434. package/dist/esm/type/decorator/api/property/describe/boolean-properties.type.d.ts +7 -0
  435. package/dist/esm/type/decorator/api/property/describe/date-properties.type.d.ts +8 -0
  436. package/dist/esm/type/decorator/api/property/describe/dto/body-properties.type.d.ts +5 -0
  437. package/dist/esm/type/decorator/api/property/describe/dto/guard-properties.type.d.ts +6 -0
  438. package/dist/esm/type/decorator/api/property/describe/dto/index.d.ts +5 -0
  439. package/dist/esm/type/decorator/api/property/describe/dto/properties.type.d.ts +11 -0
  440. package/dist/esm/type/decorator/api/property/describe/dto/query/get-list-properties.type.d.ts +3 -0
  441. package/dist/esm/type/decorator/api/property/describe/dto/query/index.d.ts +2 -0
  442. package/dist/esm/type/decorator/api/property/describe/dto/query/properties.type.d.ts +6 -0
  443. package/dist/esm/type/decorator/api/property/describe/dto/request-properties.type.d.ts +5 -0
  444. package/dist/esm/type/decorator/api/property/describe/dto/response-properties.type.d.ts +5 -0
  445. package/dist/esm/type/decorator/api/property/describe/enum-properties.type.d.ts +9 -0
  446. package/dist/esm/type/decorator/api/property/describe/example-properties.type.d.ts +7 -0
  447. package/dist/esm/type/decorator/api/property/describe/index.d.ts +13 -0
  448. package/dist/esm/type/decorator/api/property/describe/number-properties.type.d.ts +12 -0
  449. package/dist/esm/type/decorator/api/property/describe/object-properties.type.d.ts +12 -0
  450. package/dist/esm/type/decorator/api/property/describe/properties/base-dto-properties.type.d.ts +2 -0
  451. package/dist/esm/type/decorator/api/property/describe/properties/base-properties.type.d.ts +10 -0
  452. package/dist/esm/type/decorator/api/property/describe/properties/index.d.ts +2 -0
  453. package/dist/esm/type/decorator/api/property/describe/properties.type.d.ts +9 -0
  454. package/dist/esm/type/decorator/api/property/describe/relation-properties.type.d.ts +6 -0
  455. package/dist/esm/type/decorator/api/property/describe/string-properties.type.d.ts +12 -0
  456. package/dist/esm/type/decorator/api/property/describe/uuid-properties.type.d.ts +7 -0
  457. package/dist/esm/type/decorator/api/property/enum-properties.type.d.ts +6 -0
  458. package/dist/esm/type/decorator/api/property/index.d.ts +6 -0
  459. package/dist/esm/type/decorator/api/property/number-properties.type.d.ts +9 -0
  460. package/dist/esm/type/decorator/api/property/object-properties.type.d.ts +8 -0
  461. package/dist/esm/type/decorator/api/property/string-properties.type.d.ts +9 -0
  462. package/dist/esm/type/decorator/api/property/uuid-properties.type.d.ts +2 -0
  463. package/dist/esm/type/decorator/api/service/index.d.ts +2 -0
  464. package/dist/esm/type/decorator/api/service/keys.type.d.ts +4 -0
  465. package/dist/esm/type/decorator/api/service/properties.type.d.ts +3 -0
  466. package/dist/esm/type/decorator/index.d.ts +1 -0
  467. package/dist/esm/type/factory/api/controller/index.d.ts +4 -0
  468. package/dist/esm/type/factory/api/controller/method-map.type.d.ts +12 -0
  469. package/dist/esm/type/factory/api/controller/method-name-map.type.d.ts +5 -0
  470. package/dist/esm/type/factory/api/controller/method-name.type.d.ts +4 -0
  471. package/dist/esm/type/factory/api/controller/target-methods.type.d.ts +9 -0
  472. package/dist/esm/type/factory/api/index.d.ts +1 -0
  473. package/dist/esm/type/factory/index.d.ts +1 -0
  474. package/dist/esm/type/index.d.ts +5 -0
  475. package/dist/esm/type/utility/api/controller/index.d.ts +1 -0
  476. package/dist/esm/type/utility/api/controller/transform-data/data.type.d.ts +6 -0
  477. package/dist/esm/type/utility/api/controller/transform-data/index.d.ts +3 -0
  478. package/dist/esm/type/utility/api/controller/transform-data/is-validation-properties.type.d.ts +3 -0
  479. package/dist/esm/type/utility/api/controller/transform-data/object-to-transform.type.d.ts +9 -0
  480. package/dist/esm/type/utility/api/index.d.ts +1 -0
  481. package/dist/esm/type/utility/capitalize-string.type.d.ts +1 -0
  482. package/dist/esm/type/utility/date-keys.type.d.ts +2 -0
  483. package/dist/esm/type/utility/date-range-keys.type.d.ts +4 -0
  484. package/dist/esm/type/utility/dto/generate-allowed-combination.type.d.ts +9 -0
  485. package/dist/esm/type/utility/dto/generate-is-allowed-combination.type.d.ts +3 -0
  486. package/dist/esm/type/utility/dto/index.d.ts +2 -0
  487. package/dist/esm/type/utility/filter-keys.type.d.ts +7 -0
  488. package/dist/esm/type/utility/index.d.ts +7 -0
  489. package/dist/esm/type/utility/non-date-keys.type.d.ts +2 -0
  490. package/dist/esm/utility/api/controller/apply-decorators.utility.d.ts +4 -0
  491. package/dist/esm/utility/api/controller/apply-metadata.utility.d.ts +4 -0
  492. package/dist/esm/utility/api/controller/get-list/index.d.ts +2 -0
  493. package/dist/esm/utility/api/controller/get-list/transform-filter.utility.d.ts +3 -0
  494. package/dist/esm/utility/api/controller/get-list/transform-operation.utility.d.ts +3 -0
  495. package/dist/esm/utility/api/controller/get-method-name.utility.d.ts +2 -0
  496. package/dist/esm/utility/api/controller/get-primary-column.utility.d.ts +3 -0
  497. package/dist/esm/utility/api/controller/handle-request-relations.utility.d.ts +4 -0
  498. package/dist/esm/utility/api/controller/index.d.ts +9 -0
  499. package/dist/esm/utility/api/controller/transform-data.utility.d.ts +4 -0
  500. package/dist/esm/utility/api/controller/validate-request.utility.d.ts +3 -0
  501. package/dist/esm/utility/api/controller/write-dto-swagger.utility.d.ts +4 -0
  502. package/dist/esm/utility/api/controller/write-method.utility.d.ts +3 -0
  503. package/dist/esm/utility/api/filter-order-by-from-entity.utility.d.ts +6 -0
  504. package/dist/esm/utility/api/index.d.ts +2 -0
  505. package/dist/esm/utility/camel-case-string.utility.d.ts +1 -0
  506. package/dist/esm/utility/capitalize-string.utility.d.ts +1 -0
  507. package/dist/esm/utility/dto/analize.utility.d.ts +2 -0
  508. package/dist/esm/utility/dto/build-decorator.utility.d.ts +6 -0
  509. package/dist/esm/utility/dto/generate-decorator.utility.d.ts +4 -0
  510. package/dist/esm/utility/dto/generate-exception.utility.d.ts +2 -0
  511. package/dist/esm/utility/dto/generate-filter-decorator.utility.d.ts +3 -0
  512. package/dist/esm/utility/dto/generate-get-list-response.utility.d.ts +4 -0
  513. package/dist/esm/utility/dto/generate-relation-response.utility.d.ts +4 -0
  514. package/dist/esm/utility/dto/generate.utility.d.ts +6 -0
  515. package/dist/esm/utility/dto/get-decorator-config.utility.d.ts +3 -0
  516. package/dist/esm/utility/dto/get-get-list-query-base-class.utility.d.ts +5 -0
  517. package/dist/esm/utility/dto/handle-date-property.utility.d.ts +5 -0
  518. package/dist/esm/utility/dto/index.d.ts +12 -0
  519. package/dist/esm/utility/dto/is-property-exposed-for-guard.utility.d.ts +5 -0
  520. package/dist/esm/utility/dto/is-property-should-be-marked.utility.d.ts +5 -0
  521. package/dist/esm/utility/dto/is-should-be-generated.utility.d.ts +2 -0
  522. package/dist/esm/utility/dto/validate-property-config.utility.d.ts +2 -0
  523. package/dist/esm/utility/error-exception.utility.d.ts +1 -0
  524. package/dist/esm/utility/error-string.utility.d.ts +2 -0
  525. package/dist/esm/utility/generate-entity-information.utility.d.ts +2 -0
  526. package/dist/esm/utility/get-entity-columns.utility.d.ts +2 -0
  527. package/dist/esm/utility/index.d.ts +9 -0
  528. package/dist/esm/utility/is-error-of-type.utility.d.ts +2 -0
  529. package/dist/esm/validator/all-or-none-of-listed-properties.validator.d.ts +5 -0
  530. package/dist/esm/validator/has-at-least-one-and-only-one-of-listed-properties.validator.d.ts +5 -0
  531. package/dist/esm/validator/has-at-least-one-of-listed-properties.validator.d.ts +5 -0
  532. package/dist/esm/validator/has-at-least-one-property.validator.d.ts +5 -0
  533. package/dist/esm/validator/has-paired-custom-suffixes-fields.validator.d.ts +7 -0
  534. package/dist/esm/validator/index.d.ts +6 -0
  535. package/dist/esm/validator/is-regular-expression.validator.d.ts +4 -0
  536. package/dist/esm/validator/only-one-of-listed-properties.validator.d.ts +5 -0
  537. package/package.json +22 -14
  538. package/dist/package.json +0 -97
@@ -0,0 +1,214 @@
1
+ import { __decorate } from '../../external/tslib/tslib.es6.js';
2
+ import { ValidatorConstraint } from 'class-validator';
3
+ import { EFilterOperation } from '../enum/filter-operation.enum.js';
4
+
5
+ var EArgumentType;
6
+ (function (EArgumentType) {
7
+ EArgumentType["ARRAY"] = "array";
8
+ EArgumentType["NULL"] = "null";
9
+ EArgumentType["SINGLE"] = "single";
10
+ })(EArgumentType || (EArgumentType = {}));
11
+ const DEFAULT_OPERATION_CONFIGS = {
12
+ [EFilterOperation.BETWEEN]: {
13
+ argumentType: EArgumentType.ARRAY,
14
+ exactLength: 2,
15
+ },
16
+ [EFilterOperation.CONT]: {
17
+ argumentType: EArgumentType.SINGLE,
18
+ },
19
+ [EFilterOperation.CONTL]: {
20
+ argumentType: EArgumentType.SINGLE,
21
+ },
22
+ [EFilterOperation.ENDS]: {
23
+ argumentType: EArgumentType.SINGLE,
24
+ },
25
+ [EFilterOperation.ENDSL]: {
26
+ argumentType: EArgumentType.SINGLE,
27
+ },
28
+ [EFilterOperation.EQ]: {
29
+ argumentType: EArgumentType.SINGLE,
30
+ },
31
+ [EFilterOperation.EQL]: {
32
+ argumentType: EArgumentType.SINGLE,
33
+ },
34
+ [EFilterOperation.EXCL]: {
35
+ argumentType: EArgumentType.ARRAY,
36
+ },
37
+ [EFilterOperation.EXCLL]: {
38
+ argumentType: EArgumentType.ARRAY,
39
+ },
40
+ [EFilterOperation.GT]: {
41
+ argumentType: EArgumentType.SINGLE,
42
+ },
43
+ [EFilterOperation.GTE]: {
44
+ argumentType: EArgumentType.SINGLE,
45
+ },
46
+ [EFilterOperation.IN]: {
47
+ argumentType: EArgumentType.ARRAY,
48
+ minLength: 1,
49
+ },
50
+ [EFilterOperation.INL]: {
51
+ argumentType: EArgumentType.ARRAY,
52
+ minLength: 1,
53
+ },
54
+ [EFilterOperation.ISNULL]: {
55
+ argumentType: EArgumentType.NULL,
56
+ },
57
+ [EFilterOperation.LT]: {
58
+ argumentType: EArgumentType.SINGLE,
59
+ },
60
+ [EFilterOperation.LTE]: {
61
+ argumentType: EArgumentType.SINGLE,
62
+ },
63
+ [EFilterOperation.NE]: {
64
+ argumentType: EArgumentType.SINGLE,
65
+ },
66
+ [EFilterOperation.NEL]: {
67
+ argumentType: EArgumentType.SINGLE,
68
+ },
69
+ [EFilterOperation.NOTIN]: {
70
+ argumentType: EArgumentType.ARRAY,
71
+ minLength: 1,
72
+ },
73
+ [EFilterOperation.NOTINL]: {
74
+ argumentType: EArgumentType.ARRAY,
75
+ minLength: 1,
76
+ },
77
+ [EFilterOperation.NOTNULL]: {
78
+ argumentType: EArgumentType.NULL,
79
+ },
80
+ [EFilterOperation.STARTS]: {
81
+ argumentType: EArgumentType.SINGLE,
82
+ },
83
+ [EFilterOperation.STARTSL]: {
84
+ argumentType: EArgumentType.SINGLE,
85
+ },
86
+ };
87
+ let HasPairedCustomSuffixesFields = class HasPairedCustomSuffixesFields {
88
+ defaultMessage(properties) {
89
+ const object = properties.object;
90
+ const fieldGroups = object.__fieldGroups;
91
+ const operatorSuffix = object.__operatorSuffix;
92
+ const valueSuffixes = object.__valueSuffixes;
93
+ const indexableObject = properties.object;
94
+ for (const [baseName, groupSuffixes] of fieldGroups) {
95
+ const hasValueSuffix = valueSuffixes.some((suffix) => groupSuffixes.has(suffix));
96
+ if (hasValueSuffix && !groupSuffixes.has(operatorSuffix)) {
97
+ return `group "${baseName}" with value suffix must have an operator suffix [${operatorSuffix}]`;
98
+ }
99
+ if (groupSuffixes.has(operatorSuffix)) {
100
+ if (groupSuffixes.size === 1) {
101
+ return `group "${baseName}" with operator suffix must have at least one value with suffix [${[...valueSuffixes].join(", ")}]`;
102
+ }
103
+ const operatorField = `${baseName}[${operatorSuffix}]`;
104
+ const operatorValue = indexableObject[operatorField];
105
+ const operator = operatorValue;
106
+ const operatorConfig = DEFAULT_OPERATION_CONFIGS[operator];
107
+ if (!operatorConfig) {
108
+ return `Invalid operator "${operator}" for group "${baseName}"`;
109
+ }
110
+ if (operatorConfig.argumentType === EArgumentType.NULL) {
111
+ const valueCount = valueSuffixes.filter((suffix) => groupSuffixes.has(suffix)).length;
112
+ if (valueCount > 0) {
113
+ return `group "${baseName}" with ${operator} operation should not have any values`;
114
+ }
115
+ continue;
116
+ }
117
+ const valueFields = valueSuffixes.filter((suffix) => groupSuffixes.has(suffix)).map((suffix) => `${baseName}[${suffix}]`);
118
+ if (valueFields.length === 0) {
119
+ return `group "${baseName}" requires a value for ${operator} operation`;
120
+ }
121
+ if (valueFields.length > 1) {
122
+ return `group "${baseName}" can only have one value with suffix [${[...valueSuffixes].join(", ")}] when operator is present`;
123
+ }
124
+ const value = indexableObject[valueFields[0]];
125
+ const isArray = Array.isArray(value);
126
+ if (operatorConfig.argumentType === EArgumentType.ARRAY && !isArray) {
127
+ return `group "${baseName}" with ${operator} operation requires an array value`;
128
+ }
129
+ if (operatorConfig.argumentType === EArgumentType.SINGLE && isArray) {
130
+ return `group "${baseName}" with ${operator} operation requires a single value, not an array`;
131
+ }
132
+ if (isArray) {
133
+ if (operatorConfig.exactLength !== undefined && value.length !== operatorConfig.exactLength) {
134
+ return `group "${baseName}" with ${operator} operation requires exactly ${String(operatorConfig.exactLength)} values`;
135
+ }
136
+ if (operatorConfig.minLength !== undefined && value.length < operatorConfig.minLength) {
137
+ return `group "${baseName}" with ${operator} operation requires at least ${String(operatorConfig.minLength)} values`;
138
+ }
139
+ if (operatorConfig.maxLength !== undefined && value.length > operatorConfig.maxLength) {
140
+ return `group "${baseName}" with ${operator} operation requires at most ${String(operatorConfig.maxLength)} values`;
141
+ }
142
+ }
143
+ }
144
+ }
145
+ return `fields must have valid operator-value suffix pairs`;
146
+ }
147
+ validate(_value, properties) {
148
+ const [operatorSuffix, valueSuffixes] = properties.constraints;
149
+ const indexableObject = properties.object;
150
+ const fields = Object.keys(indexableObject);
151
+ const fieldGroups = new Map();
152
+ const suffixPattern = [operatorSuffix, ...valueSuffixes].map((suffix) => suffix.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw `\$&`)).join("|");
153
+ const regex = new RegExp(`^(.+?)\\[(${suffixPattern})\\]$`);
154
+ for (const field of fields) {
155
+ const match = regex.exec(field);
156
+ if (match) {
157
+ const [, baseName, suffix] = match;
158
+ if (!fieldGroups.has(baseName)) {
159
+ fieldGroups.set(baseName, new Set());
160
+ }
161
+ if (indexableObject[field] !== undefined) {
162
+ fieldGroups.get(baseName)?.add(suffix);
163
+ }
164
+ }
165
+ }
166
+ properties.object.__fieldGroups = fieldGroups;
167
+ properties.object.__operatorSuffix = operatorSuffix;
168
+ properties.object.__valueSuffixes = valueSuffixes;
169
+ for (const [baseName, groupSuffixes] of fieldGroups) {
170
+ const hasValueSuffix = valueSuffixes.some((suffix) => groupSuffixes.has(suffix));
171
+ if (hasValueSuffix && !groupSuffixes.has(operatorSuffix)) {
172
+ return false;
173
+ }
174
+ if (groupSuffixes.has(operatorSuffix)) {
175
+ const operatorField = `${baseName}[${operatorSuffix}]`;
176
+ const operatorValue = indexableObject[operatorField];
177
+ const operator = operatorValue;
178
+ const operatorConfig = DEFAULT_OPERATION_CONFIGS[operator];
179
+ if (!operatorConfig)
180
+ return false;
181
+ if (operatorConfig.argumentType === EArgumentType.NULL) {
182
+ const valueCount = valueSuffixes.filter((suffix) => groupSuffixes.has(suffix)).length;
183
+ if (valueCount > 0)
184
+ return false;
185
+ continue;
186
+ }
187
+ const valueFields = valueSuffixes.filter((suffix) => groupSuffixes.has(suffix)).map((suffix) => `${baseName}[${suffix}]`);
188
+ if (valueFields.length !== 1)
189
+ return false;
190
+ const value = indexableObject[valueFields[0]];
191
+ const isArray = Array.isArray(value);
192
+ if (operatorConfig.argumentType === EArgumentType.ARRAY && !isArray)
193
+ return false;
194
+ if (operatorConfig.argumentType === EArgumentType.SINGLE && isArray)
195
+ return false;
196
+ if (isArray) {
197
+ if (operatorConfig.exactLength !== undefined && value.length !== operatorConfig.exactLength)
198
+ return false;
199
+ if (operatorConfig.minLength !== undefined && value.length < operatorConfig.minLength)
200
+ return false;
201
+ if (operatorConfig.maxLength !== undefined && value.length > operatorConfig.maxLength)
202
+ return false;
203
+ }
204
+ }
205
+ }
206
+ return true;
207
+ }
208
+ };
209
+ HasPairedCustomSuffixesFields = __decorate([
210
+ ValidatorConstraint({ async: false, name: "has-paired-custom-suffixes-fields" })
211
+ ], HasPairedCustomSuffixesFields);
212
+
213
+ export { HasPairedCustomSuffixesFields };
214
+ //# sourceMappingURL=has-paired-custom-suffixes-fields.validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"has-paired-custom-suffixes-fields.validator.js","sources":["../../../../../src/validator/has-paired-custom-suffixes-fields.validator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAIA,IAAK,aAIJ;AAJD,CAAA,UAAK,aAAa,EAAA;AACjB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AAClB,CAAC,EAJI,aAAa,KAAb,aAAa,GAIjB,EAAA,CAAA,CAAA;AAeD,MAAM,yBAAyB,GAA+C;AAC7E,IAAA,CAAC,gBAAgB,CAAC,OAAO,GAAG;QAC3B,YAAY,EAAE,aAAa,CAAC,KAAK;AAEjC,QAAA,WAAW,EAAE,CAAC;AACd,KAAA;AACD,IAAA,CAAC,gBAAgB,CAAC,IAAI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AKtG,QAAA,OAAO,IAAI;;;AA1JA,6BAA6B,GAAA,UAAA,CAAA;IADzC,mBAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,mCAAmC,EAAE;AACnE,CAAA,EAAA,6BAA6B,CA4JzC;;;;"}
@@ -0,0 +1,25 @@
1
+ import { __decorate } from '../../external/tslib/tslib.es6.js';
2
+ import { ValidatorConstraint } from 'class-validator';
3
+
4
+ let IsRegularExpression = class IsRegularExpression {
5
+ validate(pattern) {
6
+ if (pattern) {
7
+ try {
8
+ new RegExp(pattern);
9
+ return true;
10
+ }
11
+ catch {
12
+ return false;
13
+ }
14
+ }
15
+ else {
16
+ return false;
17
+ }
18
+ }
19
+ };
20
+ IsRegularExpression = __decorate([
21
+ ValidatorConstraint()
22
+ ], IsRegularExpression);
23
+
24
+ export { IsRegularExpression };
25
+ //# sourceMappingURL=is-regular-expression.validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-regular-expression.validator.js","sources":["../../../../../src/validator/is-regular-expression.validator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAKa,IAAA,mBAAmB,GAAzB,MAAM,mBAAmB,CAAA;AAC/B,IAAA,QAAQ,CAAC,OAAe,EAAA;QACvB,IAAI,OAAO,EAAE;AACZ,YAAA,IAAI;AACH,gBAAA,IAAI,MAAM,CAAC,OAAO,CAAC;AAEnB,gBAAA,OAAO,IAAI;;AACV,YAAA,MAAM;AACP,gBAAA,OAAO,KAAK;;;aAEP;AACN,YAAA,OAAO,KAAK;;;;AAXF,mBAAmB,GAAA,UAAA,CAAA;AAD/B,IAAA,mBAAmB;AACP,CAAA,EAAA,mBAAmB,CAc/B;;;;"}
@@ -0,0 +1,28 @@
1
+ import { __decorate } from '../../external/tslib/tslib.es6.js';
2
+ import { ValidatorConstraint } from 'class-validator';
3
+
4
+ let OnlyOneOfListedProperties = class OnlyOneOfListedProperties {
5
+ defaultMessage(properties) {
6
+ return `only one of the following properties must be provided: ${properties.constraints.join(", ")}`;
7
+ }
8
+ validate(_value, properties) {
9
+ const constraints = properties.constraints;
10
+ if (constraints.length > 0) {
11
+ let count = 0;
12
+ const indexableObject = properties.object;
13
+ for (const constraint of constraints) {
14
+ if (Object.prototype.hasOwnProperty.call(indexableObject, constraint) && indexableObject[constraint] !== undefined) {
15
+ count++;
16
+ }
17
+ }
18
+ return count === 1;
19
+ }
20
+ return true;
21
+ }
22
+ };
23
+ OnlyOneOfListedProperties = __decorate([
24
+ ValidatorConstraint({ async: false, name: "only-one-of-listed-properties" })
25
+ ], OnlyOneOfListedProperties);
26
+
27
+ export { OnlyOneOfListedProperties };
28
+ //# sourceMappingURL=only-one-of-listed-properties.validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"only-one-of-listed-properties.validator.js","sources":["../../../../../src/validator/only-one-of-listed-properties.validator.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAMa,IAAA,yBAAyB,GAA/B,MAAM,yBAAyB,CAAA;AACrC,IAAA,cAAc,CAAC,UAA+B,EAAA;QAC7C,OAAO,CAAA,uDAAA,EAA0D,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAE;;IAGrG,QAAQ,CAAC,MAAe,EAAE,UAA+B,EAAA;AACxD,QAAA,MAAM,WAAW,GAAkB,UAAU,CAAC,WAA4B;AAE1E,QAAA,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,IAAI,KAAK,GAAW,CAAC;AACrB,YAAA,MAAM,eAAe,GAAwB,UAAU,CAAC,MAA6B;AAErF,YAAA,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;gBACrC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,IAAI,eAAe,CAAC,UAAU,CAAC,KAAK,SAAS,EAAE;AACnH,oBAAA,KAAK,EAAE;;;YAIT,OAAO,KAAK,KAAK,CAAC;;AAGnB,QAAA,OAAO,IAAI;;;AArBA,yBAAyB,GAAA,UAAA,CAAA;IADrC,mBAAmB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,+BAA+B,EAAE;AAC/D,CAAA,EAAA,yBAAyB,CAuBrC;;;;"}
@@ -0,0 +1,15 @@
1
+ import type { TRANSFORMER_VALUE_DTO_CONSTANT } from "../constant/dto/transformer-value.constant";
2
+ import type { EApiControllerRequestTransformerType } from "../enum";
3
+ import type { IApiGetListResponseResult } from "../interface";
4
+ export type TApiRequestTransformer<E> = {
5
+ key: keyof {
6
+ limit: number;
7
+ page: number;
8
+ } | keyof IApiGetListResponseResult<E> | keyof Partial<E>;
9
+ } & ({
10
+ type: EApiControllerRequestTransformerType.DYNAMIC;
11
+ value: (typeof TRANSFORMER_VALUE_DTO_CONSTANT)[keyof typeof TRANSFORMER_VALUE_DTO_CONSTANT];
12
+ } | {
13
+ type: EApiControllerRequestTransformerType.STATIC;
14
+ value: string;
15
+ });
@@ -0,0 +1,2 @@
1
+ import type { HttpException, HttpExceptionOptions } from "@nestjs/common";
2
+ export type TApiException = new (objectOrError?: object | string, descriptionOrOptions?: HttpExceptionOptions | string) => HttpException;
@@ -0,0 +1 @@
1
+ export type * from "./method.type";
@@ -0,0 +1,5 @@
1
+ import type { ApiServiceBase } from "../../../class";
2
+ import type { TApiServiceKeys } from "../../decorator";
3
+ export type TApiControllerMethod<E> = {
4
+ service: ApiServiceBase<E>;
5
+ } & Partial<TApiServiceKeys<E>>;
@@ -0,0 +1,3 @@
1
+ export type * from "./api-exception.type";
2
+ export type * from "./controller";
3
+ export type * from "./metadata.type";
@@ -0,0 +1,2 @@
1
+ import type { IMetadataEntry } from "../../interface";
2
+ export type TMetadata = Record<string, IMetadataEntry>;
@@ -0,0 +1,4 @@
1
+ import type { ApiServiceBase } from "../../../../class";
2
+ export type TApiControllerConstructor = new (...arguments_: Array<any>) => {
3
+ service: ApiServiceBase<any>;
4
+ };
@@ -0,0 +1,8 @@
1
+ import type { EFilterOrderDirection } from "../../../../enum";
2
+ import type { TFilterKeys } from "../../../utility";
3
+ export type TApiControllerGetListQuery<E> = {
4
+ limit: number;
5
+ orderBy?: keyof E;
6
+ orderDirection?: EFilterOrderDirection;
7
+ page: number;
8
+ } & Partial<TFilterKeys<E>>;
@@ -0,0 +1,5 @@
1
+ export type * from "./constructor.type";
2
+ export type * from "./get-list-query.type";
3
+ export type * from "./properties";
4
+ export type * from "./properties-route.type";
5
+ export type * from "./transformer-config.type";
@@ -0,0 +1 @@
1
+ export type * from "./route";
@@ -0,0 +1,18 @@
1
+ import type { FindOptionsRelations } from "typeorm";
2
+ import type { EApiControllerLoadRelationsStrategy } from "../../../../../../enum";
3
+ export type TApiControllerPropertiesRouteBaseRequestRelations<E> = {
4
+ relationsLoadStrategy: EApiControllerLoadRelationsStrategy;
5
+ servicesLoadStrategy: EApiControllerLoadRelationsStrategy;
6
+ shouldLoadRelations: boolean;
7
+ } & ({
8
+ relationsLoadStrategy: EApiControllerLoadRelationsStrategy.AUTO;
9
+ } | {
10
+ relationsLoadStrategy: EApiControllerLoadRelationsStrategy.MANUAL;
11
+ relationsToLoad: Array<keyof FindOptionsRelations<E>>;
12
+ }) & ({
13
+ relationsServices: Partial<Record<keyof FindOptionsRelations<E>, string>>;
14
+ servicesLoadStrategy: EApiControllerLoadRelationsStrategy.MANUAL;
15
+ } | {
16
+ servicesLoadStrategy: EApiControllerLoadRelationsStrategy.AUTO;
17
+ shouldForceAllServicesToBeSpecified?: boolean;
18
+ });
@@ -0,0 +1,10 @@
1
+ import type { EApiDtoType, EApiRouteType } from "../../../../../../enum";
2
+ import type { TApiControllerTransformerConfig } from "../../transformer-config.type";
3
+ export type TApiControllerPropertiesRouteBaseRequestTransformers<E, R extends EApiRouteType> = R extends EApiRouteType ? {
4
+ [EApiRouteType.CREATE]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.BODY>;
5
+ [EApiRouteType.DELETE]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.REQUEST>;
6
+ [EApiRouteType.GET_LIST]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.QUERY>;
7
+ [EApiRouteType.GET]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.REQUEST>;
8
+ [EApiRouteType.PARTIAL_UPDATE]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.BODY | EApiDtoType.REQUEST>;
9
+ [EApiRouteType.UPDATE]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.BODY | EApiDtoType.REQUEST>;
10
+ }[R] : never;
@@ -0,0 +1,10 @@
1
+ import type { EApiDtoType, EApiRouteType } from "../../../../../../enum";
2
+ import type { TApiControllerTransformerConfig } from "../../transformer-config.type";
3
+ export type TApiControllerPropertiesRouteBaseResponseTransformers<E, R extends EApiRouteType> = R extends EApiRouteType ? {
4
+ [EApiRouteType.CREATE]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.RESPONSE>;
5
+ [EApiRouteType.DELETE]: never;
6
+ [EApiRouteType.GET_LIST]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.RESPONSE>;
7
+ [EApiRouteType.GET]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.RESPONSE>;
8
+ [EApiRouteType.PARTIAL_UPDATE]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.RESPONSE>;
9
+ [EApiRouteType.UPDATE]: Pick<TApiControllerTransformerConfig<E>, EApiDtoType.RESPONSE>;
10
+ }[R] : never;
@@ -0,0 +1,3 @@
1
+ export type * from "./base-request-relations.type";
2
+ export type * from "./base-request-transformers.type";
3
+ export type * from "./base-response-transformers.type";
@@ -0,0 +1,3 @@
1
+ import type { EApiRouteType } from "../../../../enum";
2
+ import type { IApiControllerPropertiesRouteWithAutoDto, IApiControllerPropertiesRouteWithDto } from "../../../../interface";
3
+ export type TApiControllerPropertiesRoute<E, R extends EApiRouteType> = IApiControllerPropertiesRouteWithAutoDto<E, R> | IApiControllerPropertiesRouteWithDto<E, R>;
@@ -0,0 +1,8 @@
1
+ import type { EApiDtoType } from "../../../../enum";
2
+ import type { TApiRequestTransformer } from "../../../api-request-transformer.type";
3
+ export type TApiControllerTransformerConfig<E> = {
4
+ [EApiDtoType.BODY]?: Array<TApiRequestTransformer<E>>;
5
+ [EApiDtoType.QUERY]?: Array<TApiRequestTransformer<E>>;
6
+ [EApiDtoType.REQUEST]?: Array<TApiRequestTransformer<E>>;
7
+ [EApiDtoType.RESPONSE]?: Array<TApiRequestTransformer<E>>;
8
+ };
@@ -0,0 +1 @@
1
+ export type TApiFilterAllowedTypes = Date | number | string;
@@ -0,0 +1,2 @@
1
+ import type { TApiFilterAllowedTypes } from "./allowed-types.type";
2
+ export type TApiFilterExctractedAllowedTypes<T> = T extends TApiFilterAllowedTypes ? T : never;
@@ -0,0 +1,3 @@
1
+ export type TFilterFieldSelector<E> = {
2
+ [K in keyof E]?: boolean;
3
+ };
@@ -0,0 +1,4 @@
1
+ export type * from "./allowed-types.type";
2
+ export type * from "./extracted-allowed-types.type";
3
+ export type * from "./field-selector.type";
4
+ export type * from "./order-by.type";
@@ -0,0 +1,4 @@
1
+ import type { TApiFilterExctractedAllowedTypes } from "./extracted-allowed-types.type";
2
+ export type TApiFilterOrderBy<E> = {
3
+ [K in Uppercase<keyof E & string> as TApiFilterExctractedAllowedTypes<E[keyof E & Lowercase<K>]> extends never ? never : K]: E[keyof E & Lowercase<K>];
4
+ };
@@ -0,0 +1,2 @@
1
+ import type { DeepPartial } from "typeorm";
2
+ export type TApiFunctionCreateProperties<E> = DeepPartial<E>;
@@ -0,0 +1,2 @@
1
+ import type { FindOptionsWhere } from "typeorm";
2
+ export type TApiFunctionDeleteCriteria<E> = FindOptionsWhere<E>;
@@ -0,0 +1,7 @@
1
+ import type { FindOperator } from "typeorm/find-options/FindOperator";
2
+ import type { FindOptionsWhere } from "typeorm/index";
3
+ export type TApiFunctionGetListPropertiesWhere<E> = {
4
+ createdAt?: FindOperator<Date>;
5
+ receivedAt?: FindOperator<Date>;
6
+ updatedAt?: FindOperator<Date>;
7
+ } & FindOptionsWhere<E>;
@@ -0,0 +1,2 @@
1
+ import type { FindManyOptions } from "typeorm/index";
2
+ export type TApiFunctionGetListProperties<E> = FindManyOptions<E>;
@@ -0,0 +1,2 @@
1
+ import type { FindManyOptions } from "typeorm";
2
+ export type TApiFunctionGetManyProperties<E> = FindManyOptions<E>;
@@ -0,0 +1,2 @@
1
+ import type { FindOneOptions } from "typeorm";
2
+ export type TApiFunctionGetProperties<E> = FindOneOptions<E>;
@@ -0,0 +1,9 @@
1
+ export type * from "./create-properties.type";
2
+ export type * from "./delete-criteria.type";
3
+ export type * from "./get-list-properties-where.type";
4
+ export type * from "./get-list-properties.type";
5
+ export type * from "./get-many.properties";
6
+ export type * from "./get-properties.type";
7
+ export type * from "./properties.type";
8
+ export type * from "./update-criteria.type";
9
+ export type * from "./update-properties.type";
@@ -0,0 +1,7 @@
1
+ import type { FindOptionsRelations } from "typeorm";
2
+ import type { EApiFunctionType } from "../../../../enum";
3
+ export type TApiFunctionProperties<E> = {
4
+ entity: new () => E;
5
+ relations?: FindOptionsRelations<E>;
6
+ type: EApiFunctionType;
7
+ };
@@ -0,0 +1,2 @@
1
+ import type { FindOptionsWhere } from "typeorm";
2
+ export type TApiFunctionUpdateCriteria<E> = FindOptionsWhere<E>;
@@ -0,0 +1,2 @@
1
+ import type { DeepPartial } from "typeorm";
2
+ export type TApiFunctionUpdateProperties<E> = DeepPartial<E>;
@@ -0,0 +1,5 @@
1
+ export type * from "./controller";
2
+ export type * from "./filter";
3
+ export type * from "./function";
4
+ export type * from "./property";
5
+ export type * from "./service";
@@ -0,0 +1,2 @@
1
+ export type * from "./optional-properties.type";
2
+ export type * from "./required-properties.type";
@@ -0,0 +1,3 @@
1
+ export type TApiPropertyBaseArrayOptionalProperties = {
2
+ isArray?: false;
3
+ };
@@ -0,0 +1,6 @@
1
+ export type TApiPropertyBaseArrayRequiredProperties = {
2
+ isArray: true;
3
+ isUniqueItems: boolean;
4
+ maxItems: number;
5
+ minItems: number;
6
+ };
@@ -0,0 +1,4 @@
1
+ export type * from "./array";
2
+ export type * from "./properties.type";
3
+ export type * from "./request-properties.type";
4
+ export type * from "./response-properties.type";
@@ -0,0 +1,9 @@
1
+ import type { IApiBaseEntity } from "../../../../../interface";
2
+ import type { TApiPropertyBaseArrayOptionalProperties, TApiPropertyBaseArrayRequiredProperties } from "./array";
3
+ import type { TApiPropertyBaseRequestProperties } from "./request-properties.type";
4
+ import type { TApiPropertyBaseResponseProperties } from "./response-properties.type";
5
+ export type TApiPropertyBaseProperties = {
6
+ description?: string;
7
+ entity: IApiBaseEntity;
8
+ isNullable?: boolean;
9
+ } & (TApiPropertyBaseArrayOptionalProperties | TApiPropertyBaseArrayRequiredProperties) & (TApiPropertyBaseRequestProperties | TApiPropertyBaseResponseProperties);
@@ -0,0 +1,4 @@
1
+ export type TApiPropertyBaseRequestProperties = {
2
+ isRequired: boolean;
3
+ isResponse?: false;
4
+ };
@@ -0,0 +1,4 @@
1
+ export type TApiPropertyBaseResponseProperties = {
2
+ isExpose?: boolean;
3
+ isResponse: true;
4
+ };
@@ -0,0 +1,6 @@
1
+ import type { EApiPropertyDateIdentifier, EApiPropertyDateType } from "../../../../enum";
2
+ import type { TApiPropertyBaseProperties } from "./base";
3
+ export type TApiPropertyDateProperties = {
4
+ format: EApiPropertyDateType;
5
+ identifier: EApiPropertyDateIdentifier;
6
+ } & TApiPropertyBaseProperties;
@@ -0,0 +1,2 @@
1
+ export type * from "./optional-properties.type";
2
+ export type * from "./required-properties.type";
@@ -0,0 +1,3 @@
1
+ export type TApiPropertyDescribeArrayOptionalProperties = {
2
+ isArray?: false;
3
+ };
@@ -0,0 +1,6 @@
1
+ export type TApiPropertyDescribeArrayRequiredProperties = {
2
+ isArray: true;
3
+ isUniqueItems: boolean;
4
+ maxItems: number;
5
+ minItems: number;
6
+ };
@@ -0,0 +1,5 @@
1
+ import type { TApiPropertyDescribePropertiesBaseProperties } from "./properties/base-properties.type";
2
+ export type TApiPropertyDescribeBaseProperties = {
3
+ isNullable?: boolean;
4
+ properties?: TApiPropertyDescribePropertiesBaseProperties;
5
+ };
@@ -0,0 +1,7 @@
1
+ import type { EApiPropertyDescribeType } from "../../../../../enum";
2
+ import type { TApiPropertyDescribeArrayOptionalProperties, TApiPropertyDescribeArrayRequiredProperties } from "./array";
3
+ import type { TApiPropertyDescribeBaseProperties } from "./base-properties.type";
4
+ export type TApiPropertyDescribeBooleanProperties = {
5
+ description: string;
6
+ type: EApiPropertyDescribeType.BOOLEAN;
7
+ } & (TApiPropertyDescribeArrayOptionalProperties | TApiPropertyDescribeArrayRequiredProperties) & TApiPropertyDescribeBaseProperties;
@@ -0,0 +1,8 @@
1
+ import type { EApiPropertyDateIdentifier, EApiPropertyDateType, EApiPropertyDescribeType } from "../../../../../enum";
2
+ import type { TApiPropertyDescribeArrayOptionalProperties, TApiPropertyDescribeArrayRequiredProperties } from "./array";
3
+ import type { TApiPropertyDescribeBaseProperties } from "./base-properties.type";
4
+ export type TApiPropertyDescribeDateProperties = {
5
+ format: EApiPropertyDateType;
6
+ identifier: EApiPropertyDateIdentifier;
7
+ type: EApiPropertyDescribeType.DATE;
8
+ } & (TApiPropertyDescribeArrayOptionalProperties | TApiPropertyDescribeArrayRequiredProperties) & TApiPropertyDescribeBaseProperties;
@@ -0,0 +1,5 @@
1
+ import type { EApiDtoType } from "../../../../../../enum";
2
+ import type { TApiPropertyDescribeDtoProperties } from "./properties.type";
3
+ export type TApiPropertyDescribeDtoBodyProperties = {
4
+ [EApiDtoType.BODY]?: TApiPropertyDescribeDtoProperties;
5
+ };