@rapidrest/service-core 1.0.0-rc.13 → 1.0.0-rc.16
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/dist/lib/OpenApiSpec.js +3 -2
- package/dist/lib/OpenApiSpec.js.map +1 -1
- package/dist/lib/Server.js +16 -71
- package/dist/lib/Server.js.map +1 -1
- package/dist/lib/database/TypeOrmSupport.js +18 -2
- package/dist/lib/database/TypeOrmSupport.js.map +1 -1
- package/dist/lib/decorators/DocDecorators.js +19 -1
- package/dist/lib/decorators/DocDecorators.js.map +1 -1
- package/dist/lib/decorators/PersistenceDecorators.js.map +1 -1
- package/dist/lib/models/RepoUtils.js.map +1 -1
- package/dist/lib/routes/{AdminRoute.js → BaseAdminRoute.js} +45 -36
- package/dist/lib/routes/BaseAdminRoute.js.map +1 -0
- package/dist/lib/routes/{MetricsRoute.js → BaseMetricsRoute.js} +28 -15
- package/dist/lib/routes/BaseMetricsRoute.js.map +1 -0
- package/dist/lib/routes/{OpenAPIRoute.js → BaseOpenAPIRoute.js} +31 -32
- package/dist/lib/routes/BaseOpenAPIRoute.js.map +1 -0
- package/dist/lib/routes/BasePushRoute.js +193 -0
- package/dist/lib/routes/BasePushRoute.js.map +1 -0
- package/dist/lib/routes/{StatusRoute.js → BaseStatusRoute.js} +36 -16
- package/dist/lib/routes/BaseStatusRoute.js.map +1 -0
- package/dist/lib/routes/CRUDRoute.js +13 -10
- package/dist/lib/routes/CRUDRoute.js.map +1 -1
- package/dist/lib/routes/index.js +5 -4
- package/dist/lib/routes/index.js.map +1 -1
- package/dist/lib/security/ACLUtils.js +7 -7
- package/dist/lib/security/ACLUtils.js.map +1 -1
- package/dist/lib/security/AccessControlListMongo.js +5 -1
- package/dist/lib/security/AccessControlListMongo.js.map +1 -1
- package/dist/lib/security/AccessControlListSQL.js +7 -3
- package/dist/lib/security/AccessControlListSQL.js.map +1 -1
- package/dist/lib/security/{ACLRouteMongo.js → BaseACLRoute.js} +59 -23
- 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 +6 -2
- package/dist/lib/test/request.js.map +1 -1
- package/dist/types/Server.d.ts +21 -6
- package/dist/types/decorators/DocDecorators.d.ts +9 -0
- package/dist/types/decorators/PersistenceDecorators.d.ts +7 -0
- package/dist/types/routes/BaseAdminRoute.d.ts +59 -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 +39 -0
- package/dist/types/routes/BaseStatusRoute.d.ts +37 -0
- package/dist/types/routes/CRUDRoute.d.ts +13 -10
- package/dist/types/routes/index.d.ts +5 -4
- package/dist/types/security/ACLUtils.d.ts +1 -1
- package/dist/types/security/AccessControlList.d.ts +1 -1
- package/dist/types/security/AccessControlListMongo.d.ts +1 -1
- package/dist/types/security/AccessControlListSQL.d.ts +1 -1
- package/dist/types/security/BaseACLRoute.d.ts +73 -0
- package/dist/types/security/index.d.ts +3 -0
- package/package.json +2 -5
- 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.map +0 -1
- package/dist/lib/security/ACLRouteMongo.js.map +0 -1
- package/dist/lib/security/ACLRouteSQL.js +0 -201
- package/dist/lib/security/ACLRouteSQL.js.map +0 -1
- 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 -12
- package/dist/types/security/ACLRouteMongo.d.ts +0 -31
- package/dist/types/security/ACLRouteSQL.d.ts +0 -31
- 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 -534
- 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
|
@@ -10,13 +10,54 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
|
-
import { AccessControlListMongo } from "./AccessControlListMongo.js";
|
|
14
13
|
import { ACLAction } from "./AccessControlList.js";
|
|
15
14
|
import { ApiError, UserUtils } from "@rapidrest/core";
|
|
16
15
|
import { ApiErrorMessages } from "../ApiErrors.js";
|
|
17
|
-
import { Before,
|
|
16
|
+
import { Before, Param, Query, Request, Response, User } from "../decorators/RouteDecorators.js";
|
|
18
17
|
import { CRUDRoute } from "../routes/CRUDRoute.js";
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The `BaseACLRoute` class provides a base set of endpoints for managing Access Control List records.
|
|
20
|
+
*
|
|
21
|
+
* Exposed endpoints:
|
|
22
|
+
*
|
|
23
|
+
* | Name | HTTP Method | What it does |
|
|
24
|
+
* | --- | --- | --- |
|
|
25
|
+
* | `count` | `HEAD /` | Counts the number of ACLs matching the provided set of criteria in the request's query parameters. Returns the count as the value of the `Content-Length` header. |
|
|
26
|
+
* | `create` | `POST /` | Adds one or more new ACLs to the datastore. |
|
|
27
|
+
* | `delete` | `DELETE /:id` | Removes an existing ACL from the datastore. |
|
|
28
|
+
* | `exists` | `HEAD /:id` | Checks if the ACL with the given ID exists in the datastore. Sets `Content-Length` header to `1` if the ACL exists, otherwise `0`. |
|
|
29
|
+
* | `find` | `GET /` | Returns all ACLs matching the provided set of criteria in the request's query parameters. |
|
|
30
|
+
* | `findById` | `GET /:id` | Returns a single ACL with a specified unique identifier. |
|
|
31
|
+
* | `truncate` | `DELETE /` | Removes all ACLs from the datastore. |
|
|
32
|
+
* | `update` | `PUT /:id` | Modifies an existing ACL in the datastore. |
|
|
33
|
+
* | `updateBulk` | `PUT /` | Modifies multiple existing ACLs in the datastore. |
|
|
34
|
+
* | `updateProperty` | `PUT /:id/:property` | Modifies an single property of the given name of an existing ACL in the datastore. |
|
|
35
|
+
*
|
|
36
|
+
* !!Note!! that the `BaseACLRoute` is not automatically registered with a server by default. You must create
|
|
37
|
+
* your own class that extends `BaseACLRoute` and apply the desired base path with `@Route()`.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* import { AccessControlListMongo, BaseACLRoute, RouteDecorators } from "@rapidrest/service-core";
|
|
42
|
+
* const { Model, Route } = RouteDecorators;
|
|
43
|
+
*
|
|
44
|
+
* @Model(AccessControlListMongo)
|
|
45
|
+
* @Route("/acls")
|
|
46
|
+
* export class ACLRoute extends BaseACLRoute<AccessControlListMongo> {}
|
|
47
|
+
* ```
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* import { AccessControlListSQL, BaseACLRoute, RouteDecorators } from "@rapidrest/service-core";
|
|
51
|
+
* const { Model, Route } = RouteDecorators;
|
|
52
|
+
*
|
|
53
|
+
* @Model(AccessControlListSQL)
|
|
54
|
+
* @Route("/acls")
|
|
55
|
+
* export class ACLRoute extends BaseACLRoute<AccessControlListSQL> {}
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @author Jean-Philippe Steinmetz
|
|
59
|
+
*/
|
|
60
|
+
export class BaseACLRoute extends CRUDRoute {
|
|
20
61
|
async checkPerms(params, user) {
|
|
21
62
|
if (!user) {
|
|
22
63
|
throw new ApiError(ApiErrorMessages.AUTH_REQUIRED, 401, ApiErrorMessages.AUTH_REQUIRED);
|
|
@@ -83,26 +124,26 @@ let ACLRouteMongo = class ACLRouteMongo extends CRUDRoute {
|
|
|
83
124
|
updateBulk(obj, req, user) {
|
|
84
125
|
return super.updateBulk(obj, req, user);
|
|
85
126
|
}
|
|
86
|
-
}
|
|
127
|
+
}
|
|
87
128
|
__decorate([
|
|
88
129
|
__param(0, Param()),
|
|
89
130
|
__param(1, User),
|
|
90
131
|
__metadata("design:type", Function),
|
|
91
132
|
__metadata("design:paramtypes", [Object, Object]),
|
|
92
133
|
__metadata("design:returntype", Promise)
|
|
93
|
-
],
|
|
134
|
+
], BaseACLRoute.prototype, "checkPerms", null);
|
|
94
135
|
__decorate([
|
|
95
136
|
__param(0, Param("id")),
|
|
96
137
|
__metadata("design:type", Function),
|
|
97
138
|
__metadata("design:paramtypes", [String]),
|
|
98
139
|
__metadata("design:returntype", void 0)
|
|
99
|
-
],
|
|
140
|
+
], BaseACLRoute.prototype, "checkNotDefault", null);
|
|
100
141
|
__decorate([
|
|
101
142
|
__param(1, User),
|
|
102
143
|
__metadata("design:type", Function),
|
|
103
144
|
__metadata("design:paramtypes", [Array, Object]),
|
|
104
145
|
__metadata("design:returntype", void 0)
|
|
105
|
-
],
|
|
146
|
+
], BaseACLRoute.prototype, "checkPermsBulk", null);
|
|
106
147
|
__decorate([
|
|
107
148
|
Before("checkPerms"),
|
|
108
149
|
__param(0, Param()),
|
|
@@ -112,7 +153,7 @@ __decorate([
|
|
|
112
153
|
__metadata("design:type", Function),
|
|
113
154
|
__metadata("design:paramtypes", [Object, Object, Object, Object]),
|
|
114
155
|
__metadata("design:returntype", Promise)
|
|
115
|
-
],
|
|
156
|
+
], BaseACLRoute.prototype, "count", null);
|
|
116
157
|
__decorate([
|
|
117
158
|
Before("checkPerms"),
|
|
118
159
|
__param(1, Request),
|
|
@@ -120,7 +161,7 @@ __decorate([
|
|
|
120
161
|
__metadata("design:type", Function),
|
|
121
162
|
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
122
163
|
__metadata("design:returntype", Promise)
|
|
123
|
-
],
|
|
164
|
+
], BaseACLRoute.prototype, "create", null);
|
|
124
165
|
__decorate([
|
|
125
166
|
Before(["checkPerms", "checkNotDefault"]),
|
|
126
167
|
__param(0, Param("id")),
|
|
@@ -131,7 +172,7 @@ __decorate([
|
|
|
131
172
|
__metadata("design:type", Function),
|
|
132
173
|
__metadata("design:paramtypes", [String, Object, Object, Object, Object]),
|
|
133
174
|
__metadata("design:returntype", Promise)
|
|
134
|
-
],
|
|
175
|
+
], BaseACLRoute.prototype, "delete", null);
|
|
135
176
|
__decorate([
|
|
136
177
|
Before("checkPerms"),
|
|
137
178
|
__param(0, Param("id")),
|
|
@@ -141,7 +182,7 @@ __decorate([
|
|
|
141
182
|
__metadata("design:type", Function),
|
|
142
183
|
__metadata("design:paramtypes", [String, Object, Object, Object]),
|
|
143
184
|
__metadata("design:returntype", Promise)
|
|
144
|
-
],
|
|
185
|
+
], BaseACLRoute.prototype, "exists", null);
|
|
145
186
|
__decorate([
|
|
146
187
|
Before("checkPerms"),
|
|
147
188
|
__param(0, Param()),
|
|
@@ -150,7 +191,7 @@ __decorate([
|
|
|
150
191
|
__metadata("design:type", Function),
|
|
151
192
|
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
152
193
|
__metadata("design:returntype", Promise)
|
|
153
|
-
],
|
|
194
|
+
], BaseACLRoute.prototype, "find", null);
|
|
154
195
|
__decorate([
|
|
155
196
|
Before("checkPerms"),
|
|
156
197
|
__param(0, Param("id")),
|
|
@@ -159,7 +200,7 @@ __decorate([
|
|
|
159
200
|
__metadata("design:type", Function),
|
|
160
201
|
__metadata("design:paramtypes", [String, Object, Object]),
|
|
161
202
|
__metadata("design:returntype", Promise)
|
|
162
|
-
],
|
|
203
|
+
], BaseACLRoute.prototype, "findById", null);
|
|
163
204
|
__decorate([
|
|
164
205
|
Before("checkPerms"),
|
|
165
206
|
__param(0, Param()),
|
|
@@ -168,7 +209,7 @@ __decorate([
|
|
|
168
209
|
__metadata("design:type", Function),
|
|
169
210
|
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
170
211
|
__metadata("design:returntype", Promise)
|
|
171
|
-
],
|
|
212
|
+
], BaseACLRoute.prototype, "truncate", null);
|
|
172
213
|
__decorate([
|
|
173
214
|
Before(["checkPerms", "checkNotDefault"]),
|
|
174
215
|
__param(0, Param("id")),
|
|
@@ -177,7 +218,7 @@ __decorate([
|
|
|
177
218
|
__metadata("design:type", Function),
|
|
178
219
|
__metadata("design:paramtypes", [String, Object, Object, Object]),
|
|
179
220
|
__metadata("design:returntype", Promise)
|
|
180
|
-
],
|
|
221
|
+
], BaseACLRoute.prototype, "update", null);
|
|
181
222
|
__decorate([
|
|
182
223
|
Before("checkPerms"),
|
|
183
224
|
__param(0, Param("id")),
|
|
@@ -186,7 +227,7 @@ __decorate([
|
|
|
186
227
|
__metadata("design:type", Function),
|
|
187
228
|
__metadata("design:paramtypes", [String, String, Object, Object]),
|
|
188
229
|
__metadata("design:returntype", Promise)
|
|
189
|
-
],
|
|
230
|
+
], BaseACLRoute.prototype, "updateProperty", null);
|
|
190
231
|
__decorate([
|
|
191
232
|
Before("checkPermsBulk"),
|
|
192
233
|
__param(1, Request),
|
|
@@ -194,10 +235,5 @@ __decorate([
|
|
|
194
235
|
__metadata("design:type", Function),
|
|
195
236
|
__metadata("design:paramtypes", [Array, Object, Object]),
|
|
196
237
|
__metadata("design:returntype", Promise)
|
|
197
|
-
],
|
|
198
|
-
|
|
199
|
-
Model(AccessControlListMongo),
|
|
200
|
-
Route("/acls")
|
|
201
|
-
], ACLRouteMongo);
|
|
202
|
-
export { ACLRouteMongo };
|
|
203
|
-
//# sourceMappingURL=ACLRouteMongo.js.map
|
|
238
|
+
], BaseACLRoute.prototype, "updateBulk", null);
|
|
239
|
+
//# sourceMappingURL=BaseACLRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseACLRoute.js","sourceRoot":"","sources":["../../../src/security/BaseACLRoute.ts"],"names":[],"mappings":";;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AK,CAAC,IAAI,CAAC,CAAA;IAEX,WAAA,OAAO,CAAA;IACP,WAAA,IAAI,CAAA;;;;0CAGR;AAGM;IADN,MAAM,CAAC,YAAY,CAAC;IAEhB,WAAA,KAAK,CAAC,IAAI,CAAC,CAAA;IACX,WAAA,KAAK,CAAC,UAAU,CAAC,CAAA;IAEjB,WAAA,IAAI,CAAA;;;;kDAGR;AAGM;IADN,MAAM,CAAC,gBAAgB,CAAC;IACkB,WAAA,OAAO,CAAA;IAAoB,WAAA,IAAI,CAAA;;;;8CAEzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/security/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/security/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}
|
package/dist/lib/test/request.js
CHANGED
|
@@ -42,8 +42,12 @@ export function request(app) {
|
|
|
42
42
|
return chain;
|
|
43
43
|
},
|
|
44
44
|
then(onFulfilled, onRejected) {
|
|
45
|
-
// Auto-set Content-Type for JSON
|
|
46
|
-
|
|
45
|
+
// Auto-set Content-Type for JSON bodies. Buffers are sent verbatim. Everything else (objects,
|
|
46
|
+
// numbers, booleans, and strings — which callers pre-encode as JSON, e.g. `.send('"foo"')`) is
|
|
47
|
+
// treated as JSON: axios's default transform only auto-serializes plain objects, leaves strings
|
|
48
|
+
// untouched but defaults their Content-Type to form-urlencoded, and hands numbers/booleans straight
|
|
49
|
+
// to the HTTP adapter, which rejects anything that isn't a string/Buffer/Stream.
|
|
50
|
+
if (body !== undefined && !Buffer.isBuffer(body)) {
|
|
47
51
|
hdrs["content-type"] = hdrs["content-type"] || "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ect-metadata";
|
|
3
3
|
import { ConnectionManager } from "./database/ConnectionManager.js";
|
|
4
|
+
import { ClassLoader } from "@rapidrest/core";
|
|
4
5
|
import { ObjectFactory } from "./ObjectFactory.js";
|
|
5
6
|
import { BackgroundServiceManager } from "./BackgroundServiceManager.js";
|
|
6
7
|
import { RouteUtils } from "./routes/RouteUtils.js";
|
|
7
8
|
import { OpenApiSpec } from "./OpenApiSpec.js";
|
|
8
9
|
import { EventListenerManager } from "./EventListenerManager.js";
|
|
9
10
|
import { HttpRouter } from "./http/Router.js";
|
|
11
|
+
/**
|
|
12
|
+
* The configuration options to use when constructing a new Server instance.
|
|
13
|
+
*/
|
|
14
|
+
export interface ServerOptions {
|
|
15
|
+
/** The nconf-compatible configuration object to initialize the server with. */
|
|
16
|
+
config: any;
|
|
17
|
+
/** The base file system path that models and routes will be searched from. Default is `.` */
|
|
18
|
+
basePath?: string;
|
|
19
|
+
/** The logging utility to use for outputing to console/file. Default is `Logger()` from `@rapidrest/core`. */
|
|
20
|
+
logger?: any;
|
|
21
|
+
/** The ClassLoader used to scan the source for all exported classes. */
|
|
22
|
+
classLoader?: ClassLoader;
|
|
23
|
+
/** The object factory to use for automatic dependency injection (IOC). */
|
|
24
|
+
objectFactory?: ObjectFactory;
|
|
25
|
+
}
|
|
10
26
|
/**
|
|
11
27
|
* Provides an HTTP server utilizing uWebSockets.js. The server automatically registers all routes, and
|
|
12
28
|
* establishes database connections for all configured data stores. Additionally provides automatic authentication
|
|
@@ -124,6 +140,8 @@ export declare class Server {
|
|
|
124
140
|
protected readonly config?: any;
|
|
125
141
|
/** The manager for handling database connections. */
|
|
126
142
|
protected connectionManager?: ConnectionManager;
|
|
143
|
+
/** The ClassLoader used to scan the source for all exported classes. */
|
|
144
|
+
protected classLoader: ClassLoader;
|
|
127
145
|
/** The manager for handling events. */
|
|
128
146
|
protected eventListenerManager?: EventListenerManager;
|
|
129
147
|
/** The logging utility to use when outputing to console/file. */
|
|
@@ -141,14 +159,11 @@ export declare class Server {
|
|
|
141
159
|
protected metricFailedRequests: prom.Counter<string>;
|
|
142
160
|
protected metricTotalRequests: prom.Counter<string>;
|
|
143
161
|
/**
|
|
144
|
-
* Creates a new instance of Server with the specified
|
|
162
|
+
* Creates a new instance of Server with the specified default options.
|
|
145
163
|
*
|
|
146
|
-
* @param
|
|
147
|
-
* @param {string} basePath The base file system path that models and routes will be searched from.
|
|
148
|
-
* @param {Logger} logger The logging utility to use for outputing to console/file.
|
|
149
|
-
* @param objectFactory The object factory to use for automatic dependency injection (IOC).
|
|
164
|
+
* @param options The configuration options to apply for this server.
|
|
150
165
|
*/
|
|
151
|
-
constructor(
|
|
166
|
+
constructor(options: ServerOptions);
|
|
152
167
|
/**
|
|
153
168
|
* Returns the HTTP router instance.
|
|
154
169
|
*/
|
|
@@ -67,3 +67,12 @@ export declare function Returns(types?: any | any[]): (target: any, propertyKey:
|
|
|
67
67
|
* becomes `[[Array, MyClass]]`).
|
|
68
68
|
*/
|
|
69
69
|
export declare function TypeInfo(types?: any | any[]): (target: any, propertyKey: string) => void;
|
|
70
|
+
/**
|
|
71
|
+
* Retrieves the typing information of a class property or function, preferring the richer description provided by
|
|
72
|
+
* `@TypeInfo` and falling back to TypeScript's own `design:type` reflection metadata when `@TypeInfo` was not
|
|
73
|
+
* applied.
|
|
74
|
+
*
|
|
75
|
+
* @param target The class prototype (or class, for static members) to retrieve type information for.
|
|
76
|
+
* @param propertyKey The name of the property or function to retrieve type information for.
|
|
77
|
+
*/
|
|
78
|
+
export declare function getTypeInfo(target: any, propertyKey: string): any;
|
|
@@ -26,6 +26,13 @@ export interface ColumnOptions {
|
|
|
26
26
|
primary?: boolean;
|
|
27
27
|
/** Set to `true` if the column stores a MongoDB `ObjectId` value. */
|
|
28
28
|
isObjectId?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Explicitly declares the SQL column type, overriding the type that would otherwise be inferred from
|
|
31
|
+
* TypeScript's reflected property type. Required whenever the design-time type cannot be reliably inferred,
|
|
32
|
+
* such as nullable/union-typed properties (which TypeScript reflects as `Object`) or properties whose value is
|
|
33
|
+
* a complex/nested structure that has no direct SQL column equivalent (e.g. `"simple-json"`).
|
|
34
|
+
*/
|
|
35
|
+
type?: string | Function;
|
|
29
36
|
}
|
|
30
37
|
/**
|
|
31
38
|
* The set of options to use when declaring a persistent class type via the `@Entity` decorator.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { JWTUser } from "@rapidrest/core";
|
|
2
|
+
import { Redis } from "ioredis";
|
|
3
|
+
import Transport from "winston-transport";
|
|
4
|
+
import { type UWSWebSocketShim } from "../http/WebSocket.js";
|
|
5
|
+
/**
|
|
6
|
+
* Implements a Winston transport that pipes incoming log messages to a configured redis pubsub channel.
|
|
7
|
+
*/
|
|
8
|
+
export declare class RedisTransport extends Transport {
|
|
9
|
+
private channel;
|
|
10
|
+
private redis;
|
|
11
|
+
constructor(opts: any);
|
|
12
|
+
close(): void;
|
|
13
|
+
log(info: any, next: Function): any;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The `BaseAdminRoute` class provides a base set of endpoints that gives trusted users the ability to perform common adminstrative actions
|
|
17
|
+
* with the server.
|
|
18
|
+
*
|
|
19
|
+
* Exposed endpoints:
|
|
20
|
+
*
|
|
21
|
+
* | Name | HTTP Method | What it does |
|
|
22
|
+
* | --- | --- | --- |
|
|
23
|
+
* | `clearCache` | `GET /<base_path>/clear-cache` | Clears the Redis-based cache system. |
|
|
24
|
+
* | `logs` | `UPGRADE /<base_path>/logs` | Live tail the service logs |
|
|
25
|
+
* | `getReleaseNotes` | `GET /<base_path>/release-notes` | Retrieve the server release notes. |
|
|
26
|
+
* | `restart` | `GET /<base_path>/restart` | ` Restart the server |
|
|
27
|
+
*
|
|
28
|
+
* !!Note!! that the `BaseAdminRoute` is not automatically registered with a server by default. You must create
|
|
29
|
+
* your own class that extends `AdminRoute` and apply the desired base path with `@Route()`.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* import { BaseAdminRoute, RouteDecorators } from "@rapidrest/service-core";
|
|
34
|
+
* const { Route } = RouteDecorators;
|
|
35
|
+
*
|
|
36
|
+
* @Route("/admin")
|
|
37
|
+
* export class AdminRoute extends BaseAdminRoute {}
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @author Jean-Philippe Steinmetz
|
|
41
|
+
*/
|
|
42
|
+
export declare class BaseAdminRoute {
|
|
43
|
+
/** A map of user uid's to active sockets. */
|
|
44
|
+
protected activeSockets: Map<string, any[]>;
|
|
45
|
+
protected cacheClient?: Redis;
|
|
46
|
+
protected cacheConnConfig: any;
|
|
47
|
+
protected logger: any;
|
|
48
|
+
protected logsConnConfig: any;
|
|
49
|
+
protected redisClient?: Redis;
|
|
50
|
+
/** The underlying ReleaseNotes specification. */
|
|
51
|
+
protected releaseNotes?: string;
|
|
52
|
+
protected serviceName?: string;
|
|
53
|
+
protected trustedRoles: string[];
|
|
54
|
+
protected init(): Promise<void>;
|
|
55
|
+
clearCache(user?: JWTUser): Promise<void>;
|
|
56
|
+
logs(socket: UWSWebSocketShim, user: JWTUser): Promise<void>;
|
|
57
|
+
getReleaseNotes(user?: JWTUser): string | undefined;
|
|
58
|
+
restart(user?: JWTUser): void;
|
|
59
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as prom from "prom-client";
|
|
2
|
+
import { JWTUser } from "@rapidrest/core";
|
|
3
|
+
/**
|
|
4
|
+
* The `BaseMetricsRoute` class provides a base set of endpoints for exposing Prometheus metrics.
|
|
5
|
+
*
|
|
6
|
+
* Exposed endpoints:
|
|
7
|
+
*
|
|
8
|
+
* | Name | HTTP Method | What it does |
|
|
9
|
+
* | --- | --- | --- |
|
|
10
|
+
* | `getMetrics` | `GET /<base_path>` | Returns all Prometheus metrics gathered by the system |
|
|
11
|
+
* | `getSingleMetric` | `GET /<base_path>/:metric` | Returns a single Prometheus metric with the given name |
|
|
12
|
+
*
|
|
13
|
+
* Services that wish to provide metrics to be exposed via this route can register them using the global registry
|
|
14
|
+
* from the provided `prom-client` dependency. See the `prom-client` documentation for more details.
|
|
15
|
+
*
|
|
16
|
+
* !!Note!! that the `BaseMetricsRoute` is not automatically registered with a server by default. You must create
|
|
17
|
+
* your own class that extends `AdminRoute` and apply the desired base path with `@Route()`.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* import { BaseMetricsRoute, RouteDecorators } from "@rapidrest/service-core";
|
|
22
|
+
* const { Route } = RouteDecorators;
|
|
23
|
+
*
|
|
24
|
+
* @Route("/metrics")
|
|
25
|
+
* export class MetricsRoute extends BaseMetricsRoute {}
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class BaseMetricsRoute {
|
|
29
|
+
protected metricsConfig: {
|
|
30
|
+
authRequired: boolean;
|
|
31
|
+
};
|
|
32
|
+
protected registry: prom.Registry;
|
|
33
|
+
protected trustedRoles: string[];
|
|
34
|
+
constructor();
|
|
35
|
+
getMetrics(user?: JWTUser): Promise<string>;
|
|
36
|
+
getSingleMetric(metric: any, user?: JWTUser): Promise<string>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { OpenApiSpec } from "../OpenApiSpec.js";
|
|
2
|
+
/**
|
|
3
|
+
* The `BaseOpenAPIRoute` class provides a base set of endpoints exposing the server's OpenAPI specification.
|
|
4
|
+
*
|
|
5
|
+
* Exposed endpoints:
|
|
6
|
+
*
|
|
7
|
+
* | Name | HTTP Method | What it does |
|
|
8
|
+
* | --- | --- | --- |
|
|
9
|
+
* | `getHTML` | `GET /<base_path>` | Swagger UI HTML (loads swagger-ui-dist from CDN) |
|
|
10
|
+
* | `getJSON` | `GET /<base_path>/json` | raw OpenAPI specification as JSON |
|
|
11
|
+
* | `getYAML` | `GET /<base_path>/yaml` | raw OpenAPI specification as YAML |
|
|
12
|
+
*
|
|
13
|
+
* !!Note!! that the `BaseAdminRoute` is not automatically registered with a server by default. You must create
|
|
14
|
+
* your own class that extends `AdminRoute` and apply the desired base path with `@Route()`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { BaseOpenAPIRoute, RouteDecorators } from "@rapidrest/service-core";
|
|
19
|
+
* const { Route } = RouteDecorators;
|
|
20
|
+
*
|
|
21
|
+
* @Route("/openapi")
|
|
22
|
+
* export class OpenAPIRoute extends BaseOpenAPIRoute {}
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @author Jean-Philippe Steinmetz
|
|
26
|
+
*/
|
|
27
|
+
export declare class BaseOpenAPIRoute {
|
|
28
|
+
/** The underlying OpenAPI specification. */
|
|
29
|
+
protected apiSpec: OpenApiSpec;
|
|
30
|
+
getHTML(): string;
|
|
31
|
+
getJSON(): any;
|
|
32
|
+
getYAML(): string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import ws from "ws";
|
|
2
|
+
/**
|
|
3
|
+
* The `BasePushRoute` class provides a base set of endpoints for implement client push notifications.
|
|
4
|
+
*
|
|
5
|
+
* Exposed endpoints:
|
|
6
|
+
*
|
|
7
|
+
* | Name | HTTP Method | What it does |
|
|
8
|
+
* | --- | --- | --- |
|
|
9
|
+
* | `connect` | `UPGRADE /<base_path>/connect` | Establishes a connection to the push notification system. |
|
|
10
|
+
* | `send` | `POST /<base_path>/:id` | Sends a push notification message to the channel with the given id |
|
|
11
|
+
*
|
|
12
|
+
* !!Note!! that the `BasePushRoute` is not automatically registered with a server by default. You must create
|
|
13
|
+
* your own class that extends `AdminRoute` and apply the desired base path with `@Route()`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { BasePushRoute, RouteDecorators } from "@rapidrest/service-core";
|
|
18
|
+
* const { Route } = RouteDecorators;
|
|
19
|
+
*
|
|
20
|
+
* @Route("/push")
|
|
21
|
+
* export class PushRoute extends BasePushRoute {}
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @author Jean-Philippe Steinmetz
|
|
25
|
+
*/
|
|
26
|
+
export declare class BasePushRoute {
|
|
27
|
+
private aclUtils?;
|
|
28
|
+
/** A map of active socket connections to users. */
|
|
29
|
+
private activeSocks;
|
|
30
|
+
/** A map of active subscription uids to users. */
|
|
31
|
+
private activeSubs;
|
|
32
|
+
private logger;
|
|
33
|
+
private redisConfig;
|
|
34
|
+
/** A persistent redis client used to publish outgoing push messages. */
|
|
35
|
+
private redisPub?;
|
|
36
|
+
private init;
|
|
37
|
+
connect(sock: ws, user: any): Promise<void>;
|
|
38
|
+
send(id: string, msg: any, user: any): Promise<void>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { StatusExtraData } from "../models/StatusExtraData.js";
|
|
2
|
+
/**
|
|
3
|
+
* The `BaseStatusRoute` class provides a base set of endpoints exposing status metadata information about the server.
|
|
4
|
+
*
|
|
5
|
+
* Included Metadata:
|
|
6
|
+
* | Name | Description |
|
|
7
|
+
* | --- | --- |
|
|
8
|
+
* | `name` | The name of the server (e.g. `petstore_example`) |
|
|
9
|
+
* | `time` | The current UTC timestamp of the server |
|
|
10
|
+
* | `version` | The release version of the server. (e.g. `1.0.0`) |
|
|
11
|
+
*
|
|
12
|
+
* Exposed endpoints:
|
|
13
|
+
*
|
|
14
|
+
* | Name | HTTP Method | What it does |
|
|
15
|
+
* | --- | --- | --- |
|
|
16
|
+
* | `get` | `GET /<base_path>` | Returns the server's status metadata |
|
|
17
|
+
*
|
|
18
|
+
* !!Note!! that the `BaseAdminRoute` is not automatically registered with a server by default. You must create
|
|
19
|
+
* your own class that extends `AdminRoute` and apply the desired base path with `@Route()`.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { BaseStatusRoute, RouteDecorators } from "@rapidrest/service-core";
|
|
24
|
+
* const { Route } = RouteDecorators;
|
|
25
|
+
*
|
|
26
|
+
* @Route("/status")
|
|
27
|
+
* export class StatusRoute extends BaseStatusRoute {}
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @author Jean-Philippe Steinmetz
|
|
31
|
+
*/
|
|
32
|
+
export declare class BaseStatusRoute {
|
|
33
|
+
protected serviceName: any;
|
|
34
|
+
protected serviceVersion: any;
|
|
35
|
+
protected statusExtraData: StatusExtraData | undefined;
|
|
36
|
+
get(): any;
|
|
37
|
+
}
|
|
@@ -13,16 +13,19 @@ import { ModelRoute, UpdateObject } from "./ModelRoute.js";
|
|
|
13
13
|
* is enabled these handlers will still validate permissions appropriately.
|
|
14
14
|
*
|
|
15
15
|
* Included Endpoints:
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
16
|
+
*
|
|
17
|
+
* | Name | HTTP Method | What it does |
|
|
18
|
+
* | --- | --- | --- |
|
|
19
|
+
* | `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. |
|
|
20
|
+
* | `create` | `POST /` | Adds one or more new objects to the datastore. |
|
|
21
|
+
* | `delete` | `DELETE /:id` | Removes an existing object from the datastore. |
|
|
22
|
+
* | `exists` | `HEAD /:id` | Checks if the object with the given ID exists in the datastore. Sets `Content-Length` header to `1` if the object exists, otherwise `0`. |
|
|
23
|
+
* | `find` | `GET /` | Returns all objects matching the provided set of criteria in the request's query parameters. |
|
|
24
|
+
* | `findById` | `GET /:id` | Returns a single object with a specified unique identifier. |
|
|
25
|
+
* | `truncate` | `DELETE /` | Removes all objects from the datastore. |
|
|
26
|
+
* | `update` | `PUT /:id` | Modifies an existing object in the datastore. |
|
|
27
|
+
* | `updateBulk` | `PUT /` | Modifies multiple existing objects in the datastore. |
|
|
28
|
+
* | `updateProperty` | `PUT /:id/:property` | Modifies an single property of the given name of an existing object in the datastore. |
|
|
26
29
|
*
|
|
27
30
|
* @author Jean-Philippe Steinmetz
|
|
28
31
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./BaseAdminRoute.js";
|
|
2
|
+
export * from "./BaseMetricsRoute.js";
|
|
3
|
+
export * from "./BaseOpenAPIRoute.js";
|
|
4
|
+
export * from "./BasePushRoute.js";
|
|
5
|
+
export * from "./BaseStatusRoute.js";
|
|
2
6
|
export * from "./CRUDRoute.js";
|
|
3
|
-
export * from "./MetricsRoute.js";
|
|
4
7
|
export * from "./ModelRoute.js";
|
|
5
|
-
export * from "./OpenAPIRoute.js";
|
|
6
8
|
export * from "./RouteUtils.js";
|
|
7
|
-
export * from "./StatusRoute.js";
|
|
@@ -45,7 +45,7 @@ export declare class ACLUtils {
|
|
|
45
45
|
* @param entityId The unique identifier of the ACL to retrieve.
|
|
46
46
|
* @param parentUids The list of already found parent UIDs. This is used to break circular dependencies.
|
|
47
47
|
*/
|
|
48
|
-
findACL(entityId: string, parentUids?: string[], reqCache?: Map<string, AccessControlList |
|
|
48
|
+
findACL(entityId: string, parentUids?: string[], reqCache?: Map<string, AccessControlList | undefined>): Promise<AccessControlList | undefined>;
|
|
49
49
|
/**
|
|
50
50
|
* Deletes the ACL with the given identifier from the database.
|
|
51
51
|
* @param uid The unique identifier of the ACL to remove.
|
|
@@ -90,7 +90,7 @@ export interface AccessControlList {
|
|
|
90
90
|
/**
|
|
91
91
|
* The parent access control list that this instance inherits permissions from.
|
|
92
92
|
*/
|
|
93
|
-
parent?: AccessControlList
|
|
93
|
+
parent?: AccessControlList;
|
|
94
94
|
/**
|
|
95
95
|
* The universally unique identifier of the parent `AccessControlList` that this object will inherit permissions
|
|
96
96
|
* from.
|
|
@@ -18,7 +18,7 @@ export declare class ACLRecordMongo implements ACLRecord {
|
|
|
18
18
|
*/
|
|
19
19
|
export declare class AccessControlListMongo extends BaseMongoEntity implements AccessControlList {
|
|
20
20
|
parent?: AccessControlList;
|
|
21
|
-
parentUid?: string
|
|
21
|
+
parentUid?: string;
|
|
22
22
|
records: ACLRecordMongo[];
|
|
23
23
|
constructor(other?: any);
|
|
24
24
|
}
|
|
@@ -18,7 +18,7 @@ export declare class ACLRecordSQL implements ACLRecord {
|
|
|
18
18
|
*/
|
|
19
19
|
export declare class AccessControlListSQL extends BaseEntity implements AccessControlList {
|
|
20
20
|
parent?: AccessControlList;
|
|
21
|
-
parentUid?: string
|
|
21
|
+
parentUid?: string;
|
|
22
22
|
records: ACLRecordSQL[];
|
|
23
23
|
constructor(other?: any);
|
|
24
24
|
}
|