@rapidrest/service-core 1.0.0-beta.1 → 1.0.0-beta.2
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/auth/AuthMiddleware.js +33 -3
- package/dist/lib/auth/AuthMiddleware.js.map +1 -1
- package/dist/lib/auth/BasicStrategy.js +46 -39
- package/dist/lib/auth/BasicStrategy.js.map +1 -1
- package/dist/lib/auth/JWTStrategy.js +69 -60
- package/dist/lib/auth/JWTStrategy.js.map +1 -1
- package/dist/lib/index.js +2 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/routes/RouteUtils.js +8 -7
- package/dist/lib/routes/RouteUtils.js.map +1 -1
- package/dist/types/auth/AuthMiddleware.d.ts +12 -1
- package/dist/types/auth/AuthStrategy.d.ts +13 -1
- package/dist/types/auth/BasicStrategy.d.ts +7 -3
- package/dist/types/auth/JWTStrategy.d.ts +6 -3
- package/dist/types/index.d.ts +2 -1
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/MongoRepository.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/RedisConnection.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/Repository.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Default.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Description.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Document.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Example.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Format.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Returns.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Summary.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Tags.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/TypeInfo.md +1 -1
- package/docs/reference/@rapidrest/namespaces/DocDecorators/interfaces/DocumentsData.md +7 -7
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/EventListener.md +1 -1
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/OnEvent.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Cache.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/ChildEntity.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/DataStore.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Identifier.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Protect.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Reference.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Shard.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/TrackChanges.md +1 -1
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/interfaces/PendingTypeOrmColumn.md +5 -5
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/variables/pendingTypeOrmColumns.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Column.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Entity.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Index.md +3 -3
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/PrimaryColumn.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Unique.md +3 -3
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getColumnMetadata.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getEntityName.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getIndexMetadata.md +1 -1
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnInfo.md +4 -4
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnOptions.md +5 -5
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexInfo.md +4 -4
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexOptions.md +5 -5
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/After.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Auth.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/AuthResult.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Before.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/ContentType.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Delete.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Get.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Head.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Header.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Method.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Model.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Options.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Param.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Patch.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Post.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Protect.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Put.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Query.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Request.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/RequiresRole.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Response.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Route.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Socket.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/User.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Validate.md +1 -1
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/WebSocket.md +1 -1
- package/docs/reference/classes/ACLUtils.md +10 -10
- package/docs/reference/classes/AdminRoute.md +3 -3
- package/docs/reference/classes/AuthMiddleware.md +55 -13
- package/docs/reference/classes/BackgroundService.md +8 -8
- package/docs/reference/classes/BackgroundServiceManager.md +7 -7
- package/docs/reference/classes/BaseEntity.md +6 -6
- package/docs/reference/classes/BaseMongoEntity.md +7 -7
- package/docs/reference/classes/BasicStrategy.md +52 -10
- package/docs/reference/classes/BasicStrategyOptions.md +35 -11
- package/docs/reference/classes/BulkError.md +3 -3
- package/docs/reference/classes/ConnectionManager.md +4 -4
- package/docs/reference/classes/EventListenerManager.md +5 -5
- package/docs/reference/classes/HttpRouter.md +343 -0
- package/docs/reference/classes/JWTStrategy.md +37 -14
- package/docs/reference/classes/JWTStrategyOptions.md +10 -10
- package/docs/reference/classes/MetricsRoute.md +2 -2
- package/docs/reference/classes/ModelRoute.md +28 -28
- package/docs/reference/classes/ModelUtils.md +10 -10
- package/docs/reference/classes/MongoConnection.md +12 -12
- package/docs/reference/classes/MongoRepository.md +17 -17
- package/docs/reference/classes/MongoSchemaSync.md +3 -3
- package/docs/reference/classes/NetUtils.md +4 -4
- package/docs/reference/classes/NotificationUtils.md +3 -3
- package/docs/reference/classes/ObjectFactory.md +10 -10
- package/docs/reference/classes/OpenAPIRoute.md +5 -5
- package/docs/reference/classes/OpenApiSpec.md +45 -45
- package/docs/reference/classes/RecoverableBaseEntity.md +7 -7
- package/docs/reference/classes/RecoverableBaseMongoEntity.md +8 -8
- package/docs/reference/classes/RedisTransport.md +4 -4
- package/docs/reference/classes/RepoUtils.md +28 -28
- package/docs/reference/classes/RouteUtils.md +17 -17
- package/docs/reference/classes/Server.md +29 -29
- package/docs/reference/classes/SimpleEntity.md +3 -3
- package/docs/reference/classes/SimpleMongoEntity.md +4 -4
- package/docs/reference/classes/StatusExtraData.md +4 -4
- package/docs/reference/classes/StatusRoute.md +1 -1
- package/docs/reference/classes/UWSRequest.md +226 -0
- package/docs/reference/classes/UWSResponse.md +257 -0
- package/docs/reference/classes/UWSWebSocketShim.md +958 -0
- package/docs/reference/enumerations/ACLAction.md +7 -7
- package/docs/reference/enumerations/ApiErrorMessages.md +15 -15
- package/docs/reference/enumerations/ApiErrors.md +15 -15
- package/docs/reference/functions/createWebSocketStream.md +27 -0
- package/docs/reference/functions/isSqlDataSource.md +1 -1
- package/docs/reference/functions/readBody.md +29 -0
- package/docs/reference/functions/resolveCollectionName.md +1 -1
- package/docs/reference/functions/runChain.md +40 -0
- package/docs/reference/functions/snakeCase.md +1 -1
- package/docs/reference/globals.md +15 -0
- package/docs/reference/interfaces/ACLRecord.md +8 -8
- package/docs/reference/interfaces/AccessControlList.md +5 -5
- package/docs/reference/interfaces/AuthResult.md +5 -5
- package/docs/reference/interfaces/AuthStrategy.md +47 -9
- package/docs/reference/interfaces/CreateRequestOptions.md +11 -11
- package/docs/reference/interfaces/DeleteRequestOptions.md +13 -13
- package/docs/reference/interfaces/FindRequestOptions.md +12 -12
- package/docs/reference/interfaces/HttpRequest.md +147 -0
- package/docs/reference/interfaces/HttpResponse.md +164 -0
- package/docs/reference/interfaces/JWTAuthResult.md +9 -9
- package/docs/reference/interfaces/RepoCreateOptions.md +7 -7
- package/docs/reference/interfaces/RepoDeleteOptions.md +9 -9
- package/docs/reference/interfaces/RepoFindOptions.md +11 -11
- package/docs/reference/interfaces/RepoOperationOptions.md +6 -6
- package/docs/reference/interfaces/RepoUpdateOptions.md +8 -8
- package/docs/reference/interfaces/RequestOptions.md +10 -10
- package/docs/reference/interfaces/RequestWS.md +225 -0
- package/docs/reference/interfaces/TruncateRequestOptions.md +15 -15
- package/docs/reference/interfaces/UpdateRequestOptions.md +13 -13
- package/docs/reference/type-aliases/ErrorHandler.md +35 -0
- package/docs/reference/type-aliases/NextFunction.md +23 -0
- package/docs/reference/type-aliases/OneOrMany.md +1 -1
- package/docs/reference/type-aliases/OneOrNull.md +1 -1
- package/docs/reference/type-aliases/PartialBaseEntity.md +1 -1
- package/docs/reference/type-aliases/PartialSimpleEntity.md +1 -1
- package/docs/reference/type-aliases/RequestHandler.md +31 -0
- package/docs/reference/type-aliases/UpdateObject.md +1 -1
- package/docs/reference/type-aliases/WsUpgradeAuth.md +27 -0
- package/docs/reference/type-aliases/WsUpgradeAuthResult.md +47 -0
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Enumeration: ACLAction
|
|
8
8
|
|
|
9
|
-
Defined in: [src/security/AccessControlList.ts:10](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/security/AccessControlList.ts:10](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L10)
|
|
10
10
|
|
|
11
11
|
Describes the various permission actions that can be performed against an entity.
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
|
20
20
|
|
|
21
21
|
> **CREATE**: `"CREATE"`
|
|
22
22
|
|
|
23
|
-
Defined in: [src/security/AccessControlList.ts:11](https://github.com/rapidrest/service-core/blob/
|
|
23
|
+
Defined in: [src/security/AccessControlList.ts:11](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L11)
|
|
24
24
|
|
|
25
25
|
***
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ Defined in: [src/security/AccessControlList.ts:11](https://github.com/rapidrest/
|
|
|
28
28
|
|
|
29
29
|
> **DELETE**: `"DELETE"`
|
|
30
30
|
|
|
31
|
-
Defined in: [src/security/AccessControlList.ts:12](https://github.com/rapidrest/service-core/blob/
|
|
31
|
+
Defined in: [src/security/AccessControlList.ts:12](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L12)
|
|
32
32
|
|
|
33
33
|
***
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ Defined in: [src/security/AccessControlList.ts:12](https://github.com/rapidrest/
|
|
|
36
36
|
|
|
37
37
|
> **FULL**: `"FULL"`
|
|
38
38
|
|
|
39
|
-
Defined in: [src/security/AccessControlList.ts:13](https://github.com/rapidrest/service-core/blob/
|
|
39
|
+
Defined in: [src/security/AccessControlList.ts:13](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L13)
|
|
40
40
|
|
|
41
41
|
***
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ Defined in: [src/security/AccessControlList.ts:13](https://github.com/rapidrest/
|
|
|
44
44
|
|
|
45
45
|
> **READ**: `"READ"`
|
|
46
46
|
|
|
47
|
-
Defined in: [src/security/AccessControlList.ts:14](https://github.com/rapidrest/service-core/blob/
|
|
47
|
+
Defined in: [src/security/AccessControlList.ts:14](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L14)
|
|
48
48
|
|
|
49
49
|
***
|
|
50
50
|
|
|
@@ -52,7 +52,7 @@ Defined in: [src/security/AccessControlList.ts:14](https://github.com/rapidrest/
|
|
|
52
52
|
|
|
53
53
|
> **SPECIAL**: `"SPECIAL"`
|
|
54
54
|
|
|
55
|
-
Defined in: [src/security/AccessControlList.ts:15](https://github.com/rapidrest/service-core/blob/
|
|
55
|
+
Defined in: [src/security/AccessControlList.ts:15](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L15)
|
|
56
56
|
|
|
57
57
|
***
|
|
58
58
|
|
|
@@ -60,4 +60,4 @@ Defined in: [src/security/AccessControlList.ts:15](https://github.com/rapidrest/
|
|
|
60
60
|
|
|
61
61
|
> **UPDATE**: `"UPDATE"`
|
|
62
62
|
|
|
63
|
-
Defined in: [src/security/AccessControlList.ts:16](https://github.com/rapidrest/service-core/blob/
|
|
63
|
+
Defined in: [src/security/AccessControlList.ts:16](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L16)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Enumeration: ApiErrorMessages
|
|
8
8
|
|
|
9
|
-
Defined in: [src/ApiErrors.ts:24](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/ApiErrors.ts:24](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L24)
|
|
10
10
|
|
|
11
11
|
Defines the default message of all common API errors.
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ Defines the default message of all common API errors.
|
|
|
16
16
|
|
|
17
17
|
> **AUTH\_FAILED**: `"Invalid or missing authentication token."`
|
|
18
18
|
|
|
19
|
-
Defined in: [src/ApiErrors.ts:37](https://github.com/rapidrest/service-core/blob/
|
|
19
|
+
Defined in: [src/ApiErrors.ts:37](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L37)
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ Defined in: [src/ApiErrors.ts:37](https://github.com/rapidrest/service-core/blob
|
|
|
24
24
|
|
|
25
25
|
> **AUTH\_PERMISSION\_FAILURE**: `"User does not have permission to perform this action."`
|
|
26
26
|
|
|
27
|
-
Defined in: [src/ApiErrors.ts:38](https://github.com/rapidrest/service-core/blob/
|
|
27
|
+
Defined in: [src/ApiErrors.ts:38](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L38)
|
|
28
28
|
|
|
29
29
|
***
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ Defined in: [src/ApiErrors.ts:38](https://github.com/rapidrest/service-core/blob
|
|
|
32
32
|
|
|
33
33
|
> **AUTH\_REQUIRED**: `"Authorization is required to access this resource."`
|
|
34
34
|
|
|
35
|
-
Defined in: [src/ApiErrors.ts:36](https://github.com/rapidrest/service-core/blob/
|
|
35
|
+
Defined in: [src/ApiErrors.ts:36](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L36)
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@ Defined in: [src/ApiErrors.ts:36](https://github.com/rapidrest/service-core/blob
|
|
|
40
40
|
|
|
41
41
|
> **BULK\_CREATE\_FAILURE**: `"Failed to create one or more objects."`
|
|
42
42
|
|
|
43
|
-
Defined in: [src/ApiErrors.ts:34](https://github.com/rapidrest/service-core/blob/
|
|
43
|
+
Defined in: [src/ApiErrors.ts:34](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L34)
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ Defined in: [src/ApiErrors.ts:34](https://github.com/rapidrest/service-core/blob
|
|
|
48
48
|
|
|
49
49
|
> **BULK\_UPDATE\_FAILURE**: `"Failed to update one or more objects."`
|
|
50
50
|
|
|
51
|
-
Defined in: [src/ApiErrors.ts:35](https://github.com/rapidrest/service-core/blob/
|
|
51
|
+
Defined in: [src/ApiErrors.ts:35](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L35)
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
@@ -56,7 +56,7 @@ Defined in: [src/ApiErrors.ts:35](https://github.com/rapidrest/service-core/blob
|
|
|
56
56
|
|
|
57
57
|
> **IDENTIFIER\_EXISTS**: `"A resource with that identifier already exists."`
|
|
58
58
|
|
|
59
|
-
Defined in: [src/ApiErrors.ts:29](https://github.com/rapidrest/service-core/blob/
|
|
59
|
+
Defined in: [src/ApiErrors.ts:29](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L29)
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ Defined in: [src/ApiErrors.ts:29](https://github.com/rapidrest/service-core/blob
|
|
|
64
64
|
|
|
65
65
|
> **INTERNAL\_ERROR**: `"An internal error has occurred. Please contact the adminstrator."`
|
|
66
66
|
|
|
67
|
-
Defined in: [src/ApiErrors.ts:26](https://github.com/rapidrest/service-core/blob/
|
|
67
|
+
Defined in: [src/ApiErrors.ts:26](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L26)
|
|
68
68
|
|
|
69
69
|
***
|
|
70
70
|
|
|
@@ -72,7 +72,7 @@ Defined in: [src/ApiErrors.ts:26](https://github.com/rapidrest/service-core/blob
|
|
|
72
72
|
|
|
73
73
|
> **INVALID\_OBJECT\_VERSION**: `"Invalid object version. Do you have the latest version?"`
|
|
74
74
|
|
|
75
|
-
Defined in: [src/ApiErrors.ts:30](https://github.com/rapidrest/service-core/blob/
|
|
75
|
+
Defined in: [src/ApiErrors.ts:30](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L30)
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
@@ -80,7 +80,7 @@ Defined in: [src/ApiErrors.ts:30](https://github.com/rapidrest/service-core/blob
|
|
|
80
80
|
|
|
81
81
|
> **INVALID\_REQUEST**: `"Invalid message or request."`
|
|
82
82
|
|
|
83
|
-
Defined in: [src/ApiErrors.ts:27](https://github.com/rapidrest/service-core/blob/
|
|
83
|
+
Defined in: [src/ApiErrors.ts:27](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L27)
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
|
@@ -88,7 +88,7 @@ Defined in: [src/ApiErrors.ts:27](https://github.com/rapidrest/service-core/blob
|
|
|
88
88
|
|
|
89
89
|
> **NOT\_FOUND**: `"No resource could be found with the specified identifier."`
|
|
90
90
|
|
|
91
|
-
Defined in: [src/ApiErrors.ts:28](https://github.com/rapidrest/service-core/blob/
|
|
91
|
+
Defined in: [src/ApiErrors.ts:28](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L28)
|
|
92
92
|
|
|
93
93
|
***
|
|
94
94
|
|
|
@@ -96,7 +96,7 @@ Defined in: [src/ApiErrors.ts:28](https://github.com/rapidrest/service-core/blob
|
|
|
96
96
|
|
|
97
97
|
> **OBJECT\_ID\_MISMATCH**: `"The object provided does not match the identifier given."`
|
|
98
98
|
|
|
99
|
-
Defined in: [src/ApiErrors.ts:31](https://github.com/rapidrest/service-core/blob/
|
|
99
|
+
Defined in: [src/ApiErrors.ts:31](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L31)
|
|
100
100
|
|
|
101
101
|
***
|
|
102
102
|
|
|
@@ -104,7 +104,7 @@ Defined in: [src/ApiErrors.ts:31](https://github.com/rapidrest/service-core/blob
|
|
|
104
104
|
|
|
105
105
|
> **SEARCH\_INVALID\_ME\_REFERENCE**: `` "Use of the `me` reference requires authentication." ``
|
|
106
106
|
|
|
107
|
-
Defined in: [src/ApiErrors.ts:33](https://github.com/rapidrest/service-core/blob/
|
|
107
|
+
Defined in: [src/ApiErrors.ts:33](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L33)
|
|
108
108
|
|
|
109
109
|
***
|
|
110
110
|
|
|
@@ -112,7 +112,7 @@ Defined in: [src/ApiErrors.ts:33](https://github.com/rapidrest/service-core/blob
|
|
|
112
112
|
|
|
113
113
|
> **SEARCH\_INVALID\_RANGE**: `"Invalid range value: '{{value}}'. Expected 2 arguments, got {{length}}"`
|
|
114
114
|
|
|
115
|
-
Defined in: [src/ApiErrors.ts:32](https://github.com/rapidrest/service-core/blob/
|
|
115
|
+
Defined in: [src/ApiErrors.ts:32](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L32)
|
|
116
116
|
|
|
117
117
|
***
|
|
118
118
|
|
|
@@ -120,4 +120,4 @@ Defined in: [src/ApiErrors.ts:32](https://github.com/rapidrest/service-core/blob
|
|
|
120
120
|
|
|
121
121
|
> **UNKNOWN**: `"An unknown error has occurred. Please try again."`
|
|
122
122
|
|
|
123
|
-
Defined in: [src/ApiErrors.ts:25](https://github.com/rapidrest/service-core/blob/
|
|
123
|
+
Defined in: [src/ApiErrors.ts:25](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L25)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Enumeration: ApiErrors
|
|
8
8
|
|
|
9
|
-
Defined in: [src/ApiErrors.ts:4](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/ApiErrors.ts:4](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L4)
|
|
10
10
|
|
|
11
11
|
Defines the unique codes for all common API errors.
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ Defines the unique codes for all common API errors.
|
|
|
16
16
|
|
|
17
17
|
> **AUTH\_FAILED**: `"api-101"`
|
|
18
18
|
|
|
19
|
-
Defined in: [src/ApiErrors.ts:17](https://github.com/rapidrest/service-core/blob/
|
|
19
|
+
Defined in: [src/ApiErrors.ts:17](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L17)
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ Defined in: [src/ApiErrors.ts:17](https://github.com/rapidrest/service-core/blob
|
|
|
24
24
|
|
|
25
25
|
> **AUTH\_PERMISSION\_FAILURE**: `"api-102"`
|
|
26
26
|
|
|
27
|
-
Defined in: [src/ApiErrors.ts:18](https://github.com/rapidrest/service-core/blob/
|
|
27
|
+
Defined in: [src/ApiErrors.ts:18](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L18)
|
|
28
28
|
|
|
29
29
|
***
|
|
30
30
|
|
|
@@ -32,7 +32,7 @@ Defined in: [src/ApiErrors.ts:18](https://github.com/rapidrest/service-core/blob
|
|
|
32
32
|
|
|
33
33
|
> **AUTH\_REQUIRED**: `"api-100"`
|
|
34
34
|
|
|
35
|
-
Defined in: [src/ApiErrors.ts:16](https://github.com/rapidrest/service-core/blob/
|
|
35
|
+
Defined in: [src/ApiErrors.ts:16](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L16)
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@ Defined in: [src/ApiErrors.ts:16](https://github.com/rapidrest/service-core/blob
|
|
|
40
40
|
|
|
41
41
|
> **BULK\_CREATE\_FAILURE**: `"api-021"`
|
|
42
42
|
|
|
43
|
-
Defined in: [src/ApiErrors.ts:14](https://github.com/rapidrest/service-core/blob/
|
|
43
|
+
Defined in: [src/ApiErrors.ts:14](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L14)
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ Defined in: [src/ApiErrors.ts:14](https://github.com/rapidrest/service-core/blob
|
|
|
48
48
|
|
|
49
49
|
> **BULK\_UPDATE\_FAILURE**: `"api-022"`
|
|
50
50
|
|
|
51
|
-
Defined in: [src/ApiErrors.ts:15](https://github.com/rapidrest/service-core/blob/
|
|
51
|
+
Defined in: [src/ApiErrors.ts:15](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L15)
|
|
52
52
|
|
|
53
53
|
***
|
|
54
54
|
|
|
@@ -56,7 +56,7 @@ Defined in: [src/ApiErrors.ts:15](https://github.com/rapidrest/service-core/blob
|
|
|
56
56
|
|
|
57
57
|
> **IDENTIFIER\_EXISTS**: `"api-011"`
|
|
58
58
|
|
|
59
|
-
Defined in: [src/ApiErrors.ts:9](https://github.com/rapidrest/service-core/blob/
|
|
59
|
+
Defined in: [src/ApiErrors.ts:9](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L9)
|
|
60
60
|
|
|
61
61
|
***
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ Defined in: [src/ApiErrors.ts:9](https://github.com/rapidrest/service-core/blob/
|
|
|
64
64
|
|
|
65
65
|
> **INTERNAL\_ERROR**: `"api-002"`
|
|
66
66
|
|
|
67
|
-
Defined in: [src/ApiErrors.ts:6](https://github.com/rapidrest/service-core/blob/
|
|
67
|
+
Defined in: [src/ApiErrors.ts:6](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L6)
|
|
68
68
|
|
|
69
69
|
***
|
|
70
70
|
|
|
@@ -72,7 +72,7 @@ Defined in: [src/ApiErrors.ts:6](https://github.com/rapidrest/service-core/blob/
|
|
|
72
72
|
|
|
73
73
|
> **INVALID\_OBJECT\_VERSION**: `"api-012"`
|
|
74
74
|
|
|
75
|
-
Defined in: [src/ApiErrors.ts:10](https://github.com/rapidrest/service-core/blob/
|
|
75
|
+
Defined in: [src/ApiErrors.ts:10](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L10)
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
@@ -80,7 +80,7 @@ Defined in: [src/ApiErrors.ts:10](https://github.com/rapidrest/service-core/blob
|
|
|
80
80
|
|
|
81
81
|
> **INVALID\_REQUEST**: `"api-003"`
|
|
82
82
|
|
|
83
|
-
Defined in: [src/ApiErrors.ts:7](https://github.com/rapidrest/service-core/blob/
|
|
83
|
+
Defined in: [src/ApiErrors.ts:7](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L7)
|
|
84
84
|
|
|
85
85
|
***
|
|
86
86
|
|
|
@@ -88,7 +88,7 @@ Defined in: [src/ApiErrors.ts:7](https://github.com/rapidrest/service-core/blob/
|
|
|
88
88
|
|
|
89
89
|
> **NOT\_FOUND**: `"api-010"`
|
|
90
90
|
|
|
91
|
-
Defined in: [src/ApiErrors.ts:8](https://github.com/rapidrest/service-core/blob/
|
|
91
|
+
Defined in: [src/ApiErrors.ts:8](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L8)
|
|
92
92
|
|
|
93
93
|
***
|
|
94
94
|
|
|
@@ -96,7 +96,7 @@ Defined in: [src/ApiErrors.ts:8](https://github.com/rapidrest/service-core/blob/
|
|
|
96
96
|
|
|
97
97
|
> **OBJECT\_ID\_MISMATCH**: `"api-013"`
|
|
98
98
|
|
|
99
|
-
Defined in: [src/ApiErrors.ts:11](https://github.com/rapidrest/service-core/blob/
|
|
99
|
+
Defined in: [src/ApiErrors.ts:11](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L11)
|
|
100
100
|
|
|
101
101
|
***
|
|
102
102
|
|
|
@@ -104,7 +104,7 @@ Defined in: [src/ApiErrors.ts:11](https://github.com/rapidrest/service-core/blob
|
|
|
104
104
|
|
|
105
105
|
> **SEARCH\_INVALID\_ME\_REFERENCE**: `"api-015"`
|
|
106
106
|
|
|
107
|
-
Defined in: [src/ApiErrors.ts:13](https://github.com/rapidrest/service-core/blob/
|
|
107
|
+
Defined in: [src/ApiErrors.ts:13](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L13)
|
|
108
108
|
|
|
109
109
|
***
|
|
110
110
|
|
|
@@ -112,7 +112,7 @@ Defined in: [src/ApiErrors.ts:13](https://github.com/rapidrest/service-core/blob
|
|
|
112
112
|
|
|
113
113
|
> **SEARCH\_INVALID\_RANGE**: `"api-014"`
|
|
114
114
|
|
|
115
|
-
Defined in: [src/ApiErrors.ts:12](https://github.com/rapidrest/service-core/blob/
|
|
115
|
+
Defined in: [src/ApiErrors.ts:12](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L12)
|
|
116
116
|
|
|
117
117
|
***
|
|
118
118
|
|
|
@@ -120,4 +120,4 @@ Defined in: [src/ApiErrors.ts:12](https://github.com/rapidrest/service-core/blob
|
|
|
120
120
|
|
|
121
121
|
> **UNKNOWN**: `"api-001"`
|
|
122
122
|
|
|
123
|
-
Defined in: [src/ApiErrors.ts:5](https://github.com/rapidrest/service-core/blob/
|
|
123
|
+
Defined in: [src/ApiErrors.ts:5](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/ApiErrors.ts#L5)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../globals.md) / createWebSocketStream
|
|
6
|
+
|
|
7
|
+
# Function: createWebSocketStream()
|
|
8
|
+
|
|
9
|
+
> **createWebSocketStream**(`shim`): `Duplex`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/http/WebSocket.ts:85](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/http/WebSocket.ts#L85)
|
|
12
|
+
|
|
13
|
+
Creates a Node.js `Duplex` stream from a `UWSWebSocketShim`, compatible with the
|
|
14
|
+
`createWebSocketStream` API from the `ws` library.
|
|
15
|
+
|
|
16
|
+
Incoming WebSocket messages are pushed as readable data; writes to the stream are
|
|
17
|
+
forwarded as WebSocket messages.
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
### shim
|
|
22
|
+
|
|
23
|
+
[`UWSWebSocketShim`](../classes/UWSWebSocketShim.md)
|
|
24
|
+
|
|
25
|
+
## Returns
|
|
26
|
+
|
|
27
|
+
`Duplex`
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **isSqlDataSource**(`conn`): `boolean`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/database/ConnectionKinds.ts:12](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/database/ConnectionKinds.ts:12](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/database/ConnectionKinds.ts#L12)
|
|
12
12
|
|
|
13
13
|
Determines whether the given connection object is a TypeORM `DataSource` for a SQL database. This check is
|
|
14
14
|
performed without importing the optional `typeorm` package by duck-typing the connection object.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../globals.md) / readBody
|
|
6
|
+
|
|
7
|
+
# Function: readBody()
|
|
8
|
+
|
|
9
|
+
> **readBody**(`uwsRes`, `req`): `Promise`\<`void`\>
|
|
10
|
+
|
|
11
|
+
Defined in: [src/http/Adapters.ts:224](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/http/Adapters.ts#L224)
|
|
12
|
+
|
|
13
|
+
Reads the full request body from a uWS response object as a Buffer.
|
|
14
|
+
Body parsing (JSON / URL-encoded) is applied based on content-type and the result
|
|
15
|
+
is cached on `req.body` / `req.rawBody`.
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
### uwsRes
|
|
20
|
+
|
|
21
|
+
`HttpResponse`
|
|
22
|
+
|
|
23
|
+
### req
|
|
24
|
+
|
|
25
|
+
[`UWSRequest`](../classes/UWSRequest.md)
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`void`\>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **resolveCollectionName**(`clazz`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/database/NamingUtils.ts:38](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/database/NamingUtils.ts:38](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/database/NamingUtils.ts#L38)
|
|
12
12
|
|
|
13
13
|
Resolves the name of the database collection (or table) that records of the given model class are stored in.
|
|
14
14
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[**@rapidrest/service-core**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@rapidrest/service-core](../globals.md) / runChain
|
|
6
|
+
|
|
7
|
+
# Function: runChain()
|
|
8
|
+
|
|
9
|
+
> **runChain**(`handlers`, `req`, `res`): `Promise`\<`void`\>
|
|
10
|
+
|
|
11
|
+
Defined in: [src/http/Router.ts:43](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/http/Router.ts#L43)
|
|
12
|
+
|
|
13
|
+
Runs an ordered array of middleware handlers sequentially, Express-style.
|
|
14
|
+
Supports both 3-param `(req, res, next)` handlers and 4-param `(err, req, res, next)`
|
|
15
|
+
error handlers. On error, execution skips to the next error handler.
|
|
16
|
+
|
|
17
|
+
Each handler is awaited via a Promise that resolves when next() is called, not when
|
|
18
|
+
the handler's return value resolves. This correctly handles: (1) sync handlers that
|
|
19
|
+
call next() synchronously, (2) async handlers that return next() or await before
|
|
20
|
+
calling it, and (3) sync handlers that schedule next() via callbacks such as
|
|
21
|
+
setTimeout or socket.once. The chain terminates early when a handler ends the
|
|
22
|
+
response without calling next().
|
|
23
|
+
|
|
24
|
+
## Parameters
|
|
25
|
+
|
|
26
|
+
### handlers
|
|
27
|
+
|
|
28
|
+
[`RequestHandler`](../type-aliases/RequestHandler.md)[]
|
|
29
|
+
|
|
30
|
+
### req
|
|
31
|
+
|
|
32
|
+
[`HttpRequest`](../interfaces/HttpRequest.md)
|
|
33
|
+
|
|
34
|
+
### res
|
|
35
|
+
|
|
36
|
+
[`HttpResponse`](../interfaces/HttpResponse.md)
|
|
37
|
+
|
|
38
|
+
## Returns
|
|
39
|
+
|
|
40
|
+
`Promise`\<`void`\>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **snakeCase**(`str`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/database/NamingUtils.ts:14](https://github.com/rapidrest/service-core/blob/
|
|
11
|
+
Defined in: [src/database/NamingUtils.ts:14](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/database/NamingUtils.ts#L14)
|
|
12
12
|
|
|
13
13
|
Converts a string into snake_case.
|
|
14
14
|
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
- [BulkError](classes/BulkError.md)
|
|
34
34
|
- [ConnectionManager](classes/ConnectionManager.md)
|
|
35
35
|
- [EventListenerManager](classes/EventListenerManager.md)
|
|
36
|
+
- [HttpRouter](classes/HttpRouter.md)
|
|
36
37
|
- [JWTStrategy](classes/JWTStrategy.md)
|
|
37
38
|
- [JWTStrategyOptions](classes/JWTStrategyOptions.md)
|
|
38
39
|
- [MetricsRoute](classes/MetricsRoute.md)
|
|
@@ -56,6 +57,9 @@
|
|
|
56
57
|
- [SimpleMongoEntity](classes/SimpleMongoEntity.md)
|
|
57
58
|
- [StatusExtraData](classes/StatusExtraData.md)
|
|
58
59
|
- [StatusRoute](classes/StatusRoute.md)
|
|
60
|
+
- [UWSRequest](classes/UWSRequest.md)
|
|
61
|
+
- [UWSResponse](classes/UWSResponse.md)
|
|
62
|
+
- [UWSWebSocketShim](classes/UWSWebSocketShim.md)
|
|
59
63
|
|
|
60
64
|
## Interfaces
|
|
61
65
|
|
|
@@ -66,6 +70,8 @@
|
|
|
66
70
|
- [CreateRequestOptions](interfaces/CreateRequestOptions.md)
|
|
67
71
|
- [DeleteRequestOptions](interfaces/DeleteRequestOptions.md)
|
|
68
72
|
- [FindRequestOptions](interfaces/FindRequestOptions.md)
|
|
73
|
+
- [HttpRequest](interfaces/HttpRequest.md)
|
|
74
|
+
- [HttpResponse](interfaces/HttpResponse.md)
|
|
69
75
|
- [JWTAuthResult](interfaces/JWTAuthResult.md)
|
|
70
76
|
- [RepoCreateOptions](interfaces/RepoCreateOptions.md)
|
|
71
77
|
- [RepoDeleteOptions](interfaces/RepoDeleteOptions.md)
|
|
@@ -73,19 +79,28 @@
|
|
|
73
79
|
- [RepoOperationOptions](interfaces/RepoOperationOptions.md)
|
|
74
80
|
- [RepoUpdateOptions](interfaces/RepoUpdateOptions.md)
|
|
75
81
|
- [RequestOptions](interfaces/RequestOptions.md)
|
|
82
|
+
- [RequestWS](interfaces/RequestWS.md)
|
|
76
83
|
- [TruncateRequestOptions](interfaces/TruncateRequestOptions.md)
|
|
77
84
|
- [UpdateRequestOptions](interfaces/UpdateRequestOptions.md)
|
|
78
85
|
|
|
79
86
|
## Type Aliases
|
|
80
87
|
|
|
88
|
+
- [ErrorHandler](type-aliases/ErrorHandler.md)
|
|
89
|
+
- [NextFunction](type-aliases/NextFunction.md)
|
|
81
90
|
- [OneOrMany](type-aliases/OneOrMany.md)
|
|
82
91
|
- [OneOrNull](type-aliases/OneOrNull.md)
|
|
83
92
|
- [PartialBaseEntity](type-aliases/PartialBaseEntity.md)
|
|
84
93
|
- [PartialSimpleEntity](type-aliases/PartialSimpleEntity.md)
|
|
94
|
+
- [RequestHandler](type-aliases/RequestHandler.md)
|
|
85
95
|
- [UpdateObject](type-aliases/UpdateObject.md)
|
|
96
|
+
- [WsUpgradeAuth](type-aliases/WsUpgradeAuth.md)
|
|
97
|
+
- [WsUpgradeAuthResult](type-aliases/WsUpgradeAuthResult.md)
|
|
86
98
|
|
|
87
99
|
## Functions
|
|
88
100
|
|
|
101
|
+
- [createWebSocketStream](functions/createWebSocketStream.md)
|
|
89
102
|
- [isSqlDataSource](functions/isSqlDataSource.md)
|
|
103
|
+
- [readBody](functions/readBody.md)
|
|
90
104
|
- [resolveCollectionName](functions/resolveCollectionName.md)
|
|
105
|
+
- [runChain](functions/runChain.md)
|
|
91
106
|
- [snakeCase](functions/snakeCase.md)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: ACLRecord
|
|
8
8
|
|
|
9
|
-
Defined in: [src/security/AccessControlList.ts:33](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/security/AccessControlList.ts:33](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L33)
|
|
10
10
|
|
|
11
11
|
The `ACLRecord` interface describes a single permissions entry in an `AccessControlList` that grants or denies
|
|
12
12
|
a set of permissions to a single user or role.
|
|
@@ -29,7 +29,7 @@ Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
|
29
29
|
|
|
30
30
|
> **create**: `boolean` \| `null`
|
|
31
31
|
|
|
32
|
-
Defined in: [src/security/AccessControlList.ts:42](https://github.com/rapidrest/service-core/blob/
|
|
32
|
+
Defined in: [src/security/AccessControlList.ts:42](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L42)
|
|
33
33
|
|
|
34
34
|
Indicates that the user or role has permission to create new records of the entity.
|
|
35
35
|
|
|
@@ -39,7 +39,7 @@ Indicates that the user or role has permission to create new records of the enti
|
|
|
39
39
|
|
|
40
40
|
> **delete**: `boolean` \| `null`
|
|
41
41
|
|
|
42
|
-
Defined in: [src/security/AccessControlList.ts:57](https://github.com/rapidrest/service-core/blob/
|
|
42
|
+
Defined in: [src/security/AccessControlList.ts:57](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L57)
|
|
43
43
|
|
|
44
44
|
Indicates that the user or role has permission to delete existing records of the entity.
|
|
45
45
|
|
|
@@ -49,7 +49,7 @@ Indicates that the user or role has permission to delete existing records of the
|
|
|
49
49
|
|
|
50
50
|
> **full**: `boolean` \| `null`
|
|
51
51
|
|
|
52
|
-
Defined in: [src/security/AccessControlList.ts:69](https://github.com/rapidrest/service-core/blob/
|
|
52
|
+
Defined in: [src/security/AccessControlList.ts:69](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L69)
|
|
53
53
|
|
|
54
54
|
Indicates that the user or role has total control over records of the entity. This supersedes all of the above
|
|
55
55
|
permissions.
|
|
@@ -60,7 +60,7 @@ permissions.
|
|
|
60
60
|
|
|
61
61
|
> **read**: `boolean` \| `null`
|
|
62
62
|
|
|
63
|
-
Defined in: [src/security/AccessControlList.ts:47](https://github.com/rapidrest/service-core/blob/
|
|
63
|
+
Defined in: [src/security/AccessControlList.ts:47](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L47)
|
|
64
64
|
|
|
65
65
|
Indicates that the user or role has permission to read records of the entity.
|
|
66
66
|
|
|
@@ -70,7 +70,7 @@ Indicates that the user or role has permission to read records of the entity.
|
|
|
70
70
|
|
|
71
71
|
> **special**: `boolean` \| `null`
|
|
72
72
|
|
|
73
|
-
Defined in: [src/security/AccessControlList.ts:63](https://github.com/rapidrest/service-core/blob/
|
|
73
|
+
Defined in: [src/security/AccessControlList.ts:63](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L63)
|
|
74
74
|
|
|
75
75
|
Indicates that the user or role has special permission over records of the entity. The exact meaning of this
|
|
76
76
|
may vary by service.
|
|
@@ -81,7 +81,7 @@ may vary by service.
|
|
|
81
81
|
|
|
82
82
|
> **update**: `boolean` \| `null`
|
|
83
83
|
|
|
84
|
-
Defined in: [src/security/AccessControlList.ts:52](https://github.com/rapidrest/service-core/blob/
|
|
84
|
+
Defined in: [src/security/AccessControlList.ts:52](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L52)
|
|
85
85
|
|
|
86
86
|
Indicates that the user or role has permission to modify existing records of the entity.
|
|
87
87
|
|
|
@@ -91,6 +91,6 @@ Indicates that the user or role has permission to modify existing records of the
|
|
|
91
91
|
|
|
92
92
|
> **userOrRoleId**: `string`
|
|
93
93
|
|
|
94
|
-
Defined in: [src/security/AccessControlList.ts:37](https://github.com/rapidrest/service-core/blob/
|
|
94
|
+
Defined in: [src/security/AccessControlList.ts:37](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L37)
|
|
95
95
|
|
|
96
96
|
The unique identifier of the user or role that the record belongs to.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: AccessControlList
|
|
8
8
|
|
|
9
|
-
Defined in: [src/security/AccessControlList.ts:97](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/security/AccessControlList.ts:97](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L97)
|
|
10
10
|
|
|
11
11
|
The access control list provides a generic interface for the storage of user and roles permissions. Each ACL object
|
|
12
12
|
represents the permission set for a single entity within the system. The entity is identified generically by its
|
|
@@ -40,7 +40,7 @@ Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
|
40
40
|
|
|
41
41
|
> `optional` **parent?**: `AccessControlList` \| `null`
|
|
42
42
|
|
|
43
|
-
Defined in: [src/security/AccessControlList.ts:106](https://github.com/rapidrest/service-core/blob/
|
|
43
|
+
Defined in: [src/security/AccessControlList.ts:106](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L106)
|
|
44
44
|
|
|
45
45
|
The parent access control list that this instance inherits permissions from.
|
|
46
46
|
|
|
@@ -50,7 +50,7 @@ The parent access control list that this instance inherits permissions from.
|
|
|
50
50
|
|
|
51
51
|
> `optional` **parentUid?**: `string`
|
|
52
52
|
|
|
53
|
-
Defined in: [src/security/AccessControlList.ts:112](https://github.com/rapidrest/service-core/blob/
|
|
53
|
+
Defined in: [src/security/AccessControlList.ts:112](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L112)
|
|
54
54
|
|
|
55
55
|
The universally unique identifier of the parent `AccessControlList` that this object will inherit permissions
|
|
56
56
|
from.
|
|
@@ -61,7 +61,7 @@ from.
|
|
|
61
61
|
|
|
62
62
|
> **records**: [`ACLRecord`](ACLRecord.md)[]
|
|
63
63
|
|
|
64
|
-
Defined in: [src/security/AccessControlList.ts:117](https://github.com/rapidrest/service-core/blob/
|
|
64
|
+
Defined in: [src/security/AccessControlList.ts:117](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L117)
|
|
65
65
|
|
|
66
66
|
The list of all permission records associated with this access control list.
|
|
67
67
|
|
|
@@ -71,6 +71,6 @@ The list of all permission records associated with this access control list.
|
|
|
71
71
|
|
|
72
72
|
> **uid**: `string`
|
|
73
73
|
|
|
74
|
-
Defined in: [src/security/AccessControlList.ts:101](https://github.com/rapidrest/service-core/blob/
|
|
74
|
+
Defined in: [src/security/AccessControlList.ts:101](https://github.com/rapidrest/service-core/blob/5cd5bc79b3569101eabf54dec613fd4745a69b2b/src/security/AccessControlList.ts#L101)
|
|
75
75
|
|
|
76
76
|
The universally unique identifier (`uuid`) of the entity that the access control list belongs to.
|