@rapidrest/service-core 1.0.0-rc.2 → 1.0.0-rc.21

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 (250) hide show
  1. package/dist/lib/BackgroundService.js +0 -4
  2. package/dist/lib/BackgroundService.js.map +1 -1
  3. package/dist/lib/BackgroundServiceManager.js +21 -4
  4. package/dist/lib/BackgroundServiceManager.js.map +1 -1
  5. package/dist/lib/EventListenerManager.js.map +1 -1
  6. package/dist/lib/OpenApiSpec.js +3 -2
  7. package/dist/lib/OpenApiSpec.js.map +1 -1
  8. package/dist/lib/Server.js +18 -79
  9. package/dist/lib/Server.js.map +1 -1
  10. package/dist/lib/database/TypeOrmSupport.js +18 -2
  11. package/dist/lib/database/TypeOrmSupport.js.map +1 -1
  12. package/dist/lib/decorators/DocDecorators.js +19 -1
  13. package/dist/lib/decorators/DocDecorators.js.map +1 -1
  14. package/dist/lib/decorators/PersistenceDecorators.js.map +1 -1
  15. package/dist/lib/decorators/RouteDecorators.js +71 -20
  16. package/dist/lib/decorators/RouteDecorators.js.map +1 -1
  17. package/dist/lib/http/Adapters.js +45 -2
  18. package/dist/lib/http/Adapters.js.map +1 -1
  19. package/dist/lib/http/Router.js +53 -56
  20. package/dist/lib/http/Router.js.map +1 -1
  21. package/dist/lib/models/ModelUtils.js +18 -8
  22. package/dist/lib/models/ModelUtils.js.map +1 -1
  23. package/dist/lib/models/RepoUtils.js +96 -31
  24. package/dist/lib/models/RepoUtils.js.map +1 -1
  25. package/dist/lib/routes/{AdminRoute.js → BaseAdminRoute.js} +51 -36
  26. package/dist/lib/routes/BaseAdminRoute.js.map +1 -0
  27. package/dist/lib/routes/{MetricsRoute.js → BaseMetricsRoute.js} +28 -15
  28. package/dist/lib/routes/BaseMetricsRoute.js.map +1 -0
  29. package/dist/lib/routes/{OpenAPIRoute.js → BaseOpenAPIRoute.js} +31 -32
  30. package/dist/lib/routes/BaseOpenAPIRoute.js.map +1 -0
  31. package/dist/lib/routes/BasePushRoute.js +193 -0
  32. package/dist/lib/routes/BasePushRoute.js.map +1 -0
  33. package/dist/lib/routes/BaseStaticRoute.js +152 -0
  34. package/dist/lib/routes/BaseStaticRoute.js.map +1 -0
  35. package/dist/lib/routes/BaseStatusRoute.js +79 -0
  36. package/dist/lib/routes/BaseStatusRoute.js.map +1 -0
  37. package/dist/lib/routes/CRUDRoute.js +238 -0
  38. package/dist/lib/routes/CRUDRoute.js.map +1 -0
  39. package/dist/lib/routes/ModelRoute.js +20 -28
  40. package/dist/lib/routes/ModelRoute.js.map +1 -1
  41. package/dist/lib/routes/index.js +7 -4
  42. package/dist/lib/routes/index.js.map +1 -1
  43. package/dist/lib/security/ACLUtils.js +10 -13
  44. package/dist/lib/security/ACLUtils.js.map +1 -1
  45. package/dist/lib/security/AccessControlListMongo.js +5 -1
  46. package/dist/lib/security/AccessControlListMongo.js.map +1 -1
  47. package/dist/lib/security/AccessControlListSQL.js +7 -3
  48. package/dist/lib/security/AccessControlListSQL.js.map +1 -1
  49. package/dist/lib/security/BaseACLRoute.js +239 -0
  50. package/dist/lib/security/BaseACLRoute.js.map +1 -0
  51. package/dist/lib/security/index.js +3 -0
  52. package/dist/lib/security/index.js.map +1 -1
  53. package/dist/lib/test/request.js +6 -2
  54. package/dist/lib/test/request.js.map +1 -1
  55. package/dist/types/BackgroundService.d.ts +0 -5
  56. package/dist/types/BackgroundServiceManager.d.ts +1 -1
  57. package/dist/types/EventListenerManager.d.ts +4 -4
  58. package/dist/types/Server.d.ts +21 -6
  59. package/dist/types/decorators/DocDecorators.d.ts +9 -0
  60. package/dist/types/decorators/PersistenceDecorators.d.ts +7 -0
  61. package/dist/types/decorators/RouteDecorators.d.ts +14 -5
  62. package/dist/types/http/Adapters.d.ts +19 -0
  63. package/dist/types/http/Router.d.ts +6 -6
  64. package/dist/types/models/ModelUtils.d.ts +2 -1
  65. package/dist/types/routes/BaseAdminRoute.d.ts +59 -0
  66. package/dist/types/routes/BaseMetricsRoute.d.ts +37 -0
  67. package/dist/types/routes/BaseOpenAPIRoute.d.ts +33 -0
  68. package/dist/types/routes/BasePushRoute.d.ts +39 -0
  69. package/dist/types/routes/BaseStaticRoute.d.ts +44 -0
  70. package/dist/types/routes/BaseStatusRoute.d.ts +37 -0
  71. package/dist/types/routes/CRUDRoute.d.ts +47 -0
  72. package/dist/types/routes/ModelRoute.d.ts +23 -16
  73. package/dist/types/routes/index.d.ts +7 -4
  74. package/dist/types/security/ACLUtils.d.ts +1 -1
  75. package/dist/types/security/AccessControlList.d.ts +1 -1
  76. package/dist/types/security/AccessControlListMongo.d.ts +1 -1
  77. package/dist/types/security/AccessControlListSQL.d.ts +1 -1
  78. package/dist/types/security/BaseACLRoute.d.ts +73 -0
  79. package/dist/types/security/index.d.ts +3 -0
  80. package/package.json +132 -129
  81. package/tsconfig.export.json +17 -0
  82. package/dist/lib/routes/AdminRoute.js.map +0 -1
  83. package/dist/lib/routes/MetricsRoute.js.map +0 -1
  84. package/dist/lib/routes/OpenAPIRoute.js.map +0 -1
  85. package/dist/lib/routes/StatusRoute.js +0 -55
  86. package/dist/lib/routes/StatusRoute.js.map +0 -1
  87. package/dist/lib/security/ACLRouteMongo.js +0 -194
  88. package/dist/lib/security/ACLRouteMongo.js.map +0 -1
  89. package/dist/lib/security/ACLRouteSQL.js +0 -193
  90. package/dist/lib/security/ACLRouteSQL.js.map +0 -1
  91. package/dist/types/routes/AdminRoute.d.ts +0 -47
  92. package/dist/types/routes/MetricsRoute.d.ts +0 -15
  93. package/dist/types/routes/OpenAPIRoute.d.ts +0 -17
  94. package/dist/types/routes/StatusRoute.d.ts +0 -11
  95. package/dist/types/security/ACLRouteMongo.d.ts +0 -19
  96. package/dist/types/security/ACLRouteSQL.d.ts +0 -19
  97. package/docs/Makefile +0 -20
  98. package/docs/conf.py +0 -58
  99. package/docs/index.rst +0 -17
  100. package/docs/make.bat +0 -35
  101. package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/README.md +0 -13
  102. package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/MongoRepository.md +0 -25
  103. package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/RedisConnection.md +0 -25
  104. package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/Repository.md +0 -25
  105. package/docs/reference/@rapidrest/namespaces/DocDecorators/README.md +0 -23
  106. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Default.md +0 -25
  107. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Description.md +0 -25
  108. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Document.md +0 -25
  109. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Example.md +0 -25
  110. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Format.md +0 -25
  111. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Returns.md +0 -28
  112. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Summary.md +0 -25
  113. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Tags.md +0 -25
  114. package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/TypeInfo.md +0 -28
  115. package/docs/reference/@rapidrest/namespaces/DocDecorators/interfaces/DocumentsData.md +0 -57
  116. package/docs/reference/@rapidrest/namespaces/EventDecorators/README.md +0 -12
  117. package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/EventListener.md +0 -17
  118. package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/OnEvent.md +0 -26
  119. package/docs/reference/@rapidrest/namespaces/ModelDecorators/README.md +0 -26
  120. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Cache.md +0 -25
  121. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/ChildEntity.md +0 -18
  122. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/DataStore.md +0 -25
  123. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Identifier.md +0 -27
  124. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Protect.md +0 -35
  125. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Reference.md +0 -25
  126. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Shard.md +0 -27
  127. package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/TrackChanges.md +0 -26
  128. package/docs/reference/@rapidrest/namespaces/ModelDecorators/interfaces/PendingTypeOrmColumn.md +0 -45
  129. package/docs/reference/@rapidrest/namespaces/ModelDecorators/variables/pendingTypeOrmColumns.md +0 -14
  130. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/README.md +0 -27
  131. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Column.md +0 -25
  132. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Entity.md +0 -25
  133. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Index.md +0 -119
  134. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/PrimaryColumn.md +0 -25
  135. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Unique.md +0 -68
  136. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getColumnMetadata.md +0 -26
  137. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getEntityName.md +0 -26
  138. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getIndexMetadata.md +0 -27
  139. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/CollationOptions.md +0 -79
  140. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnInfo.md +0 -41
  141. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnOptions.md +0 -51
  142. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/EntityOptions.md +0 -32
  143. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexInfo.md +0 -41
  144. package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexOptions.md +0 -61
  145. package/docs/reference/@rapidrest/namespaces/RouteDecorators/README.md +0 -36
  146. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/After.md +0 -26
  147. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Auth.md +0 -33
  148. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/AuthResult.md +0 -31
  149. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Before.md +0 -25
  150. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/ContentType.md +0 -25
  151. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Delete.md +0 -25
  152. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Get.md +0 -25
  153. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Head.md +0 -25
  154. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Header.md +0 -25
  155. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Method.md +0 -31
  156. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Model.md +0 -25
  157. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Options.md +0 -25
  158. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Param.md +0 -26
  159. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Patch.md +0 -25
  160. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Post.md +0 -25
  161. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Protect.md +0 -31
  162. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Put.md +0 -25
  163. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Query.md +0 -26
  164. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Request.md +0 -31
  165. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/RequiresRole.md +0 -26
  166. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Response.md +0 -31
  167. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Route.md +0 -25
  168. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Socket.md +0 -33
  169. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/User.md +0 -31
  170. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Validate.md +0 -25
  171. package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/WebSocket.md +0 -25
  172. package/docs/reference/README.md +0 -20
  173. package/docs/reference/classes/ACLUtils.md +0 -263
  174. package/docs/reference/classes/AdminRoute.md +0 -51
  175. package/docs/reference/classes/AuthMiddleware.md +0 -173
  176. package/docs/reference/classes/BackgroundService.md +0 -117
  177. package/docs/reference/classes/BackgroundServiceManager.md +0 -172
  178. package/docs/reference/classes/BaseEntity.md +0 -82
  179. package/docs/reference/classes/BaseMongoEntity.md +0 -107
  180. package/docs/reference/classes/BasicStrategy.md +0 -131
  181. package/docs/reference/classes/BasicStrategyOptions.md +0 -115
  182. package/docs/reference/classes/BulkError.md +0 -271
  183. package/docs/reference/classes/ConnectionManager.md +0 -75
  184. package/docs/reference/classes/EventListenerManager.md +0 -88
  185. package/docs/reference/classes/HttpRouter.md +0 -343
  186. package/docs/reference/classes/JWTStrategy.md +0 -100
  187. package/docs/reference/classes/JWTStrategyOptions.md +0 -97
  188. package/docs/reference/classes/MetricsRoute.md +0 -27
  189. package/docs/reference/classes/ModelRoute.md +0 -527
  190. package/docs/reference/classes/ModelUtils.md +0 -430
  191. package/docs/reference/classes/MongoConnection.md +0 -218
  192. package/docs/reference/classes/MongoRepository.md +0 -390
  193. package/docs/reference/classes/MongoSchemaSync.md +0 -97
  194. package/docs/reference/classes/NetUtils.md +0 -90
  195. package/docs/reference/classes/NotificationUtils.md +0 -77
  196. package/docs/reference/classes/ObjectFactory.md +0 -336
  197. package/docs/reference/classes/OpenAPIRoute.md +0 -77
  198. package/docs/reference/classes/OpenApiSpec.md +0 -892
  199. package/docs/reference/classes/RecoverableBaseEntity.md +0 -114
  200. package/docs/reference/classes/RecoverableBaseMongoEntity.md +0 -124
  201. package/docs/reference/classes/RedisTransport.md +0 -2202
  202. package/docs/reference/classes/RepoUtils.md +0 -482
  203. package/docs/reference/classes/RouteUtils.md +0 -191
  204. package/docs/reference/classes/Server.md +0 -408
  205. package/docs/reference/classes/SimpleEntity.md +0 -48
  206. package/docs/reference/classes/SimpleMongoEntity.md +0 -66
  207. package/docs/reference/classes/StatusExtraData.md +0 -57
  208. package/docs/reference/classes/StatusRoute.md +0 -26
  209. package/docs/reference/classes/UWSRequest.md +0 -226
  210. package/docs/reference/classes/UWSResponse.md +0 -257
  211. package/docs/reference/classes/UWSWebSocketShim.md +0 -958
  212. package/docs/reference/enumerations/ACLAction.md +0 -63
  213. package/docs/reference/enumerations/ApiErrorMessages.md +0 -123
  214. package/docs/reference/enumerations/ApiErrors.md +0 -123
  215. package/docs/reference/functions/createWebSocketStream.md +0 -27
  216. package/docs/reference/functions/isSqlDataSource.md +0 -26
  217. package/docs/reference/functions/readBody.md +0 -29
  218. package/docs/reference/functions/resolveCollectionName.md +0 -33
  219. package/docs/reference/functions/runChain.md +0 -40
  220. package/docs/reference/functions/snakeCase.md +0 -28
  221. package/docs/reference/globals.md +0 -106
  222. package/docs/reference/interfaces/ACLRecord.md +0 -96
  223. package/docs/reference/interfaces/AccessControlList.md +0 -76
  224. package/docs/reference/interfaces/AuthResult.md +0 -55
  225. package/docs/reference/interfaces/AuthStrategy.md +0 -95
  226. package/docs/reference/interfaces/CreateRequestOptions.md +0 -121
  227. package/docs/reference/interfaces/DeleteRequestOptions.md +0 -137
  228. package/docs/reference/interfaces/FindRequestOptions.md +0 -133
  229. package/docs/reference/interfaces/HttpRequest.md +0 -147
  230. package/docs/reference/interfaces/HttpResponse.md +0 -164
  231. package/docs/reference/interfaces/JWTAuthResult.md +0 -84
  232. package/docs/reference/interfaces/RepoCreateOptions.md +0 -95
  233. package/docs/reference/interfaces/RepoDeleteOptions.md +0 -105
  234. package/docs/reference/interfaces/RepoFindOptions.md +0 -125
  235. package/docs/reference/interfaces/RepoOperationOptions.md +0 -69
  236. package/docs/reference/interfaces/RepoUpdateOptions.md +0 -101
  237. package/docs/reference/interfaces/RequestOptions.md +0 -112
  238. package/docs/reference/interfaces/RequestWS.md +0 -225
  239. package/docs/reference/interfaces/TruncateRequestOptions.md +0 -161
  240. package/docs/reference/interfaces/UpdateRequestOptions.md +0 -139
  241. package/docs/reference/type-aliases/ErrorHandler.md +0 -35
  242. package/docs/reference/type-aliases/NextFunction.md +0 -23
  243. package/docs/reference/type-aliases/OneOrMany.md +0 -19
  244. package/docs/reference/type-aliases/OneOrNull.md +0 -19
  245. package/docs/reference/type-aliases/PartialBaseEntity.md +0 -17
  246. package/docs/reference/type-aliases/PartialSimpleEntity.md +0 -17
  247. package/docs/reference/type-aliases/RequestHandler.md +0 -31
  248. package/docs/reference/type-aliases/UpdateObject.md +0 -19
  249. package/docs/reference/type-aliases/WsUpgradeAuth.md +0 -27
  250. package/docs/reference/type-aliases/WsUpgradeAuthResult.md +0 -47
@@ -1,63 +0,0 @@
1
- [**@rapidrest/service-core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/service-core](../globals.md) / ACLAction
6
-
7
- # Enumeration: ACLAction
8
-
9
- Defined in: [src/security/AccessControlList.ts:10](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/security/AccessControlList.ts#L10)
10
-
11
- Describes the various permission actions that can be performed against an entity.
12
-
13
- ## Author
14
-
15
- Jean-Philippe Steinmetz <rapidrests@gmail.com>
16
-
17
- ## Enumeration Members
18
-
19
- ### CREATE
20
-
21
- > **CREATE**: `"CREATE"`
22
-
23
- Defined in: [src/security/AccessControlList.ts:11](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/security/AccessControlList.ts#L11)
24
-
25
- ***
26
-
27
- ### DELETE
28
-
29
- > **DELETE**: `"DELETE"`
30
-
31
- Defined in: [src/security/AccessControlList.ts:12](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/security/AccessControlList.ts#L12)
32
-
33
- ***
34
-
35
- ### FULL
36
-
37
- > **FULL**: `"FULL"`
38
-
39
- Defined in: [src/security/AccessControlList.ts:13](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/security/AccessControlList.ts#L13)
40
-
41
- ***
42
-
43
- ### READ
44
-
45
- > **READ**: `"READ"`
46
-
47
- Defined in: [src/security/AccessControlList.ts:14](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/security/AccessControlList.ts#L14)
48
-
49
- ***
50
-
51
- ### SPECIAL
52
-
53
- > **SPECIAL**: `"SPECIAL"`
54
-
55
- Defined in: [src/security/AccessControlList.ts:15](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/security/AccessControlList.ts#L15)
56
-
57
- ***
58
-
59
- ### UPDATE
60
-
61
- > **UPDATE**: `"UPDATE"`
62
-
63
- Defined in: [src/security/AccessControlList.ts:16](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/security/AccessControlList.ts#L16)
@@ -1,123 +0,0 @@
1
- [**@rapidrest/service-core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/service-core](../globals.md) / ApiErrorMessages
6
-
7
- # Enumeration: ApiErrorMessages
8
-
9
- Defined in: [src/ApiErrors.ts:24](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L24)
10
-
11
- Defines the default message of all common API errors.
12
-
13
- ## Enumeration Members
14
-
15
- ### AUTH\_FAILED
16
-
17
- > **AUTH\_FAILED**: `"Invalid or missing authentication token."`
18
-
19
- Defined in: [src/ApiErrors.ts:37](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L37)
20
-
21
- ***
22
-
23
- ### AUTH\_PERMISSION\_FAILURE
24
-
25
- > **AUTH\_PERMISSION\_FAILURE**: `"User does not have permission to perform this action."`
26
-
27
- Defined in: [src/ApiErrors.ts:38](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L38)
28
-
29
- ***
30
-
31
- ### AUTH\_REQUIRED
32
-
33
- > **AUTH\_REQUIRED**: `"Authorization is required to access this resource."`
34
-
35
- Defined in: [src/ApiErrors.ts:36](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L36)
36
-
37
- ***
38
-
39
- ### BULK\_CREATE\_FAILURE
40
-
41
- > **BULK\_CREATE\_FAILURE**: `"Failed to create one or more objects."`
42
-
43
- Defined in: [src/ApiErrors.ts:34](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L34)
44
-
45
- ***
46
-
47
- ### BULK\_UPDATE\_FAILURE
48
-
49
- > **BULK\_UPDATE\_FAILURE**: `"Failed to update one or more objects."`
50
-
51
- Defined in: [src/ApiErrors.ts:35](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L35)
52
-
53
- ***
54
-
55
- ### IDENTIFIER\_EXISTS
56
-
57
- > **IDENTIFIER\_EXISTS**: `"A resource with that identifier already exists."`
58
-
59
- Defined in: [src/ApiErrors.ts:29](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L29)
60
-
61
- ***
62
-
63
- ### INTERNAL\_ERROR
64
-
65
- > **INTERNAL\_ERROR**: `"An internal error has occurred. Please contact the adminstrator."`
66
-
67
- Defined in: [src/ApiErrors.ts:26](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L26)
68
-
69
- ***
70
-
71
- ### INVALID\_OBJECT\_VERSION
72
-
73
- > **INVALID\_OBJECT\_VERSION**: `"Invalid object version. Do you have the latest version?"`
74
-
75
- Defined in: [src/ApiErrors.ts:30](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L30)
76
-
77
- ***
78
-
79
- ### INVALID\_REQUEST
80
-
81
- > **INVALID\_REQUEST**: `"Invalid message or request."`
82
-
83
- Defined in: [src/ApiErrors.ts:27](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L27)
84
-
85
- ***
86
-
87
- ### NOT\_FOUND
88
-
89
- > **NOT\_FOUND**: `"No resource could be found with the specified identifier."`
90
-
91
- Defined in: [src/ApiErrors.ts:28](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L28)
92
-
93
- ***
94
-
95
- ### OBJECT\_ID\_MISMATCH
96
-
97
- > **OBJECT\_ID\_MISMATCH**: `"The object provided does not match the identifier given."`
98
-
99
- Defined in: [src/ApiErrors.ts:31](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L31)
100
-
101
- ***
102
-
103
- ### SEARCH\_INVALID\_ME\_REFERENCE
104
-
105
- > **SEARCH\_INVALID\_ME\_REFERENCE**: `` "Use of the `me` reference requires authentication." ``
106
-
107
- Defined in: [src/ApiErrors.ts:33](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L33)
108
-
109
- ***
110
-
111
- ### SEARCH\_INVALID\_RANGE
112
-
113
- > **SEARCH\_INVALID\_RANGE**: `"Invalid range value: '{{value}}'. Expected 2 arguments, got {{length}}"`
114
-
115
- Defined in: [src/ApiErrors.ts:32](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L32)
116
-
117
- ***
118
-
119
- ### UNKNOWN
120
-
121
- > **UNKNOWN**: `"An unknown error has occurred. Please try again."`
122
-
123
- Defined in: [src/ApiErrors.ts:25](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L25)
@@ -1,123 +0,0 @@
1
- [**@rapidrest/service-core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/service-core](../globals.md) / ApiErrors
6
-
7
- # Enumeration: ApiErrors
8
-
9
- Defined in: [src/ApiErrors.ts:4](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L4)
10
-
11
- Defines the unique codes for all common API errors.
12
-
13
- ## Enumeration Members
14
-
15
- ### AUTH\_FAILED
16
-
17
- > **AUTH\_FAILED**: `"api-101"`
18
-
19
- Defined in: [src/ApiErrors.ts:17](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L17)
20
-
21
- ***
22
-
23
- ### AUTH\_PERMISSION\_FAILURE
24
-
25
- > **AUTH\_PERMISSION\_FAILURE**: `"api-102"`
26
-
27
- Defined in: [src/ApiErrors.ts:18](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L18)
28
-
29
- ***
30
-
31
- ### AUTH\_REQUIRED
32
-
33
- > **AUTH\_REQUIRED**: `"api-100"`
34
-
35
- Defined in: [src/ApiErrors.ts:16](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L16)
36
-
37
- ***
38
-
39
- ### BULK\_CREATE\_FAILURE
40
-
41
- > **BULK\_CREATE\_FAILURE**: `"api-021"`
42
-
43
- Defined in: [src/ApiErrors.ts:14](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L14)
44
-
45
- ***
46
-
47
- ### BULK\_UPDATE\_FAILURE
48
-
49
- > **BULK\_UPDATE\_FAILURE**: `"api-022"`
50
-
51
- Defined in: [src/ApiErrors.ts:15](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L15)
52
-
53
- ***
54
-
55
- ### IDENTIFIER\_EXISTS
56
-
57
- > **IDENTIFIER\_EXISTS**: `"api-011"`
58
-
59
- Defined in: [src/ApiErrors.ts:9](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L9)
60
-
61
- ***
62
-
63
- ### INTERNAL\_ERROR
64
-
65
- > **INTERNAL\_ERROR**: `"api-002"`
66
-
67
- Defined in: [src/ApiErrors.ts:6](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L6)
68
-
69
- ***
70
-
71
- ### INVALID\_OBJECT\_VERSION
72
-
73
- > **INVALID\_OBJECT\_VERSION**: `"api-012"`
74
-
75
- Defined in: [src/ApiErrors.ts:10](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L10)
76
-
77
- ***
78
-
79
- ### INVALID\_REQUEST
80
-
81
- > **INVALID\_REQUEST**: `"api-003"`
82
-
83
- Defined in: [src/ApiErrors.ts:7](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L7)
84
-
85
- ***
86
-
87
- ### NOT\_FOUND
88
-
89
- > **NOT\_FOUND**: `"api-010"`
90
-
91
- Defined in: [src/ApiErrors.ts:8](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L8)
92
-
93
- ***
94
-
95
- ### OBJECT\_ID\_MISMATCH
96
-
97
- > **OBJECT\_ID\_MISMATCH**: `"api-013"`
98
-
99
- Defined in: [src/ApiErrors.ts:11](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L11)
100
-
101
- ***
102
-
103
- ### SEARCH\_INVALID\_ME\_REFERENCE
104
-
105
- > **SEARCH\_INVALID\_ME\_REFERENCE**: `"api-015"`
106
-
107
- Defined in: [src/ApiErrors.ts:13](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L13)
108
-
109
- ***
110
-
111
- ### SEARCH\_INVALID\_RANGE
112
-
113
- > **SEARCH\_INVALID\_RANGE**: `"api-014"`
114
-
115
- Defined in: [src/ApiErrors.ts:12](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L12)
116
-
117
- ***
118
-
119
- ### UNKNOWN
120
-
121
- > **UNKNOWN**: `"api-001"`
122
-
123
- Defined in: [src/ApiErrors.ts:5](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ApiErrors.ts#L5)
@@ -1,27 +0,0 @@
1
- [**@rapidrest/service-core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/service-core](../globals.md) / createWebSocketStream
6
-
7
- # Function: createWebSocketStream()
8
-
9
- > **createWebSocketStream**(`shim`): `Duplex`
10
-
11
- Defined in: [src/http/WebSocket.ts:85](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/http/WebSocket.ts#L85)
12
-
13
- Creates a Node.js `Duplex` stream from a `UWSWebSocketShim`, compatible with the
14
- `createWebSocketStream` API from the `ws` library.
15
-
16
- Incoming WebSocket messages are pushed as readable data; writes to the stream are
17
- forwarded as WebSocket messages.
18
-
19
- ## Parameters
20
-
21
- ### shim
22
-
23
- [`UWSWebSocketShim`](../classes/UWSWebSocketShim.md)
24
-
25
- ## Returns
26
-
27
- `Duplex`
@@ -1,26 +0,0 @@
1
- [**@rapidrest/service-core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/service-core](../globals.md) / isSqlDataSource
6
-
7
- # Function: isSqlDataSource()
8
-
9
- > **isSqlDataSource**(`conn`): `boolean`
10
-
11
- Defined in: [src/database/ConnectionKinds.ts:12](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/database/ConnectionKinds.ts#L12)
12
-
13
- Determines whether the given connection object is a TypeORM `DataSource` for a SQL database. This check is
14
- performed without importing the optional `typeorm` package by duck-typing the connection object.
15
-
16
- ## Parameters
17
-
18
- ### conn
19
-
20
- `any`
21
-
22
- The connection object to inspect.
23
-
24
- ## Returns
25
-
26
- `boolean`
@@ -1,29 +0,0 @@
1
- [**@rapidrest/service-core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/service-core](../globals.md) / readBody
6
-
7
- # Function: readBody()
8
-
9
- > **readBody**(`uwsRes`, `req`): `Promise`\<`void`\>
10
-
11
- Defined in: [src/http/Adapters.ts:224](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/http/Adapters.ts#L224)
12
-
13
- Reads the full request body from a uWS response object as a Buffer.
14
- Body parsing (JSON / URL-encoded) is applied based on content-type and the result
15
- is cached on `req.body` / `req.rawBody`.
16
-
17
- ## Parameters
18
-
19
- ### uwsRes
20
-
21
- `HttpResponse`
22
-
23
- ### req
24
-
25
- [`UWSRequest`](../classes/UWSRequest.md)
26
-
27
- ## Returns
28
-
29
- `Promise`\<`void`\>
@@ -1,33 +0,0 @@
1
- [**@rapidrest/service-core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/service-core](../globals.md) / resolveCollectionName
6
-
7
- # Function: resolveCollectionName()
8
-
9
- > **resolveCollectionName**(`clazz`): `string`
10
-
11
- Defined in: [src/database/NamingUtils.ts:39](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/database/NamingUtils.ts#L39)
12
-
13
- Resolves the name of the database collection (or table) that records of the given model class are stored in.
14
-
15
- The name is resolved using the following rules:
16
- 1. The nearest class in the inheritance chain (starting with `clazz` itself) that specifies an explicit
17
- entity name via the `@Entity(options)` decorator.
18
- 2. Otherwise, the most ancestral class in the inheritance chain that declares its own `@DataStore` binding.
19
- This ensures that `@ChildEntity` subclasses are stored in the same collection as their parent entity
20
- (single collection inheritance).
21
- 3. Otherwise, the snake_case form of the class name.
22
-
23
- ## Parameters
24
-
25
- ### clazz
26
-
27
- `any`
28
-
29
- The model class to resolve the collection name for.
30
-
31
- ## Returns
32
-
33
- `string`
@@ -1,40 +0,0 @@
1
- [**@rapidrest/service-core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/service-core](../globals.md) / runChain
6
-
7
- # Function: runChain()
8
-
9
- > **runChain**(`handlers`, `req`, `res`): `Promise`\<`void`\>
10
-
11
- Defined in: [src/http/Router.ts:43](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/http/Router.ts#L43)
12
-
13
- Runs an ordered array of middleware handlers sequentially, Express-style.
14
- Supports both 3-param `(req, res, next)` handlers and 4-param `(err, req, res, next)`
15
- error handlers. On error, execution skips to the next error handler.
16
-
17
- Each handler is awaited via a Promise that resolves when next() is called, not when
18
- the handler's return value resolves. This correctly handles: (1) sync handlers that
19
- call next() synchronously, (2) async handlers that return next() or await before
20
- calling it, and (3) sync handlers that schedule next() via callbacks such as
21
- setTimeout or socket.once. The chain terminates early when a handler ends the
22
- response without calling next().
23
-
24
- ## Parameters
25
-
26
- ### handlers
27
-
28
- [`RequestHandler`](../type-aliases/RequestHandler.md)[]
29
-
30
- ### req
31
-
32
- [`HttpRequest`](../interfaces/HttpRequest.md)
33
-
34
- ### res
35
-
36
- [`HttpResponse`](../interfaces/HttpResponse.md)
37
-
38
- ## Returns
39
-
40
- `Promise`\<`void`\>
@@ -1,28 +0,0 @@
1
- [**@rapidrest/service-core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/service-core](../globals.md) / snakeCase
6
-
7
- # Function: snakeCase()
8
-
9
- > **snakeCase**(`str`): `string`
10
-
11
- Defined in: [src/database/NamingUtils.ts:15](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/database/NamingUtils.ts#L15)
12
-
13
- Converts a string into snake_case.
14
-
15
- Note: This function is intentionally identical in behavior to TypeORM's `snakeCase` utility so that
16
- collection/table names derived from class names remain stable for existing deployments.
17
-
18
- ## Parameters
19
-
20
- ### str
21
-
22
- `string`
23
-
24
- The string to convert.
25
-
26
- ## Returns
27
-
28
- `string`
@@ -1,106 +0,0 @@
1
- [**@rapidrest/service-core**](README.md)
2
-
3
- ***
4
-
5
- # @rapidrest/service-core
6
-
7
- ## Namespaces
8
-
9
- - [DatabaseDecorators](@rapidrest/namespaces/DatabaseDecorators/README.md)
10
- - [DocDecorators](@rapidrest/namespaces/DocDecorators/README.md)
11
- - [EventDecorators](@rapidrest/namespaces/EventDecorators/README.md)
12
- - [ModelDecorators](@rapidrest/namespaces/ModelDecorators/README.md)
13
- - [PersistenceDecorators](@rapidrest/namespaces/PersistenceDecorators/README.md)
14
- - [RouteDecorators](@rapidrest/namespaces/RouteDecorators/README.md)
15
-
16
- ## Enumerations
17
-
18
- - [ACLAction](enumerations/ACLAction.md)
19
- - [ApiErrorMessages](enumerations/ApiErrorMessages.md)
20
- - [ApiErrors](enumerations/ApiErrors.md)
21
-
22
- ## Classes
23
-
24
- - [ACLUtils](classes/ACLUtils.md)
25
- - [AdminRoute](classes/AdminRoute.md)
26
- - [AuthMiddleware](classes/AuthMiddleware.md)
27
- - [BackgroundService](classes/BackgroundService.md)
28
- - [BackgroundServiceManager](classes/BackgroundServiceManager.md)
29
- - [BaseEntity](classes/BaseEntity.md)
30
- - [BaseMongoEntity](classes/BaseMongoEntity.md)
31
- - [BasicStrategy](classes/BasicStrategy.md)
32
- - [BasicStrategyOptions](classes/BasicStrategyOptions.md)
33
- - [BulkError](classes/BulkError.md)
34
- - [ConnectionManager](classes/ConnectionManager.md)
35
- - [EventListenerManager](classes/EventListenerManager.md)
36
- - [HttpRouter](classes/HttpRouter.md)
37
- - [JWTStrategy](classes/JWTStrategy.md)
38
- - [JWTStrategyOptions](classes/JWTStrategyOptions.md)
39
- - [MetricsRoute](classes/MetricsRoute.md)
40
- - [ModelRoute](classes/ModelRoute.md)
41
- - [ModelUtils](classes/ModelUtils.md)
42
- - [MongoConnection](classes/MongoConnection.md)
43
- - [MongoRepository](classes/MongoRepository.md)
44
- - [MongoSchemaSync](classes/MongoSchemaSync.md)
45
- - [NetUtils](classes/NetUtils.md)
46
- - [NotificationUtils](classes/NotificationUtils.md)
47
- - [ObjectFactory](classes/ObjectFactory.md)
48
- - [OpenAPIRoute](classes/OpenAPIRoute.md)
49
- - [OpenApiSpec](classes/OpenApiSpec.md)
50
- - [RecoverableBaseEntity](classes/RecoverableBaseEntity.md)
51
- - [RecoverableBaseMongoEntity](classes/RecoverableBaseMongoEntity.md)
52
- - [RedisTransport](classes/RedisTransport.md)
53
- - [RepoUtils](classes/RepoUtils.md)
54
- - [RouteUtils](classes/RouteUtils.md)
55
- - [Server](classes/Server.md)
56
- - [SimpleEntity](classes/SimpleEntity.md)
57
- - [SimpleMongoEntity](classes/SimpleMongoEntity.md)
58
- - [StatusExtraData](classes/StatusExtraData.md)
59
- - [StatusRoute](classes/StatusRoute.md)
60
- - [UWSRequest](classes/UWSRequest.md)
61
- - [UWSResponse](classes/UWSResponse.md)
62
- - [UWSWebSocketShim](classes/UWSWebSocketShim.md)
63
-
64
- ## Interfaces
65
-
66
- - [AccessControlList](interfaces/AccessControlList.md)
67
- - [ACLRecord](interfaces/ACLRecord.md)
68
- - [AuthResult](interfaces/AuthResult.md)
69
- - [AuthStrategy](interfaces/AuthStrategy.md)
70
- - [CreateRequestOptions](interfaces/CreateRequestOptions.md)
71
- - [DeleteRequestOptions](interfaces/DeleteRequestOptions.md)
72
- - [FindRequestOptions](interfaces/FindRequestOptions.md)
73
- - [HttpRequest](interfaces/HttpRequest.md)
74
- - [HttpResponse](interfaces/HttpResponse.md)
75
- - [JWTAuthResult](interfaces/JWTAuthResult.md)
76
- - [RepoCreateOptions](interfaces/RepoCreateOptions.md)
77
- - [RepoDeleteOptions](interfaces/RepoDeleteOptions.md)
78
- - [RepoFindOptions](interfaces/RepoFindOptions.md)
79
- - [RepoOperationOptions](interfaces/RepoOperationOptions.md)
80
- - [RepoUpdateOptions](interfaces/RepoUpdateOptions.md)
81
- - [RequestOptions](interfaces/RequestOptions.md)
82
- - [RequestWS](interfaces/RequestWS.md)
83
- - [TruncateRequestOptions](interfaces/TruncateRequestOptions.md)
84
- - [UpdateRequestOptions](interfaces/UpdateRequestOptions.md)
85
-
86
- ## Type Aliases
87
-
88
- - [ErrorHandler](type-aliases/ErrorHandler.md)
89
- - [NextFunction](type-aliases/NextFunction.md)
90
- - [OneOrMany](type-aliases/OneOrMany.md)
91
- - [OneOrNull](type-aliases/OneOrNull.md)
92
- - [PartialBaseEntity](type-aliases/PartialBaseEntity.md)
93
- - [PartialSimpleEntity](type-aliases/PartialSimpleEntity.md)
94
- - [RequestHandler](type-aliases/RequestHandler.md)
95
- - [UpdateObject](type-aliases/UpdateObject.md)
96
- - [WsUpgradeAuth](type-aliases/WsUpgradeAuth.md)
97
- - [WsUpgradeAuthResult](type-aliases/WsUpgradeAuthResult.md)
98
-
99
- ## Functions
100
-
101
- - [createWebSocketStream](functions/createWebSocketStream.md)
102
- - [isSqlDataSource](functions/isSqlDataSource.md)
103
- - [readBody](functions/readBody.md)
104
- - [resolveCollectionName](functions/resolveCollectionName.md)
105
- - [runChain](functions/runChain.md)
106
- - [snakeCase](functions/snakeCase.md)