@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.
- package/LICENSE +23 -0
- package/README.md +16 -0
- package/dist/lib/ApiErrors.js +41 -0
- package/dist/lib/ApiErrors.js.map +1 -0
- package/dist/lib/BackgroundService.js +16 -0
- package/dist/lib/BackgroundService.js.map +1 -0
- package/dist/lib/BackgroundServiceManager.js +135 -0
- package/dist/lib/BackgroundServiceManager.js.map +1 -0
- package/dist/lib/BulkError.js +24 -0
- package/dist/lib/BulkError.js.map +1 -0
- package/dist/lib/EventListenerManager.js +161 -0
- package/dist/lib/EventListenerManager.js.map +1 -0
- package/dist/lib/NetUtils.js +103 -0
- package/dist/lib/NetUtils.js.map +1 -0
- package/dist/lib/NotificationUtils.js +34 -0
- package/dist/lib/NotificationUtils.js.map +1 -0
- package/dist/lib/ObjectFactory.js +90 -0
- package/dist/lib/ObjectFactory.js.map +1 -0
- package/dist/lib/OpenApiSpec.js +748 -0
- package/dist/lib/OpenApiSpec.js.map +1 -0
- package/dist/lib/Server.js +549 -0
- package/dist/lib/Server.js.map +1 -0
- package/dist/lib/Types.js +2 -0
- package/dist/lib/Types.js.map +1 -0
- package/dist/lib/auth/AuthMiddleware.js +229 -0
- package/dist/lib/auth/AuthMiddleware.js.map +1 -0
- package/dist/lib/auth/AuthStrategy.js +2 -0
- package/dist/lib/auth/AuthStrategy.js.map +1 -0
- package/dist/lib/auth/BasicStrategy.js +106 -0
- package/dist/lib/auth/BasicStrategy.js.map +1 -0
- package/dist/lib/auth/JWTStrategy.js +161 -0
- package/dist/lib/auth/JWTStrategy.js.map +1 -0
- package/dist/lib/auth/index.js +5 -0
- package/dist/lib/auth/index.js.map +1 -0
- package/dist/lib/database/ConnectionKinds.js +14 -0
- package/dist/lib/database/ConnectionKinds.js.map +1 -0
- package/dist/lib/database/ConnectionManager.js +161 -0
- package/dist/lib/database/ConnectionManager.js.map +1 -0
- package/dist/lib/database/MongoConnection.js +86 -0
- package/dist/lib/database/MongoConnection.js.map +1 -0
- package/dist/lib/database/MongoRepository.js +136 -0
- package/dist/lib/database/MongoRepository.js.map +1 -0
- package/dist/lib/database/MongoSchemaSync.js +136 -0
- package/dist/lib/database/MongoSchemaSync.js.map +1 -0
- package/dist/lib/database/NamingUtils.js +52 -0
- package/dist/lib/database/NamingUtils.js.map +1 -0
- package/dist/lib/database/TypeOrmSupport.js +146 -0
- package/dist/lib/database/TypeOrmSupport.js.map +1 -0
- package/dist/lib/database/index.js +7 -0
- package/dist/lib/database/index.js.map +1 -0
- package/dist/lib/decorators/DatabaseDecorators.js +52 -0
- package/dist/lib/decorators/DatabaseDecorators.js.map +1 -0
- package/dist/lib/decorators/DocDecorators.js +120 -0
- package/dist/lib/decorators/DocDecorators.js.map +1 -0
- package/dist/lib/decorators/EventDecorators.js +24 -0
- package/dist/lib/decorators/EventDecorators.js.map +1 -0
- package/dist/lib/decorators/ModelDecorators.js +173 -0
- package/dist/lib/decorators/ModelDecorators.js.map +1 -0
- package/dist/lib/decorators/PersistenceDecorators.js +177 -0
- package/dist/lib/decorators/PersistenceDecorators.js.map +1 -0
- package/dist/lib/decorators/RouteDecorators.js +324 -0
- package/dist/lib/decorators/RouteDecorators.js.map +1 -0
- package/dist/lib/decorators/index.js +7 -0
- package/dist/lib/decorators/index.js.map +1 -0
- package/dist/lib/http/Adapters.js +230 -0
- package/dist/lib/http/Adapters.js.map +1 -0
- package/dist/lib/http/Router.js +403 -0
- package/dist/lib/http/Router.js.map +1 -0
- package/dist/lib/http/WebSocket.js +82 -0
- package/dist/lib/http/WebSocket.js.map +1 -0
- package/dist/lib/http/index.js +4 -0
- package/dist/lib/http/index.js.map +1 -0
- package/dist/lib/http/types.js +5 -0
- package/dist/lib/http/types.js.map +1 -0
- package/dist/lib/index.js +18 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/models/BaseEntity.js +83 -0
- package/dist/lib/models/BaseEntity.js.map +1 -0
- package/dist/lib/models/BaseMongoEntity.js +40 -0
- package/dist/lib/models/BaseMongoEntity.js.map +1 -0
- package/dist/lib/models/ModelUtils.js +645 -0
- package/dist/lib/models/ModelUtils.js.map +1 -0
- package/dist/lib/models/RecoverableBaseEntity.js +39 -0
- package/dist/lib/models/RecoverableBaseEntity.js.map +1 -0
- package/dist/lib/models/RecoverableBaseMongoEntity.js +40 -0
- package/dist/lib/models/RecoverableBaseMongoEntity.js.map +1 -0
- package/dist/lib/models/RepoUtils.js +717 -0
- package/dist/lib/models/RepoUtils.js.map +1 -0
- package/dist/lib/models/SimpleEntity.js +42 -0
- package/dist/lib/models/SimpleEntity.js.map +1 -0
- package/dist/lib/models/SimpleMongoEntity.js +38 -0
- package/dist/lib/models/SimpleMongoEntity.js.map +1 -0
- package/dist/lib/models/StatusExtraData.js +15 -0
- package/dist/lib/models/StatusExtraData.js.map +1 -0
- package/dist/lib/models/index.js +10 -0
- package/dist/lib/models/index.js.map +1 -0
- package/dist/lib/routes/AdminRoute.js +268 -0
- package/dist/lib/routes/AdminRoute.js.map +1 -0
- package/dist/lib/routes/MetricsRoute.js +86 -0
- package/dist/lib/routes/MetricsRoute.js.map +1 -0
- package/dist/lib/routes/ModelRoute.js +481 -0
- package/dist/lib/routes/ModelRoute.js.map +1 -0
- package/dist/lib/routes/OpenAPIRoute.js +115 -0
- package/dist/lib/routes/OpenAPIRoute.js.map +1 -0
- package/dist/lib/routes/RouteUtils.js +445 -0
- package/dist/lib/routes/RouteUtils.js.map +1 -0
- package/dist/lib/routes/StatusRoute.js +55 -0
- package/dist/lib/routes/StatusRoute.js.map +1 -0
- package/dist/lib/routes/index.js +7 -0
- package/dist/lib/routes/index.js.map +1 -0
- package/dist/lib/security/ACLRouteMongo.js +194 -0
- package/dist/lib/security/ACLRouteMongo.js.map +1 -0
- package/dist/lib/security/ACLRouteSQL.js +193 -0
- package/dist/lib/security/ACLRouteSQL.js.map +1 -0
- package/dist/lib/security/ACLUtils.js +457 -0
- package/dist/lib/security/ACLUtils.js.map +1 -0
- package/dist/lib/security/AccessControlList.js +18 -0
- package/dist/lib/security/AccessControlList.js.map +1 -0
- package/dist/lib/security/AccessControlListMongo.js +155 -0
- package/dist/lib/security/AccessControlListMongo.js.map +1 -0
- package/dist/lib/security/AccessControlListSQL.js +149 -0
- package/dist/lib/security/AccessControlListSQL.js.map +1 -0
- package/dist/lib/security/index.js +3 -0
- package/dist/lib/security/index.js.map +1 -0
- package/dist/lib/test/index.js +3 -0
- package/dist/lib/test/index.js.map +1 -0
- package/dist/lib/test/request.js +99 -0
- package/dist/lib/test/request.js.map +1 -0
- package/dist/lib/test/requestws.js +173 -0
- package/dist/lib/test/requestws.js.map +1 -0
- package/dist/types/ApiErrors.d.ts +38 -0
- package/dist/types/BackgroundService.d.ts +30 -0
- package/dist/types/BackgroundServiceManager.d.ts +66 -0
- package/dist/types/BulkError.d.ts +11 -0
- package/dist/types/EventListenerManager.d.ts +36 -0
- package/dist/types/NetUtils.d.ts +29 -0
- package/dist/types/NotificationUtils.d.ts +25 -0
- package/dist/types/ObjectFactory.d.ts +17 -0
- package/dist/types/OpenApiSpec.d.ts +114 -0
- package/dist/types/Server.d.ts +180 -0
- package/dist/types/Types.d.ts +8 -0
- package/dist/types/auth/AuthMiddleware.d.ts +42 -0
- package/dist/types/auth/AuthStrategy.d.ts +32 -0
- package/dist/types/auth/BasicStrategy.d.ts +33 -0
- package/dist/types/auth/JWTStrategy.d.ts +61 -0
- package/dist/types/auth/index.d.ts +4 -0
- package/dist/types/database/ConnectionKinds.d.ts +7 -0
- package/dist/types/database/ConnectionManager.d.ts +35 -0
- package/dist/types/database/MongoConnection.d.ts +54 -0
- package/dist/types/database/MongoRepository.d.ts +92 -0
- package/dist/types/database/MongoSchemaSync.d.ts +41 -0
- package/dist/types/database/NamingUtils.d.ts +24 -0
- package/dist/types/database/TypeOrmSupport.d.ts +20 -0
- package/dist/types/database/index.d.ts +6 -0
- package/dist/types/decorators/DatabaseDecorators.d.ts +18 -0
- package/dist/types/decorators/DocDecorators.d.ts +69 -0
- package/dist/types/decorators/EventDecorators.d.ts +12 -0
- package/dist/types/decorators/ModelDecorators.d.ts +80 -0
- package/dist/types/decorators/PersistenceDecorators.d.ts +117 -0
- package/dist/types/decorators/RouteDecorators.d.ts +172 -0
- package/dist/types/decorators/index.d.ts +6 -0
- package/dist/types/http/Adapters.d.ts +68 -0
- package/dist/types/http/Router.d.ts +99 -0
- package/dist/types/http/WebSocket.d.ts +56 -0
- package/dist/types/http/index.d.ts +6 -0
- package/dist/types/http/types.d.ts +54 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/models/BaseEntity.d.ts +29 -0
- package/dist/types/models/BaseMongoEntity.d.ts +13 -0
- package/dist/types/models/ModelUtils.d.ts +166 -0
- package/dist/types/models/RecoverableBaseEntity.d.ts +16 -0
- package/dist/types/models/RecoverableBaseMongoEntity.d.ts +16 -0
- package/dist/types/models/RepoUtils.d.ts +154 -0
- package/dist/types/models/SimpleEntity.d.ts +14 -0
- package/dist/types/models/SimpleMongoEntity.d.ts +15 -0
- package/dist/types/models/StatusExtraData.d.ts +6 -0
- package/dist/types/models/index.d.ts +9 -0
- package/dist/types/routes/AdminRoute.d.ts +47 -0
- package/dist/types/routes/MetricsRoute.d.ts +15 -0
- package/dist/types/routes/ModelRoute.d.ts +226 -0
- package/dist/types/routes/OpenAPIRoute.d.ts +17 -0
- package/dist/types/routes/RouteUtils.d.ts +55 -0
- package/dist/types/routes/StatusRoute.d.ts +11 -0
- package/dist/types/routes/index.d.ts +6 -0
- package/dist/types/security/ACLRouteMongo.d.ts +19 -0
- package/dist/types/security/ACLRouteSQL.d.ts +19 -0
- package/dist/types/security/ACLUtils.d.ts +94 -0
- package/dist/types/security/AccessControlList.d.ts +103 -0
- package/dist/types/security/AccessControlListMongo.d.ts +24 -0
- package/dist/types/security/AccessControlListSQL.d.ts +24 -0
- package/dist/types/security/index.d.ts +2 -0
- package/dist/types/test/index.d.ts +2 -0
- package/dist/types/test/request.d.ts +24 -0
- package/dist/types/test/requestws.d.ts +21 -0
- package/docs/Makefile +20 -0
- package/docs/conf.py +58 -0
- package/docs/index.rst +17 -0
- package/docs/make.bat +35 -0
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/README.md +13 -0
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/MongoRepository.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/RedisConnection.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/Repository.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/README.md +23 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Default.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Description.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Document.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Example.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Format.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Returns.md +28 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Summary.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Tags.md +25 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/TypeInfo.md +28 -0
- package/docs/reference/@rapidrest/namespaces/DocDecorators/interfaces/DocumentsData.md +57 -0
- package/docs/reference/@rapidrest/namespaces/EventDecorators/README.md +12 -0
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/EventListener.md +17 -0
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/OnEvent.md +26 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/README.md +26 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Cache.md +25 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/ChildEntity.md +18 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/DataStore.md +25 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Identifier.md +27 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Protect.md +35 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Reference.md +25 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Shard.md +27 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/TrackChanges.md +26 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/interfaces/PendingTypeOrmColumn.md +45 -0
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/variables/pendingTypeOrmColumns.md +14 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/README.md +25 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Column.md +25 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Entity.md +26 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Index.md +119 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/PrimaryColumn.md +25 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Unique.md +68 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getColumnMetadata.md +26 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getEntityName.md +26 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getIndexMetadata.md +27 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnInfo.md +41 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnOptions.md +51 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexInfo.md +41 -0
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexOptions.md +51 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/README.md +36 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/After.md +26 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Auth.md +33 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/AuthResult.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Before.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/ContentType.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Delete.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Get.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Head.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Header.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Method.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Model.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Options.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Param.md +26 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Patch.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Post.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Protect.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Put.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Query.md +26 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Request.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/RequiresRole.md +26 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Response.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Route.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Socket.md +33 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/User.md +31 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Validate.md +25 -0
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/WebSocket.md +25 -0
- package/docs/reference/README.md +20 -0
- package/docs/reference/classes/ACLUtils.md +251 -0
- package/docs/reference/classes/AdminRoute.md +51 -0
- package/docs/reference/classes/AuthMiddleware.md +131 -0
- package/docs/reference/classes/BackgroundService.md +117 -0
- package/docs/reference/classes/BackgroundServiceManager.md +172 -0
- package/docs/reference/classes/BaseEntity.md +82 -0
- package/docs/reference/classes/BaseMongoEntity.md +107 -0
- package/docs/reference/classes/BasicStrategy.md +89 -0
- package/docs/reference/classes/BasicStrategyOptions.md +91 -0
- package/docs/reference/classes/BulkError.md +271 -0
- package/docs/reference/classes/ConnectionManager.md +75 -0
- package/docs/reference/classes/EventListenerManager.md +88 -0
- package/docs/reference/classes/JWTStrategy.md +77 -0
- package/docs/reference/classes/JWTStrategyOptions.md +97 -0
- package/docs/reference/classes/MetricsRoute.md +27 -0
- package/docs/reference/classes/ModelRoute.md +527 -0
- package/docs/reference/classes/ModelUtils.md +448 -0
- package/docs/reference/classes/MongoConnection.md +218 -0
- package/docs/reference/classes/MongoRepository.md +354 -0
- package/docs/reference/classes/MongoSchemaSync.md +67 -0
- package/docs/reference/classes/NetUtils.md +90 -0
- package/docs/reference/classes/NotificationUtils.md +77 -0
- package/docs/reference/classes/ObjectFactory.md +336 -0
- package/docs/reference/classes/OpenAPIRoute.md +77 -0
- package/docs/reference/classes/OpenApiSpec.md +892 -0
- package/docs/reference/classes/RecoverableBaseEntity.md +114 -0
- package/docs/reference/classes/RecoverableBaseMongoEntity.md +124 -0
- package/docs/reference/classes/RedisTransport.md +2202 -0
- package/docs/reference/classes/RepoUtils.md +486 -0
- package/docs/reference/classes/RouteUtils.md +191 -0
- package/docs/reference/classes/Server.md +408 -0
- package/docs/reference/classes/SimpleEntity.md +48 -0
- package/docs/reference/classes/SimpleMongoEntity.md +66 -0
- package/docs/reference/classes/StatusExtraData.md +57 -0
- package/docs/reference/classes/StatusRoute.md +26 -0
- package/docs/reference/enumerations/ACLAction.md +63 -0
- package/docs/reference/enumerations/ApiErrorMessages.md +123 -0
- package/docs/reference/enumerations/ApiErrors.md +123 -0
- package/docs/reference/functions/isSqlDataSource.md +26 -0
- package/docs/reference/functions/resolveCollectionName.md +33 -0
- package/docs/reference/functions/snakeCase.md +28 -0
- package/docs/reference/globals.md +91 -0
- package/docs/reference/interfaces/ACLRecord.md +96 -0
- package/docs/reference/interfaces/AccessControlList.md +76 -0
- package/docs/reference/interfaces/AuthResult.md +55 -0
- package/docs/reference/interfaces/AuthStrategy.md +57 -0
- package/docs/reference/interfaces/CreateRequestOptions.md +121 -0
- package/docs/reference/interfaces/DeleteRequestOptions.md +147 -0
- package/docs/reference/interfaces/FindRequestOptions.md +133 -0
- package/docs/reference/interfaces/JWTAuthResult.md +84 -0
- package/docs/reference/interfaces/RepoCreateOptions.md +95 -0
- package/docs/reference/interfaces/RepoDeleteOptions.md +115 -0
- package/docs/reference/interfaces/RepoFindOptions.md +135 -0
- package/docs/reference/interfaces/RepoOperationOptions.md +69 -0
- package/docs/reference/interfaces/RepoUpdateOptions.md +111 -0
- package/docs/reference/interfaces/RequestOptions.md +112 -0
- package/docs/reference/interfaces/TruncateRequestOptions.md +175 -0
- package/docs/reference/interfaces/UpdateRequestOptions.md +149 -0
- package/docs/reference/type-aliases/OneOrMany.md +19 -0
- package/docs/reference/type-aliases/OneOrNull.md +19 -0
- package/docs/reference/type-aliases/PartialBaseEntity.md +17 -0
- package/docs/reference/type-aliases/PartialSimpleEntity.md +17 -0
- package/docs/reference/type-aliases/UpdateObject.md +19 -0
- package/package.json +125 -0
|
@@ -0,0 +1,194 @@
|
|
|
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
|
+
import { AccessControlListMongo } from "./AccessControlListMongo.js";
|
|
14
|
+
import { MongoRepository as Repo } from "../database/MongoRepository.js";
|
|
15
|
+
import { ACLAction } from "./AccessControlList.js";
|
|
16
|
+
import { ApiError, UserUtils } from "@rapidrest/core";
|
|
17
|
+
import { DatabaseDecorators, DocDecorators, RouteDecorators } from "../decorators/index.js";
|
|
18
|
+
import { ModelRoute } from "../routes/ModelRoute.js";
|
|
19
|
+
import { RepoUtils } from "../models/index.js";
|
|
20
|
+
import { ApiErrorMessages } from "../ApiErrors.js";
|
|
21
|
+
const { MongoRepository } = DatabaseDecorators;
|
|
22
|
+
const { Description, Returns, Summary, TypeInfo } = DocDecorators;
|
|
23
|
+
const { Auth, Delete, Get, Head, Model, Param, Post, Put, Query, Request, Response, Route, User } = RouteDecorators;
|
|
24
|
+
let ACLRouteMongo = class ACLRouteMongo extends ModelRoute {
|
|
25
|
+
constructor() {
|
|
26
|
+
super();
|
|
27
|
+
this.repoUtilsClass = RepoUtils;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The base key used to get or set data in the cache.
|
|
31
|
+
*/
|
|
32
|
+
get baseCacheKey() {
|
|
33
|
+
return "db.cache.AccessControlList";
|
|
34
|
+
}
|
|
35
|
+
create(objs, req, user) {
|
|
36
|
+
if (!user || !UserUtils.hasRoles(user, this.config.get("trusted_roles"))) {
|
|
37
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
38
|
+
}
|
|
39
|
+
return super.doCreate(objs, { user, recordEvent: true, req });
|
|
40
|
+
}
|
|
41
|
+
updateBulk(objs, req, user) {
|
|
42
|
+
if (!user || !UserUtils.hasRoles(user, this.config.get("trusted_roles"))) {
|
|
43
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
44
|
+
}
|
|
45
|
+
return super.doBulkUpdate(objs, { user, recordEvent: true, req });
|
|
46
|
+
}
|
|
47
|
+
count(params, query, res, user) {
|
|
48
|
+
if (!user || !UserUtils.hasRoles(user, this.config.get("trusted_roles"))) {
|
|
49
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
50
|
+
}
|
|
51
|
+
return super.doCount({ params, query, res, user });
|
|
52
|
+
}
|
|
53
|
+
findAll(params, query, user) {
|
|
54
|
+
if (!user || !UserUtils.hasRoles(user, this.config.get("trusted_roles"))) {
|
|
55
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
56
|
+
}
|
|
57
|
+
return super.doFindAll({ params, query, user });
|
|
58
|
+
}
|
|
59
|
+
async delete(id, req, version, user) {
|
|
60
|
+
if (!user ||
|
|
61
|
+
(!UserUtils.hasRoles(user, this.config.get("trusted_roles")) &&
|
|
62
|
+
!(await this.aclUtils?.hasPermission(user, id, ACLAction.FULL)))) {
|
|
63
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
64
|
+
}
|
|
65
|
+
if (id.startsWith("default_")) {
|
|
66
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
67
|
+
}
|
|
68
|
+
return super.doDelete(id, { version, user, recordEvent: true, req });
|
|
69
|
+
}
|
|
70
|
+
async findById(id, query, user) {
|
|
71
|
+
if (!user ||
|
|
72
|
+
(!UserUtils.hasRoles(user, this.config.get("trusted_roles")) &&
|
|
73
|
+
!(await this.aclUtils?.hasPermission(user, id, ACLAction.FULL)))) {
|
|
74
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
75
|
+
}
|
|
76
|
+
return super.doFindById(id, { query, user });
|
|
77
|
+
}
|
|
78
|
+
async update(id, obj, req, user) {
|
|
79
|
+
if (!user ||
|
|
80
|
+
(!UserUtils.hasRoles(user, this.config.get("trusted_roles")) &&
|
|
81
|
+
!(await this.aclUtils?.hasPermission(user, id, ACLAction.FULL)))) {
|
|
82
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
83
|
+
}
|
|
84
|
+
if (id.startsWith("default_")) {
|
|
85
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
86
|
+
}
|
|
87
|
+
const acl = new AccessControlListMongo(obj);
|
|
88
|
+
return super.doUpdate(id, acl, { user, recordEvent: true, req });
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
__decorate([
|
|
92
|
+
MongoRepository(AccessControlListMongo),
|
|
93
|
+
__metadata("design:type", Repo)
|
|
94
|
+
], ACLRouteMongo.prototype, "repo", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
Summary("Creates Access Control Lists."),
|
|
97
|
+
Description("Creates one or more access control lists."),
|
|
98
|
+
Auth(["jwt"]),
|
|
99
|
+
Post(),
|
|
100
|
+
TypeInfo([AccessControlListMongo, [Array, AccessControlListMongo]]),
|
|
101
|
+
Returns([AccessControlListMongo, [Array, AccessControlListMongo]]),
|
|
102
|
+
__param(1, Request),
|
|
103
|
+
__param(2, User),
|
|
104
|
+
__metadata("design:type", Function),
|
|
105
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
106
|
+
__metadata("design:returntype", Promise)
|
|
107
|
+
], ACLRouteMongo.prototype, "create", null);
|
|
108
|
+
__decorate([
|
|
109
|
+
Summary("Bulk Update Access Control Lists."),
|
|
110
|
+
Description("Saves modifications for the given collection of access control lists."),
|
|
111
|
+
Auth(["jwt"]),
|
|
112
|
+
Put(),
|
|
113
|
+
TypeInfo([[Array, AccessControlListMongo]]),
|
|
114
|
+
Returns([[Array, AccessControlListMongo]]),
|
|
115
|
+
__param(1, Request),
|
|
116
|
+
__param(2, User),
|
|
117
|
+
__metadata("design:type", Function),
|
|
118
|
+
__metadata("design:paramtypes", [Array, Object, Object]),
|
|
119
|
+
__metadata("design:returntype", Promise)
|
|
120
|
+
], ACLRouteMongo.prototype, "updateBulk", null);
|
|
121
|
+
__decorate([
|
|
122
|
+
Summary("Count Access Control Lists."),
|
|
123
|
+
Description("Returns the total number of access control lists matching the given search criteria."),
|
|
124
|
+
Auth(["jwt"]),
|
|
125
|
+
Head(),
|
|
126
|
+
Returns([null]),
|
|
127
|
+
__param(0, Param()),
|
|
128
|
+
__param(1, Query()),
|
|
129
|
+
__param(2, Response),
|
|
130
|
+
__param(3, User),
|
|
131
|
+
__metadata("design:type", Function),
|
|
132
|
+
__metadata("design:paramtypes", [Object, Object, Object, Object]),
|
|
133
|
+
__metadata("design:returntype", Promise)
|
|
134
|
+
], ACLRouteMongo.prototype, "count", null);
|
|
135
|
+
__decorate([
|
|
136
|
+
Summary("Find All Access Control Lists."),
|
|
137
|
+
Description("Returns a collection of access control lists matching the given search criteria."),
|
|
138
|
+
Auth(["jwt"]),
|
|
139
|
+
Get(),
|
|
140
|
+
Returns([[Array, AccessControlListMongo]]),
|
|
141
|
+
__param(0, Param()),
|
|
142
|
+
__param(1, Query()),
|
|
143
|
+
__param(2, User),
|
|
144
|
+
__metadata("design:type", Function),
|
|
145
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
146
|
+
__metadata("design:returntype", Promise)
|
|
147
|
+
], ACLRouteMongo.prototype, "findAll", null);
|
|
148
|
+
__decorate([
|
|
149
|
+
Summary("Delete Access Control Lists by Id."),
|
|
150
|
+
Description("Deletes the access control list with the given unique identifier and optional version."),
|
|
151
|
+
Auth(["jwt"]),
|
|
152
|
+
Delete("/:id"),
|
|
153
|
+
Returns([null]),
|
|
154
|
+
__param(0, Param("id")),
|
|
155
|
+
__param(1, Request),
|
|
156
|
+
__param(2, Query("version")),
|
|
157
|
+
__param(3, User),
|
|
158
|
+
__metadata("design:type", Function),
|
|
159
|
+
__metadata("design:paramtypes", [String, Object, String, Object]),
|
|
160
|
+
__metadata("design:returntype", Promise)
|
|
161
|
+
], ACLRouteMongo.prototype, "delete", null);
|
|
162
|
+
__decorate([
|
|
163
|
+
Summary("Find Access Control Lists by Id."),
|
|
164
|
+
Description("Returns the access control list with the given unique identifier."),
|
|
165
|
+
Auth(["jwt"]),
|
|
166
|
+
Get("/:id"),
|
|
167
|
+
Returns([AccessControlListMongo]),
|
|
168
|
+
__param(0, Param("id")),
|
|
169
|
+
__param(1, Query()),
|
|
170
|
+
__param(2, User),
|
|
171
|
+
__metadata("design:type", Function),
|
|
172
|
+
__metadata("design:paramtypes", [String, Object, Object]),
|
|
173
|
+
__metadata("design:returntype", Promise)
|
|
174
|
+
], ACLRouteMongo.prototype, "findById", null);
|
|
175
|
+
__decorate([
|
|
176
|
+
Summary("Update Access Control Lists by Id."),
|
|
177
|
+
Description("Saves modifications to existing access control list with the given unique identifier."),
|
|
178
|
+
Auth(["jwt"]),
|
|
179
|
+
Put("/:id"),
|
|
180
|
+
Returns([AccessControlListMongo]),
|
|
181
|
+
__param(0, Param("id")),
|
|
182
|
+
__param(2, Request),
|
|
183
|
+
__param(3, User),
|
|
184
|
+
__metadata("design:type", Function),
|
|
185
|
+
__metadata("design:paramtypes", [String, AccessControlListMongo, Object, Object]),
|
|
186
|
+
__metadata("design:returntype", Promise)
|
|
187
|
+
], ACLRouteMongo.prototype, "update", null);
|
|
188
|
+
ACLRouteMongo = __decorate([
|
|
189
|
+
Model(AccessControlListMongo),
|
|
190
|
+
Route("/acls"),
|
|
191
|
+
__metadata("design:paramtypes", [])
|
|
192
|
+
], ACLRouteMongo);
|
|
193
|
+
export { ACLRouteMongo };
|
|
194
|
+
//# sourceMappingURL=ACLRouteMongo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ACLRouteMongo.js","sourceRoot":"","sources":["../../../src/security/ACLRouteMongo.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAW,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,MAAM,EAAE,eAAe,EAAE,GAAG,kBAAkB,CAAC;AAC/C,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,aAAa,CAAC;AAClE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,KAA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F,CAAC;IACpG,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;IACb,GAAG,CAAC,MAAM,CAAC;IACX,OAAO,CAAC,CAAC,sBAAsB,CAAC,CAAC;IAE7B,WAAA,KAAK,CAAC,IAAI,CAAC,CAAA;IAEX,WAAA,OAAO,CAAA;IACP,WAAA,IAAI,CAAA;;6CAFA,sBAAsB;;2CAkB9B;AA9JQ,aAAa;IAFzB,KAAK,CAAC,sBAAsB,CAAC;IAC7B,KAAK,CAAC,OAAO,CAAC;;GACF,aAAa,CA+JzB"}
|
|
@@ -0,0 +1,193 @@
|
|
|
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
|
+
import { AccessControlListSQL } from "./AccessControlListSQL.js";
|
|
14
|
+
import { ACLAction } from "./AccessControlList.js";
|
|
15
|
+
import { ApiError, UserUtils } from "@rapidrest/core";
|
|
16
|
+
import { DatabaseDecorators, DocDecorators, RouteDecorators } from "../decorators/index.js";
|
|
17
|
+
import { ModelRoute } from "../routes/ModelRoute.js";
|
|
18
|
+
import { RepoUtils } from "../models/index.js";
|
|
19
|
+
import { ApiErrorMessages } from "../ApiErrors.js";
|
|
20
|
+
const { Repository } = DatabaseDecorators;
|
|
21
|
+
const { Description, Returns, TypeInfo, Summary } = DocDecorators;
|
|
22
|
+
const { Auth, Delete, Get, Head, Model, Param, Post, Put, Query, Request, Response, Route, User } = RouteDecorators;
|
|
23
|
+
let ACLRouteSQL = class ACLRouteSQL extends ModelRoute {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
this.repoUtilsClass = RepoUtils;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The base key used to get or set data in the cache.
|
|
30
|
+
*/
|
|
31
|
+
get baseCacheKey() {
|
|
32
|
+
return "db.cache.AccessControlList";
|
|
33
|
+
}
|
|
34
|
+
create(objs, req, user) {
|
|
35
|
+
if (!user || !UserUtils.hasRoles(user, this.config.get("trusted_roles"))) {
|
|
36
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
37
|
+
}
|
|
38
|
+
return super.doCreate(objs, { user, recordEvent: true, req });
|
|
39
|
+
}
|
|
40
|
+
updateBulk(objs, req, user) {
|
|
41
|
+
if (!user || !UserUtils.hasRoles(user, this.config.get("trusted_roles"))) {
|
|
42
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
43
|
+
}
|
|
44
|
+
return super.doBulkUpdate(objs, { user, recordEvent: true, req });
|
|
45
|
+
}
|
|
46
|
+
count(params, query, res, user) {
|
|
47
|
+
if (!user || !UserUtils.hasRoles(user, this.config.get("trusted_roles"))) {
|
|
48
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
49
|
+
}
|
|
50
|
+
return super.doCount({ params, query, res, user });
|
|
51
|
+
}
|
|
52
|
+
findAll(params, query, user) {
|
|
53
|
+
if (!user || !UserUtils.hasRoles(user, this.config.get("trusted_roles"))) {
|
|
54
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
55
|
+
}
|
|
56
|
+
return super.doFindAll({ params, query, user });
|
|
57
|
+
}
|
|
58
|
+
async delete(id, req, version, user) {
|
|
59
|
+
if (!user ||
|
|
60
|
+
(!UserUtils.hasRoles(user, this.config.get("trusted_roles")) &&
|
|
61
|
+
!(await this.aclUtils?.hasPermission(user, id, ACLAction.FULL)))) {
|
|
62
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
63
|
+
}
|
|
64
|
+
if (id.startsWith("default_")) {
|
|
65
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
66
|
+
}
|
|
67
|
+
return super.doDelete(id, { version, user, recordEvent: true, req });
|
|
68
|
+
}
|
|
69
|
+
async findById(id, query, user) {
|
|
70
|
+
if (!user ||
|
|
71
|
+
(!UserUtils.hasRoles(user, this.config.get("trusted_roles")) &&
|
|
72
|
+
!(await this.aclUtils?.hasPermission(user, id, ACLAction.FULL)))) {
|
|
73
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
74
|
+
}
|
|
75
|
+
return super.doFindById(id, { query, user });
|
|
76
|
+
}
|
|
77
|
+
async update(id, obj, req, user) {
|
|
78
|
+
if (!user ||
|
|
79
|
+
(!UserUtils.hasRoles(user, this.config.get("trusted_roles")) &&
|
|
80
|
+
!(await this.aclUtils?.hasPermission(user, id, ACLAction.FULL)))) {
|
|
81
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
82
|
+
}
|
|
83
|
+
if (id.startsWith("default_")) {
|
|
84
|
+
throw new ApiError(ApiErrorMessages.AUTH_PERMISSION_FAILURE, 403, ApiErrorMessages.AUTH_PERMISSION_FAILURE);
|
|
85
|
+
}
|
|
86
|
+
const acl = new AccessControlListSQL(obj);
|
|
87
|
+
return super.doUpdate(id, acl, { user, recordEvent: true, req });
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
__decorate([
|
|
91
|
+
Repository(AccessControlListSQL),
|
|
92
|
+
__metadata("design:type", Function)
|
|
93
|
+
], ACLRouteSQL.prototype, "repo", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
Summary("Creates Access Control Lists."),
|
|
96
|
+
Description("Creates one or more access control lists."),
|
|
97
|
+
Auth(["jwt"]),
|
|
98
|
+
Post(),
|
|
99
|
+
TypeInfo([AccessControlListSQL, [Array, AccessControlListSQL]]),
|
|
100
|
+
Returns([AccessControlListSQL, [Array, AccessControlListSQL]]),
|
|
101
|
+
__param(1, Request),
|
|
102
|
+
__param(2, User),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
105
|
+
__metadata("design:returntype", Promise)
|
|
106
|
+
], ACLRouteSQL.prototype, "create", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
Summary("Bulk Update Access Control Lists."),
|
|
109
|
+
Description("Saves modifications for the given collection of access control lists."),
|
|
110
|
+
Auth(["jwt"]),
|
|
111
|
+
Put(),
|
|
112
|
+
TypeInfo([[Array, AccessControlListSQL]]),
|
|
113
|
+
Returns([[Array, AccessControlListSQL]]),
|
|
114
|
+
__param(1, Request),
|
|
115
|
+
__param(2, User),
|
|
116
|
+
__metadata("design:type", Function),
|
|
117
|
+
__metadata("design:paramtypes", [Array, Object, Object]),
|
|
118
|
+
__metadata("design:returntype", Promise)
|
|
119
|
+
], ACLRouteSQL.prototype, "updateBulk", null);
|
|
120
|
+
__decorate([
|
|
121
|
+
Summary("Count Access Control Lists."),
|
|
122
|
+
Description("Returns the total number of access control lists matching the given search criteria."),
|
|
123
|
+
Auth(["jwt"]),
|
|
124
|
+
Head(),
|
|
125
|
+
Returns([null]),
|
|
126
|
+
__param(0, Param()),
|
|
127
|
+
__param(1, Query()),
|
|
128
|
+
__param(2, Response),
|
|
129
|
+
__param(3, User),
|
|
130
|
+
__metadata("design:type", Function),
|
|
131
|
+
__metadata("design:paramtypes", [Object, Object, Object, Object]),
|
|
132
|
+
__metadata("design:returntype", Promise)
|
|
133
|
+
], ACLRouteSQL.prototype, "count", null);
|
|
134
|
+
__decorate([
|
|
135
|
+
Summary("Find All Access Control Lists."),
|
|
136
|
+
Description("Returns a collection of access control lists matching the given search criteria."),
|
|
137
|
+
Auth(["jwt"]),
|
|
138
|
+
Get(),
|
|
139
|
+
Returns([Array, AccessControlListSQL]),
|
|
140
|
+
__param(0, Param()),
|
|
141
|
+
__param(1, Query()),
|
|
142
|
+
__param(2, User),
|
|
143
|
+
__metadata("design:type", Function),
|
|
144
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
145
|
+
__metadata("design:returntype", Promise)
|
|
146
|
+
], ACLRouteSQL.prototype, "findAll", null);
|
|
147
|
+
__decorate([
|
|
148
|
+
Summary("Delete Access Control Lists by Id."),
|
|
149
|
+
Description("Deletes the access control list with the given unique identifier and optional version."),
|
|
150
|
+
Auth(["jwt"]),
|
|
151
|
+
Delete("/:id"),
|
|
152
|
+
Returns([null]),
|
|
153
|
+
__param(0, Param("id")),
|
|
154
|
+
__param(1, Request),
|
|
155
|
+
__param(2, Query("version")),
|
|
156
|
+
__param(3, User),
|
|
157
|
+
__metadata("design:type", Function),
|
|
158
|
+
__metadata("design:paramtypes", [String, Object, String, Object]),
|
|
159
|
+
__metadata("design:returntype", Promise)
|
|
160
|
+
], ACLRouteSQL.prototype, "delete", null);
|
|
161
|
+
__decorate([
|
|
162
|
+
Summary("Find Access Control Lists by Id."),
|
|
163
|
+
Description("Returns the access control list with the given unique identifier."),
|
|
164
|
+
Auth(["jwt"]),
|
|
165
|
+
Get("/:id"),
|
|
166
|
+
Returns([AccessControlListSQL]),
|
|
167
|
+
__param(0, Param("id")),
|
|
168
|
+
__param(1, Query()),
|
|
169
|
+
__param(2, User),
|
|
170
|
+
__metadata("design:type", Function),
|
|
171
|
+
__metadata("design:paramtypes", [String, Object, Object]),
|
|
172
|
+
__metadata("design:returntype", Promise)
|
|
173
|
+
], ACLRouteSQL.prototype, "findById", null);
|
|
174
|
+
__decorate([
|
|
175
|
+
Summary("Update Access Control Lists by Id."),
|
|
176
|
+
Description("Saves modifications to existing access control list with the given unique identifier."),
|
|
177
|
+
Auth(["jwt"]),
|
|
178
|
+
Put("/:id"),
|
|
179
|
+
Returns([AccessControlListSQL]),
|
|
180
|
+
__param(0, Param("id")),
|
|
181
|
+
__param(2, Request),
|
|
182
|
+
__param(3, User),
|
|
183
|
+
__metadata("design:type", Function),
|
|
184
|
+
__metadata("design:paramtypes", [String, AccessControlListSQL, Object, Object]),
|
|
185
|
+
__metadata("design:returntype", Promise)
|
|
186
|
+
], ACLRouteSQL.prototype, "update", null);
|
|
187
|
+
ACLRouteSQL = __decorate([
|
|
188
|
+
Model(AccessControlListSQL),
|
|
189
|
+
Route("/acls"),
|
|
190
|
+
__metadata("design:paramtypes", [])
|
|
191
|
+
], ACLRouteSQL);
|
|
192
|
+
export { ACLRouteSQL };
|
|
193
|
+
//# sourceMappingURL=ACLRouteSQL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ACLRouteSQL.js","sourceRoot":"","sources":["../../../src/security/ACLRouteSQL.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAW,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,aA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