@rapidrest/service-core 1.0.0-rc.9 → 1.0.0
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.
- package/LICENSE +382 -23
- package/README.md +79 -5
- package/dist/lib/ApiErrors.js +10 -0
- package/dist/lib/ApiErrors.js.map +1 -1
- package/dist/lib/BackgroundService.js +1 -4
- package/dist/lib/BackgroundService.js.map +1 -1
- package/dist/lib/BackgroundServiceManager.js +47 -6
- package/dist/lib/BackgroundServiceManager.js.map +1 -1
- package/dist/lib/BulkError.js +4 -0
- package/dist/lib/BulkError.js.map +1 -1
- package/dist/lib/EventListenerManager.js +53 -18
- package/dist/lib/EventListenerManager.js.map +1 -1
- package/dist/lib/NetUtils.js +1 -0
- package/dist/lib/NetUtils.js.map +1 -1
- package/dist/lib/NotificationUtils.js +27 -8
- package/dist/lib/NotificationUtils.js.map +1 -1
- package/dist/lib/ObjectFactory.js +25 -44
- package/dist/lib/ObjectFactory.js.map +1 -1
- package/dist/lib/OpenApiSpec.js +31 -11
- package/dist/lib/OpenApiSpec.js.map +1 -1
- package/dist/lib/Server.js +74 -110
- package/dist/lib/Server.js.map +1 -1
- package/dist/lib/auth/AuthMiddleware.js +11 -16
- package/dist/lib/auth/AuthMiddleware.js.map +1 -1
- package/dist/lib/auth/JWTStrategy.js +68 -17
- package/dist/lib/auth/JWTStrategy.js.map +1 -1
- package/dist/lib/auth/index.js +0 -1
- package/dist/lib/auth/index.js.map +1 -1
- package/dist/lib/database/ConnectionKinds.js +15 -0
- package/dist/lib/database/ConnectionKinds.js.map +1 -1
- package/dist/lib/database/ConnectionManager.js +140 -61
- package/dist/lib/database/ConnectionManager.js.map +1 -1
- package/dist/lib/database/MongoConnection.js +13 -3
- package/dist/lib/database/MongoConnection.js.map +1 -1
- package/dist/lib/database/MongoRepository.js +61 -15
- package/dist/lib/database/MongoRepository.js.map +1 -1
- package/dist/lib/database/MongoSchemaSync.js +3 -3
- package/dist/lib/database/MongoSchemaSync.js.map +1 -1
- package/dist/lib/database/NamingUtils.js +3 -2
- package/dist/lib/database/NamingUtils.js.map +1 -1
- package/dist/lib/database/RedisCache.js +64 -0
- package/dist/lib/database/RedisCache.js.map +1 -0
- package/dist/lib/database/TypeOrmSupport.js +53 -13
- package/dist/lib/database/TypeOrmSupport.js.map +1 -1
- package/dist/lib/database/index.js +1 -0
- package/dist/lib/database/index.js.map +1 -1
- package/dist/lib/decorators/DatabaseDecorators.js +264 -20
- package/dist/lib/decorators/DatabaseDecorators.js.map +1 -1
- package/dist/lib/decorators/DocDecorators.js +30 -9
- package/dist/lib/decorators/DocDecorators.js.map +1 -1
- package/dist/lib/decorators/EventDecorators.js +1 -0
- package/dist/lib/decorators/EventDecorators.js.map +1 -1
- package/dist/lib/decorators/ModelDecorators.js +39 -23
- package/dist/lib/decorators/ModelDecorators.js.map +1 -1
- package/dist/lib/decorators/PersistenceDecorators.js +4 -3
- package/dist/lib/decorators/PersistenceDecorators.js.map +1 -1
- package/dist/lib/decorators/RouteDecorators.js +139 -36
- package/dist/lib/decorators/RouteDecorators.js.map +1 -1
- package/dist/lib/http/IWebSocketShim.js +2 -0
- package/dist/lib/http/IWebSocketShim.js.map +1 -0
- package/dist/lib/http/MiddlewareChain.js +167 -0
- package/dist/lib/http/MiddlewareChain.js.map +1 -0
- package/dist/lib/http/RuntimeDetect.js +9 -0
- package/dist/lib/http/RuntimeDetect.js.map +1 -0
- package/dist/lib/http/bun/BunAdapters.js +326 -0
- package/dist/lib/http/bun/BunAdapters.js.map +1 -0
- package/dist/lib/http/bun/BunRouter.js +391 -0
- package/dist/lib/http/bun/BunRouter.js.map +1 -0
- package/dist/lib/http/bun/BunWebSocket.js +49 -0
- package/dist/lib/http/bun/BunWebSocket.js.map +1 -0
- package/dist/lib/http/index.js +16 -3
- package/dist/lib/http/index.js.map +1 -1
- package/dist/lib/http/session/RedisSessionStore.js +30 -0
- package/dist/lib/http/session/RedisSessionStore.js.map +1 -0
- package/dist/lib/http/session/SessionManager.js +113 -0
- package/dist/lib/http/session/SessionManager.js.map +1 -0
- package/dist/lib/http/session/SessionStore.js +6 -0
- package/dist/lib/http/session/SessionStore.js.map +1 -0
- package/dist/lib/http/session/sessionMiddleware.js +42 -0
- package/dist/lib/http/session/sessionMiddleware.js.map +1 -0
- package/dist/lib/http/types.js +0 -3
- package/dist/lib/http/types.js.map +1 -1
- package/dist/lib/http/uWS/Adapters.js +421 -0
- package/dist/lib/http/uWS/Adapters.js.map +1 -0
- package/dist/lib/http/{Router.js → uWS/Router.js} +73 -173
- package/dist/lib/http/uWS/Router.js.map +1 -0
- package/dist/lib/http/{WebSocket.js → uWS/WebSocket.js} +4 -1
- package/dist/lib/http/uWS/WebSocket.js.map +1 -0
- package/dist/lib/models/BaseEntity.js +2 -1
- package/dist/lib/models/BaseEntity.js.map +1 -1
- package/dist/lib/models/BaseMongoEntity.js +2 -2
- package/dist/lib/models/BaseMongoEntity.js.map +1 -1
- package/dist/lib/models/ModelUtils.js +248 -101
- package/dist/lib/models/ModelUtils.js.map +1 -1
- package/dist/lib/models/RecoverableBaseEntity.js +6 -1
- package/dist/lib/models/RecoverableBaseEntity.js.map +1 -1
- package/dist/lib/models/RecoverableBaseMongoEntity.js +1 -0
- package/dist/lib/models/RecoverableBaseMongoEntity.js.map +1 -1
- package/dist/lib/models/RepoUtils.js +641 -213
- package/dist/lib/models/RepoUtils.js.map +1 -1
- package/dist/lib/models/SimpleEntity.js +1 -0
- package/dist/lib/models/SimpleEntity.js.map +1 -1
- package/dist/lib/models/SimpleMongoEntity.js +2 -1
- package/dist/lib/models/SimpleMongoEntity.js.map +1 -1
- package/dist/lib/models/StatusExtraData.js +4 -0
- package/dist/lib/models/StatusExtraData.js.map +1 -1
- package/dist/lib/routes/{AdminRoute.js → BaseAdminRoute.js} +98 -80
- package/dist/lib/routes/BaseAdminRoute.js.map +1 -0
- package/dist/lib/routes/{MetricsRoute.js → BaseMetricsRoute.js} +29 -15
- package/dist/lib/routes/BaseMetricsRoute.js.map +1 -0
- package/dist/lib/routes/{OpenAPIRoute.js → BaseOpenAPIRoute.js} +32 -32
- package/dist/lib/routes/BaseOpenAPIRoute.js.map +1 -0
- package/dist/lib/routes/BasePushRoute.js +305 -0
- package/dist/lib/routes/BasePushRoute.js.map +1 -0
- package/dist/lib/routes/BaseStaticRoute.js +153 -0
- package/dist/lib/routes/BaseStaticRoute.js.map +1 -0
- package/dist/lib/routes/BaseStatusRoute.js +80 -0
- package/dist/lib/routes/BaseStatusRoute.js.map +1 -0
- package/dist/lib/routes/CRUDRoute.js +284 -0
- package/dist/lib/routes/CRUDRoute.js.map +1 -0
- package/dist/lib/routes/ModelRoute.js +84 -57
- package/dist/lib/routes/ModelRoute.js.map +1 -1
- package/dist/lib/routes/RouteUtils.js +108 -20
- package/dist/lib/routes/RouteUtils.js.map +1 -1
- package/dist/lib/routes/index.js +7 -4
- package/dist/lib/routes/index.js.map +1 -1
- package/dist/lib/security/ACLUtils.js +297 -170
- package/dist/lib/security/ACLUtils.js.map +1 -1
- package/dist/lib/security/AccessControlList.js +18 -10
- package/dist/lib/security/AccessControlList.js.map +1 -1
- package/dist/lib/security/AccessControlListMongo.js +19 -68
- package/dist/lib/security/AccessControlListMongo.js.map +1 -1
- package/dist/lib/security/AccessControlListSQL.js +21 -70
- package/dist/lib/security/AccessControlListSQL.js.map +1 -1
- package/dist/lib/security/BaseACLRoute.js +239 -0
- package/dist/lib/security/BaseACLRoute.js.map +1 -0
- package/dist/lib/security/index.js +3 -0
- package/dist/lib/security/index.js.map +1 -1
- package/dist/lib/test/request.js +62 -5
- package/dist/lib/test/request.js.map +1 -1
- package/dist/lib/test/requestws.js +34 -10
- package/dist/lib/test/requestws.js.map +1 -1
- package/dist/types/ApiErrors.d.ts +8 -2
- package/dist/types/BackgroundService.d.ts +0 -5
- package/dist/types/BackgroundServiceManager.d.ts +2 -1
- package/dist/types/EventListenerManager.d.ts +7 -6
- package/dist/types/NotificationUtils.d.ts +5 -3
- package/dist/types/OpenApiSpec.d.ts +2 -2
- package/dist/types/Server.d.ts +28 -10
- package/dist/types/auth/AuthMiddleware.d.ts +3 -3
- package/dist/types/auth/AuthStrategy.d.ts +10 -7
- package/dist/types/auth/JWTStrategy.d.ts +6 -4
- package/dist/types/auth/index.d.ts +0 -1
- package/dist/types/database/ConnectionKinds.d.ts +7 -0
- package/dist/types/database/ConnectionManager.d.ts +29 -4
- package/dist/types/database/MongoConnection.d.ts +16 -4
- package/dist/types/database/MongoRepository.d.ts +32 -11
- package/dist/types/database/RedisCache.d.ts +23 -0
- package/dist/types/database/TypeOrmSupport.d.ts +4 -4
- package/dist/types/database/index.d.ts +1 -0
- package/dist/types/decorators/DatabaseDecorators.d.ts +139 -8
- package/dist/types/decorators/DocDecorators.d.ts +11 -2
- package/dist/types/decorators/ModelDecorators.d.ts +12 -5
- package/dist/types/decorators/PersistenceDecorators.d.ts +11 -4
- package/dist/types/decorators/RouteDecorators.d.ts +36 -6
- package/dist/types/http/IWebSocketShim.d.ts +11 -0
- package/dist/types/http/MiddlewareChain.d.ts +47 -0
- package/dist/types/http/RuntimeDetect.d.ts +2 -0
- package/dist/types/http/bun/BunAdapters.d.ts +139 -0
- package/dist/types/http/bun/BunRouter.d.ts +79 -0
- package/dist/types/http/bun/BunWebSocket.d.ts +35 -0
- package/dist/types/http/index.d.ts +16 -6
- package/dist/types/http/session/RedisSessionStore.d.ts +15 -0
- package/dist/types/http/session/SessionManager.d.ts +35 -0
- package/dist/types/http/session/SessionStore.d.ts +12 -0
- package/dist/types/http/session/sessionMiddleware.d.ts +10 -0
- package/dist/types/http/types.d.ts +42 -3
- package/dist/types/http/uWS/Adapters.d.ts +129 -0
- package/dist/types/http/{Router.d.ts → uWS/Router.d.ts} +14 -38
- package/dist/types/http/{WebSocket.d.ts → uWS/WebSocket.d.ts} +6 -5
- package/dist/types/models/BaseEntity.d.ts +1 -1
- package/dist/types/models/ModelUtils.d.ts +47 -14
- package/dist/types/models/RecoverableBaseEntity.d.ts +3 -1
- package/dist/types/models/RepoUtils.d.ts +84 -14
- package/dist/types/routes/BaseAdminRoute.d.ts +65 -0
- package/dist/types/routes/BaseMetricsRoute.d.ts +37 -0
- package/dist/types/routes/BaseOpenAPIRoute.d.ts +33 -0
- package/dist/types/routes/BasePushRoute.d.ts +53 -0
- package/dist/types/routes/BaseStaticRoute.d.ts +44 -0
- package/dist/types/routes/BaseStatusRoute.d.ts +37 -0
- package/dist/types/routes/CRUDRoute.d.ts +57 -0
- package/dist/types/routes/ModelRoute.d.ts +39 -36
- package/dist/types/routes/RouteUtils.d.ts +19 -0
- package/dist/types/routes/index.d.ts +7 -4
- package/dist/types/security/ACLUtils.d.ts +94 -18
- package/dist/types/security/AccessControlList.d.ts +37 -59
- package/dist/types/security/AccessControlListMongo.d.ts +3 -8
- package/dist/types/security/AccessControlListSQL.d.ts +3 -8
- package/dist/types/security/BaseACLRoute.d.ts +73 -0
- package/dist/types/security/index.d.ts +3 -0
- package/dist/types/test/request.d.ts +18 -1
- package/package.json +135 -129
- package/tsconfig.export.json +17 -0
- package/dist/lib/auth/BasicStrategy.js +0 -113
- package/dist/lib/auth/BasicStrategy.js.map +0 -1
- package/dist/lib/http/Adapters.js +0 -241
- package/dist/lib/http/Adapters.js.map +0 -1
- package/dist/lib/http/Router.js.map +0 -1
- package/dist/lib/http/WebSocket.js.map +0 -1
- package/dist/lib/routes/AdminRoute.js.map +0 -1
- package/dist/lib/routes/MetricsRoute.js.map +0 -1
- package/dist/lib/routes/OpenAPIRoute.js.map +0 -1
- package/dist/lib/routes/StatusRoute.js +0 -55
- package/dist/lib/routes/StatusRoute.js.map +0 -1
- package/dist/lib/security/ACLRouteMongo.js +0 -194
- package/dist/lib/security/ACLRouteMongo.js.map +0 -1
- package/dist/lib/security/ACLRouteSQL.js +0 -193
- package/dist/lib/security/ACLRouteSQL.js.map +0 -1
- package/dist/types/auth/BasicStrategy.d.ts +0 -37
- package/dist/types/http/Adapters.d.ts +0 -68
- package/dist/types/routes/AdminRoute.d.ts +0 -47
- package/dist/types/routes/MetricsRoute.d.ts +0 -15
- package/dist/types/routes/OpenAPIRoute.d.ts +0 -17
- package/dist/types/routes/StatusRoute.d.ts +0 -11
- package/dist/types/security/ACLRouteMongo.d.ts +0 -19
- package/dist/types/security/ACLRouteSQL.d.ts +0 -19
- package/docs/Makefile +0 -20
- package/docs/conf.py +0 -58
- package/docs/index.rst +0 -17
- package/docs/make.bat +0 -35
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/README.md +0 -13
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/MongoRepository.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/RedisConnection.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/Repository.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/README.md +0 -23
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Default.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Description.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Document.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Example.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Format.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Returns.md +0 -28
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Summary.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Tags.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/TypeInfo.md +0 -28
- package/docs/reference/@rapidrest/namespaces/DocDecorators/interfaces/DocumentsData.md +0 -57
- package/docs/reference/@rapidrest/namespaces/EventDecorators/README.md +0 -12
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/EventListener.md +0 -17
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/OnEvent.md +0 -26
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/README.md +0 -26
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Cache.md +0 -25
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/ChildEntity.md +0 -18
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/DataStore.md +0 -25
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Identifier.md +0 -27
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Protect.md +0 -35
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Reference.md +0 -25
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Shard.md +0 -27
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/TrackChanges.md +0 -26
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/interfaces/PendingTypeOrmColumn.md +0 -45
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/variables/pendingTypeOrmColumns.md +0 -14
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/README.md +0 -27
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Column.md +0 -25
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Entity.md +0 -25
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Index.md +0 -119
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/PrimaryColumn.md +0 -25
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Unique.md +0 -68
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getColumnMetadata.md +0 -26
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getEntityName.md +0 -26
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getIndexMetadata.md +0 -27
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/CollationOptions.md +0 -79
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnInfo.md +0 -41
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnOptions.md +0 -51
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/EntityOptions.md +0 -32
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexInfo.md +0 -41
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexOptions.md +0 -61
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/README.md +0 -36
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/After.md +0 -26
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Auth.md +0 -33
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/AuthResult.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Before.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/ContentType.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Delete.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Get.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Head.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Header.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Method.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Model.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Options.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Param.md +0 -26
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Patch.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Post.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Protect.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Put.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Query.md +0 -26
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Request.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/RequiresRole.md +0 -26
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Response.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Route.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Socket.md +0 -33
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/User.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Validate.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/WebSocket.md +0 -25
- package/docs/reference/README.md +0 -20
- package/docs/reference/classes/ACLUtils.md +0 -263
- package/docs/reference/classes/AdminRoute.md +0 -51
- package/docs/reference/classes/AuthMiddleware.md +0 -173
- package/docs/reference/classes/BackgroundService.md +0 -117
- package/docs/reference/classes/BackgroundServiceManager.md +0 -172
- package/docs/reference/classes/BaseEntity.md +0 -82
- package/docs/reference/classes/BaseMongoEntity.md +0 -107
- package/docs/reference/classes/BasicStrategy.md +0 -131
- package/docs/reference/classes/BasicStrategyOptions.md +0 -115
- package/docs/reference/classes/BulkError.md +0 -271
- package/docs/reference/classes/ConnectionManager.md +0 -75
- package/docs/reference/classes/EventListenerManager.md +0 -88
- package/docs/reference/classes/HttpRouter.md +0 -343
- package/docs/reference/classes/JWTStrategy.md +0 -100
- package/docs/reference/classes/JWTStrategyOptions.md +0 -97
- package/docs/reference/classes/MetricsRoute.md +0 -27
- package/docs/reference/classes/ModelRoute.md +0 -527
- package/docs/reference/classes/ModelUtils.md +0 -446
- package/docs/reference/classes/MongoConnection.md +0 -218
- package/docs/reference/classes/MongoRepository.md +0 -390
- package/docs/reference/classes/MongoSchemaSync.md +0 -97
- package/docs/reference/classes/NetUtils.md +0 -90
- package/docs/reference/classes/NotificationUtils.md +0 -77
- package/docs/reference/classes/ObjectFactory.md +0 -336
- package/docs/reference/classes/OpenAPIRoute.md +0 -77
- package/docs/reference/classes/OpenApiSpec.md +0 -892
- package/docs/reference/classes/RecoverableBaseEntity.md +0 -114
- package/docs/reference/classes/RecoverableBaseMongoEntity.md +0 -124
- package/docs/reference/classes/RedisTransport.md +0 -2202
- package/docs/reference/classes/RepoUtils.md +0 -482
- package/docs/reference/classes/RouteUtils.md +0 -191
- package/docs/reference/classes/Server.md +0 -408
- package/docs/reference/classes/SimpleEntity.md +0 -48
- package/docs/reference/classes/SimpleMongoEntity.md +0 -66
- package/docs/reference/classes/StatusExtraData.md +0 -57
- package/docs/reference/classes/StatusRoute.md +0 -26
- package/docs/reference/classes/UWSRequest.md +0 -226
- package/docs/reference/classes/UWSResponse.md +0 -257
- package/docs/reference/classes/UWSWebSocketShim.md +0 -958
- package/docs/reference/enumerations/ACLAction.md +0 -63
- package/docs/reference/enumerations/ApiErrorMessages.md +0 -123
- package/docs/reference/enumerations/ApiErrors.md +0 -123
- package/docs/reference/functions/createWebSocketStream.md +0 -27
- package/docs/reference/functions/isSqlDataSource.md +0 -26
- package/docs/reference/functions/readBody.md +0 -29
- package/docs/reference/functions/resolveCollectionName.md +0 -33
- package/docs/reference/functions/runChain.md +0 -40
- package/docs/reference/functions/snakeCase.md +0 -28
- package/docs/reference/globals.md +0 -106
- package/docs/reference/interfaces/ACLRecord.md +0 -96
- package/docs/reference/interfaces/AccessControlList.md +0 -76
- package/docs/reference/interfaces/AuthResult.md +0 -55
- package/docs/reference/interfaces/AuthStrategy.md +0 -95
- package/docs/reference/interfaces/CreateRequestOptions.md +0 -121
- package/docs/reference/interfaces/DeleteRequestOptions.md +0 -137
- package/docs/reference/interfaces/FindRequestOptions.md +0 -133
- package/docs/reference/interfaces/HttpRequest.md +0 -147
- package/docs/reference/interfaces/HttpResponse.md +0 -164
- package/docs/reference/interfaces/JWTAuthResult.md +0 -84
- package/docs/reference/interfaces/RepoCreateOptions.md +0 -95
- package/docs/reference/interfaces/RepoDeleteOptions.md +0 -105
- package/docs/reference/interfaces/RepoFindOptions.md +0 -125
- package/docs/reference/interfaces/RepoOperationOptions.md +0 -69
- package/docs/reference/interfaces/RepoUpdateOptions.md +0 -101
- package/docs/reference/interfaces/RequestOptions.md +0 -112
- package/docs/reference/interfaces/RequestWS.md +0 -225
- package/docs/reference/interfaces/TruncateRequestOptions.md +0 -161
- package/docs/reference/interfaces/UpdateRequestOptions.md +0 -139
- package/docs/reference/type-aliases/ErrorHandler.md +0 -35
- package/docs/reference/type-aliases/NextFunction.md +0 -23
- package/docs/reference/type-aliases/OneOrMany.md +0 -19
- package/docs/reference/type-aliases/OneOrNull.md +0 -19
- package/docs/reference/type-aliases/PartialBaseEntity.md +0 -17
- package/docs/reference/type-aliases/PartialSimpleEntity.md +0 -17
- package/docs/reference/type-aliases/RequestHandler.md +0 -31
- package/docs/reference/type-aliases/UpdateObject.md +0 -19
- package/docs/reference/type-aliases/WsUpgradeAuth.md +0 -27
- package/docs/reference/type-aliases/WsUpgradeAuthResult.md +0 -47
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
14
|
+
// Copyright (C) 2020-2026 Jean-Philippe Steinmetz
|
|
15
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
16
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
17
|
+
import { Get, Request, Response } from "../decorators/RouteDecorators.js";
|
|
18
|
+
import { Summary } from "../decorators/DocDecorators.js";
|
|
19
|
+
import * as fs from "fs";
|
|
20
|
+
import * as path from "path";
|
|
21
|
+
import { ObjectDecorators } from "@rapidrest/core";
|
|
22
|
+
const { Config, Init } = ObjectDecorators;
|
|
23
|
+
/** MIME types for static file serving. */
|
|
24
|
+
const MIME_TYPES = {
|
|
25
|
+
".html": "text/html",
|
|
26
|
+
".css": "text/css",
|
|
27
|
+
".js": "application/javascript",
|
|
28
|
+
".mjs": "application/javascript",
|
|
29
|
+
".json": "application/json",
|
|
30
|
+
".png": "image/png",
|
|
31
|
+
".jpg": "image/jpeg",
|
|
32
|
+
".jpeg": "image/jpeg",
|
|
33
|
+
".gif": "image/gif",
|
|
34
|
+
".svg": "image/svg+xml",
|
|
35
|
+
".ico": "image/x-icon",
|
|
36
|
+
".woff": "font/woff",
|
|
37
|
+
".woff2": "font/woff2",
|
|
38
|
+
".ttf": "font/ttf",
|
|
39
|
+
".txt": "text/plain",
|
|
40
|
+
".map": "application/json",
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The `BaseStaticRoute` class provides a single endpoint for serving static files from a designated path on the filesystem (e.g. `./public`).
|
|
44
|
+
* Uses the path specified in the project configuration key `static_files`. Default is `public`.
|
|
45
|
+
*
|
|
46
|
+
* Exposed endpoints:
|
|
47
|
+
*
|
|
48
|
+
* | Name | HTTP Method | What it does |
|
|
49
|
+
* | --- | --- | --- |
|
|
50
|
+
* | `get` | `GET /<base_path>/*` | Serves static files from the configured `static_files`. |
|
|
51
|
+
*
|
|
52
|
+
* !!Note!! that the `BaseStaticRoute` is not automatically registered with a server by default. You must create
|
|
53
|
+
* your own class that extends `AdminRoute` and apply the desired base path with `@Route()`.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* import { BaseStaticRoute, RouteDecorators } from "@rapidrest/service-core";
|
|
58
|
+
* const { Route } = RouteDecorators;
|
|
59
|
+
*
|
|
60
|
+
* @Route("/static")
|
|
61
|
+
* export class StaticRoute extends BaseStaticRoute {}
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @author Jean-Philippe Steinmetz
|
|
65
|
+
*/
|
|
66
|
+
let BaseStaticRoute = class BaseStaticRoute {
|
|
67
|
+
constructor() {
|
|
68
|
+
/**
|
|
69
|
+
* The URL prefix derived from `@Route` metadata at init time.
|
|
70
|
+
* E.g. `@Route("/app/*")` → prefix = "/app". Used to strip the prefix from req.path
|
|
71
|
+
* before resolving app page files, and to scope the dev-reload SSE endpoint.
|
|
72
|
+
*/
|
|
73
|
+
this.routePrefix = "";
|
|
74
|
+
/** The location of the static files to serve. Defaults to `./public`. */
|
|
75
|
+
this.staticDir = "public";
|
|
76
|
+
}
|
|
77
|
+
async init() {
|
|
78
|
+
// Derive the route prefix from @Route metadata so page resolution is prefix-agnostic.
|
|
79
|
+
// @Route("/app/*") → prefix "/app", @Route("/*") → prefix ""
|
|
80
|
+
const routePaths = Reflect.getMetadata("rrst:routePaths", Object.getPrototypeOf(this)) || [];
|
|
81
|
+
this.routePrefix = (routePaths[0] || "")
|
|
82
|
+
.replace(/\/\*$/, "") // strip trailing /*
|
|
83
|
+
.replace(/\/$/, ""); // strip trailing /
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Resolve a file in the static directory by trying multiple extensions in order.
|
|
87
|
+
* If the path segment ends in a `/`, `index.html` is automatically appended.
|
|
88
|
+
*
|
|
89
|
+
* @returns The full path to the file on disk if exists, otherwise `null`.
|
|
90
|
+
*/
|
|
91
|
+
resolveFile(segment) {
|
|
92
|
+
const root = path.resolve(process.cwd(), this.staticDir);
|
|
93
|
+
let file = path.resolve(root, segment.replace(/^\//, ""));
|
|
94
|
+
if (file.endsWith("/")) {
|
|
95
|
+
file += "index.html";
|
|
96
|
+
}
|
|
97
|
+
// Reject any path that escapes the configured static directory (e.g. via `../` segments).
|
|
98
|
+
// Without this check a request path is joined onto `root` and resolved as-is, so a raw
|
|
99
|
+
// (non-normalizing) HTTP client could read arbitrary files reachable from `root`.
|
|
100
|
+
if (file !== root && !file.startsWith(root + path.sep)) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
if (fs.existsSync(file)) {
|
|
104
|
+
return file;
|
|
105
|
+
}
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
async get(req, res) {
|
|
109
|
+
// Strip the route prefix (e.g. "/app" from "/app/pets" → "/pets") so the page
|
|
110
|
+
// file resolution is independent of where the route is mounted.
|
|
111
|
+
const subPath = this.routePrefix && req.path.startsWith(this.routePrefix)
|
|
112
|
+
? req.path.slice(this.routePrefix.length) || "/"
|
|
113
|
+
: req.path;
|
|
114
|
+
const requestedPath = subPath === "/" ? "index.html" : subPath.replace(/^\/+/, "");
|
|
115
|
+
const filePath = this.resolveFile(requestedPath);
|
|
116
|
+
if (!filePath) {
|
|
117
|
+
res.status(404).end();
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
const ext = path.extname(filePath);
|
|
122
|
+
const data = await fs.promises.readFile(filePath);
|
|
123
|
+
res.setHeader("content-type", MIME_TYPES[ext] || "application/octet-stream");
|
|
124
|
+
res.end(data);
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
res.status(404).end();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
__decorate([
|
|
132
|
+
Config("static_files", "public"),
|
|
133
|
+
__metadata("design:type", String)
|
|
134
|
+
], BaseStaticRoute.prototype, "staticDir", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
Init,
|
|
137
|
+
__metadata("design:type", Function),
|
|
138
|
+
__metadata("design:paramtypes", []),
|
|
139
|
+
__metadata("design:returntype", Promise)
|
|
140
|
+
], BaseStaticRoute.prototype, "init", null);
|
|
141
|
+
__decorate([
|
|
142
|
+
Get("/*"),
|
|
143
|
+
__param(0, Request),
|
|
144
|
+
__param(1, Response),
|
|
145
|
+
__metadata("design:type", Function),
|
|
146
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
147
|
+
__metadata("design:returntype", Promise)
|
|
148
|
+
], BaseStaticRoute.prototype, "get", null);
|
|
149
|
+
BaseStaticRoute = __decorate([
|
|
150
|
+
Summary("Serves static files from the filesystem.")
|
|
151
|
+
], BaseStaticRoute);
|
|
152
|
+
export { BaseStaticRoute };
|
|
153
|
+
//# sourceMappingURL=BaseStaticRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseStaticRoute.js","sourceRoot":"","sources":["../../../src/routes/BaseStaticRoute.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAA+E;AAC/E,kDAAkD;AAClD,mCAAmC;AACnC,+EAA+E;AAC/E,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC;AAE1C,0CAA0C;AAC1C,MAAM,UAAU,GAA2B;IACvC,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,wBAAwB;IAC/B,MAAM,EAAE,wBAAwB;IAChC,OAAO,EAAE,kBAAkB;IAC3B,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,eAAe;IACvB,MAAM,EA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CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QAC1B,CAAC;IACL,CAAC;CACJ,CAAA;AAhEsB;IADlB,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC;;kDACe;AAGhC;IADf,IAAI;;;;2CAQJ;AA8BY;IADZ,GAAG,CAAC,IAAI,CAAC;IACQ,WAAA,OAAO,CAAA;IAAoB,WAAA,QAAQ,CAAA;;;;0CAuBpD;AAzEQ,eAAe;IAD3B,OAAO,CAAC,0CAA0C,CAAC;GACvC,eAAe,CA0E3B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
11
|
+
// Copyright (C) 2020-2026 Jean-Philippe Steinmetz
|
|
12
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
13
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
14
|
+
import { Get } from "../decorators/RouteDecorators.js";
|
|
15
|
+
import { Description, Returns, Summary } from "../decorators/DocDecorators.js";
|
|
16
|
+
import { ObjectDecorators } from "@rapidrest/core";
|
|
17
|
+
import { StatusExtraData } from "../models/StatusExtraData.js";
|
|
18
|
+
const { Config, Inject } = ObjectDecorators;
|
|
19
|
+
/**
|
|
20
|
+
* The `BaseStatusRoute` class provides a base set of endpoints exposing status metadata information about the server.
|
|
21
|
+
*
|
|
22
|
+
* Included Metadata:
|
|
23
|
+
* | Name | Description |
|
|
24
|
+
* | --- | --- |
|
|
25
|
+
* | `name` | The name of the server (e.g. `petstore_example`) |
|
|
26
|
+
* | `time` | The current UTC timestamp of the server |
|
|
27
|
+
* | `version` | The release version of the server. (e.g. `1.0.0`) |
|
|
28
|
+
*
|
|
29
|
+
* Exposed endpoints:
|
|
30
|
+
*
|
|
31
|
+
* | Name | HTTP Method | What it does |
|
|
32
|
+
* | --- | --- | --- |
|
|
33
|
+
* | `get` | `GET /<base_path>` | Returns the server's status metadata |
|
|
34
|
+
*
|
|
35
|
+
* !!Note!! that the `BaseAdminRoute` is not automatically registered with a server by default. You must create
|
|
36
|
+
* your own class that extends `AdminRoute` and apply the desired base path with `@Route()`.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* import { BaseStatusRoute, RouteDecorators } from "@rapidrest/service-core";
|
|
41
|
+
* const { Route } = RouteDecorators;
|
|
42
|
+
*
|
|
43
|
+
* @Route("/status")
|
|
44
|
+
* export class StatusRoute extends BaseStatusRoute {}
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @author Jean-Philippe Steinmetz
|
|
48
|
+
*/
|
|
49
|
+
export class BaseStatusRoute {
|
|
50
|
+
get() {
|
|
51
|
+
return {
|
|
52
|
+
name: this.serviceName,
|
|
53
|
+
time: Date.now(),
|
|
54
|
+
version: this.serviceVersion,
|
|
55
|
+
...this.statusExtraData?.data,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
__decorate([
|
|
60
|
+
Config("service_name"),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], BaseStatusRoute.prototype, "serviceName", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
Config("version"),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], BaseStatusRoute.prototype, "serviceVersion", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
Inject(StatusExtraData),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], BaseStatusRoute.prototype, "statusExtraData", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
Summary("Server status"),
|
|
73
|
+
Description("Returns information about the server and it's operational status."),
|
|
74
|
+
Get(),
|
|
75
|
+
Returns([Object]),
|
|
76
|
+
__metadata("design:type", Function),
|
|
77
|
+
__metadata("design:paramtypes", []),
|
|
78
|
+
__metadata("design:returntype", Object)
|
|
79
|
+
], BaseStatusRoute.prototype, "get", null);
|
|
80
|
+
//# sourceMappingURL=BaseStatusRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseStatusRoute.js","sourceRoot":"","sources":["../../../src/routes/BaseStatusRoute.ts"],"names":[],"mappings":";;;;;;;;;AAAA,+EAA+E;AAC/E,kDAAkD;AAClD,mCAAmC;AACnC,+EAA+E;AAC/E,OAAO,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,eAAe;IAajB,GAAG;QACN,OAAO;YACH,IAAI,EAAE,IAAI,CAAC,WAAW;YACtB,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE;YAChB,OAAO,EAAE,IAAI,CAAC,cAAc;YAC5B,GAAG,IAAI,CAAC,eAAe,EAAE,IAAI;SAChC,CAAC;IACN,CAAC;CACJ;AAnBa;IADT,MAAM,CAAC,cAAc,CAAC;;oDACI;AAEjB;IADT,MAAM,CAAC,SAAS,CAAC;;uDACY;AAGpB;IADT,MAAM,CAAC,eAAe,CAAC;;wDAC+B;AAMhD;IAJN,OAAO,CAAC,eAAe,CAAC;IACxB,WAAW,CAAC,mEAAmE,CAAC;IAChF,GAAG,EAAE;IACL,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;;;;0CAQjB"}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
14
|
+
// Copyright (C) 2020-2026 Jean-Philippe Steinmetz. All rights reserved.
|
|
15
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
16
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
17
|
+
import { RepoUtils } from "../models/RepoUtils.js";
|
|
18
|
+
import { ApiError } from "@rapidrest/core";
|
|
19
|
+
import { Description, Returns, Summary, TypeInfo } from "../decorators/DocDecorators.js";
|
|
20
|
+
import { Delete, Get, Head, Param, Post, Put, Query, Request, Response, User, Validate, } from "../decorators/RouteDecorators.js";
|
|
21
|
+
import { ModelRoute } from "./ModelRoute.js";
|
|
22
|
+
import { ApiErrorMessages, ApiErrors } from "../ApiErrors.js";
|
|
23
|
+
import { Transactional } from "../decorators/DatabaseDecorators.js";
|
|
24
|
+
/**
|
|
25
|
+
* The `CRUDRoute` provides a base implementation of all CRUD endpoint behaviors that `ModelRoute` offers for a given
|
|
26
|
+
* data model class. This class provides the most common default settings for each route handler. If you desire additional
|
|
27
|
+
* functionality you may override the handler function and add desired functionality via additional decorators or override
|
|
28
|
+
* existing decorator behavior.
|
|
29
|
+
*
|
|
30
|
+
* The route endpoints provided by this class do not explicitly require authentication. However, if the RBAC system
|
|
31
|
+
* is enabled these handlers will still validate permissions appropriately.
|
|
32
|
+
*
|
|
33
|
+
* Included Endpoints:
|
|
34
|
+
*
|
|
35
|
+
* | Name | HTTP Method | What it does |
|
|
36
|
+
* | --- | --- | --- |
|
|
37
|
+
* | `count` | `HEAD /` | Counts the number of objects matching the provided set of criteria in the request's query parameters. Returns the count as the value of the `Content-Length` header. |
|
|
38
|
+
* | `create` | `POST /` | Adds one or more new objects to the datasource. |
|
|
39
|
+
* | `delete` | `DELETE /:id` | Removes an existing object from the datasource. |
|
|
40
|
+
* | `exists` | `HEAD /:id` | Checks if the object with the given ID exists in the datasource. Sets `Content-Length` header to `1` if the object exists, otherwise `0`. |
|
|
41
|
+
* | `find` | `GET /` | Returns all objects matching the provided set of criteria in the request's query parameters. |
|
|
42
|
+
* | `findById` | `GET /:id` | Returns a single object with a specified unique identifier. |
|
|
43
|
+
* | `truncate` | `DELETE /` | Removes all objects from the datasource. |
|
|
44
|
+
* | `update` | `PUT /:id` | Modifies an existing object in the datasource. |
|
|
45
|
+
* | `updateBulk` | `PUT /` | Modifies multiple existing objects in the datasource. |
|
|
46
|
+
* | `updateProperty` | `PUT /:id/:property` | Modifies an single property of the given name of an existing object in the datasource. |
|
|
47
|
+
*
|
|
48
|
+
* @author Jean-Philippe Steinmetz
|
|
49
|
+
*/
|
|
50
|
+
export class CRUDRoute extends ModelRoute {
|
|
51
|
+
constructor() {
|
|
52
|
+
super(...arguments);
|
|
53
|
+
this.repoUtilsClass = RepoUtils;
|
|
54
|
+
}
|
|
55
|
+
async count(params, query, res, user) {
|
|
56
|
+
return await super.doCount({ params, query, res, user });
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Override this function to perform additional custom validation of object creation. This is called
|
|
60
|
+
* for each object passed to the `create()` operation.
|
|
61
|
+
*/
|
|
62
|
+
validateCreate(obj, user) {
|
|
63
|
+
return super.validate(obj, { user });
|
|
64
|
+
}
|
|
65
|
+
async validateCreateBulk(objs, user) {
|
|
66
|
+
objs = Array.isArray(objs) ? objs : [objs];
|
|
67
|
+
const promises = [];
|
|
68
|
+
for (const obj of objs) {
|
|
69
|
+
promises.push(this.validateCreate(obj, user));
|
|
70
|
+
}
|
|
71
|
+
const result = await Promise.allSettled(promises);
|
|
72
|
+
const errors = result.filter((p) => p.status === "rejected").map((r) => r.reason);
|
|
73
|
+
if (errors.length > 0) {
|
|
74
|
+
throw new ApiError(ApiErrors.BULK_UPDATE_FAILURE, 400, ApiErrorMessages.BULK_UPDATE_FAILURE);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async create(obj, req, user) {
|
|
78
|
+
return await super.doCreate(obj, { req, user });
|
|
79
|
+
}
|
|
80
|
+
async delete(id, version, purge, req, user) {
|
|
81
|
+
return await super.doDelete(id, { user, req, version, purge: purge === "true" });
|
|
82
|
+
}
|
|
83
|
+
async exists(id, query, res, user) {
|
|
84
|
+
return await super.doExists(id, { query, res, user });
|
|
85
|
+
}
|
|
86
|
+
async find(params, query, user) {
|
|
87
|
+
return await super.doFind({ params, query, user });
|
|
88
|
+
}
|
|
89
|
+
async findById(id, query, user) {
|
|
90
|
+
return await super.doFindById(id, { query, user });
|
|
91
|
+
}
|
|
92
|
+
async truncate(params, query, user) {
|
|
93
|
+
return await super.doTruncate({ params, query, user });
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Override this function to perform additional custom validation of object updates. This is called
|
|
97
|
+
* for `update()` and `updateBulk()` operations. `updateBulk()` calls this function for each update
|
|
98
|
+
* object.
|
|
99
|
+
*/
|
|
100
|
+
async validateUpdate(id, obj, user) {
|
|
101
|
+
return await this.validate(obj, { user });
|
|
102
|
+
}
|
|
103
|
+
async update(id, obj, req, user) {
|
|
104
|
+
return await super.doUpdate(id, obj, { user });
|
|
105
|
+
}
|
|
106
|
+
async validateUpdateBulk(objs, user) {
|
|
107
|
+
const promises = [];
|
|
108
|
+
for (const obj of objs) {
|
|
109
|
+
promises.push(this.validateUpdate(obj.uid, obj, user));
|
|
110
|
+
}
|
|
111
|
+
const result = await Promise.allSettled(promises);
|
|
112
|
+
const errors = result.filter((p) => p.status === "rejected").map((r) => r.reason);
|
|
113
|
+
if (errors.length > 0) {
|
|
114
|
+
throw new ApiError(ApiErrors.BULK_UPDATE_FAILURE, 400, ApiErrorMessages.BULK_UPDATE_FAILURE);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
async updateBulk(obj, req, user) {
|
|
118
|
+
return await super.doBulkUpdate(obj, { user, req });
|
|
119
|
+
}
|
|
120
|
+
async updateProperty(id, propertyName, obj, user) {
|
|
121
|
+
await this.validateUpdate(id, {
|
|
122
|
+
[propertyName]: obj,
|
|
123
|
+
}, user);
|
|
124
|
+
return await super.doUpdateProperty(id, propertyName, obj, { user });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
__decorate([
|
|
128
|
+
Summary("Count {{name}}s"),
|
|
129
|
+
Description("Returns the total count of {{name}}s in the datasource based on the given criteria " +
|
|
130
|
+
"in the header as `Content-Length`."),
|
|
131
|
+
Returns([null]),
|
|
132
|
+
Head(),
|
|
133
|
+
__param(0, Param()),
|
|
134
|
+
__param(1, Query()),
|
|
135
|
+
__param(2, Response),
|
|
136
|
+
__param(3, User),
|
|
137
|
+
__metadata("design:type", Function),
|
|
138
|
+
__metadata("design:paramtypes", [Object, Object, Object, Object]),
|
|
139
|
+
__metadata("design:returntype", Promise)
|
|
140
|
+
], CRUDRoute.prototype, "count", null);
|
|
141
|
+
__decorate([
|
|
142
|
+
__param(1, User),
|
|
143
|
+
__metadata("design:type", Function),
|
|
144
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
145
|
+
__metadata("design:returntype", void 0)
|
|
146
|
+
], CRUDRoute.prototype, "validateCreate", null);
|
|
147
|
+
__decorate([
|
|
148
|
+
__param(1, User),
|
|
149
|
+
__metadata("design:type", Function),
|
|
150
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
151
|
+
__metadata("design:returntype", Promise)
|
|
152
|
+
], CRUDRoute.prototype, "validateCreateBulk", null);
|
|
153
|
+
__decorate([
|
|
154
|
+
Summary("Create {{model}}(s)"),
|
|
155
|
+
Description("Create a new {{model}}."),
|
|
156
|
+
Returns([Object]),
|
|
157
|
+
Post(),
|
|
158
|
+
Validate("validateCreateBulk"),
|
|
159
|
+
__param(1, Request),
|
|
160
|
+
__param(2, User),
|
|
161
|
+
__metadata("design:type", Function),
|
|
162
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
163
|
+
__metadata("design:returntype", Promise)
|
|
164
|
+
], CRUDRoute.prototype, "create", null);
|
|
165
|
+
__decorate([
|
|
166
|
+
Summary("Delete {{name}} by ID"),
|
|
167
|
+
Description("Deletes the {{name}} from the service."),
|
|
168
|
+
Returns([null]),
|
|
169
|
+
Delete("/:id"),
|
|
170
|
+
Transactional(),
|
|
171
|
+
__param(0, Param("id")),
|
|
172
|
+
__param(1, Query("version")),
|
|
173
|
+
__param(2, Query("purge")),
|
|
174
|
+
__param(3, Request),
|
|
175
|
+
__param(4, User),
|
|
176
|
+
__metadata("design:type", Function),
|
|
177
|
+
__metadata("design:paramtypes", [String, Object, Object, Object, Object]),
|
|
178
|
+
__metadata("design:returntype", Promise)
|
|
179
|
+
], CRUDRoute.prototype, "delete", null);
|
|
180
|
+
__decorate([
|
|
181
|
+
Summary("Exists"),
|
|
182
|
+
Description("Returns the total count of {{name}}s in the datasource based on the given criteria " +
|
|
183
|
+
"in the header as `Content-Length`."),
|
|
184
|
+
Returns([null]),
|
|
185
|
+
Head("/:id"),
|
|
186
|
+
__param(0, Param("id")),
|
|
187
|
+
__param(1, Query()),
|
|
188
|
+
__param(2, Response),
|
|
189
|
+
__param(3, User),
|
|
190
|
+
__metadata("design:type", Function),
|
|
191
|
+
__metadata("design:paramtypes", [String, Object, Object, Object]),
|
|
192
|
+
__metadata("design:returntype", Promise)
|
|
193
|
+
], CRUDRoute.prototype, "exists", null);
|
|
194
|
+
__decorate([
|
|
195
|
+
Summary("Find All {{model}}s"),
|
|
196
|
+
Description("Returns all {{model}}s from the system that the user has access to."),
|
|
197
|
+
Returns([[Array, Object]]),
|
|
198
|
+
Get(),
|
|
199
|
+
__param(0, Param()),
|
|
200
|
+
__param(1, Query()),
|
|
201
|
+
__param(2, User),
|
|
202
|
+
__metadata("design:type", Function),
|
|
203
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
204
|
+
__metadata("design:returntype", Promise)
|
|
205
|
+
], CRUDRoute.prototype, "find", null);
|
|
206
|
+
__decorate([
|
|
207
|
+
Summary("Find {{model}} by ID"),
|
|
208
|
+
Description("Returns a single {{model}} from the system that the user has access to."),
|
|
209
|
+
Returns([Object]),
|
|
210
|
+
Get("/:id"),
|
|
211
|
+
__param(0, Param("id")),
|
|
212
|
+
__param(1, Query()),
|
|
213
|
+
__param(2, User),
|
|
214
|
+
__metadata("design:type", Function),
|
|
215
|
+
__metadata("design:paramtypes", [String, Object, Object]),
|
|
216
|
+
__metadata("design:returntype", Promise)
|
|
217
|
+
], CRUDRoute.prototype, "findById", null);
|
|
218
|
+
__decorate([
|
|
219
|
+
Summary("Truncate {{model}}s"),
|
|
220
|
+
Description("Deletes all {{model}}s from the datasource that the user has access to."),
|
|
221
|
+
Returns([null]),
|
|
222
|
+
Delete(),
|
|
223
|
+
Transactional(),
|
|
224
|
+
__param(0, Param()),
|
|
225
|
+
__param(1, Query()),
|
|
226
|
+
__param(2, User),
|
|
227
|
+
__metadata("design:type", Function),
|
|
228
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
229
|
+
__metadata("design:returntype", Promise)
|
|
230
|
+
], CRUDRoute.prototype, "truncate", null);
|
|
231
|
+
__decorate([
|
|
232
|
+
__param(0, Param("id")),
|
|
233
|
+
__param(2, User),
|
|
234
|
+
__metadata("design:type", Function),
|
|
235
|
+
__metadata("design:paramtypes", [String, Object, Object]),
|
|
236
|
+
__metadata("design:returntype", Promise)
|
|
237
|
+
], CRUDRoute.prototype, "validateUpdate", null);
|
|
238
|
+
__decorate([
|
|
239
|
+
Summary("Update {{model}} by ID"),
|
|
240
|
+
Description("Updates a single {{model}}."),
|
|
241
|
+
Returns([Object]),
|
|
242
|
+
Put("/:id"),
|
|
243
|
+
Validate("validateUpdate"),
|
|
244
|
+
Transactional(),
|
|
245
|
+
__param(0, Param("id")),
|
|
246
|
+
__param(2, Request),
|
|
247
|
+
__param(3, User),
|
|
248
|
+
__metadata("design:type", Function),
|
|
249
|
+
__metadata("design:paramtypes", [String, Object, Object, Object]),
|
|
250
|
+
__metadata("design:returntype", Promise)
|
|
251
|
+
], CRUDRoute.prototype, "update", null);
|
|
252
|
+
__decorate([
|
|
253
|
+
__param(1, User),
|
|
254
|
+
__metadata("design:type", Function),
|
|
255
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
256
|
+
__metadata("design:returntype", Promise)
|
|
257
|
+
], CRUDRoute.prototype, "validateUpdateBulk", null);
|
|
258
|
+
__decorate([
|
|
259
|
+
Summary("Update {{model}}s in bulk"),
|
|
260
|
+
Description("Updates a collection of existing {{model}}s."),
|
|
261
|
+
Returns([[Array, Object]]),
|
|
262
|
+
Put(),
|
|
263
|
+
Validate("validateUpdateBulk"),
|
|
264
|
+
__param(1, Request),
|
|
265
|
+
__param(2, User),
|
|
266
|
+
__metadata("design:type", Function),
|
|
267
|
+
__metadata("design:paramtypes", [Array, Object, Object]),
|
|
268
|
+
__metadata("design:returntype", Promise)
|
|
269
|
+
], CRUDRoute.prototype, "updateBulk", null);
|
|
270
|
+
__decorate([
|
|
271
|
+
Summary("Update {{model}} by ID and property"),
|
|
272
|
+
Put(":id/:property"),
|
|
273
|
+
Description("Updates a single property of an existing {{model}}."),
|
|
274
|
+
TypeInfo([Object]),
|
|
275
|
+
Returns([Object]),
|
|
276
|
+
Transactional(),
|
|
277
|
+
__param(0, Param("id")),
|
|
278
|
+
__param(1, Param("property")),
|
|
279
|
+
__param(3, User),
|
|
280
|
+
__metadata("design:type", Function),
|
|
281
|
+
__metadata("design:paramtypes", [String, String, Object, Object]),
|
|
282
|
+
__metadata("design:returntype", Promise)
|
|
283
|
+
], CRUDRoute.prototype, "updateProperty", null);
|
|
284
|
+
//# sourceMappingURL=CRUDRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CRUDRoute.js","sourceRoot":"","sources":["../../../src/routes/CRUDRoute.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAA+E;AAC/E,wEAAwE;AACxE,mCAAmC;AACnC,+EAA+E;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAInD,OAAO,EAAE,QAAQ,EAAgB,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EACH,MAAM,EACN,GAAG,EACH,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,GAAG,EACH,KAAK,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,QAAQ,GACX,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAqB,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EA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