@rapidrest/service-core 1.0.0-beta.2 → 1.0.0-beta.4
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 +1 -1
- package/dist/lib/OpenApiSpec.js.map +1 -1
- package/dist/lib/models/ModelUtils.js +1 -1
- package/dist/lib/models/ModelUtils.js.map +1 -1
- package/dist/lib/models/RepoUtils.js +2 -2
- package/dist/lib/models/RepoUtils.js.map +1 -1
- package/dist/lib/routes/MetricsRoute.js +1 -1
- package/dist/lib/routes/MetricsRoute.js.map +1 -1
- package/dist/lib/routes/RouteUtils.js +1 -1
- package/dist/lib/routes/RouteUtils.js.map +1 -1
- package/dist/types/models/RepoUtils.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 +9 -9
- package/docs/reference/classes/AdminRoute.md +3 -3
- package/docs/reference/classes/AuthMiddleware.md +6 -6
- 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 +5 -5
- package/docs/reference/classes/BasicStrategyOptions.md +7 -7
- 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 +16 -16
- package/docs/reference/classes/JWTStrategy.md +5 -5
- package/docs/reference/classes/JWTStrategyOptions.md +8 -8
- package/docs/reference/classes/MetricsRoute.md +4 -4
- package/docs/reference/classes/ModelRoute.md +26 -26
- package/docs/reference/classes/ModelUtils.md +50 -50
- 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 +3 -3
- package/docs/reference/classes/NotificationUtils.md +3 -3
- package/docs/reference/classes/ObjectFactory.md +3 -3
- 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 +7 -7
- package/docs/reference/classes/Server.md +26 -26
- 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 +16 -16
- package/docs/reference/classes/UWSResponse.md +13 -13
- package/docs/reference/classes/UWSWebSocketShim.md +5 -5
- 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 +1 -1
- package/docs/reference/functions/isSqlDataSource.md +1 -1
- package/docs/reference/functions/readBody.md +1 -1
- package/docs/reference/functions/resolveCollectionName.md +1 -1
- package/docs/reference/functions/runChain.md +1 -1
- package/docs/reference/functions/snakeCase.md +1 -1
- 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 +4 -4
- package/docs/reference/interfaces/CreateRequestOptions.md +9 -9
- package/docs/reference/interfaces/DeleteRequestOptions.md +11 -11
- package/docs/reference/interfaces/FindRequestOptions.md +10 -10
- package/docs/reference/interfaces/HttpRequest.md +15 -15
- package/docs/reference/interfaces/HttpResponse.md +11 -11
- package/docs/reference/interfaces/JWTAuthResult.md +6 -6
- 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 +8 -8
- package/docs/reference/interfaces/RequestWS.md +17 -17
- package/docs/reference/interfaces/TruncateRequestOptions.md +13 -13
- package/docs/reference/interfaces/UpdateRequestOptions.md +11 -11
- package/docs/reference/type-aliases/ErrorHandler.md +1 -1
- package/docs/reference/type-aliases/NextFunction.md +1 -1
- 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 +1 -1
- package/docs/reference/type-aliases/UpdateObject.md +1 -1
- package/docs/reference/type-aliases/WsUpgradeAuth.md +1 -1
- package/docs/reference/type-aliases/WsUpgradeAuthResult.md +5 -5
- package/package.json +3 -3
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: RepoUtils\<T\>
|
|
8
8
|
|
|
9
|
-
Defined in: [src/models/RepoUtils.ts:89](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/models/RepoUtils.ts:89](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L89)
|
|
10
10
|
|
|
11
11
|
## Author
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ Jean-Philippe Steinmetz
|
|
|
24
24
|
|
|
25
25
|
> **new RepoUtils**\<`T`\>(`modelClass`, `repo?`): `RepoUtils`\<`T`\>
|
|
26
26
|
|
|
27
|
-
Defined in: [src/models/RepoUtils.ts:123](https://github.com/rapidrest/service-core/blob/
|
|
27
|
+
Defined in: [src/models/RepoUtils.ts:123](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L123)
|
|
28
28
|
|
|
29
29
|
#### Parameters
|
|
30
30
|
|
|
@@ -46,7 +46,7 @@ Defined in: [src/models/RepoUtils.ts:123](https://github.com/rapidrest/service-c
|
|
|
46
46
|
|
|
47
47
|
> `protected` `optional` **aclUtils?**: [`ACLUtils`](ACLUtils.md)
|
|
48
48
|
|
|
49
|
-
Defined in: [src/models/RepoUtils.ts:91](https://github.com/rapidrest/service-core/blob/
|
|
49
|
+
Defined in: [src/models/RepoUtils.ts:91](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L91)
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ Defined in: [src/models/RepoUtils.ts:91](https://github.com/rapidrest/service-co
|
|
|
54
54
|
|
|
55
55
|
> `protected` `optional` **cacheClient?**: `Redis`
|
|
56
56
|
|
|
57
|
-
Defined in: [src/models/RepoUtils.ts:95](https://github.com/rapidrest/service-core/blob/
|
|
57
|
+
Defined in: [src/models/RepoUtils.ts:95](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L95)
|
|
58
58
|
|
|
59
59
|
The redis client that will be used as a 2nd level cache for all cacheable models.
|
|
60
60
|
|
|
@@ -64,7 +64,7 @@ The redis client that will be used as a 2nd level cache for all cacheable models
|
|
|
64
64
|
|
|
65
65
|
> `protected` **config**: `any`
|
|
66
66
|
|
|
67
|
-
Defined in: [src/models/RepoUtils.ts:98](https://github.com/rapidrest/service-core/blob/
|
|
67
|
+
Defined in: [src/models/RepoUtils.ts:98](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L98)
|
|
68
68
|
|
|
69
69
|
***
|
|
70
70
|
|
|
@@ -72,7 +72,7 @@ Defined in: [src/models/RepoUtils.ts:98](https://github.com/rapidrest/service-co
|
|
|
72
72
|
|
|
73
73
|
> `protected` `optional` **connectionManager?**: [`ConnectionManager`](ConnectionManager.md)
|
|
74
74
|
|
|
75
|
-
Defined in: [src/models/RepoUtils.ts:101](https://github.com/rapidrest/service-core/blob/
|
|
75
|
+
Defined in: [src/models/RepoUtils.ts:101](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L101)
|
|
76
76
|
|
|
77
77
|
***
|
|
78
78
|
|
|
@@ -80,7 +80,7 @@ Defined in: [src/models/RepoUtils.ts:101](https://github.com/rapidrest/service-c
|
|
|
80
80
|
|
|
81
81
|
> **defaultACLUid**: `string` = `""`
|
|
82
82
|
|
|
83
|
-
Defined in: [src/models/RepoUtils.ts:104](https://github.com/rapidrest/service-core/blob/
|
|
83
|
+
Defined in: [src/models/RepoUtils.ts:104](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L104)
|
|
84
84
|
|
|
85
85
|
The unique identifier of the default ACL for the model type.
|
|
86
86
|
|
|
@@ -90,7 +90,7 @@ The unique identifier of the default ACL for the model type.
|
|
|
90
90
|
|
|
91
91
|
> `protected` **logger**: `any`
|
|
92
92
|
|
|
93
|
-
Defined in: [src/models/RepoUtils.ts:107](https://github.com/rapidrest/service-core/blob/
|
|
93
|
+
Defined in: [src/models/RepoUtils.ts:107](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L107)
|
|
94
94
|
|
|
95
95
|
***
|
|
96
96
|
|
|
@@ -98,7 +98,7 @@ Defined in: [src/models/RepoUtils.ts:107](https://github.com/rapidrest/service-c
|
|
|
98
98
|
|
|
99
99
|
> `protected` **modelClass**: `any`
|
|
100
100
|
|
|
101
|
-
Defined in: [src/models/RepoUtils.ts:109](https://github.com/rapidrest/service-core/blob/
|
|
101
|
+
Defined in: [src/models/RepoUtils.ts:109](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L109)
|
|
102
102
|
|
|
103
103
|
***
|
|
104
104
|
|
|
@@ -106,7 +106,7 @@ Defined in: [src/models/RepoUtils.ts:109](https://github.com/rapidrest/service-c
|
|
|
106
106
|
|
|
107
107
|
> `protected` `optional` **notificationUtils?**: [`NotificationUtils`](NotificationUtils.md)
|
|
108
108
|
|
|
109
|
-
Defined in: [src/models/RepoUtils.ts:115](https://github.com/rapidrest/service-core/blob/
|
|
109
|
+
Defined in: [src/models/RepoUtils.ts:115](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L115)
|
|
110
110
|
|
|
111
111
|
***
|
|
112
112
|
|
|
@@ -114,7 +114,7 @@ Defined in: [src/models/RepoUtils.ts:115](https://github.com/rapidrest/service-c
|
|
|
114
114
|
|
|
115
115
|
> `protected` `optional` **objectFactory?**: [`ObjectFactory`](ObjectFactory.md)
|
|
116
116
|
|
|
117
|
-
Defined in: [src/models/RepoUtils.ts:112](https://github.com/rapidrest/service-core/blob/
|
|
117
|
+
Defined in: [src/models/RepoUtils.ts:112](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L112)
|
|
118
118
|
|
|
119
119
|
***
|
|
120
120
|
|
|
@@ -122,7 +122,7 @@ Defined in: [src/models/RepoUtils.ts:112](https://github.com/rapidrest/service-c
|
|
|
122
122
|
|
|
123
123
|
> `optional` **repo?**: `Repository`\<`T`\> \| [`MongoRepository`](MongoRepository.md)\<`T`\>
|
|
124
124
|
|
|
125
|
-
Defined in: [src/models/RepoUtils.ts:118](https://github.com/rapidrest/service-core/blob/
|
|
125
|
+
Defined in: [src/models/RepoUtils.ts:118](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L118)
|
|
126
126
|
|
|
127
127
|
The model class associated with the controller to perform operations against.
|
|
128
128
|
|
|
@@ -132,7 +132,7 @@ The model class associated with the controller to perform operations against.
|
|
|
132
132
|
|
|
133
133
|
> `protected` **trustedRoles**: `string`[]
|
|
134
134
|
|
|
135
|
-
Defined in: [src/models/RepoUtils.ts:121](https://github.com/rapidrest/service-core/blob/
|
|
135
|
+
Defined in: [src/models/RepoUtils.ts:121](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L121)
|
|
136
136
|
|
|
137
137
|
## Accessors
|
|
138
138
|
|
|
@@ -142,7 +142,7 @@ Defined in: [src/models/RepoUtils.ts:121](https://github.com/rapidrest/service-c
|
|
|
142
142
|
|
|
143
143
|
> **get** **baseCacheKey**(): `string`
|
|
144
144
|
|
|
145
|
-
Defined in: [src/models/RepoUtils.ts:195](https://github.com/rapidrest/service-core/blob/
|
|
145
|
+
Defined in: [src/models/RepoUtils.ts:195](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L195)
|
|
146
146
|
|
|
147
147
|
The base key used to get or set data in the cache.
|
|
148
148
|
|
|
@@ -156,7 +156,7 @@ The base key used to get or set data in the cache.
|
|
|
156
156
|
|
|
157
157
|
> **count**(`query`, `options?`): `Promise`\<`number`\>
|
|
158
158
|
|
|
159
|
-
Defined in: [src/models/RepoUtils.ts:199](https://github.com/rapidrest/service-core/blob/
|
|
159
|
+
Defined in: [src/models/RepoUtils.ts:199](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L199)
|
|
160
160
|
|
|
161
161
|
#### Parameters
|
|
162
162
|
|
|
@@ -178,7 +178,7 @@ Defined in: [src/models/RepoUtils.ts:199](https://github.com/rapidrest/service-c
|
|
|
178
178
|
|
|
179
179
|
> **create**(`obj`, `options?`): `Promise`\<`T`\>
|
|
180
180
|
|
|
181
|
-
Defined in: [src/models/RepoUtils.ts:231](https://github.com/rapidrest/service-core/blob/
|
|
181
|
+
Defined in: [src/models/RepoUtils.ts:231](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L231)
|
|
182
182
|
|
|
183
183
|
Stores a new record of the provided object in the datastore. Performs pre-processing, permission checks against
|
|
184
184
|
the class ACL, cache seeding, telemetry recording and push notifications.
|
|
@@ -205,7 +205,7 @@ The object to store.
|
|
|
205
205
|
|
|
206
206
|
> **delete**(`uid`, `options`): `Promise`\<`void`\>
|
|
207
207
|
|
|
208
|
-
Defined in: [src/models/RepoUtils.ts:324](https://github.com/rapidrest/service-core/blob/
|
|
208
|
+
Defined in: [src/models/RepoUtils.ts:324](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L324)
|
|
209
209
|
|
|
210
210
|
#### Parameters
|
|
211
211
|
|
|
@@ -227,7 +227,7 @@ Defined in: [src/models/RepoUtils.ts:324](https://github.com/rapidrest/service-c
|
|
|
227
227
|
|
|
228
228
|
> **find**(`query`, `options?`): `Promise`\<`T`[]\>
|
|
229
229
|
|
|
230
|
-
Defined in: [src/models/RepoUtils.ts:395](https://github.com/rapidrest/service-core/blob/
|
|
230
|
+
Defined in: [src/models/RepoUtils.ts:395](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L395)
|
|
231
231
|
|
|
232
232
|
Retrieves an array of objects from the datastore matching the given search query. This function will first
|
|
233
233
|
attempt to look up the results in the cache. Also checks ACLs for READ permission.
|
|
@@ -256,7 +256,7 @@ The additional options to consider during the search.
|
|
|
256
256
|
|
|
257
257
|
> **findOne**(`id`, `options?`): `Promise`\<`T` \| `undefined`\>
|
|
258
258
|
|
|
259
|
-
Defined in: [src/models/RepoUtils.ts:474](https://github.com/rapidrest/service-core/blob/
|
|
259
|
+
Defined in: [src/models/RepoUtils.ts:474](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L474)
|
|
260
260
|
|
|
261
261
|
Retrieves the object with the given id from either the cache or the database. If retrieving from the database
|
|
262
262
|
the cache is populated to speed up subsequent requests.
|
|
@@ -285,7 +285,7 @@ The additional options to consider during the search.
|
|
|
285
285
|
|
|
286
286
|
> **getClassType**(`obj`): `any`
|
|
287
287
|
|
|
288
|
-
Defined in: [src/models/RepoUtils.ts:560](https://github.com/rapidrest/service-core/blob/
|
|
288
|
+
Defined in: [src/models/RepoUtils.ts:560](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L560)
|
|
289
289
|
|
|
290
290
|
Returns the class type (constructor) for the given object. This uses the `_fqn` or `_type` property of `obj` to
|
|
291
291
|
identify the class. If neither property is defined `modelClass` is assumed.
|
|
@@ -310,7 +310,7 @@ The class type (constructor) associated with the given object.
|
|
|
310
310
|
|
|
311
311
|
> **getDefaultACL**(): [`AccessControlList`](../interfaces/AccessControlList.md) \| `undefined`
|
|
312
312
|
|
|
313
|
-
Defined in: [src/models/RepoUtils.ts:529](https://github.com/rapidrest/service-core/blob/
|
|
313
|
+
Defined in: [src/models/RepoUtils.ts:529](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L529)
|
|
314
314
|
|
|
315
315
|
Returns the default access control list governing the model type. Returning a value of `undefined` will grant
|
|
316
316
|
full acccess to any user (including unauthenticated anonymous users).
|
|
@@ -325,7 +325,7 @@ full acccess to any user (including unauthenticated anonymous users).
|
|
|
325
325
|
|
|
326
326
|
> **hashQuery**(`query`): `string`
|
|
327
327
|
|
|
328
|
-
Defined in: [src/models/RepoUtils.ts:548](https://github.com/rapidrest/service-core/blob/
|
|
328
|
+
Defined in: [src/models/RepoUtils.ts:548](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L548)
|
|
329
329
|
|
|
330
330
|
Hashes the given query object to a unique string.
|
|
331
331
|
|
|
@@ -347,7 +347,7 @@ The query object to hash.
|
|
|
347
347
|
|
|
348
348
|
> `protected` **init**(): `Promise`\<`void`\>
|
|
349
349
|
|
|
350
|
-
Defined in: [src/models/RepoUtils.ts:129](https://github.com/rapidrest/service-core/blob/
|
|
350
|
+
Defined in: [src/models/RepoUtils.ts:129](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L129)
|
|
351
351
|
|
|
352
352
|
#### Returns
|
|
353
353
|
|
|
@@ -359,7 +359,7 @@ Defined in: [src/models/RepoUtils.ts:129](https://github.com/rapidrest/service-c
|
|
|
359
359
|
|
|
360
360
|
> **instantiateObject**(`obj`, `clazz?`): `T`
|
|
361
361
|
|
|
362
|
-
Defined in: [src/models/RepoUtils.ts:577](https://github.com/rapidrest/service-core/blob/
|
|
362
|
+
Defined in: [src/models/RepoUtils.ts:577](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L577)
|
|
363
363
|
|
|
364
364
|
Creates a new instance of obj scoped to the correct model class or sub-class.
|
|
365
365
|
|
|
@@ -383,7 +383,7 @@ Creates a new instance of obj scoped to the correct model class or sub-class.
|
|
|
383
383
|
|
|
384
384
|
> **searchIdQuery**(`id`, `version?`, `productUid?`): `any`
|
|
385
385
|
|
|
386
|
-
Defined in: [src/models/RepoUtils.ts:594](https://github.com/rapidrest/service-core/blob/
|
|
386
|
+
Defined in: [src/models/RepoUtils.ts:594](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L594)
|
|
387
387
|
|
|
388
388
|
Search for existing object based on passed in id and version and product uid.
|
|
389
389
|
|
|
@@ -413,7 +413,7 @@ The result of this function is compatible with all `Repository.find()` functions
|
|
|
413
413
|
|
|
414
414
|
> **truncate**(`query`, `options`): `Promise`\<`void`\>
|
|
415
415
|
|
|
416
|
-
Defined in: [src/models/RepoUtils.ts:604](https://github.com/rapidrest/service-core/blob/
|
|
416
|
+
Defined in: [src/models/RepoUtils.ts:604](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L604)
|
|
417
417
|
|
|
418
418
|
#### Parameters
|
|
419
419
|
|
|
@@ -435,7 +435,7 @@ Defined in: [src/models/RepoUtils.ts:604](https://github.com/rapidrest/service-c
|
|
|
435
435
|
|
|
436
436
|
> **update**(`obj`, `existing`, `options?`): `Promise`\<`T`\>
|
|
437
437
|
|
|
438
|
-
Defined in: [src/models/RepoUtils.ts:673](https://github.com/rapidrest/service-core/blob/
|
|
438
|
+
Defined in: [src/models/RepoUtils.ts:673](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L673)
|
|
439
439
|
|
|
440
440
|
#### Parameters
|
|
441
441
|
|
|
@@ -461,7 +461,7 @@ Defined in: [src/models/RepoUtils.ts:673](https://github.com/rapidrest/service-c
|
|
|
461
461
|
|
|
462
462
|
> **validate**(`objs`, `options?`): `Promise`\<`void`\>
|
|
463
463
|
|
|
464
|
-
Defined in: [src/models/RepoUtils.ts:840](https://github.com/rapidrest/service-core/blob/
|
|
464
|
+
Defined in: [src/models/RepoUtils.ts:840](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/RepoUtils.ts#L840)
|
|
465
465
|
|
|
466
466
|
Performs validation on the object(s) provided. This function first calls `ObjectUtils.validate()` to check
|
|
467
467
|
any class level defined validation functions. Second, it scans for any properties with the `@Reference`
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: RouteUtils
|
|
8
8
|
|
|
9
|
-
Defined in: [src/routes/RouteUtils.ts:22](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/routes/RouteUtils.ts:22](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/routes/RouteUtils.ts#L22)
|
|
10
10
|
|
|
11
11
|
Provides a set of utilities for converting Route classes to HTTP middleware.
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
|
30
30
|
|
|
31
31
|
> **checkRequiredPerms**(`aclUid`): [`RequestHandler`](../type-aliases/RequestHandler.md)
|
|
32
32
|
|
|
33
|
-
Defined in: [src/routes/RouteUtils.ts:39](https://github.com/rapidrest/service-core/blob/
|
|
33
|
+
Defined in: [src/routes/RouteUtils.ts:39](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/routes/RouteUtils.ts#L39)
|
|
34
34
|
|
|
35
35
|
Creates a middleware function that verifies the incoming request is from a valid user with at least
|
|
36
36
|
one of the specified roles.
|
|
@@ -51,7 +51,7 @@ one of the specified roles.
|
|
|
51
51
|
|
|
52
52
|
> **checkRequiredRoles**(`requiredRoles`): [`RequestHandler`](../type-aliases/RequestHandler.md)
|
|
53
53
|
|
|
54
|
-
Defined in: [src/routes/RouteUtils.ts:62](https://github.com/rapidrest/service-core/blob/
|
|
54
|
+
Defined in: [src/routes/RouteUtils.ts:62](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/routes/RouteUtils.ts#L62)
|
|
55
55
|
|
|
56
56
|
Creates a middleware function that verifies the incoming request is from a valid user with at least
|
|
57
57
|
one of the specified roles.
|
|
@@ -74,7 +74,7 @@ The list of roles that the authenticated user must have.
|
|
|
74
74
|
|
|
75
75
|
> **getFuncArray**(`route`, `funcs`, `send?`): [`RequestHandler`](../type-aliases/RequestHandler.md)[]
|
|
76
76
|
|
|
77
|
-
Defined in: [src/routes/RouteUtils.ts:87](https://github.com/rapidrest/service-core/blob/
|
|
77
|
+
Defined in: [src/routes/RouteUtils.ts:87](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/routes/RouteUtils.ts#L87)
|
|
78
78
|
|
|
79
79
|
Converts the given array of string or Function objects to functions bound to the given route object.
|
|
80
80
|
|
|
@@ -110,7 +110,7 @@ An array of Function objects mapping to the route object.
|
|
|
110
110
|
|
|
111
111
|
> **getRouteMethods**(`route`): `Map`\<`string`, `any`\>
|
|
112
112
|
|
|
113
|
-
Defined in: [src/routes/RouteUtils.ts:110](https://github.com/rapidrest/service-core/blob/
|
|
113
|
+
Defined in: [src/routes/RouteUtils.ts:110](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/routes/RouteUtils.ts#L110)
|
|
114
114
|
|
|
115
115
|
Searches an route object for any functions that implement a `@Method` decorator.
|
|
116
116
|
|
|
@@ -134,7 +134,7 @@ The list of `@Method` decorated functions that were found.
|
|
|
134
134
|
|
|
135
135
|
> **registerRoute**(`app`, `route`): `Promise`\<`void`\>
|
|
136
136
|
|
|
137
|
-
Defined in: [src/routes/RouteUtils.ts:139](https://github.com/rapidrest/service-core/blob/
|
|
137
|
+
Defined in: [src/routes/RouteUtils.ts:139](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/routes/RouteUtils.ts#L139)
|
|
138
138
|
|
|
139
139
|
Registers the provided route object containing a set of decorated endpoints to the server.
|
|
140
140
|
|
|
@@ -162,7 +162,7 @@ The route object to register.
|
|
|
162
162
|
|
|
163
163
|
> **wrapMiddleware**(`obj`, `func`, `send?`): [`RequestHandler`](../type-aliases/RequestHandler.md)
|
|
164
164
|
|
|
165
|
-
Defined in: [src/routes/RouteUtils.ts:315](https://github.com/rapidrest/service-core/blob/
|
|
165
|
+
Defined in: [src/routes/RouteUtils.ts:315](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/routes/RouteUtils.ts#L315)
|
|
166
166
|
|
|
167
167
|
Wraps the provided function with HTTP handling based on the function's defined decorators.
|
|
168
168
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: Server
|
|
8
8
|
|
|
9
|
-
Defined in: [src/Server.ts:147](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/Server.ts:147](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L147)
|
|
10
10
|
|
|
11
11
|
Provides an HTTP server utilizing uWebSockets.js. The server automatically registers all routes, and
|
|
12
12
|
establishes database connections for all configured data stores. Additionally provides automatic authentication
|
|
@@ -121,7 +121,7 @@ Jean-Philippe Steinmetz
|
|
|
121
121
|
|
|
122
122
|
> **new Server**(`config`, `basePath?`, `logger?`, `objectFactory?`): `Server`
|
|
123
123
|
|
|
124
|
-
Defined in: [src/Server.ts:209](https://github.com/rapidrest/service-core/blob/
|
|
124
|
+
Defined in: [src/Server.ts:209](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L209)
|
|
125
125
|
|
|
126
126
|
Creates a new instance of Server with the specified defaults.
|
|
127
127
|
|
|
@@ -161,7 +161,7 @@ The object factory to use for automatic dependency injection (IOC).
|
|
|
161
161
|
|
|
162
162
|
> `protected` `optional` **apiSpec?**: [`OpenApiSpec`](OpenApiSpec.md)
|
|
163
163
|
|
|
164
|
-
Defined in: [src/Server.ts:149](https://github.com/rapidrest/service-core/blob/
|
|
164
|
+
Defined in: [src/Server.ts:149](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L149)
|
|
165
165
|
|
|
166
166
|
The OpenAPI specification object to use to construct the server with.
|
|
167
167
|
|
|
@@ -171,7 +171,7 @@ The OpenAPI specification object to use to construct the server with.
|
|
|
171
171
|
|
|
172
172
|
> `protected` **app**: [`HttpRouter`](HttpRouter.md)
|
|
173
173
|
|
|
174
|
-
Defined in: [src/Server.ts:151](https://github.com/rapidrest/service-core/blob/
|
|
174
|
+
Defined in: [src/Server.ts:151](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L151)
|
|
175
175
|
|
|
176
176
|
The underlying HTTP router (uWS-backed) that provides HTTP processing services.
|
|
177
177
|
|
|
@@ -181,7 +181,7 @@ The underlying HTTP router (uWS-backed) that provides HTTP processing services.
|
|
|
181
181
|
|
|
182
182
|
> `protected` `readonly` **basePath**: `string`
|
|
183
183
|
|
|
184
|
-
Defined in: [src/Server.ts:153](https://github.com/rapidrest/service-core/blob/
|
|
184
|
+
Defined in: [src/Server.ts:153](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L153)
|
|
185
185
|
|
|
186
186
|
The base file system path that will be searched for models and routes.
|
|
187
187
|
|
|
@@ -191,7 +191,7 @@ The base file system path that will be searched for models and routes.
|
|
|
191
191
|
|
|
192
192
|
> `protected` `readonly` `optional` **config?**: `any`
|
|
193
193
|
|
|
194
|
-
Defined in: [src/Server.ts:155](https://github.com/rapidrest/service-core/blob/
|
|
194
|
+
Defined in: [src/Server.ts:155](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L155)
|
|
195
195
|
|
|
196
196
|
The global object containing configuration information to use.
|
|
197
197
|
|
|
@@ -201,7 +201,7 @@ The global object containing configuration information to use.
|
|
|
201
201
|
|
|
202
202
|
> `protected` `optional` **connectionManager?**: [`ConnectionManager`](ConnectionManager.md)
|
|
203
203
|
|
|
204
|
-
Defined in: [src/Server.ts:157](https://github.com/rapidrest/service-core/blob/
|
|
204
|
+
Defined in: [src/Server.ts:157](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L157)
|
|
205
205
|
|
|
206
206
|
The manager for handling database connections.
|
|
207
207
|
|
|
@@ -211,7 +211,7 @@ The manager for handling database connections.
|
|
|
211
211
|
|
|
212
212
|
> `protected` `optional` **eventListenerManager?**: [`EventListenerManager`](EventListenerManager.md)
|
|
213
213
|
|
|
214
|
-
Defined in: [src/Server.ts:159](https://github.com/rapidrest/service-core/blob/
|
|
214
|
+
Defined in: [src/Server.ts:159](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L159)
|
|
215
215
|
|
|
216
216
|
The manager for handling events.
|
|
217
217
|
|
|
@@ -221,7 +221,7 @@ The manager for handling events.
|
|
|
221
221
|
|
|
222
222
|
> `protected` `readonly` **logger**: `any`
|
|
223
223
|
|
|
224
|
-
Defined in: [src/Server.ts:161](https://github.com/rapidrest/service-core/blob/
|
|
224
|
+
Defined in: [src/Server.ts:161](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L161)
|
|
225
225
|
|
|
226
226
|
The logging utility to use when outputing to console/file.
|
|
227
227
|
|
|
@@ -231,7 +231,7 @@ The logging utility to use when outputing to console/file.
|
|
|
231
231
|
|
|
232
232
|
> `protected` **metricCompletedRequests**: `Counter`\<`string`\>
|
|
233
233
|
|
|
234
|
-
Defined in: [src/Server.ts:188](https://github.com/rapidrest/service-core/blob/
|
|
234
|
+
Defined in: [src/Server.ts:188](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L188)
|
|
235
235
|
|
|
236
236
|
***
|
|
237
237
|
|
|
@@ -239,7 +239,7 @@ Defined in: [src/Server.ts:188](https://github.com/rapidrest/service-core/blob/5
|
|
|
239
239
|
|
|
240
240
|
> `protected` **metricFailedRequests**: `Counter`\<`string`\>
|
|
241
241
|
|
|
242
|
-
Defined in: [src/Server.ts:192](https://github.com/rapidrest/service-core/blob/
|
|
242
|
+
Defined in: [src/Server.ts:192](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L192)
|
|
243
243
|
|
|
244
244
|
***
|
|
245
245
|
|
|
@@ -247,7 +247,7 @@ Defined in: [src/Server.ts:192](https://github.com/rapidrest/service-core/blob/5
|
|
|
247
247
|
|
|
248
248
|
> `protected` **metricRequestPath**: `Counter`\<`string`\>
|
|
249
249
|
|
|
250
|
-
Defined in: [src/Server.ts:172](https://github.com/rapidrest/service-core/blob/
|
|
250
|
+
Defined in: [src/Server.ts:172](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L172)
|
|
251
251
|
|
|
252
252
|
***
|
|
253
253
|
|
|
@@ -255,7 +255,7 @@ Defined in: [src/Server.ts:172](https://github.com/rapidrest/service-core/blob/5
|
|
|
255
255
|
|
|
256
256
|
> `protected` **metricRequestStatus**: `Counter`\<`string`\>
|
|
257
257
|
|
|
258
|
-
Defined in: [src/Server.ts:177](https://github.com/rapidrest/service-core/blob/
|
|
258
|
+
Defined in: [src/Server.ts:177](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L177)
|
|
259
259
|
|
|
260
260
|
***
|
|
261
261
|
|
|
@@ -263,7 +263,7 @@ Defined in: [src/Server.ts:177](https://github.com/rapidrest/service-core/blob/5
|
|
|
263
263
|
|
|
264
264
|
> `protected` **metricRequestTime**: `Histogram`\<`string`\>
|
|
265
265
|
|
|
266
|
-
Defined in: [src/Server.ts:182](https://github.com/rapidrest/service-core/blob/
|
|
266
|
+
Defined in: [src/Server.ts:182](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L182)
|
|
267
267
|
|
|
268
268
|
***
|
|
269
269
|
|
|
@@ -271,7 +271,7 @@ Defined in: [src/Server.ts:182](https://github.com/rapidrest/service-core/blob/5
|
|
|
271
271
|
|
|
272
272
|
> `protected` **metricTotalRequests**: `Counter`\<`string`\>
|
|
273
273
|
|
|
274
|
-
Defined in: [src/Server.ts:196](https://github.com/rapidrest/service-core/blob/
|
|
274
|
+
Defined in: [src/Server.ts:196](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L196)
|
|
275
275
|
|
|
276
276
|
***
|
|
277
277
|
|
|
@@ -279,7 +279,7 @@ Defined in: [src/Server.ts:196](https://github.com/rapidrest/service-core/blob/5
|
|
|
279
279
|
|
|
280
280
|
> `protected` `readonly` **objectFactory**: [`ObjectFactory`](ObjectFactory.md)
|
|
281
281
|
|
|
282
|
-
Defined in: [src/Server.ts:163](https://github.com/rapidrest/service-core/blob/
|
|
282
|
+
Defined in: [src/Server.ts:163](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L163)
|
|
283
283
|
|
|
284
284
|
The object factory to use when injecting dependencies.
|
|
285
285
|
|
|
@@ -289,7 +289,7 @@ The object factory to use when injecting dependencies.
|
|
|
289
289
|
|
|
290
290
|
> `readonly` **port**: `number`
|
|
291
291
|
|
|
292
|
-
Defined in: [src/Server.ts:165](https://github.com/rapidrest/service-core/blob/
|
|
292
|
+
Defined in: [src/Server.ts:165](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L165)
|
|
293
293
|
|
|
294
294
|
The port that the server is listening on.
|
|
295
295
|
|
|
@@ -299,7 +299,7 @@ The port that the server is listening on.
|
|
|
299
299
|
|
|
300
300
|
> `protected` `optional` **routeUtils?**: [`RouteUtils`](RouteUtils.md)
|
|
301
301
|
|
|
302
|
-
Defined in: [src/Server.ts:166](https://github.com/rapidrest/service-core/blob/
|
|
302
|
+
Defined in: [src/Server.ts:166](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L166)
|
|
303
303
|
|
|
304
304
|
***
|
|
305
305
|
|
|
@@ -307,7 +307,7 @@ Defined in: [src/Server.ts:166](https://github.com/rapidrest/service-core/blob/5
|
|
|
307
307
|
|
|
308
308
|
> `protected` `optional` **serviceManager?**: [`BackgroundServiceManager`](BackgroundServiceManager.md)
|
|
309
309
|
|
|
310
|
-
Defined in: [src/Server.ts:167](https://github.com/rapidrest/service-core/blob/
|
|
310
|
+
Defined in: [src/Server.ts:167](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L167)
|
|
311
311
|
|
|
312
312
|
## Methods
|
|
313
313
|
|
|
@@ -315,7 +315,7 @@ Defined in: [src/Server.ts:167](https://github.com/rapidrest/service-core/blob/5
|
|
|
315
315
|
|
|
316
316
|
> **getApplication**(): [`HttpRouter`](HttpRouter.md)
|
|
317
317
|
|
|
318
|
-
Defined in: [src/Server.ts:220](https://github.com/rapidrest/service-core/blob/
|
|
318
|
+
Defined in: [src/Server.ts:220](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L220)
|
|
319
319
|
|
|
320
320
|
Returns the HTTP router instance.
|
|
321
321
|
|
|
@@ -329,7 +329,7 @@ Returns the HTTP router instance.
|
|
|
329
329
|
|
|
330
330
|
> **isRunning**(): `boolean`
|
|
331
331
|
|
|
332
|
-
Defined in: [src/Server.ts:227](https://github.com/rapidrest/service-core/blob/
|
|
332
|
+
Defined in: [src/Server.ts:227](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L227)
|
|
333
333
|
|
|
334
334
|
Returns `true` if the server is running, otherwise `false`.
|
|
335
335
|
|
|
@@ -343,7 +343,7 @@ Returns `true` if the server is running, otherwise `false`.
|
|
|
343
343
|
|
|
344
344
|
> `protected` **postStart**(): `void` \| `Promise`\<`void`\>
|
|
345
345
|
|
|
346
|
-
Defined in: [src/Server.ts:241](https://github.com/rapidrest/service-core/blob/
|
|
346
|
+
Defined in: [src/Server.ts:241](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L241)
|
|
347
347
|
|
|
348
348
|
Override this function to add custom behavior after the server is started.
|
|
349
349
|
|
|
@@ -357,7 +357,7 @@ Override this function to add custom behavior after the server is started.
|
|
|
357
357
|
|
|
358
358
|
> `protected` **preStart**(): `void` \| `Promise`\<`void`\>
|
|
359
359
|
|
|
360
|
-
Defined in: [src/Server.ts:234](https://github.com/rapidrest/service-core/blob/
|
|
360
|
+
Defined in: [src/Server.ts:234](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L234)
|
|
361
361
|
|
|
362
362
|
Override this function to add custom behavior before the server is started.
|
|
363
363
|
|
|
@@ -371,7 +371,7 @@ Override this function to add custom behavior before the server is started.
|
|
|
371
371
|
|
|
372
372
|
> **restart**(): `Promise`\<`void`\>
|
|
373
373
|
|
|
374
|
-
Defined in: [src/Server.ts:622](https://github.com/rapidrest/service-core/blob/
|
|
374
|
+
Defined in: [src/Server.ts:622](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L622)
|
|
375
375
|
|
|
376
376
|
Restarts the HTTP listen server using the provided configuration and OpenAPI specification.
|
|
377
377
|
|
|
@@ -385,7 +385,7 @@ Restarts the HTTP listen server using the provided configuration and OpenAPI spe
|
|
|
385
385
|
|
|
386
386
|
> **start**(): `Promise`\<`void`\>
|
|
387
387
|
|
|
388
|
-
Defined in: [src/Server.ts:248](https://github.com/rapidrest/service-core/blob/
|
|
388
|
+
Defined in: [src/Server.ts:248](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L248)
|
|
389
389
|
|
|
390
390
|
Starts an HTTP listen server based on the provided configuration and OpenAPI specification.
|
|
391
391
|
|
|
@@ -399,7 +399,7 @@ Starts an HTTP listen server based on the provided configuration and OpenAPI spe
|
|
|
399
399
|
|
|
400
400
|
> **stop**(): `Promise`\<`void`\>
|
|
401
401
|
|
|
402
|
-
Defined in: [src/Server.ts:594](https://github.com/rapidrest/service-core/blob/
|
|
402
|
+
Defined in: [src/Server.ts:594](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/Server.ts#L594)
|
|
403
403
|
|
|
404
404
|
Stops the HTTP listen server.
|
|
405
405
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Abstract Class: SimpleEntity
|
|
8
8
|
|
|
9
|
-
Defined in: [src/models/SimpleEntity.ts:15](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/models/SimpleEntity.ts:15](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/SimpleEntity.ts#L15)
|
|
10
10
|
|
|
11
11
|
Provides a simple base class for all entity's that will be persisted with TypeORM. Unlike `BaseEntity` this class
|
|
12
12
|
does not provide optimistic locking or date created and modified tracking.
|
|
@@ -25,7 +25,7 @@ Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
|
25
25
|
|
|
26
26
|
> **new SimpleEntity**(`other?`): `SimpleEntity`
|
|
27
27
|
|
|
28
|
-
Defined in: [src/models/SimpleEntity.ts:26](https://github.com/rapidrest/service-core/blob/
|
|
28
|
+
Defined in: [src/models/SimpleEntity.ts:26](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/SimpleEntity.ts#L26)
|
|
29
29
|
|
|
30
30
|
#### Parameters
|
|
31
31
|
|
|
@@ -43,6 +43,6 @@ Defined in: [src/models/SimpleEntity.ts:26](https://github.com/rapidrest/service
|
|
|
43
43
|
|
|
44
44
|
> **uid**: `string`
|
|
45
45
|
|
|
46
|
-
Defined in: [src/models/SimpleEntity.ts:24](https://github.com/rapidrest/service-core/blob/
|
|
46
|
+
Defined in: [src/models/SimpleEntity.ts:24](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/SimpleEntity.ts#L24)
|
|
47
47
|
|
|
48
48
|
The universally unique identifier of the entity.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Abstract Class: SimpleMongoEntity
|
|
8
8
|
|
|
9
|
-
Defined in: [src/models/SimpleMongoEntity.ts:14](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/models/SimpleMongoEntity.ts:14](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/SimpleMongoEntity.ts#L14)
|
|
10
10
|
|
|
11
11
|
Provides a simple base class for all entity's that will be persisted in a MongoDB database. Unlike
|
|
12
12
|
`BaseMongoEntity` this class does not provide optimistic locking or date created and modified tracking.
|
|
@@ -25,7 +25,7 @@ Jean-Philippe Steinmetz <rapidrests@gmail.com>
|
|
|
25
25
|
|
|
26
26
|
> **new SimpleMongoEntity**(`other?`): `SimpleMongoEntity`
|
|
27
27
|
|
|
28
|
-
Defined in: [src/models/SimpleMongoEntity.ts:21](https://github.com/rapidrest/service-core/blob/
|
|
28
|
+
Defined in: [src/models/SimpleMongoEntity.ts:21](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/SimpleMongoEntity.ts#L21)
|
|
29
29
|
|
|
30
30
|
#### Parameters
|
|
31
31
|
|
|
@@ -47,7 +47,7 @@ Defined in: [src/models/SimpleMongoEntity.ts:21](https://github.com/rapidrest/se
|
|
|
47
47
|
|
|
48
48
|
> `optional` **\_id?**: `ObjectId`
|
|
49
49
|
|
|
50
|
-
Defined in: [src/models/SimpleMongoEntity.ts:19](https://github.com/rapidrest/service-core/blob/
|
|
50
|
+
Defined in: [src/models/SimpleMongoEntity.ts:19](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/SimpleMongoEntity.ts#L19)
|
|
51
51
|
|
|
52
52
|
The internal unique identifier used by MongoDB.
|
|
53
53
|
|
|
@@ -57,7 +57,7 @@ The internal unique identifier used by MongoDB.
|
|
|
57
57
|
|
|
58
58
|
> **uid**: `string`
|
|
59
59
|
|
|
60
|
-
Defined in: [src/models/SimpleEntity.ts:24](https://github.com/rapidrest/service-core/blob/
|
|
60
|
+
Defined in: [src/models/SimpleEntity.ts:24](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/SimpleEntity.ts#L24)
|
|
61
61
|
|
|
62
62
|
The universally unique identifier of the entity.
|
|
63
63
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: StatusExtraData
|
|
8
8
|
|
|
9
|
-
Defined in: [src/models/StatusExtraData.ts:1](https://github.com/rapidrest/service-core/blob/
|
|
9
|
+
Defined in: [src/models/StatusExtraData.ts:1](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/StatusExtraData.ts#L1)
|
|
10
10
|
|
|
11
11
|
## Constructors
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Defined in: [src/models/StatusExtraData.ts:1](https://github.com/rapidrest/servi
|
|
|
14
14
|
|
|
15
15
|
> **new StatusExtraData**(`other`): `StatusExtraData`
|
|
16
16
|
|
|
17
|
-
Defined in: [src/models/StatusExtraData.ts:9](https://github.com/rapidrest/service-core/blob/
|
|
17
|
+
Defined in: [src/models/StatusExtraData.ts:9](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/StatusExtraData.ts#L9)
|
|
18
18
|
|
|
19
19
|
#### Parameters
|
|
20
20
|
|
|
@@ -34,7 +34,7 @@ Defined in: [src/models/StatusExtraData.ts:9](https://github.com/rapidrest/servi
|
|
|
34
34
|
|
|
35
35
|
> **get** **data**(): `any`
|
|
36
36
|
|
|
37
|
-
Defined in: [src/models/StatusExtraData.ts:3](https://github.com/rapidrest/service-core/blob/
|
|
37
|
+
Defined in: [src/models/StatusExtraData.ts:3](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/StatusExtraData.ts#L3)
|
|
38
38
|
|
|
39
39
|
##### Returns
|
|
40
40
|
|
|
@@ -44,7 +44,7 @@ Defined in: [src/models/StatusExtraData.ts:3](https://github.com/rapidrest/servi
|
|
|
44
44
|
|
|
45
45
|
> **set** **data**(`data`): `void`
|
|
46
46
|
|
|
47
|
-
Defined in: [src/models/StatusExtraData.ts:6](https://github.com/rapidrest/service-core/blob/
|
|
47
|
+
Defined in: [src/models/StatusExtraData.ts:6](https://github.com/rapidrest/service-core/blob/ab54834688bebfbea1d8258c626822205861b919/src/models/StatusExtraData.ts#L6)
|
|
48
48
|
|
|
49
49
|
##### Parameters
|
|
50
50
|
|