@rapidrest/service-core 1.0.0-rc.2 → 1.0.0-rc.21
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/BackgroundService.js +0 -4
- package/dist/lib/BackgroundService.js.map +1 -1
- package/dist/lib/BackgroundServiceManager.js +21 -4
- package/dist/lib/BackgroundServiceManager.js.map +1 -1
- package/dist/lib/EventListenerManager.js.map +1 -1
- package/dist/lib/OpenApiSpec.js +3 -2
- package/dist/lib/OpenApiSpec.js.map +1 -1
- package/dist/lib/Server.js +18 -79
- package/dist/lib/Server.js.map +1 -1
- package/dist/lib/database/TypeOrmSupport.js +18 -2
- package/dist/lib/database/TypeOrmSupport.js.map +1 -1
- package/dist/lib/decorators/DocDecorators.js +19 -1
- package/dist/lib/decorators/DocDecorators.js.map +1 -1
- package/dist/lib/decorators/PersistenceDecorators.js.map +1 -1
- package/dist/lib/decorators/RouteDecorators.js +71 -20
- package/dist/lib/decorators/RouteDecorators.js.map +1 -1
- package/dist/lib/http/Adapters.js +45 -2
- package/dist/lib/http/Adapters.js.map +1 -1
- package/dist/lib/http/Router.js +53 -56
- package/dist/lib/http/Router.js.map +1 -1
- package/dist/lib/models/ModelUtils.js +18 -8
- package/dist/lib/models/ModelUtils.js.map +1 -1
- package/dist/lib/models/RepoUtils.js +96 -31
- package/dist/lib/models/RepoUtils.js.map +1 -1
- package/dist/lib/routes/{AdminRoute.js → BaseAdminRoute.js} +51 -36
- package/dist/lib/routes/BaseAdminRoute.js.map +1 -0
- package/dist/lib/routes/{MetricsRoute.js → BaseMetricsRoute.js} +28 -15
- package/dist/lib/routes/BaseMetricsRoute.js.map +1 -0
- package/dist/lib/routes/{OpenAPIRoute.js → BaseOpenAPIRoute.js} +31 -32
- package/dist/lib/routes/BaseOpenAPIRoute.js.map +1 -0
- package/dist/lib/routes/BasePushRoute.js +193 -0
- package/dist/lib/routes/BasePushRoute.js.map +1 -0
- package/dist/lib/routes/BaseStaticRoute.js +152 -0
- package/dist/lib/routes/BaseStaticRoute.js.map +1 -0
- package/dist/lib/routes/BaseStatusRoute.js +79 -0
- package/dist/lib/routes/BaseStatusRoute.js.map +1 -0
- package/dist/lib/routes/CRUDRoute.js +238 -0
- package/dist/lib/routes/CRUDRoute.js.map +1 -0
- package/dist/lib/routes/ModelRoute.js +20 -28
- package/dist/lib/routes/ModelRoute.js.map +1 -1
- package/dist/lib/routes/index.js +7 -4
- package/dist/lib/routes/index.js.map +1 -1
- package/dist/lib/security/ACLUtils.js +10 -13
- package/dist/lib/security/ACLUtils.js.map +1 -1
- package/dist/lib/security/AccessControlListMongo.js +5 -1
- package/dist/lib/security/AccessControlListMongo.js.map +1 -1
- package/dist/lib/security/AccessControlListSQL.js +7 -3
- package/dist/lib/security/AccessControlListSQL.js.map +1 -1
- package/dist/lib/security/BaseACLRoute.js +239 -0
- package/dist/lib/security/BaseACLRoute.js.map +1 -0
- package/dist/lib/security/index.js +3 -0
- package/dist/lib/security/index.js.map +1 -1
- package/dist/lib/test/request.js +6 -2
- package/dist/lib/test/request.js.map +1 -1
- package/dist/types/BackgroundService.d.ts +0 -5
- package/dist/types/BackgroundServiceManager.d.ts +1 -1
- package/dist/types/EventListenerManager.d.ts +4 -4
- package/dist/types/Server.d.ts +21 -6
- package/dist/types/decorators/DocDecorators.d.ts +9 -0
- package/dist/types/decorators/PersistenceDecorators.d.ts +7 -0
- package/dist/types/decorators/RouteDecorators.d.ts +14 -5
- package/dist/types/http/Adapters.d.ts +19 -0
- package/dist/types/http/Router.d.ts +6 -6
- package/dist/types/models/ModelUtils.d.ts +2 -1
- package/dist/types/routes/BaseAdminRoute.d.ts +59 -0
- package/dist/types/routes/BaseMetricsRoute.d.ts +37 -0
- package/dist/types/routes/BaseOpenAPIRoute.d.ts +33 -0
- package/dist/types/routes/BasePushRoute.d.ts +39 -0
- package/dist/types/routes/BaseStaticRoute.d.ts +44 -0
- package/dist/types/routes/BaseStatusRoute.d.ts +37 -0
- package/dist/types/routes/CRUDRoute.d.ts +47 -0
- package/dist/types/routes/ModelRoute.d.ts +23 -16
- package/dist/types/routes/index.d.ts +7 -4
- package/dist/types/security/ACLUtils.d.ts +1 -1
- package/dist/types/security/AccessControlList.d.ts +1 -1
- package/dist/types/security/AccessControlListMongo.d.ts +1 -1
- package/dist/types/security/AccessControlListSQL.d.ts +1 -1
- package/dist/types/security/BaseACLRoute.d.ts +73 -0
- package/dist/types/security/index.d.ts +3 -0
- package/package.json +132 -129
- package/tsconfig.export.json +17 -0
- package/dist/lib/routes/AdminRoute.js.map +0 -1
- package/dist/lib/routes/MetricsRoute.js.map +0 -1
- package/dist/lib/routes/OpenAPIRoute.js.map +0 -1
- package/dist/lib/routes/StatusRoute.js +0 -55
- package/dist/lib/routes/StatusRoute.js.map +0 -1
- package/dist/lib/security/ACLRouteMongo.js +0 -194
- package/dist/lib/security/ACLRouteMongo.js.map +0 -1
- package/dist/lib/security/ACLRouteSQL.js +0 -193
- package/dist/lib/security/ACLRouteSQL.js.map +0 -1
- package/dist/types/routes/AdminRoute.d.ts +0 -47
- package/dist/types/routes/MetricsRoute.d.ts +0 -15
- package/dist/types/routes/OpenAPIRoute.d.ts +0 -17
- package/dist/types/routes/StatusRoute.d.ts +0 -11
- package/dist/types/security/ACLRouteMongo.d.ts +0 -19
- package/dist/types/security/ACLRouteSQL.d.ts +0 -19
- package/docs/Makefile +0 -20
- package/docs/conf.py +0 -58
- package/docs/index.rst +0 -17
- package/docs/make.bat +0 -35
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/README.md +0 -13
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/MongoRepository.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/RedisConnection.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DatabaseDecorators/functions/Repository.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/README.md +0 -23
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Default.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Description.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Document.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Example.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Format.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Returns.md +0 -28
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Summary.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/Tags.md +0 -25
- package/docs/reference/@rapidrest/namespaces/DocDecorators/functions/TypeInfo.md +0 -28
- package/docs/reference/@rapidrest/namespaces/DocDecorators/interfaces/DocumentsData.md +0 -57
- package/docs/reference/@rapidrest/namespaces/EventDecorators/README.md +0 -12
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/EventListener.md +0 -17
- package/docs/reference/@rapidrest/namespaces/EventDecorators/functions/OnEvent.md +0 -26
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/README.md +0 -26
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Cache.md +0 -25
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/ChildEntity.md +0 -18
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/DataStore.md +0 -25
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Identifier.md +0 -27
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Protect.md +0 -35
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Reference.md +0 -25
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/Shard.md +0 -27
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/functions/TrackChanges.md +0 -26
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/interfaces/PendingTypeOrmColumn.md +0 -45
- package/docs/reference/@rapidrest/namespaces/ModelDecorators/variables/pendingTypeOrmColumns.md +0 -14
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/README.md +0 -27
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Column.md +0 -25
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Entity.md +0 -25
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Index.md +0 -119
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/PrimaryColumn.md +0 -25
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/Unique.md +0 -68
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getColumnMetadata.md +0 -26
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getEntityName.md +0 -26
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/functions/getIndexMetadata.md +0 -27
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/CollationOptions.md +0 -79
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnInfo.md +0 -41
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/ColumnOptions.md +0 -51
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/EntityOptions.md +0 -32
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexInfo.md +0 -41
- package/docs/reference/@rapidrest/namespaces/PersistenceDecorators/interfaces/IndexOptions.md +0 -61
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/README.md +0 -36
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/After.md +0 -26
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Auth.md +0 -33
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/AuthResult.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Before.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/ContentType.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Delete.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Get.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Head.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Header.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Method.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Model.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Options.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Param.md +0 -26
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Patch.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Post.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Protect.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Put.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Query.md +0 -26
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Request.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/RequiresRole.md +0 -26
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Response.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Route.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Socket.md +0 -33
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/User.md +0 -31
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/Validate.md +0 -25
- package/docs/reference/@rapidrest/namespaces/RouteDecorators/functions/WebSocket.md +0 -25
- package/docs/reference/README.md +0 -20
- package/docs/reference/classes/ACLUtils.md +0 -263
- package/docs/reference/classes/AdminRoute.md +0 -51
- package/docs/reference/classes/AuthMiddleware.md +0 -173
- package/docs/reference/classes/BackgroundService.md +0 -117
- package/docs/reference/classes/BackgroundServiceManager.md +0 -172
- package/docs/reference/classes/BaseEntity.md +0 -82
- package/docs/reference/classes/BaseMongoEntity.md +0 -107
- package/docs/reference/classes/BasicStrategy.md +0 -131
- package/docs/reference/classes/BasicStrategyOptions.md +0 -115
- package/docs/reference/classes/BulkError.md +0 -271
- package/docs/reference/classes/ConnectionManager.md +0 -75
- package/docs/reference/classes/EventListenerManager.md +0 -88
- package/docs/reference/classes/HttpRouter.md +0 -343
- package/docs/reference/classes/JWTStrategy.md +0 -100
- package/docs/reference/classes/JWTStrategyOptions.md +0 -97
- package/docs/reference/classes/MetricsRoute.md +0 -27
- package/docs/reference/classes/ModelRoute.md +0 -527
- package/docs/reference/classes/ModelUtils.md +0 -430
- package/docs/reference/classes/MongoConnection.md +0 -218
- package/docs/reference/classes/MongoRepository.md +0 -390
- package/docs/reference/classes/MongoSchemaSync.md +0 -97
- package/docs/reference/classes/NetUtils.md +0 -90
- package/docs/reference/classes/NotificationUtils.md +0 -77
- package/docs/reference/classes/ObjectFactory.md +0 -336
- package/docs/reference/classes/OpenAPIRoute.md +0 -77
- package/docs/reference/classes/OpenApiSpec.md +0 -892
- package/docs/reference/classes/RecoverableBaseEntity.md +0 -114
- package/docs/reference/classes/RecoverableBaseMongoEntity.md +0 -124
- package/docs/reference/classes/RedisTransport.md +0 -2202
- package/docs/reference/classes/RepoUtils.md +0 -482
- package/docs/reference/classes/RouteUtils.md +0 -191
- package/docs/reference/classes/Server.md +0 -408
- package/docs/reference/classes/SimpleEntity.md +0 -48
- package/docs/reference/classes/SimpleMongoEntity.md +0 -66
- package/docs/reference/classes/StatusExtraData.md +0 -57
- package/docs/reference/classes/StatusRoute.md +0 -26
- package/docs/reference/classes/UWSRequest.md +0 -226
- package/docs/reference/classes/UWSResponse.md +0 -257
- package/docs/reference/classes/UWSWebSocketShim.md +0 -958
- package/docs/reference/enumerations/ACLAction.md +0 -63
- package/docs/reference/enumerations/ApiErrorMessages.md +0 -123
- package/docs/reference/enumerations/ApiErrors.md +0 -123
- package/docs/reference/functions/createWebSocketStream.md +0 -27
- package/docs/reference/functions/isSqlDataSource.md +0 -26
- package/docs/reference/functions/readBody.md +0 -29
- package/docs/reference/functions/resolveCollectionName.md +0 -33
- package/docs/reference/functions/runChain.md +0 -40
- package/docs/reference/functions/snakeCase.md +0 -28
- package/docs/reference/globals.md +0 -106
- package/docs/reference/interfaces/ACLRecord.md +0 -96
- package/docs/reference/interfaces/AccessControlList.md +0 -76
- package/docs/reference/interfaces/AuthResult.md +0 -55
- package/docs/reference/interfaces/AuthStrategy.md +0 -95
- package/docs/reference/interfaces/CreateRequestOptions.md +0 -121
- package/docs/reference/interfaces/DeleteRequestOptions.md +0 -137
- package/docs/reference/interfaces/FindRequestOptions.md +0 -133
- package/docs/reference/interfaces/HttpRequest.md +0 -147
- package/docs/reference/interfaces/HttpResponse.md +0 -164
- package/docs/reference/interfaces/JWTAuthResult.md +0 -84
- package/docs/reference/interfaces/RepoCreateOptions.md +0 -95
- package/docs/reference/interfaces/RepoDeleteOptions.md +0 -105
- package/docs/reference/interfaces/RepoFindOptions.md +0 -125
- package/docs/reference/interfaces/RepoOperationOptions.md +0 -69
- package/docs/reference/interfaces/RepoUpdateOptions.md +0 -101
- package/docs/reference/interfaces/RequestOptions.md +0 -112
- package/docs/reference/interfaces/RequestWS.md +0 -225
- package/docs/reference/interfaces/TruncateRequestOptions.md +0 -161
- package/docs/reference/interfaces/UpdateRequestOptions.md +0 -139
- package/docs/reference/type-aliases/ErrorHandler.md +0 -35
- package/docs/reference/type-aliases/NextFunction.md +0 -23
- package/docs/reference/type-aliases/OneOrMany.md +0 -19
- package/docs/reference/type-aliases/OneOrNull.md +0 -19
- package/docs/reference/type-aliases/PartialBaseEntity.md +0 -17
- package/docs/reference/type-aliases/PartialSimpleEntity.md +0 -17
- package/docs/reference/type-aliases/RequestHandler.md +0 -31
- package/docs/reference/type-aliases/UpdateObject.md +0 -19
- package/docs/reference/type-aliases/WsUpgradeAuth.md +0 -27
- package/docs/reference/type-aliases/WsUpgradeAuthResult.md +0 -47
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
[**@rapidrest/service-core**](../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@rapidrest/service-core](../globals.md) / ObjectFactory
|
|
6
|
-
|
|
7
|
-
# Class: ObjectFactory
|
|
8
|
-
|
|
9
|
-
Defined in: [src/ObjectFactory.ts:21](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ObjectFactory.ts#L21)
|
|
10
|
-
|
|
11
|
-
The `ObjectFactory` is a manager for creating objects based on registered
|
|
12
|
-
class types. This allows for the tracking of multiple instances of objects
|
|
13
|
-
so that references can be referenced by unique name.
|
|
14
|
-
|
|
15
|
-
## Author
|
|
16
|
-
|
|
17
|
-
Jean-Philippe Steinmetz
|
|
18
|
-
|
|
19
|
-
## Extends
|
|
20
|
-
|
|
21
|
-
- `ObjectFactory`
|
|
22
|
-
|
|
23
|
-
## Constructors
|
|
24
|
-
|
|
25
|
-
### Constructor
|
|
26
|
-
|
|
27
|
-
> **new ObjectFactory**(`config?`, `logger?`): `ObjectFactory`
|
|
28
|
-
|
|
29
|
-
Defined in: [src/ObjectFactory.ts:22](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ObjectFactory.ts#L22)
|
|
30
|
-
|
|
31
|
-
#### Parameters
|
|
32
|
-
|
|
33
|
-
##### config?
|
|
34
|
-
|
|
35
|
-
`any`
|
|
36
|
-
|
|
37
|
-
##### logger?
|
|
38
|
-
|
|
39
|
-
`any`
|
|
40
|
-
|
|
41
|
-
#### Returns
|
|
42
|
-
|
|
43
|
-
`ObjectFactory`
|
|
44
|
-
|
|
45
|
-
#### Overrides
|
|
46
|
-
|
|
47
|
-
`CoreObjectFactory.constructor`
|
|
48
|
-
|
|
49
|
-
## Properties
|
|
50
|
-
|
|
51
|
-
### classes
|
|
52
|
-
|
|
53
|
-
> `readonly` **classes**: `Map`\<`string`, `any`\>
|
|
54
|
-
|
|
55
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:22
|
|
56
|
-
|
|
57
|
-
A map for string fully qualified class names to their class types.
|
|
58
|
-
|
|
59
|
-
#### Inherited from
|
|
60
|
-
|
|
61
|
-
`CoreObjectFactory.classes`
|
|
62
|
-
|
|
63
|
-
***
|
|
64
|
-
|
|
65
|
-
### config
|
|
66
|
-
|
|
67
|
-
> `protected` **config**: `any`
|
|
68
|
-
|
|
69
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:24
|
|
70
|
-
|
|
71
|
-
The global application configuration object.
|
|
72
|
-
|
|
73
|
-
#### Inherited from
|
|
74
|
-
|
|
75
|
-
`CoreObjectFactory.config`
|
|
76
|
-
|
|
77
|
-
***
|
|
78
|
-
|
|
79
|
-
### instances
|
|
80
|
-
|
|
81
|
-
> `readonly` **instances**: `Map`\<`string`, `any`\>
|
|
82
|
-
|
|
83
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:26
|
|
84
|
-
|
|
85
|
-
A map for the unique name to the intance of a particular class type.
|
|
86
|
-
|
|
87
|
-
#### Inherited from
|
|
88
|
-
|
|
89
|
-
`CoreObjectFactory.instances`
|
|
90
|
-
|
|
91
|
-
***
|
|
92
|
-
|
|
93
|
-
### logger
|
|
94
|
-
|
|
95
|
-
> `protected` **logger**: `any`
|
|
96
|
-
|
|
97
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:28
|
|
98
|
-
|
|
99
|
-
The application logging utility.
|
|
100
|
-
|
|
101
|
-
#### Inherited from
|
|
102
|
-
|
|
103
|
-
`CoreObjectFactory.logger`
|
|
104
|
-
|
|
105
|
-
## Methods
|
|
106
|
-
|
|
107
|
-
### clear()
|
|
108
|
-
|
|
109
|
-
> **clear**(): `void`
|
|
110
|
-
|
|
111
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:43
|
|
112
|
-
|
|
113
|
-
Deletes all instantiated objects.
|
|
114
|
-
|
|
115
|
-
#### Returns
|
|
116
|
-
|
|
117
|
-
`void`
|
|
118
|
-
|
|
119
|
-
#### Inherited from
|
|
120
|
-
|
|
121
|
-
`CoreObjectFactory.clear`
|
|
122
|
-
|
|
123
|
-
***
|
|
124
|
-
|
|
125
|
-
### clearAll()
|
|
126
|
-
|
|
127
|
-
> **clearAll**(): `void`
|
|
128
|
-
|
|
129
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:47
|
|
130
|
-
|
|
131
|
-
Deletes all instantiated objects and registered class types.
|
|
132
|
-
|
|
133
|
-
#### Returns
|
|
134
|
-
|
|
135
|
-
`void`
|
|
136
|
-
|
|
137
|
-
#### Inherited from
|
|
138
|
-
|
|
139
|
-
`CoreObjectFactory.clearAll`
|
|
140
|
-
|
|
141
|
-
***
|
|
142
|
-
|
|
143
|
-
### destroy()
|
|
144
|
-
|
|
145
|
-
> **destroy**(`objs?`): `Promise`\<`void`\>
|
|
146
|
-
|
|
147
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:39
|
|
148
|
-
|
|
149
|
-
Destroys the specified objects. If `undefined` is passed in, all objects managed by the factory are destroyed.
|
|
150
|
-
|
|
151
|
-
#### Parameters
|
|
152
|
-
|
|
153
|
-
##### objs?
|
|
154
|
-
|
|
155
|
-
`any`
|
|
156
|
-
|
|
157
|
-
#### Returns
|
|
158
|
-
|
|
159
|
-
`Promise`\<`void`\>
|
|
160
|
-
|
|
161
|
-
#### Inherited from
|
|
162
|
-
|
|
163
|
-
`CoreObjectFactory.destroy`
|
|
164
|
-
|
|
165
|
-
***
|
|
166
|
-
|
|
167
|
-
### getInitMethods()
|
|
168
|
-
|
|
169
|
-
> **getInitMethods**(`obj`): `Function`[]
|
|
170
|
-
|
|
171
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:59
|
|
172
|
-
|
|
173
|
-
Searches an object for one or more functions that implement a `@Init` decorator.
|
|
174
|
-
|
|
175
|
-
#### Parameters
|
|
176
|
-
|
|
177
|
-
##### obj
|
|
178
|
-
|
|
179
|
-
`any`
|
|
180
|
-
|
|
181
|
-
The object to search.
|
|
182
|
-
|
|
183
|
-
#### Returns
|
|
184
|
-
|
|
185
|
-
`Function`[]
|
|
186
|
-
|
|
187
|
-
The list of functions that implements the `@Init` decorator if found, otherwise undefined.
|
|
188
|
-
|
|
189
|
-
#### Inherited from
|
|
190
|
-
|
|
191
|
-
`CoreObjectFactory.getInitMethods`
|
|
192
|
-
|
|
193
|
-
***
|
|
194
|
-
|
|
195
|
-
### getInstance()
|
|
196
|
-
|
|
197
|
-
> **getInstance**\<`T`\>(`nameOrType`): `T` \| `undefined`
|
|
198
|
-
|
|
199
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:67
|
|
200
|
-
|
|
201
|
-
Returns the object instance with the given unique name. Unique names take the form `<ClassName>:<InstanceName>`.
|
|
202
|
-
It is possible to only specifiy the `<ClassName>`, doing so will automatically look for the `<ClassName>:default`
|
|
203
|
-
instance or the first found instance of the given type.
|
|
204
|
-
|
|
205
|
-
#### Type Parameters
|
|
206
|
-
|
|
207
|
-
##### T
|
|
208
|
-
|
|
209
|
-
`T`
|
|
210
|
-
|
|
211
|
-
#### Parameters
|
|
212
|
-
|
|
213
|
-
##### nameOrType
|
|
214
|
-
|
|
215
|
-
`any`
|
|
216
|
-
|
|
217
|
-
The unique name or class type of the object to retrieve.
|
|
218
|
-
|
|
219
|
-
#### Returns
|
|
220
|
-
|
|
221
|
-
`T` \| `undefined`
|
|
222
|
-
|
|
223
|
-
The object instance associated with the given name if found, otherwise `undefined`.
|
|
224
|
-
|
|
225
|
-
#### Inherited from
|
|
226
|
-
|
|
227
|
-
`CoreObjectFactory.getInstance`
|
|
228
|
-
|
|
229
|
-
***
|
|
230
|
-
|
|
231
|
-
### initialize()
|
|
232
|
-
|
|
233
|
-
> **initialize**\<`T`\>(`obj`): `Promise`\<`T`\>
|
|
234
|
-
|
|
235
|
-
Defined in: [src/ObjectFactory.ts:30](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/ObjectFactory.ts#L30)
|
|
236
|
-
|
|
237
|
-
Scans the given object for any properties with the
|
|
238
|
-
|
|
239
|
-
#### Type Parameters
|
|
240
|
-
|
|
241
|
-
##### T
|
|
242
|
-
|
|
243
|
-
`T`
|
|
244
|
-
|
|
245
|
-
#### Parameters
|
|
246
|
-
|
|
247
|
-
##### obj
|
|
248
|
-
|
|
249
|
-
`any`
|
|
250
|
-
|
|
251
|
-
The object to initialize with injected defaults
|
|
252
|
-
|
|
253
|
-
#### Returns
|
|
254
|
-
|
|
255
|
-
`Promise`\<`T`\>
|
|
256
|
-
|
|
257
|
-
#### Inject
|
|
258
|
-
|
|
259
|
-
decorator and assigns the correct values.
|
|
260
|
-
|
|
261
|
-
#### Overrides
|
|
262
|
-
|
|
263
|
-
`CoreObjectFactory.initialize`
|
|
264
|
-
|
|
265
|
-
***
|
|
266
|
-
|
|
267
|
-
### newInstance()
|
|
268
|
-
|
|
269
|
-
> **newInstance**\<`T`\>(`type`, `options?`): `T` \| `Promise`\<`T`\>
|
|
270
|
-
|
|
271
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:77
|
|
272
|
-
|
|
273
|
-
Creates a new instance of the class specified with the provided unique name or type and constructor arguments. If an existing
|
|
274
|
-
object has already been created with the given name, that instance is returned, otherwise a new instance is created
|
|
275
|
-
using the provided arguments.
|
|
276
|
-
|
|
277
|
-
#### Type Parameters
|
|
278
|
-
|
|
279
|
-
##### T
|
|
280
|
-
|
|
281
|
-
`T`
|
|
282
|
-
|
|
283
|
-
#### Parameters
|
|
284
|
-
|
|
285
|
-
##### type
|
|
286
|
-
|
|
287
|
-
`any`
|
|
288
|
-
|
|
289
|
-
The fully qualified name or type of the class to instantiate. If a type is given it's class name will be inferred
|
|
290
|
-
via the constructor name.
|
|
291
|
-
|
|
292
|
-
##### options?
|
|
293
|
-
|
|
294
|
-
`InstanceOptions`
|
|
295
|
-
|
|
296
|
-
The options to use when instantiating the new class object.
|
|
297
|
-
|
|
298
|
-
#### Returns
|
|
299
|
-
|
|
300
|
-
`T` \| `Promise`\<`T`\>
|
|
301
|
-
|
|
302
|
-
#### Inherited from
|
|
303
|
-
|
|
304
|
-
`CoreObjectFactory.newInstance`
|
|
305
|
-
|
|
306
|
-
***
|
|
307
|
-
|
|
308
|
-
### register()
|
|
309
|
-
|
|
310
|
-
> **register**(`clazz`, `fqn?`): `void`
|
|
311
|
-
|
|
312
|
-
Defined in: node\_modules/@rapidrest/core/dist/types/ObjectFactory.d.ts:83
|
|
313
|
-
|
|
314
|
-
Registers the given class type for the provided fully qualified name.
|
|
315
|
-
|
|
316
|
-
#### Parameters
|
|
317
|
-
|
|
318
|
-
##### clazz
|
|
319
|
-
|
|
320
|
-
`any`
|
|
321
|
-
|
|
322
|
-
The class type to register.
|
|
323
|
-
|
|
324
|
-
##### fqn?
|
|
325
|
-
|
|
326
|
-
`string`
|
|
327
|
-
|
|
328
|
-
The fully qualified name of the class to register. If not specified, the class name will be used.
|
|
329
|
-
|
|
330
|
-
#### Returns
|
|
331
|
-
|
|
332
|
-
`void`
|
|
333
|
-
|
|
334
|
-
#### Inherited from
|
|
335
|
-
|
|
336
|
-
`CoreObjectFactory.register`
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
[**@rapidrest/service-core**](../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@rapidrest/service-core](../globals.md) / OpenAPIRoute
|
|
6
|
-
|
|
7
|
-
# Class: OpenAPIRoute
|
|
8
|
-
|
|
9
|
-
Defined in: [src/routes/OpenAPIRoute.ts:44](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/routes/OpenAPIRoute.ts#L44)
|
|
10
|
-
|
|
11
|
-
The `OpenAPIRoute` provides default routes to expose the service's OpenAPI specification.
|
|
12
|
-
|
|
13
|
-
- `GET /` — Swagger UI HTML (loads swagger-ui-dist from CDN)
|
|
14
|
-
- `GET /openapi.json` — raw OpenAPI specification as JSON
|
|
15
|
-
- `GET /openapi.yaml` — raw OpenAPI specification as YAML
|
|
16
|
-
|
|
17
|
-
## Author
|
|
18
|
-
|
|
19
|
-
Jean-Philippe Steinmetz
|
|
20
|
-
|
|
21
|
-
## Constructors
|
|
22
|
-
|
|
23
|
-
### Constructor
|
|
24
|
-
|
|
25
|
-
> **new OpenAPIRoute**(): `OpenAPIRoute`
|
|
26
|
-
|
|
27
|
-
#### Returns
|
|
28
|
-
|
|
29
|
-
`OpenAPIRoute`
|
|
30
|
-
|
|
31
|
-
## Methods
|
|
32
|
-
|
|
33
|
-
### getAPIDocs()
|
|
34
|
-
|
|
35
|
-
> **getAPIDocs**(): `string`
|
|
36
|
-
|
|
37
|
-
Defined in: [src/routes/OpenAPIRoute.ts:63](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/routes/OpenAPIRoute.ts#L63)
|
|
38
|
-
|
|
39
|
-
#### Returns
|
|
40
|
-
|
|
41
|
-
`string`
|
|
42
|
-
|
|
43
|
-
***
|
|
44
|
-
|
|
45
|
-
### getHTML()
|
|
46
|
-
|
|
47
|
-
> **getHTML**(): `string`
|
|
48
|
-
|
|
49
|
-
Defined in: [src/routes/OpenAPIRoute.ts:54](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/routes/OpenAPIRoute.ts#L54)
|
|
50
|
-
|
|
51
|
-
#### Returns
|
|
52
|
-
|
|
53
|
-
`string`
|
|
54
|
-
|
|
55
|
-
***
|
|
56
|
-
|
|
57
|
-
### getJSON()
|
|
58
|
-
|
|
59
|
-
> **getJSON**(): `any`
|
|
60
|
-
|
|
61
|
-
Defined in: [src/routes/OpenAPIRoute.ts:71](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/routes/OpenAPIRoute.ts#L71)
|
|
62
|
-
|
|
63
|
-
#### Returns
|
|
64
|
-
|
|
65
|
-
`any`
|
|
66
|
-
|
|
67
|
-
***
|
|
68
|
-
|
|
69
|
-
### getYAML()
|
|
70
|
-
|
|
71
|
-
> **getYAML**(): `string`
|
|
72
|
-
|
|
73
|
-
Defined in: [src/routes/OpenAPIRoute.ts:80](https://github.com/rapidrest/service-core/blob/33d3655fa6883713f33f0fe6f330eb205671fea1/src/routes/OpenAPIRoute.ts#L80)
|
|
74
|
-
|
|
75
|
-
#### Returns
|
|
76
|
-
|
|
77
|
-
`string`
|