@rapidrest/service-core 1.0.0-beta.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 (332) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +16 -0
  3. package/dist/lib/ApiErrors.js +41 -0
  4. package/dist/lib/ApiErrors.js.map +1 -0
  5. package/dist/lib/BackgroundService.js +16 -0
  6. package/dist/lib/BackgroundService.js.map +1 -0
  7. package/dist/lib/BackgroundServiceManager.js +135 -0
  8. package/dist/lib/BackgroundServiceManager.js.map +1 -0
  9. package/dist/lib/BulkError.js +24 -0
  10. package/dist/lib/BulkError.js.map +1 -0
  11. package/dist/lib/EventListenerManager.js +161 -0
  12. package/dist/lib/EventListenerManager.js.map +1 -0
  13. package/dist/lib/NetUtils.js +103 -0
  14. package/dist/lib/NetUtils.js.map +1 -0
  15. package/dist/lib/NotificationUtils.js +34 -0
  16. package/dist/lib/NotificationUtils.js.map +1 -0
  17. package/dist/lib/ObjectFactory.js +90 -0
  18. package/dist/lib/ObjectFactory.js.map +1 -0
  19. package/dist/lib/OpenApiSpec.js +748 -0
  20. package/dist/lib/OpenApiSpec.js.map +1 -0
  21. package/dist/lib/Server.js +549 -0
  22. package/dist/lib/Server.js.map +1 -0
  23. package/dist/lib/Types.js +2 -0
  24. package/dist/lib/Types.js.map +1 -0
  25. package/dist/lib/auth/AuthMiddleware.js +229 -0
  26. package/dist/lib/auth/AuthMiddleware.js.map +1 -0
  27. package/dist/lib/auth/AuthStrategy.js +2 -0
  28. package/dist/lib/auth/AuthStrategy.js.map +1 -0
  29. package/dist/lib/auth/BasicStrategy.js +106 -0
  30. package/dist/lib/auth/BasicStrategy.js.map +1 -0
  31. package/dist/lib/auth/JWTStrategy.js +161 -0
  32. package/dist/lib/auth/JWTStrategy.js.map +1 -0
  33. package/dist/lib/auth/index.js +5 -0
  34. package/dist/lib/auth/index.js.map +1 -0
  35. package/dist/lib/database/ConnectionKinds.js +14 -0
  36. package/dist/lib/database/ConnectionKinds.js.map +1 -0
  37. package/dist/lib/database/ConnectionManager.js +161 -0
  38. package/dist/lib/database/ConnectionManager.js.map +1 -0
  39. package/dist/lib/database/MongoConnection.js +86 -0
  40. package/dist/lib/database/MongoConnection.js.map +1 -0
  41. package/dist/lib/database/MongoRepository.js +136 -0
  42. package/dist/lib/database/MongoRepository.js.map +1 -0
  43. package/dist/lib/database/MongoSchemaSync.js +136 -0
  44. package/dist/lib/database/MongoSchemaSync.js.map +1 -0
  45. package/dist/lib/database/NamingUtils.js +52 -0
  46. package/dist/lib/database/NamingUtils.js.map +1 -0
  47. package/dist/lib/database/TypeOrmSupport.js +146 -0
  48. package/dist/lib/database/TypeOrmSupport.js.map +1 -0
  49. package/dist/lib/database/index.js +7 -0
  50. package/dist/lib/database/index.js.map +1 -0
  51. package/dist/lib/decorators/DatabaseDecorators.js +52 -0
  52. package/dist/lib/decorators/DatabaseDecorators.js.map +1 -0
  53. package/dist/lib/decorators/DocDecorators.js +120 -0
  54. package/dist/lib/decorators/DocDecorators.js.map +1 -0
  55. package/dist/lib/decorators/EventDecorators.js +24 -0
  56. package/dist/lib/decorators/EventDecorators.js.map +1 -0
  57. package/dist/lib/decorators/ModelDecorators.js +173 -0
  58. package/dist/lib/decorators/ModelDecorators.js.map +1 -0
  59. package/dist/lib/decorators/PersistenceDecorators.js +177 -0
  60. package/dist/lib/decorators/PersistenceDecorators.js.map +1 -0
  61. package/dist/lib/decorators/RouteDecorators.js +324 -0
  62. package/dist/lib/decorators/RouteDecorators.js.map +1 -0
  63. package/dist/lib/decorators/index.js +7 -0
  64. package/dist/lib/decorators/index.js.map +1 -0
  65. package/dist/lib/http/Adapters.js +230 -0
  66. package/dist/lib/http/Adapters.js.map +1 -0
  67. package/dist/lib/http/Router.js +403 -0
  68. package/dist/lib/http/Router.js.map +1 -0
  69. package/dist/lib/http/WebSocket.js +82 -0
  70. package/dist/lib/http/WebSocket.js.map +1 -0
  71. package/dist/lib/http/index.js +4 -0
  72. package/dist/lib/http/index.js.map +1 -0
  73. package/dist/lib/http/types.js +5 -0
  74. package/dist/lib/http/types.js.map +1 -0
  75. package/dist/lib/index.js +18 -0
  76. package/dist/lib/index.js.map +1 -0
  77. package/dist/lib/models/BaseEntity.js +83 -0
  78. package/dist/lib/models/BaseEntity.js.map +1 -0
  79. package/dist/lib/models/BaseMongoEntity.js +40 -0
  80. package/dist/lib/models/BaseMongoEntity.js.map +1 -0
  81. package/dist/lib/models/ModelUtils.js +645 -0
  82. package/dist/lib/models/ModelUtils.js.map +1 -0
  83. package/dist/lib/models/RecoverableBaseEntity.js +39 -0
  84. package/dist/lib/models/RecoverableBaseEntity.js.map +1 -0
  85. package/dist/lib/models/RecoverableBaseMongoEntity.js +40 -0
  86. package/dist/lib/models/RecoverableBaseMongoEntity.js.map +1 -0
  87. package/dist/lib/models/RepoUtils.js +717 -0
  88. package/dist/lib/models/RepoUtils.js.map +1 -0
  89. package/dist/lib/models/SimpleEntity.js +42 -0
  90. package/dist/lib/models/SimpleEntity.js.map +1 -0
  91. package/dist/lib/models/SimpleMongoEntity.js +38 -0
  92. package/dist/lib/models/SimpleMongoEntity.js.map +1 -0
  93. package/dist/lib/models/StatusExtraData.js +15 -0
  94. package/dist/lib/models/StatusExtraData.js.map +1 -0
  95. package/dist/lib/models/index.js +10 -0
  96. package/dist/lib/models/index.js.map +1 -0
  97. package/dist/lib/routes/AdminRoute.js +268 -0
  98. package/dist/lib/routes/AdminRoute.js.map +1 -0
  99. package/dist/lib/routes/MetricsRoute.js +86 -0
  100. package/dist/lib/routes/MetricsRoute.js.map +1 -0
  101. package/dist/lib/routes/ModelRoute.js +481 -0
  102. package/dist/lib/routes/ModelRoute.js.map +1 -0
  103. package/dist/lib/routes/OpenAPIRoute.js +115 -0
  104. package/dist/lib/routes/OpenAPIRoute.js.map +1 -0
  105. package/dist/lib/routes/RouteUtils.js +445 -0
  106. package/dist/lib/routes/RouteUtils.js.map +1 -0
  107. package/dist/lib/routes/StatusRoute.js +55 -0
  108. package/dist/lib/routes/StatusRoute.js.map +1 -0
  109. package/dist/lib/routes/index.js +7 -0
  110. package/dist/lib/routes/index.js.map +1 -0
  111. package/dist/lib/security/ACLRouteMongo.js +194 -0
  112. package/dist/lib/security/ACLRouteMongo.js.map +1 -0
  113. package/dist/lib/security/ACLRouteSQL.js +193 -0
  114. package/dist/lib/security/ACLRouteSQL.js.map +1 -0
  115. package/dist/lib/security/ACLUtils.js +457 -0
  116. package/dist/lib/security/ACLUtils.js.map +1 -0
  117. package/dist/lib/security/AccessControlList.js +18 -0
  118. package/dist/lib/security/AccessControlList.js.map +1 -0
  119. package/dist/lib/security/AccessControlListMongo.js +155 -0
  120. package/dist/lib/security/AccessControlListMongo.js.map +1 -0
  121. package/dist/lib/security/AccessControlListSQL.js +149 -0
  122. package/dist/lib/security/AccessControlListSQL.js.map +1 -0
  123. package/dist/lib/security/index.js +3 -0
  124. package/dist/lib/security/index.js.map +1 -0
  125. package/dist/lib/test/index.js +3 -0
  126. package/dist/lib/test/index.js.map +1 -0
  127. package/dist/lib/test/request.js +99 -0
  128. package/dist/lib/test/request.js.map +1 -0
  129. package/dist/lib/test/requestws.js +173 -0
  130. package/dist/lib/test/requestws.js.map +1 -0
  131. package/dist/types/ApiErrors.d.ts +38 -0
  132. package/dist/types/BackgroundService.d.ts +30 -0
  133. package/dist/types/BackgroundServiceManager.d.ts +66 -0
  134. package/dist/types/BulkError.d.ts +11 -0
  135. package/dist/types/EventListenerManager.d.ts +36 -0
  136. package/dist/types/NetUtils.d.ts +29 -0
  137. package/dist/types/NotificationUtils.d.ts +25 -0
  138. package/dist/types/ObjectFactory.d.ts +17 -0
  139. package/dist/types/OpenApiSpec.d.ts +114 -0
  140. package/dist/types/Server.d.ts +180 -0
  141. package/dist/types/Types.d.ts +8 -0
  142. package/dist/types/auth/AuthMiddleware.d.ts +42 -0
  143. package/dist/types/auth/AuthStrategy.d.ts +32 -0
  144. package/dist/types/auth/BasicStrategy.d.ts +33 -0
  145. package/dist/types/auth/JWTStrategy.d.ts +61 -0
  146. package/dist/types/auth/index.d.ts +4 -0
  147. package/dist/types/database/ConnectionKinds.d.ts +7 -0
  148. package/dist/types/database/ConnectionManager.d.ts +35 -0
  149. package/dist/types/database/MongoConnection.d.ts +54 -0
  150. package/dist/types/database/MongoRepository.d.ts +92 -0
  151. package/dist/types/database/MongoSchemaSync.d.ts +41 -0
  152. package/dist/types/database/NamingUtils.d.ts +24 -0
  153. package/dist/types/database/TypeOrmSupport.d.ts +20 -0
  154. package/dist/types/database/index.d.ts +6 -0
  155. package/dist/types/decorators/DatabaseDecorators.d.ts +18 -0
  156. package/dist/types/decorators/DocDecorators.d.ts +69 -0
  157. package/dist/types/decorators/EventDecorators.d.ts +12 -0
  158. package/dist/types/decorators/ModelDecorators.d.ts +80 -0
  159. package/dist/types/decorators/PersistenceDecorators.d.ts +117 -0
  160. package/dist/types/decorators/RouteDecorators.d.ts +172 -0
  161. package/dist/types/decorators/index.d.ts +6 -0
  162. package/dist/types/http/Adapters.d.ts +68 -0
  163. package/dist/types/http/Router.d.ts +99 -0
  164. package/dist/types/http/WebSocket.d.ts +56 -0
  165. package/dist/types/http/index.d.ts +6 -0
  166. package/dist/types/http/types.d.ts +54 -0
  167. package/dist/types/index.d.ts +17 -0
  168. package/dist/types/models/BaseEntity.d.ts +29 -0
  169. package/dist/types/models/BaseMongoEntity.d.ts +13 -0
  170. package/dist/types/models/ModelUtils.d.ts +166 -0
  171. package/dist/types/models/RecoverableBaseEntity.d.ts +16 -0
  172. package/dist/types/models/RecoverableBaseMongoEntity.d.ts +16 -0
  173. package/dist/types/models/RepoUtils.d.ts +154 -0
  174. package/dist/types/models/SimpleEntity.d.ts +14 -0
  175. package/dist/types/models/SimpleMongoEntity.d.ts +15 -0
  176. package/dist/types/models/StatusExtraData.d.ts +6 -0
  177. package/dist/types/models/index.d.ts +9 -0
  178. package/dist/types/routes/AdminRoute.d.ts +47 -0
  179. package/dist/types/routes/MetricsRoute.d.ts +15 -0
  180. package/dist/types/routes/ModelRoute.d.ts +226 -0
  181. package/dist/types/routes/OpenAPIRoute.d.ts +17 -0
  182. package/dist/types/routes/RouteUtils.d.ts +55 -0
  183. package/dist/types/routes/StatusRoute.d.ts +11 -0
  184. package/dist/types/routes/index.d.ts +6 -0
  185. package/dist/types/security/ACLRouteMongo.d.ts +19 -0
  186. package/dist/types/security/ACLRouteSQL.d.ts +19 -0
  187. package/dist/types/security/ACLUtils.d.ts +94 -0
  188. package/dist/types/security/AccessControlList.d.ts +103 -0
  189. package/dist/types/security/AccessControlListMongo.d.ts +24 -0
  190. package/dist/types/security/AccessControlListSQL.d.ts +24 -0
  191. package/dist/types/security/index.d.ts +2 -0
  192. package/dist/types/test/index.d.ts +2 -0
  193. package/dist/types/test/request.d.ts +24 -0
  194. package/dist/types/test/requestws.d.ts +21 -0
  195. package/docs/Makefile +20 -0
  196. package/docs/conf.py +58 -0
  197. package/docs/index.rst +17 -0
  198. package/docs/make.bat +35 -0
  199. package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/README.md +13 -0
  200. package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/MongoRepository.md +25 -0
  201. package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/RedisConnection.md +25 -0
  202. package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/Repository.md +25 -0
  203. package/docs/reference/@rapidrest/namespaces/DocDecorators/README.md +23 -0
  204. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Default.md +25 -0
  205. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Description.md +25 -0
  206. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Document.md +25 -0
  207. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Example.md +25 -0
  208. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Format.md +25 -0
  209. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Returns.md +28 -0
  210. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Summary.md +25 -0
  211. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Tags.md +25 -0
  212. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/TypeInfo.md +28 -0
  213. package/docs/reference/@rapidrest/namespaces/DocDecorators/interfaces/DocumentsData.md +57 -0
  214. package/docs/reference/@rapidrest/namespaces/EventDecorators/README.md +12 -0
  215. package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/EventListener.md +17 -0
  216. package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/OnEvent.md +26 -0
  217. package/docs/reference/@rapidrest/namespaces/ModelDecorators/README.md +26 -0
  218. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Cache.md +25 -0
  219. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/ChildEntity.md +18 -0
  220. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/DataStore.md +25 -0
  221. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Identifier.md +27 -0
  222. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Protect.md +35 -0
  223. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Reference.md +25 -0
  224. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Shard.md +27 -0
  225. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/TrackChanges.md +26 -0
  226. package/docs/reference/@rapidrest/namespaces/ModelDecorators/interfaces/PendingTypeOrmColumn.md +45 -0
  227. package/docs/reference/@rapidrest/namespaces/ModelDecorators/variables/pendingTypeOrmColumns.md +14 -0
  228. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/README.md +25 -0
  229. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Column.md +25 -0
  230. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Entity.md +26 -0
  231. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Index.md +119 -0
  232. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/PrimaryColumn.md +25 -0
  233. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Unique.md +68 -0
  234. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getColumnMetadata.md +26 -0
  235. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getEntityName.md +26 -0
  236. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getIndexMetadata.md +27 -0
  237. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnInfo.md +41 -0
  238. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnOptions.md +51 -0
  239. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexInfo.md +41 -0
  240. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexOptions.md +51 -0
  241. package/docs/reference/@rapidrest/namespaces/RouteDecorators/README.md +36 -0
  242. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/After.md +26 -0
  243. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Auth.md +33 -0
  244. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/AuthResult.md +31 -0
  245. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Before.md +25 -0
  246. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/ContentType.md +25 -0
  247. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Delete.md +25 -0
  248. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Get.md +25 -0
  249. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Head.md +25 -0
  250. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Header.md +25 -0
  251. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Method.md +31 -0
  252. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Model.md +25 -0
  253. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Options.md +25 -0
  254. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Param.md +26 -0
  255. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Patch.md +25 -0
  256. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Post.md +25 -0
  257. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Protect.md +31 -0
  258. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Put.md +25 -0
  259. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Query.md +26 -0
  260. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Request.md +31 -0
  261. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/RequiresRole.md +26 -0
  262. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Response.md +31 -0
  263. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Route.md +25 -0
  264. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Socket.md +33 -0
  265. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/User.md +31 -0
  266. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Validate.md +25 -0
  267. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/WebSocket.md +25 -0
  268. package/docs/reference/README.md +20 -0
  269. package/docs/reference/classes/ACLUtils.md +251 -0
  270. package/docs/reference/classes/AdminRoute.md +51 -0
  271. package/docs/reference/classes/AuthMiddleware.md +131 -0
  272. package/docs/reference/classes/BackgroundService.md +117 -0
  273. package/docs/reference/classes/BackgroundServiceManager.md +172 -0
  274. package/docs/reference/classes/BaseEntity.md +82 -0
  275. package/docs/reference/classes/BaseMongoEntity.md +107 -0
  276. package/docs/reference/classes/BasicStrategy.md +89 -0
  277. package/docs/reference/classes/BasicStrategyOptions.md +91 -0
  278. package/docs/reference/classes/BulkError.md +271 -0
  279. package/docs/reference/classes/ConnectionManager.md +75 -0
  280. package/docs/reference/classes/EventListenerManager.md +88 -0
  281. package/docs/reference/classes/JWTStrategy.md +77 -0
  282. package/docs/reference/classes/JWTStrategyOptions.md +97 -0
  283. package/docs/reference/classes/MetricsRoute.md +27 -0
  284. package/docs/reference/classes/ModelRoute.md +527 -0
  285. package/docs/reference/classes/ModelUtils.md +448 -0
  286. package/docs/reference/classes/MongoConnection.md +218 -0
  287. package/docs/reference/classes/MongoRepository.md +354 -0
  288. package/docs/reference/classes/MongoSchemaSync.md +67 -0
  289. package/docs/reference/classes/NetUtils.md +90 -0
  290. package/docs/reference/classes/NotificationUtils.md +77 -0
  291. package/docs/reference/classes/ObjectFactory.md +336 -0
  292. package/docs/reference/classes/OpenAPIRoute.md +77 -0
  293. package/docs/reference/classes/OpenApiSpec.md +892 -0
  294. package/docs/reference/classes/RecoverableBaseEntity.md +114 -0
  295. package/docs/reference/classes/RecoverableBaseMongoEntity.md +124 -0
  296. package/docs/reference/classes/RedisTransport.md +2202 -0
  297. package/docs/reference/classes/RepoUtils.md +486 -0
  298. package/docs/reference/classes/RouteUtils.md +191 -0
  299. package/docs/reference/classes/Server.md +408 -0
  300. package/docs/reference/classes/SimpleEntity.md +48 -0
  301. package/docs/reference/classes/SimpleMongoEntity.md +66 -0
  302. package/docs/reference/classes/StatusExtraData.md +57 -0
  303. package/docs/reference/classes/StatusRoute.md +26 -0
  304. package/docs/reference/enumerations/ACLAction.md +63 -0
  305. package/docs/reference/enumerations/ApiErrorMessages.md +123 -0
  306. package/docs/reference/enumerations/ApiErrors.md +123 -0
  307. package/docs/reference/functions/isSqlDataSource.md +26 -0
  308. package/docs/reference/functions/resolveCollectionName.md +33 -0
  309. package/docs/reference/functions/snakeCase.md +28 -0
  310. package/docs/reference/globals.md +91 -0
  311. package/docs/reference/interfaces/ACLRecord.md +96 -0
  312. package/docs/reference/interfaces/AccessControlList.md +76 -0
  313. package/docs/reference/interfaces/AuthResult.md +55 -0
  314. package/docs/reference/interfaces/AuthStrategy.md +57 -0
  315. package/docs/reference/interfaces/CreateRequestOptions.md +121 -0
  316. package/docs/reference/interfaces/DeleteRequestOptions.md +147 -0
  317. package/docs/reference/interfaces/FindRequestOptions.md +133 -0
  318. package/docs/reference/interfaces/JWTAuthResult.md +84 -0
  319. package/docs/reference/interfaces/RepoCreateOptions.md +95 -0
  320. package/docs/reference/interfaces/RepoDeleteOptions.md +115 -0
  321. package/docs/reference/interfaces/RepoFindOptions.md +135 -0
  322. package/docs/reference/interfaces/RepoOperationOptions.md +69 -0
  323. package/docs/reference/interfaces/RepoUpdateOptions.md +111 -0
  324. package/docs/reference/interfaces/RequestOptions.md +112 -0
  325. package/docs/reference/interfaces/TruncateRequestOptions.md +175 -0
  326. package/docs/reference/interfaces/UpdateRequestOptions.md +149 -0
  327. package/docs/reference/type-aliases/OneOrMany.md +19 -0
  328. package/docs/reference/type-aliases/OneOrNull.md +19 -0
  329. package/docs/reference/type-aliases/PartialBaseEntity.md +17 -0
  330. package/docs/reference/type-aliases/PartialSimpleEntity.md +17 -0
  331. package/docs/reference/type-aliases/UpdateObject.md +19 -0
  332. package/package.json +125 -0
@@ -0,0 +1,177 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2020-2026 Jean-Philippe Steinmetz. All rights reserved.
3
+ ///////////////////////////////////////////////////////////////////////////////
4
+ import "reflect-metadata";
5
+ import { snakeCase } from "../database/NamingUtils.js";
6
+ const COLUMNS_KEY = "rrst:columns";
7
+ const INDEXES_KEY = "rrst:indexes";
8
+ const CLASS_INDEXES_KEY = "rrst:classIndexes";
9
+ const ENTITY_NAME_KEY = "rrst:entityName";
10
+ /**
11
+ * Appends a value to the metadata array stored directly on the given target (never on an ancestor), creating the
12
+ * array if it does not yet exist. Using own-metadata ensures that subclasses do not accidentally mutate the
13
+ * metadata arrays of their parent classes.
14
+ */
15
+ function pushOwnMetadata(key, target, value) {
16
+ const list = Reflect.getOwnMetadata(key, target) ?? [];
17
+ list.push(value);
18
+ Reflect.defineMetadata(key, list, target);
19
+ }
20
+ /**
21
+ * Collects metadata arrays of the given key from every level of the prototype or constructor chain, ordered from
22
+ * the most derived class to the most ancestral.
23
+ */
24
+ function collectOwnMetadata(key, target) {
25
+ const results = [];
26
+ for (let t = target; t && t !== Function.prototype && t !== Object.prototype; t = Object.getPrototypeOf(t)) {
27
+ const list = Reflect.getOwnMetadata(key, t);
28
+ if (list) {
29
+ results.push(list);
30
+ }
31
+ }
32
+ return results;
33
+ }
34
+ /**
35
+ * Indicates that the decorated property will be persisted as a column/property in the datastore.
36
+ *
37
+ * @param options The options describing the column.
38
+ */
39
+ export function Column(options = {}) {
40
+ return function (target, propertyKey) {
41
+ const designType = Reflect.getMetadata("design:type", target, propertyKey);
42
+ pushOwnMetadata(COLUMNS_KEY, target, {
43
+ propertyName: String(propertyKey),
44
+ designType,
45
+ options,
46
+ });
47
+ };
48
+ }
49
+ /**
50
+ * Indicates that the decorated property is a primary key column in the datastore.
51
+ *
52
+ * @param options The options describing the column.
53
+ */
54
+ export function PrimaryColumn(options = {}) {
55
+ return Column({ ...options, primary: true });
56
+ }
57
+ export function Index(nameOrFieldsOrOptions, fieldsOrOptions, maybeOptions) {
58
+ // Normalize the various overload signatures
59
+ const name = typeof nameOrFieldsOrOptions === "string" ? nameOrFieldsOrOptions : undefined;
60
+ const fields = Array.isArray(nameOrFieldsOrOptions)
61
+ ? nameOrFieldsOrOptions
62
+ : Array.isArray(fieldsOrOptions)
63
+ ? fieldsOrOptions
64
+ : undefined;
65
+ const options = (typeof nameOrFieldsOrOptions === "object" && !Array.isArray(nameOrFieldsOrOptions)
66
+ ? nameOrFieldsOrOptions
67
+ : typeof fieldsOrOptions === "object" && !Array.isArray(fieldsOrOptions)
68
+ ? fieldsOrOptions
69
+ : maybeOptions) ?? {};
70
+ return function (target, propertyKey) {
71
+ if (propertyKey !== undefined) {
72
+ // Property-level index
73
+ pushOwnMetadata(INDEXES_KEY, target, {
74
+ name,
75
+ columns: [String(propertyKey)],
76
+ options,
77
+ });
78
+ }
79
+ else {
80
+ // Class-level (compound) index
81
+ if (!fields || fields.length === 0) {
82
+ throw new Error(`@Index on class ${target.name} requires a list of property names.`);
83
+ }
84
+ pushOwnMetadata(CLASS_INDEXES_KEY, target, {
85
+ name,
86
+ columns: fields,
87
+ options,
88
+ });
89
+ }
90
+ };
91
+ }
92
+ export function Unique(nameOrFields, maybeFields) {
93
+ if (typeof nameOrFields === "string") {
94
+ return maybeFields ? Index(nameOrFields, maybeFields, { unique: true }) : Index(nameOrFields, { unique: true });
95
+ }
96
+ else if (Array.isArray(nameOrFields)) {
97
+ return Index(nameOrFields, { unique: true });
98
+ }
99
+ return Index({ unique: true });
100
+ }
101
+ /* eslint-enable no-redeclare */
102
+ /**
103
+ * Indicates that the class describes an entity that is persisted to a datastore.
104
+ *
105
+ * @param name The name of the collection (or table) that records will be stored in. Defaults to the snake_case
106
+ * form of the class name.
107
+ */
108
+ export function Entity(name) {
109
+ return function (target) {
110
+ const entityName = name ?? snakeCase(target.name);
111
+ Reflect.defineMetadata(ENTITY_NAME_KEY, entityName, target);
112
+ Object.defineProperty(target, "entityName", {
113
+ enumerable: true,
114
+ writable: true,
115
+ value: entityName,
116
+ });
117
+ };
118
+ }
119
+ /**
120
+ * Returns the merged list of persisted columns declared across the entire class hierarchy of the given model
121
+ * class. Columns declared in subclasses override columns of the same property name declared in parent classes.
122
+ *
123
+ * @param clazz The model class to retrieve column metadata for.
124
+ */
125
+ export function getColumnMetadata(clazz) {
126
+ const merged = new Map();
127
+ // Most-derived first; first occurrence of a property name wins
128
+ for (const list of collectOwnMetadata(COLUMNS_KEY, clazz.prototype ?? clazz)) {
129
+ for (const column of list) {
130
+ if (!merged.has(column.propertyName)) {
131
+ merged.set(column.propertyName, column);
132
+ }
133
+ }
134
+ }
135
+ return Array.from(merged.values());
136
+ }
137
+ /**
138
+ * Returns the merged list of indexes declared across the entire class hierarchy of the given model class,
139
+ * including both property-level and class-level (compound) indexes. Indexes declared in subclasses override
140
+ * indexes with the same identity (name, or column set when unnamed) declared in parent classes.
141
+ *
142
+ * @param clazz The model class to retrieve index metadata for.
143
+ */
144
+ export function getIndexMetadata(clazz) {
145
+ const merged = new Map();
146
+ const identity = (idx) => idx.name ?? `cols:${idx.columns.join(",")}`;
147
+ // Most-derived first; first occurrence of an identity wins
148
+ const lists = [
149
+ ...collectOwnMetadata(INDEXES_KEY, clazz.prototype ?? clazz),
150
+ ...collectOwnMetadata(CLASS_INDEXES_KEY, clazz),
151
+ ];
152
+ for (const list of lists) {
153
+ for (const index of list) {
154
+ const key = identity(index);
155
+ if (!merged.has(key)) {
156
+ merged.set(key, index);
157
+ }
158
+ }
159
+ }
160
+ return Array.from(merged.values());
161
+ }
162
+ /**
163
+ * Returns the explicit entity name declared via `@Entity(name)` on the given class or the nearest ancestor that
164
+ * declares one, otherwise `undefined`.
165
+ *
166
+ * @param clazz The model class to retrieve the entity name for.
167
+ */
168
+ export function getEntityName(clazz) {
169
+ for (let c = clazz; c && c !== Function.prototype; c = Object.getPrototypeOf(c)) {
170
+ const entityName = Reflect.getOwnMetadata(ENTITY_NAME_KEY, c);
171
+ if (entityName) {
172
+ return entityName;
173
+ }
174
+ }
175
+ return undefined;
176
+ }
177
+ //# sourceMappingURL=PersistenceDecorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PersistenceDecorators.js","sourceRoot":"","sources":["../../../src/decorators/PersistenceDecorators.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wEAAwE;AACxE,+EAA+E;AAC/E,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAsDvD,MAAM,WAAW,GAAG,cAAc,CAAC;AACnC,MAAM,WAAW,GAAG,cAAc,CAAC;AACnC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAE1C;;;;GAIG;AACH,SAAS,eAAe,CAAC,GAAW,EAAE,MAAW,EAAE,KAAU;IACzD,MAAM,IAAI,GAAU,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC9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E,MAAM,UAAU,GAAuB,OAAO,CAAC,cAAc,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;QAClF,IAAI,UAAU,EAAE,CAAC;YACb,OAAO,UAAU,CAAC;QACtB,CAAC;IACL,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -0,0 +1,324 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2020-2026 Jean-Philippe Steinmetz. All rights reserved.
3
+ ///////////////////////////////////////////////////////////////////////////////
4
+ import "reflect-metadata";
5
+ /**
6
+ * Indicates a provided function or list of functions to execute *after* the decorated function and before the response
7
+ * is sent to a client. Note that the function must call `next()` in order for this decorator to work.
8
+ *
9
+ * @param func The function or list of functions to execute *after* the decorated function.
10
+ */
11
+ export function After(func) {
12
+ return function (target, propertyKey, descriptor) {
13
+ let route = Reflect.getMetadata("rrst:route", target, propertyKey) || {};
14
+ // Ensure we always have an array of functions. Also, append the new list of functions to any existing list.
15
+ let funcs = Array.isArray(func) ? func : [func];
16
+ route.after = route.after ? route.after.concat(funcs) : funcs;
17
+ Reflect.defineMetadata("rrst:route", route, target, propertyKey);
18
+ };
19
+ }
20
+ /**
21
+ * Applies PassportJS authentication to the decorated route or method for the provided strategy or list of strategies
22
+ * should be attempted before processing the route.
23
+ *
24
+ * @param strategies The PassportJS strategies that will be applied when incoming requests are processed.
25
+ * @param require Set to `true` to indicate that at least one of the specified authentication strategies must pass to
26
+ * proceed, otherwise set to `false`. Default is `true`.
27
+ */
28
+ export function Auth(strategies, require = true) {
29
+ return function (target, propertyKey, descriptor) {
30
+ let route = Reflect.getMetadata("rrst:route", target, propertyKey) || {};
31
+ route.authStrategies = strategies;
32
+ route.authRequired = require;
33
+ Reflect.defineMetadata("rrst:route", route, target, propertyKey);
34
+ };
35
+ }
36
+ /**
37
+ * Injects the authenticated authentication result as the value of the decorated argument.
38
+ */
39
+ export function AuthResult(target, propertyKey, index) {
40
+ let args = Reflect.getMetadata("rrst:args", target, propertyKey) || {};
41
+ args[index] = ["authResult"];
42
+ Reflect.defineMetadata("rrst:args", args, target, propertyKey);
43
+ }
44
+ /**
45
+ * Indicates a provided function or list of functions to execute *before* the decorated function.
46
+ *
47
+ * @param func The function or list of functions to execute *before* the decorated function.
48
+ */
49
+ export function Before(func) {
50
+ return function (target, propertyKey, descriptor) {
51
+ let route = Reflect.getMetadata("rrst:route", target, propertyKey) || {};
52
+ // Ensure we always have an array of functions. Also, append the new list of functions to any existing list.
53
+ let funcs = Array.isArray(func) ? func : [func];
54
+ route.before = route.before ? route.before.concat(funcs) : funcs;
55
+ Reflect.defineMetadata("rrst:route", route, target, propertyKey);
56
+ };
57
+ }
58
+ /**
59
+ * Indicates that the decorated function will return content encoded with the specified content type.
60
+ *
61
+ * @param type The content type that the function will return.
62
+ */
63
+ export function ContentType(type) {
64
+ return function (target, propertyKey, descriptor) {
65
+ const route = Reflect.getMetadata("rrst:route", target, propertyKey) || {};
66
+ route.contentType = type;
67
+ Reflect.defineMetadata("rrst:route", route, target, propertyKey);
68
+ };
69
+ }
70
+ /**
71
+ * Indicates that the decorated function handles incoming `DELETE` requests at the given sub-path.
72
+ *
73
+ * @param path The sub-path that the route will handle requests for.
74
+ */
75
+ export function Delete(path) {
76
+ return Method("delete", path);
77
+ }
78
+ /**
79
+ * Indicates that the decorated function handles incoming `GET` requests at the given sub-path.
80
+ *
81
+ * @param path The sub-path that the route will handle requests for.
82
+ */
83
+ export function Get(path) {
84
+ return Method("get", path);
85
+ }
86
+ /**
87
+ * Indicates that the decorated function handles incoming `HEAD` requests at the given sub-path.
88
+ *
89
+ * @param path The sub-path that the route will handle requests for.
90
+ */
91
+ export function Head(path) {
92
+ return Method("head", path);
93
+ }
94
+ /**
95
+ * Injects the value of the specified request header with the given name as the value of the decorated argument.
96
+ *
97
+ * @param name The name of the header whose value will be injected.
98
+ */
99
+ export function Header(name) {
100
+ return function (target, propertyKey, index) {
101
+ let args = Reflect.getMetadata("rrst:args", target, propertyKey) || {};
102
+ args[index] = ["header", name];
103
+ Reflect.defineMetadata("rrst:args", args, target, propertyKey);
104
+ };
105
+ }
106
+ /**
107
+ * Indicates that the decorated function handles incoming HTTP requests for the specified HTTP method(s) at the given sub-path.
108
+ *
109
+ * @param method The HTTP method(s) to handle requests for.
110
+ * @param path The sub-path that the route handles requests for.
111
+ */
112
+ export function Method(method, path) {
113
+ return function (target, propertyKey, descriptor) {
114
+ let route = Reflect.getMetadata("rrst:route", target, propertyKey) || {};
115
+ const pathFinal = path ? path : "";
116
+ if (!route.methods) {
117
+ route.methods = new Map();
118
+ }
119
+ let methods = Array.isArray(method) ? method : [method];
120
+ for (let key of methods) {
121
+ route.methods.set(key, pathFinal);
122
+ }
123
+ Reflect.defineMetadata("rrst:route", route, target, propertyKey);
124
+ };
125
+ }
126
+ /**
127
+ * Indicates that the class utilizes is a manager for the specified class type.
128
+ *
129
+ * @param type The data model class type to associate the class with.
130
+ */
131
+ export function Model(type) {
132
+ return function (constructor) {
133
+ var _a;
134
+ return _a = class extends constructor {
135
+ },
136
+ /** The class type of the data model type associated with this class. */
137
+ _a.modelClass = type,
138
+ _a;
139
+ };
140
+ }
141
+ /**
142
+ * Indicates that the decorated function handles incoming `OPTIONS` requests at the given sub-path.
143
+ *
144
+ * @param path The sub-path that the route will handle requests for.
145
+ */
146
+ export function Options(path) {
147
+ return Method("options", path);
148
+ }
149
+ /**
150
+ * Injects the value of the specified URI parameter with the given name as the value of the decorated argument. If no
151
+ * name is specified the entire request parameter will be injected.
152
+ *
153
+ * @param name The name of the URI parameter whose value will be injected.
154
+ */
155
+ export function Param(name = undefined) {
156
+ return function (target, propertyKey, index) {
157
+ let args = Reflect.getMetadata("rrst:args", target, propertyKey) || {};
158
+ args[index] = ["param", name];
159
+ Reflect.defineMetadata("rrst:args", args, target, propertyKey);
160
+ };
161
+ }
162
+ /**
163
+ * Indicates that the decorated function handles incoming `PATCH` requests at the given sub-path.
164
+ *
165
+ * @param path The sub-path that the route will handle requests for.
166
+ */
167
+ export function Patch(path) {
168
+ return Method("patch", path);
169
+ }
170
+ /**
171
+ * Indicates that the decorated function handles incoming `POST` requests at the given sub-path.
172
+ *
173
+ * @param path The sub-path that the route will handle requests for.
174
+ */
175
+ export function Post(path) {
176
+ return Method("post", path);
177
+ }
178
+ /**
179
+ * Indicates that the decorated function handles incoming `PUT` requests at the given sub-path.
180
+ *
181
+ * @param path The sub-path that the route will handle requests for.
182
+ */
183
+ export function Put(path) {
184
+ return Method("put", path);
185
+ }
186
+ /**
187
+ * Apply this to any route handler class or an individual route handler function to indicate that it should be
188
+ * protected by the AccessControlList security system. The `acl` parameter specifies the ACL governing access
189
+ * to the HTTP resource(s) defined. If a class and a given route handler function both have this decorator
190
+ * applied, the class ACL will be listed as the parent to the function's ACL object, thus inheriting
191
+ * whatever permissions applied to the class level.
192
+ *
193
+ * @param acl The access control list to define for this route class or handler. Not specifying a value here
194
+ * * will default to the behavior of denying anonymous access to the resource and allowing any authenticated
195
+ * * user CRUD access.
196
+ */
197
+ export function Protect(acl = {
198
+ uid: "<UniqueName>",
199
+ records: [
200
+ {
201
+ userOrRoleId: "anonymous",
202
+ create: false,
203
+ read: false,
204
+ update: false,
205
+ delete: false,
206
+ special: false,
207
+ full: false,
208
+ },
209
+ {
210
+ userOrRoleId: ".*",
211
+ create: true,
212
+ read: true,
213
+ update: true,
214
+ delete: true,
215
+ special: false,
216
+ full: false,
217
+ },
218
+ ],
219
+ }) {
220
+ return function (target, propertyKey) {
221
+ if (!acl.uid || acl.uid === "<UniqueName>") {
222
+ acl.uid = propertyKey ? `${target.constructor.name}.${propertyKey}` : `${target.name}`;
223
+ }
224
+ if (propertyKey) {
225
+ Reflect.defineMetadata("rrst:acl", acl, target, propertyKey);
226
+ }
227
+ else {
228
+ Reflect.defineMetadata("rrst:acl", acl, target.prototype);
229
+ }
230
+ };
231
+ }
232
+ /**
233
+ * Injects the value of the specified query parameter with the given name as the value of the decorated argument. If
234
+ * no name is specified the entire request query will be injected.
235
+ *
236
+ * @param name THe name of the query parameter whose value will be injected.
237
+ */
238
+ export function Query(name = undefined) {
239
+ return function (target, propertyKey, index) {
240
+ let args = Reflect.getMetadata("rrst:args", target, propertyKey) || {};
241
+ args[index] = ["query", name];
242
+ Reflect.defineMetadata("rrst:args", args, target, propertyKey);
243
+ };
244
+ }
245
+ /**
246
+ * Injects the Express request object as the value of the decorated argument.
247
+ */
248
+ export function Request(target, propertyKey, index) {
249
+ let args = Reflect.getMetadata("rrst:args", target, propertyKey) || {};
250
+ args[index] = ["request"];
251
+ Reflect.defineMetadata("rrst:args", args, target, propertyKey);
252
+ }
253
+ /**
254
+ * Injects the Express response object as the value of the decorated argument.
255
+ */
256
+ export function Response(target, propertyKey, index) {
257
+ let args = Reflect.getMetadata("rrst:args", target, propertyKey) || {};
258
+ args[index] = ["response"];
259
+ Reflect.defineMetadata("rrst:args", args, target, propertyKey);
260
+ }
261
+ /**
262
+ * Indicates that the client must be an authenticated user with at least one of the specified role(s) to process the
263
+ * request.
264
+ *
265
+ * @param roles The role(s) that an authenticated user must have to make the request.
266
+ */
267
+ export function RequiresRole(roles) {
268
+ return function (target, propertyKey, descriptor) {
269
+ let route = Reflect.getMetadata("rrst:route", target, propertyKey) || {};
270
+ route.requiredRoles = Array.isArray(roles) ? roles : [roles];
271
+ Reflect.defineMetadata("rrst:route", route, target, propertyKey);
272
+ };
273
+ }
274
+ /**
275
+ * Indicates that the decorated class contains Express route definitions.
276
+ *
277
+ * @param paths The base path(s) that all route definitions will use.
278
+ */
279
+ export function Route(paths) {
280
+ return function (target) {
281
+ let routePaths = Reflect.getMetadata("rrst:routePaths", target.prototype) || [];
282
+ routePaths = routePaths.concat(Array.isArray(paths) ? paths : [paths]);
283
+ Reflect.defineMetadata("rrst:routePaths", routePaths, target.prototype);
284
+ };
285
+ }
286
+ /**
287
+ * Injects the underlying Socket object associated with the request as the value of the decorated argument.
288
+ * When the handler function is for a WebSocket request, the returned socket will be the newly established
289
+ * WebSocket connection.
290
+ */
291
+ export function Socket(target, propertyKey, index) {
292
+ let args = Reflect.getMetadata("rrst:args", target, propertyKey) || {};
293
+ args[index] = ["socket"];
294
+ Reflect.defineMetadata("rrst:args", args, target, propertyKey);
295
+ }
296
+ /**
297
+ * Injects the authenticated user object as the value of the decorated argument.
298
+ */
299
+ export function User(target, propertyKey, index) {
300
+ let args = Reflect.getMetadata("rrst:args", target, propertyKey) || {};
301
+ args[index] = ["user"];
302
+ Reflect.defineMetadata("rrst:args", args, target, propertyKey);
303
+ }
304
+ /**
305
+ * Indicates a validation function to execute in order to verify an incoming requests payload.
306
+ *
307
+ * @param func The validation function to execute that will verify the request payload.
308
+ */
309
+ export function Validate(func) {
310
+ return function (target, propertyKey, descriptor) {
311
+ let route = Reflect.getMetadata("rrst:route", target, propertyKey) || {};
312
+ route.validator = func;
313
+ Reflect.defineMetadata("rrst:route", route, target, propertyKey);
314
+ };
315
+ }
316
+ /**
317
+ * Indicates that the decorated function handles incoming `WebSocket` upgrade requests at the given sub-path.
318
+ *
319
+ * @param path The sub-path that the route will handle requests for.
320
+ */
321
+ export function WebSocket(path) {
322
+ return Method("ws", path);
323
+ }
324
+ //# sourceMappingURL=RouteDecorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RouteDecorators.js","sourceRoot":"","sources":["../../../src/decorators/RouteDecorators.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wEAAwE;AACxE,+EAA+E;AAC/E,OAAO,kBAAkB,CAAC;AAG1B;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAC,IAA+C;IACjE,OAAO,UAAU,MAAW,EAAE,WAAmB,EAAE,UAA8B;QAC7E,IAAI,KAAK,GAAQ,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC;QAE9E,4GAA4G;QAC5G,IAAI,KAAK,GAA0B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CA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ACN,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAa;IACnC,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * as DatabaseDecorators from "./DatabaseDecorators.js";
2
+ export * as DocDecorators from "./DocDecorators.js";
3
+ export * as EventDecorators from "./EventDecorators.js";
4
+ export * as ModelDecorators from "./ModelDecorators.js";
5
+ export * as PersistenceDecorators from "./PersistenceDecorators.js";
6
+ export * as RouteDecorators from "./RouteDecorators.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,aAAa,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC"}