@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,146 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2020-2026 Jean-Philippe Steinmetz. All rights reserved.
3
+ ///////////////////////////////////////////////////////////////////////////////
4
+ // NOTE: This is the only module in the library that is permitted to import the optional `typeorm` package at
5
+ // runtime. It is loaded dynamically by `ConnectionManager` if (and only if) a SQL datastore is configured.
6
+ import * as typeorm from "typeorm";
7
+ import { pendingTypeOrmColumns } from "../decorators/ModelDecorators.js";
8
+ import { ModelUtils } from "../models/ModelUtils.js";
9
+ /**
10
+ * Bridges framework persistence metadata (declared via the decorators in `PersistenceDecorators`) into TypeORM's
11
+ * global metadata storage so that entity classes using framework decorators behave identically to entity classes
12
+ * using TypeORM's own decorators. Registrations are deduplicated so that consumer entities decorated with real
13
+ * TypeORM decorators are never modified.
14
+ *
15
+ * @param entities The list of entity classes to register metadata for.
16
+ */
17
+ export function registerFrameworkMetadata(entities) {
18
+ const storage = typeorm.getMetadataArgsStorage();
19
+ // Drain any pending column registrations (e.g. the `_type` column added by @ChildEntity)
20
+ for (const column of pendingTypeOrmColumns.splice(0)) {
21
+ const exists = storage.columns.some((c) => c.target === column.target && c.propertyName === column.propertyName);
22
+ if (!exists) {
23
+ storage.columns.push(column);
24
+ }
25
+ }
26
+ for (const entity of entities) {
27
+ // Register a table for every class in the constructor chain that declares an explicit framework entity
28
+ // name (the framework's @Entity decorator).
29
+ for (let c = entity; c && c !== Function.prototype; c = Object.getPrototypeOf(c)) {
30
+ const entityName = Reflect.getOwnMetadata("rrst:entityName", c);
31
+ if (entityName && !storage.tables.some((t) => t.target === c)) {
32
+ storage.tables.push({
33
+ target: c,
34
+ name: entityName,
35
+ type: "regular",
36
+ orderBy: undefined,
37
+ engine: undefined,
38
+ database: undefined,
39
+ schema: undefined,
40
+ synchronize: undefined,
41
+ withoutRowid: undefined,
42
+ });
43
+ }
44
+ // Register class-level (compound) indexes
45
+ const classIndexes = Reflect.getOwnMetadata("rrst:classIndexes", c) ?? [];
46
+ for (const index of classIndexes) {
47
+ registerIndex(storage, c, index);
48
+ }
49
+ }
50
+ // Register columns and property-level indexes for every level of the prototype chain
51
+ for (let proto = entity.prototype; proto && proto !== Object.prototype; proto = Object.getPrototypeOf(proto)) {
52
+ const target = proto.constructor;
53
+ const columns = Reflect.getOwnMetadata("rrst:columns", proto) ?? [];
54
+ for (const column of columns) {
55
+ // ObjectId columns are MongoDB-specific and are not bridged
56
+ if (column.options.isObjectId) {
57
+ continue;
58
+ }
59
+ const exists = storage.columns.some((c) => c.target === target && c.propertyName === column.propertyName);
60
+ if (exists || !column.designType) {
61
+ continue;
62
+ }
63
+ storage.columns.push({
64
+ target,
65
+ propertyName: column.propertyName,
66
+ mode: "regular",
67
+ options: {
68
+ type: column.designType,
69
+ ...(column.options.name !== undefined ? { name: column.options.name } : {}),
70
+ ...(column.options.nullable !== undefined ? { nullable: column.options.nullable } : {}),
71
+ ...(column.options.primary ? { primary: true } : {}),
72
+ },
73
+ });
74
+ }
75
+ const indexes = Reflect.getOwnMetadata("rrst:indexes", proto) ?? [];
76
+ for (const index of indexes) {
77
+ registerIndex(storage, target, index);
78
+ }
79
+ }
80
+ }
81
+ }
82
+ /**
83
+ * Registers a single framework index declaration with TypeORM's metadata storage if an equivalent registration
84
+ * does not already exist.
85
+ */
86
+ function registerIndex(storage, target, index) {
87
+ const exists = storage.indices.some((i) => i.target === target &&
88
+ i.name === index.name &&
89
+ JSON.stringify(i.columns) === JSON.stringify(index.columns));
90
+ if (exists) {
91
+ return;
92
+ }
93
+ storage.indices.push({
94
+ target,
95
+ name: index.name,
96
+ columns: index.columns,
97
+ synchronize: true,
98
+ where: undefined,
99
+ unique: !!index.options.unique,
100
+ spatial: false,
101
+ fulltext: false,
102
+ nullFiltered: false,
103
+ parser: undefined,
104
+ sparse: !!index.options.sparse,
105
+ background: !!index.options.background,
106
+ concurrent: false,
107
+ expireAfterSeconds: index.options.expireAfterSeconds,
108
+ });
109
+ }
110
+ /** Tracks active DataSource instances by datastore name to support reconnection. */
111
+ const dataSources = new Map();
112
+ /**
113
+ * Establishes a TypeORM connection for the given SQL datastore configuration. If a connection with the given name
114
+ * already exists it is reused (and reconnected if necessary).
115
+ *
116
+ * @param name The name of the datastore to connect to.
117
+ * @param datastore The datastore configuration to pass to TypeORM.
118
+ * @param entities The list of entity classes assigned to this connection.
119
+ * @param url The connection URL of the database.
120
+ */
121
+ export async function connect(name, datastore, entities, url) {
122
+ // Make TypeORM's query operators available to query building utilities
123
+ ModelUtils.setTypeOrm(typeorm);
124
+ // Bridge framework-declared persistence metadata into TypeORM
125
+ registerFrameworkMetadata(entities);
126
+ let connection = dataSources.get(name);
127
+ if (connection) {
128
+ if (!connection.isInitialized) {
129
+ await connection.initialize();
130
+ }
131
+ }
132
+ else {
133
+ connection = new typeorm.DataSource({
134
+ ...datastore,
135
+ entities,
136
+ url,
137
+ });
138
+ await connection.initialize();
139
+ dataSources.set(name, connection);
140
+ if (datastore.runMigrations) {
141
+ await connection.runMigrations();
142
+ }
143
+ }
144
+ return connection;
145
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;YAC5B,MAAM,UAAU,CAAC,UAAU,EAAE,CAAC;QAClC,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,UAAU,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;YAChC,GAAG,SAAS;YACZ,QAAQ;YACR,GAAG;SACN,CAAC,CAAC;QACH,MAAM,UAAU,CAAC,UAAU,EAAE,CAAC;QAC9B,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAClC,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC;YAC1B,MAAM,UAAU,CAAC,aAAa,EAAE,CAAC;QACrC,CAAC;IACL,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./ConnectionKinds.js";
2
+ export * from "./ConnectionManager.js";
3
+ export * from "./MongoConnection.js";
4
+ export * from "./MongoRepository.js";
5
+ export * from "./MongoSchemaSync.js";
6
+ export * from "./NamingUtils.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/database/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,52 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2020-2026 Jean-Philippe Steinmetz
3
+ ///////////////////////////////////////////////////////////////////////////////
4
+ /**
5
+ * Apply this to a property to have the TypeORM `MongoRepository` for the given entity type injected at instantiation.
6
+ *
7
+ * @param {any} type The entity type whose repository will be injected.
8
+ */
9
+ export function MongoRepository(type) {
10
+ return function (target, propertyKey) {
11
+ Reflect.defineMetadata("rrst:injectMongoRepo", type, target, propertyKey);
12
+ const key = `__${String(propertyKey)}`;
13
+ Object.defineProperty(target, propertyKey, {
14
+ enumerable: true,
15
+ writable: true,
16
+ value: undefined,
17
+ });
18
+ };
19
+ }
20
+ /**
21
+ * Apply this to a property to have the TypeORM `Repository` for the given entity type injected at instantiation.
22
+ *
23
+ * @param {any} type The entity type whose repository will be injected.
24
+ */
25
+ export function Repository(type) {
26
+ return function (target, propertyKey) {
27
+ Reflect.defineMetadata("rrst:injectRepo", type, target, propertyKey);
28
+ const key = `__${String(propertyKey)}`;
29
+ Object.defineProperty(target, propertyKey, {
30
+ enumerable: true,
31
+ writable: true,
32
+ value: undefined,
33
+ });
34
+ };
35
+ }
36
+ /**
37
+ * Apply this to a property to have the `Redis` connection injected at instantiation.
38
+ *
39
+ * @param {string} name The name of the database connection to inject.
40
+ */
41
+ export function RedisConnection(name) {
42
+ return function (target, propertyKey) {
43
+ Reflect.defineMetadata("rrst:injectRedisRepo", name, target, propertyKey);
44
+ const key = `__${String(propertyKey)}`;
45
+ Object.defineProperty(target, propertyKey, {
46
+ enumerable: true,
47
+ writable: true,
48
+ value: undefined,
49
+ });
50
+ };
51
+ }
52
+ //# sourceMappingURL=DatabaseDecorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatabaseDecorators.js","sourceRoot":"","sources":["../../../src/decorators/DatabaseDecorators.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,kDAAkD;AAClD,+EAA+E;AAE/E;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAAS;IACrC,OAAO,UAAU,MAAW,EAAE,WAA4B;QACtD,OAAO,CAAC,cAAc,CAAC,sBAAsB,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QAC1E,MAAM,GAAG,GAAG,KAAK,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;YACvC,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,SAAS;SACnB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,IAAS;IAChC,OAAO,UAAU,MAAW,EAAE,WAA4B;QACtD,OAAO,CAAC,cAAc,CAAC,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QACrE,MAAM,GAAG,GAAG,KAAK,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;YACvC,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,SAAS;SACnB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IACxC,OAAO,UAAU,MAAW,EAAE,WAA4B;QACtD,OAAO,CAAC,cAAc,CAAC,sBAAsB,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QAC1E,MAAM,GAAG,GAAG,KAAK,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;YACvC,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,SAAS;SACnB,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,120 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2020-2026 Jean-Philippe Steinmetz
3
+ ///////////////////////////////////////////////////////////////////////////////
4
+ import "reflect-metadata";
5
+ /**
6
+ * Provides a set of documentation data for a given class, property or function.
7
+ *
8
+ * @param value The default value.
9
+ */
10
+ export function Document(value) {
11
+ return function (target, propertyKey) {
12
+ const docs = {
13
+ ...(propertyKey ? Reflect.getMetadata("rrst:docs", target, propertyKey) : Reflect.getMetadata("rrst:docs", target)),
14
+ ...value
15
+ };
16
+ if (propertyKey) {
17
+ Reflect.defineMetadata("rrst:docs", docs, target, propertyKey);
18
+ }
19
+ else {
20
+ Reflect.defineMetadata("rrst:docs", docs, target);
21
+ }
22
+ };
23
+ }
24
+ /**
25
+ * Provides a default value for property of a class.
26
+ *
27
+ * @param value The default value.
28
+ */
29
+ export function Default(value) {
30
+ return Document({
31
+ default: value
32
+ });
33
+ }
34
+ /**
35
+ * Provides a detailed describing the class, property or function.
36
+ *
37
+ * @param value The description of the class, property or function.
38
+ */
39
+ export function Description(value) {
40
+ return Document({
41
+ description: value
42
+ });
43
+ }
44
+ /**
45
+ * Provides a example representation of the property or function return value.
46
+ *
47
+ * @param value The example value.
48
+ */
49
+ export function Example(value) {
50
+ return Document({
51
+ example: value
52
+ });
53
+ }
54
+ /**
55
+ * Describes the underlying format of a class's property.
56
+ *
57
+ * @param value The format of the property's property.
58
+ */
59
+ export function Format(value) {
60
+ return Document({
61
+ format: value
62
+ });
63
+ }
64
+ /**
65
+ * Provides a brief summary about the class, property or function.
66
+ *
67
+ * @param value The summary of the class, property or function.
68
+ */
69
+ export function Summary(value) {
70
+ return Document({
71
+ summary: value
72
+ });
73
+ }
74
+ /**
75
+ * Provides a list of searchable tags associated with the property or function.
76
+ *
77
+ * @param value The list of searchable tags.
78
+ */
79
+ export function Tags(value) {
80
+ return Document({
81
+ tags: value
82
+ });
83
+ }
84
+ /**
85
+ * Stores runtime metadata about the typing information of a function's return value.
86
+ *
87
+ * @param types The optional return type(s) of the function. Can represent a single type (e.g. `MyClass`) or a union
88
+ * of types (e.g. `string | number | null`). When describing a generic type such as a collection this
89
+ * should be encoded as an array with the templated type as additional elements (e.g. `Array<MyClass>`
90
+ * becomes `[[Array, MyClass]]`).
91
+ */
92
+ export function Returns(types) {
93
+ return function (target, propertyKey) {
94
+ const designInfo = Reflect.getMetadata("design:type", target, propertyKey);
95
+ if (types) {
96
+ // Make sure we always store an array
97
+ types = Array.isArray(types) ? types : [types];
98
+ }
99
+ Reflect.defineMetadata("design:returntype", types !== undefined ? types : [designInfo], target, propertyKey);
100
+ };
101
+ }
102
+ /**
103
+ * Stores runtime metadata about the typing information of a class property.
104
+ *
105
+ * @param types The optional primary type(s) of the property. Can represent a single type (e.g. `MyClass`) or a union
106
+ * of types (e.g. `string | number | null`). When describing a generic type such as a collection this
107
+ * should be encoded as an array with the templated type as additional elements (e.g. `Array<MyClass>`
108
+ * becomes `[[Array, MyClass]]`).
109
+ */
110
+ export function TypeInfo(types) {
111
+ return function (target, propertyKey) {
112
+ const designInfo = Reflect.getMetadata("design:type", target, propertyKey);
113
+ if (types) {
114
+ // Make sure we always store an array
115
+ types = Array.isArray(types) ? types : [types];
116
+ }
117
+ Reflect.defineMetadata("design:type", types !== undefined ? types : [designInfo], target, propertyKey);
118
+ };
119
+ }
120
+ //# sourceMappingURL=DocDecorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocDecorators.js","sourceRoot":"","sources":["../../../src/decorators/DocDecorators.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,kDAAkD;AAClD,+EAA+E;AAC/E,OAAO,kBAAkB,CAAC;AAW1B;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAoB;IACzC,OAAO,UAAU,MAAW,EAAE,WAAoB;QAC9C,MAAM,IAAI,GAAQ;YACd,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;YACnH,GAAG,KAAK;SACX,CAAC;QAEF,IAAI,WAAW,EAAE,CAAC;YACd,OAAO,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACJ,OAAO,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;IACL,CAAC,CAAC;AACN,CAAC;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AC,UAAU,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IACjH,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAmB;IACxC,OAAO,UAAU,MAAW,EAAE,WAAmB;QAC7C,MAAM,UAAU,GAAQ,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;QAChF,IAAI,KAAK,EAAE,CAAC;YACR,qCAAqC;YACrC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,CAAC,cAAc,CAAC,aAAa,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IAC3G,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,24 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2020-2026 Jean-Philippe Steinmetz. All rights reserved.
3
+ ///////////////////////////////////////////////////////////////////////////////
4
+ import "reflect-metadata";
5
+ /**
6
+ * Apply this to a function that will be called when events arrive for the specified type(s). If no event type is
7
+ * specified, then the function will be called upon each event that arrives.
8
+ *
9
+ * @param type The name or list of names corresponding to events that the function will handle.
10
+ */
11
+ export function OnEvent(type) {
12
+ return function (target, propertyKey, descriptor) {
13
+ Reflect.defineMetadata("rrst:events", type ? type : ".*", target, propertyKey);
14
+ };
15
+ }
16
+ /**
17
+ * Apply this optionally to a abitary class, that has a no argument constructor, to auto register it as an event listener. Will still require add `@OnEvent` to methods
18
+ */
19
+ export function EventListener() {
20
+ return function (target) {
21
+ Reflect.defineMetadata("rrst:eventListeners", true, target);
22
+ };
23
+ }
24
+ //# sourceMappingURL=EventDecorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventDecorators.js","sourceRoot":"","sources":["../../../src/decorators/EventDecorators.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wEAAwE;AACxE,+EAA+E;AAC/E,OAAO,kBAAkB,CAAC;AAE1B;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,IAAwB;IAC5C,OAAO,UAAU,MAAW,EAAE,WAAmB,EAAE,UAA8B;QAC7E,OAAO,CAAC,cAAc,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;IACnF,CAAC,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IACzB,OAAO,UAAU,MAAW;QACxB,OAAO,CAAC,cAAc,CAAC,qBAAqB,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAChE,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,173 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2020-2026 Jean-Philippe Steinmetz. All rights reserved.
3
+ ///////////////////////////////////////////////////////////////////////////////
4
+ import "reflect-metadata";
5
+ /**
6
+ * The list of column registrations waiting to be bridged into TypeORM's metadata storage. This list is drained by
7
+ * the TypeORM support module when a SQL connection is created.
8
+ */
9
+ export const pendingTypeOrmColumns = [];
10
+ /**
11
+ * Indicates that the class is cacheable with the specified TTL.
12
+ *
13
+ * @param ttl The time, in seconds, that an object will be cached before being invalidated.
14
+ */
15
+ export function Cache(ttl = 30) {
16
+ return function (target) {
17
+ Reflect.defineMetadata("rrst:cacheTTL", ttl, target);
18
+ Object.defineProperty(target, "cacheTTL", {
19
+ enumerable: true,
20
+ writable: true,
21
+ value: ttl,
22
+ });
23
+ };
24
+ }
25
+ /**
26
+ * Indicates that a class is a child entity to some parent. Child entities will inherit all datastore configuration
27
+ * of the parent, including cache settings.
28
+ */
29
+ export function ChildEntity() {
30
+ return function (constructor) {
31
+ // Queue the `_type` property registration so that it gets bridged to TypeORM if a SQL connection is
32
+ // created. MongoDB connections store the `_type` instance property natively and need no registration.
33
+ pendingTypeOrmColumns.push({
34
+ target: constructor,
35
+ propertyName: "_type",
36
+ mode: "regular",
37
+ options: {},
38
+ });
39
+ Reflect.defineMetadata("rrst:childEntity", true, constructor);
40
+ // Add the property so that it becomes an instance member
41
+ const child = class extends constructor {
42
+ constructor() {
43
+ super(...arguments);
44
+ /** The class type of the instance. */
45
+ this._type = constructor.name;
46
+ }
47
+ };
48
+ Reflect.defineMetadata("rrst:childEntity", true, child);
49
+ return child;
50
+ };
51
+ }
52
+ /**
53
+ * Indicates that the class describes an entity that will be persisted in the datastore with the given name.
54
+ *
55
+ * @param datastore The name of the datastore to store records of the decorated class.
56
+ */
57
+ export function DataStore(datastore) {
58
+ return function (target) {
59
+ Reflect.defineMetadata("rrst:datastore", datastore, target);
60
+ Object.defineProperty(target, "datastore", {
61
+ enumerable: true,
62
+ writable: true,
63
+ value: datastore,
64
+ });
65
+ };
66
+ }
67
+ /**
68
+ * Apply this to a property that is considered a unique identifier.
69
+ */
70
+ export function Identifier(target, propertyKey) {
71
+ Reflect.defineMetadata("rrst:isIdentifier", true, target, propertyKey);
72
+ const key = `__${String(propertyKey)}`;
73
+ Object.defineProperty(target, propertyKey, {
74
+ enumerable: true,
75
+ writable: true,
76
+ value: undefined,
77
+ });
78
+ }
79
+ /**
80
+ * Apply this to a model class to indicate that it should be protected by the AccessControlList security system.
81
+ * The `classACL` parameter specifies the default ACL governing access to general operations against the model class
82
+ * (e.g. create, truncate, find). The `recordACL` parameter indicates whether or not per-record ACLs should be created
83
+ * for this type in order to govern access to individual record operations (e.g. delete, update, find).
84
+ *
85
+ * @param classACL The default access control list to limit access to general class operations.
86
+ * @param recordACL Set to `true` to create an ACL for each new record of the given type, otherwise set to false. Default
87
+ * is `false`.
88
+ */
89
+ export function Protect(classACL = {
90
+ uid: "<ClassName>",
91
+ records: [
92
+ {
93
+ userOrRoleId: "anonymous",
94
+ create: false,
95
+ read: true,
96
+ update: false,
97
+ delete: false,
98
+ special: false,
99
+ full: false,
100
+ },
101
+ {
102
+ userOrRoleId: ".*",
103
+ create: false,
104
+ read: true,
105
+ update: false,
106
+ delete: false,
107
+ special: false,
108
+ full: false,
109
+ },
110
+ ],
111
+ }, recordACL = false) {
112
+ return function (target) {
113
+ if (!classACL.uid || classACL.uid === "<ClassName>") {
114
+ classACL.uid = target.name;
115
+ }
116
+ Reflect.defineMetadata("rrst:classACL", classACL, target);
117
+ Object.defineProperty(target, "classACL", {
118
+ enumerable: true,
119
+ writable: false,
120
+ value: classACL,
121
+ });
122
+ Reflect.defineMetadata("rrst:recordACL", recordACL, target);
123
+ Object.defineProperty(target, "recordACL", {
124
+ enumerable: true,
125
+ writable: false,
126
+ value: recordACL,
127
+ });
128
+ };
129
+ }
130
+ /**
131
+ * Apply this to a property to indicate that the value is a reference to another stored entity.
132
+ *
133
+ * @param clazz The class type of the referenced object.
134
+ */
135
+ export function Reference(clazz) {
136
+ return function (target, propertyKey) {
137
+ Reflect.defineMetadata("rrst:reference", clazz, target, propertyKey);
138
+ };
139
+ }
140
+ /**
141
+ * Indicates that the class describes an entity that will be persisted in a sharded database collection.
142
+ *
143
+ * Note: Only supported by MongoDB.
144
+ *
145
+ * @param config The sharding configuration to pass to the database server. Default value is `{ key: { uid: 1 }, unique: false, options: {} }`.
146
+ */
147
+ export function Shard(config = { key: { uid: 1 }, unique: false, options: {} }) {
148
+ return function (target) {
149
+ Reflect.defineMetadata("rrst:shardConfig", config, target);
150
+ Object.defineProperty(target, "shardConfig", {
151
+ enumerable: true,
152
+ writable: true,
153
+ value: config,
154
+ });
155
+ };
156
+ }
157
+ /**
158
+ * Indicates that the class will track changes for each document update limited to the specified number of versions.
159
+ *
160
+ * @param versions The number of versions that will be tracked for each document change. Set to `-1` to store all
161
+ * versions. Default value is `-1`.
162
+ */
163
+ export function TrackChanges(versions = -1) {
164
+ return function (target) {
165
+ Reflect.defineMetadata("rrst:trackChanges", versions, target);
166
+ Object.defineProperty(target, "trackChanges", {
167
+ enumerable: true,
168
+ writable: true,
169
+ value: versions,
170
+ });
171
+ };
172
+ }
173
+ //# sourceMappingURL=ModelDecorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModelDecorators.js","sourceRoot":"","sources":["../../../src/decorators/ModelDecorators.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wEAAwE;AACxE,+EAA+E;AAC/E,OAAO,kBAAkB,CAAC;AAe1B;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA2B,EAAE,CAAC;AAEhE;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,MAAc,EAAE;IAClC,OAAO,UAAU,MAAW;QACxB,OAAO,CAAC,cAAc,CAAC,eAAe,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACrD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE;YACtC,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,GAAG;SACb,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW;IACvB,OAAO,UAAkD,WAAc;QACnE,oGAAoG;QACpG,sGAAsG;QACtG,qBAAqB,CAAC,IAAI,CAAC;YACvB,MAAM,EAAE,WAAW;YACnB,YAAY,EAAE,OAAO;YACrB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,EAAE;SACd,CAAC,CAAC;QAEH,OAAO,CAAC,cAAc,CAAC,kBAAkB,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;QAE9D,yDAAyD;QACzD,MAAM,KAAK,GAAG,KAAM,SAAQ,WAAW;YAAzB;;gBACV,sCAAsC;gBACtB,UAAK,GAAW,WAAW,CAAC,IAAI,CAAC;YACrD,CAAC;SAAA,CAAC;QACF,OAAO,CAAC,cAAc,CAAC,kBAAkB,EAAE,IAAI,EAAE,KAAK,C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